You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Question__OjProblem.5324...

194 lines
1.5 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

(window.webpackJsonp=window.webpackJsonp||[]).push([[188,3,5,7,8,19],{"++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(c,s){c.cmdState.push(s)}function P(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function S(c){var s=c.cmdState.pop();s&&s.closeBracket()}function C(c){for(var s=c.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(c,s,f){return function(){this.name=c,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(c,s){c.f=s}function h(c,s){var f;if(c.match(/^\\[a-zA-Z@]+/)){var i=c.current().slice(1);return f=l.hasOwnProperty(i)?l[i]:l.DEFAULT,f=new f,w(s,f),p(s,o),f.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return p(s,function(t,u){return d(t,u,"\\]")}),"keyword";if(c.match("\\("))return p(s,function(t,u){return d(t,u,"\\)")}),"keyword";if(c.match("$$"))return p(s,function(t,u){return d(t,u,"$$")}),"keyword";if(c.match("$"))return p(s,function(t,u){return d(t,u,"$")}),"keyword";var n=c.next();if(n=="%")return c.skipToEnd(),"comment";if(n=="}"||n=="]"){if(f=P(s),f)f.closeBracket(n),p(s,o);else return"error";return"bracket"}else return n=="{"||n=="["?(f=l.DEFAULT,f=new f,w(s,f),"bracket"):/\d/.test(n)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),f=C(s),f.name=="begin"&&(f.argument=c.current()),f.styleIdentifier())}function d(c,s,f){if(c.eatSpace())return null;if(f&&c.match(f))return p(s,h),"keyword";if(c.match(/^\\[a-zA-Z@]+/))return"tag";if(c.match(/^[a-zA-Z]+/))return"variable-2";if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";if(c.match(/^[\^_&]/))return"tag";if(c.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(c.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=c.next();return i=="{"||i=="}"||i=="["||i=="]"||i=="("||i==")"?"bracket":i=="%"?(c.skipToEnd(),"comment"):"error"}function o(c,s){var f=c.peek(),i;return f=="{"||f=="["?(i=P(s),i.openBracket(f),c.eat(f),p(s,h),"bracket"):/[ \t\r]/.test(f)?(c.eat(f),null):(p(s,h),S(s),h(c,s))}return{startState:function(){var c=U.inMathMode?function(s,f){return d(s,f)}:h;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,s){return s.f(c,s)},blankLine:function(c){c.f=h,c.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 C=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return S.replace(/#{\s*key\s*}/g,C)}function P(S,C){var T,l,p,h,d,o,c=!1;C||(C={}),T=C.debug||!1;try{p=ae(),h=document.createRange(),d=document.getSelection(),o=document.createElement("span"),o.textContent=S,o.style.all="unset",o.style.position="fixed",o.style.top=0,o.style.clip="rect(0, 0, 0, 0)",o.style.whiteSpace="pre",o.style.webkitUserSelect="text",o.style.MozUserSelect="text",o.style.msUserSelect="text",o.style.userSelect="text",o.addEventListener("copy",function(f){if(f.stopPropagation(),C.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[C.format]||Z.default;window.clipboardData.setData(i,S)}else f.clipboardData.clearData(),f.clipboardData.setData(C.format,S);C.onCopy&&(f.preventDefault(),C.onCopy(f.clipboardData))}),document.body.appendChild(o),h.selectNodeContents(o),d.addRange(h);var s=document.execCommand("copy");if(!s)throw new Error("copy command was unsuccessful");c=!0}catch(f){T&&console.error("unable to copy using execCommand: ",f),T&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(C.format||"text",S),C.onCopy&&C.onCopy(window.clipboardData),c=!0}catch(i){T&&console.error("unable to copy using clipboardData: ",i),T&&console.error("falling back to prompt"),l=w("message"in C?C.message:U),window.prompt(l,S)}}finally{d&&(typeof d.removeRange=="function"?d.removeRange(h):d.removeAllRanges()),o&&document.body.removeChild(o),p()}return c}$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,C=Object.keys(Z),T=0,l=C.length;T<l;T++){var p=C[T],h=Z[p].exports;if(h===w||h&&h.default===w){S=p;break}}if(!S){S=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var d={},T=0,l=C.length;T<l;T++){var p=C[T];d[p]=p}ae[S]=["function(require,module,exports){"+w+"(self); }",d]}var o=Math.floor(Math.pow(16,8)*Math.random()).toString(16),c={};c[S]=S,ae[o]=["function(require,module,exports){var f = require("+U(S)+");(f.default ? f.default : f)(self);}",c];var s={};f(o);function f(g){s[g]=!0;for(var _ in ae[g][1]){var b=ae[g][1][_];s[b]||f(b)}}var i="("+z+")({"+Object.keys(s).map(function(g){return U(g)+":["+ae[g][0]+","+U(ae[g][1])+"]"}).join(",")+"},{},["+U(o)+"])",n=window.URL||window.webkitURL||window.mozURL||window.msURL,t=new Blob([i],{type:"text/javascript"});if(P&&P.bare)return t;var u=n.createObjectURL(t),y=new Worker(u);return y.objectURL=u,y}},"19Vz":function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){ae.defineOption("placeholder","",function(T,l,p){var h=p&&p!=ae.Init;if(l&&!h)T.on("blur",P),T.on("change",S),T.on("swapDoc",S),ae.on(T.getInputField(),"compositionupdate",T.state.placeholderCompose=function(){w(T)}),S(T);else if(!l&&h){T.off("blur",P),T.off("change",S),T.off("swapDoc",S),ae.off(T.getInputField(),"compositionupdate",T.state.placeholderCompose),Z(T);var d=T.getWrapperElement();d.className=d.className.replace(" CodeMirror-empty","")}l&&!T.hasFocus()&&P(T)});function Z(T){T.state.placeholder&&(T.state.placeholder.parentNode.removeChild(T.state.placeholder),T.state.placeholder=null)}function U(T){Z(T);var l=T.state.placeholder=document.createElement("pre");l.style.cssText="height: 0; overflow: visible",l.style.direction=T.getOption("direction"),l.className="CodeMirror-placeholder CodeMirror-line-like";var p=T.getOption("placeholder");typeof p=="string"&&(p=document.createTextNode(p)),l.appendChild(p),T.display.lineSpace.insertBefore(l,T.display.lineSpace.firstChild)}function w(T){setTimeout(function(){var l=!1,p=T.getInputField();p.nodeName=="TEXTAREA"?l=!p.value:T.lineCount()==1&&(l=!/[^\u200b]/.test(p.querySelector(".CodeMirror-line").textContent)),l?U(T):Z(T)},20)}function P(T){C(T)&&U(T)}function S(T){var l=T.getWrapperElement(),p=C(T);l.className=l.className.replace(" CodeMirror-empty","")+(p?" CodeMirror-empty":""),p?U(T):Z(T)}function C(T){return T.lineCount()===1&&T.getLine(0)===""}})},"1FX+":function($e,We,z){$e.exports={flex_box_center:"flex_box_center___t3HuD",flex_space_between:"flex_space_between___3eY6W",flex_box_vertical_center:"flex_box_vertical_center___SMD2f",flex_box_center_end:"flex_box_center_end___1qy96",flex_box_column:"flex_box_column___1iEso",wrap:"wrap___3Vyua",head:"head___HUi2n",sort:"sort___1UPxB",btn:"btn___2b6SJ",listWarp:"listWarp___1pNnP",pagination:"pagination___3I0F3",fixedRight:"fixedRight___527Xj","oj-width-input":"oj-width-input___QQMFK"}},"1eCo":function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";var Z={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},U={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ae.defineMode("xml",function(w,P){var S=w.indentUnit,C={},T=P.htmlMode?Z:U;for(var l in T)C[l]=T[l];for(var l in P)C[l]=P[l];var p,h;function d(x,O){function A(F){return O.tokenize=F,F(x,O)}var D=x.next();if(D=="<")return x.eat("!")?x.eat("[")?x.match("CDATA[")?A(s("atom","]]>")):null:x.match("--")?A(s("comment","-->")):x.match("DOCTYPE",!0,!0)?(x.eatWhile(/[\w\._\-]/),A(f(1))):null:x.eat("?")?(x.eatWhile(/[\w\._\-]/),O.tokenize=s("meta","?>"),"meta"):(p=x.eat("/")?"closeTag":"openTag",O.tokenize=o,"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 o(x,O){var A=x.next();if(A==">"||A=="/"&&x.eat(">"))return O.tokenize=d,p=A==">"?"endTag":"selfcloseTag","tag bracket";if(A=="=")return p="equals",null;if(A=="<"){O.tokenize=d,O.state=u,O.tagName=O.tagStart=null;var D=O.tokenize(x,O);return D?D+" tag error":"tag error"}else return/[\'\"]/.test(A)?(O.tokenize=c(A),O.stringStartCol=x.column(),O.tokenize(x,O)):(x.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(x){var O=function(A,D){for(;!A.eol();)if(A.next()==x){D.tokenize=o;break}return"string"};return O.isInAttribute=!0,O}function s(x,O){return function(A,D){for(;!A.eol();){if(A.match(O)){D.tokenize=d;break}A.next()}return x}}function f(x){return function(O,A){for(var D;(D=O.next())!=null;){if(D=="<")return A.tokenize=f(x+1),A.tokenize(O,A);if(D==">")if(x==1){A.tokenize=d;break}else return A.tokenize=f(x-1),A.tokenize(O,A)}return"meta"}}function i(x,O,A){this.prev=x.context,this.tagName=O,this.indent=x.indented,this.startOfLine=A,(C.doNotIndent.hasOwnProperty(O)||x.context&&x.context.noIndent)&&(this.noIndent=!0)}function n(x){x.context&&(x.context=x.context.prev)}function t(x,O){for(var A;;){if(!x.context)return;if(A=x.context.tagName,!C.contextGrabbers.hasOwnProperty(A)||!C.contextGrabbers[A].hasOwnProperty(O))return;n(x)}}function u(x,O,A){return x=="openTag"?(A.tagStart=O.column(),y):x=="closeTag"?g:u}function y(x,O,A){return x=="word"?(A.tagName=O.current(),h="tag",v):C.allowMissingTagName&&x=="endTag"?(h="tag bracket",v(x,O,A)):(h="error",y)}function g(x,O,A){if(x=="word"){var D=O.current();return A.context&&A.context.tagName!=D&&C.implicitlyClosed.hasOwnProperty(A.context.tagName)&&n(A),A.context&&A.context.tagName==D||C.matchClosing===!1?(h="tag",_):(h="tag error",b)}else return C.allowMissingTagName&&x=="endTag"?(h="tag bracket",_(x,O,A)):(h="error",b)}function _(x,O,A){return x!="endTag"?(h="error",_):(n(A),u)}function b(x,O,A){return h="error",_(x,O,A)}function v(x,O,A){if(x=="word")return h="attribute",m;if(x=="endTag"||x=="selfcloseTag"){var D=A.tagName,I=A.tagStart;return A.tagName=A.tagStart=null,x=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(D)?t(A,D):(t(A,D),A.context=new i(A,D,I==A.indented)),u}return h="error",v}function m(x,O,A){return x=="equals"?E:(C.allowMissing||(h="error"),v(x,O,A))}function E(x,O,A){return x=="string"?a:x=="word"&&C.allowUnquoted?(h="string",v):(h="error",v(x,O,A))}function a(x,O,A){return x=="string"?a:v(x,O,A)}return{startState:function(x){var O={tokenize:d,state:u,indented:x||0,tagName:null,tagStart:null,context:null};return x!=null&&(O.baseIndent=x),O},token:function(x,O){if(!O.tagName&&x.sol()&&(O.indented=x.indentation()),x.eatSpace())return null;p=null;var A=O.tokenize(x,O);return(A||p)&&A!="comment"&&(h=null,O.state=O.state(p||A,x,O),h&&(A=h=="error"?A+" error":h)),A},indent:function(x,O,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!=o&&x.tokenize!=d)return A?A.match(/^(\s*)/)[0].length:0;if(x.tagName)return C.multilineTagIndentPastTag!==!1?x.tagStart+x.tagName.length+2:x.tagStart+S*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/<!\[CDATA\[/.test(O))return 0;var I=O&&/^<(\/)?([\w_:\.-]*)/.exec(O);if(I&&I[1])for(;D;)if(D.tagName==I[2]){D=D.prev;break}else if(C.implicitlyClosed.hasOwnProperty(D.tagName))D=D.prev;else break;else if(I)for(;D;){var F=C.contextGrabbers[D.tagName];if(F&&F.hasOwnProperty(I[2]))D=D.prev;else break}for(;D&&D.prev&&!D.startOfLine;)D=D.prev;return D?D.indent+S:x.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(x){x.state==E&&(x.state=v)},xmlCurrentTag:function(x){return x.tagName?{name:x.tagName,close:x.type=="closeTag"}:null},xmlCurrentContext:function(x){for(var O=[],A=x.context;A;A=A.prev)A.tagName&&O.push(A.tagName);return O.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 Rt});var ae=z("VTBJ"),Z=z("1OyB"),U=z("vuIU"),w=z("JX7q"),P=z("Ji7U"),S=z("LK+K"),C=z("q1tI"),T=z("I8Z2"),l=z("BGR+"),p=z("wx14"),h=z("rePB"),d=z("4IlW"),o=z("2GS6"),c=z("Gytx"),s=z.n(c),f=z("TSYQ"),i=z.n(f),n=z("U8pU"),t=z("ODXe"),u=/iPhone/i,y=/iPod/i,g=/iPad/i,_=/\bAndroid(?:.+)Mobile\b/i,b=/Android/i,v=/\bAndroid(?:.+)SD4930UR\b/i,m=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,E=/Windows Phone/i,a=/\bWindows(?:.+)ARM\b/i,x=/BlackBerry/i,O=/BB10/i,A=/Opera Mini/i,D=/\b(CriOS|Chrome)(?:.+)Mobile/i,I=/Mobile(?:.+)Firefox\b/i;function F(wt,lt){return wt.test(lt)}function K(wt){var lt=wt||(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,ct=Object(t.a)(je,1);lt=ct[0]}var Ze={apple:{phone:F(u,lt)&&!F(E,lt),ipod:F(y,lt),tablet:!F(u,lt)&&F(g,lt)&&!F(E,lt),device:(F(u,lt)||F(y,lt)||F(g,lt))&&!F(E,lt)},amazon:{phone:F(v,lt),tablet:!F(v,lt)&&F(m,lt),device:F(v,lt)||F(m,lt)},android:{phone:!F(E,lt)&&F(v,lt)||!F(E,lt)&&F(_,lt),tablet:!F(E,lt)&&!F(v,lt)&&!F(_,lt)&&(F(m,lt)||F(b,lt)),device:!F(E,lt)&&(F(v,lt)||F(m,lt)||F(_,lt)||F(b,lt))||F(/\bokhttp\b/i,lt)},windows:{phone:F(E,lt),tablet:F(a,lt),device:F(E,lt)||F(a,lt)},other:{blackberry:F(x,lt),blackberry10:F(O,lt),opera:F(A,lt),firefox:F(I,lt),chrome:F(D,lt),device:F(x,lt)||F(O,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 ne=Object(ae.a)(Object(ae.a)({},K()),{},{isMobile:K}),j=ne;function G(){}function X(wt,lt,ft){var Qe=lt||"";return wt.key||"".concat(Qe,"item_").concat(ft)}function J(wt){return"".concat(wt,"-menu-")}function B(wt,lt){var ft=-1;C.Children.forEach(wt,function(Qe){ft+=1,Qe&&Qe.type&&Qe.type.isMenuItemGroup?C.Children.forEach(Qe.props.children,function(Te){ft+=1,lt(Te,ft)}):lt(Qe,ft)})}function Q(wt,lt,ft){if(!wt||ft.find)return;C.Children.forEach(wt,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"&&lt.getBoundingClientRect().width;if(Qe){if(ft){var Te=getComputedStyle(lt),je=Te.marginLeft,ct=Te.marginRight;Qe+=+je.replace("px","")+ +ct.replace("px","")}Qe=+Qe.toFixed(6)}return Qe||0},xe=function(lt,ft,Qe){lt&&Object(n.a)(lt.style)==="object"&&(lt.style[ft]=Qe)},ye=function(){return j.any},Ae=z("KQm4"),pe=z("Ff2n"),Oe=z("i8i4"),Fe=z("bdgK"),Me=z("uciX"),Ce=z("8XRh"),Le={adjustX:1,adjustY:1},de={topLeft:{points:["bl","tl"],overflow:Le,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Le,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Le,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Le,offset:[4,0]}},ue={topLeft:{points:["bl","tl"],overflow:Le,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Le,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Le,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Le,offset:[4,0]}},ke=de,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(wt){Object(P.a)(ft,wt);var lt=Object(S.a)(ft);function ft(Qe){var Te;Object(Z.a)(this,ft),Te=lt.call(this,Qe),Te.onDestroy=function(st){Te.props.onDestroy(st)},Te.onKeyDown=function(st){var gt=st.keyCode,kt=Te.menuInstance,Wt=Te.props,Qt=Wt.isOpen,we=Wt.store;if(gt===d.a.ENTER)return Te.onTitleClick(st),ee(we,Te.props.eventKey,!0),!0;if(gt===d.a.RIGHT)return Qt?kt.onKeyDown(st):(Te.triggerOpenChange(!0),ee(we,Te.props.eventKey,!0)),!0;if(gt===d.a.LEFT){var fe;if(Qt)fe=kt.onKeyDown(st);else return;return fe||(Te.triggerOpenChange(!1),fe=!0),fe}return Qt&&(gt===d.a.UP||gt===d.a.DOWN)?kt.onKeyDown(st):void 0},Te.onOpenChange=function(st){Te.props.onOpenChange(st)},Te.onPopupVisibleChange=function(st){Te.triggerOpenChange(st,st?"mouseenter":"mouseleave")},Te.onMouseEnter=function(st){var gt=Te.props,kt=gt.eventKey,Wt=gt.onMouseEnter,Qt=gt.store;ee(Qt,Te.props.eventKey,!1),Wt({key:kt,domEvent:st})},Te.onMouseLeave=function(st){var gt=Te.props,kt=gt.parentMenu,Wt=gt.eventKey,Qt=gt.onMouseLeave;kt.subMenuInstance=Object(w.a)(Te),Qt({key:Wt,domEvent:st})},Te.onTitleMouseEnter=function(st){var gt=Te.props,kt=gt.eventKey,Wt=gt.onItemHover,Qt=gt.onTitleMouseEnter;Wt({key:kt,hover:!0}),Qt({key:kt,domEvent:st})},Te.onTitleMouseLeave=function(st){var gt=Te.props,kt=gt.parentMenu,Wt=gt.eventKey,Qt=gt.onItemHover,we=gt.onTitleMouseLeave;kt.subMenuInstance=Object(w.a)(Te),Qt({key:Wt,hover:!1}),we({key:Wt,domEvent:st})},Te.onTitleClick=function(st){var gt=Object(w.a)(Te),kt=gt.props;if(kt.onTitleClick({key:kt.eventKey,domEvent:st}),kt.triggerSubMenuAction==="hover")return;Te.triggerOpenChange(!kt.isOpen,"click"),ee(kt.store,Te.props.eventKey,!1)},Te.onSubMenuClick=function(st){typeof Te.props.onClick=="function"&&Te.props.onClick(Te.addKeyPath(st))},Te.onSelect=function(st){Te.props.onSelect(st)},Te.onDeselect=function(st){Te.props.onDeselect(st)},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(st){Te.menuInstance=st},Te.addKeyPath=function(st){return Object(ae.a)(Object(ae.a)({},st),{},{keyPath:(st.keyPath||[]).concat(Te.props.eventKey)})},Te.triggerOpenChange=function(st,gt){var kt=Te.props.eventKey,Wt=function(){Te.onOpenChange({key:kt,item:Object(w.a)(Te),trigger:gt,open:st})};gt==="mouseenter"?Te.mouseenterTimeout=setTimeout(function(){Wt()},0):Wt()},Te.isChildrenSelected=function(){var st={find:!1};return Q(Te.props.children,Te.props.selectedKeys,st),st.find},Te.isOpen=function(){return Te.props.openKeys.indexOf(Te.props.eventKey)!==-1},Te.adjustWidth=function(){if(!Te.subMenuTitle||!Te.menuInstance)return;var st=Oe.findDOMNode(Te.menuInstance);if(st.offsetWidth>=Te.subMenuTitle.offsetWidth)return;st.style.minWidth="".concat(Te.subMenuTitle.offsetWidth,"px")},Te.saveSubMenuTitle=function(st){Te.subMenuTitle=st},Te.getBaseProps=function(){var st=Object(w.a)(Te),gt=st.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(st,gt){var kt=Object(w.a)(Te),Wt=kt.haveRendered,Qt=Te.props,we=Qt.motion,fe=Qt.rootPrefixCls,W=Object(ae.a)(Object(ae.a)({},we),{},{leavedClassName:"".concat(fe,"-hidden"),removeOnLeave:!1,motionAppear:Wt||!gt||st!=="inline"});return W};var je=Qe.store,ct=Qe.eventKey,Ze=je.getState(),Tt=Ze.defaultActiveFirst;Te.isRootMenu=!1;var Ot=!1;return Tt&&(Ot=Tt[ct]),ee(je,ct,Ot),Te}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Te=this,je=this.props,ct=je.mode,Ze=je.parentMenu,Tt=je.manualRef;if(Tt&&Tt(this),ct!=="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,ct=Te.eventKey;je&&je(ct),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Te){var je=this,ct=this.getBaseProps(),Ze=this.getMotion(ct.mode,ct.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ct.visible||ct.forceSubMenuRender,!this.haveOpened)return C.createElement("div",null);var Tt=ct.direction;return C.createElement(Ce.default,Object.assign({visible:ct.visible},Ze),function(Ot){var st=Ot.className,gt=Ot.style,kt=i()("".concat(ct.prefixCls,"-sub"),st,Object(h.a)({},"".concat(ct.prefixCls,"-rtl"),Tt==="rtl"));return C.createElement(Ne,Object.assign({},ct,{id:je.internalMenuId,className:kt,style:gt}),Te)})}},{key:"render",value:function(){var Te,je=Object(ae.a)({},this.props),ct=je.isOpen,Ze=this.getPrefixCls(),Tt=je.mode==="inline",Ot=i()(Ze,"".concat(Ze,"-").concat(je.mode),(Te={},Object(h.a)(Te,je.className,!!je.className),Object(h.a)(Te,this.getOpenClassName(),ct),Object(h.a)(Te,this.getActiveClassName(),je.active||ct&&!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 st={},gt={},kt={};je.disabled||(st={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},gt={onClick:this.onTitleClick},kt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Wt={},Qt=je.direction;Tt&&(Qt==="rtl"?Wt.paddingRight=je.inlineIndent*je.level:Wt.paddingLeft=je.inlineIndent*je.level);var we={};this.props.isOpen&&(we={"aria-owns":this.internalMenuId});var fe=null;je.mode!=="horizontal"&&(fe=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(fe=C.createElement(this.props.expandIcon,Object(ae.a)({},this.props))));var W=C.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Wt,className:"".concat(Ze,"-title"),role:"button"},kt,gt,{"aria-expanded":ct},we,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,fe||C.createElement("i",{className:"".concat(Ze,"-arrow")})),q=this.renderChildren(je.children),te=je.parentMenu.isRootMenu?je.parentMenu.props.getPopupContainer:function(ht){return ht.parentNode},se=Ye[je.mode],Se=je.popupOffset?{offset:je.popupOffset}:{},He=je.mode==="inline"?"":je.popupClassName;He+=Qt==="rtl"?" ".concat(Ze,"-rtl"):"";var Je=je.disabled,xt=je.triggerSubMenuAction,Ct=je.subMenuOpenDelay,it=je.forceSubMenuRender,St=je.subMenuCloseDelay,Xt=je.builtinPlacements;ie.forEach(function(ht){return delete je[ht]}),delete je.onClick;var bt=Qt==="rtl"?Object.assign({},ue,Xt):Object.assign({},de,Xt);return delete je.direction,C.createElement("li",Object.assign({},je,st,{className:Ot,role:"menuitem"}),Tt&&W,Tt&&q,!Tt&&C.createElement(Me.a,{prefixCls:Ze,popupClassName:i()("".concat(Ze,"-popup"),He),getPopupContainer:te,builtinPlacements:bt,popupPlacement:se,popupVisible:ct,popupAlign:Se,popup:q,action:Je?[]:[xt],mouseEnterDelay:Ct,mouseLeaveDelay:St,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:it},W))}}]),ft}(C.Component);M.defaultProps={onMouseEnter:G,onMouseLeave:G,onTitleMouseEnter:G,onTitleMouseLeave:G,onTitleClick:G,manualRef:G,mode:"vertical",title:""};var N=Object(T.b)(function(wt,lt){var ft=wt.openKeys,Qe=wt.activeKey,Te=wt.selectedKeys,je=lt.eventKey,ct=lt.subMenuKey;return{isOpen:ft.indexOf(je)>-1,active:Qe[ct]===je,selectedKeys:Te}})(M);N.isSubMenu=!0;var $=N,V="menuitem-overflowed",Y=.5,me=function(wt){Object(P.a)(ft,wt);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=Oe.findDOMNode(Object(w.a)(Qe));return je?[].slice.call(je.children).filter(function(ct){return ct.className.split(" ").indexOf("".concat(Te,"-overflowed-submenu"))<0}):[]},Qe.getOverflowedSubMenuItem=function(Te,je,ct){var Ze=Qe.props,Tt=Ze.overflowedIndicator,Ot=Ze.level,st=Ze.mode,gt=Ze.prefixCls,kt=Ze.theme;if(Ot!==1||st!=="horizontal")return null;var Wt=Qe.props.children[0],Qt=Wt.props,we=Qt.children,fe=Qt.title,W=Qt.style,q=Object(pe.a)(Qt,["children","title","style"]),te=Object(ae.a)({},W),se="".concat(Te,"-overflowed-indicator"),Se="".concat(Te,"-overflowed-indicator");je.length===0&&ct!==!0?te=Object(ae.a)(Object(ae.a)({},te),{},{display:"none"}):ct&&(te=Object(ae.a)(Object(ae.a)({},te),{},{visibility:"hidden",position:"absolute"}),se="".concat(se,"-placeholder"),Se="".concat(Se,"-placeholder"));var He=kt?"".concat(gt,"-").concat(kt):"",Je={};return ie.forEach(function(xt){q[xt]!==void 0&&(Je[xt]=q[xt])}),C.createElement($,Object.assign({title:Tt,className:"".concat(gt,"-overflowed-submenu"),popupClassName:He},Je,{key:se,eventKey:Se,disabled:!1,style:te}),je)},Qe.setChildrenWidthAndResize=function(){if(Qe.props.mode!=="horizontal")return;var Te=Oe.findDOMNode(Object(w.a)(Qe));if(!Te)return;var je=Te.children;if(!je||je.length===0)return;var ct=Te.children[je.length-1];xe(ct,"display","inline-block");var Ze=Qe.getMenuItemNodes(),Tt=Ze.filter(function(Ot){return Ot.className.split(" ").indexOf(V)>=0});Tt.forEach(function(Ot){xe(Ot,"display","inline-block")}),Qe.menuItemSizes=Ze.map(function(Ot){return oe(Ot,!0)}),Tt.forEach(function(Ot){xe(Ot,"display","none")}),Qe.overflowedIndicatorWidth=oe(Te.children[Te.children.length-1],!0),Qe.originalTotalWidth=Qe.menuItemSizes.reduce(function(Ot,st){return Ot+st},0),Qe.handleResize(),xe(ct,"display","none")},Qe.handleResize=function(){if(Qe.props.mode!=="horizontal")return;var Te=Oe.findDOMNode(Object(w.a)(Qe));if(!Te)return;var je=oe(Te);Qe.overflowedItems=[];var ct=0,Ze;Qe.originalTotalWidth>je+Y&&(Ze=-1,Qe.menuItemSizes.forEach(function(Tt){ct+=Tt,ct+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=Oe.findDOMNode(this);if(!je)return;this.resizeObserver=new Fe.default(function(ct){ct.forEach(function(){var Ze=Te.cancelFrameId;cancelAnimationFrame(Ze),Te.cancelFrameId=requestAnimationFrame(Te.setChildrenWidthAndResize)})}),[].slice.call(je.children).concat(je).forEach(function(ct){Te.resizeObserver.observe(ct)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Te.resizeObserver.disconnect(),[].slice.call(je.children).concat(je).forEach(function(ct){Te.resizeObserver.observe(ct)}),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,ct=this.state.lastVisibleIndex;return(Te||[]).reduce(function(Ze,Tt,Ot){var st=Tt;if(je.props.mode==="horizontal"){var gt=je.getOverflowedSubMenuItem(Tt.props.eventKey,[]);ct!==void 0&&je.props.className.indexOf("".concat(je.props.prefixCls,"-root"))!==-1&&(Ot>ct&&(st=C.cloneElement(Tt,{style:{display:"none"},eventKey:"".concat(Tt.props.eventKey,"-hidden"),className:"".concat(V)})),Ot===ct+1&&(je.overflowedItems=Te.slice(ct+1).map(function(Wt){return C.cloneElement(Wt,{key:Wt.props.eventKey,mode:"vertical-left"})}),gt=je.getOverflowedSubMenuItem(Tt.props.eventKey,je.overflowedItems)));var kt=[].concat(Object(Ae.a)(Ze),[gt,st]);return Ot===Te.length-1&&kt.push(je.getOverflowedSubMenuItem(Tt.props.eventKey,[],!0)),kt}return[].concat(Object(Ae.a)(Ze),[st])},[])}},{key:"render",value:function(){var Te=this.props,je=Te.visible,ct=Te.prefixCls,Ze=Te.overflowedIndicator,Tt=Te.mode,Ot=Te.level,st=Te.tag,gt=Te.children,kt=Te.theme,Wt=Object(pe.a)(Te,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Qt=st;return C.createElement(Qt,Object.assign({},Wt),this.renderChildren(gt))}}]),ft}(C.Component);me.defaultProps={tag:"div",className:""};var Re=me;function rt(wt){return wt.length?wt.every(function(lt){return!!lt.props.disabled}):!0}function Pe(wt,lt,ft){var Qe=wt.getState();wt.setState({activeKey:Object(ae.a)(Object(ae.a)({},Qe.activeKey),{},Object(h.a)({},lt,ft))})}function Ie(wt){return wt.eventKey||"0-menu-"}function Xe(wt,lt){var ft=lt,Qe=wt.children,Te=wt.eventKey;if(ft){var je;if(B(Qe,function(ct,Ze){ct&&ct.props&&!ct.props.disabled&&ft===X(ct,Te,Ze)&&(je=!0)}),je)return ft}return ft=null,wt.defaultActiveFirst&&B(Qe,function(ct,Ze){!ft&&ct&&!ct.props.disabled&&(ft=X(ct,Te,Ze))}),ft}function tt(wt){if(wt){var lt=this.instanceArray.indexOf(wt);lt!==-1?this.instanceArray[lt]=wt:this.instanceArray.push(wt)}}var Ve=function(wt){Object(P.a)(ft,wt);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,ct){var Ze=je.keyCode,Tt;if(Te.getFlatInstanceArray().forEach(function(st){st&&st.props.active&&st.onKeyDown&&(Tt=st.onKeyDown(je))}),Tt)return 1;var Ot=null;return(Ze===d.a.UP||Ze===d.a.DOWN)&&(Ot=Te.step(Ze===d.a.UP?-1:1)),Ot?(je.preventDefault(),Pe(Te.props.store,Ie(Te.props),Ot.props.eventKey),typeof ct=="function"&&ct(Ot),1):void 0},Te.onItemHover=function(je){var ct=je.key,Ze=je.hover;Pe(Te.props.store,Ie(Te.props),Ze?ct: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 ct=Te.getFlatInstanceArray(),Ze=Te.props.store.getState().activeKey[Ie(Te.props)],Tt=ct.length;if(!Tt)return null;je<0&&(ct=ct.concat().reverse());var Ot=-1;if(ct.every(function(Wt,Qt){return Wt&&Wt.props.eventKey===Ze?(Ot=Qt,!1):!0}),!Te.props.defaultActiveFirst&&Ot!==-1&&rt(ct.slice(Ot,Tt-1)))return;var st=(Ot+1)%Tt,gt=st;do{var kt=ct[gt];if(!kt||kt.props.disabled)gt=(gt+1)%Tt;else return kt}while(gt!==st);return null},Te.renderCommonMenuItem=function(je,ct,Ze){var Tt=Te.props.store.getState(),Ot=Object(w.a)(Te),st=Ot.props,gt=X(je,st.eventKey,ct),kt=je.props;if(!kt||typeof je.type=="string")return je;var Wt=gt===Tt.activeKey,Qt=Object(ae.a)(Object(ae.a)({mode:kt.mode||st.mode,level:st.level,inlineIndent:st.inlineIndent,renderMenuItem:Te.renderMenuItem,rootPrefixCls:st.prefixCls,index:ct,parentMenu:st.parentMenu,manualRef:kt.disabled?void 0:Object(o.a)(je.ref,tt.bind(Object(w.a)(Te))),eventKey:gt,active:!kt.disabled&&Wt,multiple:st.multiple,onClick:function(fe){(kt.onClick||G)(fe),Te.onClick(fe)},onItemHover:Te.onItemHover,motion:st.motion,subMenuOpenDelay:st.subMenuOpenDelay,subMenuCloseDelay:st.subMenuCloseDelay,forceSubMenuRender:st.forceSubMenuRender,onOpenChange:Te.onOpenChange,onDeselect:Te.onDeselect,onSelect:Te.onSelect,builtinPlacements:st.builtinPlacements,itemIcon:kt.itemIcon||Te.props.itemIcon,expandIcon:kt.expandIcon||Te.props.expandIcon},Ze),{},{direction:st.direction});return(st.mode==="inline"||ye())&&(Qt.triggerSubMenuAction="click"),C.cloneElement(je,Qt)},Te.renderMenuItem=function(je,ct,Ze){if(!je)return null;var Tt=Te.props.store.getState(),Ot={openKeys:Tt.openKeys,selectedKeys:Tt.selectedKeys,triggerSubMenuAction:Te.props.triggerSubMenuAction,subMenuKey:Ze};return Te.renderCommonMenuItem(je,ct,Ot)},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,ct="activeKey"in je?je.activeKey:je.store.getState().activeKey[Ie(je)],Ze=Xe(je,ct);if(Ze!==ct)Pe(je.store,Ie(je),Ze);else if("activeKey"in Te){var Tt=Xe(Te,Te.activeKey);Ze!==Tt&&Pe(je.store,Ie(je),Ze)}}},{key:"render",value:function(){var Te=this,je=Object(p.a)({},this.props);this.instanceArray=[];var ct=i()(je.prefixCls,je.className,"".concat(je.prefixCls,"-").concat(je.mode)),Ze={className:ct,role:je.role||"menu"};je.id&&(Ze.id=je.id),je.focusable&&(Ze.tabIndex=0,Ze.onKeyDown=this.onKeyDown);var Tt=je.prefixCls,Ot=je.eventKey,st=je.visible,gt=je.level,kt=je.mode,Wt=je.overflowedIndicator,Qt=je.theme;return ie.forEach(function(we){return delete je[we]}),delete je.onClick,C.createElement(Re,Object.assign({},je,{prefixCls:Tt,mode:kt,tag:"ul",level:gt,theme:Qt,visible:st,overflowedIndicator:Wt},Ze),C.Children.map(je.children,function(we,fe){return Te.renderMenuItem(we,fe,Ot||"0-menu-")}))}}]),ft}(C.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),Ne=Ke,De=z("Kwbf");function _e(wt,lt,ft){var Qe=wt.prefixCls,Te=wt.motion,je=wt.defaultMotions,ct=je===void 0?{}:je,Ze=wt.openAnimation,Tt=wt.openTransitionName,Ot=lt.switchingModeFromInline;if(Te)return Te;if(Object(n.a)(Ze)==="object"&&Ze)Object(De.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 st=ct[ft];return st||(Ot?null:ct.other)}var he=function(wt){Object(P.a)(ft,wt);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),Ot=Tt.props;if(Ot.selectable){var st=Te.store.getState(),gt=st.selectedKeys,kt=Ze.key;Ot.multiple?gt=gt.concat([kt]):gt=[kt],"selectedKeys"in Ot||Te.store.setState({selectedKeys:gt}),Ot.onSelect(Object(ae.a)(Object(ae.a)({},Ze),{},{selectedKeys:gt}))}},Te.onClick=function(Ze){var Tt=Te.getRealMenuMode(),Ot=Object(w.a)(Te),st=Ot.store,gt=Ot.props.onOpenChange;Tt!=="inline"&&!("openKeys"in Te.props)&&(st.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),Ot=Tt.props,st=Te.store.getState().openKeys.concat(),gt=!1,kt=function(Qt){var we=!1;if(Qt.open)we=st.indexOf(Qt.key)===-1,we&&st.push(Qt.key);else{var fe=st.indexOf(Qt.key);we=fe!==-1,we&&st.splice(fe,1)}gt=gt||we};Array.isArray(Ze)?Ze.forEach(kt):kt(Ze),gt&&("openKeys"in Te.props||Te.store.setState({openKeys:st}),Ot.onOpenChange(st))},Te.onDeselect=function(Ze){var Tt=Object(w.a)(Te),Ot=Tt.props;if(Ot.selectable){var st=Te.store.getState().selectedKeys.concat(),gt=Ze.key,kt=st.indexOf(gt);kt!==-1&&st.splice(kt,1),"selectedKeys"in Ot||Te.store.setState({selectedKeys:st}),Ot.onDeselect(Object(ae.a)(Object(ae.a)({},Ze),{},{selectedKeys:st}))}},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,Ot=Ze.target.className,st=Object.prototype.toString.call(Ot)==="[object SVGAnimatedString]"?Ot.animVal:Ot,gt=Ze.propertyName==="font-size"&&st.indexOf("anticon")>=0;(Tt||gt)&&Te.restoreModeVerticalFromInline()},Te.setInnerMenu=function(Ze){Te.innerMenu=Ze},Te.isRootMenu=!0;var je=Qe.defaultSelectedKeys,ct=Qe.defaultOpenKeys;return"selectedKeys"in Qe&&(je=Qe.selectedKeys||[]),"openKeys"in Qe&&(ct=Qe.openKeys||[]),Te.store=Object(T.c)({selectedKeys:je,openKeys:ct,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,ct=je.siderCollapsed,Ze=je.inlineCollapsed,Tt=je.onOpenChange;(!Te.inlineCollapsed&&Ze||!Te.siderCollapsed&&ct)&&Tt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Te){var je=this.props,ct=this.store,Ze=this.inlineOpenKeys,Tt=ct.getState(),Ot={};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(),Ot.openKeys=[]),(!je.inlineCollapsed&&Te.inlineCollapsed||!je.siderCollapsed&&Te.siderCollapsed)&&(Ot.openKeys=Ze,this.inlineOpenKeys=[])),Object.keys(Ot).length&&ct.setState(Ot)}},{key:"updateMenuDisplay",value:function(){var Te=this.props.collapsedWidth,je=this.store,ct=this.prevOpenKeys,Ze=this.getInlineCollapsed()&&(Te===0||Te==="0"||Te==="0px");Ze?(this.prevOpenKeys=je.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ct&&(this.store.setState({openKeys:ct}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Te=this.props.mode,je=this.state.switchingModeFromInline,ct=this.getInlineCollapsed();return je&&ct?"inline":ct?"vertical":Te}},{key:"getInlineCollapsed",value:function(){var Te=this.props,je=Te.inlineCollapsed,ct=Te.siderCollapsed;return ct!==void 0?ct: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:_e(this.props,this.state,je)}),delete Te.openAnimation,delete Te.openTransitionName,C.createElement(T.a,{store:this.store},C.createElement(Ne,Object.assign({},Te,{ref:this.setInnerMenu}),this.props.children))}}]),ft}(C.Component);he.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:C.createElement("span",null,"\xB7\xB7\xB7")};var ve=he,Ee=function(wt){Object(P.a)(ft,wt);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,ct=je.eventKey,Ze=je.onItemHover,Tt=je.onMouseLeave;Ze({key:ct,hover:!1}),Tt({key:ct,domEvent:Te})},Qe.onMouseEnter=function(Te){var je=Qe.props,ct=je.eventKey,Ze=je.onItemHover,Tt=je.onMouseEnter;Ze({key:ct,hover:!0}),Tt({key:ct,domEvent:Te})},Qe.onClick=function(Te){var je=Qe.props,ct=je.eventKey,Ze=je.multiple,Tt=je.onClick,Ot=je.onSelect,st=je.onDeselect,gt=je.isSelected,kt={key:ct,keyPath:[ct],item:Object(w.a)(Qe),domEvent:Te};Tt(kt),Ze?gt?st(kt):Ot(kt):gt||Ot(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),ct=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:ct,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},Ot=Object(ae.a)({},je.style);je.mode==="inline"&&(je.direction==="rtl"?Ot.paddingRight=je.inlineIndent*je.level:Ot.paddingLeft=je.inlineIndent*je.level),ie.forEach(function(gt){return delete je[gt]}),delete je.direction;var st=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(st=C.createElement(this.props.itemIcon,this.props)),C.createElement("li",Object.assign({},Object(l.default)(je,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Ze,Tt,{style:Ot,ref:this.saveNode}),je.children,st)}}]),ft}(C.Component);Ee.isMenuItem=!0,Ee.defaultProps={onSelect:G,onMouseEnter:G,onMouseLeave:G,manualRef:G};var be=Object(T.b)(function(wt,lt){var ft=wt.activeKey,Qe=wt.selectedKeys,Te=lt.eventKey,je=lt.subMenuKey;return{active:ft[je]===Te,isSelected:Qe.indexOf(Te)!==-1}})(Ee),Ge=be,qe=function(wt){Object(P.a)(ft,wt);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,ct=je.renderMenuItem,Ze=je.index;return ct(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,ct=je===void 0?"":je,Ze=Te.rootPrefixCls,Tt="".concat(Ze,"-item-group-title"),Ot="".concat(Ze,"-item-group-list"),st=Te.title,gt=Te.children;return ie.forEach(function(kt){return delete Te[kt]}),delete Te.onClick,delete Te.direction,C.createElement("li",Object.assign({},Te,{className:"".concat(ct," ").concat(Ze,"-item-group")}),C.createElement("div",{className:Tt,title:typeof st=="string"?st:void 0},st),C.createElement("ul",{className:Ot},C.Children.map(gt,this.renderInnerMenuItem)))}}]),ft}(C.Component);qe.isMenuItemGroup=!0,qe.defaultProps={disabled:!0};var pt=qe,Pt=function(lt){var ft=lt.className,Qe=lt.rootPrefixCls,Te=lt.style;return C.createElement("li",{className:"".concat(ft," ").concat(Qe,"-item-divider"),style:Te})};Pt.defaultProps={disabled:!0,className:"",style:{}};var Rt=Pt,Mt=We.e=ve},"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"),C=z.n(S),T=z("wx14"),l=z("zLVn"),p=z("9R94"),h=function(E){Object(Z.a)(a,E);function a(){for(var O,A=arguments.length,D=new Array(A),I=0;I<A;I++)D[I]=arguments[I];return O=E.call.apply(E,[this].concat(D))||this,O.history=Object(P.a)(O.props),O}var x=a.prototype;return x.render=function(){return w.a.createElement(ae.c,{history:this.history,children:this.props.children})},a}(w.a.Component),d=function(E){Object(Z.a)(a,E);function a(){for(var O,A=arguments.length,D=new Array(A),I=0;I<A;I++)D[I]=arguments[I];return O=E.call.apply(E,[this].concat(D))||this,O.history=Object(P.b)(O.props),O}var x=a.prototype;return x.render=function(){return w.a.createElement(ae.c,{history:this.history,children:this.props.children})},a}(w.a.Component),o=function(a,x){return typeof a=="function"?a(x):a},c=function(a,x){return typeof a=="string"?Object(P.c)(a,null,null,x):a},s=function(a){return a},f=w.a.forwardRef;typeof f=="undefined"&&(f=s);function i(E){return!!(E.metaKey||E.altKey||E.ctrlKey||E.shiftKey)}var n=f(function(E,a){var x=E.innerRef,O=E.navigate,A=E.onClick,D=Object(l.a)(E,["innerRef","navigate","onClick"]),I=D.target,F=Object(T.a)({},D,{onClick:function(ne){try{A&&A(ne)}catch(j){throw ne.preventDefault(),j}!ne.defaultPrevented&&ne.button===0&&(!I||I==="_self")&&!i(ne)&&(ne.preventDefault(),O())}});return s!==f?F.ref=a||x:F.ref=x,w.a.createElement("a",F)}),t=f(function(E,a){var x=E.component,O=x===void 0?n:x,A=E.replace,D=E.to,I=E.innerRef,F=Object(l.a)(E,["component","replace","to","innerRef"]);return w.a.createElement(ae.e.Consumer,null,function(K){K||Object(p.a)(!1);var ne=K.history,j=c(o(D,K.location),K.location),G=j?ne.createHref(j):"",X=Object(T.a)({},F,{href:G,navigate:function(){var B=o(D,K.location),Q=A?ne.replace:ne.push;Q(B)}});return s!==f?X.ref=a||I:X.innerRef=I,w.a.createElement(O,X)})});if(!1)var u,y;var g=function(a){return a},_=w.a.forwardRef;typeof _=="undefined"&&(_=g);function b(){for(var E=arguments.length,a=new Array(E),x=0;x<E;x++)a[x]=arguments[x];return a.filter(function(O){return O}).join(" ")}var v=_(function(E,a){var x=E["aria-current"],O=x===void 0?"page":x,A=E.activeClassName,D=A===void 0?"active":A,I=E.activeStyle,F=E.className,K=E.exact,ne=E.isActive,j=E.location,G=E.sensitive,X=E.strict,J=E.style,B=E.to,Q=E.innerRef,ie=Object(l.a)(E,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return w.a.createElement(ae.e.Consumer,null,function(oe){oe||Object(p.a)(!1);var xe=j||oe.location,ye=c(o(B,xe),xe),Ae=ye.pathname,pe=Ae&&Ae.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),Oe=pe?Object(ae.f)(xe.pathname,{path:pe,exact:K,sensitive:G,strict:X}):null,Fe=!!(ne?ne(Oe,xe):Oe),Me=Fe?b(F,D):F,Ce=Fe?Object(T.a)({},J,{},I):J,Le=Object(T.a)({"aria-current":Fe&&O||null,className:Me,style:Ce,to:ye},ie);return g!==_?Le.ref=a||Q:Le.innerRef=Q,w.a.createElement(t,Le)})});if(!1)var m},"5nXd":function($e,We,z){var ae=z("MFOe"),Z=ae.slice,U=ae.pluck,w=ae.each,P=ae.bind,S=ae.create,C=ae.isList,T=ae.isFunction,l=ae.isObject;$e.exports={createStore:d};var p={version:"2.0.12",enabled:!1,get:function(o,c){var s=this.storage.read(this._namespacePrefix+o);return this._deserialize(s,c)},set:function(o,c){return c===void 0?this.remove(o):(this.storage.write(this._namespacePrefix+o,this._serialize(c)),c)},remove:function(o){this.storage.remove(this._namespacePrefix+o)},each:function(o){var c=this;this.storage.each(function(s,f){o.call(c,c._deserialize(s),(f||"").replace(c._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(o){return this._namespacePrefix=="__storejs_"+o+"_"},createStore:function(){return d.apply(this,arguments)},addPlugin:function(o){this._addPlugin(o)},namespace:function(o){return d(this.storage,this.plugins,o)}};function h(){var o=typeof console=="undefined"?null:console;if(!o)return;var c=o.warn?o.warn:o.log;c.apply(o,arguments)}function d(o,c,s){s||(s=""),o&&!C(o)&&(o=[o]),c&&!C(c)&&(c=[c]);var f=s?"__storejs_"+s+"_":"",i=s?new RegExp("^"+f):null,n=/^[a-zA-Z0-9_\-]*$/;if(!n.test(s))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var t={_namespacePrefix:f,_namespaceRegexp:i,_testStorage:function(y){try{var g="__storejs__test__";y.write(g,g);var _=y.read(g)===g;return y.remove(g),_}catch(b){return!1}},_assignPluginFnProp:function(y,g){var _=this[g];this[g]=function(){var v=Z(arguments,0),m=this;function E(){return _?(w(arguments,function(x,O){v[O]=x}),_.apply(m,v)):void 0}var a=[E].concat(v);return y.apply(m,a)}},_serialize:function(y){return JSON.stringify(y)},_deserialize:function(y,g){if(!y)return g;var _="";try{_=JSON.parse(y)}catch(b){_=y}return _!==void 0?_:g},_addStorage:function(y){if(this.enabled)return;this._testStorage(y)&&(this.storage=y,this.enabled=!0)},_addPlugin:function(y){var g=this;if(C(y)){w(y,function(v){g._addPlugin(v)});return}var _=U(this.plugins,function(v){return y===v});if(_)return;if(this.plugins.push(y),!T(y))throw new Error("Plugins must be function values that return objects");var b=y.call(this);if(!l(b))throw new Error("Plugins must return an object of function properties");w(b,function(v,m){if(!T(v))throw new Error("Bad plugin property: "+m+" from plugin "+y.name+". Plugins should only return functions.");g._assignPluginFnProp(v,m)})},addStorage:function(y){h("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(y)}},u=S(t,p,{plugins:[]});return u.raw={},w(u,function(y,g){T(y)&&(u.raw[g]=P(u,y))}),w(o,function(y){u._addStorage(y)}),w(c,function(y){u._addPlugin(y)}),u}},"6+eU":function($e,We,z){"use strict";z.d(We,"a",function(){return _});var ae=z("wx14"),Z=z("rePB"),U=z("VTBJ"),w=z("1OyB"),P=z("vuIU"),S=z("Ji7U"),C=z("LK+K"),T=z("q1tI"),l=z.n(T),p=z("TSYQ"),h=z.n(p),d=function(v){var m,E="".concat(v.rootPrefixCls,"-item"),a=h()(E,"".concat(E,"-").concat(v.page),(m={},Object(Z.a)(m,"".concat(E,"-active"),v.active),Object(Z.a)(m,v.className,!!v.className),Object(Z.a)(m,"".concat(E,"-disabled"),!v.page),m)),x=function(){v.onClick(v.page)},O=function(D){v.onKeyPress(D,v.onClick,v.page)};return l.a.createElement("li",{title:v.showTitle?v.page:null,className:a,onClick:x,onKeyPress:O,tabIndex:"0"},v.itemRender(v.page,"page",l.a.createElement("a",{rel:"nofollow"},v.page)))},o=d,c={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},s=function(b){Object(S.a)(m,b);var v=Object(C.a)(m);function m(){var E;Object(w.a)(this,m);for(var a=arguments.length,x=new Array(a),O=0;O<a;O++)x[O]=arguments[O];return E=v.call.apply(v,[this].concat(x)),E.state={goInputText:""},E.buildOptionText=function(A){return"".concat(A," ").concat(E.props.locale.items_per_page)},E.changeSize=function(A){E.props.changeSize(Number(A))},E.handleChange=function(A){E.setState({goInputText:A.target.value})},E.handleBlur=function(A){var D=E.props,I=D.goButton,F=D.quickGo,K=D.rootPrefixCls,ne=E.state.goInputText;if(I||ne==="")return;if(A.relatedTarget&&(A.relatedTarget.className.indexOf("".concat(K,"-prev"))>=0||A.relatedTarget.className.indexOf("".concat(K,"-next"))>=0))return;E.setState({goInputText:""}),F(E.getValidValue())},E.go=function(A){var D=E.state.goInputText;if(D==="")return;(A.keyCode===c.ENTER||A.type==="click")&&(E.setState({goInputText:""}),E.props.quickGo(E.getValidValue()))},E}return Object(P.a)(m,[{key:"getValidValue",value:function(){var a=this.state,x=a.goInputText,O=a.current;return!x||isNaN(x)?O:Number(x)}},{key:"getPageSizeOptions",value:function(){var a=this.props,x=a.pageSize,O=a.pageSizeOptions;return O.some(function(A){return A.toString()===x.toString()})?O:O.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 a=this,x=this.props,O=x.pageSize,A=x.locale,D=x.rootPrefixCls,I=x.changeSize,F=x.quickGo,K=x.goButton,ne=x.selectComponentClass,j=x.buildOptionText,G=x.selectPrefixCls,X=x.disabled,J=this.state.goInputText,B="".concat(D,"-options"),Q=ne,ie=null,oe=null,xe=null;if(!I&&!F)return null;var ye=this.getPageSizeOptions();if(I&&Q){var Ae=ye.map(function(pe,Oe){return l.a.createElement(Q.Option,{key:Oe,value:pe.toString()},(j||a.buildOptionText)(pe))});ie=l.a.createElement(Q,{disabled:X,prefixCls:G,showSearch:!1,className:"".concat(B,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(O||ye[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Oe){return Oe.parentNode}},Ae)}return F&&(K&&(xe=typeof K=="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},K)),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,xe)),l.a.createElement("li",{className:"".concat(B)},ie,oe)}}]),m}(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 u(b,v,m){return m}function y(b,v,m){var E=typeof b=="undefined"?v.pageSize:b;return Math.floor((m.total-1)/E)+1}var g=function(b){Object(S.a)(m,b);var v=Object(C.a)(m);function m(E){var a;Object(w.a)(this,m),a=v.call(this,E),a.getJumpPrevPage=function(){return Math.max(1,a.state.current-(a.props.showLessItems?3:5))},a.getJumpNextPage=function(){return Math.min(y(void 0,a.state,a.props),a.state.current+(a.props.showLessItems?3:5))},a.getItemIcon=function(I,F){var K=a.props.prefixCls,ne=I||l.a.createElement("button",{type:"button","aria-label":F,className:"".concat(K,"-item-link")});return typeof I=="function"&&(ne=l.a.createElement(I,Object(U.a)({},a.props))),ne},a.savePaginationNode=function(I){a.paginationNode=I},a.isValid=function(I){return t(I)&&I!==a.state.current},a.shouldDisplayQuickJumper=function(){var I=a.props,F=I.showQuickJumper,K=I.pageSize,ne=I.total;return ne<=K?!1:F},a.handleKeyDown=function(I){(I.keyCode===c.ARROW_UP||I.keyCode===c.ARROW_DOWN)&&I.preventDefault()},a.handleKeyUp=function(I){var F=a.getValidValue(I),K=a.state.currentInputValue;F!==K&&a.setState({currentInputValue:F}),I.keyCode===c.ENTER?a.handleChange(F):I.keyCode===c.ARROW_UP?a.handleChange(F-1):I.keyCode===c.ARROW_DOWN&&a.handleChange(F+1)},a.changePageSize=function(I){var F=a.state.current,K=y(I,a.state,a.props);F=F>K?K:F,K===0&&(F=a.state.current),typeof I=="number"&&("pageSize"in a.props||a.setState({pageSize:I}),"current"in a.props||a.setState({current:F,currentInputValue:F})),a.props.onShowSizeChange(F,I),"onChange"in a.props&&a.props.onChange&&a.props.onChange(F,I)},a.handleChange=function(I){var F=a.props.disabled,K=I;if(a.isValid(K)&&!F){var ne=y(void 0,a.state,a.props);K>ne?K=ne:K<1&&(K=1),"current"in a.props||a.setState({current:K,currentInputValue:K});var j=a.state.pageSize;return a.props.onChange(K,j),K}return a.state.current},a.prev=function(){a.hasPrev()&&a.handleChange(a.state.current-1)},a.next=function(){a.hasNext()&&a.handleChange(a.state.current+1)},a.jumpPrev=function(){a.handleChange(a.getJumpPrevPage())},a.jumpNext=function(){a.handleChange(a.getJumpNextPage())},a.hasPrev=function(){return a.state.current>1},a.hasNext=function(){return a.state.current<y(void 0,a.state,a.props)},a.runIfEnter=function(I,F){if(I.key==="Enter"||I.charCode===13){for(var K=arguments.length,ne=new Array(K>2?K-2:0),j=2;j<K;j++)ne[j-2]=arguments[j];F.apply(void 0,ne)}},a.runIfEnterPrev=function(I){a.runIfEnter(I,a.prev)},a.runIfEnterNext=function(I){a.runIfEnter(I,a.next)},a.runIfEnterJumpPrev=function(I){a.runIfEnter(I,a.jumpPrev)},a.runIfEnterJumpNext=function(I){a.runIfEnter(I,a.jumpNext)},a.handleGoTO=function(I){(I.keyCode===c.ENTER||I.type==="click")&&a.handleChange(a.state.currentInputValue)};var x=E.onChange!==n,O="current"in E;O&&!x&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var A=E.defaultCurrent;"current"in E&&(A=E.current);var D=E.defaultPageSize;return"pageSize"in E&&(D=E.pageSize),A=Math.min(A,y(D,void 0,E)),a.state={current:A,currentInputValue:A,pageSize:D},a}return Object(P.a)(m,[{key:"componentDidUpdate",value:function(a,x){var O=this.props.prefixCls;if(x.current!==this.state.current&&this.paginationNode){var A=this.paginationNode.querySelector(".".concat(O,"-item-").concat(x.current));A&&document.activeElement===A&&A.blur()}}},{key:"getValidValue",value:function(a){var x=a.target.value,O=y(void 0,this.state,this.props),A=this.state.currentInputValue,D;return x===""?D=x:isNaN(Number(x))?D=A:x>=O?D=O:D=Number(x),D}},{key:"getShowSizeChanger",value:function(){var a=this.props,x=a.showSizeChanger,O=a.total,A=a.totalBoundaryShowSizeChanger;return typeof x!="undefined"?x:O>A}},{key:"renderPrev",value:function(a){var x=this.props,O=x.prevIcon,A=x.itemRender,D=A(a,"prev",this.getItemIcon(O,"prev page")),I=!this.hasPrev();return Object(T.isValidElement)(D)?Object(T.cloneElement)(D,{disabled:I}):D}},{key:"renderNext",value:function(a){var x=this.props,O=x.nextIcon,A=x.itemRender,D=A(a,"next",this.getItemIcon(O,"next page")),I=!this.hasNext();return Object(T.isValidElement)(D)?Object(T.cloneElement)(D,{disabled:I}):D}},{key:"render",value:function(){var a=this,x=this.props,O=x.prefixCls,A=x.className,D=x.style,I=x.disabled,F=x.hideOnSinglePage,K=x.total,ne=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,xe=x.jumpNextIcon,ye=x.selectComponentClass,Ae=x.selectPrefixCls,pe=x.pageSizeOptions,Oe=this.state,Fe=Oe.current,Me=Oe.pageSize,Ce=Oe.currentInputValue;if(F===!0&&K<=Me)return null;var Le=y(void 0,this.state,this.props),de=[],ue=null,ke=null,Ue=null,Ye=null,ee=null,M=j&&j.goButton,N=G?1:2,$=Fe-1>0?Fe-1:0,V=Fe+1<Le?Fe+1:Le,Y=Object.keys(this.props).reduce(function(he,ve){return(ve.substr(0,5)==="data-"||ve.substr(0,5)==="aria-"||ve==="role")&&(he[ve]=a.props[ve]),he},{});if(B)return M&&(typeof M=="boolean"?ee=l.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ne.jump_to_confirm):ee=l.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},M),ee=l.a.createElement("li",{title:X?"".concat(ne.jump_to).concat(Fe,"/").concat(Le):null,className:"".concat(O,"-simple-pager")},ee)),l.a.createElement("ul",Object(ae.a)({className:h()(O,"".concat(O,"-simple"),Object(Z.a)({},"".concat(O,"-disabled"),I),A),style:D,ref:this.savePaginationNode},Y),l.a.createElement("li",{title:X?ne.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:h()("".concat(O,"-prev"),Object(Z.a)({},"".concat(O,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev($)),l.a.createElement("li",{title:X?"".concat(Fe,"/").concat(Le):null,className:"".concat(O,"-simple-pager")},l.a.createElement("input",{type:"text",value:Ce,disabled:I,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),l.a.createElement("span",{className:"".concat(O,"-slash")},"/"),Le),l.a.createElement("li",{title:X?ne.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:h()("".concat(O,"-next"),Object(Z.a)({},"".concat(O,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(V)),ee);if(Le<=3+N*2){var me={locale:ne,rootPrefixCls:O,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:X,itemRender:Q};Le||de.push(l.a.createElement(o,Object(ae.a)({},me,{key:"noPager",page:Le,className:"".concat(O,"-disabled")})));for(var Re=1;Re<=Le;Re+=1){var rt=Fe===Re;de.push(l.a.createElement(o,Object(ae.a)({},me,{key:Re,page:Re,active:rt})))}}else{var Pe=G?ne.prev_3:ne.prev_5,Ie=G?ne.next_3:ne.next_5;ie&&(ue=l.a.createElement("li",{title:X?Pe:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:h()("".concat(O,"-jump-prev"),Object(Z.a)({},"".concat(O,"-jump-prev-custom-icon"),!!oe))},Q(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(oe,"prev page"))),ke=l.a.createElement("li",{title:X?Ie:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:h()("".concat(O,"-jump-next"),Object(Z.a)({},"".concat(O,"-jump-next-custom-icon"),!!xe))},Q(this.getJumpNextPage(),"jump-next",this.getItemIcon(xe,"next page")))),Ye=l.a.createElement(o,{locale:ne,last:!0,rootPrefixCls:O,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Le,page:Le,active:!1,showTitle:X,itemRender:Q}),Ue=l.a.createElement(o,{locale:ne,rootPrefixCls:O,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:X,itemRender:Q});var Xe=Math.max(1,Fe-N),tt=Math.min(Fe+N,Le);Fe-1<=N&&(tt=1+N*2),Le-Fe<=N&&(Xe=Le-N*2);for(var Ve=Xe;Ve<=tt;Ve+=1){var Ke=Fe===Ve;de.push(l.a.createElement(o,{locale:ne,rootPrefixCls:O,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ve,page:Ve,active:Ke,showTitle:X,itemRender:Q}))}Fe-1>=N*2&&Fe!==1+2&&(de[0]=Object(T.cloneElement)(de[0],{className:"".concat(O,"-item-after-jump-prev")}),de.unshift(ue)),Le-Fe>=N*2&&Fe!==Le-2&&(de[de.length-1]=Object(T.cloneElement)(de[de.length-1],{className:"".concat(O,"-item-before-jump-next")}),de.push(ke)),Xe!==1&&de.unshift(Ue),tt!==Le&&de.push(Ye)}var Ne=null;J&&(Ne=l.a.createElement("li",{className:"".concat(O,"-total-text")},J(K,[K===0?0:(Fe-1)*Me+1,Fe*Me>K?K:Fe*Me])));var De=!this.hasPrev()||!Le,_e=!this.hasNext()||!Le;return l.a.createElement("ul",Object(ae.a)({className:h()(O,A,Object(Z.a)({},"".concat(O,"-disabled"),I)),style:D,unselectable:"unselectable",ref:this.savePaginationNode},Y),Ne,l.a.createElement("li",{title:X?ne.prev_page:null,onClick:this.prev,tabIndex:De?null:0,onKeyPress:this.runIfEnterPrev,className:h()("".concat(O,"-prev"),Object(Z.a)({},"".concat(O,"-disabled"),De)),"aria-disabled":De},this.renderPrev($)),de,l.a.createElement("li",{title:X?ne.next_page:null,onClick:this.next,tabIndex:_e?null:0,onKeyPress:this.runIfEnterNext,className:h()("".concat(O,"-next"),Object(Z.a)({},"".concat(O,"-disabled"),_e)),"aria-disabled":_e},this.renderNext(V)),l.a.createElement(f,{disabled:I,locale:ne,rootPrefixCls:O,selectComponentClass:ye,selectPrefixCls:Ae,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Fe,pageSize:Me,pageSizeOptions:pe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:M}))}}],[{key:"getDerivedStateFromProps",value:function(a,x){var O={};if("current"in a&&(O.current=a.current,a.current!==x.current&&(O.currentInputValue=O.current)),"pageSize"in a&&a.pageSize!==x.pageSize){var A=x.current,D=y(a.pageSize,x,a);A=A>D?D:A,"current"in a||(O.current=A,O.currentInputValue=A),O.pageSize=a.pageSize}return O}}]),m}(l.a.Component);g.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:u,totalBoundaryShowSizeChanger:50};var _=g},"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"),C=z("tJVT"),T=z("OaEy"),l=z("2fM7"),p=z("q1tI"),h=z.n(p),d=z("VrN/"),o=z.n(d),c=z("p77/"),s=z.n(c),f=z("c5Ni"),i=z.n(f),n=l.a.Option,t={labelCol:{span:4},wrapperCol:{span:20}},u={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(g){var _=g.callback,b=g.onCancel,v=Object(p.useState)("python"),m=Object(C.a)(v,2),E=m[0],a=m[1];function x(A){a(u[A][1])}function O(A){_(A)}return h.a.createElement(S.a,Object(Z.a)({},t,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:O}),h.a.createElement(S.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},h.a.createElement(l.a,{onChange:x},Object.keys(u).map(function(A){return h.a.createElement(n,{key:A,value:A},u[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(g){var _=g.value,b=g.onChange,v=g.mode,m=g.options,E=m===void 0?{}:m,a=Object(p.useRef)(),x=Object(p.useState)(),O=Object(C.a)(x,2),A=O[0],D=O[1];return Object(p.useEffect)(function(){if(A){function I(F){var K=F.getValue();b&&b(K)}return A.on("change",I),function(){A.off("change",I)}}},[A,b]),Object(p.useEffect)(function(){A&&A.setOption("mode",v)},[A,v]),Object(p.useEffect)(function(){A&&((_!==A.getValue()||_==="")&&setTimeout(function(){A.setValue(_||" ")},300))},[A,_]),Object(p.useEffect)(function(){if(a.current&&!A){var I=o.a.fromTextArea(a.current,Object(ae.a)({mode:v,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},E));D(I)}},[a.current,A]),h.a.createElement("div",{className:"my-codemirror-container"},h.a.createElement("textarea",{ref:a}))}},"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 C}),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 o}),z.d(We,"p",function(){return c}),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 u}),z.d(We,"c",function(){return y}),z.d(We,"e",function(){return g}),z.d(We,"i",function(){return _}),z.d(We,"r",function(){return b});var ae=z("ErOA");function Z(v){return Object(ae.c)("mypractices/".concat(v,".json"),{hidePopLogin:!0})}function U(v,m){return Object(ae.f)("mypractices/".concat(v,"/code_submit.json"),m)}function w(v,m){return Object(ae.c)("mypractices/".concat(v,"/code_debug.json"),m)}function P(v,m){return Object(ae.c)("mypractices/".concat(v,"/submit_records.json"),m)}function S(v){return Object(ae.c)("mypractices/record_detail.json",{id:v})}function C(v,m){return Object(ae.c)("mypractices/".concat(v,"/result.json"),{mode:m})}function T(v,m){return Object(ae.f)("mypractices/".concat(v,"/add_notes.json"),m)}function l(v,m){return Object(ae.f)("mypractices/".concat(v,"/restore_initial_code.json"),m)}function p(v,m){return Object(ae.f)("mypractices/".concat(v,"/sync_code.json"),m)}function h(v,m){return Object(ae.f)("mypractices/".concat(v,"/update_code.json"),m)}function d(v){return Object(ae.f)("mypractices/".concat(v,"/initial_codes.json"))}function o(v,m){return Object(ae.f)("discusses/".concat(v,"/plus.json"),m)}function c(v){return Object(ae.c)("practices/practices_list.json",v)}function s(v,m){return Object(ae.c)("practices/".concat(v,"/question_solution_articles"),m)}function f(v,m){return Object(ae.f)("practices/".concat(v,"/question_solution_articles"),m)}function i(v,m){return Object(ae.g)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active),m)}function n(v,m){return Object(ae.c)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active,"/edit"),m)}function t(v,m){return Object(ae.c)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active),m)}function u(v,m){return Object(ae.f)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active,"/set_authority_or_excellent"),m)}function y(v,m){return Object(ae.f)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active,"/praise_or_treads"),m)}function g(v,m){return Object(ae.f)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active,"/hide"))}function _(v,m){return Object(ae.b)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active),m)}function b(v,m){return Object(ae.f)("mypractices/".concat(v,"/update_practice_time_sum"),m)}},"815F":function($e,We,z){"use strict";z.d(We,"e",function(){return C}),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 o}),z.d(We,"b",function(){return c});var ae=z("KQm4"),Z=z("VTBJ"),U=z("Ff2n"),w=z("Zm9Q"),P=z("Kwbf"),S=z("OZM5");function C(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(u){var y=u.key,g=u.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(g,"".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 u=t.key,y=t.props,g=y.children,_=Object(U.a)(y,["children"]),b=Object(Z.a)({key:u},_),v=f(g);return v.length&&(b.children=v),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(u){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return u.map(function(g,_){var b=Object(S.h)(y?y.pos:"0",_),v=C(g.key,b),m=Object(Z.a)(Object(Z.a)({},g),{},{parent:y,pos:b,children:null,data:g,isStart:[].concat(Object(ae.a)(y?y.isStart:[]),[_===0]),isEnd:[].concat(Object(ae.a)(y?y.isEnd:[]),[_===u.length-1])});return n.push(m),f===!0||i.has(v)?m.children=t(g.children||[],m):m.children=[],m})}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,g){return C(y.key,g)};function t(u,y,g){var _=u?u.children:s,b=u?Object(S.h)(g.pos,y):"0";if(u){var v=n(u,b),m={node:u,index:y,pos:b,key:v,parentPos:g.node?g.pos:null,level:g.level+1};f(m)}_&&_.forEach(function(E,a){t(E,a,{node:u,pos:b,level:g?g.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,u=arguments.length>2?arguments[2]:void 0,y={},g={},_={posEntities:y,keyEntities:g};return i&&(_=i(_)||_),h(s,function(b){var v=b.node,m=b.index,E=b.pos,a=b.key,x=b.parentPos,O=b.level,A={node:v,index:m,key:a,pos:E,level:O},D=C(a,E);y[E]=A,g[D]=A,A.parent=y[x],A.parent&&(A.parent.children=A.parent.children||[],A.parent.children.push(A)),n&&n(A,_)},u),t&&t(_),_}function o(s,f){var i=f.expandedKeys,n=f.selectedKeys,t=f.loadedKeys,u=f.loadingKeys,y=f.checkedKeys,g=f.halfCheckedKeys,_=f.dragOverNodeKey,b=f.dropPosition,v=f.keyEntities,m=v[s],E={eventKey:s,expanded:i.indexOf(s)!==-1,selected:n.indexOf(s)!==-1,loaded:t.indexOf(s)!==-1,loading:u.indexOf(s)!==-1,checked:y.indexOf(s)!==-1,halfChecked:g.indexOf(s)!==-1,pos:String(m?m.pos:""),dragOver:_===s&&b===0,dragOverGapTop:_===s&&b===-1,dragOverGapBottom:_===s&&b===1};return E}function c(s){var f=s.data,i=s.expanded,n=s.selected,t=s.checked,u=s.loaded,y=s.loading,g=s.halfChecked,_=s.dragOver,b=s.dragOverGapTop,v=s.dragOverGapBottom,m=s.pos,E=s.active,a=Object(Z.a)(Object(Z.a)({},f),{},{expanded:i,selected:n,checked:t,loaded:u,loading:y,halfChecked:g,dragOver:_,dragOverGapTop:b,dragOverGapBottom:v,pos:m,active:E});return"props"in a||Object.defineProperty(a,"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}}),a}},"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<ae.modeInfo.length;Z++){var U=ae.modeInfo[Z];U.mimes&&(U.mime=U.mimes[0])}ae.findModeByMIME=function(w){w=w.toLowerCase();for(var P=0;P<ae.modeInfo.length;P++){var S=ae.modeInfo[P];if(S.mime==w)return S;if(S.mimes){for(var C=0;C<S.mimes.length;C++)if(S.mimes[C]==w)return S}}if(/\+xml$/.test(w))return ae.findModeByMIME("application/xml");if(/\+json$/.test(w))return ae.findModeByMIME("application/json")},ae.findModeByExtension=function(w){w=w.toLowerCase();for(var P=0;P<ae.modeInfo.length;P++){var S=ae.modeInfo[P];if(S.ext){for(var C=0;C<S.ext.length;C++)if(S.ext[C]==w)return S}}},ae.findModeByFileName=function(w){for(var P=0;P<ae.modeInfo.length;P++){var S=ae.modeInfo[P];if(S.file&&S.file.test(w))return S}var C=w.lastIndexOf("."),T=C>-1&&w.substring(C+1,w.length);if(T)return ae.findModeByExtension(T)},ae.findModeByName=function(w){w=w.toLowerCase();for(var P=0;P<ae.modeInfo.length;P++){var S=ae.modeInfo[P];if(S.name.toLowerCase()==w)return S;if(S.alias){for(var C=0;C<S.alias.length;C++)if(S.alias[C].toLowerCase()==w)return S}}}})},"9Bee":function($e,We,z){"use strict";var ae=z("k1fw"),Z=z("tJVT"),U=z("q1tI"),w=z.n(U),P=z("vg9a"),S=z("DlQD"),C=z.n(S),T=z("rUJ1");function l(X,J){var B=X.match(/^(\s+)(?:```)/);if(B===null)return J;var Q=B[1];return J.split(`
`).map(function(ie){var oe=ie.match(/^\s+/);if(oe===null)return ie;var xe=Object(Z.a)(oe,1),ye=xe[0];return ye.length>=Q.length?ie.slice(Q.length):ie}).join(`
`)}var p=[],h=["<ul>"],d=new C.a.Renderer,o=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function c(){p.length=0,h=["<ul>"]}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("<li><a href='#"+ie.anchor+"'>"+ie.text+"</a>"),J++;var oe=[];return J=f(X,J,ie.level,oe),oe.length>0&&(Q.push("<ul>"),oe.forEach(function(xe){Q.push(xe)}),Q.push("</ul>")),Q.push("</li>"),J=f(X,J,B,Q),J}function i(){return f(p,0,0,h),h.push("</ul>"),h.join("")}var n={heading:function(J){var B=o.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 xe=y(),ye=ie;ie=xe,g[xe]={type:"block",expression:ye}}return{type:"code",raw:Q,lang:oe,text:ie}}}},t=/(?:\${2})([^\n`]+?)(?:\${2})/gi,u=0,y=function(){return"__special_katext_id_".concat(u++,"__")},g={};function _(){return g}function b(){u=0,g={}}function v(X){return X=X.replace(t,function(J,B){var Q=y();return g[Q]={type:"inline",expression:B},Q}),X}var m=d.listitem;d.listitem=function(X){return m(v(X))};var E=d.paragraph;d.paragraph=function(X){return E(v(X))};var a=d.tablecell;d.tablecell=function(X,J){return a(v(X),J)},d.code=function(X,J,B){var Q=(J||"").match(/\S*/)[0];return Q?["latex","katex","math"].indexOf(Q)>=0?"<p class='editormd-tex'>".concat(X,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(J,'">').concat(B?X:Object(T.escape)(X,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(B?X:Object(T.escape)(X,!0))+"</code></pre>"},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}),"<h"+J+' id="'+Q+'">'+X+"</h"+J+">"},C.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),C.a.use({tokenizer:n,renderer:d});var x=C.a,O=z("SJMd"),A=z("ulZh"),D=z.n(A),I=z("m3rI"),F=z("Oy/b"),K=z("p5ED"),ne=/<pre[^>]*>/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,B=X.value,Q=B===void 0?"":B,ie=X.className,oe=X.showTextOnly,xe=X.showLines,ye=X.style,Ae=ye===void 0?{}:ye,pe=X.stylesPrev,Oe=pe===void 0?{}:pe,Fe=(J=String(Q))===null||J===void 0?void 0:J.replace(/<script.*?>|<\/script>/gi,"").replace(/on\w+="[^"]*"/gi,""),Me=Object(U.useState)(""),Ce=Object(Z.a)(Me,2),Le=Ce[0],de=Ce[1],ue=Object(U.useMemo)(function(){try{var ee=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,M=/\"\/api\/attachments\/|\"\/attachments\/download\//g,N=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Fe=Fe.replace(ee,"("+I.a.API_SERVER+"/api/attachments/").replace(M,'"'+I.a.API_SERVER+"/api/attachments/").replace(N,'"'+I.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
`),Fe=Fe.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(me){}var $=x(Fe),V=_();if(Fe.match(/\[TOC\]/)&&($=$.replace("<p>[TOC]</p>",i()),c()),$=$.replace(/(__special_katext_id_\d+__)/g,function(me,Re){var rt=V[Re],Pe=rt.type,Ie=rt.expression;return Object(F.renderToString)(j(Ie)||"",{displayMode:Pe==="block",throwOnError:!1,output:"html"})}),$=$.replace(/▁/g,"\u2581\u2581\u2581"),b(),oe){var Y=document.createElement("div");return Y.innerHTML=$,Y.innerText}return setTimeout(function(){return Ye()},500),$},[Fe]),ke=Object(U.useRef)();s.WebkitLineClamp=xe,xe&&(Ae=Object(ae.a)(Object(ae.a)({},Ae),s));function Ue(ee){var M=ee.target;if(M.tagName.toUpperCase()==="A"){var N=M.getAttribute("href");if(N.indexOf("office")>-1)ee.preventDefault(),de(N);else if(N.startsWith("#")){ee.preventDefault();var $=document.getElementById(N.replace("#",""));$&&$.scrollIntoView(!0)}}}var Ye=function(){var M,N=(M=ke.current)===null||M===void 0?void 0:M.querySelectorAll("video");N==null||N.forEach(function($){if($.oncontextmenu=function(){return!1},$.src.indexOf(".m3u8")>-1&&!$.canPlayType("application/vnd.apple.mpegurl")){if(D.a.isSupported()){var V=new D.a;V.loadSource($.src),V.attachMedia($)}}})};return Object(U.useEffect)(function(){if(ke.current&&ue&&(ue.match(ne)&&window.PR.prettyPrint()),ke.current)return ke.current.addEventListener("click",Ue),function(){ke.current.removeEventListener("click",Ue),b(),c()}},[ue,ke.current,Ue]),w.a.createElement(w.a.Fragment,null,w.a.createElement("div",{ref:ke,style:Object(ae.a)({},Ae),className:"".concat(ie||""," markdown-body "),dangerouslySetInnerHTML:{__html:ue}}),w.a.createElement(K.a,{close:!0,data:Le,type:Le!=null&&Le.length?"office":"",style:Object(ae.a)({},Oe),onClose:function(){return de("")}}))}},"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 C(){S.current()}if(P!==null){var T=setInterval(C,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"),C=z.n(S),T=z("Ot1p");We.a=function(l){var p=l.id,h=l.activeDiscussIndex,d=l.onReplyDiscuss,o=Object(w.useState)(""),c=Object(U.a)(o,2),s=c[0],f=c[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 C(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 o=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:o,file_name:o,virtual_classroom_id:S}}).then(function(i){if(i.status==-1){p.onUploadError&&p.onUploadError(d);return}var n=i.data,t=n.UploadAuth,u=n.UploadAddress,y=n.VideoId;P.setUploadAuthAndAddress(d,t,u)}).catch(function(i){P.deleteFile(P._curIndex),P.nextUpload(),console.log(i)})}else{var c="/api/users/".concat(w,"/video_auths.json"),s="";Object(ae.a)(c,{method:"Post",body:{title:s+o,file_name:s+o,virtual_classroom_id:S}}).then(function(i){if(i){var n=i.data,t=n.UploadAuth,u=n.UploadAddress,y=n.VideoId;P.setUploadAuthAndAddress(d,t,u,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,o,c){p.onUploadFailed&&p.onUploadFailed(d),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(d,o,c){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(d,o,c){p.onUploadProgress&&p.onUploadProgress(d,o,c);var s=Math.ceil(c*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(d){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var o="/api/users/".concat(w,"/video_auths.json");Object(ae.a)(o,{method:"put",body:{video_id:d.videoId}}).then(function(c){var s=c.data,f=s.UploadAuth;P.resumeUploadWithAuth(f)}).catch(function(c){console.log(c)})},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),C(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(C){if(C.attachTo)return C.attachTo;var T=document.querySelector("head");return T||document.body}function w(C){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=C;var d=U(l),o=d.firstChild;return l.prepend&&d.prepend?d.prepend(p):l.prepend&&o?d.insertBefore(p,o):d.appendChild(p),p}var P=new Map;function S(C,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 o=Array.from(P.get(p).children).find(function(n){return n.tagName==="STYLE"&&n[Z]===T});if(o){var c,s;if(((c=l.csp)===null||c===void 0?void 0:c.nonce)&&o.nonce!==((s=l.csp)===null||s===void 0?void 0:s.nonce)){var f;o.nonce=(f=l.csp)===null||f===void 0?void 0:f.nonce}return o.innerHTML!==C&&(o.innerHTML=C),o}var i=w(C,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(o){return S(o)}),(typeof p!="object"||p.whenOpening!==!1)&&(d["'>'"]=function(o){return w(o)}),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"),o=0;o<p.length;o++){if(!p[o].empty())return ae.Pass;var c=p[o].head,s=l.getTokenAt(c),f=ae.innerMode(l.getMode(),s.state),i=f.state,n=f.mode.xmlCurrentTag&&f.mode.xmlCurrentTag(i),t=n&&n.name;if(!t)return ae.Pass;var u=f.mode.configuration=="html",y=typeof d=="object"&&d.dontCloseTags||u&&Z,g=typeof d=="object"&&d.indentTags||u&&U;s.end>c.ch&&(t=t.slice(0,t.length-s.end+c.ch));var _=t.toLowerCase();if(!t||s.type=="string"&&(s.end!=c.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&n.close||s.string.indexOf("/")==c.ch-s.start-1||y&&C(y,_)>-1||T(l,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(i)||[],t,c,!0))return ae.Pass;var b=typeof d=="object"&&d.emptyTags;if(b&&C(b,t)>-1){h[o]={text:"/>",newPos:ae.Pos(c.line,c.ch+2)};continue}var v=g&&C(g,_)>-1;h[o]={indent:v,text:">"+(v?`
`:"")+"</"+t+">",newPos:v?ae.Pos(c.line+1,0):ae.Pos(c.line,c.ch+1)}}for(var m=typeof d=="object"&&d.dontIndentOnAutoClose,o=p.length-1;o>=0;o--){var E=h[o];l.replaceRange(E.text,p[o].head,p[o].anchor,"+insert");var a=l.listSelections().slice(0);a[o]={head:E.newPos,anchor:E.newPos},l.setSelections(a),!m&&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=[],o=p?"/":"</",c=l.getOption("autoCloseTags"),s=typeof c=="object"&&c.dontIndentOnSlash,f=0;f<h.length;f++){if(!h[f].empty())return ae.Pass;var i=h[f].head,n=l.getTokenAt(i),t=ae.innerMode(l.getMode(),n.state),u=t.state;if(p&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=i.ch-1))return ae.Pass;var y,g=t.mode.name!="xml"&&l.getMode().name=="htmlmixed";if(g&&t.mode.name=="javascript")y=o+"script";else if(g&&t.mode.name=="css")y=o+"style";else{var _=t.mode.xmlCurrentContext&&t.mode.xmlCurrentContext(u);if(!_||_.length&&T(l,_,_[_.length-1],i))return ae.Pass;y=o+_[_.length-1]}l.getLine(i.line).charAt(n.end)!=">"&&(y+=">"),d[f]=y}if(l.replaceSelections(d),h=l.listSelections(),!s)for(var f=0;f<h.length;f++)(f==h.length-1||h[f].head.line<h[f+1].head.line)&&l.indentLine(h[f].head.line)}function S(l){return l.getOption("disableInput")?ae.Pass:P(l,!0)}ae.commands.closeTag=function(l){return P(l)};function C(l,p){if(l.indexOf)return l.indexOf(p);for(var h=0,d=l.length;h<d;++h)if(l[h]==p)return h;return-1}function T(l,p,h,d,o){if(!ae.scanForClosingTag)return!1;var c=Math.min(l.lastLine()+1,d.line+500),s=ae.scanForClosingTag(l,d,null,c);if(!s||s.tag!=h)return!1;for(var f=o?1:0,i=p.length-1;i>=0&&p[i]==h;i--)++f;d=s.to;for(var i=1;i<f;i++){var n=ae.scanForClosingTag(l,d,null,c);if(!n||n.tag!=h)return!1;d=n.to}return!0}})},BdwD:function($e,We,z){"use strict";var ae=z("k1fw"),Z=z("q1tI"),U=z.n(Z),w=z("MXfU"),P=z.n(w),S=z("Nmsl"),C=z.n(S),T=function(p){var h=p.buttonProps,d=h===void 0?{}:h,o=p.styles,c=o===void 0?{}:o,s=p.customText,f=p.ButtonText,i=p.ButtonClick,n=p.Buttonclass,t=p.ButtonTwo,u=p.imgUrl;return U.a.createElement("div",{className:C.a.none_panels,style:Object(ae.a)({},c)},U.a.createElement("div",null,U.a.createElement("img",{src:u||P.a,alt:""}),U.a.createElement("p",{className:C.a.none_p_title},s||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!")))};We.a=T},BjJ7:function($e,We,z){"use strict";z.d(We,"d",function(){return Z}),z.d(We,"c",function(){return U}),z.d(We,"e",function(){return w}),z.d(We,"b",function(){return P}),z.d(We,"a",function(){return C});var ae=z("m3rI");function Z(T){var l=!0;if(T.length>0){for(var p=0;p<T.length;p++)if(T[p].compile_success==0||!T[p].compile_success){l=!1;break}}else l=!1;return l}function U(T){for(var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",p=[],h=0;h<T.length;h++){var d=T[h],o=l?"".concat(l,"/").concat(d.name):"".concat(d.name);p.push({title:d.name,isLeaf:!(d.type==="tree"),key:o})}return p}function w(T,l,p){for(var h=0;h<T.length;h++){var d=T[h];if(d.key===l){d.children=p;break}d.children&&w(d.children,l,p)}return T}function P(T,l,p){var h;return function(){var d=this,o=arguments,c=function(){h=null,p||T.apply(d,o)},s=p&&!h;clearTimeout(h),h=setTimeout(c,l),s&&T.apply(d,o)}}var S=!0,C=ae.a.API_SERVER},"C+DQ":function($e,We,z){},CNDd:function($e,We,z){$e.exports=z.p+"static/c1.7850f139.svg"},CaVn:function($e,We,z){$e.exports={flex_box_center:"flex_box_center___2wZ0h",flex_space_between:"flex_space_between___3MVWH",flex_box_vertical_center:"flex_box_vertical_center___O0jNB",flex_box_center_end:"flex_box_center_end___2q4xj",flex_box_column:"flex_box_column___13R-8",listDetails:"listDetails___3lMam",head:"head___2jzWe",name:"name___3xIfG",title:"title___3-ce8",a:"a___1ZME1",b:"b___oiiqU",tag:"tag___32Ulf",btn:"btn___lJ5fA",scroll:"scroll___anvih",video:"video___1gujl",html:"html___z0BU7",g:"g___3sfQf",btns:"btns___OWbut"}},CrYA:function($e,We,z){var ae=z("MFOe"),Z=ae.Global;$e.exports={name:"sessionStorage",read:w,write:P,each:S,remove:C,clearAll:T};function U(){return Z.sessionStorage}function w(l){return U().getItem(l)}function P(l,p){return U().setItem(l,p)}function S(l){for(var p=U().length-1;p>=0;p--){var h=U().key(p);l(w(h),h)}}function C(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(Ne,De){for(var _e=0;_e<De.length;_e++){var he=De[_e];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(Ne,he.key,he)}}function Z(Ne,De,_e){return De&&ae(Ne.prototype,De),_e&&ae(Ne,_e),Ne}function U(Ne,De){if(!Ne)return;if(typeof Ne=="string")return w(Ne,De);var _e=Object.prototype.toString.call(Ne).slice(8,-1);if(_e==="Object"&&Ne.constructor&&(_e=Ne.constructor.name),_e==="Map"||_e==="Set")return Array.from(Ne);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return w(Ne,De)}function w(Ne,De){(De==null||De>Ne.length)&&(De=Ne.length);for(var _e=0,he=new Array(De);_e<De;_e++)he[_e]=Ne[_e];return he}function P(Ne,De){var _e;if(typeof Symbol=="undefined"||Ne[Symbol.iterator]==null){if(Array.isArray(Ne)||(_e=U(Ne))||De&&Ne&&typeof Ne.length=="number"){_e&&(Ne=_e);var he=0;return function(){return he>=Ne.length?{done:!0}:{done:!1,value:Ne[he++]}}}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 _e=Ne[Symbol.iterator](),_e.next.bind(_e)}function S(Ne,De){return De={exports:{}},Ne(De,De.exports),De.exports}var C=S(function(Ne){function De(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function _e(he){Ne.exports.defaults=he}Ne.exports={defaults:De(),getDefaults:De,changeDefaults:_e}}),T=C.defaults,l=C.getDefaults,p=C.changeDefaults,h=/[&<>"']/,d=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},f=function(De){return s[De]};function i(Ne,De){if(De){if(h.test(Ne))return Ne.replace(d,f)}else if(o.test(Ne))return Ne.replace(c,f);return Ne}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function t(Ne){return Ne.replace(n,function(De,_e){return _e=_e.toLowerCase(),_e==="colon"?":":_e.charAt(0)==="#"?_e.charAt(1)==="x"?String.fromCharCode(parseInt(_e.substring(2),16)):String.fromCharCode(+_e.substring(1)):""})}var u=/(^|[^\[])\^/g;function y(Ne,De){Ne=Ne.source||Ne,De=De||"";var _e={replace:function(ve,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(u,"$1"),Ne=Ne.replace(ve,Ee),_e},getRegex:function(){return new RegExp(Ne,De)}};return _e}var g=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(Ne,De,_e){if(Ne){var he;try{he=decodeURIComponent(t(_e)).replace(g,"").toLowerCase()}catch(ve){return null}if(he.indexOf("javascript:")===0||he.indexOf("vbscript:")===0||he.indexOf("data:")===0)return null}De&&!_.test(_e)&&(_e=x(De,_e));try{_e=encodeURI(_e).replace(/%25/g,"%")}catch(ve){return null}return _e}var v={},m=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,a=/^([^:]+:\/*[^/]*)[\s\S]*$/;function x(Ne,De){v[" "+Ne]||(m.test(Ne)?v[" "+Ne]=Ne+"/":v[" "+Ne]=I(Ne,"/",!0)),Ne=v[" "+Ne];var _e=Ne.indexOf(":")===-1;return De.substring(0,2)==="//"?_e?De:Ne.replace(E,"$1")+De:De.charAt(0)==="/"?_e?De:Ne.replace(a,"$1")+De:Ne+De}var O={exec:function(){}};function A(Ne){for(var De=1,_e,he;De<arguments.length;De++){_e=arguments[De];for(he in _e)Object.prototype.hasOwnProperty.call(_e,he)&&(Ne[he]=_e[he])}return Ne}function D(Ne,De){var _e=Ne.replace(/\|/g,function(Ee,be,Ge){for(var qe=!1,pt=be;--pt>=0&&Ge[pt]==="\\";)qe=!qe;return qe?"|":" |"}),he=_e.split(/ \|/),ve=0;if(he.length>De)he.splice(De);else for(;he.length<De;)he.push("");for(;ve<he.length;ve++)he[ve]=he[ve].trim().replace(/\\\|/g,"|");return he}function I(Ne,De,_e){var he=Ne.length;if(he===0)return"";for(var ve=0;ve<he;){var Ee=Ne.charAt(he-ve-1);if(Ee===De&&!_e)ve++;else if(Ee!==De&&_e)ve++;else break}return Ne.substr(0,he-ve)}function F(Ne,De){if(Ne.indexOf(De[1])===-1)return-1;for(var _e=Ne.length,he=0,ve=0;ve<_e;ve++)if(Ne[ve]==="\\")ve++;else if(Ne[ve]===De[0])he++;else if(Ne[ve]===De[1]&&(he--,he<0))return ve;return-1}function K(Ne){Ne&&Ne.sanitize&&!Ne.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var ne={escape:i,unescape:t,edit:y,cleanUrl:b,resolveUrl:x,noopTest:O,merge:A,splitCells:D,rtrim:I,findClosingBracket:F,checkSanitizeDeprecation:K},j=C.defaults,G=ne.rtrim,X=ne.splitCells,J=ne.escape,B=ne.findClosingBracket;function Q(Ne,De,_e){var he=De.href,ve=De.title?J(De.title):null,Ee=Ne[1].replace(/\\([\[\]])/g,"$1");return Ne[0].charAt(0)!=="!"?{type:"link",raw:_e,href:he,title:ve,text:Ee}:{type:"image",raw:_e,href:he,title:ve,text:J(Ee)}}function ie(Ne,De){var _e=Ne.match(/^(\s+)(?:```)/);if(_e===null)return De;var he=_e[1];return De.split(`
`).map(function(ve){var Ee=ve.match(/^\s+/);if(Ee===null)return ve;var be=Ee[0];return be.length>=he.length?ve.slice(he.length):ve}).join(`
`)}var oe=function(){function Ne(_e){this.options=_e||j}var De=Ne.prototype;return De.space=function(he){var ve=this.rules.block.newline.exec(he);if(ve)return ve[0].length>1?{type:"space",raw:ve[0]}:{raw:`
`}},De.code=function(he,ve){var Ee=this.rules.block.code.exec(he);if(Ee){var be=ve[ve.length-1];if(be&&be.type==="paragraph")return{raw:Ee[0],text:Ee[0].trimRight()};var Ge=Ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?Ge:G(Ge,`
`)}}},De.fences=function(he){var ve=this.rules.block.fences.exec(he);if(ve){var Ee=ve[0],be=ie(Ee,ve[3]||"");return{type:"code",raw:Ee,lang:ve[2]?ve[2].trim():ve[2],text:be}}},De.heading=function(he){var ve=this.rules.block.heading.exec(he);if(ve)return{type:"heading",raw:ve[0],depth:ve[1].length,text:ve[2]}},De.nptable=function(he){var ve=this.rules.block.nptable.exec(he);if(ve){var Ee={type:"table",header:X(ve[1].replace(/^ *| *\| *$/g,"")),align:ve[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ve[3]?ve[3].replace(/\n$/,"").split(`
`):[],raw:ve[0]};if(Ee.header.length===Ee.align.length){var be=Ee.align.length,Ge;for(Ge=0;Ge<be;Ge++)/^ *-+: *$/.test(Ee.align[Ge])?Ee.align[Ge]="right":/^ *:-+: *$/.test(Ee.align[Ge])?Ee.align[Ge]="center":/^ *:-+ *$/.test(Ee.align[Ge])?Ee.align[Ge]="left":Ee.align[Ge]=null;for(be=Ee.cells.length,Ge=0;Ge<be;Ge++)Ee.cells[Ge]=X(Ee.cells[Ge],Ee.header.length);return Ee}}},De.hr=function(he){var ve=this.rules.block.hr.exec(he);if(ve)return{type:"hr",raw:ve[0]}},De.blockquote=function(he){var ve=this.rules.block.blockquote.exec(he);if(ve){var Ee=ve[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ve[0],text:Ee}}},De.list=function(he){var ve=this.rules.block.list.exec(he);if(ve){for(var Ee=ve[0],be=ve[2],Ge=be.length>1,qe=be[be.length-1]===")",pt={type:"list",raw:Ee,ordered:Ge,start:Ge?+be.slice(0,-1):"",loose:!1,items:[]},Pt=ve[0].match(this.rules.block.item),Rt=!1,Mt,wt,lt,ft,Qe,Te,je,ct=Pt.length,Ze=0;Ze<ct;Ze++)Mt=Pt[Ze],Ee=Mt,wt=Mt.length,Mt=Mt.replace(/^ *([*+-]|\d+[.)]) */,""),~Mt.indexOf(`
`)&&(wt-=Mt.length,Mt=this.options.pedantic?Mt.replace(/^ {1,4}/gm,""):Mt.replace(new RegExp("^ {1,"+wt+"}","gm"),"")),Ze!==ct-1&&(lt=this.rules.block.bullet.exec(Pt[Ze+1])[0],(Ge?lt.length===1||!qe&&lt[lt.length-1]===")":lt.length>1||this.options.smartLists&&lt!==be)&&(ft=Pt.slice(Ze+1).join(`
`),pt.raw=pt.raw.substring(0,pt.raw.length-ft.length),Ze=ct-1)),Qe=Rt||/\n\n(?!\s*$)/.test(Mt),Ze!==ct-1&&(Rt=Mt.charAt(Mt.length-1)===`
`,Qe||(Qe=Rt)),Qe&&(pt.loose=!0),Te=/^\[[ xX]\] /.test(Mt),je=void 0,Te&&(je=Mt[1]!==" ",Mt=Mt.replace(/^\[[ xX]\] +/,"")),pt.items.push({type:"list_item",raw:Ee,task:Te,checked:je,loose:Qe,text:Mt});return pt}},De.html=function(he){var ve=this.rules.block.html.exec(he);if(ve)return{type:this.options.sanitize?"paragraph":"html",raw:ve[0],pre:!this.options.sanitizer&&(ve[1]==="pre"||ve[1]==="script"||ve[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ve[0]):J(ve[0]):ve[0]}},De.def=function(he){var ve=this.rules.block.def.exec(he);if(ve){ve[3]&&(ve[3]=ve[3].substring(1,ve[3].length-1));var Ee=ve[1].toLowerCase().replace(/\s+/g," ");return{tag:Ee,raw:ve[0],href:ve[2],title:ve[3]}}},De.table=function(he){var ve=this.rules.block.table.exec(he);if(ve){var Ee={type:"table",header:X(ve[1].replace(/^ *| *\| *$/g,"")),align:ve[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ve[3]?ve[3].replace(/\n$/,"").split(`
`):[]};if(Ee.header.length===Ee.align.length){Ee.raw=ve[0];var be=Ee.align.length,Ge;for(Ge=0;Ge<be;Ge++)/^ *-+: *$/.test(Ee.align[Ge])?Ee.align[Ge]="right":/^ *:-+: *$/.test(Ee.align[Ge])?Ee.align[Ge]="center":/^ *:-+ *$/.test(Ee.align[Ge])?Ee.align[Ge]="left":Ee.align[Ge]=null;for(be=Ee.cells.length,Ge=0;Ge<be;Ge++)Ee.cells[Ge]=X(Ee.cells[Ge].replace(/^ *\| *| *\| *$/g,""),Ee.header.length);return Ee}}},De.lheading=function(he){var ve=this.rules.block.lheading.exec(he);if(ve)return{type:"heading",raw:ve[0],depth:ve[2].charAt(0)==="="?1:2,text:ve[1]}},De.paragraph=function(he){var ve=this.rules.block.paragraph.exec(he);if(ve)return{type:"paragraph",raw:ve[0],text:ve[1].charAt(ve[1].length-1)===`
`?ve[1].slice(0,-1):ve[1]}},De.text=function(he,ve){var Ee=this.rules.block.text.exec(he);if(Ee){var be=ve[ve.length-1];return be&&be.type==="text"?{raw:Ee[0],text:Ee[0]}:{type:"text",raw:Ee[0],text:Ee[0]}}},De.escape=function(he){var ve=this.rules.inline.escape.exec(he);if(ve)return{type:"escape",raw:ve[0],text:J(ve[1])}},De.tag=function(he,ve,Ee){var be=this.rules.inline.tag.exec(he);if(be)return!ve&&/^<a /i.test(be[0])?ve=!0:ve&&/^<\/a>/i.test(be[0])&&(ve=!1),!Ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(be[0])?Ee=!0:Ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(be[0])&&(Ee=!1),{type:this.options.sanitize?"text":"html",raw:be[0],inLink:ve,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):J(be[0]):be[0]}},De.link=function(he){var ve=this.rules.inline.link.exec(he);if(ve){var Ee=B(ve[2],"()");if(Ee>-1){var be=ve[0].indexOf("!")===0?5:4,Ge=be+ve[1].length+Ee;ve[2]=ve[2].substring(0,Ee),ve[0]=ve[0].substring(0,Ge).trim(),ve[3]=""}var qe=ve[2],pt="";if(this.options.pedantic){var Pt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(qe);Pt?(qe=Pt[1],pt=Pt[3]):pt=""}else pt=ve[3]?ve[3].slice(1,-1):"";qe=qe.trim().replace(/^<([\s\S]*)>$/,"$1");var Rt=Q(ve,{href:qe&&qe.replace(this.rules.inline._escapes,"$1"),title:pt&&pt.replace(this.rules.inline._escapes,"$1")},ve[0]);return Rt}},De.reflink=function(he,ve){var Ee;if((Ee=this.rules.inline.reflink.exec(he))||(Ee=this.rules.inline.nolink.exec(he))){var be=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(be=ve[be.toLowerCase()],!be||!be.href){var Ge=Ee[0].charAt(0);return{type:"text",raw:Ge,text:Ge}}var qe=Q(Ee,be,Ee[0]);return qe}},De.strong=function(he,ve,Ee){Ee===void 0&&(Ee="");var be=this.rules.inline.strong.start.exec(he);if(be&&(!be[1]||be[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ve=ve.slice(-1*he.length);var Ge=be[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ge.lastIndex=0;for(var qe;(be=Ge.exec(ve))!=null;)if(qe=this.rules.inline.strong.middle.exec(ve.slice(0,be.index+3)),qe)return{type:"strong",raw:he.slice(0,qe[0].length),text:he.slice(2,qe[0].length-2)}}},De.em=function(he,ve,Ee){Ee===void 0&&(Ee="");var be=this.rules.inline.em.start.exec(he);if(be&&(!be[1]||be[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ve=ve.slice(-1*he.length);var Ge=be[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ge.lastIndex=0;for(var qe;(be=Ge.exec(ve))!=null;)if(qe=this.rules.inline.em.middle.exec(ve.slice(0,be.index+2)),qe)return{type:"em",raw:he.slice(0,qe[0].length),text:he.slice(1,qe[0].length-1)}}},De.codespan=function(he){var ve=this.rules.inline.code.exec(he);if(ve){var Ee=ve[2].replace(/\n/g," "),be=/[^ ]/.test(Ee),Ge=Ee.startsWith(" ")&&Ee.endsWith(" ");return be&&Ge&&(Ee=Ee.substring(1,Ee.length-1)),Ee=J(Ee,!0),{type:"codespan",raw:ve[0],text:Ee}}},De.br=function(he){var ve=this.rules.inline.br.exec(he);if(ve)return{type:"br",raw:ve[0]}},De.del=function(he){var ve=this.rules.inline.del.exec(he);if(ve)return{type:"del",raw:ve[0],text:ve[1]}},De.autolink=function(he,ve){var Ee=this.rules.inline.autolink.exec(he);if(Ee){var be,Ge;return Ee[2]==="@"?(be=J(this.options.mangle?ve(Ee[1]):Ee[1]),Ge="mailto:"+be):(be=J(Ee[1]),Ge=be),{type:"link",raw:Ee[0],text:be,href:Ge,tokens:[{type:"text",raw:be,text:be}]}}},De.url=function(he,ve){var Ee;if(Ee=this.rules.inline.url.exec(he)){var be,Ge;if(Ee[2]==="@")be=J(this.options.mangle?ve(Ee[0]):Ee[0]),Ge="mailto:"+be;else{var qe;do qe=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while(qe!==Ee[0]);be=J(Ee[0]),Ee[1]==="www."?Ge="http://"+be:Ge=be}return{type:"link",raw:Ee[0],text:be,href:Ge,tokens:[{type:"text",raw:be,text:be}]}}},De.inlineText=function(he,ve,Ee){var be=this.rules.inline.text.exec(he);if(be){var Ge;return ve?Ge=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):J(be[0]):be[0]:Ge=J(this.options.smartypants?Ee(be[0]):be[0]),{type:"text",raw:be[0],text:Ge}}},Ne}(),xe=ne.noopTest,ye=ne.edit,Ae=ne.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*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\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:xe,table:xe,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=/<!--(?!-?>)[\s\S]*?-->/,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=Ae({},pe),pe.gfm=Ae({},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=Ae({},pe.normal,{html:ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\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:xe,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 Oe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:xe,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\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:xe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Oe._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Oe.punctuation=ye(Oe.punctuation).replace(/punctuation/g,Oe._punctuation).getRegex(),Oe._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Oe._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Oe.em.start=ye(Oe.em.start).replace(/punctuation/g,Oe._punctuation).getRegex(),Oe.em.middle=ye(Oe.em.middle).replace(/punctuation/g,Oe._punctuation).replace(/overlapSkip/g,Oe._overlapSkip).getRegex(),Oe.em.endAst=ye(Oe.em.endAst,"g").replace(/punctuation/g,Oe._punctuation).getRegex(),Oe.em.endUnd=ye(Oe.em.endUnd,"g").replace(/punctuation/g,Oe._punctuation).getRegex(),Oe.strong.start=ye(Oe.strong.start).replace(/punctuation/g,Oe._punctuation).getRegex(),Oe.strong.middle=ye(Oe.strong.middle).replace(/punctuation/g,Oe._punctuation).replace(/blockSkip/g,Oe._blockSkip).getRegex(),Oe.strong.endAst=ye(Oe.strong.endAst,"g").replace(/punctuation/g,Oe._punctuation).getRegex(),Oe.strong.endUnd=ye(Oe.strong.endUnd,"g").replace(/punctuation/g,Oe._punctuation).getRegex(),Oe.blockSkip=ye(Oe._blockSkip,"g").getRegex(),Oe.overlapSkip=ye(Oe._overlapSkip,"g").getRegex(),Oe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Oe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Oe._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])?)+(?![-_])/,Oe.autolink=ye(Oe.autolink).replace("scheme",Oe._scheme).replace("email",Oe._email).getRegex(),Oe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Oe.tag=ye(Oe.tag).replace("comment",pe._comment).replace("attribute",Oe._attribute).getRegex(),Oe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Oe._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Oe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Oe.link=ye(Oe.link).replace("label",Oe._label).replace("href",Oe._href).replace("title",Oe._title).getRegex(),Oe.reflink=ye(Oe.reflink).replace("label",Oe._label).getRegex(),Oe.reflinkSearch=ye(Oe.reflinkSearch,"g").replace("reflink",Oe.reflink).replace("nolink",Oe.nolink).getRegex(),Oe.normal=Ae({},Oe),Oe.pedantic=Ae({},Oe.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",Oe._label).getRegex(),reflink:ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Oe._label).getRegex()}),Oe.gfm=Ae({},Oe.normal,{escape:ye(Oe.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]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),Oe.gfm.url=ye(Oe.gfm.url,"i").replace("email",Oe.gfm._extended_email).getRegex(),Oe.breaks=Ae({},Oe.gfm,{br:ye(Oe.br).replace("{2,}","*").getRegex(),text:ye(Oe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Fe={block:pe,inline:Oe},Me=C.defaults,Ce=Fe.block,Le=Fe.inline;function de(Ne){return Ne.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function ue(Ne){var De="",_e,he,ve=Ne.length;for(_e=0;_e<ve;_e++)he=Ne.charCodeAt(_e),Math.random()>.5&&(he="x"+he.toString(16)),De+="&#"+he+";";return De}var ke=function(){function Ne(_e){this.tokens=[],this.tokens.links=Object.create(null),this.options=_e||Me,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var he={block:Ce.normal,inline:Le.normal};this.options.pedantic?(he.block=Ce.pedantic,he.inline=Le.pedantic):this.options.gfm&&(he.block=Ce.gfm,this.options.breaks?he.inline=Le.breaks:he.inline=Le.gfm),this.tokenizer.rules=he}Ne.lex=function(he,ve){var Ee=new Ne(ve);return Ee.lex(he)};var De=Ne.prototype;return De.lex=function(he){return he=he.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(he,this.tokens,!0),this.inline(this.tokens),this.tokens},De.blockTokens=function(he,ve,Ee){ve===void 0&&(ve=[]),Ee===void 0&&(Ee=!0),he=he.replace(/^ +$/gm,"");for(var be,Ge,qe,pt;he;){if(be=this.tokenizer.space(he)){he=he.substring(be.raw.length),be.type&&ve.push(be);continue}if(be=this.tokenizer.code(he,ve)){he=he.substring(be.raw.length),be.type?ve.push(be):(pt=ve[ve.length-1],pt.raw+=`
`+be.raw,pt.text+=`
`+be.text);continue}if(be=this.tokenizer.fences(he)){he=he.substring(be.raw.length),ve.push(be);continue}if(be=this.tokenizer.heading(he)){he=he.substring(be.raw.length),ve.push(be);continue}if(be=this.tokenizer.nptable(he)){he=he.substring(be.raw.length),ve.push(be);continue}if(be=this.tokenizer.hr(he)){he=he.substring(be.raw.length),ve.push(be);continue}if(be=this.tokenizer.blockquote(he)){he=he.substring(be.raw.length),be.tokens=this.blockTokens(be.text,[],Ee),ve.push(be);continue}if(be=this.tokenizer.list(he)){for(he=he.substring(be.raw.length),qe=be.items.length,Ge=0;Ge<qe;Ge++)be.items[Ge].tokens=this.blockTokens(be.items[Ge].text,[],!1);ve.push(be);continue}if(be=this.tokenizer.html(he)){he=he.substring(be.raw.length),ve.push(be);continue}if(Ee&&(be=this.tokenizer.def(he))){he=he.substring(be.raw.length),this.tokens.links[be.tag]||(this.tokens.links[be.tag]={href:be.href,title:be.title});continue}if(be=this.tokenizer.table(he)){he=he.substring(be.raw.length),ve.push(be);continue}if(be=this.tokenizer.lheading(he)){he=he.substring(be.raw.length),ve.push(be);continue}if(Ee&&(be=this.tokenizer.paragraph(he))){he=he.substring(be.raw.length),ve.push(be);continue}if(be=this.tokenizer.text(he,ve)){he=he.substring(be.raw.length),be.type?ve.push(be):(pt=ve[ve.length-1],pt.raw+=`
`+be.raw,pt.text+=`
`+be.text);continue}if(he){var Pt="Infinite loop on byte: "+he.charCodeAt(0);if(this.options.silent){console.error(Pt);break}else throw new Error(Pt)}}return ve},De.inline=function(he){var ve,Ee,be,Ge,qe,pt,Pt=he.length;for(ve=0;ve<Pt;ve++){pt=he[ve];switch(pt.type){case"paragraph":case"text":case"heading":{pt.tokens=[],this.inlineTokens(pt.text,pt.tokens);break}case"table":{for(pt.tokens={header:[],cells:[]},Ge=pt.header.length,Ee=0;Ee<Ge;Ee++)pt.tokens.header[Ee]=[],this.inlineTokens(pt.header[Ee],pt.tokens.header[Ee]);for(Ge=pt.cells.length,Ee=0;Ee<Ge;Ee++)for(qe=pt.cells[Ee],pt.tokens.cells[Ee]=[],be=0;be<qe.length;be++)pt.tokens.cells[Ee][be]=[],this.inlineTokens(qe[be],pt.tokens.cells[Ee][be]);break}case"blockquote":{this.inline(pt.tokens);break}case"list":{for(Ge=pt.items.length,Ee=0;Ee<Ge;Ee++)this.inline(pt.items[Ee].tokens);break}}}return he},De.inlineTokens=function(he,ve,Ee,be,Ge){ve===void 0&&(ve=[]),Ee===void 0&&(Ee=!1),be===void 0&&(be=!1),Ge===void 0&&(Ge="");var qe,pt=he,Pt;if(this.tokens.links){var Rt=Object.keys(this.tokens.links);if(Rt.length>0)for(;(Pt=this.tokenizer.rules.inline.reflinkSearch.exec(pt))!=null;)Rt.includes(Pt[0].slice(Pt[0].lastIndexOf("[")+1,-1))&&(pt=pt.slice(0,Pt.index)+"["+"a".repeat(Pt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Pt=this.tokenizer.rules.inline.blockSkip.exec(pt))!=null;)pt=pt.slice(0,Pt.index)+"["+"a".repeat(Pt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;he;){if(qe=this.tokenizer.escape(he)){he=he.substring(qe.raw.length),ve.push(qe);continue}if(qe=this.tokenizer.tag(he,Ee,be)){he=he.substring(qe.raw.length),Ee=qe.inLink,be=qe.inRawBlock,ve.push(qe);continue}if(qe=this.tokenizer.link(he)){he=he.substring(qe.raw.length),qe.type==="link"&&(qe.tokens=this.inlineTokens(qe.text,[],!0,be)),ve.push(qe);continue}if(qe=this.tokenizer.reflink(he,this.tokens.links)){he=he.substring(qe.raw.length),qe.type==="link"&&(qe.tokens=this.inlineTokens(qe.text,[],!0,be)),ve.push(qe);continue}if(qe=this.tokenizer.strong(he,pt,Ge)){he=he.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],Ee,be),ve.push(qe);continue}if(qe=this.tokenizer.em(he,pt,Ge)){he=he.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],Ee,be),ve.push(qe);continue}if(qe=this.tokenizer.codespan(he)){he=he.substring(qe.raw.length),ve.push(qe);continue}if(qe=this.tokenizer.br(he)){he=he.substring(qe.raw.length),ve.push(qe);continue}if(qe=this.tokenizer.del(he)){he=he.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],Ee,be),ve.push(qe);continue}if(qe=this.tokenizer.autolink(he,ue)){he=he.substring(qe.raw.length),ve.push(qe);continue}if(!Ee&&(qe=this.tokenizer.url(he,ue))){he=he.substring(qe.raw.length),ve.push(qe);continue}if(qe=this.tokenizer.inlineText(he,be,de)){he=he.substring(qe.raw.length),Ge=qe.raw.slice(-1),ve.push(qe);continue}if(he){var Mt="Infinite loop on byte: "+he.charCodeAt(0);if(this.options.silent){console.error(Mt);break}else throw new Error(Mt)}}return ve},Z(Ne,null,[{key:"rules",get:function(){return{block:Ce,inline:Le}}}]),Ne}(),Ue=C.defaults,Ye=ne.cleanUrl,ee=ne.escape,M=function(){function Ne(_e){this.options=_e||Ue}var De=Ne.prototype;return De.code=function(he,ve,Ee){var be=(ve||"").match(/\S*/)[0];if(this.options.highlight){var Ge=this.options.highlight(he,be);Ge!=null&&Ge!==he&&(Ee=!0,he=Ge)}return be?'<pre><code class="'+this.options.langPrefix+ee(be,!0)+'">'+(Ee?he:ee(he,!0))+`</code></pre>
`:"<pre><code>"+(Ee?he:ee(he,!0))+`</code></pre>
`},De.blockquote=function(he){return`<blockquote>
`+he+`</blockquote>
`},De.html=function(he){return he},De.heading=function(he,ve,Ee,be){return this.options.headerIds?"<h"+ve+' id="'+this.options.headerPrefix+be.slug(Ee)+'">'+he+"</h"+ve+`>
`:"<h"+ve+">"+he+"</h"+ve+`>
`},De.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},De.list=function(he,ve,Ee){var be=ve?"ol":"ul",Ge=ve&&Ee!==1?' start="'+Ee+'"':"";return"<"+be+Ge+`>
`+he+"</"+be+`>
`},De.listitem=function(he){return"<li>"+he+`</li>
`},De.checkbox=function(he){return"<input "+(he?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},De.paragraph=function(he){return"<p>"+he+`</p>
`},De.table=function(he,ve){return ve&&(ve="<tbody>"+ve+"</tbody>"),`<table>
<thead>
`+he+`</thead>
`+ve+`</table>
`},De.tablerow=function(he){return`<tr>
`+he+`</tr>
`},De.tablecell=function(he,ve){var Ee=ve.header?"th":"td",be=ve.align?"<"+Ee+' align="'+ve.align+'">':"<"+Ee+">";return be+he+"</"+Ee+`>
`},De.strong=function(he){return"<strong>"+he+"</strong>"},De.em=function(he){return"<em>"+he+"</em>"},De.codespan=function(he){return"<code>"+he+"</code>"},De.br=function(){return this.options.xhtml?"<br/>":"<br>"},De.del=function(he){return"<del>"+he+"</del>"},De.link=function(he,ve,Ee){if(he=Ye(this.options.sanitize,this.options.baseUrl,he),he===null)return Ee;var be='<a href="'+ee(he)+'"';return ve&&(be+=' title="'+ve+'"'),be+=">"+Ee+"</a>",be},De.image=function(he,ve,Ee){if(he=Ye(this.options.sanitize,this.options.baseUrl,he),he===null)return Ee;var be='<img src="'+he+'" alt="'+Ee+'"';return ve&&(be+=' title="'+ve+'"'),be+=this.options.xhtml?"/>":">",be},De.text=function(he){return he},Ne}(),N=function(){function Ne(){}var De=Ne.prototype;return De.strong=function(he){return he},De.em=function(he){return he},De.codespan=function(he){return he},De.del=function(he){return he},De.html=function(he){return he},De.text=function(he){return he},De.link=function(he,ve,Ee){return""+Ee},De.image=function(he,ve,Ee){return""+Ee},De.br=function(){return""},Ne}(),$=function(){function Ne(){this.seen={}}var De=Ne.prototype;return De.slug=function(he){var ve=he.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ve)){var Ee=ve;do this.seen[Ee]++,ve=Ee+"-"+this.seen[Ee];while(this.seen.hasOwnProperty(ve))}return this.seen[ve]=0,ve},Ne}(),V=C.defaults,Y=ne.unescape,me=function(){function Ne(_e){this.options=_e||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 $}Ne.parse=function(he,ve){var Ee=new Ne(ve);return Ee.parse(he)};var De=Ne.prototype;return De.parse=function(he,ve){ve===void 0&&(ve=!0);var Ee="",be,Ge,qe,pt,Pt,Rt,Mt,wt,lt,ft,Qe,Te,je,ct,Ze,Tt,Ot,st,gt=he.length;for(be=0;be<gt;be++){ft=he[be];switch(ft.type){case"space":continue;case"hr":{Ee+=this.renderer.hr();continue}case"heading":{Ee+=this.renderer.heading(this.parseInline(ft.tokens),ft.depth,Y(this.parseInline(ft.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ee+=this.renderer.code(ft.text,ft.lang,ft.escaped);continue}case"table":{for(wt="",Mt="",pt=ft.header.length,Ge=0;Ge<pt;Ge++)Mt+=this.renderer.tablecell(this.parseInline(ft.tokens.header[Ge]),{header:!0,align:ft.align[Ge]});for(wt+=this.renderer.tablerow(Mt),lt="",pt=ft.cells.length,Ge=0;Ge<pt;Ge++){for(Rt=ft.tokens.cells[Ge],Mt="",Pt=Rt.length,qe=0;qe<Pt;qe++)Mt+=this.renderer.tablecell(this.parseInline(Rt[qe]),{header:!1,align:ft.align[qe]});lt+=this.renderer.tablerow(Mt)}Ee+=this.renderer.table(wt,lt);continue}case"blockquote":{lt=this.parse(ft.tokens),Ee+=this.renderer.blockquote(lt);continue}case"list":{for(Qe=ft.ordered,Te=ft.start,je=ft.loose,pt=ft.items.length,lt="",Ge=0;Ge<pt;Ge++)Ze=ft.items[Ge],Tt=Ze.checked,Ot=Ze.task,ct="",Ze.task&&(st=this.renderer.checkbox(Tt),je?Ze.tokens.length>0&&Ze.tokens[0].type==="text"?(Ze.tokens[0].text=st+" "+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=st+" "+Ze.tokens[0].tokens[0].text)):Ze.tokens.unshift({type:"text",text:st}):ct+=st),ct+=this.parse(Ze.tokens,je),lt+=this.renderer.listitem(ct,Ot,Tt);Ee+=this.renderer.list(lt,Qe,Te);continue}case"html":{Ee+=this.renderer.html(ft.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(ft.tokens));continue}case"text":{for(lt=ft.tokens?this.parseInline(ft.tokens):ft.text;be+1<gt&&he[be+1].type==="text";)ft=he[++be],lt+=`
`+(ft.tokens?this.parseInline(ft.tokens):ft.text);Ee+=ve?this.renderer.paragraph(lt):lt;continue}default:{var kt='Token with "'+ft.type+'" type was not found.';if(this.options.silent){console.error(kt);return}else throw new Error(kt)}}}return Ee},De.parseInline=function(he,ve){ve=ve||this.renderer;var Ee="",be,Ge,qe=he.length;for(be=0;be<qe;be++){Ge=he[be];switch(Ge.type){case"escape":{Ee+=ve.text(Ge.text);break}case"html":{Ee+=ve.html(Ge.text);break}case"link":{Ee+=ve.link(Ge.href,Ge.title,this.parseInline(Ge.tokens,ve));break}case"image":{Ee+=ve.image(Ge.href,Ge.title,Ge.text);break}case"strong":{Ee+=ve.strong(this.parseInline(Ge.tokens,ve));break}case"em":{Ee+=ve.em(this.parseInline(Ge.tokens,ve));break}case"codespan":{Ee+=ve.codespan(Ge.text);break}case"br":{Ee+=ve.br();break}case"del":{Ee+=ve.del(this.parseInline(Ge.tokens,ve));break}case"text":{Ee+=ve.text(Ge.text);break}default:{var pt='Token with "'+Ge.type+'" type was not found.';if(this.options.silent){console.error(pt);return}else throw new Error(pt)}}}return Ee},Ne}(),Re=ne.merge,rt=ne.checkSanitizeDeprecation,Pe=ne.escape,Ie=C.getDefaults,Xe=C.changeDefaults,tt=C.defaults;function Ve(Ne,De,_e){if(typeof Ne=="undefined"||Ne===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ne!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ne)+", string expected");if(typeof De=="function"&&(_e=De,De=null),De=Re({},Ve.defaults,De||{}),rt(De),_e){var he=De.highlight,ve;try{ve=ke.lex(Ne,De)}catch(qe){return _e(qe)}var Ee=function(pt){var Pt;if(!pt)try{Pt=me.parse(ve,De)}catch(Rt){pt=Rt}return De.highlight=he,pt?_e(pt):_e(null,Pt)};if(!he||he.length<3)return Ee();if(delete De.highlight,!ve.length)return Ee();var be=0;Ve.walkTokens(ve,function(qe){qe.type==="code"&&(be++,setTimeout(function(){he(qe.text,qe.lang,function(pt,Pt){if(pt)return Ee(pt);Pt!=null&&Pt!==qe.text&&(qe.text=Pt,qe.escaped=!0),be--,be===0&&Ee()})},0))}),be===0&&Ee();return}try{var Ge=ke.lex(Ne,De);return De.walkTokens&&Ve.walkTokens(Ge,De.walkTokens),me.parse(Ge,De)}catch(qe){if(qe.message+=`
Please report this to https://github.com/markedjs/marked.`,De.silent)return"<p>An error occurred:</p><pre>"+Pe(qe.message+"",!0)+"</pre>";throw qe}}Ve.options=Ve.setOptions=function(Ne){return Re(Ve.defaults,Ne),Xe(Ve.defaults),Ve},Ve.getDefaults=Ie,Ve.defaults=tt,Ve.use=function(Ne){var De=Re({},Ne);if(Ne.renderer&&function(){var he=Ve.defaults.renderer||new M,ve=function(Ge){var qe=he[Ge];he[Ge]=function(){for(var pt=arguments.length,Pt=new Array(pt),Rt=0;Rt<pt;Rt++)Pt[Rt]=arguments[Rt];var Mt=Ne.renderer[Ge].apply(he,Pt);return Mt===!1&&(Mt=qe.apply(he,Pt)),Mt}};for(var Ee in Ne.renderer)ve(Ee);De.renderer=he}(),Ne.tokenizer&&function(){var he=Ve.defaults.tokenizer||new oe,ve=function(Ge){var qe=he[Ge];he[Ge]=function(){for(var pt=arguments.length,Pt=new Array(pt),Rt=0;Rt<pt;Rt++)Pt[Rt]=arguments[Rt];var Mt=Ne.tokenizer[Ge].apply(he,Pt);return Mt===!1&&(Mt=qe.apply(he,Pt)),Mt}};for(var Ee in Ne.tokenizer)ve(Ee);De.tokenizer=he}(),Ne.walkTokens){var _e=Ve.defaults.walkTokens;De.walkTokens=function(he){Ne.walkTokens(he),_e&&_e(he)}}Ve.setOptions(De)},Ve.walkTokens=function(Ne,De){for(var _e=P(Ne),he;!(he=_e()).done;){var ve=he.value;De(ve);switch(ve.type){case"table":{for(var Ee=P(ve.tokens.header),be;!(be=Ee()).done;){var Ge=be.value;Ve.walkTokens(Ge,De)}for(var qe=P(ve.tokens.cells),pt;!(pt=qe()).done;)for(var Pt=pt.value,Rt=P(Pt),Mt;!(Mt=Rt()).done;){var wt=Mt.value;Ve.walkTokens(wt,De)}break}case"list":{Ve.walkTokens(ve.items,De);break}default:ve.tokens&&Ve.walkTokens(ve.tokens,De)}}},Ve.Parser=me,Ve.parser=me.parse,Ve.Renderer=M,Ve.TextRenderer=N,Ve.Lexer=ke,Ve.lexer=ke.lex,Ve.Tokenizer=oe,Ve.Slugger=$,Ve.parse=Ve;var Ke=Ve;return Ke})},"DlR+":function($e,We,z){var ae=z("MFOe"),Z=ae.Global,U=ae.trim;$e.exports={name:"cookieStorage",read:P,write:C,each:S,remove:T,clearAll:l};var w=Z.document;function P(h){if(!h||!p(h))return null;var d="(?:^|.*;\\s*)"+escape(h).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(w.cookie.replace(new RegExp(d),"$1"))}function S(h){for(var d=w.cookie.split(/; ?/g),o=d.length-1;o>=0;o--){if(!U(d[o]))continue;var c=d[o].split("="),s=unescape(c[0]),f=unescape(c[1]);h(f,s)}}function C(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,C=0,T=void 0,l=void 0,p=function(N,$){_[C]=N,_[C+1]=$,C+=2,C===2&&(l?l(b):m())};function h(M){l=M}function d(M){p=M}var o=typeof window!="undefined"?window:void 0,c=o||{},s=c.MutationObserver||c.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)}:g()}function u(){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 g(){var M=setTimeout;return function(){return M(b,1)}}var _=new Array(1e3);function b(){for(var M=0;M<C;M+=2){var N=_[M],$=_[M+1];N($),_[M]=void 0,_[M+1]=void 0}C=0}function v(){try{var M=Function("return this")().require("vertx");return T=M.runOnLoop||M.runOnContext,t()}catch(N){return g()}}var m=void 0;f?m=n():s?m=u():i?m=y():o===void 0&&!0?m=v():m=g();function E(M,N){var $=this,V=new this.constructor(O);V[x]===void 0&&Fe(V);var Y=$._state;if(Y){var me=arguments[Y-1];p(function(){return ye(Y,V,me,$._result)})}else oe($,V,M,N);return V}function a(M){var N=this;if(M&&typeof M=="object"&&M.constructor===N)return M;var $=new N(O);return J($,M),$}var x=Math.random().toString(36).substring(2);function O(){}var A=void 0,D=1,I=2;function F(){return new TypeError("You cannot resolve a promise with itself")}function K(){return new TypeError("A promises callback cannot return that same promise.")}function ne(M,N,$,V){try{M.call(N,$,V)}catch(Y){return Y}}function j(M,N,$){p(function(V){var Y=!1,me=ne($,N,function(Re){if(Y)return;Y=!0,N!==Re?J(V,Re):Q(V,Re)},function(Re){if(Y)return;Y=!0,ie(V,Re)},"Settle: "+(V._label||" unknown promise"));!Y&&me&&(Y=!0,ie(V,me))},M)}function G(M,N){N._state===D?Q(M,N._result):N._state===I?ie(M,N._result):oe(N,void 0,function($){return J(M,$)},function($){return ie(M,$)})}function X(M,N,$){N.constructor===M.constructor&&$===E&&N.constructor.resolve===a?G(M,N):$===void 0?Q(M,N):w($)?j(M,N,$):Q(M,N)}function J(M,N){if(M===N)ie(M,F());else if(U(N)){var $=void 0;try{$=N.then}catch(V){ie(M,V);return}X(M,N,$)}else Q(M,N)}function B(M){M._onerror&&M._onerror(M._result),xe(M)}function Q(M,N){if(M._state!==A)return;M._result=N,M._state=D,M._subscribers.length!==0&&p(xe,M)}function ie(M,N){if(M._state!==A)return;M._state=I,M._result=N,p(B,M)}function oe(M,N,$,V){var Y=M._subscribers,me=Y.length;M._onerror=null,Y[me]=N,Y[me+D]=$,Y[me+I]=V,me===0&&M._state&&p(xe,M)}function xe(M){var N=M._subscribers,$=M._state;if(N.length===0)return;for(var V=void 0,Y=void 0,me=M._result,Re=0;Re<N.length;Re+=3)V=N[Re],Y=N[Re+$],V?ye($,V,Y,me):Y(me);M._subscribers.length=0}function ye(M,N,$,V){var Y=w($),me=void 0,Re=void 0,rt=!0;if(Y){try{me=$(V)}catch(Pe){rt=!1,Re=Pe}if(N===me){ie(N,K());return}}else me=V;N._state!==A||(Y&&rt?J(N,me):rt===!1?ie(N,Re):M===D?Q(N,me):M===I&&ie(N,me))}function Ae(M,N){try{N(function(V){J(M,V)},function(V){ie(M,V)})}catch($){ie(M,$)}}var pe=0;function Oe(){return pe++}function Fe(M){M[x]=pe++,M._state=void 0,M._result=void 0,M._subscribers=[]}function Me(){return new Error("Array Methods must be provided an Array")}var Ce=function(){function M(N,$){this._instanceConstructor=N,this.promise=new N(O),this.promise[x]||Fe(this.promise),S($)?(this.length=$.length,this._remaining=$.length,this._result=new Array(this.length),this.length===0?Q(this.promise,this._result):(this.length=this.length||0,this._enumerate($),this._remaining===0&&Q(this.promise,this._result))):ie(this.promise,Me())}return M.prototype._enumerate=function($){for(var V=0;this._state===A&&V<$.length;V++)this._eachEntry($[V],V)},M.prototype._eachEntry=function($,V){var Y=this._instanceConstructor,me=Y.resolve;if(me===a){var Re=void 0,rt=void 0,Pe=!1;try{Re=$.then}catch(Xe){Pe=!0,rt=Xe}if(Re===E&&$._state!==A)this._settledAt($._state,V,$._result);else if(typeof Re!="function")this._remaining--,this._result[V]=$;else if(Y===Ye){var Ie=new Y(O);Pe?ie(Ie,rt):X(Ie,$,Re),this._willSettleAt(Ie,V)}else this._willSettleAt(new Y(function(Xe){return Xe($)}),V)}else this._willSettleAt(me($),V)},M.prototype._settledAt=function($,V,Y){var me=this.promise;me._state===A&&(this._remaining--,$===I?ie(me,Y):this._result[V]=Y),this._remaining===0&&Q(me,this._result)},M.prototype._willSettleAt=function($,V){var Y=this;oe($,void 0,function(me){return Y._settledAt(D,V,me)},function(me){return Y._settledAt(I,V,me)})},M}();function Le(M){return new Ce(this,M).promise}function de(M){var N=this;return S(M)?new N(function($,V){for(var Y=M.length,me=0;me<Y;me++)N.resolve(M[me]).then($,V)}):new N(function($,V){return V(new TypeError("You must pass an array to race."))})}function ue(M){var N=this,$=new N(O);return ie($,M),$}function ke(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Ue(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Ye=function(){function M(N){this[x]=Oe(),this._result=this._state=void 0,this._subscribers=[],O!==N&&(typeof N!="function"&&ke(),this instanceof M?Ae(this,N):Ue())}return M.prototype.catch=function($){return this.then(null,$)},M.prototype.finally=function($){var V=this,Y=V.constructor;return w($)?V.then(function(me){return Y.resolve($()).then(function(){return me})},function(me){return Y.resolve($()).then(function(){throw me})}):V.then($,$)},M}();Ye.prototype.then=E,Ye.all=Le,Ye.race=de,Ye.resolve=a,Ye.reject=ue,Ye._setScheduler=h,Ye._setAsap=d,Ye._asap=p;function ee(){var M=void 0;if(typeof Z!="undefined")M=Z;else if(typeof self!="undefined")M=self;else try{M=Function("return this")()}catch(V){throw new Error("polyfill failed because global object is unavailable in this environment")}var N=M.Promise;if(N){var $=null;try{$=Object.prototype.toString.call(N.resolve())}catch(V){}if($==="[object Promise]"&&!N.cast)return}M.Promise=Ye}return Ye.polyfill=ee,Ye.Promise=Ye,Ye})}).call(this,z("Q2Ig"),z("IyRk"))},E9nw:function($e,We){$e.exports=function(){var z=document.getSelection();if(!z.rangeCount)return function(){};for(var ae=document.activeElement,Z=[],U=0;U<z.rangeCount;U++)Z.push(z.getRangeAt(U));switch(ae.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":ae.blur();break;default:ae=null;break}return z.removeAllRanges(),function(){z.type==="Caret"&&z.removeAllRanges(),z.rangeCount||Z.forEach(function(w){z.addRange(w)}),ae&&ae.focus()}}},EHPI:function($e,We,z){"use strict";var ae=z("bbsP"),Z=z("/wGt"),U=z("tJVT"),w=z("k1fw"),P=z("q1tI"),S=z.n(P),C=z("ZW9T"),T=z("ZD9Y"),l=z("M8RZ"),p=z("bCnd"),h=z("fcyK"),d=z.n(h),o={theme:Object(p.a)("cmCodeMode","vs-dark"),fontSize:Object(p.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(p.a)("cmTabToSpace",!0)},c;(function(i){i[i.set_font_size=0]="set_font_size",i[i.set_theme=1]="set_theme",i[i.on_tab_to_space=2]="on_tab_to_space",i[i.set_show_editor_setting=3]="set_show_editor_setting"})(c||(c={}));function s(i,n){switch(n.type){case c.set_show_editor_setting:return Object(w.a)(Object(w.a)({},i),{},{showEditorSetting:n.payload});case c.set_theme:return Object(w.a)(Object(w.a)({},i),{},{theme:n.payload});case c.set_font_size:return Object(w.a)(Object(w.a)({},i),{},{fontSize:n.payload});case c.on_tab_to_space:return Object(w.a)(Object(w.a)({},i),{},{tabToSpace:n.payload});default:throw new Error}}We.a=function(i){var n=i.value,t=i.onChange,u=i.language,y=i.ActionBarRender,g=y===void 0?function(K){return S.a.createElement(f,{onShowCodeSetting:K})}:y,_=Object(P.useReducer)(s,o),b=Object(U.a)(_,2),v=b[0],m=b[1],E=v.theme,a=v.fontSize,x=v.showEditorSetting,O=v.tabToSpace,A={onFontSizeChange:function(ne){m({type:c.set_font_size,payload:ne}),Object(p.b)("cmFontSize",ne)},tabToSpace:O,cmFontSize:a,className:"oj",cmCodeMode:E,onTabToSpace:function(ne){m({type:c.on_tab_to_space,payload:ne}),Object(p.b)("cmTabToSpace",ne)},onCodeModeChange:function(ne){m({type:c.set_theme,payload:ne}),Object(p.b)("cmCodeMode",ne)}};function D(){m({type:c.set_show_editor_setting,payload:!1})}function I(){m({type:c.set_show_editor_setting,payload:!0})}var F={value:n,language:u,onChange:t,theme:E,height:"calc(100% - 56px)",options:{fontSize:a,insertSpaces:O}};return S.a.createElement(P.Fragment,null,S.a.createElement("div",{className:"code-panel-container"},g(I),S.a.createElement(C.b,F)),S.a.createElement(l.a,null,S.a.createElement(Z.a,{className:"oj",title:null,placement:"right",closable:!1,visible:x,onClose:D},S.a.createElement(T.a,A))))};function f(i){var n=i.onShowCodeSetting;return S.a.createElement("div",{className:"action-bar"},S.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),S.a.createElement("a",{onClick:n},S.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){var Z={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,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<s.length;f++){var i=s.charAt(f),n="'"+i+"'";P[n]||(P[n]=C(i))}}S(Z.pairs+"`");function C(s){return function(f){return d(f,s)}}function T(s){var f=s.state.closeBrackets;if(!f||f.override)return f;var i=s.getModeAt(s.getCursor());return i.closeBrackets||f}function l(s){var f=T(s);if(!f||s.getOption("disableInput"))return ae.Pass;for(var i=w(f,"pairs"),n=s.listSelections(),t=0;t<n.length;t++){if(!n[t].empty())return ae.Pass;var u=o(s,n[t].head);if(!u||i.indexOf(u)%2!=0)return ae.Pass}for(var t=n.length-1;t>=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;t<n.length;t++){if(!n[t].empty())return ae.Pass;var u=o(s,n[t].head);if(!u||i.indexOf(u)%2!=0)return ae.Pass}s.operation(function(){var y=s.lineSeparator()||`
`;s.replaceSelection(y+y,null),s.execCommand("goCharLeft"),n=s.listSelections();for(var g=0;g<n.length;g++){var _=n[g].head.line;s.indentLine(_,null,!0),s.indentLine(_+1,null,!0)}})}function h(s){var f=ae.cmpPos(s.anchor,s.head)>0;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 u=w(i,"closeBefore"),y=w(i,"triples"),g=n.charAt(t+1)==f,_=s.listSelections(),b=t%2==0,v,m=0;m<_.length;m++){var E=_[m],a=E.head,x,O=s.getRange(a,U(a.line,a.ch+1));if(b&&!E.empty())x="surround";else if((g||!b)&&O==f)g&&c(s,a)?x="both":y.indexOf(f)>=0&&s.getRange(a,U(a.line,a.ch+3))==f+f+f?x="skipThree":x="skip";else if(g&&a.ch>1&&y.indexOf(f)>=0&&s.getRange(U(a.line,a.ch-2),a)==f+f){if(a.ch>2&&/\bstring/.test(s.getTokenTypeAt(U(a.line,a.ch-2))))return ae.Pass;x="addFour"}else if(g){var A=a.ch==0?" ":s.getRange(U(a.line,a.ch-1),a);if(!ae.isWordChar(O)&&A!=f&&!ae.isWordChar(A))x="both";else return ae.Pass}else if(b&&(O.length===0||/\s/.test(O)||u.indexOf(O)>-1))x="both";else return ae.Pass;if(!v)v=x;else if(v!=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(v=="skip")s.execCommand("goCharRight");else if(v=="skipThree")for(var F=0;F<3;F++)s.execCommand("goCharRight");else if(v=="surround"){for(var K=s.getSelections(),F=0;F<K.length;F++)K[F]=D+K[F]+I;s.replaceSelections(K,"around"),K=s.listSelections().slice();for(var F=0;F<K.length;F++)K[F]=h(K[F]);s.setSelections(K)}else v=="both"?(s.replaceSelection(D+I,null),s.triggerElectric(D+I),s.execCommand("goCharLeft")):v=="addFour"&&(s.replaceSelection(D+D+D+D,"before"),s.execCommand("goCharRight"))})}function o(s,f){var i=s.getRange(U(f.line,f.ch-1),U(f.line,f.ch+1));return i.length==2?i:null}function c(s,f){var i=s.getTokenAt(U(f.line,f.ch+1));return/\bstring/.test(i.type)&&i.start==f.ch&&(f.ch==0||!/\bstring/.test(s.getTokenTypeAt(f)))}})},GUcZ:function($e,We,z){"use strict";var ae=z("fWQN"),Z=z("mtLc"),U=function(){function we(){Object(ae.a)(this,we)}return Object(Z.a)(we,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(W,q){return W.__proto__=q,W},Object.assign=Object.assign||function(W){if(W==null)throw new TypeError("Cannot convert undefined or null to object");for(var q=Object(W),te=1;te<arguments.length;te++){var se=arguments[te];if(se!=null)for(var Se in se)se.hasOwnProperty(Se)&&(q[Se]=se[Se])}return q},typeof self.Promise!="function"&&z("E2g8").polyfill()}}]),we}();U.install();var w=U,P=z("+qE3"),S=z.n(P),C=function(){function we(){Object(ae.a)(this,we)}return Object(Z.a)(we,null,[{key:"e",value:function(W,q){(!W||we.FORCE_GLOBAL_TAG)&&(W=we.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(q);if(we.ENABLE_CALLBACK&&we.emitter.emit("log","error",te),!we.ENABLE_ERROR)return;console.error?console.error(te):console.warn?console.warn(te):console.log(te)}},{key:"i",value:function(W,q){(!W||we.FORCE_GLOBAL_TAG)&&(W=we.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(q);if(we.ENABLE_CALLBACK&&we.emitter.emit("log","info",te),!we.ENABLE_INFO)return;console.info?console.info(te):console.log(te)}},{key:"w",value:function(W,q){(!W||we.FORCE_GLOBAL_TAG)&&(W=we.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(q);if(we.ENABLE_CALLBACK&&we.emitter.emit("log","warn",te),!we.ENABLE_WARN)return;console.warn?console.warn(te):console.log(te)}},{key:"d",value:function(W,q){(!W||we.FORCE_GLOBAL_TAG)&&(W=we.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(q);if(we.ENABLE_CALLBACK&&we.emitter.emit("log","debug",te),!we.ENABLE_DEBUG)return;console.debug?console.debug(te):console.log(te)}},{key:"v",value:function(W,q){(!W||we.FORCE_GLOBAL_TAG)&&(W=we.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(q);if(we.ENABLE_CALLBACK&&we.emitter.emit("log","verbose",te),!we.ENABLE_VERBOSE)return;console.log(te)}}]),we}();C.GLOBAL_TAG="flv.js",C.FORCE_GLOBAL_TAG=!1,C.ENABLE_ERROR=!0,C.ENABLE_INFO=!0,C.ENABLE_WARN=!0,C.ENABLE_DEBUG=!0,C.ENABLE_VERBOSE=!0,C.ENABLE_CALLBACK=!1,C.emitter=new S.a;var T=C,l=function(){function we(){Object(ae.a)(this,we),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)(we,[{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}}]),we}(),p=l,h=z("yKVA"),d=z("879j"),o=function(){function we(fe){Object(ae.a)(this,we),this._message=fe}return Object(Z.a)(we,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),we}(),c=function(we){Object(h.a)(W,we);var fe=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),fe.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"IllegalStateException"}}]),W}(o),s=function(we){Object(h.a)(W,we);var fe=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),fe.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"InvalidArgumentException"}}]),W}(o),f=function(we){Object(h.a)(W,we);var fe=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),fe.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"NotImplementedException"}}]),W}(o),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 we(fe){Object(ae.a)(this,we),this._type=fe||"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)(we,[{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!")}}]),we}(),u=z("oZsa");function y(we,fe){for(;!Object.prototype.hasOwnProperty.call(we,fe)&&!(we=Object(u.a)(we),we===null););return we}function g(we,fe,W){return typeof Reflect!="undefined"&&Reflect.get?g=Reflect.get:g=function(te,se,Se){var He=y(te,se);if(!He)return;var Je=Object.getOwnPropertyDescriptor(He,se);return Je.get?Je.get.call(Se):Je.value},g(we,fe,W||we)}var _={};function b(){var we=self.navigator.userAgent.toLowerCase(),fe=/(edge)\/([\w.]+)/.exec(we)||/(opr)[\/]([\w.]+)/.exec(we)||/(chrome)[ \/]([\w.]+)/.exec(we)||/(iemobile)[\/]([\w.]+)/.exec(we)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(we)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(we)||/(webkit)[ \/]([\w.]+)/.exec(we)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(we)||/(msie) ([\w.]+)/.exec(we)||we.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(we)||we.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(we)||[],W=/(ipad)/.exec(we)||/(ipod)/.exec(we)||/(windows phone)/.exec(we)||/(iphone)/.exec(we)||/(kindle)/.exec(we)||/(android)/.exec(we)||/(windows)/.exec(we)||/(mac)/.exec(we)||/(linux)/.exec(we)||/(cros)/.exec(we)||[],q={browser:fe[5]||fe[3]||fe[1]||"",version:fe[2]||fe[4]||"0",majorVersion:fe[4]||fe[2]||"0",platform:W[0]||""},te={};if(q.browser){te[q.browser]=!0;var se=q.majorVersion.split(".");te.version={major:parseInt(q.majorVersion,10),string:q.version},se.length>1&&(te.version.minor=parseInt(se[1],10)),se.length>2&&(te.version.build=parseInt(se[2],10))}if(q.platform&&(te[q.platform]=!0),(te.chrome||te.opr||te.safari)&&(te.webkit=!0),te.rv||te.iemobile){te.rv&&delete te.rv;var Se="msie";q.browser=Se,te[Se]=!0}if(te.edge){delete te.edge;var He="msedge";q.browser=He,te[He]=!0}if(te.opr){var Je="opera";q.browser=Je,te[Je]=!0}if(te.safari&&te.android){var xt="android";q.browser=xt,te[xt]=!0}te.name=q.browser,te.platform=q.platform;for(var Ct in _)_.hasOwnProperty(Ct)&&delete _[Ct];Object.assign(_,te)}b();var v=_,m=function(we){Object(h.a)(W,we);var fe=Object(d.a)(W);function W(q,te){var se;return Object(ae.a)(this,W),se=fe.call(this,"fetch-stream-loader"),se.TAG="FetchStreamLoader",se._seekHandler=q,se._config=te,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(),g(Object(u.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(te,se){var Se=this;this._dataSource=te,this._range=se;var He=te.url;this._config.reuseRedirectedURL&&te.redirectedURL!=null&&(He=te.redirectedURL);var Je=this._seekHandler.getConfig(He,se),xt=new self.Headers;if(typeof Je.headers=="object"){var Ct=Je.headers;for(var it in Ct)Ct.hasOwnProperty(it)&&xt.append(it,Ct[it])}var St={method:"GET",headers:xt,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var Xt in this._config.headers)xt.append(Xt,this._config.headers[Xt]);te.cors===!1&&(St.mode="same-origin"),te.withCredentials&&(St.credentials="include"),te.referrerPolicy&&(St.referrerPolicy=te.referrerPolicy),this._status=i.kConnecting,self.fetch(Je.url,St).then(function(bt){if(Se._requestAbort){Se._requestAbort=!1,Se._status=i.kIdle;return}if(bt.ok&&bt.status>=200&&bt.status<=299){if(bt.url!==Je.url&&Se._onURLRedirect){var ht=Se._seekHandler.removeURLParameters(bt.url);Se._onURLRedirect(ht)}var Jt=bt.headers.get("Content-Length");return Jt!=null&&(Se._contentLength=parseInt(Jt),Se._contentLength!==0&&(Se._onContentLengthKnown&&Se._onContentLengthKnown(Se._contentLength))),Se._pump.call(Se,bt.body.getReader())}else if(Se._status=i.kError,Se._onError)Se._onError(n.HTTP_STATUS_CODE_INVALID,{code:bt.status,msg:bt.statusText});else throw new o("FetchStreamLoader: Http code invalid, "+bt.status+" "+bt.statusText)}).catch(function(bt){if(Se._status=i.kError,Se._onError)Se._onError(n.EXCEPTION,{code:-1,msg:bt.message});else throw bt})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(te){var se=this;return te.read().then(function(Se){if(Se.done)if(se._contentLength!==null&&se._receivedLength<se._contentLength){se._status=i.kError;var He=n.EARLY_EOF,Je={code:-1,msg:"Fetch stream meet Early-EOF"};if(se._onError)se._onError(He,Je);else throw new o(Je.msg)}else se._status=i.kComplete,se._onComplete&&se._onComplete(se._range.from,se._range.from+se._receivedLength-1);else{if(se._requestAbort===!0)return se._requestAbort=!1,se._status=i.kComplete,te.cancel();se._status=i.kBuffering;var xt=Se.value.buffer,Ct=se._range.from+se._receivedLength;se._receivedLength+=xt.byteLength,se._onDataArrival&&se._onDataArrival(xt,Ct,se._receivedLength),se._pump(te)}}).catch(function(Se){if(Se.code===11&&v.msedge)return;se._status=i.kError;var He=0,Je=null;if((Se.code===19||Se.message==="network error")&&(se._contentLength===null||se._contentLength!==null&&se._receivedLength<se._contentLength)?(He=n.EARLY_EOF,Je={code:Se.code,msg:"Fetch stream meet Early-EOF"}):(He=n.EXCEPTION,Je={code:Se.code,msg:Se.message}),se._onError)se._onError(He,Je);else throw new o(Je.msg)})}}],[{key:"isSupported",value:function(){try{var te=v.msedge&&v.version.minor>=15048,se=v.msedge?te:!0;return self.fetch&&self.ReadableStream&&se}catch(Se){return!1}}}]),W}(t),E=m,a=function(we){Object(h.a)(W,we);var fe=Object(d.a)(W);function W(q,te){var se;return Object(ae.a)(this,W),se=fe.call(this,"xhr-moz-chunked-loader"),se.TAG="MozChunkedLoader",se._seekHandler=q,se._config=te,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),g(Object(u.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(te,se){this._dataSource=te,this._range=se;var Se=te.url;this._config.reuseRedirectedURL&&te.redirectedURL!=null&&(Se=te.redirectedURL);var He=this._seekHandler.getConfig(Se,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),te.withCredentials&&(Je.withCredentials=!0),typeof He.headers=="object"){var xt=He.headers;for(var Ct in xt)xt.hasOwnProperty(Ct)&&Je.setRequestHeader(Ct,xt[Ct])}if(typeof this._config.headers=="object"){var it=this._config.headers;for(var St in it)it.hasOwnProperty(St)&&Je.setRequestHeader(St,it[St])}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(te){var se=te.target;if(se.readyState===2){if(se.responseURL!=null&&se.responseURL!==this._requestURL&&this._onURLRedirect){var Se=this._seekHandler.removeURLParameters(se.responseURL);this._onURLRedirect(Se)}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 o("MozChunkedLoader: Http code invalid, "+se.status+" "+se.statusText);else this._status=i.kBuffering}}},{key:"_onProgress",value:function(te){if(this._status===i.kError)return;this._contentLength===null&&(te.total!==null&&te.total!==0&&(this._contentLength=te.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)));var se=te.target.response,Se=this._range.from+this._receivedLength;this._receivedLength+=se.byteLength,this._onDataArrival&&this._onDataArrival(se,Se,this._receivedLength)}},{key:"_onLoadEnd",value:function(te){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(te){this._status=i.kError;var se=0,Se=null;if(this._contentLength&&te.loaded<this._contentLength?(se=n.EARLY_EOF,Se={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(se=n.EXCEPTION,Se={code:-1,msg:te.constructor.name+" "+te.type}),this._onError)this._onError(se,Se);else throw new o(Se.msg)}}],[{key:"isSupported",value:function(){try{var te=new XMLHttpRequest;return te.open("GET","https://example.com",!0),te.responseType="moz-chunked-arraybuffer",te.responseType==="moz-chunked-arraybuffer"}catch(se){return T.w("MozChunkedLoader",se.message),!1}}}]),W}(t),x=a,O=function(we){Object(h.a)(W,we);var fe=Object(d.a)(W);function W(q,te){var se;return Object(ae.a)(this,W),se=fe.call(this,"xhr-msstream-loader"),se.TAG="MSStreamLoader",se._seekHandler=q,se._config=te,se._needStash=!0,se._xhr=null,se._reader=null,se._totalRange=null,se._currentRange=null,se._currentRequestURL=null,se._currentRedirectedURL=null,se._contentLength=null,se._receivedLength=0,se._bufferLimit=16*1024*1024,se._lastTimeBufferSize=0,se._isReconnecting=!1,se}return Object(Z.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),g(Object(u.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(te,se){this._internalOpen(te,se,!1)}},{key:"_internalOpen",value:function(te,se,Se){this._dataSource=te,Se?this._currentRange=se:this._totalRange=se;var He=te.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?He=this._currentRedirectedURL:te.redirectedURL!=null&&(He=te.redirectedURL));var Je=this._seekHandler.getConfig(He,se);this._currentRequestURL=Je.url;var xt=this._reader=new self.MSStreamReader;xt.onprogress=this._msrOnProgress.bind(this),xt.onload=this._msrOnLoad.bind(this),xt.onerror=this._msrOnError.bind(this);var Ct=this._xhr=new XMLHttpRequest;if(Ct.open("GET",Je.url,!0),Ct.responseType="ms-stream",Ct.onreadystatechange=this._xhrOnReadyStateChange.bind(this),Ct.onerror=this._xhrOnError.bind(this),te.withCredentials&&(Ct.withCredentials=!0),typeof Je.headers=="object"){var it=Je.headers;for(var St in it)it.hasOwnProperty(St)&&Ct.setRequestHeader(St,it[St])}if(typeof this._config.headers=="object"){var Xt=this._config.headers;for(var bt in Xt)Xt.hasOwnProperty(bt)&&Ct.setRequestHeader(bt,Xt[bt])}this._isReconnecting?this._isReconnecting=!1:this._status=i.kConnecting,Ct.send()}},{key:"abort",value:function(){this._internalAbort(),this._status=i.kComplete}},{key:"_internalAbort",value:function(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}},{key:"_xhrOnReadyStateChange",value:function(te){var se=te.target;if(se.readyState===2)if(se.status>=200&&se.status<=299){if(this._status=i.kBuffering,se.responseURL!=null){var Se=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&Se!==this._currentRedirectedURL&&(this._currentRedirectedURL=Se,this._onURLRedirect&&this._onURLRedirect(Se))}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 o("MSStreamLoader: Http code invalid, "+se.status+" "+se.statusText);else if(se.readyState===3&&(se.status>=200&&se.status<=299)){this._status=i.kBuffering;var xt=se.response;this._reader.readAsArrayBuffer(xt)}}},{key:"_xhrOnError",value:function(te){this._status=i.kError;var se=n.EXCEPTION,Se={code:-1,msg:te.constructor.name+" "+te.type};if(this._onError)this._onError(se,Se);else throw new o(Se.msg)}},{key:"_msrOnProgress",value:function(te){var se=te.target,Se=se.result;if(Se==null){this._doReconnectIfNeeded();return}var He=Se.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=Se.byteLength;var Je=this._totalRange.from+this._receivedLength;this._receivedLength+=He.byteLength,this._onDataArrival&&this._onDataArrival(He,Je,this._receivedLength),Se.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){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();var te={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,te,!0)}}},{key:"_msrOnLoad",value:function(te){this._status=i.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}},{key:"_msrOnError",value:function(te){this._status=i.kError;var se=0,Se=null;if(this._contentLength&&this._receivedLength<this._contentLength?(se=n.EARLY_EOF,Se={code:-1,msg:"MSStream meet Early-Eof"}):(se=n.EARLY_EOF,Se={code:-1,msg:te.constructor.name+" "+te.type}),this._onError)this._onError(se,Se);else throw new o(Se.msg)}}],[{key:"isSupported",value:function(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;var te=new XMLHttpRequest;return te.open("GET","https://example.com",!0),te.responseType="ms-stream",te.responseType==="ms-stream"}catch(se){return T.w("MSStreamLoader",se.message),!1}}}]),W}(t),A=O,D=function(we){Object(h.a)(W,we);var fe=Object(d.a)(W);function W(q,te){var se;return Object(ae.a)(this,W),se=fe.call(this,"xhr-range-loader"),se.TAG="RangeLoader",se._seekHandler=q,se._config=te,se._needStash=!1,se._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],se._currentChunkSizeKB=384,se._currentSpeedNormalized=0,se._zeroSpeedChunkCount=0,se._xhr=null,se._speedSampler=new p,se._requestAbort=!1,se._waitForTotalLength=!1,se._totalLengthReceived=!1,se._currentRequestURL=null,se._currentRedirectedURL=null,se._currentRequestRange=null,se._totalLength=null,se._contentLength=null,se._receivedLength=0,se._lastTimeLoaded=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.onload=null,this._xhr.onerror=null,this._xhr=null),g(Object(u.a)(W.prototype),"destroy",this).call(this)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}},{key:"open",value:function(te,se){this._dataSource=te,this._range=se,this._status=i.kConnecting;var Se=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(Se=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!Se?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}},{key:"_openSubRange",value:function(){var te=this._currentChunkSizeKB*1024,se=this._range.from+this._receivedLength,Se=se+te;this._contentLength!=null&&(Se-this._range.from>=this._contentLength&&(Se=this._range.from+this._contentLength-1)),this._currentRequestRange={from:se,to:Se},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(te,se){this._lastTimeLoaded=0;var Se=te.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Se=this._currentRedirectedURL:te.redirectedURL!=null&&(Se=te.redirectedURL));var He=this._seekHandler.getConfig(Se,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),te.withCredentials&&(Je.withCredentials=!0),typeof He.headers=="object"){var xt=He.headers;for(var Ct in xt)xt.hasOwnProperty(Ct)&&Je.setRequestHeader(Ct,xt[Ct])}if(typeof this._config.headers=="object"){var it=this._config.headers;for(var St in it)it.hasOwnProperty(St)&&Je.setRequestHeader(St,it[St])}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(te){var se=te.target;if(se.readyState===2){if(se.responseURL!=null){var Se=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&Se!==this._currentRedirectedURL&&(this._currentRedirectedURL=Se,this._onURLRedirect&&this._onURLRedirect(Se))}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 o("RangeLoader: Http code invalid, "+se.status+" "+se.statusText)}}},{key:"_onProgress",value:function(te){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 Se=te.total;this._internalAbort(),Se!=null&Se!==0&&(this._totalLength=Se)}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=te.loaded-this._lastTimeLoaded;this._lastTimeLoaded=te.loaded,this._speedSampler.addBytes(He)}},{key:"_normalizeSpeed",value:function(te){var se=this._chunkSizeKBList,Se=se.length-1,He=0,Je=0,xt=Se;if(te<se[0])return se[0];for(;Je<=xt;){if(He=Je+Math.floor((xt-Je)/2),He===Se||te>=se[He]&&te<se[He+1])return se[He];se[He]<te?Je=He+1:xt=He-1}}},{key:"_onLoad",value:function(te){if(this._status===i.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;var se=this._speedSampler.lastSecondKBps;if(se===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(se=this._speedSampler.currentKBps)),se!==0){var Se=this._normalizeSpeed(se);this._currentSpeedNormalized!==Se&&(this._currentSpeedNormalized=Se,this._currentChunkSizeKB=Se)}var He=te.target.response,Je=this._range.from+this._receivedLength;this._receivedLength+=He.byteLength;var xt=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():xt=!0,this._onDataArrival&&this._onDataArrival(He,Je,this._receivedLength),xt&&(this._status=i.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},{key:"_onXhrError",value:function(te){this._status=i.kError;var se=0,Se=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(se=n.EARLY_EOF,Se={code:-1,msg:"RangeLoader meet Early-Eof"}):(se=n.EXCEPTION,Se={code:-1,msg:te.constructor.name+" "+te.type}),this._onError)this._onError(se,Se);else throw new o(Se.msg)}}],[{key:"isSupported",value:function(){try{var te=new XMLHttpRequest;return te.open("GET","https://example.com",!0),te.responseType="arraybuffer",te.responseType==="arraybuffer"}catch(se){return T.w("RangeLoader",se.message),!1}}}]),W}(t),I=D,F=function(we){Object(h.a)(W,we);var fe=Object(d.a)(W);function W(){var q;return Object(ae.a)(this,W),q=fe.call(this,"websocket-loader"),q.TAG="WebSocketLoader",q._needStash=!0,q._ws=null,q._requestAbort=!1,q._receivedLength=0,q}return Object(Z.a)(W,[{key:"destroy",value:function(){this._ws&&this.abort(),g(Object(u.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(te){try{var se=this._ws=new self.WebSocket(te.url);se.binaryType="arraybuffer",se.onopen=this._onWebSocketOpen.bind(this),se.onclose=this._onWebSocketClose.bind(this),se.onmessage=this._onWebSocketMessage.bind(this),se.onerror=this._onWebSocketError.bind(this),this._status=i.kConnecting}catch(He){this._status=i.kError;var Se={code:He.code,msg:He.message};if(this._onError)this._onError(n.EXCEPTION,Se);else throw new o(Se.msg)}}},{key:"abort",value:function(){var te=this._ws;te&&(te.readyState===0||te.readyState===1)&&(this._requestAbort=!0,te.close()),this._ws=null,this._status=i.kComplete}},{key:"_onWebSocketOpen",value:function(te){this._status=i.kBuffering}},{key:"_onWebSocketClose",value:function(te){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=i.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}},{key:"_onWebSocketMessage",value:function(te){var se=this;if(te.data instanceof ArrayBuffer)this._dispatchArrayBuffer(te.data);else if(te.data instanceof Blob){var Se=new FileReader;Se.onload=function(){se._dispatchArrayBuffer(Se.result)},Se.readAsArrayBuffer(te.data)}else{this._status=i.kError;var He={code:-1,msg:"Unsupported WebSocket message type: "+te.data.constructor.name};if(this._onError)this._onError(n.EXCEPTION,He);else throw new o(He.msg)}}},{key:"_dispatchArrayBuffer",value:function(te){var se=te,Se=this._receivedLength;this._receivedLength+=se.byteLength,this._onDataArrival&&this._onDataArrival(se,Se,this._receivedLength)}},{key:"_onWebSocketError",value:function(te){this._status=i.kError;var se={code:te.code,msg:te.message};if(this._onError)this._onError(n.EXCEPTION,se);else throw new o(se.msg)}}],[{key:"isSupported",value:function(){try{return typeof self.WebSocket!="undefined"}catch(te){return!1}}}]),W}(t),K=F,ne=function(){function we(fe){Object(ae.a)(this,we),this._zeroStart=fe||!1}return Object(Z.a)(we,[{key:"getConfig",value:function(W,q){var te={};if(q.from!==0||q.to!==-1){var se;q.to!==-1?se="bytes=".concat(q.from.toString(),"-").concat(q.to.toString()):se="bytes=".concat(q.from.toString(),"-"),te.Range=se}else this._zeroStart&&(te.Range="bytes=0-");return{url:W,headers:te}}},{key:"removeURLParameters",value:function(W){return W}}]),we}(),j=ne,G=function(){function we(fe,W){Object(ae.a)(this,we),this._startName=fe,this._endName=W}return Object(Z.a)(we,[{key:"getConfig",value:function(W,q){var te=W;if(q.from!==0||q.to!==-1){var se=!0;te.indexOf("?")===-1&&(te+="?",se=!1),se&&(te+="&"),te+="".concat(this._startName,"=").concat(q.from.toString()),q.to!==-1&&(te+="&".concat(this._endName,"=").concat(q.to.toString()))}return{url:te,headers:{}}}},{key:"removeURLParameters",value:function(W){var q=W.split("?")[0],te=void 0,se=W.indexOf("?");se!==-1&&(te=W.substring(se+1));var Se="";if(te!=null&&te.length>0)for(var He=te.split("&"),Je=0;Je<He.length;Je++){var xt=He[Je].split("="),Ct=Je>0;xt[0]!==this._startName&&xt[0]!==this._endName&&(Ct&&(Se+="&"),Se+=He[Je])}return Se.length===0?q:q+"?"+Se}}]),we}(),X=G,J=function(){function we(fe,W,q){Object(ae.a)(this,we),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=fe,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(fe.url),this._refTotalLength=fe.filesize?fe.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)(we,[{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",te=W.seekParamEnd||"bend";this._seekHandler=new X(q,te)}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=K;else if(E.isSupported())this._loaderClass=E;else if(x.isSupported())this._loaderClass=x;else if(I.isSupported())this._loaderClass=I;else throw new o("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 te={from:W,to:-1};this._currentRange={from:te.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,te),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*1<W;)q*=2;if(q+=1024*1024*1,q===this._bufferSize)return;var te=new ArrayBuffer(q);if(this._stashUsed>0){var se=new Uint8Array(this._stashBuffer,0,this._stashUsed),Se=new Uint8Array(te,0,q);Se.set(se,0)}this._stashBuffer=te,this._bufferSize=q}},{key:"_normalizeSpeed",value:function(W){var q=this._speedNormalizeList,te=q.length-1,se=0,Se=0,He=te;if(W<q[0])return q[0];for(;Se<=He;){if(se=Se+Math.floor((He-Se)/2),se===te||W>=q[se]&&W<q[se+1])return q[se];q[se]<W?Se=se+1:He=se-1}}},{key:"_adjustStashSize",value:function(W){var q=0;this._config.isLive||W<512?q=W:W>=512&&W<=1024?q=Math.floor(W*1.5):q=W*2,q>8192&&(q=8192);var te=q*1024+1024*1024*1;this._bufferSize<te&&this._expandBuffer(te),this._stashSize=q*1024}},{key:"_dispatchChunks",value:function(W,q){return this._currentRange.to=q+W.byteLength-1,this._onDataArrival(W,q)}},{key:"_onURLRedirect",value:function(W){this._redirectedURL=W,this._onRedirect&&this._onRedirect(W)}},{key:"_onContentLengthKnown",value:function(W){W&&this._fullRequestFlag&&(this._totalLength=W,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(W,q,te){if(!this._onDataArrival)throw new c("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(W.byteLength);var se=this._speedSampler.lastSecondKBps;if(se!==0){var Se=this._normalizeSpeed(se);this._speedNormalized!==Se&&(this._speedNormalized=Se,this._adjustStashSize(Se))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=q),this._stashUsed+W.byteLength<=this._stashSize){var Xt=new Uint8Array(this._stashBuffer,0,this._stashSize);Xt.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength}else{var bt=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var ht=this._stashBuffer.slice(0,this._stashUsed),Jt=this._dispatchChunks(ht,this._stashByteStart);if(Jt<ht.byteLength){if(Jt>0){var Nt=new Uint8Array(ht,Jt);bt.set(Nt,0),this._stashUsed=Nt.byteLength,this._stashByteStart+=Jt}}else this._stashUsed=0,this._stashByteStart+=Jt;this._stashUsed+W.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+W.byteLength),bt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),bt.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength}else{var mt=this._dispatchChunks(W,q);if(mt<W.byteLength){var cn=W.byteLength-mt;cn>this._bufferSize&&(this._expandBuffer(cn),bt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),bt.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(He<W.byteLength){var Je=W.byteLength-He;Je>this._bufferSize&&this._expandBuffer(Je);var xt=new Uint8Array(this._stashBuffer,0,this._bufferSize);xt.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 Ct=new Uint8Array(this._stashBuffer,0,this._bufferSize);Ct.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength;var it=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(it<this._stashUsed&&it>0){var St=new Uint8Array(this._stashBuffer,it);Ct.set(St,0)}this._stashUsed-=it,this._stashByteStart+=it}}},{key:"_flushStashBuffer",value:function(W){if(this._stashUsed>0){var q=this._stashBuffer.slice(0,this._stashUsed),te=this._dispatchChunks(q,this._stashByteStart),se=q.byteLength-te;if(te<q.byteLength)if(W)T.w(this.TAG,"".concat(se," bytes unconsumed data remain when flush buffer, dropped"));else{if(te>0){var Se=new Uint8Array(this._stashBuffer,0,this._bufferSize),He=new Uint8Array(q,te);Se.set(He,0),this._stashUsed=He.byteLength,this._stashByteStart+=te}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 te=this._currentRange.to+1;te<this._totalLength&&(T.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(te,!1));return}W=n.UNRECOVERABLE_EARLY_EOF;break}case n.UNRECOVERABLE_EARLY_EOF:case n.CONNECTING_TIMEOUT:case n.HTTP_STATUS_CODE_INVALID:case n.EXCEPTION:break}if(this._onError)this._onError(W,q);else throw new o("IOException: "+q.msg)}}]),we}(),B=J,Q={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:3*60,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:3*60,autoCleanupMinBackwardDuration:2*60,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function ie(){return Object.assign({},Q)}var oe=function(){function we(){Object(ae.a)(this,we)}return Object(Z.a)(we,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var W=new B({},ie()),q=W.loaderType;return W.destroy(),q=="fetch-stream-loader"||q=="xhr-moz-chunked-loader"}},{key:"getNetworkLoaderTypeName",value:function(){var W=new B({},ie()),q=W.loaderType;return W.destroy(),q}},{key:"supportNativeMediaPlayback",value:function(W){we.videoElement==null&&(we.videoElement=window.document.createElement("video"));var q=we.videoElement.canPlayType(W);return q==="probably"||q=="maybe"}},{key:"getFeatureList",value:function(){var W={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return W.mseFlvPlayback=we.supportMSEH264Playback(),W.networkStreamIO=we.supportNetworkStreamIO(),W.networkLoaderName=we.getNetworkLoaderTypeName(),W.mseLiveFlvPlayback=W.mseFlvPlayback&&W.networkStreamIO,W.nativeMP4H264Playback=we.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),W.nativeWebmVP8Playback=we.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),W.nativeWebmVP9Playback=we.supportNativeMediaPlayback('video/webm; codecs="vp9"'),W}}]),we}(),xe=oe,ye={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"},Ae=ye,pe=function(){function we(){Object(ae.a)(this,we)}return Object(Z.a)(we,null,[{key:"forceGlobalTag",get:function(){return T.FORCE_GLOBAL_TAG},set:function(W){T.FORCE_GLOBAL_TAG=W,we._notifyChange()}},{key:"globalTag",get:function(){return T.GLOBAL_TAG},set:function(W){T.GLOBAL_TAG=W,we._notifyChange()}},{key:"enableAll",get:function(){return T.ENABLE_VERBOSE&&T.ENABLE_DEBUG&&T.ENABLE_INFO&&T.ENABLE_WARN&&T.ENABLE_ERROR},set:function(W){T.ENABLE_VERBOSE=W,T.ENABLE_DEBUG=W,T.ENABLE_INFO=W,T.ENABLE_WARN=W,T.ENABLE_ERROR=W,we._notifyChange()}},{key:"enableDebug",get:function(){return T.ENABLE_DEBUG},set:function(W){T.ENABLE_DEBUG=W,we._notifyChange()}},{key:"enableVerbose",get:function(){return T.ENABLE_VERBOSE},set:function(W){T.ENABLE_VERBOSE=W,we._notifyChange()}},{key:"enableInfo",get:function(){return T.ENABLE_INFO},set:function(W){T.ENABLE_INFO=W,we._notifyChange()}},{key:"enableWarn",get:function(){return T.ENABLE_WARN},set:function(W){T.ENABLE_WARN=W,we._notifyChange()}},{key:"enableError",get:function(){return T.ENABLE_ERROR},set:function(W){T.ENABLE_ERROR=W,we._notifyChange()}},{key:"getConfig",value:function(){return{globalTag:T.GLOBAL_TAG,forceGlobalTag:T.FORCE_GLOBAL_TAG,enableVerbose:T.ENABLE_VERBOSE,enableDebug:T.ENABLE_DEBUG,enableInfo:T.ENABLE_INFO,enableWarn:T.ENABLE_WARN,enableError:T.ENABLE_ERROR,enableCallback:T.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(W){T.GLOBAL_TAG=W.globalTag,T.FORCE_GLOBAL_TAG=W.forceGlobalTag,T.ENABLE_VERBOSE=W.enableVerbose,T.ENABLE_DEBUG=W.enableDebug,T.ENABLE_INFO=W.enableInfo,T.ENABLE_WARN=W.enableWarn,T.ENABLE_ERROR=W.enableError,T.ENABLE_CALLBACK=W.enableCallback}},{key:"_notifyChange",value:function(){var W=we.emitter;if(W.listenerCount("change")>0){var q=we.getConfig();W.emit("change",q)}}},{key:"registerListener",value:function(W){we.emitter.addListener("change",W)}},{key:"removeListener",value:function(W){we.emitter.removeListener("change",W)}},{key:"addLogListener",value:function(W){T.emitter.addListener("log",W),T.emitter.listenerCount("log")>0&&(T.ENABLE_CALLBACK=!0,we._notifyChange())}},{key:"removeLogListener",value:function(W){T.emitter.removeListener("log",W),T.emitter.listenerCount("log")===0&&(T.ENABLE_CALLBACK=!1,we._notifyChange())}}]),we}();pe.emitter=new S.a;var Oe=pe,Fe=function(){function we(){Object(ae.a)(this,we),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)(we,[{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,te=this._search(q.times,W);return{index:te,milliseconds:q.times[te],fileposition:q.filepositions[te]}}},{key:"_search",value:function(W,q){var te=0,se=W.length-1,Se=0,He=0,Je=se;for(q<W[0]&&(te=0,He=Je+1);He<=Je;)if(Se=He+Math.floor((Je-He)/2),Se===se||q>=W[Se]&&q<W[Se+1]){te=Se;break}else W[Se]<q?He=Se+1:Je=Se-1;return te}}]),we}(),Me=Fe;function Ce(we,fe,W){var q=we;if(fe+W<q.length){for(;W--;)if((q[++fe]&192)!==128)return!1;return!0}else return!1}function Le(we){for(var fe=[],W=we,q=0,te=we.length;q<te;){if(W[q]<128){fe.push(String.fromCharCode(W[q])),++q;continue}else if(!(W[q]<192)){if(W[q]<224){if(Ce(W,q,1)){var se=(W[q]&31)<<6|W[q+1]&63;if(se>=128){fe.push(String.fromCharCode(se&65535)),q+=2;continue}}}else if(W[q]<240){if(Ce(W,q,2)){var Se=(W[q]&15)<<12|(W[q+1]&63)<<6|W[q+2]&63;if(Se>=2048&&(Se&63488)!==55296){fe.push(String.fromCharCode(Se&65535)),q+=3;continue}}}else if(W[q]<248&&Ce(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,fe.push(String.fromCharCode(He>>>10|55296)),fe.push(String.fromCharCode(He&1023|56320)),q+=4;continue}}}fe.push(String.fromCharCode(65533)),++q}return fe.join("")}var de=Le,ue=function(){var we=new ArrayBuffer(2);return new DataView(we).setInt16(0,256,!0),new Int16Array(we)[0]===256}(),ke=function(){function we(){Object(ae.a)(this,we)}return Object(Z.a)(we,null,[{key:"parseScriptData",value:function(W,q,te){var se={};try{var Se=we.parseValue(W,q,te),He=we.parseValue(W,q+Se.size,te-Se.size);se[Se.data]=He.data}catch(Je){T.e("AMF",Je.toString())}return se}},{key:"parseObject",value:function(W,q,te){if(te<3)throw new c("Data not enough when parse ScriptDataObject");var se=we.parseString(W,q,te),Se=we.parseValue(W,q+se.size,te-se.size),He=Se.objectEnd;return{data:{name:se.data,value:Se.data},size:se.size+Se.size,objectEnd:He}}},{key:"parseVariable",value:function(W,q,te){return we.parseObject(W,q,te)}},{key:"parseString",value:function(W,q,te){if(te<2)throw new c("Data not enough when parse String");var se=new DataView(W,q,te),Se=se.getUint16(0,!ue),He;return Se>0?He=de(new Uint8Array(W,q+2,Se)):He="",{data:He,size:2+Se}}},{key:"parseLongString",value:function(W,q,te){if(te<4)throw new c("Data not enough when parse LongString");var se=new DataView(W,q,te),Se=se.getUint32(0,!ue),He;return Se>0?He=de(new Uint8Array(W,q+4,Se)):He="",{data:He,size:4+Se}}},{key:"parseDate",value:function(W,q,te){if(te<10)throw new c("Data size invalid when parse Date");var se=new DataView(W,q,te),Se=se.getFloat64(0,!ue),He=se.getInt16(8,!ue);return Se+=He*60*1e3,{data:new Date(Se),size:8+2}}},{key:"parseValue",value:function(W,q,te){if(te<1)throw new c("Data not enough when parse Value");var se=new DataView(W,q,te),Se=1,He=se.getUint8(0),Je,xt=!1;try{switch(He){case 0:Je=se.getFloat64(1,!ue),Se+=8;break;case 1:{var Ct=se.getUint8(1);Je=!!Ct,Se+=1;break}case 2:{var it=we.parseString(W,q+1,te-1);Je=it.data,Se+=it.size;break}case 3:{Je={};var St=0;for((se.getUint32(te-4,!ue)&16777215)===9&&(St=3);Se<te-4;){var Xt=we.parseObject(W,q+Se,te-Se-St);if(Xt.objectEnd)break;Je[Xt.data.name]=Xt.data.value,Se+=Xt.size}if(Se<=te-3){var bt=se.getUint32(Se-1,!ue)&16777215;bt===9&&(Se+=3)}break}case 8:{Je={},Se+=4;var ht=0;for((se.getUint32(te-4,!ue)&16777215)===9&&(ht=3);Se<te-8;){var Jt=we.parseVariable(W,q+Se,te-Se-ht);if(Jt.objectEnd)break;Je[Jt.data.name]=Jt.data.value,Se+=Jt.size}if(Se<=te-3){var Nt=se.getUint32(Se-1,!ue)&16777215;Nt===9&&(Se+=3)}break}case 9:Je=void 0,Se=1,xt=!0;break;case 10:{Je=[];var mt=se.getUint32(1,!ue);Se+=4;for(var cn=0;cn<mt;cn++){var bn=we.parseValue(W,q+Se,te-Se);Je.push(bn.data),Se+=bn.size}break}case 11:{var sn=we.parseDate(W,q+1,te-1);Je=sn.data,Se+=sn.size;break}case 12:{var dn=we.parseString(W,q+1,te-1);Je=dn.data,Se+=dn.size;break}default:Se=te,T.w("AMF","Unsupported AMF value type "+He)}}catch(Nn){T.e("AMF",Nn.toString())}return{data:Je,size:Se,objectEnd:xt}}}]),we}(),Ue=ke,Ye=function(){function we(fe){Object(ae.a)(this,we),this.TAG="ExpGolomb",this._buffer=fe,this._buffer_index=0,this._total_bytes=fe.byteLength,this._total_bits=fe.byteLength*8,this._current_word=0,this._current_word_bits_left=0}return Object(Z.a)(we,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var W=this._total_bytes-this._buffer_index;if(W<=0)throw new c("ExpGolomb: _fillCurrentWord() but no bytes available");var q=Math.min(4,W),te=new Uint8Array(4);te.set(this._buffer.subarray(this._buffer_index,this._buffer_index+q)),this._current_word=new DataView(te.buffer).getUint32(0,!1),this._buffer_index+=q,this._current_word_bits_left=q*8}},{key:"readBits",value:function(W){if(W>32)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 te=this._current_word_bits_left?this._current_word:0;te=te>>>32-this._current_word_bits_left;var se=W-this._current_word_bits_left;this._fillCurrentWord();var Se=Math.min(se,this._current_word_bits_left),He=this._current_word>>>32-Se;return this._current_word<<=Se,this._current_word_bits_left-=Se,te=te<<Se|He,te}},{key:"readBool",value:function(){return this.readBits(1)===1}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var W;for(W=0;W<this._current_word_bits_left;W++)if((this._current_word&2147483648>>>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)}}]),we}(),ee=Ye,M=function(){function we(){Object(ae.a)(this,we)}return Object(Z.a)(we,null,[{key:"_ebsp2rbsp",value:function(W){for(var q=W,te=q.byteLength,se=new Uint8Array(te),Se=0,He=0;He<te;He++){if(He>=2&&(q[He]===3&&q[He-1]===0&&q[He-2]===0))continue;se[Se]=q[He],Se++}return new Uint8Array(se.buffer,0,Se)}},{key:"parseSPS",value:function(W){var q=we._ebsp2rbsp(W),te=new ee(q);te.readByte();var se=te.readByte();te.readByte();var Se=te.readByte();te.readUEG();var He=we.getProfileString(se),Je=we.getLevelString(Se),xt=1,Ct=420,it=[0,420,422,444],St=8;if((se===100||se===110||se===122||se===244||se===44||se===83||se===86||se===118||se===128||se===138||se===144)&&(xt=te.readUEG(),xt===3&&te.readBits(1),xt<=3&&(Ct=it[xt]),St=te.readUEG()+8,te.readUEG(),te.readBits(1),te.readBool()))for(var Xt=xt!==3?8:12,bt=0;bt<Xt;bt++)te.readBool()&&(bt<6?we._skipScalingList(te,16):we._skipScalingList(te,64));te.readUEG();var ht=te.readUEG();if(ht===0)te.readUEG();else if(ht===1){te.readBits(1),te.readSEG(),te.readSEG();for(var Jt=te.readUEG(),Nt=0;Nt<Jt;Nt++)te.readSEG()}var mt=te.readUEG();te.readBits(1);var cn=te.readUEG(),bn=te.readUEG(),sn=te.readBits(1);sn===0&&te.readBits(1),te.readBits(1);var dn=0,Nn=0,Kt=0,et=0,Ut=te.readBool();Ut&&(dn=te.readUEG(),Nn=te.readUEG(),Kt=te.readUEG(),et=te.readUEG());var Yt=1,Vt=1,En=0,sr=!0,nr=0,jn=0,cr=te.readBool();if(cr){if(te.readBool()){var qn=te.readByte(),Wr=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],_r=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];qn>0&&qn<16?(Yt=Wr[qn-1],Vt=_r[qn-1]):qn===255&&(Yt=te.readByte()<<8|te.readByte(),Vt=te.readByte()<<8|te.readByte())}if(te.readBool()&&te.readBool(),te.readBool()&&(te.readBits(4),te.readBool()&&te.readBits(24)),te.readBool()&&(te.readUEG(),te.readUEG()),te.readBool()){var Rr=te.readBits(32),Tr=te.readBits(32);sr=te.readBool(),nr=Tr,jn=Rr*2,En=nr/jn}}var Vr=1;(Yt!==1||Vt!==1)&&(Vr=Yt/Vt);var Ur=0,xi=0;if(xt===0)Ur=1,xi=2-sn;else{var kr=xt===3?1:2,Oi=xt===1?2:1;Ur=kr,xi=Oi*(2-sn)}var ri=(cn+1)*16,Xr=(2-sn)*((bn+1)*16);ri-=(dn+Nn)*Ur,Xr-=(Kt+et)*xi;var di=Math.ceil(ri*Vr);return te.destroy(),te=null,{profile_string:He,level_string:Je,bit_depth:St,ref_frames:mt,chroma_format:Ct,chroma_format_string:we.getChromaFormatString(Ct),frame_rate:{fixed:sr,fps:En,fps_den:jn,fps_num:nr},sar_ratio:{width:Yt,height:Vt},codec_size:{width:ri,height:Xr},present_size:{width:di,height:Xr}}}},{key:"_skipScalingList",value:function(W,q){for(var te=8,se=8,Se=0,He=0;He<q;He++)se!==0&&(Se=W.readSEG(),se=(te+Se+256)%256),te=se===0?te:se}},{key:"getProfileString",value:function(W){switch(W){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(W){return(W/10).toFixed(1)}},{key:"getChromaFormatString",value:function(W){switch(W){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),we}(),N=M,$={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"},V=$;function Y(we){return we>>>8&255|(we&255)<<8}function me(we){return(we&4278190080)>>>24|(we&16711680)>>>8|(we&65280)<<8|(we&255)<<24}function Re(we,fe){return we[fe]<<24|we[fe+1]<<16|we[fe+2]<<8|we[fe+3]}var rt=function(){function we(fe,W){Object(ae.a)(this,we),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=fe.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=fe.hasAudioTrack,this._hasVideo=fe.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Me,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)(we,[{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 Me}},{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 c("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var te=0,se=this._littleEndian;if(q===0)if(W.byteLength>13){var Se=we.probe(W);te=Se.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,q+te!==this._dataOffset&&T.w(this.TAG,"First time parsing but chunk byteStart invalid!");var He=new DataView(W,te),Je=He.getUint32(0,!se);Je!==0&&T.w(this.TAG,"PrevTagSize0 !== 0 !!!"),te+=4}for(;te<W.byteLength;){this._dispatch=!0;var xt=new DataView(W,te);if(te+11+4>W.byteLength)break;var Ct=xt.getUint8(0),it=xt.getUint32(0,!se)&16777215;if(te+11+it+4>W.byteLength)break;if(Ct!==8&&Ct!==9&&Ct!==18){T.w(this.TAG,"Unsupported tag type ".concat(Ct,", skipped")),te+=11+it+4;continue}var St=xt.getUint8(4),Xt=xt.getUint8(5),bt=xt.getUint8(6),ht=xt.getUint8(7),Jt=bt|Xt<<8|St<<16|ht<<24,Nt=xt.getUint32(7,!se)&16777215;Nt!==0&&T.w(this.TAG,"Meet tag which has StreamID != 0!");var mt=te+11;switch(Ct){case 8:this._parseAudioData(W,mt,it,Jt);break;case 9:this._parseVideoData(W,mt,it,Jt,q+te);break;case 18:this._parseScriptData(W,mt,it);break}var cn=xt.getUint32(11+it,!se);cn!==11+it&&T.w(this.TAG,"Invalid PrevTagSize ".concat(cn)),te+=11+it+4}return this._isInitialMetadataDispatched()&&(this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)),te}},{key:"_parseScriptData",value:function(W,q,te){var se=Ue.parseScriptData(W,q,te);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 Se=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},Se)),typeof Se.hasAudio=="boolean"&&(this._hasAudioFlagOverrided===!1&&(this._hasAudio=Se.hasAudio,this._mediaInfo.hasAudio=this._hasAudio)),typeof Se.hasVideo=="boolean"&&(this._hasVideoFlagOverrided===!1&&(this._hasVideo=Se.hasVideo,this._mediaInfo.hasVideo=this._hasVideo)),typeof Se.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=Se.audiodatarate),typeof Se.videodatarate=="number"&&(this._mediaInfo.videoDataRate=Se.videodatarate),typeof Se.width=="number"&&(this._mediaInfo.width=Se.width),typeof Se.height=="number"&&(this._mediaInfo.height=Se.height),typeof Se.duration=="number"){if(!this._durationOverrided){var He=Math.floor(Se.duration*this._timescale);this._duration=He,this._mediaInfo.duration=He}}else this._mediaInfo.duration=0;if(typeof Se.framerate=="number"){var Je=Math.floor(Se.framerate*1e3);if(Je>0){var xt=Je/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=xt,this._referenceFrameRate.fps_num=Je,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=xt}}if(typeof Se.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var Ct=Se.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Ct),Se.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=Se,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=[],te=[],se=1;se<W.times.length;se++){var Se=this._timestampBase+Math.floor(W.times[se]*1e3);q.push(Se),te.push(W.filepositions[se])}return{times:q,filepositions:te}}},{key:"_parseAudioData",value:function(W,q,te,se){if(te<=1){T.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;var Se=this._littleEndian,He=new DataView(W,q,te),Je=He.getUint8(0),xt=Je>>>4;if(xt!==2&&xt!==10){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+xt);return}var Ct=0,it=(Je&12)>>>2;if(it>=0&&it<=4)Ct=this._flvSoundRateTable[it];else{this._onError(V.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+it);return}var St=(Je&2)>>>1,Xt=Je&1,bt=this._audioMetadata,ht=this._audioTrack;if(bt||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),bt=this._audioMetadata={},bt.type="audio",bt.id=ht.id,bt.timescale=this._timescale,bt.duration=this._duration,bt.audioSampleRate=Ct,bt.channelCount=Xt===0?1:2),xt===10){var Jt=this._parseAACAudioData(W,q+1,te-1);if(Jt==null)return;if(Jt.packetType===0){bt.config&&T.w(this.TAG,"Found another AudioSpecificConfig!");var Nt=Jt.data;bt.audioSampleRate=Nt.samplingRate,bt.channelCount=Nt.channelCount,bt.codec=Nt.codec,bt.originalCodec=Nt.originalCodec,bt.config=Nt.config,bt.refSampleDuration=1024/bt.audioSampleRate*bt.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",bt);var mt=this._mediaInfo;mt.audioCodec=bt.originalCodec,mt.audioSampleRate=bt.audioSampleRate,mt.audioChannelCount=bt.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(Jt.packetType===1){var cn=this._timestampBase+se,bn={unit:Jt.data,length:Jt.data.byteLength,dts:cn,pts:cn};ht.samples.push(bn),ht.length+=Jt.data.length}else T.e(this.TAG,"Flv: Unsupported AAC data type ".concat(Jt.packetType))}else if(xt===2){if(!bt.codec){var sn=this._parseMP3AudioData(W,q+1,te-1,!0);if(sn==null)return;bt.audioSampleRate=sn.samplingRate,bt.channelCount=sn.channelCount,bt.codec=sn.codec,bt.originalCodec=sn.originalCodec,bt.refSampleDuration=1152/bt.audioSampleRate*bt.timescale,T.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",bt);var dn=this._mediaInfo;dn.audioCodec=bt.codec,dn.audioSampleRate=bt.audioSampleRate,dn.audioChannelCount=bt.channelCount,dn.audioDataRate=sn.bitRate,dn.hasVideo?dn.videoCodec!=null&&(dn.mimeType='video/x-flv; codecs="'+dn.videoCodec+","+dn.audioCodec+'"'):dn.mimeType='video/x-flv; codecs="'+dn.audioCodec+'"',dn.isComplete()&&this._onMediaInfo(dn)}var Nn=this._parseMP3AudioData(W,q+1,te-1,!1);if(Nn==null)return;var Kt=this._timestampBase+se,et={unit:Nn,length:Nn.byteLength,dts:Kt,pts:Kt};ht.samples.push(et),ht.length+=Nn.length}}},{key:"_parseAACAudioData",value:function(W,q,te){if(te<=1){T.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var se={},Se=new Uint8Array(W,q,te);return se.packetType=Se[0],Se[0]===0?se.data=this._parseAACAudioSpecificConfig(W,q+1,te-1):se.data=Se.subarray(1),se}},{key:"_parseAACAudioSpecificConfig",value:function(W,q,te){var se=new Uint8Array(W,q,te),Se=null,He=0,Je=0,xt=null,Ct=0,it=null;if(He=Je=se[0]>>>3,Ct=(se[0]&7)<<1|se[1]>>>7,Ct<0||Ct>=this._mpegSamplingRates.length){this._onError(V.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var St=this._mpegSamplingRates[Ct],Xt=(se[1]&120)>>>3;if(Xt<0||Xt>=8){this._onError(V.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}He===5&&(it=(se[1]&7)<<1|se[2]>>>7,xt=(se[2]&124)>>>2);var bt=self.navigator.userAgent.toLowerCase();return bt.indexOf("firefox")!==-1?Ct>=6?(He=5,Se=new Array(4),it=Ct-3):(He=2,Se=new Array(2),it=Ct):bt.indexOf("android")!==-1?(He=2,Se=new Array(2),it=Ct):(He=5,it=Ct,Se=new Array(4),Ct>=6?it=Ct-3:Xt===1&&(He=2,Se=new Array(2),it=Ct)),Se[0]=He<<3,Se[0]|=(Ct&15)>>>1,Se[1]=(Ct&15)<<7,Se[1]|=(Xt&15)<<3,He===5&&(Se[1]|=(it&15)>>>1,Se[2]=(it&1)<<7,Se[2]|=2<<2,Se[3]=0),{config:Se,samplingRate:St,channelCount:Xt,codec:"mp4a.40."+He,originalCodec:"mp4a.40."+Je}}},{key:"_parseMP3AudioData",value:function(W,q,te,se){if(te<4){T.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}var Se=this._littleEndian,He=new Uint8Array(W,q,te),Je=null;if(se){if(He[0]!==255)return;var xt=He[1]>>>3&3,Ct=(He[1]&6)>>1,it=(He[2]&240)>>>4,St=(He[2]&12)>>>2,Xt=He[3]>>>6&3,bt=Xt!==3?2:1,ht=0,Jt=0,Nt=34,mt="mp3";switch(xt){case 0:ht=this._mpegAudioV25SampleRateTable[St];break;case 2:ht=this._mpegAudioV20SampleRateTable[St];break;case 3:ht=this._mpegAudioV10SampleRateTable[St];break}switch(Ct){case 1:Nt=34,it<this._mpegAudioL3BitRateTable.length&&(Jt=this._mpegAudioL3BitRateTable[it]);break;case 2:Nt=33,it<this._mpegAudioL2BitRateTable.length&&(Jt=this._mpegAudioL2BitRateTable[it]);break;case 3:Nt=32,it<this._mpegAudioL1BitRateTable.length&&(Jt=this._mpegAudioL1BitRateTable[it]);break}Je={bitRate:Jt,samplingRate:ht,channelCount:bt,codec:mt,originalCodec:mt}}else Je=He;return Je}},{key:"_parseVideoData",value:function(W,q,te,se,Se){if(te<=1){T.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;var He=new Uint8Array(W,q,te)[0],Je=(He&240)>>>4,xt=He&15;if(xt!==7){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(xt));return}this._parseAVCVideoPacket(W,q+1,te-1,se,Se,Je)}},{key:"_parseAVCVideoPacket",value:function(W,q,te,se,Se,He){if(te<4){T.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var Je=this._littleEndian,xt=new DataView(W,q,te),Ct=xt.getUint8(0),it=xt.getUint32(0,!Je)&16777215,St=it<<8>>8;if(Ct===0)this._parseAVCDecoderConfigurationRecord(W,q+4,te-4);else if(Ct===1)this._parseAVCVideoData(W,q+4,te-4,se,Se,He,St);else if(!(Ct===2)){this._onError(V.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(Ct));return}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(W,q,te){if(te<7){T.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var se=this._videoMetadata,Se=this._videoTrack,He=this._littleEndian,Je=new DataView(W,q,te);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=Se.id,se.timescale=this._timescale,se.duration=this._duration);var xt=Je.getUint8(0),Ct=Je.getUint8(1),it=Je.getUint8(2),St=Je.getUint8(3);if(xt!==1||Ct===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 Xt=Je.getUint8(5)&31;if(Xt===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Xt>1&&T.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(Xt));for(var bt=6,ht=0;ht<Xt;ht++){var Jt=Je.getUint16(bt,!He);if(bt+=2,Jt===0)continue;var Nt=new Uint8Array(W,q+bt,Jt);bt+=Jt;var mt=N.parseSPS(Nt);if(ht!==0)continue;se.codecWidth=mt.codec_size.width,se.codecHeight=mt.codec_size.height,se.presentWidth=mt.present_size.width,se.presentHeight=mt.present_size.height,se.profile=mt.profile_string,se.level=mt.level_string,se.bitDepth=mt.bit_depth,se.chromaFormat=mt.chroma_format,se.sarRatio=mt.sar_ratio,se.frameRate=mt.frame_rate,(mt.frame_rate.fixed===!1||mt.frame_rate.fps_num===0||mt.frame_rate.fps_den===0)&&(se.frameRate=this._referenceFrameRate);var cn=se.frameRate.fps_den,bn=se.frameRate.fps_num;se.refSampleDuration=se.timescale*(cn/bn);for(var sn=Nt.subarray(1,4),dn="avc1.",Nn=0;Nn<3;Nn++){var Kt=sn[Nn].toString(16);Kt.length<2&&(Kt="0"+Kt),dn+=Kt}se.codec=dn;var et=this._mediaInfo;et.width=se.codecWidth,et.height=se.codecHeight,et.fps=se.frameRate.fps,et.profile=se.profile,et.level=se.level,et.refFrames=mt.ref_frames,et.chromaFormat=mt.chroma_format_string,et.sarNum=se.sarRatio.width,et.sarDen=se.sarRatio.height,et.videoCodec=dn,et.hasAudio?et.audioCodec!=null&&(et.mimeType='video/x-flv; codecs="'+et.videoCodec+","+et.audioCodec+'"'):et.mimeType='video/x-flv; codecs="'+et.videoCodec+'"',et.isComplete()&&this._onMediaInfo(et)}var Ut=Je.getUint8(bt);if(Ut===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else Ut>1&&T.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(Ut));bt++;for(var Yt=0;Yt<Ut;Yt++){var Vt=Je.getUint16(bt,!He);if(bt+=2,Vt===0)continue;bt+=Vt}se.avcc=new Uint8Array(te),se.avcc.set(new Uint8Array(W,q,te),0),T.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",se)}},{key:"_parseAVCVideoData",value:function(W,q,te,se,Se,He,Je){for(var xt=this._littleEndian,Ct=new DataView(W,q,te),it=[],St=0,Xt=0,bt=this._naluLengthSize,ht=this._timestampBase+se,Jt=He===1;Xt<te;){if(Xt+4>=te){T.w(this.TAG,"Malformed Nalu near timestamp ".concat(ht,", offset = ").concat(Xt,", dataSize = ").concat(te));break}var Nt=Ct.getUint32(Xt,!xt);if(bt===3&&(Nt>>>=8),Nt>te-bt){T.w(this.TAG,"Malformed Nalus near timestamp ".concat(ht,", NaluSize > DataSize!"));return}var mt=Ct.getUint8(Xt+bt)&31;mt===5&&(Jt=!0);var cn=new Uint8Array(W,q+Xt,bt+Nt),bn={type:mt,data:cn};it.push(bn),St+=cn.byteLength,Xt+=bt+Nt}if(it.length){var sn=this._videoTrack,dn={units:it,length:St,isKeyframe:Jt,dts:ht,cts:Je,pts:ht+Je};Jt&&(dn.fileposition=Se),sn.samples.push(dn),sn.length+=St}}}],[{key:"probe",value:function(W){var q=new Uint8Array(W),te={match:!1};if(q[0]!==70||q[1]!==76||q[2]!==86||q[3]!==1)return te;var se=(q[4]&4)>>>2!==0,Se=(q[4]&1)!==0,He=Re(q,5);return He<9?te:{match:!0,consumed:He,dataOffset:He,hasAudioTrack:se,hasVideoTrack:Se}}}]),we}(),Pe=rt,Ie=function(){function we(){Object(ae.a)(this,we)}return Object(Z.a)(we,null,[{key:"init",value:function(){we.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 we.types)we.types.hasOwnProperty(W)&&(we.types[W]=[W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2),W.charCodeAt(3)]);var q=we.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,te=null,se=Array.prototype.slice.call(arguments,1),Se=se.length,He=0;He<Se;He++)q+=se[He].byteLength;te=new Uint8Array(q),te[0]=q>>>24&255,te[1]=q>>>16&255,te[2]=q>>>8&255,te[3]=q&255,te.set(W,4);for(var Je=8,xt=0;xt<Se;xt++)te.set(se[xt],Je),Je+=se[xt].byteLength;return te}},{key:"generateInitSegment",value:function(W){var q=we.box(we.types.ftyp,we.constants.FTYP),te=we.moov(W),se=new Uint8Array(q.byteLength+te.byteLength);return se.set(q,0),se.set(te,q.byteLength),se}},{key:"moov",value:function(W){var q=we.mvhd(W.timescale,W.duration),te=we.trak(W),se=we.mvex(W);return we.box(we.types.moov,q,te,se)}},{key:"mvhd",value:function(W,q){return we.box(we.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,W>>>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 we.box(we.types.trak,we.tkhd(W),we.mdia(W))}},{key:"tkhd",value:function(W){var q=W.id,te=W.duration,se=W.presentWidth,Se=W.presentHeight;return we.box(we.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,te>>>24&255,te>>>16&255,te>>>8&255,te&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,Se>>>8&255,Se&255,0,0]))}},{key:"mdia",value:function(W){return we.box(we.types.mdia,we.mdhd(W),we.hdlr(W),we.minf(W))}},{key:"mdhd",value:function(W){var q=W.timescale,te=W.duration;return we.box(we.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,te>>>24&255,te>>>16&255,te>>>8&255,te&255,85,196,0,0]))}},{key:"hdlr",value:function(W){var q=null;return W.type==="audio"?q=we.constants.HDLR_AUDIO:q=we.constants.HDLR_VIDEO,we.box(we.types.hdlr,q)}},{key:"minf",value:function(W){var q=null;return W.type==="audio"?q=we.box(we.types.smhd,we.constants.SMHD):q=we.box(we.types.vmhd,we.constants.VMHD),we.box(we.types.minf,q,we.dinf(),we.stbl(W))}},{key:"dinf",value:function(){var W=we.box(we.types.dinf,we.box(we.types.dref,we.constants.DREF));return W}},{key:"stbl",value:function(W){var q=we.box(we.types.stbl,we.stsd(W),we.box(we.types.stts,we.constants.STTS),we.box(we.types.stsc,we.constants.STSC),we.box(we.types.stsz,we.constants.STSZ),we.box(we.types.stco,we.constants.STCO));return q}},{key:"stsd",value:function(W){return W.type==="audio"?W.codec==="mp3"?we.box(we.types.stsd,we.constants.STSD_PREFIX,we.mp3(W)):we.box(we.types.stsd,we.constants.STSD_PREFIX,we.mp4a(W)):we.box(we.types.stsd,we.constants.STSD_PREFIX,we.avc1(W))}},{key:"mp3",value:function(W){var q=W.channelCount,te=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,te>>>8&255,te&255,0,0]);return we.box(we.types[".mp3"],se)}},{key:"mp4a",value:function(W){var q=W.channelCount,te=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,te>>>8&255,te&255,0,0]);return we.box(we.types.mp4a,se,we.esds(W))}},{key:"esds",value:function(W){var q=W.config||[],te=q.length,se=new Uint8Array([0,0,0,0,3,23+te,0,1,0,4,15+te,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([te]).concat(q).concat([6,1,2]));return we.box(we.types.esds,se)}},{key:"avc1",value:function(W){var q=W.avcc,te=W.codecWidth,se=W.codecHeight,Se=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,te>>>8&255,te&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 we.box(we.types.avc1,Se,we.box(we.types.avcC,q))}},{key:"mvex",value:function(W){return we.box(we.types.mvex,we.trex(W))}},{key:"trex",value:function(W){var q=W.id,te=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 we.box(we.types.trex,te)}},{key:"moof",value:function(W,q){return we.box(we.types.moof,we.mfhd(W.sequenceNumber),we.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 we.box(we.types.mfhd,q)}},{key:"traf",value:function(W,q){var te=W.id,se=we.box(we.types.tfhd,new Uint8Array([0,0,0,0,te>>>24&255,te>>>16&255,te>>>8&255,te&255])),Se=we.box(we.types.tfdt,new Uint8Array([0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255])),He=we.sdtp(W),Je=we.trun(W,He.byteLength+16+16+8+16+8+8);return we.box(we.types.traf,se,Se,Je,He)}},{key:"sdtp",value:function(W){for(var q=W.samples||[],te=q.length,se=new Uint8Array(4+te),Se=0;Se<te;Se++){var He=q[Se].flags;se[Se+4]=He.isLeading<<6|He.dependsOn<<4|He.isDependedOn<<2|He.hasRedundancy}return we.box(we.types.sdtp,se)}},{key:"trun",value:function(W,q){var te=W.samples||[],se=te.length,Se=12+16*se,He=new Uint8Array(Se);q+=8+Se,He.set([0,0,15,1,se>>>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<se;Je++){var xt=te[Je].duration,Ct=te[Je].size,it=te[Je].flags,St=te[Je].cts;He.set([xt>>>24&255,xt>>>16&255,xt>>>8&255,xt&255,Ct>>>24&255,Ct>>>16&255,Ct>>>8&255,Ct&255,it.isLeading<<2|it.dependsOn,it.isDependedOn<<6|it.hasRedundancy<<4|it.isNonSync,0,0,St>>>24&255,St>>>16&255,St>>>8&255,St&255],12+16*Je)}return we.box(we.types.trun,He)}},{key:"mdat",value:function(W){return we.box(we.types.mdat,W)}}]),we}();Ie.init();var Xe=Ie,tt=function(){function we(){Object(ae.a)(this,we)}return Object(Z.a)(we,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}}]),we}(),Ve=tt,Ke=function we(fe,W,q,te,se){Object(ae.a)(this,we),this.dts=fe,this.pts=W,this.duration=q,this.originalDts=te,this.isSyncPoint=se,this.fileposition=null},Ne=function(){function we(){Object(ae.a)(this,we),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)(we,[{key:"appendSyncPoint",value:function(W){W.isSyncPoint=!0,this.syncPoints.push(W)}}]),we}(),De=function(){function we(){Object(ae.a)(this,we),this._list=[]}return Object(Z.a)(we,[{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[q.length-1].originalDts&&this.clear(),Array.prototype.push.apply(q,W)}},{key:"getLastSyncPointBeforeDts",value:function(W){if(this._list.length==0)return null;var q=this._list,te=0,se=q.length-1,Se=0,He=0,Je=se;for(W<q[0].dts&&(te=0,He=Je+1);He<=Je;)if(Se=He+Math.floor((Je-He)/2),Se===se||W>=q[Se].dts&&W<q[Se+1].dts){te=Se;break}else q[Se].dts<W?He=Se+1:Je=Se-1;return this._list[te]}}]),we}(),_e=function(){function we(fe){Object(ae.a)(this,we),this._type=fe,this._list=[],this._lastAppendLocation=-1}return Object(Z.a)(we,[{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}},{key:"isEmpty",value:function(){return this._list.length===0}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(W){var q=this._list;if(q.length===0)return-2;var te=q.length-1,se=0,Se=0,He=te,Je=0;if(W<q[0].originalBeginDts)return Je=-1,Je;for(;Se<=He;)if(se=Se+Math.floor((He-Se)/2),se===te||W>q[se].lastSample.originalDts&&W<q[se+1].originalBeginDts){Je=se;break}else q[se].originalBeginDts<W?Se=se+1:He=se-1;return Je}},{key:"_searchNearestSegmentAfter",value:function(W){return this._searchNearestSegmentBefore(W)+1}},{key:"append",value:function(W){var q=this._list,te=W,se=this._lastAppendLocation,Se=0;se!==-1&&se<q.length&&te.originalBeginDts>=q[se].lastSample.originalDts&&(se===q.length-1||se<q.length-1&&te.originalBeginDts<q[se+1].originalBeginDts)?Se=se+1:q.length>0&&(Se=this._searchNearestSegmentBefore(te.originalBeginDts)+1),this._lastAppendLocation=Se,this._list.splice(Se,0,te)}},{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),te=this._list[q].syncPoints;te.length===0&&q>0;)q--,te=this._list[q].syncPoints;return te.length>0?te[te.length-1]:null}}]),we}(),he=function(){function we(fe){Object(ae.a)(this,we),this.TAG="MP4Remuxer",this._config=fe,this._isLive=fe.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 _e("audio"),this._videoSegmentInfoList=new _e("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(v.chrome&&(v.version.major<50||v.version.major===50&&v.version.build<2661)),this._fillSilentAfterSeek=v.msedge||v.msie,this._mp3UseMpegAudio=!v.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(Z.a)(we,[{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 c("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 te=null,se="mp4",Se=q.codec;if(W==="audio")this._audioMeta=q,q.codec==="mp3"&&this._mp3UseMpegAudio?(se="mpeg",Se="",te=new Uint8Array):te=Xe.generateInitSegment(q);else if(W==="video")this._videoMeta=q,te=Xe.generateInitSegment(q);else return;if(!this._onInitSegment)throw new c("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(W,{type:W,data:te.buffer,codec:Se,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,te={type:"video",id:1,sequenceNumber:0,samples:[],length:0};W!=null&&(te.samples.push(W),te.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(te,!0),this._remuxAudio(se,!0)}},{key:"_remuxAudio",value:function(W,q){if(this._audioMeta==null)return;var te=W,se=te.samples,Se=void 0,He=-1,Je=-1,xt=-1,Ct=this._audioMeta.refSampleDuration,it=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,St=this._dtsBaseInited&&this._audioNextDts===void 0,Xt=!1;if(!se||se.length===0)return;if(se.length===1&&!q)return;var bt=0,ht=null,Jt=0;it?(bt=0,Jt=te.length):(bt=8,Jt=8+te.length);var Nt=null;if(se.length>1&&(Nt=se.pop(),Jt-=Nt.length),this._audioStashedLastSample!=null){var mt=this._audioStashedLastSample;this._audioStashedLastSample=null,se.unshift(mt),Jt+=mt.length}Nt!=null&&(this._audioStashedLastSample=Nt);var cn=se[0].dts-this._dtsBase;if(this._audioNextDts)Se=cn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Se=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&(this._audioMeta.originalCodec!=="mp3"&&(Xt=!0));else{var bn=this._audioSegmentInfoList.getLastSampleBefore(cn);if(bn!=null){var sn=cn-(bn.originalDts+bn.duration);sn<=3&&(sn=0);var dn=bn.dts+bn.duration+sn;Se=cn-dn}else Se=0}if(Xt){var Nn=cn-Se,Kt=this._videoSegmentInfoList.getLastSegmentBefore(cn);if(Kt!=null&&Kt.beginDts<Nn){var et=Ve.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(et){var Ut=Kt.beginDts,Yt=Nn-Kt.beginDts;T.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(Ut,", duration: ").concat(Yt)),se.unshift({unit:et,dts:Ut,pts:Ut}),Jt+=et.byteLength}}else Xt=!1}for(var Vt=[],En=0;En<se.length;En++){var sr=se[En],nr=sr.unit,jn=sr.dts-this._dtsBase,cr=jn-Se;He===-1&&(He=cr);var qn=0;if(En!==se.length-1){var Wr=se[En+1].dts-this._dtsBase-Se;qn=Wr-cr}else if(Nt!=null){var _r=Nt.dts-this._dtsBase-Se;qn=_r-cr}else Vt.length>=1?qn=Vt[Vt.length-1].duration:qn=Math.floor(Ct);var Rr=!1,Tr=null;if(qn>Ct*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!v.safari){Rr=!0;var Vr=Math.abs(qn-Ct),Ur=Math.ceil(Vr/Ct),xi=cr+Ct;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(cr+qn," ms, expected: ").concat(cr+Math.round(Ct)," ms, ")+"delta: ".concat(Math.round(Vr)," ms, generate: ").concat(Ur," frames"));var kr=Ve.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);kr==null&&(T.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),kr=nr),Tr=[];for(var Oi=0;Oi<Ur;Oi++){var ri=Math.round(xi);if(Tr.length>0){var Xr=Tr[Tr.length-1];Xr.duration=ri-Xr.dts}var di={dts:ri,pts:ri,cts:0,unit:kr,size:kr.byteLength,duration:0,originalDts:jn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Tr.push(di),Jt+=di.size,xi+=Ct}var Si=Tr[Tr.length-1];Si.duration=cr+qn-Si.dts,qn=Math.round(Ct)}Vt.push({dts:cr,pts:cr,cts:0,unit:sr.unit,size:sr.unit.byteLength,duration:qn,originalDts:jn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Rr&&Vt.push.apply(Vt,Tr)}it?ht=new Uint8Array(Jt):(ht=new Uint8Array(Jt),ht[0]=Jt>>>24&255,ht[1]=Jt>>>16&255,ht[2]=Jt>>>8&255,ht[3]=Jt&255,ht.set(Xe.types.mdat,4));for(var si=0;si<Vt.length;si++){var fi=Vt[si].unit;ht.set(fi,bt),bt+=fi.byteLength}var gr=Vt[Vt.length-1];Je=gr.dts+gr.duration,this._audioNextDts=Je;var dr=new Ne;dr.beginDts=He,dr.endDts=Je,dr.beginPts=He,dr.endPts=Je,dr.originalBeginDts=Vt[0].originalDts,dr.originalEndDts=gr.originalDts+gr.duration,dr.firstSample=new Ke(Vt[0].dts,Vt[0].pts,Vt[0].duration,Vt[0].originalDts,!1),dr.lastSample=new Ke(gr.dts,gr.pts,gr.duration,gr.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(dr),te.samples=Vt,te.sequenceNumber++;var ii=null;it?ii=new Uint8Array:ii=Xe.moof(te,He),te.samples=[],te.length=0;var li={type:"audio",data:this._mergeBoxes(ii,ht).buffer,sampleCount:Vt.length,info:dr};it&&St&&(li.timestampOffset=He),this._onMediaSegment("audio",li)}},{key:"_remuxVideo",value:function(W,q){if(this._videoMeta==null)return;var te=W,se=te.samples,Se=void 0,He=-1,Je=-1,xt=-1,Ct=-1;if(!se||se.length===0)return;if(se.length===1&&!q)return;var it=8,St=null,Xt=8+W.length,bt=null;if(se.length>1&&(bt=se.pop(),Xt-=bt.length),this._videoStashedLastSample!=null){var ht=this._videoStashedLastSample;this._videoStashedLastSample=null,se.unshift(ht),Xt+=ht.length}bt!=null&&(this._videoStashedLastSample=bt);var Jt=se[0].dts-this._dtsBase;if(this._videoNextDts)Se=Jt-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Se=0;else{var Nt=this._videoSegmentInfoList.getLastSampleBefore(Jt);if(Nt!=null){var mt=Jt-(Nt.originalDts+Nt.duration);mt<=3&&(mt=0);var cn=Nt.dts+Nt.duration+mt;Se=Jt-cn}else Se=0}for(var bn=new Ne,sn=[],dn=0;dn<se.length;dn++){var Nn=se[dn],Kt=Nn.dts-this._dtsBase,et=Nn.isKeyframe,Ut=Kt-Se,Yt=Nn.cts,Vt=Ut+Yt;He===-1&&(He=Ut,xt=Vt);var En=0;if(dn!==se.length-1){var sr=se[dn+1].dts-this._dtsBase-Se;En=sr-Ut}else if(bt!=null){var nr=bt.dts-this._dtsBase-Se;En=nr-Ut}else sn.length>=1?En=sn[sn.length-1].duration:En=Math.floor(this._videoMeta.refSampleDuration);if(et){var jn=new Ke(Ut,Vt,En,Nn.dts,!0);jn.fileposition=Nn.fileposition,bn.appendSyncPoint(jn)}sn.push({dts:Ut,pts:Vt,cts:Yt,units:Nn.units,size:Nn.length,isKeyframe:et,duration:En,originalDts:Kt,flags:{isLeading:0,dependsOn:et?2:1,isDependedOn:et?1:0,hasRedundancy:0,isNonSync:et?0:1}})}St=new Uint8Array(Xt),St[0]=Xt>>>24&255,St[1]=Xt>>>16&255,St[2]=Xt>>>8&255,St[3]=Xt&255,St.set(Xe.types.mdat,4);for(var cr=0;cr<sn.length;cr++)for(var qn=sn[cr].units;qn.length;){var Wr=qn.shift(),_r=Wr.data;St.set(_r,it),it+=_r.byteLength}var Rr=sn[sn.length-1];if(Je=Rr.dts+Rr.duration,Ct=Rr.pts+Rr.duration,this._videoNextDts=Je,bn.beginDts=He,bn.endDts=Je,bn.beginPts=xt,bn.endPts=Ct,bn.originalBeginDts=sn[0].originalDts,bn.originalEndDts=Rr.originalDts+Rr.duration,bn.firstSample=new Ke(sn[0].dts,sn[0].pts,sn[0].duration,sn[0].originalDts,sn[0].isKeyframe),bn.lastSample=new Ke(Rr.dts,Rr.pts,Rr.duration,Rr.originalDts,Rr.isKeyframe),this._isLive||this._videoSegmentInfoList.append(bn),te.samples=sn,te.sequenceNumber++,this._forceFirstIDR){var Tr=sn[0].flags;Tr.dependsOn=2,Tr.isNonSync=0}var Vr=Xe.moof(te,He);te.samples=[],te.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Vr,St).buffer,sampleCount:sn.length,info:bn})}},{key:"_mergeBoxes",value:function(W,q){var te=new Uint8Array(W.byteLength+q.byteLength);return te.set(W,0),te.set(q,W.byteLength),te}}]),we}(),ve=he,Ee={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"},be=Ee,Ge=function(){function we(fe,W){Object(ae.a)(this,we),this.TAG="TransmuxingController",this._emitter=new S.a,this._config=W,fe.segments||(fe.segments=[{duration:fe.duration,filesize:fe.filesize,url:fe.url}]),typeof fe.cors!="boolean"&&(fe.cors=!0),typeof fe.withCredentials!="boolean"&&(fe.withCredentials=!1),this._mediaDataSource=fe,this._currentSegmentIndex=0;var q=0;this._mediaDataSource.segments.forEach(function(te){te.timestampBase=q,q+=te.duration,te.cors=fe.cors,te.withCredentials=fe.withCredentials,W.referrerPolicy&&(te.referrerPolicy=W.referrerPolicy)}),!isNaN(q)&&this._mediaDataSource.duration!==q&&(this._mediaDataSource.duration=q),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return Object(Z.a)(we,[{key:"destroy",value:function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=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:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(W,q){this._currentSegmentIndex=W;var te=this._mediaDataSource.segments[W],se=this._ioctl=new B(te,this._config,W);se.onError=this._onIOException.bind(this),se.onSeeked=this._onIOSeeked.bind(this),se.onComplete=this._onIOComplete.bind(this),se.onRedirect=this._onIORedirect.bind(this),se.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),q?this._demuxer.bindDataSource(this._ioctl):se.onDataArrival=this._onInitChunkArrival.bind(this),se.open(q)}},{key:"stop",value:function(){this._internalAbort(),this._disableStatisticsReporter()}},{key:"_internalAbort",value:function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}},{key:"pause",value:function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}},{key:"resume",value:function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}},{key:"seek",value:function(W){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;var q=this._searchSegmentIndexContains(W);if(q===this._currentSegmentIndex){var te=this._mediaInfo.segments[q];if(te==null)this._pendingSeekTime=W;else{var se=te.getNearestKeyframe(W);this._remuxer.seek(se.milliseconds),this._ioctl.seek(se.fileposition),this._pendingResolveSeekPoint=se.milliseconds}}else{var Se=this._mediaInfo.segments[q];if(Se==null)this._pendingSeekTime=W,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(q);else{var He=Se.getNearestKeyframe(W);this._internalAbort(),this._remuxer.seek(W),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[q].timestampBase,this._loadSegment(q,He.fileposition),this._pendingResolveSeekPoint=He.milliseconds,this._reportSegmentMediaInfo(q)}}this._enableStatisticsReporter()}},{key:"_searchSegmentIndexContains",value:function(W){for(var q=this._mediaDataSource.segments,te=q.length-1,se=0;se<q.length;se++)if(W<q[se].timestampBase){te=se-1;break}return te}},{key:"_onInitChunkArrival",value:function(W,q){var te=this,se=null,Se=0;if(q>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,Se=this._demuxer.parseChunks(W,q);else if((se=Pe.probe(W)).match){this._demuxer=new Pe(se,this._config),this._remuxer||(this._remuxer=new ve(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),Se=this._demuxer.parseChunks(W,q)}else se=null,T.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){te._internalAbort()}),this._emitter.emit(be.DEMUX_ERROR,V.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),Se=0;return Se}},{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,Me.prototype));var te=Object.assign({},W);Object.setPrototypeOf(te,Me.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=te,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,te=q+1;te<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(te)):(this._remuxer.flushStashedSamples(),this._emitter.emit(be.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(W){var q=this._ioctl.extraData;this._mediaDataSource.segments[q].redirectedURL=W}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(be.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(W,q){T.e(this.TAG,"IOException: type = ".concat(W,", code = ").concat(q.code,", msg = ").concat(q.msg)),this._emitter.emit(be.IO_ERROR,W,q),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(W,q){T.e(this.TAG,"DemuxException: type = ".concat(W,", info = ").concat(q)),this._emitter.emit(be.DEMUX_ERROR,W,q)}},{key:"_onRemuxerInitSegmentArrival",value:function(W,q){this._emitter.emit(be.INIT_SEGMENT,W,q)}},{key:"_onRemuxerMediaSegmentArrival",value:function(W,q){if(this._pendingSeekTime!=null)return;if(this._emitter.emit(be.MEDIA_SEGMENT,W,q),this._pendingResolveSeekPoint!=null&&W==="video"){var te=q.info.syncPoints,se=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,v.safari&&te.length>0&&te[0].originalDts===se&&(se=te[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],te=Object.assign({},q);te.duration=this._mediaInfo.duration,te.segmentCount=this._mediaInfo.segmentCount,delete te.segments,delete te.keyframesIndex,this._emitter.emit(be.MEDIA_INFO,te)}},{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)}}]),we}(),qe=Ge,pt=function(fe){var W="TransmuxingWorker",q=null,te=Jt.bind(this);w.install(),fe.addEventListener("message",function(Nt){switch(Nt.data.cmd){case"init":q=new qe(Nt.data.param[0],Nt.data.param[1]),q.on(be.IO_ERROR,Xt.bind(this)),q.on(be.DEMUX_ERROR,bt.bind(this)),q.on(be.INIT_SEGMENT,se.bind(this)),q.on(be.MEDIA_SEGMENT,Se.bind(this)),q.on(be.LOADING_COMPLETE,He.bind(this)),q.on(be.RECOVERED_EARLY_EOF,Je.bind(this)),q.on(be.MEDIA_INFO,xt.bind(this)),q.on(be.METADATA_ARRIVED,Ct.bind(this)),q.on(be.SCRIPTDATA_ARRIVED,it.bind(this)),q.on(be.STATISTICS_INFO,St.bind(this)),q.on(be.RECOMMEND_SEEKPOINT,ht.bind(this));break;case"destroy":q&&(q.destroy(),q=null),fe.postMessage({msg:"destroyed"});break;case"start":q.start();break;case"stop":q.stop();break;case"seek":q.seek(Nt.data.param);break;case"pause":q.pause();break;case"resume":q.resume();break;case"logging_config":{var mt=Nt.data.param;Oe.applyConfig(mt),mt.enableCallback===!0?Oe.addLogListener(te):Oe.removeLogListener(te);break}}});function se(Nt,mt){var cn={msg:be.INIT_SEGMENT,data:{type:Nt,data:mt}};fe.postMessage(cn,[mt.data])}function Se(Nt,mt){var cn={msg:be.MEDIA_SEGMENT,data:{type:Nt,data:mt}};fe.postMessage(cn,[mt.data])}function He(){var Nt={msg:be.LOADING_COMPLETE};fe.postMessage(Nt)}function Je(){var Nt={msg:be.RECOVERED_EARLY_EOF};fe.postMessage(Nt)}function xt(Nt){var mt={msg:be.MEDIA_INFO,data:Nt};fe.postMessage(mt)}function Ct(Nt){var mt={msg:be.METADATA_ARRIVED,data:Nt};fe.postMessage(mt)}function it(Nt){var mt={msg:be.SCRIPTDATA_ARRIVED,data:Nt};fe.postMessage(mt)}function St(Nt){var mt={msg:be.STATISTICS_INFO,data:Nt};fe.postMessage(mt)}function Xt(Nt,mt){fe.postMessage({msg:be.IO_ERROR,data:{type:Nt,info:mt}})}function bt(Nt,mt){fe.postMessage({msg:be.DEMUX_ERROR,data:{type:Nt,info:mt}})}function ht(Nt){fe.postMessage({msg:be.RECOMMEND_SEEKPOINT,data:Nt})}function Jt(Nt,mt){fe.postMessage({msg:"logcat_callback",data:{type:Nt,logcat:mt}})}},Pt=pt,Rt=function(){function we(fe,W){if(Object(ae.a)(this,we),this.TAG="Transmuxer",this._emitter=new S.a,W.enableWorker&&typeof Worker!="undefined")try{var q=z("0r65");this._worker=q(Pt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[fe,W]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},Oe.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:Oe.getConfig()})}catch(se){T.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new qe(fe,W)}else this._controller=new qe(fe,W);if(this._controller){var te=this._controller;te.on(be.IO_ERROR,this._onIOError.bind(this)),te.on(be.DEMUX_ERROR,this._onDemuxError.bind(this)),te.on(be.INIT_SEGMENT,this._onInitSegment.bind(this)),te.on(be.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),te.on(be.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),te.on(be.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),te.on(be.MEDIA_INFO,this._onMediaInfo.bind(this)),te.on(be.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),te.on(be.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),te.on(be.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),te.on(be.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(Z.a)(we,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),Oe.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 te=this;Promise.resolve().then(function(){te._emitter.emit(be.INIT_SEGMENT,W,q)})}},{key:"_onMediaSegment",value:function(W,q){var te=this;Promise.resolve().then(function(){te._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 te=this;Promise.resolve().then(function(){te._emitter.emit(be.IO_ERROR,W,q)})}},{key:"_onDemuxError",value:function(W,q){var te=this;Promise.resolve().then(function(){te._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,te=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,te.type,te.data);break;case be.LOADING_COMPLETE:case be.RECOVERED_EARLY_EOF:this._emitter.emit(q.msg);break;case be.MEDIA_INFO:Object.setPrototypeOf(te,Me.prototype),this._emitter.emit(q.msg,te);break;case be.METADATA_ARRIVED:case be.SCRIPTDATA_ARRIVED:case be.STATISTICS_INFO:this._emitter.emit(q.msg,te);break;case be.IO_ERROR:case be.DEMUX_ERROR:this._emitter.emit(q.msg,te.type,te.info);break;case be.RECOMMEND_SEEKPOINT:this._emitter.emit(q.msg,te);break;case"logcat_callback":T.emitter.emit("log",te.type,te.logcat);break;default:break}}}]),we}(),Mt=Rt,wt={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},lt=wt,ft=function(){function we(fe){Object(ae.a)(this,we),this.TAG="MSEController",this._config=fe,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 De}return Object(Z.a)(we,[{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 c("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 te=this._pendingSegments[q];te.splice(0,te.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(Se){T.e(this.TAG,Se.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(Se){T.e(this.TAG,Se.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 te=W,se="".concat(te.container);te.codec&&te.codec.length>0&&(se+=";codecs=".concat(te.codec));var Se=!1;if(T.v(this.TAG,"Received Initialization Segment, mimeType: "+se),this._lastInitSegments[te.type]=te,se!==this._mimeTypes[te.type]){if(this._mimeTypes[te.type])T.v(this.TAG,"Notice: ".concat(te.type," mimeType changed, origin: ").concat(this._mimeTypes[te.type],", target: ").concat(se));else{Se=!0;try{var He=this._sourceBuffers[te.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[te.type]=se}q||this._pendingSegments[te.type].push(te),Se||this._sourceBuffers[te.type]&&!this._sourceBuffers[te.type].updating&&this._doAppendSegments(),v.safari&&te.container==="audio/mpeg"&&te.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=te.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 te=this._sourceBuffers[q.type];te&&!te.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}},{key:"seek",value:function(W){for(var q in this._sourceBuffers){if(!this._sourceBuffers[q])continue;var te=this._sourceBuffers[q];if(this._mediaSource.readyState==="open")try{te.abort()}catch(Ct){T.e(this.TAG,Ct.message)}this._idrList.clear();var se=this._pendingSegments[q];if(se.splice(0,se.length),this._mediaSource.readyState==="closed")continue;for(var Se=0;Se<te.buffered.length;Se++){var He=te.buffered.start(Se),Je=te.buffered.end(Se);this._pendingRemoveRanges[q].push({start:He,end:Je})}if(te.updating||this._doRemoveRanges(),v.safari){var xt=this._lastInitSegments[q];xt&&(this._pendingSegments[q].push(xt),te.updating||this._doAppendSegments())}}}},{key:"endOfStream",value:function(){var W=this._mediaSource,q=this._sourceBuffers;if(!W||W.readyState!=="open"){W&&W.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}q.video&&q.video.updating||q.audio&&q.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,W.endOfStream())}},{key:"getNearestKeyframe",value:function(W){return this._idrList.getLastSyncPointBeforeDts(W)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var W=this._mediaElement.currentTime;for(var q in this._sourceBuffers){var te=this._sourceBuffers[q];if(te){var se=te.buffered;if(se.length>=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 te=this._sourceBuffers[q];if(te){for(var se=te.buffered,Se=!1,He=0;He<se.length;He++){var Je=se.start(He),xt=se.end(He);if(Je<=W&&W<xt+3){if(W-Je>=this._config.autoCleanupMaxBackwardDuration){Se=!0;var Ct=W-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[q].push({start:Je,end:Ct})}}else xt<W&&(Se=!0,this._pendingRemoveRanges[q].push({start:Je,end:xt}))}Se&&!te.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var W=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open")return;if(W.video&&W.video.updating||W.audio&&W.audio.updating)return;var q=this._mediaSource.duration,te=this._pendingMediaDuration;te>0&&(isNaN(q)||te>q)&&(T.v(this.TAG,"Update MediaSource duration from ".concat(q," to ").concat(te)),this._mediaSource.duration=te),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],te=this._pendingRemoveRanges[W];te.length&&!q.updating;){var se=te.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 te=W[q].shift();if(te.timestampOffset){var se=this._sourceBuffers[q].timestampOffset,Se=te.timestampOffset/1e3,He=Math.abs(se-Se);He>.1&&(T.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(se," to ").concat(Se)),this._sourceBuffers[q].timestampOffset=Se),delete te.timestampOffset}if(!te.data||te.data.byteLength===0)continue;try{this._sourceBuffers[q].appendBuffer(te.data),this._isBufferFull=!1,q==="video"&&te.hasOwnProperty("info")&&this._idrList.appendArray(te.info.syncPoints)}catch(Je){this._pendingSegments[q].unshift(te),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))}}]),we}(),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},ct=function(){function we(fe,W){if(Object(ae.a)(this,we),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new S.a,this._config=ie(),typeof W=="object"&&Object.assign(this._config,W),fe.type.toLowerCase()!=="flv")throw new s("FlvPlayer requires an flv MediaDataSource input!");fe.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=fe,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=v.chrome&&(v.version.major<50||v.version.major===50&&v.version.build<2661);this._alwaysSeekKeyframe=!!(q||v.msedge||v.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(Z.a)(we,[{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 te=this;W===Ae.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){te._emitter.emit(Ae.MEDIA_INFO,te.mediaInfo)}):W===Ae.STATISTICS_INFO&&(this._statisticsInfo!=null&&Promise.resolve().then(function(){te._emitter.emit(Ae.STATISTICS_INFO,te.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(te){q._emitter.emit(Ae.ERROR,Te.MEDIA_ERROR,je.MEDIA_MSE_ERROR,te)}),this._msectl.attachMediaElement(W),this._pendingSeekTime!=null)try{W.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(te){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var W=this;if(!this._mediaElement)throw new c("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new c("FlvPlayer.load() has been called, please call unload() first!");if(this._hasPendingLoad)return;if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Mt(this._mediaDataSource,this._config),this._transmuxer.on(be.INIT_SEGMENT,function(q,te){W._msectl.appendInitSegment(te)}),this._transmuxer.on(be.MEDIA_SEGMENT,function(q,te){if(W._msectl.appendMediaSegment(te),W._config.lazyLoad&&!W._config.isLive){var se=W._mediaElement.currentTime;te.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(Ae.LOADING_COMPLETE)}),this._transmuxer.on(be.RECOVERED_EARLY_EOF,function(){W._emitter.emit(Ae.RECOVERED_EARLY_EOF)}),this._transmuxer.on(be.IO_ERROR,function(q,te){W._emitter.emit(Ae.ERROR,Te.NETWORK_ERROR,q,te)}),this._transmuxer.on(be.DEMUX_ERROR,function(q,te){W._emitter.emit(Ae.ERROR,Te.MEDIA_ERROR,q,{code:-1,msg:te})}),this._transmuxer.on(be.MEDIA_INFO,function(q){W._mediaInfo=q,W._emitter.emit(Ae.MEDIA_INFO,Object.assign({},q))}),this._transmuxer.on(be.METADATA_ARRIVED,function(q){W._emitter.emit(Ae.METADATA_ARRIVED,q)}),this._transmuxer.on(be.SCRIPTDATA_ARRIVED,function(q){W._emitter.emit(Ae.SCRIPTDATA_ARRIVED,q)}),this._transmuxer.on(be.STATISTICS_INFO,function(q){W._statisticsInfo=W._fillStatisticsInfo(q),W._emitter.emit(Ae.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,te=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var Se=this._mediaElement.getVideoPlaybackQuality();te=Se.totalVideoFrames,se=Se.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(te=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):q=!1;return q&&(W.decodedFrames=te,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,te=0,se=0,Se=0;Se<W.length;Se++){var He=W.start(Se),Je=W.end(Se);if(He<=q&&q<Je){te=He,se=Je;break}}se>=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,te=!1,se=0;se<q.length;se++){var Se=q.start(se),He=q.end(se);if(W>=Se&&W<He){W>=He-this._config.lazyLoadRecoverDuration&&(te=!0);break}}te&&(window.clearInterval(this._progressChecker),this._progressChecker=null,te&&(T.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(W){for(var q=this._mediaElement.buffered,te=0;te<q.length;te++){var se=q.start(te),Se=q.end(te);if(W>=se&&W<Se)return!0}return!1}},{key:"_internalSeek",value:function(W){var q=this._isTimepointBuffered(W),te=!1,se=0;if(W<1&&this._mediaElement.buffered.length>0){var Se=this._mediaElement.buffered.start(0);(Se<1&&W<Se||v.safari)&&(te=!0,se=v.safari?.1:Se)}if(te)this._requestSetTime=!0,this._mediaElement.currentTime=se;else if(q){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=W;else{var He=this._msectl.getNearestKeyframe(Math.floor(W*1e3));this._requestSetTime=!0,He!=null?this._mediaElement.currentTime=He.dts/1e3:this._mediaElement.currentTime=W}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(W),this._transmuxer.seek(Math.floor(W*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=W)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var W=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(W)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(W),this._transmuxer.seek(Math.floor(W*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=W))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(W){var q=this._mediaElement;if(W||!this._receivedCanPlay||q.readyState<2){var te=q.buffered;te.length>0&&q.currentTime<te.start(0)&&(T.w(this.TAG,"Playback seems stuck at ".concat(q.currentTime,", seek to ").concat(te.start(0))),this._requestSetTime=!0,this._mediaElement.currentTime=te.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(W){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(W){var q=this._mediaElement.currentTime,te=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(q<1&&te.length>0){var se=te.start(0);if(se<1&&q<se||v.safari){this._requestSetTime=!0,this._mediaElement.currentTime=v.safari?.1:se;return}}if(this._isTimepointBuffered(q)){if(this._alwaysSeekKeyframe){var Se=this._msectl.getNearestKeyframe(Math.floor(q*1e3));Se!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=Se.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:q,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_onvCanPlay",value:function(W){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(W){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(W){this._checkAndResumeStuckPlayback()}}]),we}(),Ze=ct,Tt=function(){function we(fe,W){if(Object(ae.a)(this,we),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new S.a,this._config=ie(),typeof W=="object"&&Object.assign(this._config,W),fe.type.toLowerCase()==="flv")throw new s("NativePlayer does't support flv MediaDataSource input!");if(fe.hasOwnProperty("segments"))throw new s("NativePlayer(".concat(fe.type,") doesn't support multipart playback!"));this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=fe,this._mediaElement=null}return Object(Z.a)(we,[{key:"destroy",value:function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,q){var te=this;W===Ae.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){te._emitter.emit(Ae.MEDIA_INFO,te.mediaInfo)}):W===Ae.STATISTICS_INFO&&(this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){te._emitter.emit(Ae.STATISTICS_INFO,te.statisticsInfo)})),this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,q)}},{key:"attachMediaElement",value:function(W){if(this._mediaElement=W,W.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{W.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(q){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new c("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(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,te=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var Se=this._mediaElement.getVideoPlaybackQuality();te=Se.totalVideoFrames,se=Se.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(te=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):q=!1;return q&&(W.decodedFrames=te,W.droppedFrames=se),W}},{key:"_onvLoadedMetadata",value:function(W){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Ae.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(Ae.STATISTICS_INFO,this.statisticsInfo)}}]),we}(),Ot=Tt;w.install();function st(we,fe){var W=we;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,fe);default:return new Ot(W,fe)}}function gt(){return xe.supportMSEH264Playback()}function kt(){return xe.getFeatureList()}var Wt={};Wt.createPlayer=st,Wt.isSupported=gt,Wt.getFeatureList=kt,Wt.BaseLoader=t,Wt.LoaderStatus=i,Wt.LoaderErrors=n,Wt.Events=Ae,Wt.ErrorTypes=Te,Wt.ErrorDetails=je,Wt.FlvPlayer=Ze,Wt.NativePlayer=Ot,Wt.LoggingControl=Oe,Object.defineProperty(Wt,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Qt=We.a=Wt},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),C=Object.keys(Z);if(S.length!==C.length)return!1;for(var T=Object.prototype.hasOwnProperty.bind(Z),l=0;l<S.length;l++){var p=S[l];if(!T(p))return!1;var h=ae[p],d=Z[p];if(P=U?U.call(w,h,d,p):void 0,P===!1||P===void 0&&h!==d)return!1}return!0}},HmJG:function($e,We,z){},Hw79:function($e,We,z){$e.exports={pagination:"pagination___2VQzP",info:"info___1saw2"}},I8Z2:function($e,We,z){"use strict";z.d(We,"a",function(){return w}),z.d(We,"b",function(){return o}),z.d(We,"c",function(){return s});var ae=z("q1tI"),Z=function(){var f=function(i,n){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,u){t.__proto__=u}||function(t,u){for(var y in u)u.hasOwnProperty(y)&&(t[y]=u[y])},f(i,n)};return function(i,n){f(i,n);function t(){this.constructor=i}i.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}(),U=ae.createContext(null),w=function(f){Z(i,f);function i(){return f!==null&&f.apply(this,arguments)||this}return i.prototype.render=function(){return ae.createElement(U.Provider,{value:this.props.store},this.props.children)},i}(ae.Component),P=z("Gytx"),S=z.n(P),C=z("2mql"),T=z.n(C),l=function(){var f=function(i,n){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,u){t.__proto__=u}||function(t,u){for(var y in u)u.hasOwnProperty(y)&&(t[y]=u[y])},f(i,n)};return function(i,n){f(i,n);function t(){this.constructor=i}i.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}(),p=function(){return p=Object.assign||function(f){for(var i,n=1,t=arguments.length;n<t;n++){i=arguments[n];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(f[u]=i[u])}return f},p.apply(this,arguments)};function h(f){return f.displayName||f.name||"Component"}var d=function(){return{}};function o(f,i){i===void 0&&(i={});var n=!!f,t=f||d;return function(y){var g=function(b){l(v,b);function v(m,E){var a=b.call(this,m,E)||this;return a.unsubscribe=null,a.handleChange=function(){if(!a.unsubscribe)return;var x=t(a.store.getState(),a.props);a.setState({subscribed:x})},a.store=a.context,a.state={subscribed:t(a.store.getState(),m),store:a.store,props:m},a}return v.getDerivedStateFromProps=function(m,E){return f&&f.length===2&&m!==E.props?{subscribed:t(E.store.getState(),m),props:m}:{props:m}},v.prototype.componentDidMount=function(){this.trySubscribe()},v.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},v.prototype.shouldComponentUpdate=function(m,E){return!S()(this.props,m)||!S()(this.state.subscribed,E.subscribed)},v.prototype.trySubscribe=function(){n&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},v.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},v.prototype.render=function(){var m=p(p(p({},this.props),this.state.subscribed),{store:this.store});return ae.createElement(y,p({},m,{ref:this.props.miniStoreForwardedRef}))},v.displayName="Connect("+h(y)+")",v.contextType=U,v}(ae.Component);if(i.forwardRef){var _=ae.forwardRef(function(b,v){return ae.createElement(g,p({},b,{miniStoreForwardedRef:v}))});return T()(_,y)}return T()(g,y)}}var c=function(){return c=Object.assign||function(f){for(var i,n=1,t=arguments.length;n<t;n++){i=arguments[n];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(f[u]=i[u])}return f},c.apply(this,arguments)};function s(f){var i=f,n=[];function t(g){i=c(c({},i),g);for(var _=0;_<n.length;_++)n[_]()}function u(){return i}function y(g){return n.push(g),function(){var b=n.indexOf(g);n.splice(b,1)}}return{setState:t,getState:u,subscribe:y}}},IBYe:function($e,We,z){"use strict";function ae(Z){return null}We.a=ae},IxHN:function($e,We,z){"use strict";var ae=z("q1tI"),Z=z.n(ae),U=z("07cG"),w=z.n(U);We.a=function(P){var S=P.message,C=P.className,T=P.children,l=P.style,p=l===void 0?{}:l;return Z.a.createElement("div",{className:"".concat(w.a.idsRingWrapper," ").concat(C)},Z.a.createElement("div",{className:w.a.ldsRing},Z.a.createElement("div",null),Z.a.createElement("div",null),Z.a.createElement("div",null),Z.a.createElement("div",null)),S?Z.a.createElement("p",{style:p},S):null,T)}},J66h:function($e,We,z){(function(ae){var Z,U;(function(w,P){$e.exports=P(w)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ae!="undefined"?ae:this,function(w){"use strict";w=w||{};var P=w.Base64,S="2.6.4",C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=function(D){for(var I={},F=0,K=D.length;F<K;F++)I[D.charAt(F)]=F;return I}(C),l=String.fromCharCode,p=function(D){if(D.length<2){var I=D.charCodeAt(0);return I<128?D:I<2048?l(192|I>>>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)},o=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),K=[C.charAt(F>>>18),C.charAt(F>>>12&63),I>=2?"=":C.charAt(F>>>6&63),I>=1?"=":C.charAt(F&63)];return K.join("")},c=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,o)},s=function(D){return c(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="",K=0,ne=D.length;K<ne;K+=3){var j=D[K],G=D[K+1],X=D[K+2],J=j<<16|G<<8|X;F+=C.charAt(J>>>18)+C.charAt(J>>>12&63)+(typeof G!="undefined"?C.charAt(J>>>6&63):"=")+(typeof X!="undefined"?C.charAt(J&63):"=")}return I?f(F):F});var u=/[\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))}},g=function(D){return D.replace(u,y)},_=function(D){var I=D.length,F=I%4,K=(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),ne=[l(K>>>16),l(K>>>8&255),l(K&255)];return ne.length-=[0,0,2,1][F],ne.join("")},b=w.atob&&typeof w.atob=="function"?function(D){return w.atob(D)}:function(D){return D.replace(/\S{1,4}/g,_)},v=function(D){return b(String(D).replace(/[^A-Za-z0-9\+\/]/g,""))},m=function(D){return g(b(D))},E=function(D){return String(D).replace(/[-_]/g,function(I){return I=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},a=function(D){return m(E(D))},x;w.Uint8Array&&(x=function(D){return Uint8Array.from(v(E(D)),function(I){return I.charCodeAt(0)})});var O=function(){var D=w.Base64;return w.Base64=P,D};if(w.Base64={VERSION:S,atob:v,btoa:c,fromBase64:a,toBase64:i,utob:d,encode:i,encodeURI:n,btou:g,decode:a,noConflict:O,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 a(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 u}),z.d(We,"a",function(){return g});var ae=z("1OyB"),Z=z("vuIU"),U=z("Ji7U"),w=z("LK+K"),P=z("q1tI"),S=z("rePB"),C=z("Ff2n"),T=z("ODXe"),l=z("4IlW"),p=z("bX4T"),h=z("YrtM"),d=z("TSYQ"),o=z.n(d),c=z("+nKL"),s=z("8OUc"),f=function(X,J){var B=X.prefixCls,Q=X.id,ie=X.flattenOptions,oe=X.childrenAsData,xe=X.values,ye=X.searchValue,Ae=X.multiple,pe=X.defaultActiveFirstOption,Oe=X.height,Fe=X.itemHeight,Me=X.notFoundContent,Ce=X.open,Le=X.menuItemSelectedIcon,de=X.virtual,ue=X.onSelect,ke=X.onToggleOpen,Ue=X.onActiveValue,Ye=X.onScroll,ee=X.onMouseEnter,M="".concat(B,"-item"),N=Object(h.a)(function(){return ie},[Ce,ie],function(Ke,Ne){return Ne[0]&&Ke[1]!==Ne[1]}),$=P.useRef(null),V=function(Ne){Ne.preventDefault()},Y=function(Ne){$.current&&$.current.scrollTo({index:Ne})},me=function(Ne){for(var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,_e=N.length,he=0;he<_e;he+=1){var ve=(Ne+he*De+_e)%_e,Ee=N[ve],be=Ee.group,Ge=Ee.data;if(!be&&!Ge.disabled)return ve}return-1},Re=P.useState(function(){return me(0)}),rt=Object(T.a)(Re,2),Pe=rt[0],Ie=rt[1],Xe=function(Ne){Ie(Ne);var De=N[Ne];if(!De){Ue(null,-1);return}Ue(De.data.value,Ne)};P.useEffect(function(){Xe(pe!==!1?me(0):-1)},[N.length,ye]),P.useEffect(function(){var Ke=setTimeout(function(){if(!Ae&&Ce&&xe.size===1){var Ne=Array.from(xe)[0],De=N.findIndex(function(_e){var he=_e.data;return he.value===Ne});Xe(De),Y(De)}});return function(){return clearTimeout(Ke)}},[Ce]);var tt=function(Ne){Ne!==void 0&&ue(Ne,{selected:!xe.has(Ne)}),Ae||ke(!1)};if(P.useImperativeHandle(J,function(){return{onKeyDown:function(Ne){var De=Ne.which;switch(De){case l.a.UP:case l.a.DOWN:{var _e=0;if(De===l.a.UP?_e=-1:De===l.a.DOWN&&(_e=1),_e!==0){var he=me(Pe+_e,_e);Y(he),Xe(he)}break}case l.a.ENTER:{var ve=N[Pe];ve&&!ve.data.disabled?tt(ve.data.value):tt(void 0),Ce&&Ne.preventDefault();break}case l.a.ESC:ke(!1)}},onKeyUp:function(){},scrollTo:function(Ne){Y(Ne)}}}),N.length===0)return P.createElement("div",{role:"listbox",id:"".concat(Q,"_list"),className:"".concat(M,"-empty"),onMouseDown:V},Me);function Ve(Ke){var Ne=N[Ke];if(!Ne)return null;var De=Ne.data||{},_e=De.value,he=De.label,ve=De.children,Ee=Object(p.a)(De,!0),be=oe?ve:he;return Ne?P.createElement("div",Object.assign({"aria-label":typeof be=="string"?be:null},Ee,{key:Ke,role:"option",id:"".concat(Q,"_list_").concat(Ke),"aria-selected":xe.has(_e)}),_e):null}return P.createElement(P.Fragment,null,P.createElement("div",{role:"listbox",id:"".concat(Q,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ve(Pe-1),Ve(Pe),Ve(Pe+1)),P.createElement(c.a,{itemKey:"key",ref:$,data:N,height:Oe,itemHeight:Fe,fullHeight:!1,onMouseDown:V,onScroll:Ye,virtual:de,onMouseEnter:ee},function(Ke,Ne){var De,_e=Ke.group,he=Ke.groupOption,ve=Ke.data,Ee=ve.label,be=ve.key;if(_e)return P.createElement("div",{className:o()(M,"".concat(M,"-group"))},Ee!==void 0?Ee:be);var Ge=ve.disabled,qe=ve.value,pt=ve.title,Pt=ve.children,Rt=ve.style,Mt=ve.className,wt=Object(C.a)(ve,["disabled","value","title","children","style","className"]),lt=xe.has(qe),ft="".concat(M,"-option"),Qe=o()(M,ft,Mt,(De={},Object(S.a)(De,"".concat(ft,"-grouped"),he),Object(S.a)(De,"".concat(ft,"-active"),Pe===Ne&&!Ge),Object(S.a)(De,"".concat(ft,"-disabled"),Ge),Object(S.a)(De,"".concat(ft,"-selected"),lt),De)),Te=oe?Pt:Ee,je=!Le||typeof Le=="function"||lt;return P.createElement("div",Object.assign({},wt,{"aria-selected":lt,className:Qe,title:pt,onMouseMove:function(){if(Pe===Ne||Ge)return;Xe(Ne)},onClick:function(){Ge||tt(qe)},style:Rt}),P.createElement("div",{className:"".concat(ft,"-content")},Te||qe),P.isValidElement(Le)||lt,je&&P.createElement(s.a,{className:"".concat(M,"-option-state"),customizeIcon:Le,customizeIconProps:{isSelected:lt}},lt?"\u2713":null))}))},i=P.forwardRef(f);i.displayName="OptionList";var n=i,t=function(){return null};t.isSelectOption=!0;var u=t,y=function(){return null};y.isSelectOptGroup=!0;var g=y,_=z("VTBJ"),b=z("Zm9Q");function v(G){var X=G.key,J=G.props,B=J.children,Q=J.value,ie=Object(C.a)(J,["children","value"]);return Object(_.a)({key:X,value:Q!==void 0?Q:X,children:B},ie)}function m(G){var X=arguments.length>1&&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,xe=oe.children,ye=Object(C.a)(oe,["children"]);return X||!Q?v(J):Object(_.a)(Object(_.a)({key:"__RC_SELECT_GRP__".concat(ie===null?B:ie,"__"),label:ie},ye),{},{options:m(xe)})}).filter(function(J){return J})}var E=z("2Qr1"),a=z("qNPg"),x=z("U8pU"),O=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,xe=G.getInputElement,ye=G.showSearch,Ae=G.onSearch,pe=G.defaultOpen,Oe=G.autoFocus,Fe=G.labelInValue,Me=G.value,Ce=G.inputValue,Le=G.optionLabelProp,de=X==="multiple"||X==="tags",ue=ye!==void 0?ye:de||X==="combobox",ke=J||m(B);if(Object(O.a)(X!=="tags"||ke.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=ke.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(O.a)(!Ue,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(O.a)(X!=="combobox"||!Le,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(O.a)(X==="combobox"||!Q,"`backfill` only works with `combobox` mode."),Object(O.a)(X==="combobox"||!xe,"`getInputElement` only work with `combobox` mode."),Object(O.b)(X!=="combobox"||!xe||!ie||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ae&&!ue&&X!=="combobox"&&X!=="tags"&&Object(O.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(O.b)(!pe||Oe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Me!=null){var Ye=Object(A.d)(Me);Object(O.a)(!Fe||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(O.a)(!de||Array.isArray(Me),"`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(O.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ee.displayName||ee.name||ee,"`.")),Object(O.a)(Ce===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var I=D,F=Object(a.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:m,flattenOptions:E.d,getLabeledValue:E.e,filterOptions:E.b,isValueDisabled:E.g,findValueOption:E.c,warningProps:I,fillOptionsWithMissingValue:E.a}),K=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);K.Option=u,K.OptGroup=g;var ne=K,j=We.c=ne},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),C=z("i8i4"),T=z.n(C),l=function(p){Object(U.a)(d,p);var h=Object(w.a)(d);function d(o){var c;Object(ae.a)(this,d),c=h.call(this,o);var s=window.document;return c.node=s.createElement("div"),s.body.appendChild(c.node),c}return Object(Z.a)(d,[{key:"render",value:function(){var c=this.props.children;return Object(C.createPortal)(c,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=C(),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:o,isList:c,isFunction:s,isObject:f,Global:P};function S(){return Object.assign?Object.assign:function(n,t,u,y){for(var g=1;g<arguments.length;g++)h(Object(arguments[g]),function(_,b){n[b]=_});return n}}function C(){if(Object.create)return function(t,u,y,g){var _=p(arguments,1);return Z.apply(this,[Object.create(t)].concat(_))};{function i(){}return function(t,u,y,g){var _=p(arguments,1);return i.prototype=t,Z.apply(this,[new i].concat(_))}}}function T(){return String.prototype.trim?function(n){return String.prototype.trim.call(n)}:function(n){return n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function l(i,n){return function(){return n.apply(i,Array.prototype.slice.call(arguments,0))}}function p(i,n){return Array.prototype.slice.call(i,n||0)}function h(i,n){o(i,function(t,u){return n(t,u),!1})}function d(i,n){var t=c(i)?[]:{};return o(i,function(u,y){return t[y]=n(u,y),!1}),t}function o(i,n){if(c(i)){for(var t=0;t<i.length;t++)if(n(i[t],t))return i[t]}else for(var u in i)if(i.hasOwnProperty(u)&&n(i[u],u))return i[u]}function c(i){return i!=null&&typeof i!="function"&&typeof i.length=="number"}function s(i){return i&&{}.toString.call(i)==="[object Function]"}function f(i){return i&&{}.toString.call(i)==="[object Object]"}}).call(this,z("IyRk"))},MVJL:function($e,We,z){$e.exports={flex_box_center:"flex_box_center___2gBaY",flex_space_between:"flex_space_between___2uD--",flex_box_vertical_center:"flex_box_vertical_center___3Bq-4",flex_box_center_end:"flex_box_center_end___2MOXm",flex_box_column:"flex_box_column___1Sq4x",discussItem:"discussItem___Mk503",wrap:"wrap___VPGVq",list:"list___2zNHf",btns:"btns___1hoB3",secondLevelDiscuss:"secondLevelDiscuss___9Ixoa",line:"line___20Ukm",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___3ZS-s"}},MXfU:function($e,We){$e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFsAAABKCAYAAADUvCinAAAAAXNSR0IArs4c6QAAFq9JREFUeAHdnAl4VFWWx6sqlYWEkIRsJCRkJQECCXsIS0gAWWwQl1YQxQ2nRx0/u9We8etvpmf87LFt7XHs7mmXbhVEFESQdWRfwiKGXRYhkI0sQAIBAmQnqZrfKfMyZVGVqldLjL7vu9997757zz33/84995xzb5VG8xO/Fi1aNPTDDz/M7w7D1HcHJjzFAyCPNxgMi/V6/YOe6kMNXZ2ayj+mugsXLhSAFxqNxtmPPvroge7A+09Osj///HOvmzdvvoZET/D19Z04f/78i90BaOHhJwU20hx748aNZVqt9kR0dHTOnXfe2dxdgBY+tN2JGVd4QT8/gsp4GRovPfnkkytcoeWptj96ycbaiEdl/BWgEWjt+AULFlzwFFiu0v3RSvaGDRt8L168+CIALNDpdL99/PHHl7oKhqfbe3m6A3fTR4J1/fr1m88iuBxJPs8iOBdr45C7+/EEvR+NZIuVUVdX9wBg/wYgTnp7e//rI488UuoqKCyqv4FmK+rnj67Sste+2+vsjz/+OODWrVsiyb9iMIcAZh4L4El7A3PkPUA/Db2ZERERdzhS39U63RbsDz74YDBq4qmWlpZZ5GtIdz7xxBMlrg5YaY/18iuAnhsYGDht1qxZDUq5J/NuBTZSnIAUzwGEOYB7i/R3pO5f3AkGtHVI9BuAmkG644EHHrjpSYDNaf+gOvvQoUPe33zzTRYMTSVNB1xf0mfo4+V4fkXmjMr9p59+GtLU1CSSPpzHvcQ8NqK36y3r2Xpub7+M92UZGRnPjhw58patup4o71KwkahwgBqFXTyawUgS6RI9vBngNj/22GPFloNkukfTZjZ17iXl8L5jNlLexPMW8lU9e/Zcj5RetWyvPKOWsrl/HzPxTdTR35XyrszdBjZAaD/66KMgBh4KmGGkKAaSzHN/yXkv96IbD5If8PLyOpCWlnbUmnQtWbIkGV19jwBM3Uyh7efnp+nfv3/lmTNnYnx8fE7OnDkzrKioSFdYWBhx/fp1wayVurvIV/Ph1mAOnpfC9evX+1+6dOkVaEzmcb67FlehrfZyC9hI3wEG04/B1sLAFVINqYrnYsoLJfXq1asYyWu0xaDEndva2u6hjYA8ROohrW0pKSmlgCz3iRTpli1bpgHMvPvvvz9H6siFaqkuKSlp40NEX716VQMNI8US6dsCrQd5/gS18XtrH1bad9XlFrCdYRYQdIsXL84CYFEP90AjQegEBQU1p6amliYnJ/v06NFDyr7HozWwpZ1yNTc31+zZs6e1rKysj1IG2CfpYxWzaTWe5jdKeVfn3xuIpzuXBfH48eOTUDEC7t2kSOkzJCSkftCgQaXx8fGBqIs4KbN1dQK2ob6+fu+uXbt8/f39/bKysvwANxzQa8+ePdv3woULvkIT4M+RrSKtRnfv49nAfZdcHge73SmZzmhEPcwkD5KRhYeHXwPgsri4uFCsj1gpc+SyAnbNlStXjiDN0aGhoY1jxowJhN4AS1rMoNrz58/XnD59Ooo8AF6kSjVgr2XRXB0QELADNddi2c6dzw6DjbvcE3f5CZiMcZQB6qYwmKnkPaRNnz59qgcPHnw+JiYmCqmTBVT1JWADzm5sb92xY8dakdhE9HFlQkJCDDT7OUKQmXWTINbFgoKCyPLy8iCepZmssl8K8GpNSkf6lDoOgd2++5EPaCMdJWwirtVq+vbtW4bVcZlgfj8GEqGmvVndNgApQIIvbdy4MRcpbQLgIwMHDgxAr6dTz6FxmNHruIVuw+XLl8sBPrS0tDQc2qJqHDYpOwg5cOMQk1gKQ2DiuAP0hFFNfHz8WQCuxfsTc6+3I+3M6rTwUauwMCqR2pvo3J7V1dVxYWFhtUT7bh44cCAL0y9vzpw5OWZt3HXbxAc9h6rpiXUTgzcrdMWk3E2+ytykdKZDh8BeunRpWENDQyUdmBYZy45goo1pfAqAG9Gbqbw36WXLepbPqKV8pnH9tWvXfGtrawNZ4EKpo8dMvI5OvwS4BhbPSOgnS7m0b1cjngJbulCuFvgqYXH1wZ5P4OODucmkFOBnESVU7eZ3eGNKD9byefPm1SDdTzDl3kTqOkwqpS7T+Tg2bChqwmQfK+X2cnSsP/pbg5kni1oogxE1Izv+0od8tB/y8uFDJ2LjF7KveQ2h6M3YRTgnwufL5LJxoepySLLNKQL6HUjdFlb9OhhYcuTIEYlrJEkdQD82YsQIPwL6HgOqKyQbW73s1KlTLaRkkWjWhSYW9pPY/z2J5YSfPHkyCEEZjs1+whwbe/cOSbZCZOfOnfri4uK3ANqIuuhJenrYsGHHmGpvfvXVV+PQdWNIGqZ/0dixY+sxpyT28aO4mLXXEZ4LgBmP3o4DTJlxZ4YMGdKEozWIQZiMg9GjR9eBgZ6P8A6Snt2uWhwaoyqwWTR+ifucBsjmxDMok3QWa+rVzZs3D4bpWSQd9arHjx9/nsVNLAZVfZl34MH7Ntz7khMnTgQztnAAD8J6quIIRAFmqizut81QynpOnDjxwqZNm8Yzyx+Bt8WO8uewGpHoGwtVATEJMbdEr9q6ylnsFhEAimY1f5iv34MAfR0e3Rn080CY9bfV0JFyd6gRpPIicZTmb7/9Nr6xsVE82Ib09PRiFvkIJNrk1drjBaFqxjm6gceb+tBDD12zV1/eq5G2/4KhQIC2R7dfcHDwfxCPrmZQb6xdu1aP1fGLLVu2jICxVnT6MWZBLIupWpPQXr+dvkdq6wHnIo5QLKZkFOMw4sEWooe9uY+nsarFPTc3tx4rLZyP9Sptn+m08/aXDkk20yUHoHYi1Qa+fGdSba3Pawz07TVr1lxB4p9C0lNFH/LhCnBMenEfba2RrTKVkm0k/FpGPCYIPRsiNJOSkqro+wZ6WBZ1l04XMDOu5ufnBzNbMzEF7e7w6wnoxwLAW6ShdG4VSMAKY2EwOgG0jC8EKf63e++9t47799B1ryFhC44ePTqBJDHqCmi38jETpLI7Lon8EecWNdGXWRWP+qqbOnXqWfRwDLyIWXmb+epMv8yMXqgjHUL0LvhlAnqnQS09lZaQJnbWGQucJjEx0RS56ayenXc9ef/r6dOnN5Mv3Ldv35u4yPNwGO4DGC8AuYKVcwWJS7FDx+prxtCEx1mNFEeTh/Xu3bsNS6kUvoNYa0RlOUXXamfthYCrnzRpUs0XX3wxEqH9BcXvdVqfhe8GjAZ2Vmn27NmtAK5Gv3dGTnnXys1SzMaP9+7dexf3C+AjAAumAdDLxRqg7LY+LdUIDscF7N5APpo4Rhp0cBX2vgE9rEo9KUw5kyM4TZi8jcyaVMK2l23R8AJIUR9ptiogGRrccKvqxVYbB8uFZgbgPowEViLZv0TCCwkLZJAlAJ4RwIpYbP2RIG+FJsBqiNMgrPqmvLy8AMy2QKyJlnHjxl1CHQVGRUUJ6J0Kj0LLXTlBtlvM0sDW1tbwdevWrbVFV9seb36BCsOQLHNQk9HRaRLjJRjvY4uAm8s3wvDr7EEmsk6IO5xG0EmDBSNbY8FE5xq3bt0aLZE57OE2hOAiuWwi+7qZD9Xk8Ctqt23bJnuw/wSOVQoB7o0IxgnZzLZqjbR7it8MHTp0EAO1Wkch5qF8N3RfRQ+KtfAi/E5W+snMzKwaMGCAPwPopZR1lxzb21hZWWkNLwMf4SlzSe7gGW/qOaZwGmCLXv0hrmw63Yz+ex6TagqMfqEwwWzb1h2BFv4Ixl1Q+LTIdQjM726zM1ErEUzhVXh8OhbFDl1p0birHlcTnziJ2niXDk28Ijn9MbkE8P5dxYSdflrh70vi7Kzze+OpG2yjfu1tqz0No/kKAcQMdLjbrSw2t9WxQczdxWKzvs35kefgR1kzqrmPxNTqQ9i3gvcO7126mznolYHRpu3bt4diEc3iubN1o5nZ+aI1/aJBVw5Hul9lcZqOpaBBkgyYNVZVjgcGoZBcs2LFCjm9WgHAYqPLR1+ekBAfVVp6Lhu9vRgLZD5lXcmXCMAmXP4iQsvZYCSWnOxOFZDEsTkiz+YXak9+ElHAoaErVsFWKmODj+f+VQ7IZKOPxLFRXnVFPpmPns4A3sLm3l5VVSWL5PIZM6ZP3rFjZzMS3wev9BNMw0e7gJkqTNLVWBv6mpqa++FJVIVsl60lvcPassMRHjoFWyEA6FO5/090+CisAWNkZKRD7ZT2TuQnkeqhSHUxbaMmT550eNu27XIAU8CeQ/CH4yG7s5lsRUjMDQY8wok+7DURj3kHNv8hdPFQAJZTAsq436DPP7N421oQrdK+bYG0VgtDvZj0/pQpU2SjIANdFY4zYiSeoXRurZkrZb8lwJMMgQXh4aH/GxsbOwUnR+h9279/8mDWkXiOfXxJkD+LOMsuvEaZcopel3quXDXEVhYhxbu5JrDh/DNAltj2HlIthCWu8hBnBivVdqJq8aODNZwG7Q0DH1ZUVMgxMb/hw4e7G3SJDX9C2s3gjBkZw6wuPCkp/TPh4QyHJh+En7c47PO82sFb1N+NpbODKxXH6h8A2If+b6Jz/zZq1KjS3r2D79uwYdO3tHF690kV2ObMTZyYXVleXrGW6T6HraMYkkQF3SHpH6CrM+lrBLvseT4+3jJ9zbs23VMWzi7QUayBRKRQfsS0HnNQrAI1l4R/l6KTqjkzch80X5bGgHyKgNjirKzMQFQVMRtNVDsLhe3Et6Na5USunHVQ0lXuP0a1dPgE7XU7MqfBRoUkI10vpqam7C0oOGMCHSkPY2NAkHEW9Dbavs2g3xEOhw3LqOfeprUhH4LZtZQw57yVK1ca586de55mfaWtnSsfFbSGAz8xqAyxaIJI4sCtGDAgZUtiYvJ4o9HwCs++Vr4zxZok+JLc8roLQclhwdxl+UKenQZbIUan4wFc0leAvoYd6QewXHoRWFKqqMnXsVERgGTNwIM93qOH/x32GiclJU5BjRzkzMldhw8ffo3wwku0sfaBbogUf/3113ybMzPh+w9Cm74uIL1/YpZUBgT4y6+E3wdoe93afE/7XF56BmyzXscNGJA6jud9p08XlAD6fQy8BwupWRW7t3+hhsRCtEOHZojTkm6vBXUjJkyYcBBVUs/O+DMEp/7GrHvarN1hPsQytueCsGIep/yp9nd5RAsXEyns4+Wlk1+N9SOZNXP6dp+tli5LthXCYwcOHDAWxvMx/CsZ+GzUizfHGqxU/V7RCX65UEC7hzl3Uo79nOPo4PV6r58Rw36PD/wU8e5BnOfYDeWzgH8AaRf7/DWSN1Issfu/8kG2xMXFcqJWKyrL39F+FG6hs5N7UXneZqkBOqKztyj1LHNPgG3qA4bGpKUN0sDAfqbuFaRoGouoF16pJQ/K8/8QKniOBx/AOEW76coLR/L4+Lh7WeS2IL1T0Zuf0mYMNJ6UtvBygvTu5Mk5l/V633/UaIzPfifEzkkypudj/HCq3BG+zOt4DGylEwaZOWjQQA368iA7GvU4RBNZ1LToSaWK5FcJ5KwiL2Qg1yIjI0abv3TkHmAjsrOzGwhz1nD/EG3ESljODFnEgaEBGo0B9SQnt5wD2BEe7NXxONgKA4A7CutFdlkOA7qRBXQkp11Nr9kw3cDmrAAUggraTi5TX/Wl02nvRge/dPDgwRbCw/lRUX0ehMgKFrxA1cQ80KDLwFZ4xxYfkZiYoMFxOLp//34/AB/IZoUc5vk5H6S5b99om1t0Co3O8tDQ3q/MmDHtGMrjv6Gp7axuV7/73lzuys5xQIbFxsYMbGlpOobzchxg/DAf+YWX1tVjBmIbj+5uQAu2qiUb6WtB/2pY6c9zsrMV0OJc+UheXvoMzDxNRkZ6GbSzAMkVcp5uK56tzEqnmFQt2RwXXsWi915VVXWfrVu3xeEgFAD+RVdHCc04gFb98V3t15H2HKNrOn78hFg1idRfimkpnqrqS/XgMjOHpfDrh6zr12v/ed++/CklJaV3lpWVG7EwDsbF9WO113TpGT7VI1bRAFe+pbCwyIcAlQ+xkg0cyGnipMHrgO6Ui6lqAeEoQSBBeyJfxth2nvOLi0s+Jeb7JFKZgdkmh8YPYQVI/Fd2V9x2bdy4SWiZ4tluI2qDECDf4mygd0VFpSE4uNcGPGGDt7ePhFq9ALpcr/dO4/dCcpxO1aVKsgH612ZAS0djkpISSUnL8dQ+4WM8z/m98adP+9WwnXY4JCQIT9LkZali6oeqjC5uRZL1SLKORXvt5Mm5unaQZXfcxBZ5P/ZmwUHzslo+VYEN8bnWOzDOGTFi+N1arebtHTvyEIzm5/AaJ7KdVjxy5IgKpt5EmFQ1i6z345nS1ta2Vvk1AQdtNIC8Oicnx5uI4ix47gDZomex31+2KLP7qBJsY79OKIrJ9cKkSbmXm5ubfpeXtzuFE6SP5eXtSurdO+Qg8ZFbqJmxnbTv8lc4WG2ckfE6d67MCMgrOXPtx2EC+bsNWyC389gpDjbHoQpsJPcCgMqKbPOC0XAfH98/TJs29fTlyzXP8nv1u69evTZ1+/YdRs7hbR4yJC1Cp/MaZpNAF7zAejIQR9EBchsgr8rNzfFHEGTzQEuyy4HgYLeSlQqqwIYX4hdG0Vd2L5geGBYW+g4btFsJuT5z7ty5ZzjKO43f3TSyS78S130IRFLtEnJjBXgC5HM6gL6FdbGa3SY5hPlzyh0CWWHlOxyUJ8dzVXqUn0dEtrW1yt9JhDnehSnqZmCci/bvP1jADzklXt0HB+YS0b3NMTF9c6Fld6fBFWsEQTayX6ktKSnll1+9VuFEBeNMzRCQ1YxD6mKN1NB2MAG1atVt1Taorj4/BQdqPe381LaF0TqDoe0t9Lk3foKEU/2JlRSwiO7j8PrdPNu00Z0BGzBNBx0xTxsx4Vamp2eE85FVhW4txtik12tnRUb23WZR7tCj6i8rVDk+wHaVcTm3IQ71cnulyvr6hj9yVGA4r2QPUMeGwa6xY8cUsRX2IBjd9osylWAD8nkkuaRBFj5+Q8M6oXUFZBkBu/7aORxR3ioPzlxOgS0doXs5u2FYDDDZznQsbZD0QzgO73HAfR50JlFkYEdn5dixWc3oUgG9Y01xBGzoGREEURd1QocfSEUB8jRn+VPaQZdjFbpHWeDPKWXO5E6DrXTGoodkGl8BmHilTG3OYFYTe9gIUC9AZwDPjZy+Woi5yP+S6ORPYbSdgS0g8/G1RUXFN/nN5Yr09MGxgMPsc+2C7jlE4t/5ZcES1yh919plsIUMYHhXV1+Y39ZmFD3s1CEWzCnZWXl7z56vKrHPX4JmOM/VnIb6gEOUOfziYBzPt7nr1dWXNDgkN3CgPsesjAfkKdRz9TrGEZi/REZGLwFw4cstl1vANueEA5BjDIbWOUiEOAcJ5u8cvL+K8fC6HMXF55DjwrIQl5PEodqEKWnSvRxw1OBaXw8MDFg+ePAQCYA5tbtDO9MFqKWIzTqdTv8ZBznzlXJ35m4H25w5gB8M8LMpuwvwhwNchw42r2fjvrCurv4N/vspFyBEf5t4HT16lAZ1UYskf8aGcgptRdervqDJoRzTEV8BeB0An1BNRGUDj4Jtzgtg9cBOz0BaRzLQkayFnDzVDqTcy7ye5T3qZVdJSfH7BQWFv+edN2plDfY5el2Ta1nX1jP9tQHsaYyew/R3CHPzEHbyMcobbbXxRHmXgW2NeQbuS6Qwlg9AyLaNQzLySwKtqAt+dSxHwsQE1PYAWAM5Z+hM/1F1B+344ar8+6URsP4/p9512lZQXs49uVc5wFaw4VEBsLT5Ya//AzDfafkdei4SAAAAAElFTkSuQmCC"},Nmsl:function($e,We,z){$e.exports={none_panels:"none_panels___1g-mA",none_p_title:"none_p_title___1lCVD"}},NvD2:function($e,We,z){"use strict";z.d(We,"a",function(){return S});var ae=z("Kwbf");function Z(C,T){var l=new Set;return C.forEach(function(p){T.has(p)||l.add(p)}),l}function U(C){var T=C||{},l=T.disabled,p=T.disableCheckbox,h=T.checkable;return!!(l||p)||h===!1}function w(C,T,l,p){for(var h=new Set(C),d=new Set,o=0;o<=l;o+=1){var c=T.get(o)||new Set;c.forEach(function(n){var t=n.key,u=n.node,y=n.children,g=y===void 0?[]:y;h.has(t)&&!p(u)&&g.filter(function(_){return!p(_.node)}).forEach(function(_){h.add(_.key)})})}for(var s=new Set,f=l;f>=0;f-=1){var i=T.get(f)||new Set;i.forEach(function(n){var t=n.parent,u=n.node;if(p(u)||!n.parent||s.has(n.parent.key))return;if(p(n.parent.node)){s.add(t.key);return}var y=!0,g=!1;(t.children||[]).filter(function(_){return!p(_.node)}).forEach(function(_){var b=_.key,v=h.has(b);y&&!v&&(y=!1),!g&&(v||d.has(b))&&(g=!0)}),y&&h.add(t.key),g&&d.add(t.key),s.add(t.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(Z(d,h))}}function P(C,T,l,p,h){for(var d=new Set(C),o=new Set(T),c=0;c<=p;c+=1){var s=l.get(c)||new Set;s.forEach(function(t){var u=t.key,y=t.node,g=t.children,_=g===void 0?[]:g;!d.has(u)&&!o.has(u)&&!h(y)&&_.filter(function(b){return!h(b.node)}).forEach(function(b){d.delete(b.key)})})}o=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 u=t.parent,y=t.node;if(h(y)||!t.parent||f.has(t.parent.key))return;if(h(t.parent.node)){f.add(u.key);return}var g=!0,_=!1;(u.children||[]).filter(function(b){return!h(b.node)}).forEach(function(b){var v=b.key,m=d.has(v);g&&!m&&(g=!1),!_&&(m||o.has(v))&&(_=!0)}),g||d.delete(u.key),_&&o.add(u.key),f.add(u.key)})}return{checkedKeys:Array.from(d),halfCheckedKeys:Array.from(Z(o,d))}}function S(C,T,l,p){var h=[],d;p?d=p:d=U;var o=new Set(C.filter(function(i){var n=!!l[i];return n||h.push(i),n})),c=new Map,s=0;Object.keys(l).forEach(function(i){var n=l[i],t=n.level,u=c.get(t);u||(u=new Set,c.set(t,u)),u.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(o,c,s,d):f=P(o,T.halfCheckedKeys,c,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"),C=function(o){var c=o.overlay,s=o.prefixCls,f=o.id,i=o.overlayInnerStyle;return w.createElement("div",{className:"".concat(s,"-inner"),id:f,role:"tooltip",style:i},typeof c=="function"?c():c)},T=C,l=function(o,c){var s=o.overlayClassName,f=o.trigger,i=f===void 0?["hover"]:f,n=o.mouseEnterDelay,t=n===void 0?0:n,u=o.mouseLeaveDelay,y=u===void 0?.1:u,g=o.overlayStyle,_=o.prefixCls,b=_===void 0?"rc-tooltip":_,v=o.children,m=o.onVisibleChange,E=o.afterVisibleChange,a=o.transitionName,x=o.animation,O=o.placement,A=O===void 0?"right":O,D=o.align,I=D===void 0?{}:D,F=o.destroyTooltipOnHide,K=F===void 0?!1:F,ne=o.defaultVisible,j=o.getTooltipContainer,G=o.overlayInnerStyle,X=Object(U.a)(o,["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)(c,function(){return J.current});var B=Object(Z.a)({},X);"visible"in o&&(B.popupVisible=o.visible);var Q=function(){var Ae=o.arrowContent,pe=Ae===void 0?null:Ae,Oe=o.overlay,Fe=o.id;return[w.createElement("div",{className:"".concat(b,"-arrow"),key:"arrow"},pe),w.createElement(T,{key:"content",prefixCls:b,id:Fe,overlay:Oe,overlayInnerStyle:G})]},ie=!1,oe=!1;if(typeof K=="boolean")ie=K;else if(K&&Object(ae.a)(K)==="object"){var xe=K.keepParent;ie=xe===!0,oe=xe===!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:m,afterPopupVisibleChange:E,popupTransitionName:a,popupAnimation:x,defaultPopupVisible:ne,destroyPopupOnHide:ie,autoDestroy:oe,mouseLeaveDelay:y,popupStyle:g,mouseEnterDelay:t},B),v)},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 o}),z.d(We,"i",function(){return c}),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 u}),z.d(We,"e",function(){return y}),z.d(We,"f",function(){return g});var ae=z("KQm4"),Z=z("U8pU"),U=z("Ff2n"),w=z("q1tI"),P=z.n(w),S=z("Kwbf"),C=z("WaYH"),T=.25,l=2;function p(_,b){var v=_.slice(),m=v.indexOf(b);return m>=0&&v.splice(m,1),v}function h(_,b){var v=_.slice();return v.indexOf(b)===-1&&v.push(b),v}function d(_){return _.split("-")}function o(_,b){return"".concat(_,"-").concat(b)}function c(_){return _&&_.type&&_.type.isTreeNode}function s(_,b){var v=[_],m=b[_];function E(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(x){var O=x.key,A=x.children;v.push(O),E(A)})}return E(m.children),v}function f(_,b){var v=_.clientY,m=b.selectHandle.getBoundingClientRect(),E=m.top,a=m.bottom,x=m.height,O=Math.max(x*T,l);return v<=E+O?-1:v>=a-O?1:0}function i(_,b){if(!_)return;var v=b.multiple;return v?_.slice():_.length?[_[0]]:_}var n=function(b){return b};function t(_,b){if(!_)return[];var v=b||{},m=v.processProps,E=m===void 0?n:m,a=Array.isArray(_)?_:[_];return a.map(function(x){var O=x.children,A=Object(U.a)(x,["children"]),D=t(O,b);return P.a.createElement(C.a,Object.assign({},E(A)),D)})}function u(_){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 v=new Set;function m(E){if(v.has(E))return;var a=b[E];if(!a)return;v.add(E);var x=a.parent,O=a.node;if(O.disabled)return;x&&m(x.key)}return(_||[]).forEach(function(E){m(E)}),Object(ae.a)(v)}function g(_){var b={};return Object.keys(_).forEach(function(v){(v.startsWith("data-")||v.startsWith("aria-"))&&(b[v]=_[v])}),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"),C=z("jrin"),T=z("q1tI"),l=z.n(T),p=z("VrN/"),h=z.n(p),d=z("bdgK"),o=z("p77/"),c=z("Bd2K"),s=z("ELLl"),f=z("19Vz"),i=z("lZu9"),n=z("+NIl"),t=z("kSUc"),u=z("9Bee"),y=function(_e){var he=_e.value,ve=he===void 0?"":he,Ee=_e.className,be=_e.showTextOnly,Ge=_e.showLines,qe=_e.style,pt=qe===void 0?{}:qe,Pt=Object(T.useMemo)(function(){return""},[ve]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:Pt}}))},g=z("0Owb"),_=z("dejd"),b=z("C+DQ"),v=[{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 m(_e){var he=_e.onActionCallback,ve=_e.title,Ee=_e.icon,be=_e.actionName,Ge=_e.className,qe=Ge===void 0?"":Ge,pt=_e.children;function Pt(){he(be)}return l.a.createElement("a",{title:ve,className:qe,onClick:Pt},l.a.createElement("i",{className:"md-iconfont ".concat(Ee)}),pt)}var E=function(_e){var he=_e.watch,ve=_e.showNullButton,Ee=_e.onActionCallback,be=_e.fullScreen,Ge=_e.insertTemp,qe=_e.hidetoolBar,pt=[].concat(v,[{title:"".concat(he?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(he?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!qe&&pt.map(function(Pt,Rt){return l.a.createElement("li",{key:Rt},Pt.actionName?l.a.createElement(m,Object(g.a)({},Pt,{onActionCallback:Ee})):l.a.createElement("span",{className:"v-line"}))}),ve?l.a.createElement("li",null,l.a.createElement(m,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ee},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ge&&l.a.createElement("li",null,l.a.createElement(m,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ge),onActionCallback:Ee},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(m,{icon:"".concat(be?"icon-shrink":"icon-enlarge"),title:be?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ee})))},a=z("M8RZ"),x=z("+L6B"),O=z("2/Rp"),A=z("y8nQ"),D=z("Vl3Y"),I=z("5NDa"),F=z("5rEg"),K={labelCol:{span:4},wrapperCol:{span:20}},ne=function(_e){var he=_e.callback,ve=_e.onCancel;function Ee(be){he(be)}return l.a.createElement(D.a,Object(g.a)({},K,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ee}),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(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(O.a,{type:"ghost",onClick:ve},"\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(_e){var he=_e.callback,ve=_e.onCancel,Ee=J(),be=Object(S.a)(Ee,1),Ge=be[0];function qe(Rt){he(Rt)}function pt(Rt,Mt){Ge.setFieldsValue({src:"/api/attachments/".concat(Rt.id),type:Mt.type})}function Pt(Rt){var Mt=Rt.target.files[0];xe(Mt,pt)}return l.a.createElement(D.a,Object(g.a)({form:Ge},Q,{className:"upload-image-panel",onFinish:qe}),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:Pt}))),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(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(O.a,{type:"ghost",onClick:ve},"\u53D6\u6D88")))};function oe(_e){var he=_e.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:he}))}function xe(_e,he){if(!_e)throw new String("\u6CA1\u6709\u6587\u4EF6");var ve=new FormData;ve.append("editormd-image-file",_e),ve.append("file_param_name","editormd-image-file"),ve.append("byxhr","true");var Ee=new window.XMLHttpRequest;Ee.withCredentials=!0,Ee.addEventListener("load",function(be){he(JSON.parse(be.target.responseText),_e)},!1),Ee.addEventListener("error",function(be){console.error(be)},!1),Ee.open("POST","".concat(X.a,"/api/attachments.json")),Ee.send(ve)}var ye=z("giR+"),Ae=z("fyUT"),pe=z("7Kak"),Oe=z("9yH6"),Fe=Oe.a.Group,Me={margin:"0 8px"},Ce=function(_e){var he=_e.callback,ve=_e.onCancel;function Ee(be){he(be)}return l.a.createElement(D.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ee},l.a.createElement("div",{className:"flex-container"},l.a.createElement("span",{style:Me},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:Me},"\u884C\u6570"),l.a.createElement(D.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(Ae.a,null)),l.a.createElement("span",{style:Me},"\u5217\u6570"),l.a.createElement(D.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(Ae.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12}},l.a.createElement("span",{style:Me},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(D.a.Item,{name:"align"},l.a.createElement(Fe,null,l.a.createElement(Oe.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(Oe.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(Oe.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(Oe.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(O.a,{type:"ghost",onClick:ve},"\u53D6\u6D88")))},Le=z("m3rI"),de=z("wMS7"),ue=z.n(de),ke="link",Ue="upload-image",Ye="code-block",ee="add-table",M="------------",N={default:M,left:":".concat(M),center:":".concat(M,":"),right:"".concat(M,":")},$=z("9VGf"),V,Y;function me(){}var Re=0,rt=1e4,Pe="\u2581",Ie=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Xe(_e){return/^\d+$/.test(_e)?"".concat(_e,"px"):_e}var tt=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ve=tt?"Cmd":"Ctrl",Ke=(V={},Object(C.a)(V,Ve+"-B","bold"),Object(C.a)(V,Ve+"-I","italic"),V),Ne=(Y={},Object(C.a)(Y,ke,"\u6DFB\u52A0\u94FE\u63A5"),Object(C.a)(Y,Ye,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(C.a)(Y,Ue,"\u6DFB\u52A0\u56FE\u7247"),Object(C.a)(Y,ee,"\u6DFB\u52A0\u8868\u683C"),Y),De=We.a=function(_e){var he=_e.defaultValue,ve=he===void 0?"":he,Ee=_e.onChange,be=_e.width,Ge=be===void 0?"100%":be,qe=_e.height,pt=qe===void 0?400:qe,Pt=_e.miniToolbar,Rt=Pt===void 0?!1:Pt,Mt=_e.isFocus,wt=Mt===void 0?!1:Mt,lt=_e.watch,ft=_e.insertTemp,Qe=_e.mode,Te=Qe===void 0?"markdown":Qe,je=_e.id,ct=je===void 0?"markdown-editor-id":je,Ze=_e.showResizeBar,Tt=Ze===void 0?!1:Ze,Ot=_e.noStorage,st=Ot===void 0?!1:Ot,gt=_e.showNullButton,kt=gt===void 0?!1:gt,Wt=_e.hidetoolBar,Qt=Wt===void 0?!1:Wt,we=_e.fullScreen,fe=we===void 0?!1:we,W=_e.onBlur,q=_e.onCMBeforeChange,te=_e.onFullScreen,se=_e.className,Se=se===void 0?"":se,He=_e.disablePaste,Je=He===void 0?!1:He,xt=_e.placeholder,Ct=xt===void 0?"":xt,it=_e.values,St=it===void 0?"":it,Xt=Object(T.useState)(null),bt=Object(S.a)(Xt,2),ht=bt[0],Jt=bt[1],Nt=Object(T.useState)(ve),mt=Object(S.a)(Nt,2),cn=mt[0],bn=mt[1],sn=Object(T.useState)(lt),dn=Object(S.a)(sn,2),Nn=dn[0],Kt=dn[1],et=Object(T.useState)(fe),Ut=Object(S.a)(et,2),Yt=Ut[0],Vt=Ut[1],En=Object(T.useState)(""),sr=Object(S.a)(En,2),nr=sr[0],jn=sr[1],cr=Object(T.useState)(0),qn=Object(S.a)(cr,2),Wr=qn[0],_r=qn[1],Rr=Object(T.useState)(pt),Tr=Object(S.a)(Rr,2),Vr=Tr[0],Ur=Tr[1],xi=Object(T.useState)(!1),kr=Object(S.a)(xi,2),Oi=kr[0],ri=kr[1],Xr=Object(T.useRef)(),di=Object(T.useRef)(),Si=Object(T.useRef)(),si=Object(T.useRef)();Object(T.useEffect)(function(){bn(St),ht==null||ht.setValue(St)},[St]),Object(T.useEffect)(function(){te==null||te(Yt)},[Yt]),Object(T.useEffect)(function(){if(Xr.current){var ln=h.a.fromTextArea(Xr.current,{mode:Te,lineNumbers:!Rt,lineWrapping:!0,value:ve,autoCloseTags:!0,autoCloseBrackets:!0});wt&&ln.focus();function Tn(On,rr){if(Je){rr.preventDefault();return}var ar=rr.clipboardData;if(ar){var pr=ar.types.toString(),Er=ar.items,Cr=["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(pr==="Files"||ar.types.indexOf("Files")>-1){if(rr.preventDefault(),Te=="stex")return;try{var xr,pi=Er[1];((xr=Er[0])===null||xr===void 0?void 0:xr.kind)==="file"&&(pi=Er[0]);var Or=pi.getAsFile(),Ai=Or.name.split(".").pop();xe(Or,function(Dr){if(Dr.id){var mi,vi,Yi;(Or==null||((mi=Or.type)===null||mi===void 0)?void 0:mi.indexOf("image"))>-1?ln.replaceSelection("![,](/api/attachments/".concat(Dr.id,"?type=").concat(Dr.content_type,")")):(Or==null||((vi=Or.type)===null||vi===void 0)?void 0:vi.indexOf("video"))>-1?ln.replaceSelection('<video width="100%" controls src="'.concat(Le.a.API_SERVER,"/api/attachments/").concat(Dr.id,'"></video>')):(Or==null||((Yi=Or.type)===null||Yi===void 0)?void 0:Yi.indexOf("pdf"))>-1?ln.replaceSelection('<a href="'.concat(Le.a.API_SERVER,"/api/attachments/").concat(Dr.id,"?type=").concat(Or.type,'&disposition=inline" target="_blank">').concat(Or.name,"</a>")):Cr.includes(Ai)?ln.replaceSelection('<a href="'.concat(Le.a.API_SERVER,"/api/attachments/").concat(Dr.id,'?type=office&disposition=inline" target="_blank">').concat(Or.name,"</a>")):ln.replaceSelection("[".concat(Or.name,"](").concat(Le.a.API_SERVER,"/api/attachments/").concat(Dr.id,"?type=").concat(Dr.content_type,")"))}else(Dr==null?void 0:Dr.status)===401&&(document.location.href="/user/login")})}catch(Dr){P.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return ln.on("paste",Tn),Jt(ln),function(){ln.off("paste",Tn)}}},[]);var fi=Object(T.useCallback)(function(){if(di.current)try{}catch(ln){console.log(ln,"---- to set md editor body height")}},[Vr,di,Yt]);Object(T.useEffect)(function(){function ln(){var On=new d.default(function(rr){var ar=Object(U.a)(rr),pr;try{for(ar.s();!(pr=ar.n()).done;){var Er=pr.value;(Er.target.offsetHeight>0||Er.target.offsetWidth>0)&&(fi(),ht.setSize("100%","100%"),ht.refresh())}}catch(Cr){ar.e(Cr)}finally{ar.f()}});return On.observe(Xr.current.parentElement),On}if(ht){var Tn=ln();return function(){Tn.unobserve(Xr.current.parentElement)}}},[ht,fi]),Object(T.useEffect)(function(){if(ht){for(var ln=[],Tn=function(){var Er=rr[On];ar=Object(S.a)(Er,2);var Cr=ar[0],xr=ar[1],pi=Object(C.a)({},Cr,function(){gr(xr)});ln.push(pi),ht.addKeyMap(pi)},On=0,rr=Object.entries(Ke);On<rr.length;On++){var ar;Tn()}return function(){var pr=Object(U.a)(ln),Er;try{for(pr.s();!(Er=pr.n()).done;){var Cr=Er.value;ht.removeKeyMap(Cr)}}catch(xr){pr.e(xr)}finally{pr.f()}}}},[ht]),Object(T.useEffect)(function(){fe!==Yt&&Vt(fe)},[fe]),Object($.a)(function(){if(!st&&Wr>0){var ln=new Date().getTime(),Tn=window.sessionStorage.getItem(ct);ln>=Wr+rt&&(!Tn||Tn!==cn)&&(window.sessionStorage.setItem(ct,cn),ri(!0))}},rt),Object(T.useEffect)(function(){Kt(lt)},[ht,lt]),Object(T.useEffect)(function(){ht&&(wt&&ht.focus())},[ht,wt]),Object(T.useEffect)(function(){if(Nn&&ht){var ln=ht.getScrollerElement();function Tn(On){var rr=On.target;if(si.current){var ar=rr.scrollTop/rr.scrollHeight;si.current.scrollTop=si.current.scrollHeight*ar}}return ln.addEventListener("scroll",Tn),function(){ln.removeEventListener("scroll",Tn)}}},[ht,Nn]),Object(T.useEffect)(function(){if(ht&&q){function ln(Tn,On){q(Tn,On)}return ht.on("beforeChange",ln),function(){ht.off("beforeChange",ln)}}},[ht,q]),Object(T.useEffect)(function(){if(ht&&W){function ln(){W(ht.getValue())}return ht.on("blur",ln),function(){ht.off("blur",ln)}}},[ht,W]),Object(T.useEffect)(function(){if(ht){function ln(Tn){var On=ue.a.sanitize(Tn.getValue());bn(On),_r(new Date().getTime()),Tn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ee&&Ee(On)}return ht.on("change",ln),function(){ht.off("change",ln)}}},[ht,Ee]),Object(T.useEffect)(function(){ht&&(ve==null?(ht.setValue(""),bn("")):ve!==ht.getValue()&&(ht.setValue(ve),bn(ve),ht.setCursor(ht.lineCount(),0)))},[ht,ve]);var gr=Object(T.useCallback)(function(ln){var Tn=ht.getCursor(),On=ht.getSelection(),rr=On.split(`
`);switch(ln){case"bold":return ht.replaceSelection("**"+On+"**"),On===""&&ht.setCursor(Tn.line,Tn.ch+2),ht.focus();case"italic":return ht.replaceSelection("*"+On+"*"),On===""&&ht.setCursor(Tn.line,Tn.ch+1),ht.focus();case"code":return ht.replaceSelection("`"+On+"`"),On===""&&ht.setCursor(Tn.line,Tn.ch+1),ht.focus();case"inline-latex":return ht.replaceSelection("`$$"+On+"$$`"),On===""&&ht.setCursor(Tn.line,Tn.ch+3),ht.focus();case"latex":return ht.replaceSelection("```latex\n"+On+"\n```"),ht.setCursor(Tn.line+1,On.length+1),ht.focus();case"line-break":return ht.replaceSelection(`<br/>
`),ht.focus();case"list-ul":return On===""?ht.replaceSelection("- "+On):ht.replaceSelection(rr.map(function(ar){return ar===""?"":"- ".concat(ar)}).join(`
`)),ht.focus();case"list-ol":return On===""?ht.replaceSelection("1. "+On):ht.replaceSelection(rr.map(function(ar,pr){return ar===""?"":"".concat(pr+1,". ").concat(ar)}).join(`
`)),ht.focus();case"add-null-ch":return On===""&&ht.setCursor(Tn.line,Tn.ch+1),ht.replaceSelection(Pe),ht.focus();case"inster-template-1":return On===""&&ht.setCursor(Tn.line,Tn.ch),ht.replaceSelection(Ie),ht.focus();case"eraser":return ht.setValue(""),ht.focus();case"trigger-watch":return Kt(!Nn),ht.focus();case"trigger-full-screen":return Vt(!Yt),ht.focus();case ke:jn(ke);return;case Ye:jn(Ye);return;case Ue:jn(Ue);return;case ee:jn(ee);return;default:throw new Error}},[ht,Nn,Yt]),dr=Object(T.useCallback)(function(ln){jn("");switch(nr){case ke:var Tn=ln.title,On=ln.link;return ht.replaceSelection("[".concat(Tn,"](").concat(On,")")),ht.focus();case Ye:var rr=ln.language,ar=ln.content;return ht.replaceSelection(["```"+rr,ar,"```"].join(`
`)),ht.focus();case Ue:var pr=ln.src,Er=ln.alt;return ht.replaceSelection("![ ".concat(Er," ]( ").concat(pr,' "').concat(Er,'" )')),ht.focus();case ee:for(var Cr=ln.row,xr=ln.col,pi=ln.align,Or=`
`,Ai=0;Ai<Cr;Ai++){for(var Dr=[],mi=[],vi=0;vi<xr;vi++)Ai===1&&mi.push(N[pi]),Dr.push(" ");Ai===1&&(Or+="| ".concat(mi.join(" | "),` |
`)),Or+="| ".concat(Dr.join(xr===1?"":" | "),` |
`)}return ht.replaceSelection(Or+`
`),ht.focus();default:throw new Error}},[ht,nr]),ii=Object(T.useMemo)(function(){switch(nr){case ke:return l.a.createElement(ne,{callback:dr,onCancel:li});case Ye:return l.a.createElement(j.b,{callback:dr,onCancel:li});case Ue:return l.a.createElement(ie,{callback:dr,onCancel:li});case ee:return l.a.createElement(Ce,{callback:dr,onCancel:li});default:return null}},[nr]);function li(){jn("")}Object(T.useEffect)(function(){if(Si.current){var ln=Si.current,Tn=!1,On=0;function rr(Er){Tn=!0,On=Er.pageY}function ar(){Tn=!1}function pr(Er){if(Tn){var Cr=Er.pageY-On;Cr<0&&(Cr=0),Cr>300&&(Cr=300);var xr=pt+Cr+"px";Ur(xr)}}return ln.addEventListener("mousedown",rr),document.addEventListener("mousemove",pr),document.addEventListener("mouseup",ar),function(){ln.removeEventListener("mousedown",rr),document.removeEventListener("mousemove",pr),document.removeEventListener("mouseup",ar)}}},[ht,Si]),Object(T.useEffect)(function(){Ur(pt)},[pt]);var Ni=Xe(Ge),wi=Xe(Vr),ua={width:Ni,height:wi},ca=Object(T.useMemo)(function(){if(Wr){var ln=new Date(Wr),Tn=ln.getHours(),On=ln.getMinutes(),rr=ln.getSeconds();return Tn=Tn<10?"0"+Tn:Tn,On=On<10?"0"+On:On,rr=rr<10?"0"+rr:rr,"".concat(Tn,":").concat(On,":").concat(rr)}return 0},[Wr]);function hi(){window.sessionStorage.removeItem(ct),ri(!1),_r(0)}function Zi(){ri(!1),_r(0),ht.setValue(window.sessionStorage.getItem(ct))}return l.a.createElement(T.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:di},l.a.createElement("div",{className:"markdown-editor-container ".concat(Se," ").concat(Nn?"on-preview":""," ").concat(Rt?"mini":""," ").concat(Yt?"full-screen":""),style:ua},l.a.createElement(E,{insertTemp:ft,watch:Nn,fullScreen:Yt,showNullButton:kt,onActionCallback:gr,hidetoolBar:Qt}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:Xr,placeholder:Ct})),Nn?l.a.createElement("div",{ref:si,className:"preview-container"},Te==="stex"&&l.a.createElement(y,{value:cn}),Te!=="stex"&&l.a.createElement(u.a,{value:cn})):null))),Tt?l.a.createElement("a",{ref:Si,className:"editor-resize"}):null,l.a.createElement(a.a,null,Ne[nr]?l.a.createElement(Z.a,{centered:!0,title:Ne[nr],visible:!0,onCancel:li,footer:null},ii):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,C){z[S]=C}function U(S){for(var C in z)z.hasOwnProperty(C)&&S(z[C],C)}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:C,read:T,each:l,remove:p,clearAll:h};var U="storejs",w=Z.document,P=c(),S=(Z.navigator?Z.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function C(s,f){if(S)return;var i=o(s);P(function(n){n.setAttribute(i,f),n.save(U)})}function T(s){if(S)return;var f=o(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=o(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 o(s){return s.replace(/^\d/,"___$&").replace(d,"___")}function c(){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+'><iframe src="/favicon.ico"></iframe>'),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 u=[].slice.call(arguments,0);u.unshift(n),f.appendChild(n),n.addBehavior("#default#userData"),n.load(U),t.apply(this,u),f.removeChild(n);return}}},RpDr:function($e,We,z){"use strict";z.d(We,"a",function(){return _}),z.d(We,"c",function(){return m});var ae=z("+L6B"),Z=z("2/Rp"),U=z("tJVT"),w=z("k1fw"),P=z("jrin"),S=z("5NDa"),C=z("5rEg"),T=z("q1tI"),l=z.n(T),p=z("8Skl"),h=z("y3Kf"),d=z("bdLU"),o=z("J66h"),c=z.n(o),s=z("++UQ"),f=z.n(s),i=z("IxHN"),n=z("9Bee"),t=z("1vsH"),u,y=C.a.TextArea,g={visible:!1,tabIndex:"0"},_=(u={},Object(P.a)(u,d.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(P.a)(u,d.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(P.a)(u,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(P.a)(u,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(P.a)(u,4,"\u7F16\u8BD1\u5931\u8D25"),Object(P.a)(u,5,"\u6267\u884C\u5931\u8D25"),u),b;(function(a){a[a.SET_VISIBLE=0]="SET_VISIBLE",a[a.SET_TABINDEX=1]="SET_TABINDEX"})(b||(b={}));function v(a,x){switch(x.type){case b.SET_VISIBLE:return Object(w.a)(Object(w.a)({},a),{},{visible:x.payload});case b.SET_TABINDEX:return Object(w.a)(Object(w.a)({},a),{},{tabIndex:x.payload});default:throw new Error}}function m(a){var x=a.status,O=a.error_msg,A=a.output,D=a.input,I=a.expected_output,F=a.is_file,K=a.input_file_url,ne=a.output_file_url,j=a.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.x)(K,D)}},D)),l.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!F&&l.a.createElement(n.a,{value:A&&o.Base64.decode(A)||"",style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.x)(ne,A)}},A)),l.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!F&&l.a.createElement(n.a,{value:I&&o.Base64.decode(I)||"",style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.x)(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.x)(K,D)}},D)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},o.Base64.decode(O)));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.x)(K,D)}},D)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},o.Base64.decode(O)));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(a){var x=a.status,O=a.error_msg,A=a.execute_time,D=a.output,I=a.input,F=a.expected_output,K=a.is_file,ne=a.input_file_url,j=a.output_file_url,G=a.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,o.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&&o.Base64.decode(D)),l.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",F&&o.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"},o.Base64.decode(O)));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"},o.Base64.decode(O)));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(a){var x=a.id,O=a.input,A=a.debuging,D=a.submitting,I=a.executingMessage,F=a.debugResult,K=a.onChangeInput,ne=a.onDebugCode,j=a.onSubmitCode,G=Object(T.useReducer)(v,g),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 Oe=pe.target.id;B({type:b.SET_TABINDEX,payload:Oe})}function xe(){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 Ae(){B({type:b.SET_VISIBLE,payload:!0}),B({type:b.SET_TABINDEX,payload:"1"}),ne()}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:O,onChange:K})),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:xe},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:Ae},"\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,C;(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"],o=[h,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],c=[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"],u=[l,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],y=[d,c,o,f,i,n,t,u],g=/^(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",v="com",m="typ",E="lit",a="pun",x="pln",O="tag",A="dec",D="src",I="atn",F="atv",K="nocode",ne="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function j(ue){for(var ke=0,Ue=!1,Ye=!1,ee=0,M=ue.length;ee<M;++ee){var N=ue[ee];if(N.ignoreCase)Ye=!0;else if(/[a-z]/i.test(N.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ue=!0,Ye=!1;break}}var $={b:8,t:9,n:10,v:11,f:12,r:13};function V(Pe){var Ie=Pe.charCodeAt(0);if(Ie!==92)return Ie;var Xe=Pe.charAt(1);return Ie=$[Xe],Ie||("0"<=Xe&&Xe<="7"?parseInt(Pe.substring(1),8):Xe==="u"||Xe==="x"?parseInt(Pe.substring(2),16):Pe.charCodeAt(1))}function Y(Pe){if(Pe<32)return(Pe<16?"\\x0":"\\x")+Pe.toString(16);var Ie=String.fromCharCode(Pe);return Ie==="\\"||Ie==="-"||Ie==="]"||Ie==="^"?"\\"+Ie:Ie}function me(Pe){var Ie=Pe.substring(1,Pe.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),Xe=[],tt=Ie[0]==="^",Ve=["["];tt&&Ve.push("^");for(var Ke=tt?1:0,Ne=Ie.length;Ke<Ne;++Ke){var De=Ie[Ke];if(/\\[bdsw]/i.test(De))Ve.push(De);else{var _e=V(De),he;Ke+2<Ne&&Ie[Ke+1]==="-"?(he=V(Ie[Ke+2]),Ke+=2):he=_e,Xe.push([_e,he]),he<65||_e>122||(he<65||_e>90||Xe.push([Math.max(65,_e)|32,Math.min(he,90)|32]),he<97||_e>122||Xe.push([Math.max(97,_e)&~32,Math.min(he,122)&~32]))}}Xe.sort(function(Ge,qe){return Ge[0]-qe[0]||qe[1]-Ge[1]});for(var ve=[],Ee=[],Ke=0;Ke<Xe.length;++Ke){var be=Xe[Ke];be[0]<=Ee[1]+1?Ee[1]=Math.max(Ee[1],be[1]):ve.push(Ee=be)}for(var Ke=0;Ke<ve.length;++Ke){var be=ve[Ke];Ve.push(Y(be[0])),be[1]>be[0]&&(be[1]+1>be[0]&&Ve.push("-"),Ve.push(Y(be[1])))}return Ve.push("]"),Ve.join("")}function Re(Pe){for(var Ie=Pe.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=Ie.length,tt=[],Ve=0,Ke=0;Ve<Xe;++Ve){var Ne=Ie[Ve];if(Ne==="(")++Ke;else if(Ne.charAt(0)==="\\"){var De=+Ne.substring(1);De&&(De<=Ke?tt[De]=-1:Ie[Ve]=Y(De))}}for(var Ve=1;Ve<tt.length;++Ve)tt[Ve]===-1&&(tt[Ve]=++ke);for(var Ve=0,Ke=0;Ve<Xe;++Ve){var Ne=Ie[Ve];if(Ne==="(")++Ke,tt[Ke]||(Ie[Ve]="(?:");else if(Ne.charAt(0)==="\\"){var De=+Ne.substring(1);De&&De<=Ke&&(Ie[Ve]="\\"+tt[De])}}for(var Ve=0;Ve<Xe;++Ve)Ie[Ve]==="^"&&Ie[Ve+1]!=="^"&&(Ie[Ve]="");if(Pe.ignoreCase&&Ue)for(var Ve=0;Ve<Xe;++Ve){var Ne=Ie[Ve],_e=Ne.charAt(0);Ne.length>=2&&_e==="["?Ie[Ve]=me(Ne):_e!=="\\"&&(Ie[Ve]=Ne.replace(/[a-zA-Z]/g,function(Ee){var be=Ee.charCodeAt(0);return"["+String.fromCharCode(be&~32,be|32)+"]"}))}return Ie.join("")}for(var rt=[],ee=0,M=ue.length;ee<M;++ee){var N=ue[ee];if(N.global||N.multiline)throw new Error(""+N);rt.push("(?:"+Re(N)+")")}return new RegExp(rt.join("|"),Ye?"gi":"g")}function G(ue,ke){var Ue=/(?:^|\s)nocode(?:\s|$)/,Ye=[],ee=0,M=[],N=0;function $(V){var Y=V.nodeType;if(Y==1){if(Ue.test(V.className))return;for(var me=V.firstChild;me;me=me.nextSibling)$(me);var Re=V.nodeName.toLowerCase();(Re==="br"||Re==="li")&&(Ye[N]=`
`,M[N<<1]=ee++,M[N++<<1|1]=V)}else if(Y==3||Y==4){var rt=V.nodeValue;rt.length&&(ke?rt=rt.replace(/\r\n?/g,`
`):rt=rt.replace(/[ \t\r\n]+/g," "),Ye[N]=rt,M[N<<1]=ee,ee+=rt.length,M[N++<<1|1]=V)}}return $(ue),{sourceCode:Ye.join("").replace(/\n$/,""),spans:M}}function X(ue,ke,Ue,Ye,ee){if(!Ue)return;var M={sourceNode:ue,pre:1,langExtension:null,numberLines:null,sourceCode:Ue,spans:null,basePos:ke,decorations:null};Ye(M),ee.push.apply(ee,M.decorations)}var J=/\S/;function B(ue){for(var ke=void 0,Ue=ue.firstChild;Ue;Ue=Ue.nextSibling){var Ye=Ue.nodeType;ke=Ye===1?ke?ue:Ue:Ye===3&&J.test(Ue.nodeValue)?ue:ke}return ke===ue?void 0:ke}function Q(ue,ke){var Ue={},Ye;(function(){for(var N=ue.concat(ke),$=[],V={},Y=0,me=N.length;Y<me;++Y){var Re=N[Y],rt=Re[3];if(rt)for(var Pe=rt.length;--Pe>=0;)Ue[rt.charAt(Pe)]=Re;var Ie=Re[1],Xe=""+Ie;V.hasOwnProperty(Xe)||($.push(Ie),V[Xe]=null)}$.push(/[\0-\uffff]/),Ye=j($)})();var ee=ke.length,M=function(N){for(var $=N.sourceCode,V=N.basePos,Y=N.sourceNode,me=[V,x],Re=0,rt=$.match(Ye)||[],Pe={},Ie=0,Xe=rt.length;Ie<Xe;++Ie){var tt=rt[Ie],Ve=Pe[tt],Ke=void 0,Ne;if(typeof Ve=="string")Ne=!1;else{var De=Ue[tt.charAt(0)];if(De)Ke=tt.match(De[1]),Ve=De[0];else{for(var _e=0;_e<ee;++_e)if(De=ke[_e],Ke=tt.match(De[1]),Ke){Ve=De[0];break}Ke||(Ve=x)}Ne=Ve.length>=5&&Ve.substring(0,5)==="lang-",Ne&&!(Ke&&typeof Ke[1]=="string")&&(Ne=!1,Ve=D),Ne||(Pe[tt]=Ve)}var he=Re;if(Re+=tt.length,!Ne)me.push(V+he,Ve);else{var ve=Ke[1],Ee=tt.indexOf(ve),be=Ee+ve.length;Ke[2]&&(be=tt.length-Ke[2].length,Ee=be-ve.length);var Ge=Ve.substring(5);X(Y,V+he,tt.substring(0,Ee),M,me),X(Y,V+he+Ee,ve,Oe(Ge,ve),me),X(Y,V+he+be,tt.substring(be),M,me)}}N.decorations=me};return M}function ie(ue){var ke=[],Ue=[];ue.tripleQuotedStrings?ke.push([_,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ue.multiLineStrings?ke.push([_,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ke.push([_,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ue.verbatimStrings&&Ue.push([_,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ye=ue.hashComments;Ye&&(ue.cStyleComments?(Ye>1?ke.push([v,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ke.push([v,/^#(?:(?: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])):ke.push([v,/^#[^\r\n]*/,null,"#"])),ue.cStyleComments&&(Ue.push([v,/^\/\/[^\r\n]*/,null]),Ue.push([v,/^\/\*[\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("^"+ne+"("+$+")")])}var V=ue.types;V&&Ue.push([m,V]);var Y=(""+ue.keywords).replace(/^ | $/g,"");Y.length&&Ue.push([b,new RegExp("^(?:"+Y.replace(/[\s,]+/g,"|")+")\\b"),null]),ke.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],[m,/^(?:[@_]?[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],[a,new RegExp(me),null]),Q(ke,Ue)}var oe=ie({keywords:y,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function xe(ue,ke,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(Ie){var Xe=Ie.nodeType;if(Xe==1&&!Ye.test(Ie.className))if(Ie.nodeName==="br")Y(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var tt=Ie.firstChild;tt;tt=tt.nextSibling)V(tt);else if((Xe==3||Xe==4)&&Ue){var Ve=Ie.nodeValue,Ke=Ve.match(ee);if(Ke){var Ne=Ve.substring(0,Ke.index);Ie.nodeValue=Ne;var De=Ve.substring(Ke.index+Ke[0].length);if(De){var _e=Ie.parentNode;_e.insertBefore(M.createTextNode(De),Ie.nextSibling)}Y(Ie),Ne||Ie.parentNode.removeChild(Ie)}}}function Y(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function Xe(Ke,Ne){var De=Ne?Ke.cloneNode(!1):Ke,_e=Ke.parentNode;if(_e){var he=Xe(_e,1),ve=Ke.nextSibling;he.appendChild(De);for(var Ee=ve;Ee;Ee=ve)ve=Ee.nextSibling,he.appendChild(Ee)}return De}for(var tt=Xe(Ie.nextSibling,0),Ve;(Ve=tt.parentNode)&&Ve.nodeType===1;)tt=Ve;$.push(tt)}for(var me=0;me<$.length;++me)V($[me]);ke===(ke|0)&&$[0].setAttribute("value",ke);var Re=M.createElement("ol");Re.className="linenums";for(var rt=Math.max(0,ke-1|0)||0,me=0,Pe=$.length;me<Pe;++me)N=$[me],N.className="L"+(me+rt)%10,N.firstChild||N.appendChild(M.createTextNode("\xA0")),Re.appendChild(N);ue.appendChild(Re)}function ye(ue){var ke=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ke=ke&&+ke[1]<=8;var Ue=/\n/g,Ye=ue.sourceCode,ee=Ye.length,M=0,N=ue.spans,$=N.length,V=0,Y=ue.decorations,me=Y.length,Re=0;Y[me]=ee;var rt,Pe;for(Pe=rt=0;Pe<me;)Y[Pe]!==Y[Pe+2]?(Y[rt++]=Y[Pe++],Y[rt++]=Y[Pe++]):Pe+=2;for(me=rt,Pe=rt=0;Pe<me;){for(var Ie=Y[Pe],Xe=Y[Pe+1],tt=Pe+2;tt+2<=me&&Y[tt+1]===Xe;)tt+=2;Y[rt++]=Ie,Y[rt++]=Xe,Pe=tt}me=Y.length=rt;var Ve=ue.sourceNode,Ke="";Ve&&(Ke=Ve.style.display,Ve.style.display="none");try{for(var Ne=null;V<$;){var De=N[V],_e=N[V+2]||ee,he=Y[Re+2]||ee,tt=Math.min(_e,he),ve=N[V+1],Ee;if(ve.nodeType!==1&&(Ee=Ye.substring(M,tt))){ke&&(Ee=Ee.replace(Ue,"\r")),ve.nodeValue=Ee;var be=ve.ownerDocument,Ge=be.createElement("span");Ge.className=Y[Re+1];var qe=ve.parentNode;qe.replaceChild(Ge,ve),Ge.appendChild(ve),M<_e&&(N[V+1]=ve=be.createTextNode(Ye.substring(tt,_e)),qe.insertBefore(ve,Ge.nextSibling))}M=tt,M>=_e&&(V+=2),M>=he&&(Re+=2)}}finally{Ve&&(Ve.style.display=Ke)}}var Ae={};function pe(ue,ke){for(var Ue=ke.length;--Ue>=0;){var Ye=ke[Ue];Ae.hasOwnProperty(Ye)?T.console&&console.warn("cannot override language handler %s",Ye):Ae[Ye]=ue}}function Oe(ue,ke){return ue&&Ae.hasOwnProperty(ue)||(ue=/^\s*</.test(ke)?"default-markup":"default-code"),Ae[ue]}pe(oe,["default-code"]),pe(Q([],[[x,/^[^<?]+/],[A,/^<!\w[^>]*(?:>|$)/],[v,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[a,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),pe(Q([[x,/^[\s]+/,null,` \r
`],[F,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[O,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[a,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),pe(Q([],[[F,/^[\s\S]+/]]),["uq.val"]),pe(ie({keywords:d,hashComments:!0,cStyleComments:!0,types:g}),["c","cc","cpp","cxx","cyc","m"]),pe(ie({keywords:"null,true,false"}),["json"]),pe(ie({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:g}),["cs"]),pe(ie({keywords:o,cStyleComments:!0}),["java"]),pe(ie({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),pe(ie({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),pe(ie({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),pe(ie({keywords:t,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),pe(ie({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),pe(ie({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),pe(Q([],[[_,/^[\s\S]+/]]),["regex"]);function Fe(ue){var ke=ue.langExtension;try{var Ue=G(ue.sourceNode,ue.pre),Ye=Ue.sourceCode;ue.sourceCode=Ye,ue.spans=Ue.spans,ue.basePos=0,Oe(ke,Ye)(ue),ye(ue)}catch(ee){T.console&&console.log(ee&&ee.stack||ee)}}function Me(ue,ke,Ue){var Ye=Ue||!1,ee=ke||null,M=document.createElement("div");M.innerHTML="<pre>"+ue+"</pre>",M=M.firstChild,Ye&&xe(M,Ye,!0);var N={langExtension:ee,numberLines:Ye,sourceNode:M,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Fe(N),M.innerHTML}function Ce(ue,ke){var Ue=ke||document.body,Ye=Ue.ownerDocument||document;function ee(De){return Ue.getElementsByTagName(De)}for(var M=[ee("pre"),ee("code"),ee("xmp")],N=[],$=0;$<M.length;++$)for(var V=0,Y=M[$].length;V<Y;++V)N.push(M[$][V]);M=null;var me=Date;me.now||(me={now:function(){return+new Date}});var Re=0,rt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Pe=/\bprettyprint\b/,Ie=/\bprettyprinted\b/,Xe=/pre|xmp/i,tt=/^code$/i,Ve=/^(?:pre|code|xmp)$/i,Ke={};function Ne(){for(var De=T.PR_SHOULD_USE_CONTINUATION?me.now()+250:Infinity;Re<N.length&&me.now()<De;Re++){for(var _e=N[Re],he=Ke,ve=_e;ve=ve.previousSibling;){var Ee=ve.nodeType,be=(Ee===7||Ee===8)&&ve.nodeValue;if(be?!/^\??prettify\b/.test(be):Ee!==3||/\S/.test(ve.nodeValue))break;if(be){he={},be.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ct,Ze,Tt){he[Ze]=Tt});break}}var Ge=_e.className;if((he!==Ke||Pe.test(Ge))&&!Ie.test(Ge)){for(var qe=!1,pt=_e.parentNode;pt;pt=pt.parentNode){var Pt=pt.tagName;if(Ve.test(Pt)&&pt.className&&Pe.test(pt.className)){qe=!0;break}}if(!qe){_e.className+=" prettyprinted";var Rt=he.lang;if(!Rt){Rt=Ge.match(rt);var Mt;!Rt&&(Mt=B(_e))&&tt.test(Mt.tagName)&&(Rt=Mt.className.match(rt)),Rt&&(Rt=Rt[1])}var wt;if(Xe.test(_e.tagName))wt=1;else{var lt=_e.currentStyle,ft=Ye.defaultView,Qe=lt?lt.whiteSpace:ft&&ft.getComputedStyle?ft.getComputedStyle(_e,null).getPropertyValue("white-space"):0;wt=Qe&&Qe.substring(0,3)==="pre"}var Te=he.linenums;(Te=Te==="true"||+Te)||(Te=Ge.match(/\blinenums\b(?::(\d+))?/),Te=Te?Te[1]&&Te[1].length?+Te[1]:!0:!1),Te&&xe(_e,Te,wt);var je={langExtension:Rt,sourceNode:_e,numberLines:Te,pre:wt,sourceCode:null,basePos:null,spans:null,decorations:null};Fe(je)}}}Re<N.length?T.setTimeout(Ne,250):typeof ue=="function"&&ue()}Ne()}var Le=T.PR={createSimpleLexer:Q,registerLangHandler:pe,sourceDecorator:ie,PR_ATTRIB_NAME:I,PR_ATTRIB_VALUE:F,PR_COMMENT:v,PR_DECLARATION:A,PR_KEYWORD:b,PR_LITERAL:E,PR_NOCODE:K,PR_PLAIN:x,PR_PUNCTUATION:a,PR_SOURCE:D,PR_STRING:_,PR_TAG:O,PR_TYPE:m,prettyPrintOne:U?T.prettyPrintOne=Me:S=Me,prettyPrint:C=U?T.prettyPrint=Ce:C=Ce},de=T.define;typeof de=="function"&&de.amd&&de("google-code-prettify",[],function(){return Le})})()},TcMa:function($e,We,z){$e.exports={desc:"desc___qlRMF",info:"info___JEaKq","commit-info":"commit-info___3-4e0"}},UZu5:function($e,We,z){},VEzc:function($e,We,z){$e.exports={flex_box_center:"flex_box_center___z2AYj",flex_space_between:"flex_space_between___2PZH7",flex_box_vertical_center:"flex_box_vertical_center___3Vw8I",flex_box_center_end:"flex_box_center_end___1dJQf",flex_box_column:"flex_box_column___kstqC",wrap:"wrap___wWYG3",head:"head___1xABk",title:"title___yYb50",content:"content___fzoVv",list:"list___2q90P",footer:"footer___3zT-e"}},"VrN/":function($e,We,z){(function(ae,Z){$e.exports=Z()})(this,function(){"use strict";var ae=navigator.userAgent,Z=navigator.platform,U=/gecko\/\d/i.test(ae),w=/MSIE \d/.test(ae),P=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ae),S=/Edge\/(\d+)/.exec(ae),C=w||P||S,T=C&&(w?document.documentMode||6:+(S||P)[1]),l=!S&&/WebKit\//.test(ae),p=l&&/Qt\/\d+\.\d+/.test(ae),h=!S&&/Chrome\//.test(ae),d=/Opera\//.test(ae),o=/Apple Computer/.test(navigator.vendor),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ae),s=/PhantomJS/.test(ae),f=!S&&/AppleWebKit/.test(ae)&&/Mobile\/\w+/.test(ae),i=/Android/.test(ae),n=f||i||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ae),t=f||/Mac/.test(Z),u=/\bCrOS\b/.test(ae),y=/win/i.test(Z),g=d&&ae.match(/Version\/(\d*\.\d*)/);g&&(g=Number(g[1])),g&&g>=15&&(d=!1,l=!0);var _=t&&(p||d&&(g==null||g<12.11)),b=U||C&&T>=9;function v(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var m=function(e,r){var R=e.className,L=v(r).exec(R);if(L){var k=R.slice(L.index+L[0].length);e.className=R.slice(0,L.index)+(k?L[1]+k:"")}};function E(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function a(e,r){return E(e).appendChild(r)}function x(e,r,R,L){var k=document.createElement(e);if(R&&(k.className=R),L&&(k.style.cssText=L),typeof r=="string")k.appendChild(document.createTextNode(r));else if(r)for(var H=0;H<r.length;++H)k.appendChild(r[H]);return k}function O(e,r,R,L){var k=x(e,r,R,L);return k.setAttribute("role","presentation"),k}var A;document.createRange?A=function(e,r,R,L){var k=document.createRange();return k.setEnd(L||e,R),k.setStart(e,r),k}:A=function(e,r,R){var L=document.body.createTextRange();try{L.moveToElementText(e.parentNode)}catch(k){return L}return L.collapse(!0),L.moveEnd("character",R),L.moveStart("character",r),L};function D(e,r){if(r.nodeType==3&&(r=r.parentNode),e.contains)return e.contains(r);do if(r.nodeType==11&&(r=r.host),r==e)return!0;while(r=r.parentNode)}function I(){var e;try{e=document.activeElement}catch(r){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function F(e,r){var R=e.className;v(r).test(R)||(e.className+=(R?" ":"")+r)}function K(e,r){for(var R=e.split(" "),L=0;L<R.length;L++)R[L]&&!v(R[L]).test(r)&&(r+=" "+R[L]);return r}var ne=function(e){e.select()};f?ne=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:C&&(ne=function(e){try{e.select()}catch(r){}});function j(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function G(e,r,R){r||(r={});for(var L in e)e.hasOwnProperty(L)&&(R!==!1||!r.hasOwnProperty(L))&&(r[L]=e[L]);return r}function X(e,r,R,L,k){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var H=L||0,re=k||0;;){var le=e.indexOf(" ",H);if(le<0||le>=r)return re+(r-H);re+=le-H,re+=R-re%R,H=le+1}}var J=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};J.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},J.prototype.set=function(e,r){this.f=r;var R=+new Date+e;(!this.id||R<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=R)};function B(e,r){for(var R=0;R<e.length;++R)if(e[R]==r)return R;return-1}var Q=50,ie={toString:function(){return"CodeMirror.Pass"}},oe={scroll:!1},xe={origin:"*mouse"},ye={origin:"+move"};function Ae(e,r,R){for(var L=0,k=0;;){var H=e.indexOf(" ",L);H==-1&&(H=e.length);var re=H-L;if(H==e.length||k+re>=r)return L+Math.min(re,r-k);if(k+=H-L,k+=R-k%R,L=H+1,k>=r)return L}}var pe=[""];function Oe(e){for(;pe.length<=e;)pe.push(Fe(pe)+" ");return pe[e]}function Fe(e){return e[e.length-1]}function Me(e,r){for(var R=[],L=0;L<e.length;L++)R[L]=r(e[L],L);return R}function Ce(e,r,R){for(var L=0,k=R(r);L<e.length&&R(e[L])<=k;)L++;e.splice(L,0,r)}function Le(){}function de(e,r){var R;return Object.create?R=Object.create(e):(Le.prototype=e,R=new Le),r&&G(r,R),R}var ue=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ke(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ue.test(e))}function Ue(e,r){return r?r.source.indexOf("\\w")>-1&&ke(e)?!0:r.test(e):ke(e)}function Ye(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var ee=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function M(e){return e.charCodeAt(0)>=768&&ee.test(e)}function N(e,r,R){for(;(R<0?r>0:r<e.length)&&M(e.charAt(r));)r+=R;return r}function $(e,r,R){for(var L=r>R?-1:1;;){if(r==R)return r;var k=(r+R)/2,H=L<0?Math.ceil(k):Math.floor(k);if(H==r)return e(H)?r:R;e(H)?R=H:r=H+L}}function V(e,r,R,L){if(!e)return L(r,R,"ltr",0);for(var k=!1,H=0;H<e.length;++H){var re=e[H];(re.from<R&&re.to>r||r==R&&re.to==r)&&(L(Math.max(re.from,r),Math.min(re.to,R),re.level==1?"rtl":"ltr",H),k=!0)}k||L(r,R,"ltr")}var Y=null;function me(e,r,R){var L;Y=null;for(var k=0;k<e.length;++k){var H=e[k];if(H.from<r&&H.to>r)return k;H.to==r&&(H.from!=H.to&&R=="before"?L=k:Y=k),H.from==r&&(H.from!=H.to&&R!="before"?L=k:Y=k)}return L!=null?L:Y}var Re=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function R(ge){return ge<=247?e.charAt(ge):1424<=ge&&ge<=1524?"R":1536<=ge&&ge<=1785?r.charAt(ge-1536):1774<=ge&&ge<=2220?"r":8192<=ge&&ge<=8203?"w":ge==8204?"b":"L"}var L=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,k=/[stwN]/,H=/[LRr]/,re=/[Lb1n]/,le=/[1n]/;function ce(ge,Be,ze){this.level=ge,this.from=Be,this.to=ze}return function(ge,Be){var ze=Be=="ltr"?"L":"R";if(ge.length==0||Be=="ltr"&&!L.test(ge))return!1;for(var at=ge.length,nt=[],_t=0;_t<at;++_t)nt.push(R(ge.charCodeAt(_t)));for(var At=0,It=ze;At<at;++At){var zt=nt[At];zt=="m"?nt[At]=It:It=zt}for(var Zt=0,Gt=ze;Zt<at;++Zt){var tn=nt[Zt];tn=="1"&&Gt=="r"?nt[Zt]="n":H.test(tn)&&(Gt=tn,tn=="r"&&(nt[Zt]="R"))}for(var Sn=1,mn=nt[0];Sn<at-1;++Sn){var Vn=nt[Sn];Vn=="+"&&mn=="1"&&nt[Sn+1]=="1"?nt[Sn]="1":Vn==","&&mn==nt[Sn+1]&&(mn=="1"||mn=="n")&&(nt[Sn]=mn),mn=Vn}for(var Sr=0;Sr<at;++Sr){var Zr=nt[Sr];if(Zr==",")nt[Sr]="N";else if(Zr=="%"){var Mr=void 0;for(Mr=Sr+1;Mr<at&&nt[Mr]=="%";++Mr);for(var Ci=Sr&&nt[Sr-1]=="!"||Mr<at&&nt[Mr]=="1"?"1":"N",bi=Sr;bi<Mr;++bi)nt[bi]=Ci;Sr=Mr-1}}for(var zr=0,_i=ze;zr<at;++zr){var ni=nt[zr];_i=="L"&&ni=="1"?nt[zr]="L":H.test(ni)&&(_i=ni)}for(var $r=0;$r<at;++$r)if(k.test(nt[$r])){var Gr=void 0;for(Gr=$r+1;Gr<at&&k.test(nt[Gr]);++Gr);for(var Nr=($r?nt[$r-1]:ze)=="L",Ei=(Gr<at?nt[Gr]:ze)=="L",Da=Nr==Ei?Nr?"L":"R":ze,la=$r;la<Gr;++la)nt[la]=Da;$r=Gr-1}for(var oi=[],Xi,ei=0;ei<at;)if(re.test(nt[ei])){var Fo=ei;for(++ei;ei<at&&re.test(nt[ei]);++ei);oi.push(new ce(0,Fo,ei))}else{var Ji=ei,ga=oi.length,ya=Be=="rtl"?1:0;for(++ei;ei<at&&nt[ei]!="L";++ei);for(var ci=Ji;ci<ei;)if(le.test(nt[ci])){Ji<ci&&(oi.splice(ga,0,new ce(1,Ji,ci)),ga+=ya);var Pa=ci;for(++ci;ci<ei&&le.test(nt[ci]);++ci);oi.splice(ga,0,new ce(2,Pa,ci)),ga+=ya,Ji=ci}else++ci;Ji<ei&&oi.splice(ga,0,new ce(1,Ji,ei))}return Be=="ltr"&&(oi[0].level==1&&(Xi=ge.match(/^\s+/))&&(oi[0].from=Xi[0].length,oi.unshift(new ce(0,0,Xi[0].length))),Fe(oi).level==1&&(Xi=ge.match(/\s+$/))&&(Fe(oi).to-=Xi[0].length,oi.push(new ce(0,at-Xi[0].length,at)))),Be=="rtl"?oi.reverse():oi}}();function rt(e,r){var R=e.order;return R==null&&(R=e.order=Re(e.text,r)),R}var Pe=[],Ie=function(e,r,R){if(e.addEventListener)e.addEventListener(r,R,!1);else if(e.attachEvent)e.attachEvent("on"+r,R);else{var L=e._handlers||(e._handlers={});L[r]=(L[r]||Pe).concat(R)}};function Xe(e,r){return e._handlers&&e._handlers[r]||Pe}function tt(e,r,R){if(e.removeEventListener)e.removeEventListener(r,R,!1);else if(e.detachEvent)e.detachEvent("on"+r,R);else{var L=e._handlers,k=L&&L[r];if(k){var H=B(k,R);H>-1&&(L[r]=k.slice(0,H).concat(k.slice(H+1)))}}}function Ve(e,r){var R=Xe(e,r);if(!R.length)return;for(var L=Array.prototype.slice.call(arguments,2),k=0;k<R.length;++k)R[k].apply(null,L)}function Ke(e,r,R){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),Ve(e,R||r.type,e,r),Ee(r)||r.codemirrorIgnore}function Ne(e){var r=e._handlers&&e._handlers.cursorActivity;if(!r)return;for(var R=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),L=0;L<r.length;++L)B(R,r[L])==-1&&R.push(r[L])}function De(e,r){return Xe(e,r).length>0}function _e(e){e.prototype.on=function(r,R){Ie(this,r,R)},e.prototype.off=function(r,R){tt(this,r,R)}}function he(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ve(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function be(e){he(e),ve(e)}function Ge(e){return e.target||e.srcElement}function qe(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),t&&e.ctrlKey&&r==1&&(r=3),r}var pt=function(){if(C&&T<9)return!1;var e=x("div");return"draggable"in e||"dragDrop"in e}(),Pt;function Rt(e){if(Pt==null){var r=x("span","\u200B");a(e,x("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Pt=r.offsetWidth<=1&&r.offsetHeight>2&&!(C&&T<8))}var R=Pt?x("span","\u200B"):x("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var Mt;function wt(e){if(Mt!=null)return Mt;var r=a(e,document.createTextNode("A\u062EA")),R=A(r,0,1).getBoundingClientRect(),L=A(r,1,2).getBoundingClientRect();return E(e),!R||R.left==R.right?!1:Mt=L.right-R.right<3}var lt=`
b`.split(/\n/).length!=3?function(e){for(var r=0,R=[],L=e.length;r<=L;){var k=e.indexOf(`
`,r);k==-1&&(k=e.length);var H=e.slice(r,e.charAt(k-1)=="\r"?k-1:k),re=H.indexOf("\r");re!=-1?(R.push(H.slice(0,re)),r+=re+1):(R.push(H),r=k+1)}return R}:function(e){return e.split(/\r\n?|\n/)},ft=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(R){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},Qe=function(){var e=x("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Te=null;function je(e){if(Te!=null)return Te;var r=a(e,x("span","x")),R=r.getBoundingClientRect(),L=A(r,0,1).getBoundingClientRect();return Te=Math.abs(R.left-L.left)>1}var ct={},Ze={};function Tt(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),ct[e]=r}function Ot(e,r){Ze[e]=r}function st(e){if(typeof e=="string"&&Ze.hasOwnProperty(e))e=Ze[e];else if(e&&typeof e.name=="string"&&Ze.hasOwnProperty(e.name)){var r=Ze[e.name];typeof r=="string"&&(r={name:r}),e=de(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return st("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return st("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function gt(e,r){r=st(r);var R=ct[r.name];if(!R)return gt(e,"text/plain");var L=R(e,r);if(kt.hasOwnProperty(r.name)){var k=kt[r.name];for(var H in k){if(!k.hasOwnProperty(H))continue;L.hasOwnProperty(H)&&(L["_"+H]=L[H]),L[H]=k[H]}}if(L.name=r.name,r.helperType&&(L.helperType=r.helperType),r.modeProps)for(var re in r.modeProps)L[re]=r.modeProps[re];return L}var kt={};function Wt(e,r){var R=kt.hasOwnProperty(e)?kt[e]:kt[e]={};G(r,R)}function Qt(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var R={};for(var L in r){var k=r[L];k instanceof Array&&(k=k.concat([])),R[L]=k}return R}function we(e,r){for(var R;e.innerMode&&!(R=e.innerMode(r),!R||R.mode==e);)r=R.state,e=R.mode;return R||{mode:e,state:r}}function fe(e,r,R){return e.startState?e.startState(r,R):!0}var W=function(e,r,R){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=R};W.prototype.eol=function(){return this.pos>=this.string.length},W.prototype.sol=function(){return this.pos==this.lineStart},W.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},W.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},W.prototype.eat=function(e){var r=this.string.charAt(this.pos),R;if(typeof e=="string"?R=r==e:R=r&&(e.test?e.test(r):e(r)),R)return++this.pos,r},W.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},W.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},W.prototype.skipToEnd=function(){this.pos=this.string.length},W.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},W.prototype.backUp=function(e){this.pos-=e},W.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=X(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},W.prototype.indentation=function(){return X(this.string,null,this.tabSize)-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},W.prototype.match=function(e,r,R){if(typeof e=="string"){var L=function(re){return R?re.toLowerCase():re},k=this.string.substr(this.pos,e.length);if(L(k)==L(e))return r!==!1&&(this.pos+=e.length),!0}else{var H=this.string.slice(this.pos).match(e);return H&&H.index>0?null:(H&&r!==!1&&(this.pos+=H[0].length),H)}},W.prototype.current=function(){return this.string.slice(this.start,this.pos)},W.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},W.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},W.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function q(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var R=e;!R.lines;)for(var L=0;;++L){var k=R.children[L],H=k.chunkSize();if(r<H){R=k;break}r-=H}return R.lines[r]}function te(e,r,R){var L=[],k=r.line;return e.iter(r.line,R.line+1,function(H){var re=H.text;k==R.line&&(re=re.slice(0,R.ch)),k==r.line&&(re=re.slice(r.ch)),L.push(re),++k}),L}function se(e,r,R){var L=[];return e.iter(r,R,function(k){L.push(k.text)}),L}function Se(e,r){var R=r-e.height;if(R)for(var L=e;L;L=L.parent)L.height+=R}function He(e){if(e.parent==null)return null;for(var r=e.parent,R=B(r.lines,e),L=r.parent;L;r=L,L=L.parent)for(var k=0;!(L.children[k]==r);++k)R+=L.children[k].chunkSize();return R+r.first}function Je(e,r){var R=e.first;e:do{for(var L=0;L<e.children.length;++L){var k=e.children[L],H=k.height;if(r<H){e=k;continue e}r-=H,R+=k.chunkSize()}return R}while(!e.lines);for(var re=0;re<e.lines.length;++re){var le=e.lines[re],ce=le.height;if(r<ce)break;r-=ce}return R+re}function xt(e,r){return r>=e.first&&r<e.first+e.size}function Ct(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function it(e,r,R){if(R===void 0&&(R=null),!(this instanceof it))return new it(e,r,R);this.line=e,this.ch=r,this.sticky=R}function St(e,r){return e.line-r.line||e.ch-r.ch}function Xt(e,r){return e.sticky==r.sticky&&St(e,r)==0}function bt(e){return it(e.line,e.ch)}function ht(e,r){return St(e,r)<0?r:e}function Jt(e,r){return St(e,r)<0?e:r}function Nt(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function mt(e,r){if(r.line<e.first)return it(e.first,0);var R=e.first+e.size-1;return r.line>R?it(R,q(e,R).text.length):cn(r,q(e,r.line).text.length)}function cn(e,r){var R=e.ch;return R==null||R>r?it(e.line,r):R<0?it(e.line,0):e}function bn(e,r){for(var R=[],L=0;L<r.length;L++)R[L]=mt(e,r[L]);return R}var sn=function(e,r){this.state=e,this.lookAhead=r},dn=function(e,r,R,L){this.state=r,this.doc=e,this.line=R,this.maxLookAhead=L||0,this.baseTokens=null,this.baseTokenPos=1};dn.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},dn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},dn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},dn.fromSaved=function(e,r,R){return r instanceof sn?new dn(e,Qt(e.mode,r.state),R,r.lookAhead):new dn(e,Qt(e.mode,r),R)},dn.prototype.save=function(e){var r=e!==!1?Qt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new sn(r,this.maxLookAhead):r};function Nn(e,r,R,L){var k=[e.state.modeGen],H={};jn(e,r.text,e.doc.mode,R,function(ge,Be){return k.push(ge,Be)},H,L);for(var re=R.state,le=function(ge){R.baseTokens=k;var Be=e.state.overlays[ge],ze=1,at=0;R.state=!0,jn(e,r.text,Be.mode,R,function(nt,_t){for(var At=ze;at<nt;){var It=k[ze];It>nt&&k.splice(ze,1,nt,k[ze+1],It),ze+=2,at=Math.min(nt,It)}if(!_t)return;if(Be.opaque)k.splice(At,ze-At,nt,"overlay "+_t),ze=At+2;else for(;At<ze;At+=2){var zt=k[At+1];k[At+1]=(zt?zt+" ":"")+"overlay "+_t}},H),R.state=re,R.baseTokens=null,R.baseTokenPos=1},ce=0;ce<e.state.overlays.length;++ce)le(ce);return{styles:k,classes:H.bgClass||H.textClass?H:null}}function Kt(e,r,R){if(!r.styles||r.styles[0]!=e.state.modeGen){var L=et(e,He(r)),k=r.text.length>e.options.maxHighlightLength&&Qt(e.doc.mode,L.state),H=Nn(e,r,L);k&&(L.state=k),r.stateAfter=L.save(!k),r.styles=H.styles,H.classes?r.styleClasses=H.classes:r.styleClasses&&(r.styleClasses=null),R===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function et(e,r,R){var L=e.doc,k=e.display;if(!L.mode.startState)return new dn(L,!0,r);var H=cr(e,r,R),re=H>L.first&&q(L,H-1).stateAfter,le=re?dn.fromSaved(L,re,H):new dn(L,fe(L.mode),H);return L.iter(H,r,function(ce){Ut(e,ce.text,le);var ge=le.line;ce.stateAfter=ge==r-1||ge%5==0||ge>=k.viewFrom&&ge<k.viewTo?le.save():null,le.nextLine()}),R&&(L.modeFrontier=le.line),le}function Ut(e,r,R,L){var k=e.doc.mode,H=new W(r,e.options.tabSize,R);for(H.start=H.pos=L||0,r==""&&Yt(k,R.state);!H.eol();)Vt(k,H,R.state),H.start=H.pos}function Yt(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var R=we(e,r);if(R.mode.blankLine)return R.mode.blankLine(R.state)}function Vt(e,r,R,L){for(var k=0;k<10;k++){L&&(L[0]=we(e,R).mode);var H=e.token(r,R);if(r.pos>r.start)return H}throw new Error("Mode "+e.name+" failed to advance stream.")}var En=function(e,r,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=R};function sr(e,r,R,L){var k=e.doc,H=k.mode,re;r=mt(k,r);var le=q(k,r.line),ce=et(e,r.line,R),ge=new W(le.text,e.options.tabSize,ce),Be;for(L&&(Be=[]);(L||ge.pos<r.ch)&&!ge.eol();)ge.start=ge.pos,re=Vt(H,ge,ce.state),L&&Be.push(new En(ge,re,Qt(k.mode,ce.state)));return L?Be:new En(ge,re,ce.state)}function nr(e,r){if(e)for(;;){var R=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!R)break;e=e.slice(0,R.index)+e.slice(R.index+R[0].length);var L=R[1]?"bgClass":"textClass";r[L]==null?r[L]=R[2]:new RegExp("(?:^|\\s)"+R[2]+"(?:$|\\s)").test(r[L])||(r[L]+=" "+R[2])}return e}function jn(e,r,R,L,k,H,re){var le=R.flattenSpans;le==null&&(le=e.options.flattenSpans);var ce=0,ge=null,Be=new W(r,e.options.tabSize,L),ze,at=e.options.addModeClass&&[null];for(r==""&&nr(Yt(R,L.state),H);!Be.eol();){if(Be.pos>e.options.maxHighlightLength?(le=!1,re&&Ut(e,r,L,Be.pos),Be.pos=r.length,ze=null):ze=nr(Vt(R,Be,L.state,at),H),at){var nt=at[0].name;nt&&(ze="m-"+(ze?nt+" "+ze:nt))}if(!le||ge!=ze){for(;ce<Be.start;)ce=Math.min(Be.start,ce+5e3),k(ce,ge);ge=ze}Be.start=Be.pos}for(;ce<Be.pos;){var _t=Math.min(Be.pos,ce+5e3);k(_t,ge),ce=_t}}function cr(e,r,R){for(var L,k,H=e.doc,re=R?-1:r-(e.doc.mode.innerMode?1e3:100),le=r;le>re;--le){if(le<=H.first)return H.first;var ce=q(H,le-1),ge=ce.stateAfter;if(ge&&(!R||le+(ge instanceof sn?ge.lookAhead:0)<=H.modeFrontier))return le;var Be=X(ce.text,null,e.options.tabSize);(k==null||L>Be)&&(k=le-1,L=Be)}return k}function qn(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontier<r-10)return;for(var R=e.first,L=r-1;L>R;L--){var k=q(e,L).stateAfter;if(k&&(!(k instanceof sn)||L+k.lookAhead<r)){R=L+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,R)}var Wr=!1,_r=!1;function Rr(){Wr=!0}function Tr(){_r=!0}function Vr(e,r,R){this.marker=e,this.from=r,this.to=R}function Ur(e,r){if(e)for(var R=0;R<e.length;++R){var L=e[R];if(L.marker==r)return L}}function xi(e,r){for(var R,L=0;L<e.length;++L)e[L]!=r&&(R||(R=[])).push(e[L]);return R}function kr(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function Oi(e,r,R){var L;if(e)for(var k=0;k<e.length;++k){var H=e[k],re=H.marker,le=H.from==null||(re.inclusiveLeft?H.from<=r:H.from<r);if(le||H.from==r&&re.type=="bookmark"&&(!R||!H.marker.insertLeft)){var ce=H.to==null||(re.inclusiveRight?H.to>=r:H.to>r);(L||(L=[])).push(new Vr(re,H.from,ce?null:H.to))}}return L}function ri(e,r,R){var L;if(e)for(var k=0;k<e.length;++k){var H=e[k],re=H.marker,le=H.to==null||(re.inclusiveRight?H.to>=r:H.to>r);if(le||H.from==r&&re.type=="bookmark"&&(!R||H.marker.insertLeft)){var ce=H.from==null||(re.inclusiveLeft?H.from<=r:H.from<r);(L||(L=[])).push(new Vr(re,ce?null:H.from-r,H.to==null?null:H.to-r))}}return L}function Xr(e,r){if(r.full)return null;var R=xt(e,r.from.line)&&q(e,r.from.line).markedSpans,L=xt(e,r.to.line)&&q(e,r.to.line).markedSpans;if(!R&&!L)return null;var k=r.from.ch,H=r.to.ch,re=St(r.from,r.to)==0,le=Oi(R,k,re),ce=ri(L,H,re),ge=r.text.length==1,Be=Fe(r.text).length+(ge?k:0);if(le)for(var ze=0;ze<le.length;++ze){var at=le[ze];if(at.to==null){var nt=Ur(ce,at.marker);nt?ge&&(at.to=nt.to==null?null:nt.to+Be):at.to=k}}if(ce)for(var _t=0;_t<ce.length;++_t){var At=ce[_t];if(At.to!=null&&(At.to+=Be),At.from==null){var It=Ur(le,At.marker);It||(At.from=Be,ge&&(le||(le=[])).push(At))}else At.from+=Be,ge&&(le||(le=[])).push(At)}le&&(le=di(le)),ce&&ce!=le&&(ce=di(ce));var zt=[le];if(!ge){var Zt=r.text.length-2,Gt;if(Zt>0&&le)for(var tn=0;tn<le.length;++tn)le[tn].to==null&&(Gt||(Gt=[])).push(new Vr(le[tn].marker,null,null));for(var Sn=0;Sn<Zt;++Sn)zt.push(Gt);zt.push(ce)}return zt}function di(e){for(var r=0;r<e.length;++r){var R=e[r];R.from!=null&&R.from==R.to&&R.marker.clearWhenEmpty!==!1&&e.splice(r--,1)}return e.length?e:null}function Si(e,r,R){var L=null;if(e.iter(r.line,R.line+1,function(nt){if(nt.markedSpans)for(var _t=0;_t<nt.markedSpans.length;++_t){var At=nt.markedSpans[_t].marker;At.readOnly&&(!L||B(L,At)==-1)&&(L||(L=[])).push(At)}}),!L)return null;for(var k=[{from:r,to:R}],H=0;H<L.length;++H)for(var re=L[H],le=re.find(0),ce=0;ce<k.length;++ce){var ge=k[ce];if(St(ge.to,le.from)<0||St(ge.from,le.to)>0)continue;var Be=[ce,1],ze=St(ge.from,le.from),at=St(ge.to,le.to);(ze<0||!re.inclusiveLeft&&!ze)&&Be.push({from:ge.from,to:le.from}),(at>0||!re.inclusiveRight&&!at)&&Be.push({from:le.to,to:ge.to}),k.splice.apply(k,Be),ce+=Be.length-3}return k}function si(e){var r=e.markedSpans;if(!r)return;for(var R=0;R<r.length;++R)r[R].marker.detachLine(e);e.markedSpans=null}function fi(e,r){if(!r)return;for(var R=0;R<r.length;++R)r[R].marker.attachLine(e);e.markedSpans=r}function gr(e){return e.inclusiveLeft?-1:0}function dr(e){return e.inclusiveRight?1:0}function ii(e,r){var R=e.lines.length-r.lines.length;if(R!=0)return R;var L=e.find(),k=r.find(),H=St(L.from,k.from)||gr(e)-gr(r);if(H)return-H;var re=St(L.to,k.to)||dr(e)-dr(r);return re||r.id-e.id}function li(e,r){var R=_r&&e.markedSpans,L;if(R)for(var k=void 0,H=0;H<R.length;++H)k=R[H],k.marker.collapsed&&(r?k.from:k.to)==null&&(!L||ii(L,k.marker)<0)&&(L=k.marker);return L}function Ni(e){return li(e,!0)}function wi(e){return li(e,!1)}function ua(e,r){var R=_r&&e.markedSpans,L;if(R)for(var k=0;k<R.length;++k){var H=R[k];H.marker.collapsed&&(H.from==null||H.from<r)&&(H.to==null||H.to>r)&&(!L||ii(L,H.marker)<0)&&(L=H.marker)}return L}function ca(e,r,R,L,k){var H=q(e,r),re=_r&&H.markedSpans;if(re)for(var le=0;le<re.length;++le){var ce=re[le];if(!ce.marker.collapsed)continue;var ge=ce.marker.find(0),Be=St(ge.from,R)||gr(ce.marker)-gr(k),ze=St(ge.to,L)||dr(ce.marker)-dr(k);if(Be>=0&&ze<=0||Be<=0&&ze>=0)continue;if(Be<=0&&(ce.marker.inclusiveRight&&k.inclusiveLeft?St(ge.to,R)>=0:St(ge.to,R)>0)||Be>=0&&(ce.marker.inclusiveRight&&k.inclusiveLeft?St(ge.from,L)<=0:St(ge.from,L)<0))return!0}}function hi(e){for(var r;r=Ni(e);)e=r.find(-1,!0).line;return e}function Zi(e){for(var r;r=wi(e);)e=r.find(1,!0).line;return e}function ln(e){for(var r,R;r=wi(e);)e=r.find(1,!0).line,(R||(R=[])).push(e);return R}function Tn(e,r){var R=q(e,r),L=hi(R);return R==L?r:He(L)}function On(e,r){if(r>e.lastLine())return r;var R=q(e,r),L;if(!rr(e,R))return r;for(;L=wi(R);)R=L.find(1,!0).line;return He(R)+1}function rr(e,r){var R=_r&&r.markedSpans;if(R)for(var L=void 0,k=0;k<R.length;++k){if(L=R[k],!L.marker.collapsed)continue;if(L.from==null)return!0;if(L.marker.widgetNode)continue;if(L.from==0&&L.marker.inclusiveLeft&&ar(e,r,L))return!0}}function ar(e,r,R){if(R.to==null){var L=R.marker.find(1,!0);return ar(e,L.line,Ur(L.line.markedSpans,R.marker))}if(R.marker.inclusiveRight&&R.to==r.text.length)return!0;for(var k=void 0,H=0;H<r.markedSpans.length;++H)if(k=r.markedSpans[H],k.marker.collapsed&&!k.marker.widgetNode&&k.from==R.to&&(k.to==null||k.to!=R.from)&&(k.marker.inclusiveLeft||R.marker.inclusiveRight)&&ar(e,r,k))return!0}function pr(e){e=hi(e);for(var r=0,R=e.parent,L=0;L<R.lines.length;++L){var k=R.lines[L];if(k==e)break;r+=k.height}for(var H=R.parent;H;R=H,H=R.parent)for(var re=0;re<H.children.length;++re){var le=H.children[re];if(le==R)break;r+=le.height}return r}function Er(e){if(e.height==0)return 0;for(var r=e.text.length,R,L=e;R=Ni(L);){var k=R.find(0,!0);L=k.from.line,r+=k.from.ch-k.to.ch}for(L=e;R=wi(L);){var H=R.find(0,!0);r-=L.text.length-H.from.ch,L=H.to.line,r+=L.text.length-H.to.ch}return r}function Cr(e){var r=e.display,R=e.doc;r.maxLine=q(R,R.first),r.maxLineLength=Er(r.maxLine),r.maxLineChanged=!0,R.iter(function(L){var k=Er(L);k>r.maxLineLength&&(r.maxLineLength=k,r.maxLine=L)})}var xr=function(e,r,R){this.text=e,fi(this,r),this.height=R?R(this):1};xr.prototype.lineNo=function(){return He(this)},_e(xr);function pi(e,r,R,L){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),si(e),fi(e,R);var k=L?L(e):1;k!=e.height&&Se(e,k)}function Or(e){e.parent=null,si(e)}var Ai={},Dr={};function mi(e,r){if(!e||/^\s*$/.test(e))return null;var R=r.addModeClass?Dr:Ai;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function vi(e,r){var R=O("span",null,null,l?"padding-right: .1px":null),L={pre:O("pre",[R],"CodeMirror-line"),content:R,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var k=0;k<=(r.rest?r.rest.length:0);k++){var H=k?r.rest[k-1]:r.line,re=void 0;L.pos=0,L.addToken=Ma,wt(e.display.measure)&&(re=rt(H,e.doc.direction))&&(L.addToken=Mn(L.addToken,re)),L.map=[];var le=r!=e.display.externalMeasured&&He(H);da(H,L,Kt(e,H,le)),H.styleClasses&&(H.styleClasses.bgClass&&(L.bgClass=K(H.styleClasses.bgClass,L.bgClass||"")),H.styleClasses.textClass&&(L.textClass=K(H.styleClasses.textClass,L.textClass||""))),L.map.length==0&&L.map.push(0,0,L.content.appendChild(Rt(e.display.measure))),k==0?(r.measure.map=L.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(L.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(l){var ce=L.content.lastChild;(/\bcm-tab\b/.test(ce.className)||ce.querySelector&&ce.querySelector(".cm-tab"))&&(L.content.className="cm-tab-wrap-hack")}return Ve(e,"renderLine",e,r.line,L.pre),L.pre.className&&(L.textClass=K(L.pre.className,L.textClass||"")),L}function Yi(e){var r=x("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function Ma(e,r,R,L,k,H,re){if(!r)return;var le=e.splitSpaces?ba(r,e.trailingSpace):r,ce=e.cm.state.specialChars,ge=!1,Be;if(!ce.test(r))e.col+=r.length,Be=document.createTextNode(le),e.map.push(e.pos,e.pos+r.length,Be),C&&T<9&&(ge=!0),e.pos+=r.length;else{Be=document.createDocumentFragment();for(var ze=0;;){ce.lastIndex=ze;var at=ce.exec(r),nt=at?at.index-ze:r.length-ze;if(nt){var _t=document.createTextNode(le.slice(ze,ze+nt));C&&T<9?Be.appendChild(x("span",[_t])):Be.appendChild(_t),e.map.push(e.pos,e.pos+nt,_t),e.col+=nt,e.pos+=nt}if(!at)break;ze+=nt+1;var At=void 0;if(at[0]==" "){var It=e.cm.options.tabSize,zt=It-e.col%It;At=Be.appendChild(x("span",Oe(zt),"cm-tab")),At.setAttribute("role","presentation"),At.setAttribute("cm-text"," "),e.col+=zt}else at[0]=="\r"||at[0]==`
`?(At=Be.appendChild(x("span",at[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),At.setAttribute("cm-text",at[0]),e.col+=1):(At=e.cm.options.specialCharPlaceholder(at[0]),At.setAttribute("cm-text",at[0]),C&&T<9?Be.appendChild(x("span",[At])):Be.appendChild(At),e.col+=1);e.map.push(e.pos,e.pos+1,At),e.pos++}}if(e.trailingSpace=le.charCodeAt(r.length-1)==32,R||L||k||ge||H||re){var Zt=R||"";L&&(Zt+=L),k&&(Zt+=k);var Gt=x("span",[Be],Zt,H);if(re)for(var tn in re)re.hasOwnProperty(tn)&&tn!="style"&&tn!="class"&&Gt.setAttribute(tn,re[tn]);return e.content.appendChild(Gt)}e.content.appendChild(Be)}function ba(e,r){if(e.length>1&&!/ /.test(e))return e;for(var R=r,L="",k=0;k<e.length;k++){var H=e.charAt(k);H==" "&&R&&(k==e.length-1||e.charCodeAt(k+1)==32)&&(H="\xA0"),L+=H,R=H==" "}return L}function Mn(e,r){return function(R,L,k,H,re,le,ce){k=k?k+" cm-force-border":"cm-force-border";for(var ge=R.pos,Be=ge+L.length;;){for(var ze=void 0,at=0;at<r.length&&!(ze=r[at],ze.to>ge&&ze.from<=ge);at++);if(ze.to>=Be)return e(R,L,k,H,re,le,ce);e(R,L.slice(0,ze.to-ge),k,H,null,le,ce),H=null,L=L.slice(ze.to-ge),ge=ze.to}}}function zi(e,r,R,L){var k=!L&&R.widgetNode;k&&e.map.push(e.pos,e.pos+r,k),!L&&e.cm.display.input.needsContentAttribute&&(k||(k=e.content.appendChild(document.createElement("span"))),k.setAttribute("cm-marker",R.id)),k&&(e.cm.display.input.setUneditable(k),e.content.appendChild(k)),e.pos+=r,e.trailingSpace=!1}function da(e,r,R){var L=e.markedSpans,k=e.text,H=0;if(!L){for(var re=1;re<R.length;re+=2)r.addToken(r,k.slice(H,H=R[re]),mi(R[re+1],r.cm.options));return}for(var le=k.length,ce=0,ge=1,Be="",ze,at,nt=0,_t,At,It,zt,Zt;;){if(nt==ce){_t=At=It=at="",Zt=null,zt=null,nt=Infinity;for(var Gt=[],tn=void 0,Sn=0;Sn<L.length;++Sn){var mn=L[Sn],Vn=mn.marker;if(Vn.type=="bookmark"&&mn.from==ce&&Vn.widgetNode)Gt.push(Vn);else if(mn.from<=ce&&(mn.to==null||mn.to>ce||Vn.collapsed&&mn.to==ce&&mn.from==ce)){if(mn.to!=null&&mn.to!=ce&&nt>mn.to&&(nt=mn.to,At=""),Vn.className&&(_t+=" "+Vn.className),Vn.css&&(at=(at?at+";":"")+Vn.css),Vn.startStyle&&mn.from==ce&&(It+=" "+Vn.startStyle),Vn.endStyle&&mn.to==nt&&(tn||(tn=[])).push(Vn.endStyle,mn.to),Vn.title&&((Zt||(Zt={})).title=Vn.title),Vn.attributes)for(var Sr in Vn.attributes)(Zt||(Zt={}))[Sr]=Vn.attributes[Sr];Vn.collapsed&&(!zt||ii(zt.marker,Vn)<0)&&(zt=mn)}else mn.from>ce&&nt>mn.from&&(nt=mn.from)}if(tn)for(var Zr=0;Zr<tn.length;Zr+=2)tn[Zr+1]==nt&&(At+=" "+tn[Zr]);if(!zt||zt.from==ce)for(var Mr=0;Mr<Gt.length;++Mr)zi(r,0,Gt[Mr]);if(zt&&(zt.from||0)==ce){if(zi(r,(zt.to==null?le+1:zt.to)-ce,zt.marker,zt.from==null),zt.to==null)return;zt.to==ce&&(zt=!1)}}if(ce>=le)break;for(var Ci=Math.min(le,nt);;){if(Be){var bi=ce+Be.length;if(!zt){var zr=bi>Ci?Be.slice(0,Ci-ce):Be;r.addToken(r,zr,ze?ze+_t:_t,It,ce+zr.length==nt?At:"",at,Zt)}if(bi>=Ci){Be=Be.slice(Ci-ce),ce=Ci;break}ce=bi,It=""}Be=k.slice(H,H=R[ge++]),ze=mi(R[ge++],r.cm.options)}}}function _a(e,r,R){this.line=r,this.rest=ln(r),this.size=this.rest?He(Fe(this.rest))-R+1:1,this.node=this.text=null,this.hidden=rr(e,r)}function $i(e,r,R){for(var L=[],k,H=r;H<R;H=k){var re=new _a(e.doc,q(e.doc,H),H);k=H+re.size,L.push(re)}return L}var Gi=null;function ka(e){Gi?Gi.ops.push(e):e.ownsGroup=Gi={ops:[e],delayedCallbacks:[]}}function ot(e){var r=e.delayedCallbacks,R=0;do{for(;R<r.length;R++)r[R].call(null);for(var L=0;L<e.ops.length;L++){var k=e.ops[L];if(k.cursorActivityHandlers)for(;k.cursorActivityCalled<k.cursorActivityHandlers.length;)k.cursorActivityHandlers[k.cursorActivityCalled++].call(null,k.cm)}}while(R<r.length)}function ut(e,r){var R=e.ownsGroup;if(!R)return;try{ot(R)}finally{Gi=null,r(R)}}var Et=null;function Dt(e,r){var R=Xe(e,r);if(!R.length)return;var L=Array.prototype.slice.call(arguments,2),k;Gi?k=Gi.delayedCallbacks:Et?k=Et:(k=Et=[],setTimeout(on,0));for(var H=function(le){k.push(function(){return R[le].apply(null,L)})},re=0;re<R.length;++re)H(re)}function on(){var e=Et;Et=null;for(var r=0;r<e.length;++r)e[r]()}function an(e,r,R,L){for(var k=0;k<r.changes.length;k++){var H=r.changes[k];H=="text"?yt(e,r):H=="gutter"?Lt(e,r,R,L):H=="class"?en(e,r):H=="widget"&&rn(e,r,L)}r.changes=null}function vt(e){return e.node==e.text&&(e.node=x("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),C&&T<8&&(e.node.style.zIndex=2)),e.node}function dt(e,r){var R=r.bgClass?r.bgClass+" "+(r.line.bgClass||""):r.line.bgClass;if(R&&(R+=" CodeMirror-linebackground"),r.background)R?r.background.className=R:(r.background.parentNode.removeChild(r.background),r.background=null);else if(R){var L=vt(r);r.background=L.insertBefore(x("div",null,R),L.firstChild),e.display.input.setUneditable(r.background)}}function Ht(e,r){var R=e.display.externalMeasured;return R&&R.line==r.line?(e.display.externalMeasured=null,r.measure=R.measure,R.built):vi(e,r)}function yt(e,r){var R=r.text.className,L=Ht(e,r);r.text==r.node&&(r.node=L.pre),r.text.parentNode.replaceChild(L.pre,r.text),r.text=L.pre,L.bgClass!=r.bgClass||L.textClass!=r.textClass?(r.bgClass=L.bgClass,r.textClass=L.textClass,en(e,r)):R&&(r.text.className=R)}function en(e,r){dt(e,r),r.line.wrapClass?vt(r).className=r.line.wrapClass:r.node!=r.text&&(r.node.className="");var R=r.textClass?r.textClass+" "+(r.line.textClass||""):r.line.textClass;r.text.className=R||""}function Lt(e,r,R,L){if(r.gutter&&(r.node.removeChild(r.gutter),r.gutter=null),r.gutterBackground&&(r.node.removeChild(r.gutterBackground),r.gutterBackground=null),r.line.gutterClass){var k=vt(r);r.gutterBackground=x("div",null,"CodeMirror-gutter-background "+r.line.gutterClass,"left: "+(e.options.fixedGutter?L.fixedPos:-L.gutterTotalWidth)+"px; width: "+L.gutterTotalWidth+"px"),e.display.input.setUneditable(r.gutterBackground),k.insertBefore(r.gutterBackground,r.text)}var H=r.line.gutterMarkers;if(e.options.lineNumbers||H){var re=vt(r),le=r.gutter=x("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?L.fixedPos:-L.gutterTotalWidth)+"px");if(e.display.input.setUneditable(le),re.insertBefore(le,r.text),r.line.gutterClass&&(le.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!H||!H["CodeMirror-linenumbers"])&&(r.lineNumber=le.appendChild(x("div",Ct(e.options,R),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+L.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),H)for(var ce=0;ce<e.display.gutterSpecs.length;++ce){var ge=e.display.gutterSpecs[ce].className,Be=H.hasOwnProperty(ge)&&H[ge];Be&&le.appendChild(x("div",[Be],"CodeMirror-gutter-elt","left: "+L.gutterLeft[ge]+"px; width: "+L.gutterWidth[ge]+"px"))}}}function rn(e,r,R){r.alignable&&(r.alignable=null);for(var L=v("CodeMirror-linewidget"),k=r.node.firstChild,H=void 0;k;k=H)H=k.nextSibling,L.test(k.className)&&r.node.removeChild(k);An(e,r,R)}function Hn(e,r,R,L){var k=Ht(e,r);return r.text=r.node=k.pre,k.bgClass&&(r.bgClass=k.bgClass),k.textClass&&(r.textClass=k.textClass),en(e,r),Lt(e,r,R,L),An(e,r,L),r.node}function An(e,r,R){if(vn(e,r.line,r,R,!0),r.rest)for(var L=0;L<r.rest.length;L++)vn(e,r.rest[L],r,R,!1)}function vn(e,r,R,L,k){if(!r.widgets)return;for(var H=vt(R),re=0,le=r.widgets;re<le.length;++re){var ce=le[re],ge=x("div",[ce.node],"CodeMirror-linewidget"+(ce.className?" "+ce.className:""));ce.handleMouseEvents||ge.setAttribute("cm-ignore-events","true"),Xn(ce,ge,R,L),e.display.input.setUneditable(ge),k&&ce.above?H.insertBefore(ge,R.gutter||R.text):H.appendChild(ge),Dt(ce,"redraw")}}function Xn(e,r,R,L){if(e.noHScroll){(R.alignable||(R.alignable=[])).push(r);var k=L.wrapperWidth;r.style.left=L.fixedPos+"px",e.coverGutter||(k-=L.gutterTotalWidth,r.style.paddingLeft=L.gutterTotalWidth+"px"),r.style.width=k+"px"}e.coverGutter&&(r.style.zIndex=5,r.style.position="relative",e.noHScroll||(r.style.marginLeft=-L.gutterTotalWidth+"px"))}function Cn(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!D(document.body,e.node)){var R="position: relative;";e.coverGutter&&(R+="margin-left: -"+r.display.gutters.offsetWidth+"px;"),e.noHScroll&&(R+="width: "+r.display.wrapper.clientWidth+"px;"),a(r.display.measure,x("div",[e.node],null,R))}return e.height=e.node.parentNode.offsetHeight}function Ln(e,r){for(var R=Ge(r);R!=e.wrapper;R=R.parentNode)if(!R||R.nodeType==1&&R.getAttribute("cm-ignore-events")=="true"||R.parentNode==e.sizer&&R!=e.mover)return!0}function Fn(e){return e.lineSpace.offsetTop}function yr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Qn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=a(e.measure,x("pre","x","CodeMirror-line-like")),R=window.getComputedStyle?window.getComputedStyle(r):r.currentStyle,L={left:parseInt(R.paddingLeft),right:parseInt(R.paddingRight)};return!isNaN(L.left)&&!isNaN(L.right)&&(e.cachedPaddingH=L),L}function ir(e){return Q-e.display.nativeBarWidth}function lr(e){return e.display.scroller.clientWidth-ir(e)-e.display.barWidth}function mr(e){return e.display.scroller.clientHeight-ir(e)-e.display.barHeight}function Jn(e,r,R){var L=e.options.lineWrapping,k=L&&lr(e);if(!r.measure.heights||L&&r.measure.width!=k){var H=r.measure.heights=[];if(L){r.measure.width=k;for(var re=r.text.firstChild.getClientRects(),le=0;le<re.length-1;le++){var ce=re[le],ge=re[le+1];Math.abs(ce.bottom-ge.bottom)>2&&H.push((ce.bottom+ge.top)/2-R.top)}}H.push(R.bottom-R.top)}}function or(e,r,R){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var L=0;L<e.rest.length;L++)if(e.rest[L]==r)return{map:e.measure.maps[L],cache:e.measure.caches[L]};for(var k=0;k<e.rest.length;k++)if(He(e.rest[k])>R)return{map:e.measure.maps[k],cache:e.measure.caches[k],before:!0}}function kn(e,r){r=hi(r);var R=He(r),L=e.display.externalMeasured=new _a(e.doc,r,R);L.lineN=R;var k=L.built=vi(e,L);return L.text=k.pre,a(e.display.lineMeasure,k.pre),L}function Ft(e,r,R,L){return Zn(e,Yn(e,r),R,L)}function fn(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[qr(e,r)];var R=e.display.externalMeasured;if(R&&r>=R.lineN&&r<R.lineN+R.size)return R}function Yn(e,r){var R=He(r),L=fn(e,R);L&&!L.text?L=null:L&&L.changes&&(an(e,L,R,xn(e)),e.curOp.forceUpdate=!0),L||(L=kn(e,r));var k=or(L,r,R);return{line:r,view:L,rect:null,map:k.map,cache:k.cache,before:k.before,hasHeights:!1}}function Zn(e,r,R,L,k){r.before&&(R=-1);var H=R+(L||""),re;return r.cache.hasOwnProperty(H)?re=r.cache[H]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(Jn(e,r.view,r.rect),r.hasHeights=!0),re=hn(e,r,R,L),re.bogus||(r.cache[H]=re)),{left:re.left,right:re.right,top:k?re.rtop:re.top,bottom:k?re.rbottom:re.bottom}}var ur={left:0,right:0,top:0,bottom:0};function zn(e,r,R){for(var L,k,H,re,le,ce,ge=0;ge<e.length;ge+=3)if(le=e[ge],ce=e[ge+1],r<le?(k=0,H=1,re="left"):r<ce?(k=r-le,H=k+1):(ge==e.length-3||r==ce&&e[ge+3]>r)&&(H=ce-le,k=H-1,r>=ce&&(re="right")),k!=null){if(L=e[ge+2],le==ce&&R==(L.insertLeft?"left":"right")&&(re=R),R=="left"&&k==0)for(;ge&&e[ge-2]==e[ge-3]&&e[ge-1].insertLeft;)L=e[(ge-=3)+2],re="left";if(R=="right"&&k==ce-le)for(;ge<e.length-3&&e[ge+3]==e[ge+4]&&!e[ge+5].insertLeft;)L=e[(ge+=3)+2],re="right";break}return{node:L,start:k,end:H,collapse:re,coverStart:le,coverEnd:ce}}function Gn(e,r){var R=ur;if(r=="left")for(var L=0;L<e.length&&!((R=e[L]).left!=R.right);L++);else for(var k=e.length-1;k>=0&&!((R=e[k]).left!=R.right);k--);return R}function hn(e,r,R,L){var k=zn(r.map,R,L),H=k.node,re=k.start,le=k.end,ce=k.collapse,ge;if(H.nodeType==3){for(var Be=0;Be<4;Be++){for(;re&&M(r.line.text.charAt(k.coverStart+re));)--re;for(;k.coverStart+le<k.coverEnd&&M(r.line.text.charAt(k.coverStart+le));)++le;if(C&&T<9&&re==0&&le==k.coverEnd-k.coverStart?ge=H.parentNode.getBoundingClientRect():ge=Gn(A(H,re,le).getClientRects(),L),ge.left||ge.right||re==0)break;le=re,re=re-1,ce="right"}C&&T<11&&(ge=wn(e.display.measure,ge))}else{re>0&&(ce=L="right");var ze;e.options.lineWrapping&&(ze=H.getClientRects()).length>1?ge=ze[L=="right"?ze.length-1:0]:ge=H.getBoundingClientRect()}if(C&&T<9&&!re&&(!ge||!ge.left&&!ge.right)){var at=H.parentNode.getClientRects()[0];at?ge={left:at.left,right:at.left+Wn(e.display),top:at.top,bottom:at.bottom}:ge=ur}for(var nt=ge.top-r.rect.top,_t=ge.bottom-r.rect.top,At=(nt+_t)/2,It=r.view.measure.heights,zt=0;zt<It.length-1&&!(At<It[zt]);zt++);var Zt=zt?It[zt-1]:0,Gt=It[zt],tn={left:(ce=="right"?ge.right:ge.left)-r.rect.left,right:(ce=="left"?ge.left:ge.right)-r.rect.left,top:Zt,bottom:Gt};return!ge.left&&!ge.right&&(tn.bogus=!0),e.options.singleCursorHeightPerLine||(tn.rtop=nt,tn.rbottom=_t),tn}function wn(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!je(e))return r;var R=screen.logicalXDPI/screen.deviceXDPI,L=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*R,right:r.right*R,top:r.top*L,bottom:r.bottom*L}}function jt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var r=0;r<e.rest.length;r++)e.measure.caches[r]={}}function Bt(e){e.display.externalMeasure=null,E(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)jt(e.display.view[r])}function $t(e){Bt(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function gn(){return h&&i?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function nn(){return h&&i?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function In(e){var r=0;if(e.widgets)for(var R=0;R<e.widgets.length;++R)e.widgets[R].above&&(r+=Cn(e.widgets[R]));return r}function pn(e,r,R,L,k){if(!k){var H=In(r);R.top+=H,R.bottom+=H}if(L=="line")return R;L||(L="local");var re=pr(r);if(L=="local"?re+=Fn(e.display):re-=e.display.viewOffset,L=="page"||L=="window"){var le=e.display.lineSpace.getBoundingClientRect();re+=le.top+(L=="window"?0:nn());var ce=le.left+(L=="window"?0:gn());R.left+=ce,R.right+=ce}return R.top+=re,R.bottom+=re,R}function Dn(e,r,R){if(R=="div")return r;var L=r.left,k=r.top;if(R=="page")L-=gn(),k-=nn();else if(R=="local"||!R){var H=e.display.sizer.getBoundingClientRect();L+=H.left,k+=H.top}var re=e.display.lineSpace.getBoundingClientRect();return{left:L-re.left,top:k-re.top}}function _n(e,r,R,L,k){return L||(L=q(e.doc,r.line)),pn(e,L,Ft(e,L,r.ch,k),R)}function Bn(e,r,R,L,k,H){L=L||q(e.doc,r.line),k||(k=Yn(e,L));function re(_t,At){var It=Zn(e,k,_t,At?"right":"left",H);return At?It.left=It.right:It.right=It.left,pn(e,L,It,R)}var le=rt(L,e.doc.direction),ce=r.ch,ge=r.sticky;if(ce>=L.text.length?(ce=L.text.length,ge="before"):ce<=0&&(ce=0,ge="after"),!le)return re(ge=="before"?ce-1:ce,ge=="before");function Be(_t,At,It){var zt=le[At],Zt=zt.level==1;return re(It?_t-1:_t,Zt!=It)}var ze=me(le,ce,ge),at=Y,nt=Be(ce,ze,ge=="before");return at!=null&&(nt.other=Be(ce,at,ge!="before")),nt}function er(e,r){var R=0;r=mt(e.doc,r),e.options.lineWrapping||(R=Wn(e.display)*r.ch);var L=q(e.doc,r.line),k=pr(L)+Fn(e.display);return{left:R,right:R,top:k,bottom:k+L.height}}function fr(e,r,R,L,k){var H=it(e,r,R);return H.xRel=k,L&&(H.outside=L),H}function wr(e,r,R){var L=e.doc;if(R+=e.display.viewOffset,R<0)return fr(L.first,0,null,-1,-1);var k=Je(L,R),H=L.first+L.size-1;if(k>H)return fr(L.first+L.size-1,q(L,H).text.length,null,1,1);r<0&&(r=0);for(var re=q(L,k);;){var le=Mi(e,re,k,r,R),ce=ua(re,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ce)return le;var ge=ce.find(1);if(ge.line==k)return ge;re=q(L,k=ge.line)}}function Yr(e,r,R,L){L-=In(r);var k=r.text.length,H=$(function(re){return Zn(e,R,re-1).bottom<=L},k,0);return k=$(function(re){return Zn(e,R,re).top>L},H,k),{begin:H,end:k}}function Li(e,r,R,L){R||(R=Yn(e,r));var k=pn(e,r,Zn(e,R,L),"line").top;return Yr(e,r,R,k)}function Kr(e,r,R,L){return e.bottom<=R?!1:e.top>R?!0:(L?e.left:e.right)>r}function Mi(e,r,R,L,k){k-=pr(r);var H=Yn(e,r),re=In(r),le=0,ce=r.text.length,ge=!0,Be=rt(r,e.doc.direction);if(Be){var ze=(e.options.lineWrapping?Ui:qi)(e,r,R,H,Be,L,k);ge=ze.level!=1,le=ge?ze.from:ze.to-1,ce=ge?ze.to:ze.from-1}var at=null,nt=null,_t=$(function(Sn){var mn=Zn(e,H,Sn);return mn.top+=re,mn.bottom+=re,Kr(mn,L,k,!1)?(mn.top<=k&&mn.left<=L&&(at=Sn,nt=mn),!0):!1},le,ce),At,It,zt=!1;if(nt){var Zt=L-nt.left<nt.right-L,Gt=Zt==ge;_t=at+(Gt?0:1),It=Gt?"after":"before",At=Zt?nt.left:nt.right}else{!ge&&(_t==ce||_t==le)&&_t++,It=_t==0?"after":_t==r.text.length?"before":Zn(e,H,_t-(ge?1:0)).bottom+re<=k==ge?"after":"before";var tn=Bn(e,it(R,_t,It),"line",r,H);At=tn.left,zt=k<tn.top?-1:k>=tn.bottom?1:0}return _t=N(r.text,_t,1),fr(R,_t,It,zt,L-At)}function qi(e,r,R,L,k,H,re){var le=$(function(ze){var at=k[ze],nt=at.level!=1;return Kr(Bn(e,it(R,nt?at.to:at.from,nt?"before":"after"),"line",r,L),H,re,!0)},0,k.length-1),ce=k[le];if(le>0){var ge=ce.level!=1,Be=Bn(e,it(R,ge?ce.from:ce.to,ge?"after":"before"),"line",r,L);Kr(Be,H,re,!0)&&Be.top>re&&(ce=k[le-1])}return ce}function Ui(e,r,R,L,k,H,re){var le=Yr(e,r,L,re),ce=le.begin,ge=le.end;/\s/.test(r.text.charAt(ge-1))&&ge--;for(var Be=null,ze=null,at=0;at<k.length;at++){var nt=k[at];if(nt.from>=ge||nt.to<=ce)continue;var _t=nt.level!=1,At=Zn(e,L,_t?Math.min(ge,nt.to)-1:Math.max(ce,nt.from)).right,It=At<H?H-At+1e9:At-H;(!Be||ze>It)&&(Be=nt,ze=It)}return Be||(Be=k[k.length-1]),Be.from<ce&&(Be={from:ce,to:Be.to,level:Be.level}),Be.to>ge&&(Be={from:Be.from,to:ge,level:Be.level}),Be}var ti;function ji(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ti==null){ti=x("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)ti.appendChild(document.createTextNode("x")),ti.appendChild(x("br"));ti.appendChild(document.createTextNode("x"))}a(e.measure,ti);var R=ti.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),E(e.measure),R||1}function Wn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=x("span","xxxxxxxxxx"),R=x("pre",[r],"CodeMirror-line-like");a(e.measure,R);var L=r.getBoundingClientRect(),k=(L.right-L.left)/10;return k>2&&(e.cachedCharWidth=k),k||10}function xn(e){for(var r=e.display,R={},L={},k=r.gutters.clientLeft,H=r.gutters.firstChild,re=0;H;H=H.nextSibling,++re){var le=e.display.gutterSpecs[re].className;R[le]=H.offsetLeft+H.clientLeft+k,L[le]=H.clientWidth}return{fixedPos:$n(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:R,gutterWidth:L,wrapperWidth:r.wrapper.clientWidth}}function $n(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function tr(e){var r=ji(e.display),R=e.options.lineWrapping,L=R&&Math.max(5,e.display.scroller.clientWidth/Wn(e.display)-3);return function(k){if(rr(e.doc,k))return 0;var H=0;if(k.widgets)for(var re=0;re<k.widgets.length;re++)k.widgets[re].height&&(H+=k.widgets[re].height);return R?H+(Math.ceil(k.text.length/L)||1)*r:H+r}}function Ir(e){var r=e.doc,R=tr(e);r.iter(function(L){var k=R(L);k!=L.height&&Se(L,k)})}function Pn(e,r,R,L){var k=e.display;if(!R&&Ge(r).getAttribute("cm-not-content")=="true")return null;var H,re,le=k.lineSpace.getBoundingClientRect();try{H=r.clientX-le.left,re=r.clientY-le.top}catch(ze){return null}var ce=wr(e,H,re),ge;if(L&&ce.xRel>0&&(ge=q(e.doc,ce.line).text).length==ce.ch){var Be=X(ge,ge.length,e.options.tabSize)-ge.length;ce=it(ce.line,Math.max(0,Math.round((H-Qn(e.display).left)/Wn(e.display))-Be))}return ce}function qr(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var R=e.display.view,L=0;L<R.length;L++)if(r-=R[L].size,r<0)return L}function Pr(e,r,R,L){r==null&&(r=e.doc.first),R==null&&(R=e.doc.first+e.doc.size),L||(L=0);var k=e.display;if(L&&R<k.viewTo&&(k.updateLineNumbers==null||k.updateLineNumbers>r)&&(k.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=k.viewTo)_r&&Tn(e.doc,r)<k.viewTo&&gi(e);else if(R<=k.viewFrom)_r&&On(e.doc,R+L)>k.viewFrom?gi(e):(k.viewFrom+=L,k.viewTo+=L);else if(r<=k.viewFrom&&R>=k.viewTo)gi(e);else if(r<=k.viewFrom){var H=Ri(e,R,R+L,1);H?(k.view=k.view.slice(H.index),k.viewFrom=H.lineN,k.viewTo+=L):gi(e)}else if(R>=k.viewTo){var re=Ri(e,r,r,-1);re?(k.view=k.view.slice(0,re.index),k.viewTo=re.lineN):gi(e)}else{var le=Ri(e,r,r,-1),ce=Ri(e,R,R+L,1);le&&ce?(k.view=k.view.slice(0,le.index).concat($i(e,le.lineN,ce.lineN)).concat(k.view.slice(ce.index)),k.viewTo+=L):gi(e)}var ge=k.externalMeasured;ge&&(R<ge.lineN?ge.lineN+=L:r<ge.lineN+ge.size&&(k.externalMeasured=null))}function Hr(e,r,R){e.curOp.viewChanged=!0;var L=e.display,k=e.display.externalMeasured;if(k&&r>=k.lineN&&r<k.lineN+k.size&&(L.externalMeasured=null),r<L.viewFrom||r>=L.viewTo)return;var H=L.view[qr(e,r)];if(H.node==null)return;var re=H.changes||(H.changes=[]);B(re,R)==-1&&re.push(R)}function gi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ri(e,r,R,L){var k=qr(e,r),H,re=e.display.view;if(!_r||R==e.doc.first+e.doc.size)return{index:k,lineN:R};for(var le=e.display.viewFrom,ce=0;ce<k;ce++)le+=re[ce].size;if(le!=r){if(L>0){if(k==re.length-1)return null;H=le+re[k].size-r,k++}else H=le-r;r+=H,R+=H}for(;Tn(e.doc,R)!=R;){if(k==(L<0?0:re.length-1))return null;R+=L*re[k-(L<0?1:0)].size,k+=L}return{index:k,lineN:R}}function Fi(e,r,R){var L=e.display,k=L.view;k.length==0||r>=L.viewTo||R<=L.viewFrom?(L.view=$i(e,r,R),L.viewFrom=r):(L.viewFrom>r?L.view=$i(e,r,L.viewFrom).concat(L.view):L.viewFrom<r&&(L.view=L.view.slice(qr(e,r))),L.viewFrom=r,L.viewTo<R?L.view=L.view.concat($i(e,L.viewTo,R)):L.viewTo>R&&(L.view=L.view.slice(0,qr(e,R)))),L.viewTo=R}function Un(e){for(var r=e.display.view,R=0,L=0;L<r.length;L++){var k=r[L];!k.hidden&&(!k.node||k.changes)&&++R}return R}function yn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Kn(e,r){r===void 0&&(r=!0);for(var R=e.doc,L={},k=L.cursors=document.createDocumentFragment(),H=L.selection=document.createDocumentFragment(),re=0;re<R.sel.ranges.length;re++){if(!r&&re==R.sel.primIndex)continue;var le=R.sel.ranges[re];if(le.from().line>=e.display.viewTo||le.to().line<e.display.viewFrom)continue;var ce=le.empty();(ce||e.options.showCursorWhenSelecting)&&qt(e,le.head,k),ce||br(e,le,H)}return L}function qt(e,r,R){var L=Bn(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),k=R.appendChild(x("div","\xA0","CodeMirror-cursor"));if(k.style.left=L.left+"px",k.style.top=L.top+"px",k.style.height=Math.max(0,L.bottom-L.top)*e.options.cursorHeight+"px",L.other){var H=R.appendChild(x("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));H.style.display="",H.style.left=L.other.left+"px",H.style.top=L.other.top+"px",H.style.height=(L.other.bottom-L.other.top)*.85+"px"}}function Rn(e,r){return e.top-r.top||e.left-r.left}function br(e,r,R){var L=e.display,k=e.doc,H=document.createDocumentFragment(),re=Qn(e.display),le=re.left,ce=Math.max(L.sizerWidth,lr(e)-L.sizer.offsetLeft)-re.right,ge=k.direction=="ltr";function Be(Gt,tn,Sn,mn){tn<0&&(tn=0),tn=Math.round(tn),mn=Math.round(mn),H.appendChild(x("div",null,"CodeMirror-selected","position: absolute; left: "+Gt+`px;
top: `+tn+"px; width: "+(Sn==null?ce-Gt:Sn)+`px;
height: `+(mn-tn)+"px"))}function ze(Gt,tn,Sn){var mn=q(k,Gt),Vn=mn.text.length,Sr,Zr;function Mr(zr,_i){return _n(e,it(Gt,zr),"div",mn,_i)}function Ci(zr,_i,ni){var $r=Li(e,mn,null,zr),Gr=_i=="ltr"==(ni=="after")?"left":"right",Nr=ni=="after"?$r.begin:$r.end-(/\s/.test(mn.text.charAt($r.end-1))?2:1);return Mr(Nr,Gr)[Gr]}var bi=rt(mn,k.direction);return V(bi,tn||0,Sn==null?Vn:Sn,function(zr,_i,ni,$r){var Gr=ni=="ltr",Nr=Mr(zr,Gr?"left":"right"),Ei=Mr(_i-1,Gr?"right":"left"),Da=tn==null&&zr==0,la=Sn==null&&_i==Vn,oi=$r==0,Xi=!bi||$r==bi.length-1;if(Ei.top-Nr.top<=3){var ei=(ge?Da:la)&&oi,Fo=(ge?la:Da)&&Xi,Ji=ei?le:(Gr?Nr:Ei).left,ga=Fo?ce:(Gr?Ei:Nr).right;Be(Ji,Nr.top,ga-Ji,Nr.bottom)}else{var ya,ci,Pa,Bo;Gr?(ya=ge&&Da&&oi?le:Nr.left,ci=ge?ce:Ci(zr,ni,"before"),Pa=ge?le:Ci(_i,ni,"after"),Bo=ge&&la&&Xi?ce:Ei.right):(ya=ge?Ci(zr,ni,"before"):le,ci=!ge&&Da&&oi?ce:Nr.right,Pa=!ge&&la&&Xi?le:Ei.left,Bo=ge?Ci(_i,ni,"after"):ce),Be(ya,Nr.top,ci-ya,Nr.bottom),Nr.bottom<Ei.top&&Be(le,Nr.bottom,null,Ei.top),Be(Pa,Ei.top,Bo-Pa,Ei.bottom)}(!Sr||Rn(Nr,Sr)<0)&&(Sr=Nr),Rn(Ei,Sr)<0&&(Sr=Ei),(!Zr||Rn(Nr,Zr)<0)&&(Zr=Nr),Rn(Ei,Zr)<0&&(Zr=Ei)}),{start:Sr,end:Zr}}var at=r.from(),nt=r.to();if(at.line==nt.line)ze(at.line,at.ch,nt.ch);else{var _t=q(k,at.line),At=q(k,nt.line),It=hi(_t)==hi(At),zt=ze(at.line,at.ch,It?_t.text.length+1:null).end,Zt=ze(nt.line,It?0:null,nt.ch).start;It&&(zt.top<Zt.top-2?(Be(zt.right,zt.top,null,zt.bottom),Be(le,Zt.top,Zt.left,Zt.bottom)):Be(zt.right,zt.top,Zt.left-zt.right,zt.bottom)),zt.bottom<Zt.top&&Be(le,zt.bottom,null,Zt.top)}R.appendChild(H)}function jr(e){if(!e.state.focused)return;var r=e.display;clearInterval(r.blinker);var R=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){e.hasFocus()||ki(e),r.cursorDiv.style.visibility=(R=!R)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Fr(e){e.state.focused||(e.display.input.focus(),un(e))}function fa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ki(e))},100)}function un(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ve(e,"focus",e,r),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),l&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),jr(e)}function ki(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ve(e,"blur",e,r),e.state.focused=!1,m(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ea(e){for(var r=e.display,R=r.lineDiv.offsetTop,L=0;L<r.view.length;L++){var k=r.view[L],H=e.options.lineWrapping,re=void 0,le=0;if(k.hidden)continue;if(C&&T<8){var ce=k.node.offsetTop+k.node.offsetHeight;re=ce-R,R=ce}else{var ge=k.node.getBoundingClientRect();re=ge.bottom-ge.top,!H&&k.text.firstChild&&(le=k.text.firstChild.getBoundingClientRect().right-ge.left-1)}var Be=k.line.height-re;if((Be>.005||Be<-.005)&&(Se(k.line,re),Bi(k.line),k.rest))for(var ze=0;ze<k.rest.length;ze++)Bi(k.rest[ze]);if(le>e.display.sizerWidth){var at=Math.ceil(le/Wn(e.display));at>e.display.maxLineLength&&(e.display.maxLineLength=at,e.display.maxLine=k.line,e.display.maxLineChanged=!0)}}}function Bi(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var R=e.widgets[r],L=R.node.parentNode;L&&(R.height=L.offsetHeight)}}function Ii(e,r,R){var L=R&&R.top!=null?Math.max(0,R.top):e.scroller.scrollTop;L=Math.floor(L-Fn(e));var k=R&&R.bottom!=null?R.bottom:L+e.wrapper.clientHeight,H=Je(r,L),re=Je(r,k);if(R&&R.ensure){var le=R.ensure.from.line,ce=R.ensure.to.line;le<H?(H=le,re=Je(r,pr(q(r,le))+e.wrapper.clientHeight)):Math.min(ce,r.lastLine())>=re&&(H=Je(r,pr(q(r,ce))-e.wrapper.clientHeight),re=ce)}return{from:H,to:Math.max(re,H+1)}}function Wi(e,r){if(Ke(e,"scrollCursorIntoView"))return;var R=e.display,L=R.sizer.getBoundingClientRect(),k=null;if(r.top+L.top<0?k=!0:r.bottom+L.top>(window.innerHeight||document.documentElement.clientHeight)&&(k=!1),k!=null&&!s){var H=x("div","\u200B",null,`position: absolute;
top: `+(r.top-R.viewOffset-Fn(e.display))+`px;
height: `+(r.bottom-r.top+ir(e)+R.barHeight)+`px;
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(H),H.scrollIntoView(k),e.display.lineSpace.removeChild(H)}}function ta(e,r,R,L){L==null&&(L=0);var k;!e.options.lineWrapping&&r==R&&(r=r.ch?it(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,R=r.sticky=="before"?it(r.line,r.ch+1,"before"):r);for(var H=0;H<5;H++){var re=!1,le=Bn(e,r),ce=!R||R==r?le:Bn(e,R);k={left:Math.min(le.left,ce.left),top:Math.min(le.top,ce.top)-L,right:Math.max(le.left,ce.left),bottom:Math.max(le.bottom,ce.bottom)+L};var ge=Vi(e,k),Be=e.doc.scrollTop,ze=e.doc.scrollLeft;if(ge.scrollTop!=null&&(Ua(e,ge.scrollTop),Math.abs(e.doc.scrollTop-Be)>1&&(re=!0)),ge.scrollLeft!=null&&(ha(e,ge.scrollLeft),Math.abs(e.doc.scrollLeft-ze)>1&&(re=!0)),!re)break}return k}function na(e,r){var R=Vi(e,r);R.scrollTop!=null&&Ua(e,R.scrollTop),R.scrollLeft!=null&&ha(e,R.scrollLeft)}function Vi(e,r){var R=e.display,L=ji(e.display);r.top<0&&(r.top=0);var k=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,H=mr(e),re={};r.bottom-r.top>H&&(r.bottom=r.top+H);var le=e.doc.height+yr(R),ce=r.top<L,ge=r.bottom>le-L;if(r.top<k)re.scrollTop=ce?0:r.top;else if(r.bottom>k+H){var Be=Math.min(r.top,(ge?le:r.bottom)-H);Be!=k&&(re.scrollTop=Be)}var ze=e.options.fixedGutter?0:R.gutters.offsetWidth,at=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-ze,nt=lr(e)-R.gutters.offsetWidth,_t=r.right-r.left>nt;return _t&&(r.right=r.left+nt),r.left<10?re.scrollLeft=0:r.left<at?re.scrollLeft=Math.max(0,r.left+ze-(_t?0:10)):r.right>nt+at-3&&(re.scrollLeft=r.right+(_t?0:10)-nt),re}function Ia(e,r){if(r==null)return;no(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function Ar(e){no(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Na(e,r,R){(r!=null||R!=null)&&no(e),r!=null&&(e.curOp.scrollLeft=r),R!=null&&(e.curOp.scrollTop=R)}function Js(e,r){no(e),e.curOp.scrollToPos=r}function no(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var R=er(e,r.from),L=er(e,r.to);Wo(e,R,L,r.margin)}}function Wo(e,r,R,L){var k=Vi(e,{left:Math.min(r.left,R.left),top:Math.min(r.top,R.top)-L,right:Math.max(r.right,R.right),bottom:Math.max(r.bottom,R.bottom)+L});Na(e,k.scrollLeft,k.scrollTop)}function Ua(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;U||_o(e,{top:r}),Ko(e,r,!0),U&&_o(e),Ba(e,100)}function Ko(e,r,R){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!R)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function ha(e,r,R,L){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(R?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!L)return;e.doc.scrollLeft=r,Xo(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function ja(e){var r=e.display,R=r.gutters.offsetWidth,L=Math.round(e.doc.height+yr(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?R:0,docHeight:L,scrollHeight:L+ir(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:R}}var pa=function(e,r,R){this.cm=R;var L=this.vert=x("div",[x("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),k=this.horiz=x("div",[x("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");L.tabIndex=k.tabIndex=-1,e(L),e(k),Ie(L,"scroll",function(){L.clientHeight&&r(L.scrollTop,"vertical")}),Ie(k,"scroll",function(){k.clientWidth&&r(k.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,C&&T<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,R=e.scrollHeight>e.clientHeight+1,L=e.nativeBarWidth;if(R){this.vert.style.display="block",this.vert.style.bottom=r?L+"px":"0";var k=e.viewHeight-(r?L:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+k)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=R?L+"px":"0",this.horiz.style.left=e.barLeft+"px";var H=e.viewWidth-e.barLeft-(R?L:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+H)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(L==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:R?L:0,bottom:r?L:0}},pa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var e=t&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new J,this.disableVert=new J},pa.prototype.enableZeroWidthBar=function(e,r,R){e.style.pointerEvents="auto";function L(){var k=e.getBoundingClientRect(),H=R=="vert"?document.elementFromPoint(k.right-1,(k.top+k.bottom)/2):document.elementFromPoint((k.right+k.left)/2,k.bottom-1);H!=e?e.style.pointerEvents="none":r.set(1e3,L)}r.set(1e3,L)},pa.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Fa=function(){};Fa.prototype.update=function(){return{bottom:0,right:0}},Fa.prototype.setScrollLeft=function(){},Fa.prototype.setScrollTop=function(){},Fa.prototype.clear=function(){};function Ea(e,r){r||(r=ja(e));var R=e.display.barWidth,L=e.display.barHeight;Ho(e,r);for(var k=0;k<4&&R!=e.display.barWidth||L!=e.display.barHeight;k++)R!=e.display.barWidth&&e.options.lineWrapping&&ea(e),Ho(e,ja(e)),R=e.display.barWidth,L=e.display.barHeight}function Ho(e,r){var R=e.display,L=R.scrollbars.update(r);R.sizer.style.paddingRight=(R.barWidth=L.right)+"px",R.sizer.style.paddingBottom=(R.barHeight=L.bottom)+"px",R.heightForcer.style.borderBottom=L.bottom+"px solid transparent",L.right&&L.bottom?(R.scrollbarFiller.style.display="block",R.scrollbarFiller.style.height=L.bottom+"px",R.scrollbarFiller.style.width=L.right+"px"):R.scrollbarFiller.style.display="",L.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(R.gutterFiller.style.display="block",R.gutterFiller.style.height=L.bottom+"px",R.gutterFiller.style.width=r.gutterWidth+"px"):R.gutterFiller.style.display=""}var zo={native:pa,null:Fa};function Go(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&m(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new zo[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),Ie(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,R){R=="horizontal"?ha(e,r):Ua(e,r)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function ma(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zs},ka(e.curOp)}function va(e){var r=e.curOp;r&&ut(r,function(R){for(var L=0;L<R.ops.length;L++)R.ops[L].cm.curOp=null;el(R)})}function el(e){for(var r=e.ops,R=0;R<r.length;R++)tl(r[R]);for(var L=0;L<r.length;L++)nl(r[L]);for(var k=0;k<r.length;k++)rl(r[k]);for(var H=0;H<r.length;H++)il(r[H]);for(var re=0;re<r.length;re++)al(r[re])}function tl(e){var r=e.cm,R=r.display;sl(r),e.updateMaxLine&&Cr(r),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<R.viewFrom||e.scrollToPos.to.line>=R.viewTo)||R.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new ro(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function nl(e){e.updatedDisplay=e.mustUpdate&&bo(e.cm,e.update)}function rl(e){var r=e.cm,R=r.display;e.updatedDisplay&&ea(r),e.barMeasure=ja(r),R.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Ft(r,R.maxLine,R.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(R.scroller.clientWidth,R.sizer.offsetLeft+e.adjustWidthTo+ir(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-lr(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=R.input.prepareSelection())}function il(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&ha(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var R=e.focus&&e.focus==I();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,R),(e.updatedDisplay||e.startHeight!=r.doc.height)&&Ea(r,e.barMeasure),e.updatedDisplay&&xo(r,e.barMeasure),e.selectionChanged&&jr(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),R&&Fr(e.cm)}function al(e){var r=e.cm,R=r.display,L=r.doc;if(e.updatedDisplay&&Vo(r,e.update),R.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(R.wheelStartX=R.wheelStartY=null),e.scrollTop!=null&&Ko(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&ha(r,e.scrollLeft,!0,!0),e.scrollToPos){var k=ta(r,mt(L,e.scrollToPos.from),mt(L,e.scrollToPos.to),e.scrollToPos.margin);Wi(r,k)}var H=e.maybeHiddenMarkers,re=e.maybeUnhiddenMarkers;if(H)for(var le=0;le<H.length;++le)H[le].lines.length||Ve(H[le],"hide");if(re)for(var ce=0;ce<re.length;++ce)re[ce].lines.length&&Ve(re[ce],"unhide");R.wrapper.offsetHeight&&(L.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&Ve(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function Ti(e,r){if(e.curOp)return r();ma(e);try{return r()}finally{va(e)}}function Qr(e,r){return function(){if(e.curOp)return r.apply(e,arguments);ma(e);try{return r.apply(e,arguments)}finally{va(e)}}}function ui(e){return function(){if(this.curOp)return e.apply(this,arguments);ma(this);try{return e.apply(this,arguments)}finally{va(this)}}}function Jr(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);ma(r);try{return e.apply(this,arguments)}finally{va(r)}}}function Ba(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,j(ol,e))}function ol(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var R=+new Date+e.options.workTime,L=et(e,r.highlightFrontier),k=[];r.iter(L.line,Math.min(r.first+r.size,e.display.viewTo+500),function(H){if(L.line>=e.display.viewFrom){var re=H.styles,le=H.text.length>e.options.maxHighlightLength?Qt(r.mode,L.state):null,ce=Nn(e,H,L,!0);le&&(L.state=le),H.styles=ce.styles;var ge=H.styleClasses,Be=ce.classes;Be?H.styleClasses=Be:ge&&(H.styleClasses=null);for(var ze=!re||re.length!=H.styles.length||ge!=Be&&(!ge||!Be||ge.bgClass!=Be.bgClass||ge.textClass!=Be.textClass),at=0;!ze&&at<re.length;++at)ze=re[at]!=H.styles[at];ze&&k.push(L.line),H.stateAfter=L.save(),L.nextLine()}else H.text.length<=e.options.maxHighlightLength&&Ut(e,H.text,L),H.stateAfter=L.line%5==0?L.save():null,L.nextLine();if(+new Date>R)return Ba(e,e.options.workDelay),!0}),r.highlightFrontier=L.line,r.modeFrontier=Math.max(r.modeFrontier,L.line),k.length&&Ti(e,function(){for(var H=0;H<k.length;H++)Hr(e,k[H],"text")})}var ro=function(e,r,R){var L=e.display;this.viewport=r,this.visible=Ii(L,e.doc,r),this.editorIsHidden=!L.wrapper.offsetWidth,this.wrapperHeight=L.wrapper.clientHeight,this.wrapperWidth=L.wrapper.clientWidth,this.oldDisplayWidth=lr(e),this.force=R,this.dims=xn(e),this.events=[]};ro.prototype.signal=function(e,r){De(e,r)&&this.events.push(arguments)},ro.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ve.apply(null,this.events[e])};function sl(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=ir(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=ir(e)+"px",r.scrollbarsClipped=!0)}function ll(e){if(e.hasFocus())return null;var r=I();if(!r||!D(e.display.lineDiv,r))return null;var R={activeElt:r};if(window.getSelection){var L=window.getSelection();L.anchorNode&&L.extend&&D(e.display.lineDiv,L.anchorNode)&&(R.anchorNode=L.anchorNode,R.anchorOffset=L.anchorOffset,R.focusNode=L.focusNode,R.focusOffset=L.focusOffset)}return R}function ul(e){if(!e||!e.activeElt||e.activeElt==I())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode)){var r=window.getSelection(),R=document.createRange();R.setEnd(e.anchorNode,e.anchorOffset),R.collapse(!1),r.removeAllRanges(),r.addRange(R),r.extend(e.focusNode,e.focusOffset)}}function bo(e,r){var R=e.display,L=e.doc;if(r.editorIsHidden)return gi(e),!1;if(!r.force&&r.visible.from>=R.viewFrom&&r.visible.to<=R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo)&&R.renderedView==R.view&&Un(e)==0)return!1;Yo(e)&&(gi(e),r.dims=xn(e));var k=L.first+L.size,H=Math.max(r.visible.from-e.options.viewportMargin,L.first),re=Math.min(k,r.visible.to+e.options.viewportMargin);R.viewFrom<H&&H-R.viewFrom<20&&(H=Math.max(L.first,R.viewFrom)),R.viewTo>re&&R.viewTo-re<20&&(re=Math.min(k,R.viewTo)),_r&&(H=Tn(e.doc,H),re=On(e.doc,re));var le=H!=R.viewFrom||re!=R.viewTo||R.lastWrapHeight!=r.wrapperHeight||R.lastWrapWidth!=r.wrapperWidth;Fi(e,H,re),R.viewOffset=pr(q(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var ce=Un(e);if(!le&&ce==0&&!r.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var ge=ll(e);return ce>4&&(R.lineDiv.style.display="none"),cl(e,R.updateLineNumbers,r.dims),ce>4&&(R.lineDiv.style.display=""),R.renderedView=R.view,ul(ge),E(R.cursorDiv),E(R.selectionDiv),R.gutters.style.height=R.sizer.style.minHeight=0,le&&(R.lastWrapHeight=r.wrapperHeight,R.lastWrapWidth=r.wrapperWidth,Ba(e,400)),R.updateLineNumbers=null,!0}function Vo(e,r){for(var R=r.viewport,L=!0;;L=!1){if(!L||!e.options.lineWrapping||r.oldDisplayWidth==lr(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+yr(e.display)-mr(e),R.top)}),r.visible=Ii(e.display,e.doc,R),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else L&&(r.visible=Ii(e.display,e.doc,R));if(!bo(e,r))break;ea(e);var k=ja(e);yn(e),Ea(e,k),xo(e,k),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function _o(e,r){var R=new ro(e,r);if(bo(e,R)){ea(e),Vo(e,R);var L=ja(e);yn(e),Ea(e,L),xo(e,L),R.finish()}}function cl(e,r,R){var L=e.display,k=e.options.lineNumbers,H=L.lineDiv,re=H.firstChild;function le(_t){var At=_t.nextSibling;return l&&t&&e.display.currentWheelTarget==_t?_t.style.display="none":_t.parentNode.removeChild(_t),At}for(var ce=L.view,ge=L.viewFrom,Be=0;Be<ce.length;Be++){var ze=ce[Be];if(!ze.hidden)if(!ze.node||ze.node.parentNode!=H){var at=Hn(e,ze,ge,R);H.insertBefore(at,re)}else{for(;re!=ze.node;)re=le(re);var nt=k&&r!=null&&r<=ge&&ze.lineNumber;ze.changes&&(B(ze.changes,"gutter")>-1&&(nt=!1),an(e,ze,ge,R)),nt&&(E(ze.lineNumber),ze.lineNumber.appendChild(document.createTextNode(Ct(e.options,ge)))),re=ze.node.nextSibling}ge+=ze.size}for(;re;)re=le(re)}function Eo(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function xo(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+ir(e)+"px"}function Xo(e){var r=e.display,R=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var L=$n(r)-r.scroller.scrollLeft+e.doc.scrollLeft,k=r.gutters.offsetWidth,H=L+"px",re=0;re<R.length;re++)if(!R[re].hidden){e.options.fixedGutter&&(R[re].gutter&&(R[re].gutter.style.left=H),R[re].gutterBackground&&(R[re].gutterBackground.style.left=H));var le=R[re].alignable;if(le)for(var ce=0;ce<le.length;ce++)le[ce].style.left=H}e.options.fixedGutter&&(r.gutters.style.left=L+k+"px")}function Yo(e){if(!e.options.lineNumbers)return!1;var r=e.doc,R=Ct(e.options,r.first+r.size-1),L=e.display;if(R.length!=L.lineNumChars){var k=L.measure.appendChild(x("div",[x("div",R)],"CodeMirror-linenumber CodeMirror-gutter-elt")),H=k.firstChild.offsetWidth,re=k.offsetWidth-H;return L.lineGutter.style.width="",L.lineNumInnerWidth=Math.max(H,L.lineGutter.offsetWidth-re)+1,L.lineNumWidth=L.lineNumInnerWidth+re,L.lineNumChars=L.lineNumInnerWidth?R.length:-1,L.lineGutter.style.width=L.lineNumWidth+"px",Eo(e.display),!0}return!1}function So(e,r){for(var R=[],L=!1,k=0;k<e.length;k++){var H=e[k],re=null;if(typeof H!="string"&&(re=H.style,H=H.className),H=="CodeMirror-linenumbers")if(r)L=!0;else continue;R.push({className:H,style:re})}return r&&!L&&R.push({className:"CodeMirror-linenumbers",style:null}),R}function $o(e){var r=e.gutters,R=e.gutterSpecs;E(r),e.lineGutter=null;for(var L=0;L<R.length;++L){var k=R[L],H=k.className,re=k.style,le=r.appendChild(x("div",null,"CodeMirror-gutter "+H));re&&(le.style.cssText=re),H=="CodeMirror-linenumbers"&&(e.lineGutter=le,le.style.width=(e.lineNumWidth||1)+"px")}r.style.display=R.length?"":"none",Eo(e)}function Wa(e){$o(e.display),Pr(e),Xo(e)}function dl(e,r,R,L){var k=this;this.input=R,k.scrollbarFiller=x("div",null,"CodeMirror-scrollbar-filler"),k.scrollbarFiller.setAttribute("cm-not-content","true"),k.gutterFiller=x("div",null,"CodeMirror-gutter-filler"),k.gutterFiller.setAttribute("cm-not-content","true"),k.lineDiv=O("div",null,"CodeMirror-code"),k.selectionDiv=x("div",null,null,"position: relative; z-index: 1"),k.cursorDiv=x("div",null,"CodeMirror-cursors"),k.measure=x("div",null,"CodeMirror-measure"),k.lineMeasure=x("div",null,"CodeMirror-measure"),k.lineSpace=O("div",[k.measure,k.lineMeasure,k.selectionDiv,k.cursorDiv,k.lineDiv],null,"position: relative; outline: none");var H=O("div",[k.lineSpace],"CodeMirror-lines");k.mover=x("div",[H],null,"position: relative"),k.sizer=x("div",[k.mover],"CodeMirror-sizer"),k.sizerWidth=null,k.heightForcer=x("div",null,null,"position: absolute; height: "+Q+"px; width: 1px;"),k.gutters=x("div",null,"CodeMirror-gutters"),k.lineGutter=null,k.scroller=x("div",[k.sizer,k.heightForcer,k.gutters],"CodeMirror-scroll"),k.scroller.setAttribute("tabIndex","-1"),k.wrapper=x("div",[k.scrollbarFiller,k.gutterFiller,k.scroller],"CodeMirror"),C&&T<8&&(k.gutters.style.zIndex=-1,k.scroller.style.paddingRight=0),!l&&!(U&&n)&&(k.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(k.wrapper):e(k.wrapper)),k.viewFrom=k.viewTo=r.first,k.reportedViewFrom=k.reportedViewTo=r.first,k.view=[],k.renderedView=null,k.externalMeasured=null,k.viewOffset=0,k.lastWrapHeight=k.lastWrapWidth=0,k.updateLineNumbers=null,k.nativeBarWidth=k.barHeight=k.barWidth=0,k.scrollbarsClipped=!1,k.lineNumWidth=k.lineNumInnerWidth=k.lineNumChars=null,k.alignWidgets=!1,k.cachedCharWidth=k.cachedTextHeight=k.cachedPaddingH=null,k.maxLine=null,k.maxLineLength=0,k.maxLineChanged=!1,k.wheelDX=k.wheelDY=k.wheelStartX=k.wheelStartY=null,k.shift=!1,k.selForContextMenu=null,k.activeTouch=null,k.gutterSpecs=So(L.gutters,L.lineNumbers),$o(k),R.init(k)}var io=0,Di=null;C?Di=-.53:U?Di=15:h?Di=-.7:o&&(Di=-1/3);function qo(e){var r=e.wheelDeltaX,R=e.wheelDeltaY;return r==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(r=e.detail),R==null&&e.detail&&e.axis==e.VERTICAL_AXIS?R=e.detail:R==null&&(R=e.wheelDelta),{x:r,y:R}}function fl(e){var r=qo(e);return r.x*=Di,r.y*=Di,r}function Qo(e,r){var R=qo(r),L=R.x,k=R.y,H=e.display,re=H.scroller,le=re.scrollWidth>re.clientWidth,ce=re.scrollHeight>re.clientHeight;if(!(L&&le||k&&ce))return;if(k&&t&&l){e:for(var ge=r.target,Be=H.view;ge!=re;ge=ge.parentNode)for(var ze=0;ze<Be.length;ze++)if(Be[ze].node==ge){e.display.currentWheelTarget=ge;break e}}if(L&&!U&&!d&&Di!=null){k&&ce&&Ua(e,Math.max(0,re.scrollTop+k*Di)),ha(e,Math.max(0,re.scrollLeft+L*Di)),(!k||k&&ce)&&he(r),H.wheelStartX=null;return}if(k&&Di!=null){var at=k*Di,nt=e.doc.scrollTop,_t=nt+H.wrapper.clientHeight;at<0?nt=Math.max(0,nt+at-50):_t=Math.min(e.doc.height,_t+at+50),_o(e,{top:nt,bottom:_t})}io<20&&(H.wheelStartX==null?(H.wheelStartX=re.scrollLeft,H.wheelStartY=re.scrollTop,H.wheelDX=L,H.wheelDY=k,setTimeout(function(){if(H.wheelStartX==null)return;var At=re.scrollLeft-H.wheelStartX,It=re.scrollTop-H.wheelStartY,zt=It&&H.wheelDY&&It/H.wheelDY||At&&H.wheelDX&&At/H.wheelDX;if(H.wheelStartX=H.wheelStartY=null,!zt)return;Di=(Di*io+zt)/(io+1),++io},200)):(H.wheelDX+=L,H.wheelDY+=k))}var Pi=function(e,r){this.ranges=e,this.primIndex=r};Pi.prototype.primary=function(){return this.ranges[this.primIndex]},Pi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var R=this.ranges[r],L=e.ranges[r];if(!Xt(R.anchor,L.anchor)||!Xt(R.head,L.head))return!1}return!0},Pi.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new hr(bt(this.ranges[r].anchor),bt(this.ranges[r].head));return new Pi(e,this.primIndex)},Pi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Pi.prototype.contains=function(e,r){r||(r=e);for(var R=0;R<this.ranges.length;R++){var L=this.ranges[R];if(St(r,L.from())>=0&&St(e,L.to())<=0)return R}return-1};var hr=function(e,r){this.anchor=e,this.head=r};hr.prototype.from=function(){return Jt(this.anchor,this.head)},hr.prototype.to=function(){return ht(this.anchor,this.head)},hr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ki(e,r,R){var L=e&&e.options.selectionsMayTouch,k=r[R];r.sort(function(at,nt){return St(at.from(),nt.from())}),R=B(r,k);for(var H=1;H<r.length;H++){var re=r[H],le=r[H-1],ce=St(le.to(),re.from());if(L&&!re.empty()?ce>0:ce>=0){var ge=Jt(le.from(),re.from()),Be=ht(le.to(),re.to()),ze=le.empty()?re.from()==re.head:le.from()==le.head;H<=R&&--R,r.splice(--H,2,new hr(ze?Be:ge,ze?ge:Be))}}return new Pi(r,R)}function ra(e,r){return new Pi([new hr(e,r||e)],0)}function ia(e){return e.text?it(e.from.line+e.text.length-1,Fe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Jo(e,r){if(St(e,r.from)<0)return e;if(St(e,r.to)<=0)return ia(r);var R=e.line+r.text.length-(r.to.line-r.from.line)-1,L=e.ch;return e.line==r.to.line&&(L+=ia(r).ch-r.to.ch),it(R,L)}function wo(e,r){for(var R=[],L=0;L<e.sel.ranges.length;L++){var k=e.sel.ranges[L];R.push(new hr(Jo(k.anchor,r),Jo(k.head,r)))}return Ki(e.cm,R,e.sel.primIndex)}function Zo(e,r,R){return e.line==r.line?it(R.line,e.ch-r.ch+R.ch):it(R.line+(e.line-r.line),e.ch)}function hl(e,r,R){for(var L=[],k=it(e.first,0),H=k,re=0;re<r.length;re++){var le=r[re],ce=Zo(le.from,k,H),ge=Zo(ia(le),k,H);if(k=le.to,H=ge,R=="around"){var Be=e.sel.ranges[re],ze=St(Be.head,Be.anchor)<0;L[re]=new hr(ze?ge:ce,ze?ce:ge)}else L[re]=new hr(ce,ce)}return new Pi(L,e.sel.primIndex)}function To(e){e.doc.mode=gt(e.options,e.doc.modeOption),Ka(e)}function Ka(e){e.doc.iter(function(r){r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ba(e,100),e.state.modeGen++,e.curOp&&Pr(e)}function es(e,r){return r.from.ch==0&&r.to.ch==0&&Fe(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Co(e,r,R,L){function k(Zt){return R?R[Zt]:null}function H(Zt,Gt,tn){pi(Zt,Gt,tn,L),Dt(Zt,"change",Zt,r)}function re(Zt,Gt){for(var tn=[],Sn=Zt;Sn<Gt;++Sn)tn.push(new xr(ge[Sn],k(Sn),L));return tn}var le=r.from,ce=r.to,ge=r.text,Be=q(e,le.line),ze=q(e,ce.line),at=Fe(ge),nt=k(ge.length-1),_t=ce.line-le.line;if(r.full)e.insert(0,re(0,ge.length)),e.remove(ge.length,e.size-ge.length);else if(es(e,r)){var At=re(0,ge.length-1);H(ze,ze.text,nt),_t&&e.remove(le.line,_t),At.length&&e.insert(le.line,At)}else if(Be==ze)if(ge.length==1)H(Be,Be.text.slice(0,le.ch)+at+Be.text.slice(ce.ch),nt);else{var It=re(1,ge.length-1);It.push(new xr(at+Be.text.slice(ce.ch),nt,L)),H(Be,Be.text.slice(0,le.ch)+ge[0],k(0)),e.insert(le.line+1,It)}else if(ge.length==1)H(Be,Be.text.slice(0,le.ch)+ge[0]+ze.text.slice(ce.ch),k(0)),e.remove(le.line+1,_t);else{H(Be,Be.text.slice(0,le.ch)+ge[0],k(0)),H(ze,at+ze.text.slice(ce.ch),nt);var zt=re(1,ge.length-1);_t>1&&e.remove(le.line+1,_t-1),e.insert(le.line+1,zt)}Dt(e,"change",e,r)}function aa(e,r,R){function L(k,H,re){if(k.linked)for(var le=0;le<k.linked.length;++le){var ce=k.linked[le];if(ce.doc==H)continue;var ge=re&&ce.sharedHist;if(R&&!ge)continue;r(ce.doc,ge),L(ce.doc,k,ge)}}L(e,null,!0)}function ts(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,Ir(e),To(e),ns(e),e.options.lineWrapping||Cr(e),e.options.mode=r.modeOption,Pr(e)}function ns(e){(e.doc.direction=="rtl"?F:m)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Ti(e,function(){ns(e),Pr(e)})}function ao(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Oo(e,r){var R={from:bt(r.from),to:ia(r),text:te(e,r.from,r.to)};return as(e,R,r.from.line,r.to.line+1),aa(e,function(L){return as(L,R,r.from.line,r.to.line+1)},!0),R}function rs(e){for(;e.length;){var r=Fe(e);if(r.ranges)e.pop();else break}}function ml(e,r){if(r)return rs(e.done),Fe(e.done);if(e.done.length&&!Fe(e.done).ranges)return Fe(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Fe(e.done)}function is(e,r,R,L){var k=e.history;k.undone.length=0;var H=+new Date,re,le;if((k.lastOp==L||k.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&k.lastModTime>H-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(re=ml(k,k.lastOp==L)))le=Fe(re.changes),St(r.from,r.to)==0&&St(r.from,le.to)==0?le.to=ia(r):re.changes.push(Oo(e,r));else{var ce=Fe(k.done);for((!ce||!ce.ranges)&&oo(e.sel,k.done),re={changes:[Oo(e,r)],generation:k.generation},k.done.push(re);k.done.length>k.undoDepth;)k.done.shift(),k.done[0].ranges||k.done.shift()}k.done.push(R),k.generation=++k.maxGeneration,k.lastModTime=k.lastSelTime=H,k.lastOp=k.lastSelOp=L,k.lastOrigin=k.lastSelOrigin=r.origin,le||Ve(e,"historyAdded")}function vl(e,r,R,L){var k=r.charAt(0);return k=="*"||k=="+"&&R.ranges.length==L.ranges.length&&R.somethingSelected()==L.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,r,R,L){var k=e.history,H=L&&L.origin;R==k.lastSelOp||H&&k.lastSelOrigin==H&&(k.lastModTime==k.lastSelTime&&k.lastOrigin==H||vl(e,H,Fe(k.done),r))?k.done[k.done.length-1]=r:oo(r,k.done),k.lastSelTime=+new Date,k.lastSelOrigin=H,k.lastSelOp=R,L&&L.clearRedo!==!1&&rs(k.undone)}function oo(e,r){var R=Fe(r);R&&R.ranges&&R.equals(e)||r.push(e)}function as(e,r,R,L){var k=r["spans_"+e.id],H=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,L),function(re){re.markedSpans&&((k||(k=r["spans_"+e.id]={}))[H]=re.markedSpans),++H})}function yl(e){if(!e)return null;for(var r,R=0;R<e.length;++R)e[R].marker.explicitlyCleared?r||(r=e.slice(0,R)):r&&r.push(e[R]);return r?r.length?r:null:e}function bl(e,r){var R=r["spans_"+e.id];if(!R)return null;for(var L=[],k=0;k<r.text.length;++k)L.push(yl(R[k]));return L}function os(e,r){var R=bl(e,r),L=Xr(e,r);if(!R)return L;if(!L)return R;for(var k=0;k<R.length;++k){var H=R[k],re=L[k];if(H&&re){e:for(var le=0;le<re.length;++le){for(var ce=re[le],ge=0;ge<H.length;++ge)if(H[ge].marker==ce.marker)continue e;H.push(ce)}}else re&&(R[k]=re)}return R}function xa(e,r,R){for(var L=[],k=0;k<e.length;++k){var H=e[k];if(H.ranges){L.push(R?Pi.prototype.deepCopy.call(H):H);continue}var re=H.changes,le=[];L.push({changes:le});for(var ce=0;ce<re.length;++ce){var ge=re[ce],Be=void 0;if(le.push({from:ge.from,to:ge.to,text:ge.text}),r)for(var ze in ge)(Be=ze.match(/^spans_(\d+)$/))&&(B(r,Number(Be[1]))>-1&&(Fe(le)[ze]=ge[ze],delete ge[ze]))}}return L}function Ao(e,r,R,L){if(L){var k=e.anchor;if(R){var H=St(r,k)<0;H!=St(R,k)<0?(k=r,r=R):H!=St(r,R)<0&&(r=R)}return new hr(k,r)}else return new hr(R||r,r)}function so(e,r,R,L,k){k==null&&(k=e.cm&&(e.cm.display.shift||e.extend)),ai(e,new Pi([Ao(e.sel.primary(),r,R,k)],0),L)}function ss(e,r,R){for(var L=[],k=e.cm&&(e.cm.display.shift||e.extend),H=0;H<e.sel.ranges.length;H++)L[H]=Ao(e.sel.ranges[H],r[H],null,k);var re=Ki(e.cm,L,e.sel.primIndex);ai(e,re,R)}function Lo(e,r,R,L){var k=e.sel.ranges.slice(0);k[r]=R,ai(e,Ki(e.cm,k,e.sel.primIndex),L)}function ls(e,r,R,L){ai(e,ra(r,R),L)}function _l(e,r,R){var L={ranges:r.ranges,update:function(k){this.ranges=[];for(var H=0;H<k.length;H++)this.ranges[H]=new hr(mt(e,k[H].anchor),mt(e,k[H].head))},origin:R&&R.origin};return Ve(e,"beforeSelectionChange",e,L),e.cm&&Ve(e.cm,"beforeSelectionChange",e.cm,L),L.ranges!=r.ranges?Ki(e.cm,L.ranges,L.ranges.length-1):r}function us(e,r,R){var L=e.history.done,k=Fe(L);k&&k.ranges?(L[L.length-1]=r,lo(e,r,R)):ai(e,r,R)}function ai(e,r,R){lo(e,r,R),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,R)}function lo(e,r,R){(De(e,"beforeSelectionChange")||e.cm&&De(e.cm,"beforeSelectionChange"))&&(r=_l(e,r,R));var L=R&&R.bias||(St(r.primary().head,e.sel.primary().head)<0?-1:1);cs(e,fs(e,r,L,!0)),!(R&&R.scroll===!1)&&e.cm&&Ar(e.cm)}function cs(e,r){if(r.equals(e.sel))return;e.sel=r,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ne(e.cm)),Dt(e,"cursorActivity",e)}function ds(e){cs(e,fs(e,e.sel,null,!1))}function fs(e,r,R,L){for(var k,H=0;H<r.ranges.length;H++){var re=r.ranges[H],le=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[H],ce=uo(e,re.anchor,le&&le.anchor,R,L),ge=uo(e,re.head,le&&le.head,R,L);(k||ce!=re.anchor||ge!=re.head)&&(k||(k=r.ranges.slice(0,H)),k[H]=new hr(ce,ge))}return k?Ki(e.cm,k,r.primIndex):r}function Sa(e,r,R,L,k){var H=q(e,r.line);if(H.markedSpans)for(var re=0;re<H.markedSpans.length;++re){var le=H.markedSpans[re],ce=le.marker,ge="selectLeft"in ce?!ce.selectLeft:ce.inclusiveLeft,Be="selectRight"in ce?!ce.selectRight:ce.inclusiveRight;if((le.from==null||(ge?le.from<=r.ch:le.from<r.ch))&&(le.to==null||(Be?le.to>=r.ch:le.to>r.ch))){if(k&&(Ve(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(H.markedSpans){--re;continue}else break;if(!ce.atomic)continue;if(R){var ze=ce.find(L<0?1:-1),at=void 0;if((L<0?Be:ge)&&(ze=hs(e,ze,-L,ze&&ze.line==r.line?H:null)),ze&&ze.line==r.line&&(at=St(ze,R))&&(L<0?at<0:at>0))return Sa(e,ze,r,L,k)}var nt=ce.find(L<0?-1:1);return(L<0?ge:Be)&&(nt=hs(e,nt,L,nt.line==r.line?H:null)),nt?Sa(e,nt,r,L,k):null}}return r}function uo(e,r,R,L,k){var H=L||1,re=Sa(e,r,R,H,k)||!k&&Sa(e,r,R,H,!0)||Sa(e,r,R,-H,k)||!k&&Sa(e,r,R,-H,!0);return re||(e.cantEdit=!0,it(e.first,0))}function hs(e,r,R,L){return R<0&&r.ch==0?r.line>e.first?mt(e,it(r.line-1)):null:R>0&&r.ch==(L||q(e,r.line)).text.length?r.line<e.first+e.size-1?it(r.line+1,0):null:new it(r.line,r.ch+R)}function ps(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),oe)}function ms(e,r,R){var L={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return L.canceled=!0}};return R&&(L.update=function(k,H,re,le){k&&(L.from=mt(e,k)),H&&(L.to=mt(e,H)),re&&(L.text=re),le!==void 0&&(L.origin=le)}),Ve(e,"beforeChange",e,L),e.cm&&Ve(e.cm,"beforeChange",e.cm,L),L.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:L.from,to:L.to,text:L.text,origin:L.origin}}function wa(e,r,R){if(e.cm){if(!e.cm.curOp)return Qr(e.cm,wa)(e,r,R);if(e.cm.state.suppressEdits)return}if((De(e,"beforeChange")||e.cm&&De(e.cm,"beforeChange"))&&(r=ms(e,r,!0),!r))return;var L=Wr&&!R&&Si(e,r.from,r.to);if(L)for(var k=L.length-1;k>=0;--k)vs(e,{from:L[k].from,to:L[k].to,text:k?[""]:r.text,origin:r.origin});else vs(e,r)}function vs(e,r){if(r.text.length==1&&r.text[0]==""&&St(r.from,r.to)==0)return;var R=wo(e,r);is(e,r,R,e.cm?e.cm.curOp.id:NaN),Ha(e,r,R,Xr(e,r));var L=[];aa(e,function(k,H){!H&&B(L,k.history)==-1&&(_s(k.history,r),L.push(k.history)),Ha(k,r,null,Xr(k,r))})}function co(e,r,R){var L=e.cm&&e.cm.state.suppressEdits;if(L&&!R)return;for(var k=e.history,H,re=e.sel,le=r=="undo"?k.done:k.undone,ce=r=="undo"?k.undone:k.done,ge=0;ge<le.length&&!(H=le[ge],R?H.ranges&&!H.equals(e.sel):!H.ranges);ge++);if(ge==le.length)return;for(k.lastOrigin=k.lastSelOrigin=null;;)if(H=le.pop(),H.ranges){if(oo(H,ce),R&&!H.equals(e.sel)){ai(e,H,{clearRedo:!1});return}re=H}else if(L){le.push(H);return}else break;var Be=[];oo(re,ce),ce.push({changes:Be,generation:k.generation}),k.generation=H.generation||++k.maxGeneration;for(var ze=De(e,"beforeChange")||e.cm&&De(e.cm,"beforeChange"),at=function(At){var It=H.changes[At];if(It.origin=r,ze&&!ms(e,It,!1))return le.length=0,{};Be.push(Oo(e,It));var zt=At?wo(e,It):Fe(le);Ha(e,It,zt,os(e,It)),!At&&e.cm&&e.cm.scrollIntoView({from:It.from,to:ia(It)});var Zt=[];aa(e,function(Gt,tn){!tn&&B(Zt,Gt.history)==-1&&(_s(Gt.history,It),Zt.push(Gt.history)),Ha(Gt,It,null,os(Gt,It))})},nt=H.changes.length-1;nt>=0;--nt){var _t=at(nt);if(_t)return _t.v}}function gs(e,r){if(r==0)return;if(e.first+=r,e.sel=new Pi(Me(e.sel.ranges,function(k){return new hr(it(k.anchor.line+r,k.anchor.ch),it(k.head.line+r,k.head.ch))}),e.sel.primIndex),e.cm){Pr(e.cm,e.first,e.first-r,r);for(var R=e.cm.display,L=R.viewFrom;L<R.viewTo;L++)Hr(e.cm,L,"gutter")}}function Ha(e,r,R,L){if(e.cm&&!e.cm.curOp)return Qr(e.cm,Ha)(e,r,R,L);if(r.to.line<e.first){gs(e,r.text.length-1-(r.to.line-r.from.line));return}if(r.from.line>e.lastLine())return;if(r.from.line<e.first){var k=r.text.length-1-(e.first-r.from.line);gs(e,k),r={from:it(e.first,0),to:it(r.to.line+k,r.to.ch),text:[Fe(r.text)],origin:r.origin}}var H=e.lastLine();r.to.line>H&&(r={from:r.from,to:it(H,q(e,H).text.length),text:[r.text[0]],origin:r.origin}),r.removed=te(e,r.from,r.to),R||(R=wo(e,r)),e.cm?El(e.cm,r,L):Co(e,r,L),lo(e,R,oe),e.cantEdit&&uo(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,r,R){var L=e.doc,k=e.display,H=r.from,re=r.to,le=!1,ce=H.line;e.options.lineWrapping||(ce=He(hi(q(L,H.line))),L.iter(ce,re.line+1,function(nt){if(nt==k.maxLine)return le=!0,!0})),L.sel.contains(r.from,r.to)>-1&&Ne(e),Co(L,r,R,tr(e)),e.options.lineWrapping||(L.iter(ce,H.line+r.text.length,function(nt){var _t=Er(nt);_t>k.maxLineLength&&(k.maxLine=nt,k.maxLineLength=_t,k.maxLineChanged=!0,le=!1)}),le&&(e.curOp.updateMaxLine=!0)),qn(L,H.line),Ba(e,400);var ge=r.text.length-(re.line-H.line)-1;r.full?Pr(e):H.line==re.line&&r.text.length==1&&!es(e.doc,r)?Hr(e,H.line,"text"):Pr(e,H.line,re.line+1,ge);var Be=De(e,"changes"),ze=De(e,"change");if(ze||Be){var at={from:H,to:re,text:r.text,removed:r.removed,origin:r.origin};ze&&Dt(e,"change",e,at),Be&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(at)}e.display.selForContextMenu=null}function Ta(e,r,R,L,k){var H;L||(L=R),St(L,R)<0&&(H=[L,R],R=H[0],L=H[1]),typeof r=="string"&&(r=e.splitLines(r)),wa(e,{from:R,to:L,text:r,origin:k})}function ys(e,r,R,L){R<e.line?e.line+=L:r<e.line&&(e.line=r,e.ch=0)}function bs(e,r,R,L){for(var k=0;k<e.length;++k){var H=e[k],re=!0;if(H.ranges){H.copied||(H=e[k]=H.deepCopy(),H.copied=!0);for(var le=0;le<H.ranges.length;le++)ys(H.ranges[le].anchor,r,R,L),ys(H.ranges[le].head,r,R,L);continue}for(var ce=0;ce<H.changes.length;++ce){var ge=H.changes[ce];if(R<ge.from.line)ge.from=it(ge.from.line+L,ge.from.ch),ge.to=it(ge.to.line+L,ge.to.ch);else if(r<=ge.to.line){re=!1;break}}re||(e.splice(0,k+1),k=0)}}function _s(e,r){var R=r.from.line,L=r.to.line,k=r.text.length-(L-R)-1;bs(e.done,R,L,k),bs(e.undone,R,L,k)}function za(e,r,R,L){var k=r,H=r;return typeof r=="number"?H=q(e,Nt(e,r)):k=He(r),k==null?null:(L(H,k)&&e.cm&&Hr(e.cm,k,R),H)}function Ga(e){this.lines=e,this.parent=null;for(var r=0,R=0;R<e.length;++R)e[R].parent=this,r+=e[R].height;this.height=r}Ga.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,r){for(var R=e,L=e+r;R<L;++R){var k=this.lines[R];this.height-=k.height,Or(k),Dt(k,"delete")}this.lines.splice(e,r)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,r,R){this.height+=R,this.lines=this.lines.slice(0,e).concat(r).concat(this.lines.slice(e));for(var L=0;L<r.length;++L)r[L].parent=this},iterN:function(e,r,R){for(var L=e+r;e<L;++e)if(R(this.lines[e]))return!0}};function Va(e){this.children=e;for(var r=0,R=0,L=0;L<e.length;++L){var k=e[L];r+=k.chunkSize(),R+=k.height,k.parent=this}this.size=r,this.height=R,this.parent=null}Va.prototype={chunkSize:function(){return this.size},removeInner:function(e,r){this.size-=r;for(var R=0;R<this.children.length;++R){var L=this.children[R],k=L.chunkSize();if(e<k){var H=Math.min(r,k-e),re=L.height;if(L.removeInner(e,H),this.height-=re-L.height,k==H&&(this.children.splice(R--,1),L.parent=null),(r-=H)==0)break;e=0}else e-=k}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof Ga))){var le=[];this.collapse(le),this.children=[new Ga(le)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r<this.children.length;++r)this.children[r].collapse(e)},insertInner:function(e,r,R){this.size+=r.length,this.height+=R;for(var L=0;L<this.children.length;++L){var k=this.children[L],H=k.chunkSize();if(e<=H){if(k.insertInner(e,r,R),k.lines&&k.lines.length>50){for(var re=k.lines.length%25+25,le=re;le<k.lines.length;){var ce=new Ga(k.lines.slice(le,le+=25));k.height-=ce.height,this.children.splice(++L,0,ce),ce.parent=this}k.lines=k.lines.slice(0,re),this.maybeSpill()}break}e-=H}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var r=e.children.splice(e.children.length-5,5),R=new Va(r);if(e.parent){e.size-=R.size,e.height-=R.height;var k=B(e.parent.children,e);e.parent.children.splice(k+1,0,R)}else{var L=new Va(e.children);L.parent=e,e.children=[L,R],e=L}R.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,r,R){for(var L=0;L<this.children.length;++L){var k=this.children[L],H=k.chunkSize();if(e<H){var re=Math.min(r,H-e);if(k.iterN(e,re,R))return!0;if((r-=re)==0)break;e=0}else e-=H}}};var Xa=function(e,r,R){if(R)for(var L in R)R.hasOwnProperty(L)&&(this[L]=R[L]);this.doc=e,this.node=r};Xa.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,R=this.line,L=He(R);if(L==null||!r)return;for(var k=0;k<r.length;++k)r[k]==this&&r.splice(k--,1);r.length||(R.widgets=null);var H=Cn(this);Se(R,Math.max(0,R.height-H)),e&&(Ti(e,function(){Es(e,R,-H),Hr(e,L,"widget")}),Dt(e,"lineWidgetCleared",e,this,L))},Xa.prototype.changed=function(){var e=this,r=this.height,R=this.doc.cm,L=this.line;this.height=null;var k=Cn(this)-r;if(!k)return;rr(this.doc,L)||Se(L,L.height+k),R&&Ti(R,function(){R.curOp.forceUpdate=!0,Es(R,L,k),Dt(R,"lineWidgetChanged",R,e,He(L))})},_e(Xa);function Es(e,r,R){pr(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ia(e,R)}function xl(e,r,R,L){var k=new Xa(e,R,L),H=e.cm;return H&&k.noHScroll&&(H.display.alignWidgets=!0),za(e,r,"widget",function(re){var le=re.widgets||(re.widgets=[]);if(k.insertAt==null?le.push(k):le.splice(Math.min(le.length-1,Math.max(0,k.insertAt)),0,k),k.line=re,H&&!rr(e,re)){var ce=pr(re)<e.scrollTop;Se(re,re.height+Cn(k)),ce&&Ia(H,k.height),H.curOp.forceUpdate=!0}return!0}),H&&Dt(H,"lineWidgetAdded",H,k,typeof r=="number"?r:He(r)),k}var xs=0,oa=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++xs};oa.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&ma(e),De(this,"clear")){var R=this.find();R&&Dt(this,"clear",R.from,R.to)}for(var L=null,k=null,H=0;H<this.lines.length;++H){var re=this.lines[H],le=Ur(re.markedSpans,this);e&&!this.collapsed?Hr(e,He(re),"text"):e&&(le.to!=null&&(k=He(re)),le.from!=null&&(L=He(re))),re.markedSpans=xi(re.markedSpans,le),le.from==null&&this.collapsed&&!rr(this.doc,re)&&e&&Se(re,ji(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ce=0;ce<this.lines.length;++ce){var ge=hi(this.lines[ce]),Be=Er(ge);Be>e.display.maxLineLength&&(e.display.maxLine=ge,e.display.maxLineLength=Be,e.display.maxLineChanged=!0)}L!=null&&e&&this.collapsed&&Pr(e,L,k+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ds(e.doc)),e&&Dt(e,"markerCleared",e,this,L,k),r&&va(e),this.parent&&this.parent.clear()},oa.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var R,L,k=0;k<this.lines.length;++k){var H=this.lines[k],re=Ur(H.markedSpans,this);if(re.from!=null&&(R=it(r?H:He(H),re.from),e==-1))return R;if(re.to!=null&&(L=it(r?H:He(H),re.to),e==1))return L}return R&&{from:R,to:L}},oa.prototype.changed=function(){var e=this,r=this.find(-1,!0),R=this,L=this.doc.cm;if(!r||!L)return;Ti(L,function(){var k=r.line,H=He(r.line),re=fn(L,H);if(re&&(jt(re),L.curOp.selectionChanged=L.curOp.forceUpdate=!0),L.curOp.updateMaxLine=!0,!rr(R.doc,k)&&R.height!=null){var le=R.height;R.height=null;var ce=Cn(R)-le;ce&&Se(k,k.height+ce)}Dt(L,"markerChanged",L,e)})},oa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||B(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},oa.prototype.detachLine=function(e){if(this.lines.splice(B(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},_e(oa);function Ca(e,r,R,L,k){if(L&&L.shared)return Sl(e,r,R,L,k);if(e.cm&&!e.cm.curOp)return Qr(e.cm,Ca)(e,r,R,L,k);var H=new oa(e,k),re=St(r,R);if(L&&G(L,H,!1),re>0||re==0&&H.clearWhenEmpty!==!1)return H;if(H.replacedWith&&(H.collapsed=!0,H.widgetNode=O("span",[H.replacedWith],"CodeMirror-widget"),L.handleMouseEvents||H.widgetNode.setAttribute("cm-ignore-events","true"),L.insertLeft&&(H.widgetNode.insertLeft=!0)),H.collapsed){if(ca(e,r.line,r,R,H)||r.line!=R.line&&ca(e,R.line,r,R,H))throw new Error("Inserting collapsed marker partially overlapping an existing one");Tr()}H.addToHistory&&is(e,{from:r,to:R,origin:"markText"},e.sel,NaN);var le=r.line,ce=e.cm,ge;if(e.iter(le,R.line+1,function(ze){ce&&H.collapsed&&!ce.options.lineWrapping&&hi(ze)==ce.display.maxLine&&(ge=!0),H.collapsed&&le!=r.line&&Se(ze,0),kr(ze,new Vr(H,le==r.line?r.ch:null,le==R.line?R.ch:null)),++le}),H.collapsed&&e.iter(r.line,R.line+1,function(ze){rr(e,ze)&&Se(ze,0)}),H.clearOnEnter&&Ie(H,"beforeCursorEnter",function(){return H.clear()}),H.readOnly&&(Rr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),H.collapsed&&(H.id=++xs,H.atomic=!0),ce){if(ge&&(ce.curOp.updateMaxLine=!0),H.collapsed)Pr(ce,r.line,R.line+1);else if(H.className||H.startStyle||H.endStyle||H.css||H.attributes||H.title)for(var Be=r.line;Be<=R.line;Be++)Hr(ce,Be,"text");H.atomic&&ds(ce.doc),Dt(ce,"markerAdded",ce,H)}return H}var Ya=function(e,r){this.markers=e,this.primary=r;for(var R=0;R<e.length;++R)e[R].parent=this};Ya.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Dt(this,"clear")},Ya.prototype.find=function(e,r){return this.primary.find(e,r)},_e(Ya);function Sl(e,r,R,L,k){L=G(L),L.shared=!1;var H=[Ca(e,r,R,L,k)],re=H[0],le=L.widgetNode;return aa(e,function(ce){le&&(L.widgetNode=le.cloneNode(!0)),H.push(Ca(ce,mt(ce,r),mt(ce,R),L,k));for(var ge=0;ge<ce.linked.length;++ge)if(ce.linked[ge].isParent)return;re=Fe(H)}),new Ya(H,re)}function Ss(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),function(r){return r.parent})}function wl(e,r){for(var R=0;R<r.length;R++){var L=r[R],k=L.find(),H=e.clipPos(k.from),re=e.clipPos(k.to);if(St(H,re)){var le=Ca(e,H,re,L.primary,L.primary.type);L.markers.push(le),le.parent=L}}}function Tl(e){for(var r=function(L){var k=e[L],H=[k.primary.doc];aa(k.primary.doc,function(ce){return H.push(ce)});for(var re=0;re<k.markers.length;re++){var le=k.markers[re];B(H,le.doc)==-1&&(le.parent=null,k.markers.splice(re--,1))}},R=0;R<e.length;R++)r(R)}var Cl=0,yi=function(e,r,R,L,k){if(!(this instanceof yi))return new yi(e,r,R,L,k);R==null&&(R=0),Va.call(this,[new Ga([new xr("",null)])]),this.first=R,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=R;var H=it(R,0);this.sel=ra(H),this.history=new ao(null),this.id=++Cl,this.modeOption=r,this.lineSep=L,this.direction=k=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Co(this,{from:H,to:H,text:e}),ai(this,ra(H),oe)};yi.prototype=de(Va.prototype,{constructor:yi,iter:function(e,r,R){R?this.iterN(e-this.first,r-e,R):this.iterN(this.first,this.first+this.size,e)},insert:function(e,r){for(var R=0,L=0;L<r.length;++L)R+=r[L].height;this.insertInner(e-this.first,r,R)},remove:function(e,r){this.removeInner(e-this.first,r)},getValue:function(e){var r=se(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:Jr(function(e){var r=it(this.first,0),R=this.first+this.size-1;wa(this,{from:r,to:it(R,q(this,R).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Na(this.cm,0,0),ai(this,ra(r),oe)}),replaceRange:function(e,r,R,L){r=mt(this,r),R=R?mt(this,R):r,Ta(this,e,r,R,L)},getRange:function(e,r,R){var L=te(this,mt(this,e),mt(this,r));return R===!1?L:L.join(R||this.lineSeparator())},getLine:function(e){var r=this.getLineHandle(e);return r&&r.text},getLineHandle:function(e){if(xt(this,e))return q(this,e)},getLineNumber:function(e){return He(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=q(this,e)),hi(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return mt(this,e)},getCursor:function(e){var r=this.sel.primary(),R;return e==null||e=="head"?R=r.head:e=="anchor"?R=r.anchor:e=="end"||e=="to"||e===!1?R=r.to():R=r.from(),R},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Jr(function(e,r,R){ls(this,mt(this,typeof e=="number"?it(e,r||0):e),null,R)}),setSelection:Jr(function(e,r,R){ls(this,mt(this,e),mt(this,r||e),R)}),extendSelection:Jr(function(e,r,R){so(this,mt(this,e),r&&mt(this,r),R)}),extendSelections:Jr(function(e,r){ss(this,bn(this,e),r)}),extendSelectionsBy:Jr(function(e,r){var R=Me(this.sel.ranges,e);ss(this,bn(this,R),r)}),setSelections:Jr(function(e,r,R){if(!e.length)return;for(var L=[],k=0;k<e.length;k++)L[k]=new hr(mt(this,e[k].anchor),mt(this,e[k].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),ai(this,Ki(this.cm,L,r),R)}),addSelection:Jr(function(e,r,R){var L=this.sel.ranges.slice(0);L.push(new hr(mt(this,e),mt(this,r||e))),ai(this,Ki(this.cm,L,L.length-1),R)}),getSelection:function(e){for(var r=this.sel.ranges,R,L=0;L<r.length;L++){var k=te(this,r[L].from(),r[L].to());R=R?R.concat(k):k}return e===!1?R:R.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],R=this.sel.ranges,L=0;L<R.length;L++){var k=te(this,R[L].from(),R[L].to());e!==!1&&(k=k.join(e||this.lineSeparator())),r[L]=k}return r},replaceSelection:function(e,r,R){for(var L=[],k=0;k<this.sel.ranges.length;k++)L[k]=e;this.replaceSelections(L,r,R||"+input")},replaceSelections:Jr(function(e,r,R){for(var L=[],k=this.sel,H=0;H<k.ranges.length;H++){var re=k.ranges[H];L[H]={from:re.from(),to:re.to(),text:this.splitLines(e[H]),origin:R}}for(var le=r&&r!="end"&&hl(this,L,r),ce=L.length-1;ce>=0;ce--)wa(this,L[ce]);le?us(this,le):this.cm&&Ar(this.cm)}),undo:Jr(function(){co(this,"undo")}),redo:Jr(function(){co(this,"redo")}),undoSelection:Jr(function(){co(this,"undo",!0)}),redoSelection:Jr(function(){co(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,R=0,L=0;L<e.done.length;L++)e.done[L].ranges||++r;for(var k=0;k<e.undone.length;k++)e.undone[k].ranges||++R;return{undo:r,redo:R}},clearHistory:function(){var e=this;this.history=new ao(this.history.maxGeneration),aa(this,function(r){return r.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:xa(this.history.done),undone:xa(this.history.undone)}},setHistory:function(e){var r=this.history=new ao(this.history.maxGeneration);r.done=xa(e.done.slice(0),null,!0),r.undone=xa(e.undone.slice(0),null,!0)},setGutterMarker:Jr(function(e,r,R){return za(this,e,"gutter",function(L){var k=L.gutterMarkers||(L.gutterMarkers={});return k[r]=R,!R&&Ye(k)&&(L.gutterMarkers=null),!0})}),clearGutter:Jr(function(e){var r=this;this.iter(function(R){R.gutterMarkers&&R.gutterMarkers[e]&&za(r,R,"gutter",function(){return R.gutterMarkers[e]=null,Ye(R.gutterMarkers)&&(R.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!xt(this,e))return null;if(r=e,e=q(this,e),!e)return null}else if(r=He(e),r==null)return null;return{line:r,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Jr(function(e,r,R){return za(this,e,r=="gutter"?"gutter":"class",function(L){var k=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass";if(!L[k])L[k]=R;else{if(v(R).test(L[k]))return!1;L[k]+=" "+R}return!0})}),removeLineClass:Jr(function(e,r,R){return za(this,e,r=="gutter"?"gutter":"class",function(L){var k=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass",H=L[k];if(H)if(R==null)L[k]=null;else{var re=H.match(v(R));if(!re)return!1;var le=re.index+re[0].length;L[k]=H.slice(0,re.index)+(!re.index||le==H.length?"":" ")+H.slice(le)||null}else return!1;return!0})}),addLineWidget:Jr(function(e,r,R){return xl(this,e,r,R)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,R){return Ca(this,mt(this,e),mt(this,r),R,R&&R.type||"range")},setBookmark:function(e,r){var R={replacedWith:r&&(r.nodeType==null?r.widget:r),insertLeft:r&&r.insertLeft,clearWhenEmpty:!1,shared:r&&r.shared,handleMouseEvents:r&&r.handleMouseEvents};return e=mt(this,e),Ca(this,e,e,R,"bookmark")},findMarksAt:function(e){e=mt(this,e);var r=[],R=q(this,e.line).markedSpans;if(R)for(var L=0;L<R.length;++L){var k=R[L];(k.from==null||k.from<=e.ch)&&(k.to==null||k.to>=e.ch)&&r.push(k.marker.parent||k.marker)}return r},findMarks:function(e,r,R){e=mt(this,e),r=mt(this,r);var L=[],k=e.line;return this.iter(e.line,r.line+1,function(H){var re=H.markedSpans;if(re)for(var le=0;le<re.length;le++){var ce=re[le];!(ce.to!=null&&k==e.line&&e.ch>=ce.to||ce.from==null&&k!=e.line||ce.from!=null&&k==r.line&&ce.from>=r.ch)&&(!R||R(ce.marker))&&L.push(ce.marker.parent||ce.marker)}++k}),L},getAllMarks:function(){var e=[];return this.iter(function(r){var R=r.markedSpans;if(R)for(var L=0;L<R.length;++L)R[L].from!=null&&e.push(R[L].marker)}),e},posFromIndex:function(e){var r,R=this.first,L=this.lineSeparator().length;return this.iter(function(k){var H=k.text.length+L;if(H>e)return r=e,!0;e-=H,++R}),mt(this,it(R,r))},indexFromPos:function(e){e=mt(this,e);var r=e.ch;if(e.line<this.first||e.ch<0)return 0;var R=this.lineSeparator().length;return this.iter(this.first,e.line,function(L){r+=L.text.length+R}),r},copy:function(e){var r=new yi(se(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return r.scrollTop=this.scrollTop,r.scrollLeft=this.scrollLeft,r.sel=this.sel,r.extend=!1,e&&(r.history.undoDepth=this.history.undoDepth,r.setHistory(this.getHistory())),r},linkedDoc:function(e){e||(e={});var r=this.first,R=this.first+this.size;e.from!=null&&e.from>r&&(r=e.from),e.to!=null&&e.to<R&&(R=e.to);var L=new yi(se(this,r,R),e.mode||this.modeOption,r,this.lineSep,this.direction);return e.sharedHist&&(L.history=this.history),(this.linked||(this.linked=[])).push({doc:L,sharedHist:e.sharedHist}),L.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wl(L,Ss(this)),L},unlinkDoc:function(e){if(e instanceof Lr&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var R=this.linked[r];if(R.doc!=e)continue;this.linked.splice(r,1),e.unlinkDoc(this),Tl(Ss(this));break}if(e.history==this.history){var L=[e.id];aa(e,function(k){return L.push(k.id)},!0),e.history=new ao(null),e.history.done=xa(this.history.done,L),e.history.undone=xa(this.history.undone,L)}},iterLinkedDocs:function(e){aa(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):lt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Jr(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&pl(this.cm)})}),yi.prototype.eachLine=yi.prototype.iter;var ws=0;function Ol(e){var r=this;if(Ts(r),Ke(r,e)||Ln(r.display,e))return;he(e),C&&(ws=+new Date);var R=Pn(r,e,!0),L=e.dataTransfer.files;if(!R||r.isReadOnly())return;if(L&&L.length&&window.FileReader&&window.File)for(var k=L.length,H=Array(k),re=0,le=function(){++re==k&&Qr(r,function(){R=mt(r.doc,R);var nt={from:R,to:R,text:r.doc.splitLines(H.filter(function(_t){return _t!=null}).join(r.doc.lineSeparator())),origin:"paste"};wa(r.doc,nt),us(r.doc,ra(mt(r.doc,R),mt(r.doc,ia(nt))))})()},ce=function(nt,_t){if(r.options.allowDropFileTypes&&B(r.options.allowDropFileTypes,nt.type)==-1){le();return}var At=new FileReader;At.onerror=function(){return le()},At.onload=function(){var It=At.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(It)){le();return}H[_t]=It,le()},At.readAsText(nt)},ge=0;ge<L.length;ge++)ce(L[ge],ge);else{if(r.state.draggingText&&r.doc.sel.contains(R)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var Be=e.dataTransfer.getData("Text");if(Be){var ze;if(r.state.draggingText&&!r.state.draggingText.copy&&(ze=r.listSelections()),lo(r.doc,ra(R,R)),ze)for(var at=0;at<ze.length;++at)Ta(r.doc,"",ze[at].anchor,ze[at].head,"drag");r.replaceSelection(Be,"around","paste"),r.display.input.focus()}}catch(nt){}}}function Al(e,r){if(C&&(!e.state.draggingText||+new Date-ws<100)){be(r);return}if(Ke(e,r)||Ln(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!o){var R=x("img",null,null,"position: fixed; left: 0; top: 0;");R.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(R.width=R.height=1,e.display.wrapper.appendChild(R),R._top=R.offsetTop),r.dataTransfer.setDragImage(R,0,0),d&&R.parentNode.removeChild(R)}}function Ll(e,r){var R=Pn(e,r);if(!R)return;var L=document.createDocumentFragment();qt(e,R,L),e.display.dragCursor||(e.display.dragCursor=x("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),a(e.display.dragCursor,L)}function Ts(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Cs(e){if(!document.getElementsByClassName)return;for(var r=document.getElementsByClassName("CodeMirror"),R=[],L=0;L<r.length;L++){var k=r[L].CodeMirror;k&&R.push(k)}R.length&&R[0].operation(function(){for(var H=0;H<R.length;H++)e(R[H])})}var Os=!1;function Rl(){if(Os)return;Dl(),Os=!0}function Dl(){var e;Ie(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Cs(Pl)},100))}),Ie(window,"blur",function(){return Cs(ki)})}function Pl(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var sa={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},$a=0;$a<10;$a++)sa[$a+48]=sa[$a+96]=String($a);for(var fo=65;fo<=90;fo++)sa[fo]=String.fromCharCode(fo);for(var qa=1;qa<=12;qa++)sa[qa+111]=sa[qa+63235]="F"+qa;var Qi={};Qi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Qi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Qi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Qi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Qi.default=t?Qi.macDefault:Qi.pcDefault;function Ml(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var R,L,k,H,re=0;re<r.length-1;re++){var le=r[re];if(/^(cmd|meta|m)$/i.test(le))H=!0;else if(/^a(lt)?$/i.test(le))R=!0;else if(/^(c|ctrl|control)$/i.test(le))L=!0;else if(/^s(hift)?$/i.test(le))k=!0;else throw new Error("Unrecognized modifier name: "+le)}return R&&(e="Alt-"+e),L&&(e="Ctrl-"+e),H&&(e="Cmd-"+e),k&&(e="Shift-"+e),e}function kl(e){var r={};for(var R in e)if(e.hasOwnProperty(R)){var L=e[R];if(/^(name|fallthrough|(de|at)tach)$/.test(R))continue;if(L=="..."){delete e[R];continue}for(var k=Me(R.split(" "),Ml),H=0;H<k.length;H++){var re=void 0,le=void 0;H==k.length-1?(le=k.join(" "),re=L):(le=k.slice(0,H+1).join(" "),re="...");var ce=r[le];if(!ce)r[le]=re;else if(ce!=re)throw new Error("Inconsistent bindings for "+le)}delete e[R]}for(var ge in r)e[ge]=r[ge];return e}function Oa(e,r,R,L){r=ho(r);var k=r.call?r.call(e,L):r[e];if(k===!1)return"nothing";if(k==="...")return"multi";if(k!=null&&R(k))return"handled";if(r.fallthrough){if(Object.prototype.toString.call(r.fallthrough)!="[object Array]")return Oa(e,r.fallthrough,R,L);for(var H=0;H<r.fallthrough.length;H++){var re=Oa(e,r.fallthrough[H],R,L);if(re)return re}}}function As(e){var r=typeof e=="string"?e:sa[e.keyCode];return r=="Ctrl"||r=="Alt"||r=="Shift"||r=="Mod"}function Ls(e,r,R){var L=e;return r.altKey&&L!="Alt"&&(e="Alt-"+e),(_?r.metaKey:r.ctrlKey)&&L!="Ctrl"&&(e="Ctrl-"+e),(_?r.ctrlKey:r.metaKey)&&L!="Mod"&&(e="Cmd-"+e),!R&&r.shiftKey&&L!="Shift"&&(e="Shift-"+e),e}function Rs(e,r){if(d&&e.keyCode==34&&e.char)return!1;var R=sa[e.keyCode];return R==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(R=e.code),Ls(R,e,r))}function ho(e){return typeof e=="string"?Qi[e]:e}function Aa(e,r){for(var R=e.doc.sel.ranges,L=[],k=0;k<R.length;k++){for(var H=r(R[k]);L.length&&St(H.from,Fe(L).to)<=0;){var re=L.pop();if(St(re.from,H.from)<0){H.from=re.from;break}}L.push(H)}Ti(e,function(){for(var le=L.length-1;le>=0;le--)Ta(e.doc,"",L[le].from,L[le].to,"+delete");Ar(e)})}function Ro(e,r,R){var L=N(e.text,r+R,R);return L<0||L>e.text.length?null:L}function Do(e,r,R){var L=Ro(e,r.ch,R);return L==null?null:new it(r.line,L,R<0?"after":"before")}function Po(e,r,R,L,k){if(e){r.doc.direction=="rtl"&&(k=-k);var H=rt(R,r.doc.direction);if(H){var re=k<0?Fe(H):H[0],le=k<0==(re.level==1),ce=le?"after":"before",ge;if(re.level>0||r.doc.direction=="rtl"){var Be=Yn(r,R);ge=k<0?R.text.length-1:0;var ze=Zn(r,Be,ge).top;ge=$(function(at){return Zn(r,Be,at).top==ze},k<0==(re.level==1)?re.from:re.to-1,ge),ce=="before"&&(ge=Ro(R,ge,1))}else ge=k<0?re.to:re.from;return new it(L,ge,ce)}}return new it(L,k<0?R.text.length:0,k<0?"before":"after")}function Il(e,r,R,L){var k=rt(r,e.doc.direction);if(!k)return Do(r,R,L);R.ch>=r.text.length?(R.ch=r.text.length,R.sticky="before"):R.ch<=0&&(R.ch=0,R.sticky="after");var H=me(k,R.ch,R.sticky),re=k[H];if(e.doc.direction=="ltr"&&re.level%2==0&&(L>0?re.to>R.ch:re.from<R.ch))return Do(r,R,L);var le=function(zt,Zt){return Ro(r,zt instanceof it?zt.ch:zt,Zt)},ce,ge=function(zt){return e.options.lineWrapping?(ce=ce||Yn(e,r),Li(e,r,ce,zt)):{begin:0,end:r.text.length}},Be=ge(R.sticky=="before"?le(R,-1):R.ch);if(e.doc.direction=="rtl"||re.level==1){var ze=re.level==1==L<0,at=le(R,ze?1:-1);if(at!=null&&(ze?at<=re.to&&at<=Be.end:at>=re.from&&at>=Be.begin)){var nt=ze?"before":"after";return new it(R.line,at,nt)}}var _t=function(zt,Zt,Gt){for(var tn=function(Sr,Zr){return Zr?new it(R.line,le(Sr,1),"before"):new it(R.line,Sr,"after")};zt>=0&&zt<k.length;zt+=Zt){var Sn=k[zt],mn=Zt>0==(Sn.level!=1),Vn=mn?Gt.begin:le(Gt.end,-1);if(Sn.from<=Vn&&Vn<Sn.to)return tn(Vn,mn);if(Vn=mn?Sn.from:le(Sn.to,-1),Gt.begin<=Vn&&Vn<Gt.end)return tn(Vn,mn)}},At=_t(H+L,L,Be);if(At)return At;var It=L>0?Be.end:le(Be.begin,-1);return It!=null&&!(L>0&&It==r.text.length)&&(At=_t(L>0?0:k.length-1,L,ge(It)),At)?At:null}var Qa={selectAll:ps,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),oe)},killLine:function(e){return Aa(e,function(r){if(r.empty()){var R=q(e.doc,r.head.line).text.length;return r.head.ch==R&&r.head.line<e.lastLine()?{from:r.head,to:it(r.head.line+1,0)}:{from:r.head,to:it(r.head.line,R)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return Aa(e,function(r){return{from:it(r.from().line,0),to:mt(e.doc,it(r.to().line+1,0))}})},delLineLeft:function(e){return Aa(e,function(r){return{from:it(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return Aa(e,function(r){var R=e.charCoords(r.head,"div").top+5,L=e.coordsChar({left:0,top:R},"div");return{from:L,to:r.from()}})},delWrappedLineRight:function(e){return Aa(e,function(r){var R=e.charCoords(r.head,"div").top+5,L=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:R},"div");return{from:r.from(),to:L}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(it(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(it(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return Ds(e,r.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(r){return Ps(e,r.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(r){return Nl(e,r.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:R},"div")},ye)},goLineLeft:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:0,top:R},"div")},ye)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5,L=e.coordsChar({left:0,top:R},"div");return L.ch<e.getLine(L.line).search(/\S/)?Ps(e,r.head):L},ye)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var r=[],R=e.listSelections(),L=e.options.tabSize,k=0;k<R.length;k++){var H=R[k].from(),re=X(e.getLine(H.line),H.ch,L);r.push(Oe(L-re%L))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ti(e,function(){for(var r=e.listSelections(),R=[],L=0;L<r.length;L++){if(!r[L].empty())continue;var k=r[L].head,H=q(e.doc,k.line).text;if(H){if(k.ch==H.length&&(k=new it(k.line,k.ch-1)),k.ch>0)k=new it(k.line,k.ch+1),e.replaceRange(H.charAt(k.ch-1)+H.charAt(k.ch-2),it(k.line,k.ch-2),k,"+transpose");else if(k.line>e.doc.first){var re=q(e.doc,k.line-1).text;re&&(k=new it(k.line,1),e.replaceRange(H.charAt(0)+e.doc.lineSeparator()+re.charAt(re.length-1),it(k.line-1,re.length-1),k,"+transpose"))}}R.push(new hr(k,k))}e.setSelections(R)})},newlineAndIndent:function(e){return Ti(e,function(){for(var r=e.listSelections(),R=r.length-1;R>=0;R--)e.replaceRange(e.doc.lineSeparator(),r[R].anchor,r[R].head,"+input");r=e.listSelections();for(var L=0;L<r.length;L++)e.indentLine(r[L].from().line,null,!0);Ar(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Ds(e,r){var R=q(e.doc,r),L=hi(R);return L!=R&&(r=He(L)),Po(!0,e,L,r,1)}function Nl(e,r){var R=q(e.doc,r),L=Zi(R);return L!=R&&(r=He(L)),Po(!0,e,R,r,-1)}function Ps(e,r){var R=Ds(e,r.line),L=q(e.doc,R.line),k=rt(L,e.doc.direction);if(!k||k[0].level==0){var H=Math.max(R.ch,L.text.search(/\S/)),re=r.line==R.line&&r.ch<=H&&r.ch;return it(R.line,re?0:H,R.sticky)}return R}function po(e,r,R){if(typeof r=="string"&&(r=Qa[r],!r))return!1;e.display.input.ensurePolled();var L=e.display.shift,k=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),R&&(e.display.shift=!1),k=r(e)!=ie}finally{e.display.shift=L,e.state.suppressEdits=!1}return k}function Ul(e,r,R){for(var L=0;L<e.state.keyMaps.length;L++){var k=Oa(r,e.state.keyMaps[L],R,e);if(k)return k}return e.options.extraKeys&&Oa(r,e.options.extraKeys,R,e)||Oa(r,e.options.keyMap,R,e)}var jl=new J;function Ja(e,r,R,L){var k=e.state.keySeq;if(k){if(As(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:jl.set(50,function(){e.state.keySeq==k&&(e.state.keySeq=null,e.display.input.reset())}),Ms(e,k+" "+r,R,L))return!0}return Ms(e,r,R,L)}function Ms(e,r,R,L){var k=Ul(e,r,L);return k=="multi"&&(e.state.keySeq=r),k=="handled"&&Dt(e,"keyHandled",e,r,R),(k=="handled"||k=="multi")&&(he(R),jr(e)),!!k}function ks(e,r){var R=Rs(r,!0);return R?r.shiftKey&&!e.state.keySeq?Ja(e,"Shift-"+R,r,function(L){return po(e,L,!0)})||Ja(e,R,r,function(L){if(typeof L=="string"?/^go[A-Z]/.test(L):L.motion)return po(e,L)}):Ja(e,R,r,function(L){return po(e,L)}):!1}function Fl(e,r,R){return Ja(e,"'"+R+"'",r,function(L){return po(e,L,!0)})}var Mo=null;function Is(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(r.curOp.focus=I(),Ke(r,e))return;C&&T<11&&e.keyCode==27&&(e.returnValue=!1);var R=e.keyCode;r.display.shift=R==16||e.shiftKey;var L=ks(r,e);d&&(Mo=L?R:null,!L&&R==88&&!Qe&&(t?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),U&&!t&&!L&&R==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),R==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&Bl(r)}function Bl(e){var r=e.display.lineDiv;F(r,"CodeMirror-crosshair");function R(L){(L.keyCode==18||!L.altKey)&&(m(r,"CodeMirror-crosshair"),tt(document,"keyup",R),tt(document,"mouseover",R))}Ie(document,"keyup",R),Ie(document,"mouseover",R)}function Ns(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ke(this,e)}function Us(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(Ln(r.display,e)||Ke(r,e)||e.ctrlKey&&!e.altKey||t&&e.metaKey)return;var R=e.keyCode,L=e.charCode;if(d&&R==Mo){Mo=null,he(e);return}if(d&&(!e.which||e.which<10)&&ks(r,e))return;var k=String.fromCharCode(L==null?R:L);if(k=="\b")return;if(Fl(r,e,k))return;r.display.input.onKeyPress(e)}var Wl=400,ko=function(e,r,R){this.time=e,this.pos=r,this.button=R};ko.prototype.compare=function(e,r,R){return this.time+Wl>e&&St(r,this.pos)==0&&R==this.button};var Za,eo;function Kl(e,r){var R=+new Date;return eo&&eo.compare(R,e,r)?(Za=eo=null,"triple"):Za&&Za.compare(R,e,r)?(eo=new ko(R,e,r),Za=null,"double"):(Za=new ko(R,e,r),eo=null,"single")}function js(e){var r=this,R=r.display;if(Ke(r,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,Ln(R,e)){l||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(Io(r,e))return;var L=Pn(r,e),k=qe(e),H=L?Kl(L,k):"single";if(window.focus(),k==1&&r.state.selectingText&&r.state.selectingText(e),L&&Hl(r,k,L,H,e))return;k==1?L?Gl(r,L,H,e):Ge(e)==R.scroller&&he(e):k==2?(L&&so(r.doc,L),setTimeout(function(){return R.input.focus()},20)):k==3&&(b?r.display.input.onContextMenu(e):fa(r))}function Hl(e,r,R,L,k){var H="Click";return L=="double"?H="Double"+H:L=="triple"&&(H="Triple"+H),H=(r==1?"Left":r==2?"Middle":"Right")+H,Ja(e,Ls(H,k),k,function(re){if(typeof re=="string"&&(re=Qa[re]),!re)return!1;var le=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),le=re(e,R)!=ie}finally{e.state.suppressEdits=!1}return le})}function zl(e,r,R){var L=e.getOption("configureMouse"),k=L?L(e,r,R):{};if(k.unit==null){var H=u?R.shiftKey&&R.metaKey:R.altKey;k.unit=H?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(k.extend==null||e.doc.extend)&&(k.extend=e.doc.extend||R.shiftKey),k.addNew==null&&(k.addNew=t?R.metaKey:R.ctrlKey),k.moveOnDrag==null&&(k.moveOnDrag=!(t?R.altKey:R.ctrlKey)),k}function Gl(e,r,R,L){C?setTimeout(j(Fr,e),0):e.curOp.focus=I();var k=zl(e,R,L),H=e.doc.sel,re;e.options.dragDrop&&pt&&!e.isReadOnly()&&R=="single"&&(re=H.contains(r))>-1&&(St((re=H.ranges[re]).from(),r)<0||r.xRel>0)&&(St(re.to(),r)>0||r.xRel<0)?Vl(e,L,r,k):Xl(e,L,r,k)}function Vl(e,r,R,L){var k=e.display,H=!1,re=Qr(e,function(ge){l&&(k.scroller.draggable=!1),e.state.draggingText=!1,tt(k.wrapper.ownerDocument,"mouseup",re),tt(k.wrapper.ownerDocument,"mousemove",le),tt(k.scroller,"dragstart",ce),tt(k.scroller,"drop",re),H||(he(ge),L.addNew||so(e.doc,R,null,null,L.extend),l&&!o||C&&T==9?setTimeout(function(){k.wrapper.ownerDocument.body.focus({preventScroll:!0}),k.input.focus()},20):k.input.focus())}),le=function(ge){H=H||Math.abs(r.clientX-ge.clientX)+Math.abs(r.clientY-ge.clientY)>=10},ce=function(){return H=!0};l&&(k.scroller.draggable=!0),e.state.draggingText=re,re.copy=!L.moveOnDrag,k.scroller.dragDrop&&k.scroller.dragDrop(),Ie(k.wrapper.ownerDocument,"mouseup",re),Ie(k.wrapper.ownerDocument,"mousemove",le),Ie(k.scroller,"dragstart",ce),Ie(k.scroller,"drop",re),fa(e),setTimeout(function(){return k.input.focus()},20)}function Fs(e,r,R){if(R=="char")return new hr(r,r);if(R=="word")return e.findWordAt(r);if(R=="line")return new hr(it(r.line,0),mt(e.doc,it(r.line+1,0)));var L=R(e,r);return new hr(L.from,L.to)}function Xl(e,r,R,L){var k=e.display,H=e.doc;he(r);var re,le,ce=H.sel,ge=ce.ranges;if(L.addNew&&!L.extend?(le=H.sel.contains(R),le>-1?re=ge[le]:re=new hr(R,R)):(re=H.sel.primary(),le=H.sel.primIndex),L.unit=="rectangle")L.addNew||(re=new hr(R,R)),R=Pn(e,r,!0,!0),le=-1;else{var Be=Fs(e,R,L.unit);L.extend?re=Ao(re,Be.anchor,Be.head,L.extend):re=Be}L.addNew?le==-1?(le=ge.length,ai(H,Ki(e,ge.concat([re]),le),{scroll:!1,origin:"*mouse"})):ge.length>1&&ge[le].empty()&&L.unit=="char"&&!L.extend?(ai(H,Ki(e,ge.slice(0,le).concat(ge.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ce=H.sel):Lo(H,le,re,xe):(le=0,ai(H,new Pi([re],0),xe),ce=H.sel);var ze=R;function at(Gt){if(St(ze,Gt)==0)return;if(ze=Gt,L.unit=="rectangle"){for(var tn=[],Sn=e.options.tabSize,mn=X(q(H,R.line).text,R.ch,Sn),Vn=X(q(H,Gt.line).text,Gt.ch,Sn),Sr=Math.min(mn,Vn),Zr=Math.max(mn,Vn),Mr=Math.min(R.line,Gt.line),Ci=Math.min(e.lastLine(),Math.max(R.line,Gt.line));Mr<=Ci;Mr++){var bi=q(H,Mr).text,zr=Ae(bi,Sr,Sn);Sr==Zr?tn.push(new hr(it(Mr,zr),it(Mr,zr))):bi.length>zr&&tn.push(new hr(it(Mr,zr),it(Mr,Ae(bi,Zr,Sn))))}tn.length||tn.push(new hr(R,R)),ai(H,Ki(e,ce.ranges.slice(0,le).concat(tn),le),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Gt)}else{var _i=re,ni=Fs(e,Gt,L.unit),$r=_i.anchor,Gr;St(ni.anchor,$r)>0?(Gr=ni.head,$r=Jt(_i.from(),ni.anchor)):(Gr=ni.anchor,$r=ht(_i.to(),ni.head));var Nr=ce.ranges.slice(0);Nr[le]=Yl(e,new hr(mt(H,$r),Gr)),ai(H,Ki(e,Nr,le),xe)}}var nt=k.wrapper.getBoundingClientRect(),_t=0;function At(Gt){var tn=++_t,Sn=Pn(e,Gt,!0,L.unit=="rectangle");if(!Sn)return;if(St(Sn,ze)!=0){e.curOp.focus=I(),at(Sn);var mn=Ii(k,H);(Sn.line>=mn.to||Sn.line<mn.from)&&setTimeout(Qr(e,function(){_t==tn&&At(Gt)}),150)}else{var Vn=Gt.clientY<nt.top?-20:Gt.clientY>nt.bottom?20:0;Vn&&setTimeout(Qr(e,function(){if(_t!=tn)return;k.scroller.scrollTop+=Vn,At(Gt)}),50)}}function It(Gt){e.state.selectingText=!1,_t=Infinity,Gt&&(he(Gt),k.input.focus()),tt(k.wrapper.ownerDocument,"mousemove",zt),tt(k.wrapper.ownerDocument,"mouseup",Zt),H.history.lastSelOrigin=null}var zt=Qr(e,function(Gt){Gt.buttons===0||!qe(Gt)?It(Gt):At(Gt)}),Zt=Qr(e,It);e.state.selectingText=Zt,Ie(k.wrapper.ownerDocument,"mousemove",zt),Ie(k.wrapper.ownerDocument,"mouseup",Zt)}function Yl(e,r){var R=r.anchor,L=r.head,k=q(e.doc,R.line);if(St(R,L)==0&&R.sticky==L.sticky)return r;var H=rt(k);if(!H)return r;var re=me(H,R.ch,R.sticky),le=H[re];if(le.from!=R.ch&&le.to!=R.ch)return r;var ce=re+(le.from==R.ch==(le.level!=1)?0:1);if(ce==0||ce==H.length)return r;var ge;if(L.line!=R.line)ge=(L.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Be=me(H,L.ch,L.sticky),ze=Be-re||(L.ch-R.ch)*(le.level==1?-1:1);Be==ce-1||Be==ce?ge=ze<0:ge=ze>0}var at=H[ce+(ge?-1:0)],nt=ge==(at.level==1),_t=nt?at.from:at.to,At=nt?"after":"before";return R.ch==_t&&R.sticky==At?r:new hr(new it(R.line,_t,At),L)}function Bs(e,r,R,L){var k,H;if(r.touches)k=r.touches[0].clientX,H=r.touches[0].clientY;else try{k=r.clientX,H=r.clientY}catch(at){return!1}if(k>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;L&&he(r);var re=e.display,le=re.lineDiv.getBoundingClientRect();if(H>le.bottom||!De(e,R))return Ee(r);H-=le.top-re.viewOffset;for(var ce=0;ce<e.display.gutterSpecs.length;++ce){var ge=re.gutters.childNodes[ce];if(ge&&ge.getBoundingClientRect().right>=k){var Be=Je(e.doc,H),ze=e.display.gutterSpecs[ce];return Ve(e,R,e,Be,ze.className,r),Ee(r)}}}function Io(e,r){return Bs(e,r,"gutterClick",!0)}function Ws(e,r){if(Ln(e.display,r)||$l(e,r))return;if(Ke(e,r,"contextmenu"))return;b||e.display.input.onContextMenu(r)}function $l(e,r){return De(e,"gutterContextMenu")?Bs(e,r,"gutterContextMenu",!1):!1}function Ks(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),$t(e)}var La={toString:function(){return"CodeMirror.Init"}},Hs={},mo={};function ql(e){var r=e.optionHandlers;function R(L,k,H,re){e.defaults[L]=k,H&&(r[L]=re?function(le,ce,ge){ge!=La&&H(le,ce,ge)}:H)}e.defineOption=R,e.Init=La,R("value","",function(L,k){return L.setValue(k)},!0),R("mode",null,function(L,k){L.doc.modeOption=k,To(L)},!0),R("indentUnit",2,To,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(L){Ka(L),$t(L),Pr(L)},!0),R("lineSeparator",null,function(L,k){if(L.doc.lineSep=k,!k)return;var H=[],re=L.doc.first;L.doc.iter(function(ce){for(var ge=0;;){var Be=ce.text.indexOf(k,ge);if(Be==-1)break;ge=Be+k.length,H.push(it(re,Be))}re++});for(var le=H.length-1;le>=0;le--)Ta(L.doc,k,H[le],it(H[le].line,H[le].ch+k.length))}),R("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(L,k,H){L.state.specialChars=new RegExp(k.source+(k.test(" ")?"":"| "),"g"),H!=La&&L.refresh()}),R("specialCharPlaceholder",Yi,function(L){return L.refresh()},!0),R("electricChars",!0),R("inputStyle",n?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),R("spellcheck",!1,function(L,k){return L.getInputField().spellcheck=k},!0),R("autocorrect",!1,function(L,k){return L.getInputField().autocorrect=k},!0),R("autocapitalize",!1,function(L,k){return L.getInputField().autocapitalize=k},!0),R("rtlMoveVisually",!y),R("wholeLineUpdateBefore",!0),R("theme","default",function(L){Ks(L),Wa(L)},!0),R("keyMap","default",function(L,k,H){var re=ho(k),le=H!=La&&ho(H);le&&le.detach&&le.detach(L,re),re.attach&&re.attach(L,le||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,Jl,!0),R("gutters",[],function(L,k){L.display.gutterSpecs=So(k,L.options.lineNumbers),Wa(L)},!0),R("fixedGutter",!0,function(L,k){L.display.gutters.style.left=k?$n(L.display)+"px":"0",L.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(L){return Ea(L)},!0),R("scrollbarStyle","native",function(L){Go(L),Ea(L),L.display.scrollbars.setScrollTop(L.doc.scrollTop),L.display.scrollbars.setScrollLeft(L.doc.scrollLeft)},!0),R("lineNumbers",!1,function(L,k){L.display.gutterSpecs=So(L.options.gutters,k),Wa(L)},!0),R("firstLineNumber",1,Wa,!0),R("lineNumberFormatter",function(L){return L},Wa,!0),R("showCursorWhenSelecting",!1,yn,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(L,k){k=="nocursor"&&(ki(L),L.display.input.blur()),L.display.input.readOnlyChanged(k)}),R("screenReaderLabel",null,function(L,k){k=k===""?null:k,L.display.input.screenReaderLabelChanged(k)}),R("disableInput",!1,function(L,k){k||L.display.input.reset()},!0),R("dragDrop",!0,Ql),R("allowDropFileTypes",null),R("cursorBlinkRate",530),R("cursorScrollMargin",0),R("cursorHeight",1,yn,!0),R("singleCursorHeightPerLine",!0,yn,!0),R("workTime",100),R("workDelay",100),R("flattenSpans",!0,Ka,!0),R("addModeClass",!1,Ka,!0),R("pollInterval",100),R("undoDepth",200,function(L,k){return L.doc.history.undoDepth=k}),R("historyEventDelay",1250),R("viewportMargin",10,function(L){return L.refresh()},!0),R("maxHighlightLength",1e4,Ka,!0),R("moveInputWithCursor",!0,function(L,k){k||L.display.input.resetPosition()}),R("tabindex",null,function(L,k){return L.display.input.getField().tabIndex=k||""}),R("autofocus",null),R("direction","ltr",function(L,k){return L.doc.setDirection(k)},!0),R("phrases",null)}function Ql(e,r,R){var L=R&&R!=La;if(!r!=!L){var k=e.display.dragFunctions,H=r?Ie:tt;H(e.display.scroller,"dragstart",k.start),H(e.display.scroller,"dragenter",k.enter),H(e.display.scroller,"dragover",k.over),H(e.display.scroller,"dragleave",k.leave),H(e.display.scroller,"drop",k.drop)}}function Jl(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(m(e.display.wrapper,"CodeMirror-wrap"),Cr(e)),Ir(e),Pr(e),$t(e),setTimeout(function(){return Ea(e)},100)}function Lr(e,r){var R=this;if(!(this instanceof Lr))return new Lr(e,r);this.options=r=r?G(r):{},G(Hs,r,!1);var L=r.value;typeof L=="string"?L=new yi(L,r.mode,null,r.lineSeparator,r.direction):r.mode&&(L.modeOption=r.mode),this.doc=L;var k=new Lr.inputStyles[r.inputStyle](this),H=this.display=new dl(e,L,k,r);H.wrapper.CodeMirror=this,Ks(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Go(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new J,keySeq:null,specialChars:null},r.autofocus&&!n&&H.input.focus(),C&&T<11&&setTimeout(function(){return R.display.input.reset(!0)},20),Zl(this),Rl(),ma(this),this.curOp.forceUpdate=!0,ts(this,L),r.autofocus&&!n||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&un(R)},20):ki(this);for(var re in mo)mo.hasOwnProperty(re)&&mo[re](this,r[re],La);Yo(this),r.finishInit&&r.finishInit(this);for(var le=0;le<No.length;++le)No[le](this);va(this),l&&r.lineWrapping&&getComputedStyle(H.lineDiv).textRendering=="optimizelegibility"&&(H.lineDiv.style.textRendering="auto")}Lr.defaults=Hs,Lr.optionHandlers=mo;function Zl(e){var r=e.display;Ie(r.scroller,"mousedown",Qr(e,js)),C&&T<11?Ie(r.scroller,"dblclick",Qr(e,function(ce){if(Ke(e,ce))return;var ge=Pn(e,ce);if(!ge||Io(e,ce)||Ln(e.display,ce))return;he(ce);var Be=e.findWordAt(ge);so(e.doc,Be.anchor,Be.head)})):Ie(r.scroller,"dblclick",function(ce){return Ke(e,ce)||he(ce)}),Ie(r.scroller,"contextmenu",function(ce){return Ws(e,ce)}),Ie(r.input.getField(),"contextmenu",function(ce){r.scroller.contains(ce.target)||Ws(e,ce)});var R,L={end:0};function k(){r.activeTouch&&(R=setTimeout(function(){return r.activeTouch=null},1e3),L=r.activeTouch,L.end=+new Date)}function H(ce){if(ce.touches.length!=1)return!1;var ge=ce.touches[0];return ge.radiusX<=1&&ge.radiusY<=1}function re(ce,ge){if(ge.left==null)return!0;var Be=ge.left-ce.left,ze=ge.top-ce.top;return Be*Be+ze*ze>20*20}Ie(r.scroller,"touchstart",function(ce){if(!Ke(e,ce)&&!H(ce)&&!Io(e,ce)){r.input.ensurePolled(),clearTimeout(R);var ge=+new Date;r.activeTouch={start:ge,moved:!1,prev:ge-L.end<=300?L:null},ce.touches.length==1&&(r.activeTouch.left=ce.touches[0].pageX,r.activeTouch.top=ce.touches[0].pageY)}}),Ie(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Ie(r.scroller,"touchend",function(ce){var ge=r.activeTouch;if(ge&&!Ln(r,ce)&&ge.left!=null&&!ge.moved&&new Date-ge.start<300){var Be=e.coordsChar(r.activeTouch,"page"),ze;!ge.prev||re(ge,ge.prev)?ze=new hr(Be,Be):!ge.prev.prev||re(ge,ge.prev.prev)?ze=e.findWordAt(Be):ze=new hr(it(Be.line,0),mt(e.doc,it(Be.line+1,0))),e.setSelection(ze.anchor,ze.head),e.focus(),he(ce)}k()}),Ie(r.scroller,"touchcancel",k),Ie(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Ua(e,r.scroller.scrollTop),ha(e,r.scroller.scrollLeft,!0),Ve(e,"scroll",e))}),Ie(r.scroller,"mousewheel",function(ce){return Qo(e,ce)}),Ie(r.scroller,"DOMMouseScroll",function(ce){return Qo(e,ce)}),Ie(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(ce){Ke(e,ce)||be(ce)},over:function(ce){Ke(e,ce)||(Ll(e,ce),be(ce))},start:function(ce){return Al(e,ce)},drop:Qr(e,Ol),leave:function(ce){Ke(e,ce)||Ts(e)}};var le=r.input.getField();Ie(le,"keyup",function(ce){return Ns.call(e,ce)}),Ie(le,"keydown",Qr(e,Is)),Ie(le,"keypress",Qr(e,Us)),Ie(le,"focus",function(ce){return un(e,ce)}),Ie(le,"blur",function(ce){return ki(e,ce)})}var No=[];Lr.defineInitHook=function(e){return No.push(e)};function to(e,r,R,L){var k=e.doc,H;R==null&&(R="add"),R=="smart"&&(k.mode.indent?H=et(e,r).state:R="prev");var re=e.options.tabSize,le=q(k,r),ce=X(le.text,null,re);le.stateAfter&&(le.stateAfter=null);var ge=le.text.match(/^\s*/)[0],Be;if(!L&&!/\S/.test(le.text))Be=0,R="not";else if(R=="smart"&&(Be=k.mode.indent(H,le.text.slice(ge.length),le.text),Be==ie||Be>150)){if(!L)return;R="prev"}R=="prev"?r>k.first?Be=X(q(k,r-1).text,null,re):Be=0:R=="add"?Be=ce+e.options.indentUnit:R=="subtract"?Be=ce-e.options.indentUnit:typeof R=="number"&&(Be=ce+R),Be=Math.max(0,Be);var ze="",at=0;if(e.options.indentWithTabs)for(var nt=Math.floor(Be/re);nt;--nt)at+=re,ze+=" ";if(at<Be&&(ze+=Oe(Be-at)),ze!=ge)return Ta(k,ze,it(r,0),it(r,ge.length),"+input"),le.stateAfter=null,!0;for(var _t=0;_t<k.sel.ranges.length;_t++){var At=k.sel.ranges[_t];if(At.head.line==r&&At.head.ch<ge.length){var It=it(r,ge.length);Lo(k,_t,new hr(It,It));break}}}var Hi=null;function vo(e){Hi=e}function Uo(e,r,R,L,k){var H=e.doc;e.display.shift=!1,L||(L=H.sel);var re=+new Date-200,le=k=="paste"||e.state.pasteIncoming>re,ce=lt(r),ge=null;if(le&&L.ranges.length>1)if(Hi&&Hi.text.join(`
`)==r){if(L.ranges.length%Hi.text.length==0){ge=[];for(var Be=0;Be<Hi.text.length;Be++)ge.push(H.splitLines(Hi.text[Be]))}}else ce.length==L.ranges.length&&e.options.pasteLinesPerSelection&&(ge=Me(ce,function(zt){return[zt]}));for(var ze=e.curOp.updateInput,at=L.ranges.length-1;at>=0;at--){var nt=L.ranges[at],_t=nt.from(),At=nt.to();nt.empty()&&(R&&R>0?_t=it(_t.line,_t.ch-R):e.state.overwrite&&!le?At=it(At.line,Math.min(q(H,At.line).text.length,At.ch+Fe(ce).length)):le&&Hi&&Hi.lineWise&&Hi.text.join(`
`)==ce.join(`
`)&&(_t=At=it(_t.line,0)));var It={from:_t,to:At,text:ge?ge[at%ge.length]:ce,origin:k||(le?"paste":e.state.cutIncoming>re?"cut":"+input")};wa(e.doc,It),Dt(e,"inputRead",e,It)}r&&!le&&Gs(e,r),Ar(e),e.curOp.updateInput<2&&(e.curOp.updateInput=ze),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function zs(e,r){var R=e.clipboardData&&e.clipboardData.getData("Text");if(R)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Ti(r,function(){return Uo(r,R,0,null,"paste")}),!0}function Gs(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var R=e.doc.sel,L=R.ranges.length-1;L>=0;L--){var k=R.ranges[L];if(k.head.ch>100||L&&R.ranges[L-1].head.line==k.head.line)continue;var H=e.getModeAt(k.head),re=!1;if(H.electricChars){for(var le=0;le<H.electricChars.length;le++)if(r.indexOf(H.electricChars.charAt(le))>-1){re=to(e,k.head.line,"smart");break}}else H.electricInput&&(H.electricInput.test(q(e.doc,k.head.line).text.slice(0,k.head.ch))&&(re=to(e,k.head.line,"smart")));re&&Dt(e,"electricInput",e,k.head.line)}}function Vs(e){for(var r=[],R=[],L=0;L<e.doc.sel.ranges.length;L++){var k=e.doc.sel.ranges[L].head.line,H={anchor:it(k,0),head:it(k+1,0)};R.push(H),r.push(e.getRange(H.anchor,H.head))}return{text:r,ranges:R}}function Xs(e,r,R,L){e.setAttribute("autocorrect",R?"":"off"),e.setAttribute("autocapitalize",L?"":"off"),e.setAttribute("spellcheck",!!r)}function Ys(){var e=x("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=x("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),f&&(e.style.border="1px solid black"),Xs(e),r}function eu(e){var r=e.optionHandlers,R=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(L,k){var H=this.options,re=H[L];if(H[L]==k&&L!="mode")return;H[L]=k,r.hasOwnProperty(L)&&Qr(this,r[L])(this,k,re),Ve(this,"optionChange",this,L)},getOption:function(L){return this.options[L]},getDoc:function(){return this.doc},addKeyMap:function(L,k){this.state.keyMaps[k?"push":"unshift"](ho(L))},removeKeyMap:function(L){for(var k=this.state.keyMaps,H=0;H<k.length;++H)if(k[H]==L||k[H].name==L)return k.splice(H,1),!0},addOverlay:ui(function(L,k){var H=L.token?L:e.getMode(this.options,L);if(H.startState)throw new Error("Overlays may not be stateful.");Ce(this.state.overlays,{mode:H,modeSpec:L,opaque:k&&k.opaque,priority:k&&k.priority||0},function(re){return re.priority}),this.state.modeGen++,Pr(this)}),removeOverlay:ui(function(L){for(var k=this.state.overlays,H=0;H<k.length;++H){var re=k[H].modeSpec;if(re==L||typeof L=="string"&&re.name==L){k.splice(H,1),this.state.modeGen++,Pr(this);return}}}),indentLine:ui(function(L,k,H){typeof k!="string"&&typeof k!="number"&&(k==null?k=this.options.smartIndent?"smart":"prev":k=k?"add":"subtract"),xt(this.doc,L)&&to(this,L,k,H)}),indentSelection:ui(function(L){for(var k=this.doc.sel.ranges,H=-1,re=0;re<k.length;re++){var le=k[re];if(le.empty())le.head.line>H&&(to(this,le.head.line,L,!0),H=le.head.line,re==this.doc.sel.primIndex&&Ar(this));else{var ce=le.from(),ge=le.to(),Be=Math.max(H,ce.line);H=Math.min(this.lastLine(),ge.line-(ge.ch?0:1))+1;for(var ze=Be;ze<H;++ze)to(this,ze,L);var at=this.doc.sel.ranges;ce.ch==0&&k.length==at.length&&at[re].from().ch>0&&Lo(this.doc,re,new hr(ce,at[re].to()),oe)}}}),getTokenAt:function(L,k){return sr(this,L,k)},getLineTokens:function(L,k){return sr(this,it(L),k,!0)},getTokenTypeAt:function(L){L=mt(this.doc,L);var k=Kt(this,q(this.doc,L.line)),H=0,re=(k.length-1)/2,le=L.ch,ce;if(le==0)ce=k[2];else for(;;){var ge=H+re>>1;if((ge?k[ge*2-1]:0)>=le)re=ge;else if(k[ge*2+1]<le)H=ge+1;else{ce=k[ge*2+2];break}}var Be=ce?ce.indexOf("overlay "):-1;return Be<0?ce:Be==0?null:ce.slice(0,Be-1)},getModeAt:function(L){var k=this.doc.mode;return k.innerMode?e.innerMode(k,this.getTokenAt(L).state).mode:k},getHelper:function(L,k){return this.getHelpers(L,k)[0]},getHelpers:function(L,k){var H=[];if(!R.hasOwnProperty(k))return H;var re=R[k],le=this.getModeAt(L);if(typeof le[k]=="string")re[le[k]]&&H.push(re[le[k]]);else if(le[k])for(var ce=0;ce<le[k].length;ce++){var ge=re[le[k][ce]];ge&&H.push(ge)}else le.helperType&&re[le.helperType]?H.push(re[le.helperType]):re[le.name]&&H.push(re[le.name]);for(var Be=0;Be<re._global.length;Be++){var ze=re._global[Be];ze.pred(le,this)&&B(H,ze.val)==-1&&H.push(ze.val)}return H},getStateAfter:function(L,k){var H=this.doc;return L=Nt(H,L==null?H.first+H.size-1:L),et(this,L+1,k).state},cursorCoords:function(L,k){var H,re=this.doc.sel.primary();return L==null?H=re.head:typeof L=="object"?H=mt(this.doc,L):H=L?re.from():re.to(),Bn(this,H,k||"page")},charCoords:function(L,k){return _n(this,mt(this.doc,L),k||"page")},coordsChar:function(L,k){return L=Dn(this,L,k||"page"),wr(this,L.left,L.top)},lineAtHeight:function(L,k){return L=Dn(this,{top:L,left:0},k||"page").top,Je(this.doc,L+this.display.viewOffset)},heightAtLine:function(L,k,H){var re=!1,le;if(typeof L=="number"){var ce=this.doc.first+this.doc.size-1;L<this.doc.first?L=this.doc.first:L>ce&&(L=ce,re=!0),le=q(this.doc,L)}else le=L;return pn(this,le,{top:0,left:0},k||"page",H||re).top+(re?this.doc.height-pr(le):0)},defaultTextHeight:function(){return ji(this.display)},defaultCharWidth:function(){return Wn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(L,k,H,re,le){var ce=this.display;L=Bn(this,mt(this.doc,L));var ge=L.bottom,Be=L.left;if(k.style.position="absolute",k.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(k),ce.sizer.appendChild(k),re=="over")ge=L.top;else if(re=="above"||re=="near"){var ze=Math.max(ce.wrapper.clientHeight,this.doc.height),at=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(re=="above"||L.bottom+k.offsetHeight>ze)&&L.top>k.offsetHeight?ge=L.top-k.offsetHeight:L.bottom+k.offsetHeight<=ze&&(ge=L.bottom),Be+k.offsetWidth>at&&(Be=at-k.offsetWidth)}k.style.top=ge+"px",k.style.left=k.style.right="",le=="right"?(Be=ce.sizer.clientWidth-k.offsetWidth,k.style.right="0px"):(le=="left"?Be=0:le=="middle"&&(Be=(ce.sizer.clientWidth-k.offsetWidth)/2),k.style.left=Be+"px"),H&&na(this,{left:Be,top:ge,right:Be+k.offsetWidth,bottom:ge+k.offsetHeight})},triggerOnKeyDown:ui(Is),triggerOnKeyPress:ui(Us),triggerOnKeyUp:Ns,triggerOnMouseDown:ui(js),execCommand:function(L){if(Qa.hasOwnProperty(L))return Qa[L].call(null,this)},triggerElectric:ui(function(L){Gs(this,L)}),findPosH:function(L,k,H,re){var le=1;k<0&&(le=-1,k=-k);for(var ce=mt(this.doc,L),ge=0;ge<k&&!(ce=jo(this.doc,ce,le,H,re),ce.hitSide);++ge);return ce},moveH:ui(function(L,k){var H=this;this.extendSelectionsBy(function(re){return H.display.shift||H.doc.extend||re.empty()?jo(H.doc,re.head,L,k,H.options.rtlMoveVisually):L<0?re.from():re.to()},ye)}),deleteH:ui(function(L,k){var H=this.doc.sel,re=this.doc;H.somethingSelected()?re.replaceSelection("",null,"+delete"):Aa(this,function(le){var ce=jo(re,le.head,L,k,!1);return L<0?{from:ce,to:le.head}:{from:le.head,to:ce}})}),findPosV:function(L,k,H,re){var le=1,ce=re;k<0&&(le=-1,k=-k);for(var ge=mt(this.doc,L),Be=0;Be<k;++Be){var ze=Bn(this,ge,"div");if(ce==null?ce=ze.left:ze.left=ce,ge=$s(this,ze,le,H),ge.hitSide)break}return ge},moveV:ui(function(L,k){var H=this,re=this.doc,le=[],ce=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(Be){if(ce)return L<0?Be.from():Be.to();var ze=Bn(H,Be.head,"div");Be.goalColumn!=null&&(ze.left=Be.goalColumn),le.push(ze.left);var at=$s(H,ze,L,k);return k=="page"&&Be==re.sel.primary()&&Ia(H,_n(H,at,"div").top-ze.top),at},ye),le.length)for(var ge=0;ge<re.sel.ranges.length;ge++)re.sel.ranges[ge].goalColumn=le[ge]}),findWordAt:function(L){var k=this.doc,H=q(k,L.line).text,re=L.ch,le=L.ch;if(H){var ce=this.getHelper(L,"wordChars");(L.sticky=="before"||le==H.length)&&re?--re:++le;for(var ge=H.charAt(re),Be=Ue(ge,ce)?function(ze){return Ue(ze,ce)}:/\s/.test(ge)?function(ze){return/\s/.test(ze)}:function(ze){return!/\s/.test(ze)&&!Ue(ze)};re>0&&Be(H.charAt(re-1));)--re;for(;le<H.length&&Be(H.charAt(le));)++le}return new hr(it(L.line,re),it(L.line,le))},toggleOverwrite:function(L){if(L!=null&&L==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?F(this.display.cursorDiv,"CodeMirror-overwrite"):m(this.display.cursorDiv,"CodeMirror-overwrite"),Ve(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==I()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ui(function(L,k){Na(this,L,k)}),getScrollInfo:function(){var L=this.display.scroller;return{left:L.scrollLeft,top:L.scrollTop,height:L.scrollHeight-ir(this)-this.display.barHeight,width:L.scrollWidth-ir(this)-this.display.barWidth,clientHeight:mr(this),clientWidth:lr(this)}},scrollIntoView:ui(function(L,k){L==null?(L={from:this.doc.sel.primary().head,to:null},k==null&&(k=this.options.cursorScrollMargin)):typeof L=="number"?L={from:it(L,0),to:null}:L.from==null&&(L={from:L,to:null}),L.to||(L.to=L.from),L.margin=k||0,L.from.line!=null?Js(this,L):Wo(this,L.from,L.to,L.margin)}),setSize:ui(function(L,k){var H=this,re=function(ce){return typeof ce=="number"||/^\d+$/.test(String(ce))?ce+"px":ce};L!=null&&(this.display.wrapper.style.width=re(L)),k!=null&&(this.display.wrapper.style.height=re(k)),this.options.lineWrapping&&Bt(this);var le=this.display.viewFrom;this.doc.iter(le,this.display.viewTo,function(ce){if(ce.widgets){for(var ge=0;ge<ce.widgets.length;ge++)if(ce.widgets[ge].noHScroll){Hr(H,le,"widget");break}}++le}),this.curOp.forceUpdate=!0,Ve(this,"refresh",this)}),operation:function(L){return Ti(this,L)},startOperation:function(){return ma(this)},endOperation:function(){return va(this)},refresh:ui(function(){var L=this.display.cachedTextHeight;Pr(this),this.curOp.forceUpdate=!0,$t(this),Na(this,this.doc.scrollLeft,this.doc.scrollTop),Eo(this.display),(L==null||Math.abs(L-ji(this.display))>.5||this.options.lineWrapping)&&Ir(this),Ve(this,"refresh",this)}),swapDoc:ui(function(L){var k=this.doc;return k.cm=null,this.state.selectingText&&this.state.selectingText(),ts(this,L),$t(this),this.display.input.reset(),Na(this,L.scrollLeft,L.scrollTop),this.curOp.forceScroll=!0,Dt(this,"swapDoc",this,k),k}),phrase:function(L){var k=this.options.phrases;return k&&Object.prototype.hasOwnProperty.call(k,L)?k[L]:L},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},_e(e),e.registerHelper=function(L,k,H){R.hasOwnProperty(L)||(R[L]=e[L]={_global:[]}),R[L][k]=H},e.registerGlobalHelper=function(L,k,H,re){e.registerHelper(L,k,re),R[L]._global.push({pred:H,val:re})}}function jo(e,r,R,L,k){var H=r,re=R,le=q(e,r.line),ce=k&&e.direction=="rtl"?-R:R;function ge(){var Zt=r.line+ce;return Zt<e.first||Zt>=e.first+e.size?!1:(r=new it(Zt,r.ch,r.sticky),le=q(e,Zt))}function Be(Zt){var Gt;if(L=="codepoint"){var tn=le.text.charCodeAt(r.ch+(L>0?0:-1));isNaN(tn)?Gt=null:Gt=new it(r.line,Math.max(0,Math.min(le.text.length,r.ch+R*(tn>=55296&&tn<56320?2:1))),-R)}else k?Gt=Il(e.cm,le,r,R):Gt=Do(le,r,R);if(Gt==null)if(!Zt&&ge())r=Po(k,e.cm,le,r.line,ce);else return!1;else r=Gt;return!0}if(L=="char"||L=="codepoint")Be();else if(L=="column")Be(!0);else if(L=="word"||L=="group")for(var ze=null,at=L=="group",nt=e.cm&&e.cm.getHelper(r,"wordChars"),_t=!0;!(R<0&&!Be(!_t));_t=!1){var At=le.text.charAt(r.ch)||`
`,It=Ue(At,nt)?"w":at&&At==`
`?"n":!at||/\s/.test(At)?null:"p";if(at&&!_t&&!It&&(It="s"),ze&&ze!=It){R<0&&(R=1,Be(),r.sticky="after");break}if(It&&(ze=It),R>0&&!Be(!_t))break}var zt=uo(e,r,H,re,!0);return Xt(H,zt)&&(zt.hitSide=!0),zt}function $s(e,r,R,L){var k=e.doc,H=r.left,re;if(L=="page"){var le=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ce=Math.max(le-.5*ji(e.display),3);re=(R>0?r.bottom:r.top)+R*ce}else L=="line"&&(re=R>0?r.bottom+3:r.top-3);for(var ge;!(ge=wr(e,H,re),!ge.outside);){if(R<0?re<=0:re>=k.height){ge.hitSide=!0;break}re+=R*5}return ge}var vr=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new J,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};vr.prototype.init=function(e){var r=this,R=this,L=R.cm,k=R.div=e.lineDiv;Xs(k,L.options.spellcheck,L.options.autocorrect,L.options.autocapitalize);function H(le){for(var ce=le.target;ce;ce=ce.parentNode){if(ce==k)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ce.className))break}return!1}Ie(k,"paste",function(le){if(!H(le)||Ke(L,le)||zs(le,L))return;T<=11&&setTimeout(Qr(L,function(){return r.updateFromDOM()}),20)}),Ie(k,"compositionstart",function(le){r.composing={data:le.data,done:!1}}),Ie(k,"compositionupdate",function(le){r.composing||(r.composing={data:le.data,done:!1})}),Ie(k,"compositionend",function(le){r.composing&&(le.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Ie(k,"touchstart",function(){return R.forceCompositionEnd()}),Ie(k,"input",function(){r.composing||r.readFromDOMSoon()});function re(le){if(!H(le)||Ke(L,le))return;if(L.somethingSelected())vo({lineWise:!1,text:L.getSelections()}),le.type=="cut"&&L.replaceSelection("",null,"cut");else if(L.options.lineWiseCopyCut){var ce=Vs(L);vo({lineWise:!0,text:ce.text}),le.type=="cut"&&L.operation(function(){L.setSelections(ce.ranges,0,oe),L.replaceSelection("",null,"cut")})}else return;if(le.clipboardData){le.clipboardData.clearData();var ge=Hi.text.join(`
`);if(le.clipboardData.setData("Text",ge),le.clipboardData.getData("Text")==ge){le.preventDefault();return}}var Be=Ys(),ze=Be.firstChild;L.display.lineSpace.insertBefore(Be,L.display.lineSpace.firstChild),ze.value=Hi.text.join(`
`);var at=document.activeElement;ne(ze),setTimeout(function(){L.display.lineSpace.removeChild(Be),at.focus(),at==k&&R.showPrimarySelection()},50)}Ie(k,"copy",re),Ie(k,"cut",re)},vr.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},vr.prototype.prepareSelection=function(){var e=Kn(this.cm,!1);return e.focus=document.activeElement==this.div,e},vr.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},vr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},vr.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,R=r.doc.sel.primary(),L=R.from(),k=R.to();if(r.display.viewTo==r.display.viewFrom||L.line>=r.display.viewTo||k.line<r.display.viewFrom){e.removeAllRanges();return}var H=go(r,e.anchorNode,e.anchorOffset),re=go(r,e.focusNode,e.focusOffset);if(H&&!H.bad&&re&&!re.bad&&St(Jt(H,re),L)==0&&St(ht(H,re),k)==0)return;var le=r.display.view,ce=L.line>=r.display.viewFrom&&Qs(r,L)||{node:le[0].measure.map[2],offset:0},ge=k.line<r.display.viewTo&&Qs(r,k);if(!ge){var Be=le[le.length-1].measure,ze=Be.maps?Be.maps[Be.maps.length-1]:Be.map;ge={node:ze[ze.length-1],offset:ze[ze.length-2]-ze[ze.length-3]}}if(!ce||!ge){e.removeAllRanges();return}var at=e.rangeCount&&e.getRangeAt(0),nt;try{nt=A(ce.node,ce.offset,ge.offset,ge.node)}catch(_t){}nt&&(!U&&r.state.focused?(e.collapse(ce.node,ce.offset),nt.collapsed||(e.removeAllRanges(),e.addRange(nt))):(e.removeAllRanges(),e.addRange(nt)),at&&e.anchorNode==null?e.addRange(at):U&&this.startGracePeriod()),this.rememberSelection()},vr.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},vr.prototype.showMultipleSelections=function(e){a(this.cm.display.cursorDiv,e.cursors),a(this.cm.display.selectionDiv,e.selection)},vr.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},vr.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return D(this.div,r)},vr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},vr.prototype.blur=function(){this.div.blur()},vr.prototype.getField=function(){return this.div},vr.prototype.supportsTouch=function(){return!0},vr.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Ti(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function r(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,r))}this.polling.set(this.cm.options.pollInterval,r)},vr.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},vr.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(i&&h&&this.cm.display.gutterSpecs.length&&tu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var R=go(r,e.anchorNode,e.anchorOffset),L=go(r,e.focusNode,e.focusOffset);R&&L&&Ti(r,function(){ai(r.doc,ra(R,L),oe),(R.bad||L.bad)&&(r.curOp.selectionChanged=!0)})},vr.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,R=e.doc.sel.primary(),L=R.from(),k=R.to();if(L.ch==0&&L.line>e.firstLine()&&(L=it(L.line-1,q(e.doc,L.line-1).length)),k.ch==q(e.doc,k.line).text.length&&k.line<e.lastLine()&&(k=it(k.line+1,0)),L.line<r.viewFrom||k.line>r.viewTo-1)return!1;var H,re,le;L.line==r.viewFrom||(H=qr(e,L.line))==0?(re=He(r.view[0].line),le=r.view[0].node):(re=He(r.view[H].line),le=r.view[H-1].node.nextSibling);var ce=qr(e,k.line),ge,Be;if(ce==r.view.length-1?(ge=r.viewTo-1,Be=r.lineDiv.lastChild):(ge=He(r.view[ce+1].line)-1,Be=r.view[ce+1].node.previousSibling),!le)return!1;for(var ze=e.doc.splitLines(nu(e,le,Be,re,ge)),at=te(e.doc,it(re,0),it(ge,q(e.doc,ge).text.length));ze.length>1&&at.length>1;)if(Fe(ze)==Fe(at))ze.pop(),at.pop(),ge--;else if(ze[0]==at[0])ze.shift(),at.shift(),re++;else break;for(var nt=0,_t=0,At=ze[0],It=at[0],zt=Math.min(At.length,It.length);nt<zt&&At.charCodeAt(nt)==It.charCodeAt(nt);)++nt;for(var Zt=Fe(ze),Gt=Fe(at),tn=Math.min(Zt.length-(ze.length==1?nt:0),Gt.length-(at.length==1?nt:0));_t<tn&&Zt.charCodeAt(Zt.length-_t-1)==Gt.charCodeAt(Gt.length-_t-1);)++_t;if(ze.length==1&&at.length==1&&re==L.line)for(;nt&&nt>L.ch&&Zt.charCodeAt(Zt.length-_t-1)==Gt.charCodeAt(Gt.length-_t-1);)nt--,_t++;ze[ze.length-1]=Zt.slice(0,Zt.length-_t).replace(/^\u200b+/,""),ze[0]=ze[0].slice(nt).replace(/\u200b+$/,"");var Sn=it(re,nt),mn=it(ge,at.length?Fe(at).length-_t:0);if(ze.length>1||ze[0]||St(Sn,mn))return Ta(e.doc,ze,Sn,mn,"+input"),!0},vr.prototype.ensurePolled=function(){this.forceCompositionEnd()},vr.prototype.reset=function(){this.forceCompositionEnd()},vr.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},vr.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},vr.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ti(this.cm,function(){return Pr(e.cm)})},vr.prototype.setUneditable=function(e){e.contentEditable="false"},vr.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Qr(this.cm,Uo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},vr.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},vr.prototype.onContextMenu=function(){},vr.prototype.resetPosition=function(){},vr.prototype.needsContentAttribute=!0;function Qs(e,r){var R=fn(e,r.line);if(!R||R.hidden)return null;var L=q(e.doc,r.line),k=or(R,L,r.line),H=rt(L,e.doc.direction),re="left";if(H){var le=me(H,r.ch);re=le%2?"right":"left"}var ce=zn(k.map,r.ch,re);return ce.offset=ce.collapse=="right"?ce.end:ce.start,ce}function tu(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function Ra(e,r){return r&&(e.bad=!0),e}function nu(e,r,R,L,k){var H="",re=!1,le=e.doc.lineSeparator(),ce=!1;function ge(nt){return function(_t){return _t.id==nt}}function Be(){re&&(H+=le,ce&&(H+=le),re=ce=!1)}function ze(nt){nt&&(Be(),H+=nt)}function at(nt){if(nt.nodeType==1){var _t=nt.getAttribute("cm-text");if(_t){ze(_t);return}var At=nt.getAttribute("cm-marker"),It;if(At){var zt=e.findMarks(it(L,0),it(k+1,0),ge(+At));zt.length&&(It=zt[0].find(0))&&ze(te(e.doc,It.from,It.to).join(le));return}if(nt.getAttribute("contenteditable")=="false")return;var Zt=/^(pre|div|p|li|table|br)$/i.test(nt.nodeName);if(!/^br$/i.test(nt.nodeName)&&nt.textContent.length==0)return;Zt&&Be();for(var Gt=0;Gt<nt.childNodes.length;Gt++)at(nt.childNodes[Gt]);/^(pre|p)$/i.test(nt.nodeName)&&(ce=!0),Zt&&(re=!0)}else nt.nodeType==3&&ze(nt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(at(r),r==R);)r=r.nextSibling,ce=!1;return H}function go(e,r,R){var L;if(r==e.display.lineDiv){if(L=e.display.lineDiv.childNodes[R],!L)return Ra(e.clipPos(it(e.display.viewTo-1)),!0);r=null,R=0}else for(L=r;;L=L.parentNode){if(!L||L==e.display.lineDiv)return null;if(L.parentNode&&L.parentNode==e.display.lineDiv)break}for(var k=0;k<e.display.view.length;k++){var H=e.display.view[k];if(H.node==L)return ru(H,r,R)}}function ru(e,r,R){var L=e.text.firstChild,k=!1;if(!r||!D(L,r))return Ra(it(He(e.line),0),!0);if(r==L&&(k=!0,r=L.childNodes[R],R=0,!r)){var H=e.rest?Fe(e.rest):e.line;return Ra(it(He(H),H.text.length),k)}var re=r.nodeType==3?r:null,le=r;for(!re&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(re=r.firstChild,R&&(R=re.nodeValue.length));le.parentNode!=L;)le=le.parentNode;var ce=e.measure,ge=ce.maps;function Be(It,zt,Zt){for(var Gt=-1;Gt<(ge?ge.length:0);Gt++)for(var tn=Gt<0?ce.map:ge[Gt],Sn=0;Sn<tn.length;Sn+=3){var mn=tn[Sn+2];if(mn==It||mn==zt){var Vn=He(Gt<0?e.line:e.rest[Gt]),Sr=tn[Sn]+Zt;return(Zt<0||mn!=It)&&(Sr=tn[Sn+(Zt?1:0)]),it(Vn,Sr)}}}var ze=Be(re,le,R);if(ze)return Ra(ze,k);for(var at=le.nextSibling,nt=re?re.nodeValue.length-R:0;at;at=at.nextSibling){if(ze=Be(at,at.firstChild,0),ze)return Ra(it(ze.line,ze.ch-nt),k);nt+=at.textContent.length}for(var _t=le.previousSibling,At=R;_t;_t=_t.previousSibling){if(ze=Be(_t,_t.firstChild,-1),ze)return Ra(it(ze.line,ze.ch+At),k);At+=_t.textContent.length}}var Br=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new J,this.hasSelection=!1,this.composing=null};Br.prototype.init=function(e){var r=this,R=this,L=this.cm;this.createField(e);var k=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),f&&(k.style.width="0px"),Ie(k,"input",function(){C&&T>=9&&r.hasSelection&&(r.hasSelection=null),R.poll()}),Ie(k,"paste",function(re){if(Ke(L,re)||zs(re,L))return;L.state.pasteIncoming=+new Date,R.fastPoll()});function H(re){if(Ke(L,re))return;if(L.somethingSelected())vo({lineWise:!1,text:L.getSelections()});else if(L.options.lineWiseCopyCut){var le=Vs(L);vo({lineWise:!0,text:le.text}),re.type=="cut"?L.setSelections(le.ranges,null,oe):(R.prevInput="",k.value=le.text.join(`
`),ne(k))}else return;re.type=="cut"&&(L.state.cutIncoming=+new Date)}Ie(k,"cut",H),Ie(k,"copy",H),Ie(e.scroller,"paste",function(re){if(Ln(e,re)||Ke(L,re))return;if(!k.dispatchEvent){L.state.pasteIncoming=+new Date,R.focus();return}var le=new Event("paste");le.clipboardData=re.clipboardData,k.dispatchEvent(le)}),Ie(e.lineSpace,"selectstart",function(re){Ln(e,re)||he(re)}),Ie(k,"compositionstart",function(){var re=L.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:re,range:L.markText(re,L.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(k,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},Br.prototype.createField=function(e){this.wrapper=Ys(),this.textarea=this.wrapper.firstChild},Br.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Br.prototype.prepareSelection=function(){var e=this.cm,r=e.display,R=e.doc,L=Kn(e);if(e.options.moveInputWithCursor){var k=Bn(e,R.sel.primary().head,"div"),H=r.wrapper.getBoundingClientRect(),re=r.lineDiv.getBoundingClientRect();L.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,k.top+re.top-H.top)),L.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,k.left+re.left-H.left))}return L},Br.prototype.showSelection=function(e){var r=this.cm,R=r.display;a(R.cursorDiv,e.cursors),a(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Br.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var R=r.getSelection();this.textarea.value=R,r.state.focused&&ne(this.textarea),C&&T>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",C&&T>=9&&(this.hasSelection=null))},Br.prototype.getField=function(){return this.textarea},Br.prototype.supportsTouch=function(){return!1},Br.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},Br.prototype.blur=function(){this.textarea.blur()},Br.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Br.prototype.receivedFocus=function(){this.slowPoll()},Br.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Br.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function R(){var L=r.poll();!L&&!e?(e=!0,r.polling.set(60,R)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,R)},Br.prototype.poll=function(){var e=this,r=this.cm,R=this.textarea,L=this.prevInput;if(this.contextMenuPending||!r.state.focused||ft(R)&&!L&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var k=R.value;if(k==L&&!r.somethingSelected())return!1;if(C&&T>=9&&this.hasSelection===k||t&&/[\uf700-\uf7ff]/.test(k))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var H=k.charCodeAt(0);if(H==8203&&!L&&(L="\u200B"),H==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,le=Math.min(L.length,k.length);re<le&&L.charCodeAt(re)==k.charCodeAt(re);)++re;return Ti(r,function(){Uo(r,k.slice(re),L.length-re,null,e.composing?"*compose":null),k.length>1e3||k.indexOf(`
`)>-1?R.value=e.prevInput="":e.prevInput=k,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Br.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Br.prototype.onKeyPress=function(){C&&T>=9&&(this.hasSelection=null),this.fastPoll()},Br.prototype.onContextMenu=function(e){var r=this,R=r.cm,L=R.display,k=r.textarea;r.contextMenuPending&&r.contextMenuPending();var H=Pn(R,e),re=L.scroller.scrollTop;if(!H||d)return;var le=R.options.resetSelectionOnContextMenu;le&&R.doc.sel.contains(H)==-1&&Qr(R,ai)(R.doc,ra(H),oe);var ce=k.style.cssText,ge=r.wrapper.style.cssText,Be=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",k.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-Be.top-5)+"px; left: "+(e.clientX-Be.left-5)+`px;
z-index: 1000; background: `+(C?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ze;l&&(ze=window.scrollY),L.input.focus(),l&&window.scrollTo(null,ze),L.input.reset(),R.somethingSelected()||(k.value=r.prevInput=" "),r.contextMenuPending=nt,L.selForContextMenu=R.doc.sel,clearTimeout(L.detectingSelectAll);function at(){if(k.selectionStart!=null){var At=R.somethingSelected(),It="\u200B"+(At?k.value:"");k.value="\u21DA",k.value=It,r.prevInput=At?"":"\u200B",k.selectionStart=1,k.selectionEnd=It.length,L.selForContextMenu=R.doc.sel}}function nt(){if(r.contextMenuPending!=nt)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=ge,k.style.cssText=ce,C&&T<9&&L.scrollbars.setScrollTop(L.scroller.scrollTop=re),k.selectionStart!=null){(!C||C&&T<9)&&at();var At=0,It=function(){L.selForContextMenu==R.doc.sel&&k.selectionStart==0&&k.selectionEnd>0&&r.prevInput=="\u200B"?Qr(R,ps)(R):At++<10?L.detectingSelectAll=setTimeout(It,500):(L.selForContextMenu=null,L.input.reset())};L.detectingSelectAll=setTimeout(It,200)}}if(C&&T>=9&&at(),b){be(e);var _t=function(){tt(window,"mouseup",_t),setTimeout(nt,20)};Ie(window,"mouseup",_t)}else setTimeout(nt,50)},Br.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Br.prototype.setUneditable=function(){},Br.prototype.needsContentAttribute=!1;function iu(e,r){if(r=r?G(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var R=I();r.autofocus=R==e||e.getAttribute("autofocus")!=null&&R==document.body}function L(){e.value=le.getValue()}var k;if(e.form&&(Ie(e.form,"submit",L),!r.leaveSubmitMethodAlone)){var H=e.form;k=H.submit;try{var re=H.submit=function(){L(),H.submit=k,H.submit(),H.submit=re}}catch(ce){}}r.finishInit=function(ce){ce.save=L,ce.getTextArea=function(){return e},ce.toTextArea=function(){ce.toTextArea=isNaN,L(),e.parentNode.removeChild(ce.getWrapperElement()),e.style.display="",e.form&&(tt(e.form,"submit",L),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=k))}},e.style.display="none";var le=Lr(function(ce){return e.parentNode.insertBefore(ce,e.nextSibling)},r);return le}function au(e){e.off=tt,e.on=Ie,e.wheelEventPixels=fl,e.Doc=yi,e.splitLines=lt,e.countColumn=X,e.findColumn=Ae,e.isWordChar=ke,e.Pass=ie,e.signal=Ve,e.Line=xr,e.changeEnd=ia,e.scrollbarModel=zo,e.Pos=it,e.cmpPos=St,e.modes=ct,e.mimeModes=Ze,e.resolveMode=st,e.getMode=gt,e.modeExtensions=kt,e.extendMode=Wt,e.copyState=Qt,e.startState=fe,e.innerMode=we,e.commands=Qa,e.keyMap=Qi,e.keyName=Rs,e.isModifierKey=As,e.lookupKey=Oa,e.normalizeKeyMap=kl,e.StringStream=W,e.SharedTextMarker=Ya,e.TextMarker=oa,e.LineWidget=Xa,e.e_preventDefault=he,e.e_stopPropagation=ve,e.e_stop=be,e.addClass=F,e.contains=D,e.rmClass=m,e.keyNames=sa}ql(Lr),eu(Lr);var ou="iter insert remove copy getEditor constructor".split(" ");for(var yo in yi.prototype)yi.prototype.hasOwnProperty(yo)&&B(ou,yo)<0&&(Lr.prototype[yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(yi.prototype[yo]));return _e(yi),Lr.inputStyles={textarea:Br,contenteditable:vr},Lr.defineMode=function(e){!Lr.defaults.mode&&e!="null"&&(Lr.defaults.mode=e),Tt.apply(this,arguments)},Lr.defineMIME=Ot,Lr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Lr.defineMIME("text/plain","null"),Lr.defineExtension=function(e,r){Lr.prototype[e]=r},Lr.defineDocExtension=function(e,r){yi.prototype[e]=r},Lr.fromTextArea=iu,au(Lr),Lr.version="5.58.2",Lr})},W7jJ:function($e,We,z){"use strict";z.r(We);var ae=z("0Owb"),Z=z("PpiC"),U=z("OaEy"),w=z("2fM7"),P=z("T2oS"),S=z("W9HT"),C=z("miYZ"),T=z("tsqr"),l=z("2qtc"),p=z("kLXV"),h=z("9og8"),d=z("tJVT"),o=z("k1fw"),c=z("aHsQ"),s=z("sGsY"),f=z("WmNS"),i=z.n(f),n=z("q1tI"),t=z.n(n),u=z("Fvcw"),y=z("GIiI"),g=z("Ty5D"),_=z("9kvl"),b=z("55Ip"),v=z("7qur"),m=z("cDPC"),E=z("m3rI"),a=z("RCxd"),x=z("EHPI"),O=z("J66h"),A=z("uMZB"),D=z.n(A),I=z("sNtx"),F=z("RpDr"),K=z("+L6B"),ne=z("2/Rp"),j=z("y8nQ"),G=z("Vl3Y"),X=z("5NDa"),J=z("5rEg"),B=J.a.TextArea,Q=5e3,ie=function(ot){var ut=ot.callback,Et=ot.onCancel,Dt=ot.notes;function on(an){ut(an)}return t.a.createElement(G.a,{className:"note-form-panel",onFinish:on,initialValues:{notes:Dt}},t.a.createElement(G.a.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:Q,message:"\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A".concat(Q)}]},t.a.createElement(B,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),t.a.createElement(G.a.Item,{style:{textAlign:"right"}},t.a.createElement(ne.a,{type:"ghost",onClick:Et,style:{marginRight:10}}," \u53D6\u6D88 "),t.a.createElement(ne.a,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},oe=z("ZsLC"),xe=z.n(oe),ye=z("DjyN"),Ae=z("NUBc"),pe=z("g9YV"),Oe=z("wCAj"),Fe=z("Hw79"),Me=z.n(Fe),Ce=z("ye1Q"),Le=z("lfch"),de=z("bdLU"),ue=z("1vsH"),ke=z("wd/R"),Ue=z.n(ke),Ye=Oe.a.Column,ee=function(ot){var ut=ot.submitResult,Et=ot.submitting,Dt=ot.submitRecords,on=ot.page,an=ot.onPageChange,vt=ot.topicId,dt=ut||{},Ht=dt.status,yt=dt.id,en=dt.input,Lt=dt.output,rn=dt.expected_output,Hn=dt.is_file,An=dt.input_file_url,vn=dt.output_file_url,Xn=dt.expected_output_file_url,Cn=dt.error_msg,Ln=Dt||{},Fn=Ln.records,yr=Ln.records_count,Qn=Object(g.i)();function ir(){Hn?navigator.clipboard.writeText(O.Base64.decode(Cn)).then(function(){T.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(O.Base64.decode(Lt)).then(function(){T.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return t.a.createElement(S.a,{spinning:Et,tip:"\u8BC4\u6D4B\u4E2D...",indicator:t.a.createElement(Ce.a,{style:{fontSize:24},spin:!0})},yt?t.a.createElement(t.a.Fragment,null,t.a.createElement("ul",{className:Me.a.info},t.a.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",t.a.createElement("span",{className:Ht===de.a.OK?"c-green":"c-red"},F.a[Ht])),t.a.createElement("li",{className:Me.a.error},t.a.createElement("a",{onClick:ir},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",t.a.createElement(Le.a,null)," ")),t.a.createElement("li",null,t.a.createElement(b.a,{to:"/problems/".concat(vt,"/record-detail/").concat(yt,"?backId=").concat(Qn==null?void 0:Qn.save_identifier)},"\u663E\u793A\u8BE6\u60C5 > "))),Ht!==de.a.OK?t.a.createElement(t.a.Fragment,null,t.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),t.a.createElement("pre",null,!Hn&&en,Hn&&t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ue.x)(An,en)}},en)),t.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),t.a.createElement("pre",null,(Ht===4||Ht===5)&&O.Base64.decode(Cn),Ht!=4&&Ht!=5&&(Hn?t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ue.x)(vn,Lt)}},Lt):O.Base64.decode(Lt))),t.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),t.a.createElement("pre",null,!Hn&&O.Base64.decode(rn),Hn&&t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ue.x)(Xn,rn)}},rn))):null):null,(Fn==null?void 0:Fn.length)>0?t.a.createElement(Oe.a,{dataSource:Fn,rowKey:"id",pagination:!1},t.a.createElement(Ye,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:function(mr,Jn){return t.a.createElement("span",null," ",Ue()(mr).format("YYYY-MM-DD HH:mm:ss"))}}),t.a.createElement(Ye,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:function(mr,Jn){var or;return t.a.createElement(b.a,{className:mr===0?"c-green":"c-red",to:"/problems/".concat(vt,"/record-detail/").concat(Jn.id,"?backId=").concat(Qn==null?void 0:Qn.save_identifier)},(or=F.a[mr])===null||or===void 0?void 0:or.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),t.a.createElement(Ye,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),t.a.createElement(Ye,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),t.a.createElement(Ye,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,yr>15?t.a.createElement(Ae.a,{className:Me.a.pagination,current:on,pageSize:15,total:yr,onChange:an}):null)},M=z("BdwD"),N=z("DYRE"),$=z("zeV3"),V=z("+BJd"),Y=z("mr32"),me=z("TcMa"),Re=z.n(me),rt=z("9Bee"),Pe={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}},Ie=function(ot){var ut=ot.hack,Et=ot.onTriggerPraise,Dt=ot.toDiscuss,on=ut.language,an=ut.difficulty,vt=ut.time_limit,dt=ut.username,Ht=ut.user_path,yt=ut.user_praise,en=ut.comments_count,Lt=ut.praises_count,rn=ut.description,Hn=ut.pass_count,An=ut.submit_count,vn=Object(g.h)();console.log(ut.language,"language");var Xn=Pe[an];return t.a.createElement(t.a.Fragment,null,t.a.createElement("ul",{className:Re.a.info},t.a.createElement("li",null,"\u96BE\u5EA6\uFF1A",t.a.createElement(Y.a,{color:Xn.color},Xn.name)),t.a.createElement("li",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",t.a.createElement("b",null,vt,"\u79D2"))),t.a.createElement(rt.a,{value:rn,className:Re.a.desc}),t.a.createElement("ul",{className:Re.a["commit-info"]},t.a.createElement("li",null,t.a.createElement($.a,{size:4},t.a.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",t.a.createElement("b",null,Hn))),t.a.createElement("li",null,t.a.createElement($.a,{size:4},t.a.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",t.a.createElement("b",null,An))," "),t.a.createElement("li",{style:{flex:"1 0 0"}}),t.a.createElement("li",null,t.a.createElement($.a,{size:4},t.a.createElement("i",{className:"iconfont icon-huifu1",onClick:Dt})," ",t.a.createElement("b",null,en))," ")))},Xe=z("dhSg"),tt=z("ps8w"),Ve=z.n(tt),Ke=z("oBTY"),Ne=z("M8RZ"),De=z("OkW/"),_e=z("ErOA");function he(ot){return Object(_e.c)("comments.json",ot)}function ve(ot){return Object(_e.f)("/discusses/".concat(ot,"/plus.json"),{container_type:"Discuss",type:1})}function Ee(ot){return Object(_e.f)("comments/reply.json",ot)}function be(ot){return Object(_e.f)("comments.json",ot)}function Ge(ot){return Object(_e.f)("comments/".concat(ot==null?void 0:ot.id,"/hidden.json"),ot)}function qe(ot){return Object(_e.b)("comments/".concat(ot==null?void 0:ot.id,".json"))}var pt=z("GgEA"),Pt=z("AMnG"),Rt=z("xKgJ");function Mt(ot){var ut=ot.author;return t.a.createElement("a",{href:"/users/".concat(ut.login),target:"_blank"},t.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:"".concat(E.a.IMG_SERVER,"/images/").concat(ut.image_url),width:"50"}))}function wt(ot){var ut=ot.data,Et=ot.index,Dt=ot.parentDiscussIndex,on=ot.user,an=ot.onSetActionType,vt=ut.author,dt=ut.can_delete,Ht=ut.content,yt=ut.id,en=ut.time;function Lt(){an({id:yt,index:Et,type:"delete-discuss",parentDiscussIndex:Dt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var rn=on.admin||dt||vt.user_id===on.user_id;return t.a.createElement("div",{className:"discuss-item-container second-discuss "},t.a.createElement(Mt,{author:vt}),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(vt.login),target:"_blank"},vt.name),t.a.createElement("span",{className:"grey"},en),t.a.createElement("div",{className:"btn-group",style:{marginBottom:0}},rn?t.a.createElement("a",{onClick:Lt,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),t.a.createElement(rt.a,{className:"discuss-content",value:Ht})))}var lt=function(ot){var ut=ot.user,Et=ot.data,Dt=ot.index,on=ot.onPlusDiscuss,an=ot.onSetActionType,vt=ot.activeDiscussIndex,dt=ot.onReplyDiscuss,Ht=ot.onSetActiveDiscussIndex,yt=Et.content,en=Et.children,Lt=Et.hidden,rn=Et.id,Hn=Et.praise_count,An=Et.time,vn=Et.user_praise,Xn=Et.can_delete,Cn=Et.author;console.log(Xn&&(!en||en.length==0),"children22");function Ln(){Ht(rn)}function Fn(){on(rn,!vn,Dt)}function yr(){an({id:rn,index:Dt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Qn(){an({id:rn,index:Dt,params:{hidden:Lt?"0":"1"},type:"hidden-discuss",message:Lt?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}var ir=ut.admin||ut.user_id===Cn.user_id;return t.a.createElement("div",{className:"discuss-item-container",key:rn},t.a.createElement(Mt,{author:Cn}),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(Cn.login),target:"_blank"}," ",Cn.name," "),t.a.createElement("span",{className:"grey"},An)),t.a.createElement(rt.a,{className:"discuss-content",value:yt}),en&&en.length>0?t.a.createElement("div",{className:"reply-discuss-container"},en.map(function(lr,mr){return t.a.createElement(wt,{key:lr.id,data:lr,index:mr,user:ut,onSetActionType:an,parentDiscussIndex:Dt})})):null,t.a.createElement("div",{className:"btn-group"},Object(Rt.v)()?t.a.createElement("a",{onClick:Qn,title:Lt?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:Lt?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Xn&&(!en||en.length==0)?t.a.createElement("a",{onClick:yr,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null,t.a.createElement("a",{onClick:Ln,title:"\u56DE\u590D"}," ",t.a.createElement("i",{className:"iconfont icon-huifu1"})," "),t.a.createElement("a",{onClick:Fn,className:vn?"c-orange":""},t.a.createElement("i",{className:vn?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),t.a.createElement("span",null,Hn||""))),t.a.createElement(Pt.a,{id:rn,activeDiscussIndex:vt,onReplyDiscuss:dt})))},ft=z("kaH+"),Qe=z("Wx9E"),Te=z("Ot1p"),je=function(ot){var ut=ot.user_praise,Et=ot.praise_count,Dt=ot.praisePlus,on=ot.onCreateDiscuss,an=ot.discuss_count,vt=Object(n.useState)(!1),dt=Object(d.a)(vt,2),Ht=dt[0],yt=dt[1],en=Object(n.useState)(""),Lt=Object(d.a)(en,2),rn=Lt[0],Hn=Lt[1];function An(Fn){Hn(Fn)}function vn(){yt(!0)}function Xn(){yt(!1)}function Cn(){return Ln.apply(this,arguments)}function Ln(){return Ln=Object(h.a)(i.a.mark(function Fn(){return i.a.wrap(function(Qn){for(;;)switch(Qn.prev=Qn.next){case 0:on(rn),Hn(""),yt(!1);case 3:case"end":return Qn.stop()}},Fn)})),Ln.apply(this,arguments)}return t.a.createElement("div",{className:"dis-input-editor-container ".concat(Ht?"active":""," ")},t.a.createElement("div",{className:Ht?"text-area hide":"text-area"},t.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:vn}),t.a.createElement("a",{style:{alignItems:"center"}}," ",t.a.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",an," "),t.a.createElement("a",{className:"c-light-black",onClick:Dt,style:{alignItems:"center"},title:ut?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},t.a.createElement("i",{className:"mr3 ".concat(ut?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),Et?t.a.createElement("span",null,Et):"")),Ht?t.a.createElement("div",{className:"input-mask",onClick:Xn}):null,t.a.createElement("div",{className:Ht?"md-container":"md-container hide"},t.a.createElement(Te.a,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:rn,height:240,onChange:An}),t.a.createElement("div",{className:"tip-container",onClick:Xn},t.a.createElement("a",{className:"btn-send",onClick:Cn}," \u53D1\u9001 "))))},ct={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null},Ze;(function(ot){ot[ot.GET_DISCUSSES=0]="GET_DISCUSSES",ot[ot.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",ot[ot.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",ot[ot.PLUS_DISCUSS=3]="PLUS_DISCUSS",ot[ot.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",ot[ot.SET_PAGE=5]="SET_PAGE",ot[ot.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING"})(Ze||(Ze={}));function Tt(ot,ut){switch(ut.type){case Ze.SHOW_DISCUSSES_LOADING:return Object(o.a)(Object(o.a)({},ot),{},{loading:!0});case Ze.GET_DISCUSSES:return Object(o.a)(Object(o.a)({},ot),ut.payload);case Ze.TOP_OR_DOWN_DISCUSS:return Object(o.a)(Object(o.a)({},ot),ut.payload);case Ze.SET_ACTION_TYPE:return Object(o.a)(Object(o.a)({},ot),ut.payload);case Ze.PLUS_DISCUSS:return Object(o.a)(Object(o.a)({},ot),ut.payload);case Ze.SET_PAGE:return Object(o.a)(Object(o.a)({},ot),{},{page:ut.payload});case Ze.ACTIVE_DISCUSS_INDEX:return Object(o.a)(Object(o.a)({},ot),ut.payload);default:throw new Error}}var Ot=function(ot){var ut=ot.user,Et=ot.identifier,Dt=ot.hack,on=ot.onTriggerPraise,an=ot.setDiscussTotal,vt=Object(n.useReducer)(Tt,ct),dt=Object(d.a)(vt,2),Ht=dt[0],yt=dt[1],en=Ht.loading,Lt=Ht.page,rn=Ht.data,Hn=Ht.count,An=Ht.actionType,vn=Ht.activeDiscussIndex,Xn=Object(n.useCallback)(Object(h.a)(i.a.mark(function fn(){var Yn,Zn,ur;return i.a.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:return yt({type:Ze.SHOW_DISCUSSES_LOADING}),Gn.next=3,he({container_type:"Practice",container_identifier:Et,limit:10,page:Lt});case 3:Yn=Gn.sent,Zn=Yn.comments,ur=Yn.disscuss_count,yt({type:Ze.GET_DISCUSSES,payload:{data:Zn,count:ur,loading:!1}}),an(ur);case 7:case"end":return Gn.stop()}},fn)})),[Lt,Et]);Object(n.useEffect)(function(){Xn()},[Et,Lt]);function Cn(fn){yt({type:Ze.SET_PAGE,page:fn})}function Ln(fn){yt({type:Ze.SET_ACTION_TYPE,payload:{actionType:fn}})}function Fn(fn){vn===fn?yt({type:Ze.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}):yt({type:Ze.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:fn}})}function yr(fn,Yn,Zn){return Qn.apply(this,arguments)}function Qn(){return Qn=Object(h.a)(i.a.mark(function fn(Yn,Zn,ur){var zn;return i.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return hn.prev=0,hn.next=3,ve(Yn);case 3:zn=hn.sent,rn[ur].user_praise=Zn,rn[ur].praise_count=zn.praise_count,yt({type:Ze.PLUS_DISCUSS,payload:{data:Object(Ke.a)(rn)}}),hn.next=12;break;case 9:hn.prev=9,hn.t0=hn.catch(0),console.log(hn.t0);case 12:case"end":return hn.stop()}},fn,null,[[0,9]])})),Qn.apply(this,arguments)}function ir(){return lr.apply(this,arguments)}function lr(){return lr=Object(h.a)(i.a.mark(function fn(){var Yn,Zn,ur,zn,Gn;return i.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:if(Yn=An.id,Zn=An.params,ur=An.type,zn=An.index,Gn=An.parentDiscussIndex,!(ur==="hidden-discuss")){wn.next=7;break}return console.log(Zn,"params"),wn.next=5,Ge(Object(o.a)({id:Yn,container_type:"Practice",container_identifier:Et},Zn));case 5:Gn?rn[Gn].children[zn].hidden=Zn.hidden==1:rn[zn].hidden=Zn.hidden==1,yt({type:Ze.SET_ACTION_TYPE,payload:{actionType:null,data:Object(Ke.a)(rn)}});case 7:if(!(ur==="delete-discuss")){wn.next=13;break}return wn.next=10,qe({id:Yn,container_type:"Practice",container_identifier:Et});case 10:return yt({type:Ze.SET_ACTION_TYPE,payload:{actionType:null}}),wn.next=13,Xn();case 13:case"end":return wn.stop()}},fn)})),lr.apply(this,arguments)}function mr(){yt({type:Ze.SET_ACTION_TYPE,payload:{actionType:null}})}function Jn(fn,Yn){return or.apply(this,arguments)}function or(){return or=Object(h.a)(i.a.mark(function fn(Yn,Zn){return i.a.wrap(function(zn){for(;;)switch(zn.prev=zn.next){case 0:return zn.prev=0,zn.next=3,Ee({container_type:"Practice",container_identifier:Et,comments:{content:Zn,parent_id:Yn}});case 3:Xn(),zn.next=9;break;case 6:zn.prev=6,zn.t0=zn.catch(0),console.log(zn.t0);case 9:case"end":return zn.stop()}},fn,null,[[0,6]])})),or.apply(this,arguments)}function kn(fn){return Ft.apply(this,arguments)}function Ft(){return Ft=Object(h.a)(i.a.mark(function fn(Yn){return i.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return yt({type:Ze.SHOW_DISCUSSES_LOADING}),ur.next=3,be({comments:{content:Yn},container_type:"Practice",container_identifier:Et});case 3:Xn();case 4:case"end":return ur.stop()}},fn)})),Ft.apply(this,arguments)}return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:"discuss-panel"},rn.length===0?t.a.createElement(M.a,null):rn.map(function(fn,Yn){return t.a.createElement(lt,{onReplyDiscuss:Jn,onPlusDiscuss:yr,onSetActiveDiscussIndex:Fn,onSetActionType:Ln,data:fn,index:Yn,user:ut,activeDiscussIndex:vn})}),Hn>10?t.a.createElement("div",{className:"pagination-container"},t.a.createElement(Ae.a,{showQuickJumper:!0,onChange:Cn,current:Lt,total:Hn})):null),t.a.createElement(je,{user_praise:Dt.user_praise,praise_count:Dt.praises_count,praisePlus:on,discuss_count:Dt.comments_count,onCreateDiscuss:kn}),t.a.createElement(Ne.a,null,t.a.createElement(p.a,{centered:!0,title:"\u63D0\u793A",visible:!!An,onOk:ir,onCancel:mr},t.a.createElement("p",null,An?An.message:"")),t.a.createElement(ft.a,null)))},st=z("1FX+"),gt=z.n(st),kt=z("pYxM"),Wt=z.n(kt),Qt=z("sB/4"),we=z.n(Qt),fe=z("Wtmd"),W=z.n(fe),q=z("CNDd"),te=z.n(q),se=z("nCk5"),Se=z.n(se),He=z("kovY"),Je=z.n(He),xt=function(ut){var Et=ut.style,Dt=Et===void 0?{}:Et,on=ut.onClick,an=ut.onAssist,vt=ut.onHide,dt=ut.data,Ht=ut.active,yt=ut.showLine;return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:Ht===(dt==null?void 0:dt.id)?"".concat(Wt.a.list," ").concat(Wt.a.active):Wt.a.list,style:Dt,onClick:function(){return on(dt)}},(dt==null?void 0:dt.video)&&t.a.createElement("div",{className:Wt.a.left},t.a.createElement("img",{src:dt==null?void 0:dt.video_cover}),t.a.createElement("div",null,t.a.createElement("img",{src:we.a}),t.a.createElement("span",null,dt==null?void 0:dt.video_duration)),t.a.createElement("div",{className:Wt.a.mask})),t.a.createElement("div",{className:Wt.a.right},t.a.createElement("div",{className:Wt.a.name},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(dt==null?void 0:dt.image_url),width:30,height:30}),t.a.createElement("div",{title:dt==null?void 0:dt.name,className:Wt.a.title},dt==null?void 0:dt.name),(dt==null?void 0:dt.is_authority)&&t.a.createElement("div",{className:Wt.a.b},"\u5B98\u65B9"),(dt==null?void 0:dt.is_excellent)&&t.a.createElement("div",{className:Wt.a.a},"\u7CBE\u9009")),t.a.createElement("div",{className:Wt.a.des},t.a.createElement(rt.a,{showLines:2,showTextOnly:!0,value:(dt==null?void 0:dt.content)||"\u6682\u65E0\u5185\u5BB9"})),t.a.createElement("div",{className:Wt.a.tag},t.a.createElement("span",{className:"current",onClick:function(Lt){Lt.stopPropagation(),an(dt)}},t.a.createElement("img",{src:dt!=null&&dt.user_liker?te.a:W.a}),t.a.createElement("span",{style:{color:dt!=null&&dt.user_liker?"#0152d9":"#656f87"}},dt==null?void 0:dt.praises_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Se.a}),t.a.createElement("span",null,dt==null?void 0:dt.discusses_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Je.a}),t.a.createElement("span",null,dt==null?void 0:dt.viewed_count)),Object(Rt.v)()&&t.a.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:function(Lt){Lt.stopPropagation(),vt(dt)}},dt!=null&&dt.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),yt&&t.a.createElement("div",{className:Wt.a.line}))},Ct=xt,it=z("5Dmo"),St=z("3S7+"),Xt=z("Z8dc"),bt=z.n(Xt),ht=z("Aky1"),Jt=z("7+5b"),Nt=z.n(Jt),mt=z("twBr"),cn=z.n(mt),bn=z("oE5q"),sn=z.n(bn),dn=function(ut,Et){var Dt,on,an,vt=Et.payload.uploadInfo,dt=vt===void 0?{}:vt;switch(Et.type){case"addVideo":return{videoList:[].concat(Object(Ke.a)(ut.videoList),[{name:dt.file.name,size:dt.file.size,type:dt.file.type,fileHash:dt.fileHash,state:dt.state,video_id:dt.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}])};case"removeVideo":return{videoList:ut.videoList.filter(function(Ht){return Ht.name!==Et.payload.name})};case"replaceVideo":return{videoList:Et.payload};case"removeAll":return[];case"updateProgress":return{videoList:ut.videoList.map(function(Ht){return Ht.name===Et.payload.uploadInfo.file.name?Object(o.a)(Object(o.a)({},Ht),{loaded:Et.payload.progressPercent,video_id:dt.videoId,fileHash:dt.fileHash}):Ht})};case"updateTitle":return{videoList:(Dt=ut.videoList)===null||Dt===void 0?void 0:Dt.map(function(Ht){return Ht.name===Et.payload.item.name?Object(o.a)(Object(o.a)({},Ht),{title:Et.payload.title}):Ht})};case"updateImg":return{videoList:(on=ut.videoList)===null||on===void 0?void 0:on.map(function(Ht){return Ht.name===Et.payload.item.name?Object(o.a)(Object(o.a)({},Ht),{attachment_id:Et.payload.attachment_id}):Ht})};case"updateImg":return{videoList:(an=ut.videoList)===null||an===void 0?void 0:an.map(function(Ht){return Ht.name===Et.payload.item.name?Object(o.a)(Object(o.a)({},Ht),{attachment_id:Et.payload.attachment_id}):Ht})};default:return[]}},Nn=function(ut){var Et,Dt,on=ut.onClose,an=ut.onOk,vt=ut.identifier,dt=ut.active,Ht=G.a.useForm(),yt=Object(d.a)(Ht,1),en=yt[0],Lt=Object(n.useState)({}),rn=Object(d.a)(Lt,2),Hn=rn[0],An=rn[1],vn=Object(n.useState)(!1),Xn=Object(d.a)(vn,2),Cn=Xn[0],Ln=Xn[1],Fn=Object(n.useState)(!1),yr=Object(d.a)(Fn,2),Qn=yr[0],ir=yr[1],lr=Object(n.useReducer)(dn,{videoList:[]}),mr=Object(d.a)(lr,2),Jn=mr[0],or=mr[1],kn=Object(Rt.x)(),Ft=Object(g.i)(),fn=Object(n.useRef)();Object(n.useEffect)(function(){dt&&Yn()},[dt]);var Yn=function(){var pn=Object(h.a)(i.a.mark(function Dn(){var _n,Bn,er,fr,wr,Yr,Li,Kr,Mi,qi,Ui,ti;return i.a.wrap(function(Wn){for(;;)switch(Wn.prev=Wn.next){case 0:return Wn.next=2,Object(v.k)(vt,{active:dt});case 2:_n=Wn.sent,(_n==null?void 0:_n.status)===0&&(Yr={name:_n==null||((Bn=_n.data)===null||Bn===void 0)?void 0:Bn.name,content:_n==null||((er=_n.data)===null||er===void 0)?void 0:er.content},en.setFieldsValue(Yr),An(Yr),_n!=null&&(fr=_n.data)!==null&&fr!==void 0&&(wr=fr.videos)!==null&&wr!==void 0&&wr[0]&&or({type:"replaceVideo",payload:[{video_id:_n==null||((Li=_n.data)===null||Li===void 0||((Kr=Li.videos)===null||Kr===void 0||((Mi=Kr[0])===null||Mi===void 0)))?void 0:Mi.video_id,name:_n==null||((qi=_n.data)===null||qi===void 0||((Ui=qi.videos)===null||Ui===void 0||((ti=Ui[0])===null||ti===void 0)))?void 0:ti.title,loaded:100}]}));case 4:case"end":return Wn.stop()}},Dn)}));return function(){return pn.apply(this,arguments)}}(),Zn=function(Dn,_n){An(Object(o.a)({},_n))},ur=function(){var pn=Object(h.a)(i.a.mark(function Dn(_n){var Bn,er,fr,wr,Yr;return i.a.wrap(function(Kr){for(;;)switch(Kr.prev=Kr.next){case 0:if(er={videos:Jn.videoList,articles:_n},ir(!0),!dt){Kr.next=9;break}return er.active=dt,Kr.next=6,Object(v.j)(vt,er);case 6:fr=Kr.sent,Kr.next=12;break;case 9:return Kr.next=11,Object(v.a)(vt,er);case 11:fr=Kr.sent;case 12:((Bn=fr)===null||Bn===void 0?void 0:Bn.status)===0&&(console.log(dt||((wr=fr)===null||wr===void 0?void 0:wr.id),44),an(dt||((Yr=fr)===null||Yr===void 0?void 0:Yr.id))),ir(!1);case 14:case"end":return Kr.stop()}},Dn)}));return function(_n){return pn.apply(this,arguments)}}(),zn=function(){var Dn=document.getElementById("fileUpload");Dn.value=""},Gn=function(Dn){var _n='{"Vod":{}}';if(Ln(!0),fn.current){fn.current.addFile(Dn,null,null,null,_n);return}Object(ht.a)(kn==null?void 0:kn.login,"",{create:!fn,addFileSuccess:function(er){or({type:"addVideo",payload:{uploadInfo:er}})},onUploadProgress:function(er,fr,wr){var Yr=Math.ceil(wr*100);or({type:"updateProgress",payload:{uploadInfo:er,progressPercent:Yr}}),zn()},onUploadFailed:function(er){T.b.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:function(er){Ln(!1)},onUploadSucceed:function(er){Ln(!1)},onUploadError:function(er){Ln(!1)},gotUploader:function(er){er.addFile(Dn,null,null,null,_n),fn.current=er}})},hn=function(Dn){var _n,Bn=1024,er=Dn.target.files[0];if(!er){zn();return}var fr=er.name.toLowerCase();if(fr&&fr.indexOf(".avi")==-1&&fr.indexOf(".flv")==-1&&fr.indexOf(".f4v")==-1&&fr.indexOf(".m4v")==-1&&fr.indexOf(".mov")==-1&&fr.indexOf(".mp4")==-1&&fr.indexOf(".rmvb")==-1&&fr.indexOf(".swf")==-1&&fr.indexOf(".webm")==-1&&fr.indexOf(".wmv")==-1){T.b.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),zn();return}if(er.size>Bn*1024*1024){T.b.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC7".concat(Bn,"M")),zn();return}if((_n=Jn.videoList)!==null&&_n!==void 0&&_n.find(function(wr){return wr.name===er.name})){T.b.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),zn();return}Gn(er)},wn=function(Dn,_n){p.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",_n?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:function(){zn(),or({type:"removeVideo",payload:{name:Dn}})}})},jt=function(){return t.a.createElement("label",{htmlFor:"fileUpload",className:bt.a.main},t.a.createElement("img",{src:Nt.a,alt:""}),t.a.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891"))},Bt=function(Dn){return t.a.createElement("div",{className:bt.a.mainLoading},t.a.createElement("div",{className:bt.a.proWarp},t.a.createElement("div",{className:bt.a.pro},t.a.createElement("div",{style:{width:Dn}})),t.a.createElement("span",null,Dn||0,"%")),t.a.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),t.a.createElement("div",{className:bt.a.tip},t.a.createElement(St.a,{getPopupContainer:function(Bn){return Bn.parentNode},title:t.a.createElement("div",null,t.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",t.a.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),t.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),t.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},t.a.createElement("img",{src:sn.a,alt:""}))))},$t=function(Dn){return t.a.createElement("div",{className:bt.a.mainSucceed},t.a.createElement("img",{src:cn.a,alt:""}),t.a.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),t.a.createElement("div",{className:bt.a.tip},t.a.createElement(St.a,{getPopupContainer:function(Bn){return Bn.parentNode},title:t.a.createElement("div",null,t.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",t.a.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),t.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),t.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},t.a.createElement("img",{src:sn.a,alt:""}))),t.a.createElement("div",{className:bt.a.del,onClick:function(){return wn(Dn.name,Dn.loaded==100)}},t.a.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891"))},gn=function(){var Dn;return t.a.createElement(t.a.Fragment,null,(Dn=Jn.videoList)===null||Dn===void 0?void 0:Dn.map(function(_n,Bn){return t.a.createElement(t.a.Fragment,{key:Bn},_n.loaded==100?$t(_n):Bt(_n.loaded))}))},nn=function(){p.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:on})},In=(Et=Jn.videoList)===null||Et===void 0?void 0:Et.length;return t.a.createElement("div",{className:bt.a.listForm},t.a.createElement("header",null,dt?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),t.a.createElement("section",{className:bt.a.scroll,id:"sss"},t.a.createElement("div",{className:bt.a.formWrap}," ",t.a.createElement(G.a,{form:en,scrollToFirstError:!0,layout:"vertical",onValuesChange:Zn,onFinish:ur},t.a.createElement(G.a.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},t.a.createElement(J.a,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:"".concat(((Dt=Hn.name)===null||Dt===void 0?void 0:Dt.length)||0,"/60")})),t.a.createElement(G.a.Item,{name:"content",label:"\u5185\u5BB9:"},t.a.createElement(Te.a,{defaultValue:Hn.content||"",watch:!0})))),t.a.createElement("div",{className:bt.a.upload},In?gn():jt(),t.a.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:hn,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),t.a.createElement("div",{className:bt.a.btns},t.a.createElement(ne.a,{onClick:nn,type:"primary",ghost:!0},"\u5173\u95ED"),t.a.createElement(ne.a,{loading:Qn,disabled:Cn,onClick:function(){return en.submit()},type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},Kt=Nn,et=z("cWXX"),Ut=z("/ezw"),Yt=z("CaVn"),Vt=z.n(Yt),En=z("s8/Y"),sr=z.n(En),nr=z("JOrW"),jn=z.n(nr),cr=z("gqXR"),qn=z.n(cr),Wr=z("14J3"),_r=z("BMrR"),Rr=z("jCWc"),Tr=z("kPKH"),Vr=z("wW8i"),Ur=z.n(Vr),xi=z("MVJL"),kr=z.n(xi),Oi=function(ut){var Et=ut.id,Dt=ut.cb,on=Object(n.useState)(""),an=Object(d.a)(on,2),vt=an[0],dt=an[1];return t.a.createElement("aside",{className:"mt10"},t.a.createElement(Te.a,{defaultValue:vt,id:"writeForumsReviewId",onChange:function(yt){dt(yt)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),t.a.createElement(_r.a,null,t.a.createElement(Tr.a,{flex:"1"}),t.a.createElement(Tr.a,null,t.a.createElement(ne.a,{type:"primary",size:"large",onClick:Object(h.a)(i.a.mark(function Ht(){return i.a.wrap(function(en){for(;;)switch(en.prev=en.next){case 0:vt===""?T.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):Dt(Et,vt);case 1:case"end":return en.stop()}},Ht)}))},"\u53D1\u9001"))))},ri=function(ut){var Et,Dt=ut.data;return t.a.createElement("div",{className:kr.a.thirdlyLevelDiscuss},t.a.createElement("span",{className:"c-grey-333"},t.a.createElement("span",{className:"font 14 c-light-primary"},Dt==null||((Et=Dt.author)===null||Et===void 0)?void 0:Et.name),"@",t.a.createElement("span",{className:"font 14 c-light-primary"},Dt==null?void 0:Dt.parent_name),":"),t.a.createElement(rt.a,{value:Dt==null?void 0:Dt.content}))},Xr=function(ut){var Et,Dt,on,an,vt=ut.data,dt=ut.onReplyDiscuss,Ht=ut.thirdlyReply,yt=ut.setThirdlyReply,en=Object(Rt.x)();return console.log(en,"user"),t.a.createElement("div",{className:kr.a.list},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(vt==null||((Et=vt.author)===null||Et===void 0)?void 0:Et.image_url)}),t.a.createElement("div",{className:kr.a.wrap},t.a.createElement("div",{className:"font14",style:{marginBottom:6}},t.a.createElement("span",{className:"c-grey-333"},vt==null||((Dt=vt.author)===null||Dt===void 0)?void 0:Dt.name),(en==null?void 0:en.login)!==(vt==null||((on=vt.author)===null||on===void 0)?void 0:on.login)&&t.a.createElement("span",{onClick:function(){return yt(vt==null?void 0:vt.id)},className:"c-grey-999 current",style:{float:"right"}},t.a.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),t.a.createElement("span",null,"\u56DE\u590D"))),t.a.createElement(rt.a,{value:vt==null?void 0:vt.content}),vt==null||((an=vt.children)===null||an===void 0)?void 0:an.map(function(Lt){return t.a.createElement(ri,{key:Lt.id,data:Lt})}),Ht===(vt==null?void 0:vt.id)&&t.a.createElement("div",null,t.a.createElement(Oi,{id:vt==null?void 0:vt.id,cb:dt}),t.a.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:function(){return yt(null)},className:"c-light-primary current"},t.a.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),t.a.createElement("div",{className:kr.a.line})))},di=function(ut){var Et,Dt,on,an,vt=ut.data,dt=ut.onReplyDiscuss,Ht=ut.secondReply,yt=ut.setSecondReply,en=ut.thirdlyReply,Lt=ut.setThirdlyReply,rn=ut.onPlusDiscuss,Hn=Object(n.useState)(!1),An=Object(d.a)(Hn,2),vn=An[0],Xn=An[1];return console.log(vt,"data"),t.a.createElement("div",{className:kr.a.discussItem},t.a.createElement("div",{className:kr.a.list},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(vt==null||((Et=vt.author)===null||Et===void 0)?void 0:Et.image_url)}),t.a.createElement("div",{className:kr.a.wrap},t.a.createElement("div",{className:"font14",style:{marginBottom:6}},t.a.createElement("span",{className:"c-grey-333 mr30"},vt==null||((Dt=vt.author)===null||Dt===void 0)?void 0:Dt.name),t.a.createElement("span",{className:"c-grey-999"},vt==null?void 0:vt.time)),t.a.createElement(rt.a,{value:vt==null?void 0:vt.content}),t.a.createElement("div",{className:kr.a.btns},t.a.createElement("div",{onClick:function(){return rn(vt==null?void 0:vt.id)},className:vt!=null&&vt.user_praise?"c-light-primary":"c-grey-999"},t.a.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),t.a.createElement("span",null,vt==null?void 0:vt.praise_count)),t.a.createElement("div",{onClick:function(){var Ln;if((vt==null||((Ln=vt.children)===null||Ln===void 0)?void 0:Ln.length)===0)return;yt(null),Xn(!vn)},style:{color:vn?"#0152d9":"#999999"}},t.a.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),t.a.createElement("span",null,vn?"\u6536\u8D77\u8BC4\u8BBA":vt==null||((on=vt.children)===null||on===void 0)?void 0:on.length)),t.a.createElement("div",{onClick:function(){Xn(!1),yt(Ht===(vt==null?void 0:vt.id)?null:vt==null?void 0:vt.id)},style:{color:Ht===(vt==null?void 0:vt.id)?"#0152d9":"#999999"}},t.a.createElement("i",{className:"iconfont icon-huifu3 mr3"}),t.a.createElement("span",null,Ht===(vt==null?void 0:vt.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Ht===(vt==null?void 0:vt.id)&&t.a.createElement(Oi,{id:vt==null?void 0:vt.id,cb:function(Ln,Fn){dt(Ln,Fn),Xn(!0)}}),vn&&t.a.createElement("div",{className:kr.a.secondLevelDiscuss},vt==null||((an=vt.children)===null||an===void 0)?void 0:an.map(function(Cn){return t.a.createElement(Xr,{thirdlyReply:en,setThirdlyReply:Lt,key:Cn.id,data:Cn,onReplyDiscuss:dt})})))))},Si=di,si=function(ut){var Et=ut.identifier,Dt=ut.active,on=ut.onOk,an=Object(n.useState)(""),vt=Object(d.a)(an,2),dt=vt[0],Ht=vt[1],yt=Object(n.useState)(1),en=Object(d.a)(yt,2),Lt=en[0],rn=en[1],Hn=Object(n.useState)([]),An=Object(d.a)(Hn,2),vn=An[0],Xn=An[1],Cn=Object(n.useState)(0),Ln=Object(d.a)(Cn,2),Fn=Ln[0],yr=Ln[1],Qn=Object(n.useState)(null),ir=Object(d.a)(Qn,2),lr=ir[0],mr=ir[1],Jn=Object(n.useState)(null),or=Object(d.a)(Jn,2),kn=or[0],Ft=or[1];Object(n.useEffect)(function(){fn(1),rn(1)},[Dt]);var fn=function(){var Gn=Object(h.a)(i.a.mark(function hn(wn){var jt;return i.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return $t.next=2,he({container_type:"QuestionSolutionArticle",container_identifier:Dt,limit:5,page:wn});case 2:jt=$t.sent,jt!=null&&jt.comments&&(Xn((jt==null?void 0:jt.comments)||[]),rn(wn),yr(jt==null?void 0:jt.disscuss_count));case 4:case"end":return $t.stop()}},hn)}));return function(wn){return Gn.apply(this,arguments)}}(),Yn=function(){var Gn=Object(h.a)(i.a.mark(function hn(){var wn;return i.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:if(!(dt==="")){Bt.next=3;break}return T.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),Bt.abrupt("return");case 3:return Bt.next=5,be({comments:{content:dt},container_type:"QuestionSolutionArticle",container_identifier:Dt});case 5:wn=Bt.sent,wn!=null&&wn.discuss&&(Ht(""),fn(Lt),on());case 7:case"end":return Bt.stop()}},hn)}));return function(){return Gn.apply(this,arguments)}}(),Zn=function(){var Gn=Object(h.a)(i.a.mark(function hn(wn,jt,Bt){var $t;return i.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return nn.next=2,Ee({container_type:"QuestionSolutionArticle",container_identifier:Dt,comments:{content:jt,parent_id:wn}});case 2:$t=nn.sent,mr(null),Ft(null),fn(Lt);case 6:case"end":return nn.stop()}},hn)}));return function(wn,jt,Bt){return Gn.apply(this,arguments)}}(),ur=function(){var Gn=Object(h.a)(i.a.mark(function hn(wn){var jt;return i.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return $t.next=2,ve(wn);case 2:jt=$t.sent,fn(Lt);case 4:case"end":return $t.stop()}},hn)}));return function(wn){return Gn.apply(this,arguments)}}(),zn=function(hn){rn(hn),fn(hn)};return t.a.createElement("div",{className:Ur.a.discuss},t.a.createElement("aside",{className:Ur.a.reply,style:{borderWidth:Fn?1:0}},t.a.createElement(Te.a,{defaultValue:dt,id:"writeForumsReviewId",onChange:function(hn){Ht(hn)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),t.a.createElement(_r.a,null,t.a.createElement(Tr.a,{flex:"1"}),t.a.createElement(Tr.a,null,t.a.createElement(ne.a,{type:"primary",size:"large",onClick:function(){return Yn()}},"\u53D1\u9001")))),vn==null?void 0:vn.map(function(Gn){return t.a.createElement(Si,{secondReply:lr,setSecondReply:mr,thirdlyReply:kn,setThirdlyReply:Ft,key:Gn.id,data:Gn,onReplyDiscuss:Zn,onPlusDiscuss:ur})}),t.a.createElement(Ae.a,{className:Ur.a.pagination,showTotal:function(hn){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},hn),"\u6761\u6570\u636E")},current:Lt,onChange:zn,total:Fn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},fi=si,gr=z("hgre"),dr=function(ut){var Et,Dt,on,an,vt,dt,Ht,yt,en,Lt,rn=ut.active,Hn=ut.identifier,An=ut.onAssist,vn=ut.onEdit,Xn=ut.onArticlesSkip,Cn=ut.onClose,Ln=ut.onOk,Fn=ut.onDelete,yr=ut.detailsIndex,Qn=ut.btnShowStatus,ir=Object(n.useState)(!0),lr=Object(d.a)(ir,2),mr=lr[0],Jn=lr[1],or=Object(n.useState)({}),kn=Object(d.a)(or,2),Ft=kn[0],fn=kn[1];Object(n.useEffect)(function(){rn&&Yn()},[rn,yr]);var Yn=function(){var hn=Object(h.a)(i.a.mark(function wn(){var jt,Bt,$t=arguments;return i.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return jt=$t.length>0&&$t[0]!==void 0?$t[0]:!0,jt&&Jn(!0),nn.next=4,Object(v.d)(Hn,{active:rn});case 4:Bt=nn.sent,(Bt==null?void 0:Bt.status)===0&&fn((Bt==null?void 0:Bt.data)||{}),Jn(!1);case 7:case"end":return nn.stop()}},wn)}));return function(){return hn.apply(this,arguments)}}(),Zn=function(){var hn=Object(h.a)(i.a.mark(function wn(jt){var Bt;return i.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:return gn.next=2,Object(v.g)(Hn,Object(o.a)({active:rn},jt));case 2:Bt=gn.sent,(Bt==null?void 0:Bt.status)===0&&(Yn(!1),Ln());case 4:case"end":return gn.stop()}},wn)}));return function(jt){return hn.apply(this,arguments)}}(),ur=function(){var hn=Object(h.a)(i.a.mark(function wn(jt){var Bt;return i.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:return gn.next=2,Object(v.c)(Hn,{active:jt==null?void 0:jt.id});case 2:Bt=gn.sent,Bt.status===0&&(Yn(!1),Ln());case 4:case"end":return gn.stop()}},wn)}));return function(jt){return hn.apply(this,arguments)}}(),zn=function(wn){p.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:function(){return Fn(wn)}})},Gn=function(){Yn(!1),Ln()};return t.a.createElement("div",{className:Vt.a.listDetails},t.a.createElement(Ut.a,{className:"pt20 pl20 pr20",loading:mr,active:!0,paragraph:{rows:5}},t.a.createElement("div",{className:Vt.a.head},t.a.createElement("div",{className:Vt.a.name},t.a.createElement("div",{title:Ft==null?void 0:Ft.name,className:Vt.a.title},Ft==null?void 0:Ft.name),(Ft==null?void 0:Ft.is_authority)&&t.a.createElement("div",{className:Vt.a.b},"\u5B98\u65B9"),(Ft==null?void 0:Ft.is_excellent)&&t.a.createElement("div",{className:Vt.a.a},"\u7CBE\u9009")),t.a.createElement("div",{className:Vt.a.tag},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(Ft==null?void 0:Ft.image_url)}),t.a.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},Ft==null?void 0:Ft.username),t.a.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Ue()(Ft==null?void 0:Ft.created_at).format("YYYY-MM-DD")),t.a.createElement("span",null,t.a.createElement("img",{src:W.a}),t.a.createElement("span",null,Ft==null?void 0:Ft.praises_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Se.a}),t.a.createElement("span",null,Ft==null?void 0:Ft.discusses_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Je.a}),t.a.createElement("span",null,Ft==null?void 0:Ft.viewed_count)),t.a.createElement("div",{className:Vt.a.btn},(Object(Rt.v)()||(Ft==null?void 0:Ft.is_self))&&t.a.createElement(t.a.Fragment,null,t.a.createElement(ne.a,{onClick:function(){return zn(Ft)},type:"primary",ghost:!0},"\u5220\u9664"),t.a.createElement(ne.a,{onClick:function(){return vn(Ft)},type:"primary",ghost:!0},"\u7F16\u8F91")),Object(Rt.v)()&&t.a.createElement(ne.a,{onClick:function(){return Zn({is_authority:!(Ft!=null&&Ft.is_authority)})},type:"primary"},t.a.createElement("img",{src:jn.a}),Ft!=null&&Ft.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),Object(Rt.v)()&&t.a.createElement(ne.a,{onClick:function(){return Zn({is_excellent:!(Ft!=null&&Ft.is_excellent)})},type:"primary"},t.a.createElement("img",{src:sr.a}),Ft!=null&&Ft.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),t.a.createElement("div",{className:Vt.a.scroll},(Ft==null||((Et=Ft.videos)===null||Et===void 0||((Dt=Et[0])===null||Dt===void 0))?void 0:Dt.id)&&t.a.createElement("div",{className:Vt.a.video},t.a.createElement(S.a,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!(Ft!=null&&(on=Ft.videos)!==null&&on!==void 0&&(an=on[0])!==null&&an!==void 0&&an.transcoded)},t.a.createElement(gr.a,{poster:Ft==null||((vt=Ft.videos)===null||vt===void 0||((dt=vt[0])===null||dt===void 0))?void 0:dt.cover_url,src:(Ft==null||((Ht=Ft.videos)===null||Ht===void 0||((yt=Ht[0])===null||yt===void 0))?void 0:yt.play_url)||"",videoId:Ft==null||((en=Ft.videos)===null||en===void 0||((Lt=en[0])===null||Lt===void 0))?void 0:Lt.id,logWatchHistory:function(){}}))),t.a.createElement(rt.a,{className:Vt.a.html,value:(Ft==null?void 0:Ft.content)||""}),t.a.createElement("div",{onClick:function(){return ur(Ft)},className:Vt.a.g},t.a.createElement("img",{className:"mr10",src:(Ft!=null&&Ft.user_liker,qn.a)}),t.a.createElement("span",null,Ft==null?void 0:Ft.praises_count)),t.a.createElement(fi,{onOk:Gn,active:rn,identifier:Hn})),t.a.createElement("div",{className:Vt.a.btns},t.a.createElement(ne.a,{onClick:function(){return Cn()},type:"primary",ghost:!0},"\u5173\u95ED"),Qn[0]&&t.a.createElement(ne.a,{onClick:function(wn){return Xn(wn,"prev")},style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),Qn[1]&&t.a.createElement(ne.a,{onClick:function(wn){return Xn(wn,"next")},style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},ii=dr,li=z("3tLw"),Ni=z.n(li),wi=z("ek7X"),ua=z("0NbB"),ca=function(ut){var Et=ut.identifier,Dt=ut.tabStatus,on=ut.setFilterListTotal,an=ut.setListStatus,vt={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null},dt=Object(n.useState)(Object(o.a)({},vt)),Ht=Object(d.a)(dt,2),yt=Ht[0],en=Ht[1],Lt=Object(n.useState)(!1),rn=Object(d.a)(Lt,2),Hn=rn[0],An=rn[1],vn=Object(n.useState)(0),Xn=Object(d.a)(vn,2),Cn=Xn[0],Ln=Xn[1],Fn=Object(n.useState)(1),yr=Object(d.a)(Fn,2),Qn=yr[0],ir=yr[1],lr=Object(n.useState)(null),mr=Object(d.a)(lr,2),Jn=mr[0],or=mr[1],kn=Object(n.useState)([]),Ft=Object(d.a)(kn,2),fn=Ft[0],Yn=Ft[1],Zn=Object(n.useState)([!0,!0]),ur=Object(d.a)(Zn,2),zn=ur[0],Gn=ur[1],hn=Object(n.useState)(0),wn=Object(d.a)(hn,2),jt=wn[0],Bt=wn[1],$t=Object(n.useRef)(null);Object(n.useEffect)(function(){wr()},[Dt]),Object(n.useEffect)(function(){gn()},[Jn]),Object(n.useEffect)(function(){In(Object(o.a)({},vt)),wr()},[Et]),Object(n.useEffect)(function(){return window.addEventListener("resize",nn),an(jt),function(){window.removeEventListener("resize",nn)}},[jt]);var gn=function(){var Wn=Object(h.a)(i.a.mark(function xn(){var $n,tr;return i.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:if(Jn){Pn.next=3;break}return Gn([!0,!0]),Pn.abrupt("return");case 3:$n=[!0,!0],tr=fn==null?void 0:fn.findIndex(function(qr){return qr.id===Jn}),tr===0&&yt.page===1&&($n[0]=!1),(yt.page-1)*yt.limit+(tr+1)===yt.total&&($n[1]=!1),Gn($n);case 8:case"end":return Pn.stop()}},xn)}));return function(){return Wn.apply(this,arguments)}}(),nn=function(){if(jt){var xn,$n=window.innerWidth-((xn=$t.current)===null||xn===void 0?void 0:xn.clientWidth);Ln($n)}},In=function(){var Wn=Object(h.a)(i.a.mark(function xn($n){var tr,Ir,Pn,qr;return i.a.wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:return An(!0),Hr.next=3,Object(v.f)(Et,$n);case 3:return tr=Hr.sent,(tr==null?void 0:tr.status)===0&&(Yn((tr==null||((Ir=tr.data)===null||Ir===void 0)?void 0:Ir.articles)||[]),en(Object(o.a)(Object(o.a)({},$n),{},{total:tr==null||((Pn=tr.data)===null||Pn===void 0)?void 0:Pn.articles_count})),on(tr==null||((qr=tr.data)===null||qr===void 0)?void 0:qr.articles_count)),An(!1),Hr.abrupt("return",tr);case 7:case"end":return Hr.stop()}},xn)}));return function($n){return Wn.apply(this,arguments)}}(),pn=function(){(yt==null?void 0:yt.sort_direction)===null?yt.sort_direction="asc":(yt==null?void 0:yt.sort_direction)==="asc"?yt.sort_direction="desc":(yt==null?void 0:yt.sort_direction)==="desc"&&(yt.sort_direction=null),yt.page=1,wr(),en(Object(o.a)({},yt)),In(yt)},Dn=function(){yt.page=1,yt.search=yt==null?void 0:yt.save_search,wr(),en(Object(o.a)({},yt)),In(yt)},_n=function(){var xn,$n=document.getElementsByClassName("btn-resize");$n[0].style.visibility="hidden";var tr=window.innerWidth-((xn=$t.current)===null||xn===void 0?void 0:xn.clientWidth);Ln(tr)},Bn=function(){_n(),Bt(1)},er=function(xn){_n(),or(xn==null?void 0:xn.id),Bt(3)},fr=function(xn){_n(),or(xn==null?void 0:xn.id),Bt(2)},wr=function(){var xn=document.getElementsByClassName("btn-resize");xn[0].style.visibility="visible",Ln(0),Bt(0),or(null)},Yr=function(xn){Bt(3),or(xn),yt.page=1,en(Object(o.a)({},yt)),In(yt)},Li=function(xn){Bt(3),or(xn),en(Object(o.a)({},yt)),In(yt)},Kr=function(xn){en(Object(o.a)({},yt)),In(yt)},Mi=function(){var Wn=Object(h.a)(i.a.mark(function xn($n){var tr;return i.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:return Pn.next=2,Object(v.c)(Et,{active:$n==null?void 0:$n.id});case 2:tr=Pn.sent,tr.status===0&&(In(yt),ir(Qn+1));case 4:case"end":return Pn.stop()}},xn)}));return function($n){return Wn.apply(this,arguments)}}(),qi=function(){var Wn=Object(h.a)(i.a.mark(function xn($n){var tr;return i.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:return Pn.next=2,Object(v.e)(Et,{active:$n==null?void 0:$n.id});case 2:tr=Pn.sent,tr.status===0&&(In(yt),ir(Qn+1));case 4:case"end":return Pn.stop()}},xn)}));return function($n){return Wn.apply(this,arguments)}}(),Ui=function(){var Wn=Object(h.a)(i.a.mark(function xn($n){var tr;return i.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:return Pn.next=2,Object(v.i)(Et,{active:$n==null?void 0:$n.id});case 2:tr=Pn.sent,tr.status===0&&(wr(),In(yt));case 4:case"end":return Pn.stop()}},xn)}));return function($n){return Wn.apply(this,arguments)}}(),ti=function(xn){yt.page=xn,en(Object(o.a)({},yt)),In(yt)},ji=function(){var Wn=Object(h.a)(i.a.mark(function xn($n,tr){var Ir,Pn,qr,Pr,Hr,gi,Ri,Fi,Un,yn,Kn;return i.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:if(Ir=fn==null?void 0:fn.findIndex(function(br){return br.id===Jn}),console.log(Ir,tr,22),!(tr==="prev")){Rn.next=21;break}if(!(Ir===void 0)){Rn.next=6;break}return T.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Rn.abrupt("return");case 6:if(!(Ir===0)){Rn.next=19;break}if(!(yt.page===1)){Rn.next=10;break}return T.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Rn.abrupt("return");case 10:if(!(yt.page!==1)){Rn.next=17;break}return yt.page=yt.page-1,en(Object(o.a)({},yt)),Rn.next=15,In(yt);case 15:Pn=Rn.sent,(Pn==null?void 0:Pn.status)===0&&(gi=Pn==null||((qr=Pn.data)===null||qr===void 0)?void 0:qr.articles[(Pn==null||((Pr=Pn.data)===null||Pr===void 0||((Hr=Pr.articles)===null||Hr===void 0))?void 0:Hr.length)-1],or(gi==null?void 0:gi.id),console.log($n.target,555));case 17:Rn.next=21;break;case 19:Ri=fn[Ir-1],or(Ri==null?void 0:Ri.id);case 21:if(!(tr==="next")){Rn.next=39;break}if(!(Ir===void 0)){Rn.next=25;break}return T.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Rn.abrupt("return");case 25:if(!((yt.page-1)*yt.limit+(Ir+1)===yt.total)){Rn.next=28;break}return T.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Rn.abrupt("return");case 28:if(!(Ir+1===yt.limit)){Rn.next=37;break}return yt.page=yt.page+1,en(Object(o.a)({},yt)),Rn.next=33,In(yt);case 33:Fi=Rn.sent,(Fi==null?void 0:Fi.status)===0&&(yn=Fi==null||((Un=Fi.data)===null||Un===void 0)?void 0:Un.articles[0],or(yn==null?void 0:yn.id)),Rn.next=39;break;case 37:Kn=fn[Ir+1],or(Kn==null?void 0:Kn.id);case 39:case"end":return Rn.stop()}},xn)}));return function($n,tr){return Wn.apply(this,arguments)}}();return t.a.createElement("div",{className:gt.a.wrap,ref:$t},t.a.createElement("div",{className:gt.a.head},t.a.createElement("div",{className:gt.a.sort,onClick:pn},t.a.createElement("span",null,"\u6700\u65B0"),t.a.createElement("aside",null,t.a.createElement(wi.a,{style:{color:(yt==null?void 0:yt.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),t.a.createElement(ua.a,{style:{color:(yt==null?void 0:yt.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),t.a.createElement(J.a.Search,{value:yt.save_search,className:gt.a["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:function(xn){yt.save_search=xn.target.value,en(Object(o.a)({},yt))},onSearch:Dn}),t.a.createElement("div",{onClick:Bn,className:gt.a.btn},t.a.createElement("img",{src:Ni.a}),"\u5199\u9898\u89E3")),t.a.createElement("div",{className:gt.a.listWarp},t.a.createElement(S.a,{spinning:Hn,className:"mt20"},fn==null?void 0:fn.map(function(Wn,xn){var $n=!0;return xn+1===fn.length&&xn!==0&&($n=!1),t.a.createElement(Ct,{active:Jn,key:Wn.id,data:Wn,showLine:$n,onClick:er,onAssist:Mi,onHide:qi})}),(fn==null?void 0:fn.length)===0&&t.a.createElement(M.a,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),t.a.createElement(Ae.a,{className:gt.a.pagination,showTotal:function(xn){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},xn),"\u6761\u6570\u636E")},total:yt.total,showSizeChanger:!1,current:yt==null?void 0:yt.page,onChange:ti,hideOnSinglePage:!0,showQuickJumper:!0}),jt>0&&t.a.createElement("div",{className:gt.a.fixedRight,style:{width:Cn}},jt===1&&t.a.createElement(Kt,{identifier:Et,onClose:wr,onOk:Yr}),jt===2&&t.a.createElement(Kt,{active:Jn,identifier:Et,onClose:wr,onOk:Li}),jt===3&&t.a.createElement(ii,{btnShowStatus:zn,onArticlesSkip:ji,detailsIndex:Qn,active:Jn,identifier:Et,onClose:wr,onOk:Kr,onEdit:fr,onAssist:Mi,onDelete:Ui})))},hi=ca,Zi=z("VEzc"),ln=z.n(Zi),Tn=function(ut){var Et,Dt=ut.visible,on=ut.onVisible,an=ut.value,vt=ut.onChange,dt=ut.setIndex,Ht={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null},yt=Object(n.useState)(Ht),en=Object(d.a)(yt,2),Lt=en[0],rn=en[1],Hn=Object(n.useState)([]),An=Object(d.a)(Hn,2),vn=An[0],Xn=An[1],Cn=Object(n.useState)([]),Ln=Object(d.a)(Cn,2),Fn=Ln[0],yr=Ln[1],Qn=Object(n.useState)(!1),ir=Object(d.a)(Qn,2),lr=ir[0],mr=ir[1],Jn=Object(n.useRef)([]),or=Object(n.useRef)(null),kn=Object(g.i)();Object(n.useEffect)(function(){return kn!=null&&kn.id&&(or.current=setInterval(function(){Ft(30)},3e4)),function(){clearInterval(or.current)}},[]);var Ft=function(){var jt=Object(h.a)(i.a.mark(function Bt($t){var gn;return i.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Object(v.r)(kn==null?void 0:kn.id,{practice_time:$t});case 2:gn=In.sent;case 3:case"end":return In.stop()}},Bt)}));return function($t){return jt.apply(this,arguments)}}();Object(n.useEffect)(function(){Gn(Lt),ur()},[]),Object(n.useEffect)(function(){return window.addEventListener("click",Yn),function(){window.removeEventListener("click",Yn)}},[kn==null?void 0:kn.save_identifier,Dt]),Object(n.useEffect)(function(){var jt=Jn.current.findIndex(function(In){return In.identifier===(kn==null?void 0:kn.save_identifier)}),Bt=Jn.current[jt-1],$t=Jn.current[jt+1],gn=document.getElementById("oj-prev"),nn=document.getElementById("oj-next");Bt?gn.style.display="block":gn.style.display="none",$t?nn.style.display="block":nn.style.display="none"},[kn==null?void 0:kn.save_identifier,Jn.current]);var fn=function(Bt,$t){if(Bt.id===$t)return Bt;for(var gn=0,nn=Bt;nn=nn.parentNode;gn++){if(nn.id===$t)return nn;if(nn==document.documentElement)return!1}},Yn=function(){var jt=Object(h.a)(i.a.mark(function Bt($t){var gn,nn,In;return i.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:if(!fn($t.target,"oj-drawer")&&Dt&&on(!1),gn=Jn.current.findIndex(function(_n){return _n.identifier===(kn==null?void 0:kn.save_identifier)}),nn=Jn.current[gn-1],In=Jn.current[gn+1],!($t.target.id==="oj-prev")){Dn.next=14;break}if(!(!nn||gn===-1)){Dn.next=8;break}return T.b.warn("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728"),Dn.abrupt("return");case 8:return $t.target.style.pointerEvents="none",$t.target.style.cursor="not-allowed",Dn.next=12,hn(nn==null?void 0:nn.identifier);case 12:dt("0"),setTimeout(function(){$t.target.style.pointerEvents="auto",$t.target.style.cursor="pointer"},400);case 14:if(!($t.target.id==="oj-next"||$t.target.id==="oj-modal-next")){Dn.next=24;break}if(!(!In||gn===-1)){Dn.next=18;break}return T.b.warn("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728"),Dn.abrupt("return");case 18:return $t.target.style.pointerEvents="none",$t.target.style.cursor="not-allowed",Dn.next=22,hn(In==null?void 0:In.identifier);case 22:dt("0"),setTimeout(function(){$t.target.style.pointerEvents="auto",$t.target.style.cursor="pointer"},400);case 24:case"end":return Dn.stop()}},Bt)}));return function($t){return jt.apply(this,arguments)}}();Object(n.useEffect)(function(){vt(kn==null?void 0:kn.save_identifier);var jt=Fn.findIndex(function(Bt){return Bt.some(function($t){return $t.identifier===(kn==null?void 0:kn.save_identifier)})});jt===-1?rn(Object(o.a)(Object(o.a)({},Lt),{},{page:1})):rn(Object(o.a)(Object(o.a)({},Lt),{},{page:jt+1}))},[kn==null?void 0:kn.save_identifier,Fn]);var Zn=function(Bt){Lt.page=1,Lt.tag_discipline_id=Bt,rn(Object(o.a)({},Lt)),Gn(Lt)},ur=function(){var jt=Object(h.a)(i.a.mark(function Bt(){var $t;return i.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return nn.next=2,Object(_e.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});case 2:$t=nn.sent,Xn($t.tag_disciplines||[]);case 4:case"end":return nn.stop()}},Bt)}));return function(){return jt.apply(this,arguments)}}(),zn=function(Bt){Lt.page=1,Lt.difficulty=typeof Bt=="number"?Bt:null,rn(Object(o.a)({},Lt)),Gn(Lt)},Gn=function(){var jt=Object(h.a)(i.a.mark(function Bt($t){var gn,nn,In,pn,Dn,_n;return i.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return mr(!0),er.next=3,Object(v.p)($t);case 3:if(gn=er.sent,gn!=null&&gn.practices_list){for(In=gn==null||((nn=gn.practices_list)===null||nn===void 0)?void 0:nn.length,pn=[],Dn=0;Dn<In;Dn+=Lt==null?void 0:Lt.per_page)pn.push(gn==null||((_n=gn.practices_list)===null||_n===void 0)?void 0:_n.slice(Dn,Dn+(Lt==null?void 0:Lt.per_page)));rn(Object(o.a)(Object(o.a)({},Lt),{},{total:gn==null?void 0:gn.practices_count})),Jn.current=(gn==null?void 0:gn.practices_list)||[],yr(pn)}mr(!1);case 6:case"end":return er.stop()}},Bt)}));return function($t){return jt.apply(this,arguments)}}(),hn=function(){var jt=Object(h.a)(i.a.mark(function Bt($t,gn){var nn;return i.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return pn.next=2,Object(_e.a)("/api/practices/".concat($t,"/start"),{method:"get"});case 2:nn=pn.sent,(nn==null?void 0:nn.status)===0&&_.d.push("/problems/".concat(nn==null?void 0:nn.identifier,"/oj/").concat($t));case 4:case"end":return pn.stop()}},Bt)}));return function($t,gn){return jt.apply(this,arguments)}}(),wn=function(Bt){Lt.page=Bt,rn(Object(o.a)({},Lt))};return t.a.createElement("div",{className:ln.a.wrap,id:"oj-drawer",style:{left:Dt?0:-700}},t.a.createElement("div",{className:ln.a.head},t.a.createElement("div",{className:ln.a.title},"\u9898\u76EE\u5217\u8868"),t.a.createElement(J.a.Search,{value:Lt==null?void 0:Lt.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:178,marginLeft:"auto",marginRight:10},onChange:function(Bt){Lt.save_search=Bt.target.value,rn(Object(o.a)({},Lt))},onSearch:function(){Lt.page=1,Lt.search=Lt.save_search,rn(Object(o.a)({},Lt)),Gn(Lt)}}),t.a.createElement(w.a,{value:Lt==null?void 0:Lt.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:function(Bt){return Bt.parentNode},maxTagTextLength:2,maxTagCount:2,onChange:Zn},vn.map(function(jt){return t.a.createElement(w.a.Option,{key:jt.id,value:jt.id},jt.name)})),t.a.createElement(w.a,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:function(Bt){return Bt.parentNode},value:Lt==null?void 0:Lt.difficulty,onChange:zn},t.a.createElement(w.a.Option,{value:1},"\u7B80\u5355"),t.a.createElement(w.a.Option,{value:2},"\u9002\u4E2D"),t.a.createElement(w.a.Option,{value:3},"\u56F0\u96BE"))),t.a.createElement("div",{className:ln.a.content},t.a.createElement(S.a,{spinning:lr},Fn==null||((Et=Fn[Lt.page-1])===null||Et===void 0)?void 0:Et.map(function(jt){return t.a.createElement("div",{key:jt.identifier,className:ln.a.list,onClick:function($t){return hn(jt.identifier,$t)}},t.a.createElement("i",{style:{visibility:an===jt.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),t.a.createElement("span",{style:{fontWeight:an===jt.identifier?"bold":400,color:an===jt.identifier?"#ffffff":"#bac4cd"},title:jt==null?void 0:jt.name},jt.name),(jt==null?void 0:jt.difficulty)===1&&t.a.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(jt==null?void 0:jt.difficulty)===2&&t.a.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(jt==null?void 0:jt.difficulty)===3&&t.a.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))}))),t.a.createElement("div",{className:ln.a.footer},t.a.createElement(Ae.a,{showTotal:function(Bt){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},Bt),"\u6761\u6570\u636E")},total:Lt.total,pageSize:Lt==null?void 0:Lt.per_page,current:Lt==null?void 0:Lt.page,showSizeChanger:!1,onChange:wn,showQuickJumper:!0,hideOnSinglePage:!0})))},On=Tn,rr=function(ot){var ut,Et=ot.hack,Dt=ot.onTriggerPraise,on=ot.topicId,an=ot.page,vt=ot.onPageChange,dt=ot.user,Ht=ot.submitRecords,yt=ot.submitting,en=ot.submitResult,Lt=Object(g.h)(),rn=Object(n.useState)((Lt==null||((ut=Lt.query)===null||ut===void 0)?void 0:ut.tab)||"0"),Hn=Object(d.a)(rn,2),An=Hn[0],vn=Hn[1],Xn=Object(n.useState)(0),Cn=Object(d.a)(Xn,2),Ln=Cn[0],Fn=Cn[1],yr=Object(n.useState)(0),Qn=Object(d.a)(yr,2),ir=Qn[0],lr=Qn[1],mr=Object(n.useState)(0),Jn=Object(d.a)(mr,2),or=Jn[0],kn=Jn[1],Ft=Object(n.useState)(),fn=Object(d.a)(Ft,2),Yn=fn[0],Zn=fn[1],ur=Object(n.useState)(!1),zn=Object(d.a)(ur,2),Gn=zn[0],hn=zn[1];function wn(Bt){var $t=Bt.target.id;if(An==="3"&&$t!==An&&(ir===1||ir===2)){p.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:function(){vn($t)}});return}vn($t)}Object(n.useEffect)(function(){var Bt=Xe.a.subscribe("to-commit-info",function(){vn("1")});return Bt},[]);function jt(){vn("2")}return t.a.createElement("div",{className:xe.a["left-panel"]},t.a.createElement("ul",{className:"".concat(xe.a["s-navs"]," ").concat(xe.a["bg-white"]," ").concat(xe.a.b1)},t.a.createElement("li",{className:"mr40 current"},t.a.createElement("img",{onClick:function(){return hn(!0)},src:Ve.a})),t.a.createElement("li",{className:xe.a["oj-mr"]},t.a.createElement("a",{className:An==="0"?xe.a.active:"",id:"0",onClick:wn},"\u4EFB\u52A1\u63CF\u8FF0")),t.a.createElement("li",{className:xe.a["oj-mr"]},t.a.createElement("a",{className:An==="3"?xe.a.active:"",id:"3",onClick:wn},"\u9898\u89E3",or?"(".concat(or,")"):"")),t.a.createElement("li",{className:xe.a["oj-mr"]},t.a.createElement("a",{className:An==="2"?xe.a.active:"",id:"2",onClick:wn},"\u8BC4\u8BBA",Ln?"(".concat(Ln,")"):"")),t.a.createElement("li",null,t.a.createElement("a",{className:An==="1"?xe.a.active:"",id:"1",onClick:wn},"\u63D0\u4EA4\u8BB0\u5F55"))),t.a.createElement("div",{className:"".concat(xe.a["tab-panel-body"]," ").concat(An==="0"?"":"hide"),style:{padding:"0 0 0 16px"}},t.a.createElement(Ie,{hack:Et,onTriggerPraise:Dt,toDiscuss:jt})),t.a.createElement("div",{className:"".concat(xe.a["tab-panel-body"]," ").concat(An==="1"?"":"hide")},Ht!=null&&Ht.records_count?t.a.createElement(ee,{page:an,onPageChange:vt,topicId:on,submitting:yt,submitRecords:Ht,submitResult:en}):t.a.createElement(M.a,null)),t.a.createElement("div",{className:"".concat(xe.a["tab-panel-body"]," ").concat(An==="2"?"":"hide"),style:{padding:0}},t.a.createElement(Ot,{setDiscussTotal:Fn,user:dt,identifier:Et.identifier,hack:Et,onTriggerPraise:Dt})),t.a.createElement("div",{className:"".concat(xe.a["tab-panel-body"]," ").concat(An==="3"?"":"hide"),style:{padding:0}},t.a.createElement(hi,{setListStatus:lr,setFilterListTotal:kn,tabStatus:An,identifier:Et.identifier})),t.a.createElement(On,{visible:Gn,setIndex:vn,onVisible:function($t){return hn($t)},value:Yn,onChange:function($t){return Zn($t)}}))},ar=function(ut){return String(ut).length===1?"0".concat(ut):ut},pr=function(ut){var Et=ut.className,Dt=Et===void 0?"":Et,on=ut.onChange,an=Object(n.useState)(0),vt=Object(d.a)(an,2),dt=vt[0],Ht=vt[1];Object(n.useEffect)(function(){var rn=setTimeout(function(){Ht(dt+1e3)},1e3);return on(dt+1e3),function(){clearInterval(rn)}},[dt]);var yt=parseInt(dt/(60*6e4))||"00",en=parseInt(dt%(60*6e4)/6e4)||"00",Lt=parseInt(dt%6e4/1e3)||"00";return t.a.createElement("div",{className:Dt},ar(yt),":",ar(en),":",ar(Lt))},Er=pr,Cr=z("oFv4"),xr=z.n(Cr),pi=z("S/kP"),Or=z.n(pi),Ai=z("t/PP"),Dr=z.n(Ai),mi=z("LvDl"),vi=z.n(mi),Yi=z("P5Jw"),Ma=s.a.Countdown,ba={Java:"java",C:"c",Python:"py","C++":"c"},Mn;(function(ot){ot[ot.SET_LOADING=0]="SET_LOADING",ot[ot.GET_DATA=1]="GET_DATA",ot[ot.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",ot[ot.SET_DATA=3]="SET_DATA",ot[ot.SET_DEBUGING=4]="SET_DEBUGING",ot[ot.SET_SUBMITING=5]="SET_SUBMITING",ot[ot.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",ot[ot.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",ot[ot.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",ot[ot.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",ot[ot.SET_PAGE=10]="SET_PAGE",ot[ot.GET_LANGUAGE=11]="GET_LANGUAGE",ot[ot.GET_DRAWER=12]="GET_DRAWER"})(Mn||(Mn={}));function zi(){return new Date().getTime()}var da={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function _a(ot,ut){switch(ut.type){case Mn.GET_DATA:return Object(o.a)(Object(o.a)({},ot),ut.payload);case Mn.SET_DATA:return Object(o.a)(Object(o.a)({},ot),{},{data:ut.payload});case Mn.SET_LOADING:return Object(o.a)(Object(o.a)({},ot),{},{loading:ut.payload});case Mn.GET_LANGUAGE:return Object(o.a)(Object(o.a)({},ot),{},{languageList:ut.payload});case Mn.GET_DRAWER:return Object(o.a)(Object(o.a)({},ot),{},{drawerData:ut.payload});case Mn.SET_SHOW_NOTE:return Object(o.a)(Object(o.a)({},ot),{},{showNote:ut.payload});case Mn.SET_DEBUGING:return Object(o.a)(Object(o.a)({},ot),{},{debuging:ut.payload});case Mn.SET_SUBMITING:return Object(o.a)(Object(o.a)({},ot),{},{submitting:ut.payload});case Mn.GET_SUBMIT_RECORDS:return Object(o.a)(Object(o.a)({},ot),{},{submitRecords:ut.payload});case Mn.SET_PAGE:return Object(o.a)(Object(o.a)({},ot),{},{submitRecordPage:ut.payload});case Mn.SET_EXECUTE_MESSAGE:return Object(o.a)(Object(o.a)({},ot),{},{executingMessage:ut.payload});case Mn.SET_EXECUTE_RESULT:return Object(o.a)(Object(o.a)({},ot),ut.payload);case Mn.SET_SUBMIT_RESULT:return Object(o.a)(Object(o.a)({},ot),ut.payload);default:throw new Error}}var $i=We.default=function(ot){var ut,Et,Dt=ot.children,on=Object(n.useReducer)(_a,da),an=Object(d.a)(on,2),vt=an[0],dt=an[1],Ht=Object(g.i)(),yt=Ht.id,en=Object(g.g)(),Lt=Object(g.h)(),rn=vt.languageValue,Hn=vt.languageList,An=vt.loading,vn=vt.data,Xn=vt.debugResult,Cn=vt.submitResult,Ln=vt.submitRecords,Fn=vt.submitRecordPage,yr=vt.showNote,Qn=vt.debuging,ir=vt.submitting,lr=vt.executingMessage,mr=Object(n.useState)("#FFF"),Jn=Object(d.a)(mr,2),or=Jn[0],kn=Jn[1],Ft=Object(n.useState)(null),fn=Object(d.a)(Ft,2),Yn=fn[0],Zn=fn[1],ur=Object(n.useState)({}),zn=Object(d.a)(ur,2),Gn=zn[0],hn=zn[1],wn=Object(n.useState)(!1),jt=Object(d.a)(wn,2),Bt=jt[0],$t=jt[1],gn=Object(n.useRef)(null),nn=Object(n.useRef)(null),In=vn==null?void 0:vn.user,pn=vn==null?void 0:vn.hack;Object(n.useEffect)(function(){return Object(_.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(_.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(_.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(_.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(n.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)}),Object(n.useEffect)(function(){if(Bt){var Un,yn=document.getElementById("oj-next"),Kn=document.getElementById("oj-modal-next");(yn==null||((Un=yn.style)===null||Un===void 0)?void 0:Un.display)==="none"?Kn.style.display="none":Kn.style.display="block"}},[Bt]),Object(n.useEffect)(function(){function Un(){return yn.apply(this,arguments)}function yn(){return yn=Object(h.a)(i.a.mark(function Kn(){var qt,Rn,br,jr,Fr;return i.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:return un.next=2,Object(v.m)(yt);case 2:qt=un.sent,qt.status===401?document.location.href="/user/login":(qt.hack=qt.practice,qt.hack.code=O.Base64.decode(qt==null||((Rn=qt.hack)===null||Rn===void 0)?void 0:Rn.code),Fr="".concat(In==null?void 0:In.login,"-language"),localStorage.getItem(Fr)&&(qt.hack.language=localStorage.getItem(Fr)),nn.current=vi.a.cloneDeep(qt),nn.current.language=qt==null||((br=qt.hack)===null||br===void 0)?void 0:br.language,dt({type:Mn.GET_DATA,payload:{loading:!1,data:qt}}),dt({type:Mn.SET_SUBMIT_RESULT,payload:{languageValue:qt==null||((jr=qt.hack)===null||jr===void 0)?void 0:jr.language}}));case 4:case"end":return un.stop()}},Kn)})),yn.apply(this,arguments)}yt&&Un()},[yt]),Object(n.useEffect)(function(){dt({type:Mn.SET_SUBMIT_RESULT,payload:{debugResult:void 0}}),er(),$t(!1)},[yt]),Object(n.useEffect)(function(){clearTimeout(gn.current)},[yt]),Object(n.useEffect)(function(){_n()},[yt,Fn]);var Dn=function(){window.parent.postMessage("backExercise","*")};function _n(){return Bn.apply(this,arguments)}function Bn(){return Bn=Object(h.a)(i.a.mark(function Un(){var yn;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.prev=0,qt.next=3,Object(v.o)(yt,{limit:15,page:Fn});case 3:yn=qt.sent,dt({type:Mn.GET_SUBMIT_RECORDS,payload:yn}),qt.next=10;break;case 7:qt.prev=7,qt.t0=qt.catch(0),console.log(qt.t0);case 10:case"end":return qt.stop()}},Un,null,[[0,7]])})),Bn.apply(this,arguments)}function er(){return fr.apply(this,arguments)}function fr(){return fr=Object(h.a)(i.a.mark(function Un(){var yn;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.prev=0,qt.next=3,Object(v.w)(yt);case 3:yn=qt.sent,dt({type:Mn.GET_LANGUAGE,payload:yn==null?void 0:yn.data}),qt.next=10;break;case 7:qt.prev=7,qt.t0=qt.catch(0),console.log(qt.t0);case 10:case"end":return qt.stop()}},Un,null,[[0,7]])})),fr.apply(this,arguments)}function wr(Un){dt({type:Mn.SET_PAGE,payload:Un})}function Yr(Un){return Li.apply(this,arguments)}function Li(){return Li=Object(h.a)(i.a.mark(function Un(yn){var Kn,qt,Rn,br,jr,Fr;return i.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:return jr=((Kn=window)===null||Kn===void 0||((qt=Kn.location)===null||qt===void 0||((Rn=qt.pathname)===null||Rn===void 0||((br=Rn.split("/"))===null||br===void 0)))?void 0:br[2])||yt,un.next=3,Object(v.v)(jr,yn||{code:O.Base64.encode(pn.code),language:rn});case 3:return Fr=un.sent,un.abrupt("return",Fr);case 5:case"end":return un.stop()}},Un)})),Li.apply(this,arguments)}function Kr(){return Mi.apply(this,arguments)}function Mi(){return Mi=Object(h.a)(i.a.mark(function Un(){var yn,Kn,qt,Rn,br,jr,Fr;return i.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:if(!ir){un.next=2;break}return un.abrupt("return");case 2:return dt({type:Mn.SET_SUBMITING,payload:!0}),un.prev=3,Xe.a.publish("to-commit-info"),un.next=7,Yr();case 7:if(yn=un.sent,!(yn.status===0)){un.next=21;break}return Fr=function(){return Fr=Object(h.a)(i.a.mark(function ea(){var Bi,Ii,Wi,ta,na,Vi;return i.a.wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:return Ar.next=2,Object(v.l)(yt,"submit");case 2:if(Bi=Ar.sent,Ii=Bi.status,Wi=Bi.data,ta=zi(),na=ta-br>(Rn+3)*1e3,Ii!==0&&!na&&setTimeout(jr,1e3),!na){Ar.next=12;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),dt({type:Mn.SET_SUBMITING,payload:!1}),Ar.abrupt("return");case 12:if(!(Ii===0)){Ar.next=19;break}return Wi.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Ar.next=16,Object(v.o)(yt,{limit:15,page:Fn});case 16:Vi=Ar.sent,dt({type:Mn.SET_SUBMIT_RESULT,payload:Object(o.a)(Object(o.a)({},vt),{},{submitResult:Wi,submitting:!1,submitRecords:Vi})}),(Wi==null?void 0:Wi.status)===0&&$t(!0);case 19:case"end":return Ar.stop()}},ea)})),Fr.apply(this,arguments)},jr=function(){return Fr.apply(this,arguments)},Kn={},un.next=14,Object(v.s)(yt,Kn);case 14:if(qt=un.sent,!(qt.status===-1)){un.next=18;break}return window.parent.location.href="/classrooms/".concat(Lt.query.coursesId,"/exercise/").concat(Lt.query.exercisesId,"/detail"),un.abrupt("return");case 18:Rn=pn.time_limit,br=zi(),jr();case 21:un.next=26;break;case 23:un.prev=23,un.t0=un.catch(3),dt({type:Mn.SET_SUBMITING,payload:!1});case 26:case"end":return un.stop()}},Un,null,[[3,23]])})),Mi.apply(this,arguments)}function qi(){return Ui.apply(this,arguments)}function Ui(){return Ui=Object(h.a)(i.a.mark(function Un(){var yn,Kn,qt,Rn,br,jr,Fr;return i.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:return vt.debuging=!0,dt({type:Mn.SET_DEBUGING,payload:!0}),un.prev=2,un.next=5,Yr();case 5:if(yn=un.sent,!(yn.status===0)){un.next=21;break}return Fr=function(){return Fr=Object(h.a)(i.a.mark(function ea(){var Bi,Ii,Wi,ta,na,Vi;return i.a.wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:return Ar.next=2,Object(v.l)(yt,"debug");case 2:if(Bi=Ar.sent,Ii=Bi.status,Wi=Bi.message,ta=Bi.data,na=zi(),Vi=na-br>(Kn+3)*1e3,Ii!==0&&!Vi&&(dt({type:Mn.SET_EXECUTE_MESSAGE,payload:Wi}),setTimeout(jr,1e3)),!Vi){Ar.next=13;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),dt({type:Mn.SET_DEBUGING,payload:!1}),Ar.abrupt("return");case 13:Ii===0&&(dt({type:Mn.SET_DEBUGING,payload:!1}),ta.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),dt({type:Mn.SET_EXECUTE_RESULT,payload:Object(o.a)(Object(o.a)({},vt),{},{debugResult:ta,debuging:!1})}));case 14:case"end":return Ar.stop()}},ea)})),Fr.apply(this,arguments)},jr=function(){return Fr.apply(this,arguments)},Kn=pn.time_limit,qt={input:encodeURIComponent(vn.test_case.input)},un.next=13,Object(v.h)(yt,qt);case 13:if(Rn=un.sent,!(Rn.status===-1)){un.next=17;break}return window.parent.location.href="/classrooms/".concat(Lt.query.coursesId,"/exercise/").concat(Lt.query.exercisesId,"/detail"),un.abrupt("return");case 17:br=zi(),jr(),un.next=22;break;case 21:dt({type:Mn.SET_DEBUGING,payload:!1});case 22:un.next=27;break;case 24:un.prev=24,un.t0=un.catch(2),console.log(un.t0);case 27:return un.prev=27,un.finish(27);case 29:case"end":return un.stop()}},Un,null,[[2,24,27,29]])})),Ui.apply(this,arguments)}function ti(Un){var yn;clearTimeout(gn.current),gn.current=setTimeout(function(){var Kn;Yr({code:O.Base64.encode(Un),language:nn==null||((Kn=nn.current)===null||Kn===void 0)?void 0:Kn.language})},2e3),dt({type:Mn.SET_DATA,payload:Object(o.a)(Object(o.a)({},nn==null?void 0:nn.current),{},{hack:Object(o.a)(Object(o.a)({},nn==null||((yn=nn.current)===null||yn===void 0)?void 0:yn.hack),{},{code:Un})})})}function ji(Un){var yn=Un.target.value;dt({type:Mn.SET_DATA,payload:Object(o.a)(Object(o.a)({},vn),{},{test_case:{input:yn}})})}var Wn=function(){var Un=Object(h.a)(i.a.mark(function yn(Kn){var qt,Rn,br,jr,Fr;return i.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:return dt({type:Mn.SET_LOADING,payload:!0}),un.next=3,Yr();case 3:if(qt=un.sent,!(qt.status===0)){un.next=14;break}return dt({type:Mn.SET_SUBMIT_RESULT,payload:{languageValue:Kn}}),nn.current.language=Kn,Rn="".concat(In==null?void 0:In.login,"-language"),localStorage.setItem(Rn,Kn),un.next=11,Object(v.w)(yt);case 11:br=un.sent,br.status===0&&(Fr=br==null||((jr=br.data)===null||jr===void 0)?void 0:jr.find(function(ki){return ki.language===Kn}),ti(O.Base64.decode(Fr.code))),setTimeout(function(){dt({type:Mn.SET_LOADING,payload:!1})},300);case 14:case"end":return un.stop()}},yn)}));return function(Kn){return Un.apply(this,arguments)}}();function xn(){return $n.apply(this,arguments)}function $n(){return $n=Object(h.a)(i.a.mark(function Un(){var yn;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.prev=0,qt.next=3,Object(v.q)(yt,{language:rn});case 3:yn=qt.sent,yn.status===401?en.replace("/login",{from:Lt.pathname}):(ti(O.Base64.decode(yn.code)),er()),qt.next=10;break;case 7:qt.prev=7,qt.t0=qt.catch(0),console.log(qt.t0);case 10:case"end":return qt.stop()}},Un,null,[[0,7]])})),$n.apply(this,arguments)}function tr(){p.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:t.a.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",t.a.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk:function(){return Object(h.a)(i.a.mark(function yn(){var Kn;return i.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:return Rn.next=2,Object(v.t)(yt,{language:rn});case 2:Kn=Rn.sent,Kn.status===401?en.replace("/login",{from:Lt.pathname}):ti(O.Base64.decode(Kn.code));case 4:case"end":return Rn.stop()}},yn)}))()}})}function Ir(){dt({type:Mn.SET_SHOW_NOTE,payload:!0})}function Pn(){dt({type:Mn.SET_SHOW_NOTE,payload:!1})}function qr(Un){return Pr.apply(this,arguments)}function Pr(){return Pr=Object(h.a)(i.a.mark(function Un(yn){return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Object(v.b)(yt,yn);case 2:dt({type:Mn.GET_DATA,payload:{showNote:!1,data:Object(o.a)(Object(o.a)({},vn),{},{hack:Object(o.a)(Object(o.a)({},pn),{},{notes:yn.notes})})}});case 3:case"end":return qt.stop()}},Un)})),Pr.apply(this,arguments)}var Hr={input:vn==null||((ut=vn.test_case)===null||ut===void 0)?void 0:ut.input,language:pn==null?void 0:pn.language,code:pn==null?void 0:pn.code,title:"main."+ba[pn==null?void 0:pn.language],modify_code:pn==null?void 0:pn.modify_code,notes:pn==null?void 0:pn.notes,debugResult:Xn,debuging:Qn,submitting:ir,executingMessage:lr,id:yt,languageValue:rn,languageList:Hn,onChangeLanguage:Wn,onCancelNote:Pn,onAddNote:qr,showNote:yr,onShowNote:Ir,onSubmitCode:Kr,onChangeCode:ti,onChangeInput:ji,onDebugCode:qi,onResetCode:xn,onSyncCode:tr,onUpdateCode:Yr};function gi(){return Ri.apply(this,arguments)}function Ri(){return Ri=Object(h.a)(i.a.mark(function Un(){var yn,Kn,qt;return i.a.wrap(function(br){for(;;)switch(br.prev=br.next){case 0:return br.next=2,Object(v.u)(pn.id,{container_type:"Hack",type:1});case 2:yn=br.sent,Kn=yn.praise_count,qt=Object(o.a)(Object(o.a)({},vn),{},{hack:Object(o.a)(Object(o.a)({},pn),{},{praises_count:Kn,user_praise:!pn.user_praise})}),dt({type:Mn.SET_DATA,payload:qt});case 6:case"end":return br.stop()}},Un)})),Ri.apply(this,arguments)}var Fi={topicId:yt,submitResult:Cn,submitRecords:Ln,submitting:ir,page:Fn,onPageChange:wr,hack:pn,user:vn==null?void 0:vn.user,onTriggerPraise:gi};return console.log(vn,nn==null?void 0:nn.current,"data--------"),t.a.createElement(t.a.Fragment,null,t.a.createElement(S.a,{className:"oj-custom-large-spin",size:"large",spinning:An},vn?t.a.createElement("div",{className:"oj-custom-warp"},t.a.createElement("header",{className:D.a.header,style:{minWidth:1200}},t.a.createElement("div",null,t.a.createElement("img",{src:"".concat(E.a.IMG_SERVER,"/images/").concat(In.image_url),alt:"user",width:30}),t.a.createElement("span",null,In.name)),t.a.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},t.a.createElement("div",null,pn.name),t.a.createElement(Er,{onChange:function(yn){},className:"font12 c-grey-999"})),t.a.createElement(Yi.CopyToClipboard,{text:"".concat((Et=window.location)===null||Et===void 0?void 0:Et.origin,"/problems/").concat(pn.identifier,"/share"),onCopy:function(){return T.b.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")}},t.a.createElement("span",{className:D.a.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",t.a.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),pn.edit_privilege?t.a.createElement(b.a,{className:D.a.btn_back,to:"/problems/".concat(pn.identifier,"/ojedit"),style:{marginRight:10}}," ",t.a.createElement(u.a,null)," \u7F16\u8F91"):null,t.a.createElement(b.a,{className:D.a.btn_back,to:"/problems"}," ",t.a.createElement(y.a,null),"\u9000\u51FA")),t.a.createElement(m.a,{hideResize:!0,className:"my-problems oj-problems",leftChild:t.a.createElement(rr,Fi),rightChild:t.a.createElement(ka,Hr)})):null),t.a.createElement(p.a,{centered:!0,closable:!1,width:680,footer:null,visible:Bt,className:"oj-modal"},t.a.createElement("section",{className:"oj-modal-content"},t.a.createElement("div",{className:"oj-modal-head"},t.a.createElement("img",{src:xr.a,alt:""}),t.a.createElement("i",{onClick:function(){return $t(!1)},className:"iconfont icon-guanbi1"})),t.a.createElement("aside",null,t.a.createElement("img",{className:"mr30",src:Dr.a}),"\u8FD0\u884C\u65F6\u95F4:\xA0",t.a.createElement("span",{style:{color:"#75d6ba",marginRight:100}},Cn==null?void 0:Cn.execute_time,"s"),"\u4F18\u4E8E",t.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Cn==null?void 0:Cn.time_better_than)||100,"%"),"\u7684\u7528\u6237"),t.a.createElement("aside",{className:"mb50"},t.a.createElement("img",{src:Or.a,className:"mr30"}),t.a.createElement("span",{className:"oj-modal-tt"},t.a.createElement("span",null,t.a.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),t.a.createElement("span",{className:"c-light-primary"},Cn==null?void 0:Cn.execute_memory,"kb")),t.a.createElement("span",null,t.a.createElement("span",null))),"\u4F18\u4E8E",t.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Cn==null?void 0:Cn.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),t.a.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function Gi(ot){var ut=ot.languageValue,Et=ot.languageList,Dt=ot.onChangeLanguage,on=ot.title,an=ot.modify_code,vt=ot.onSyncCode,dt=ot.onShowCodeSetting,Ht=ot.onResetCode,yt=Object(g.h)(),en=function(){p.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:t.a.createElement(a.a,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Ht})};return t.a.createElement("div",{className:"action-bar"},t.a.createElement(w.a,{className:"oj-select",value:ut,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Dt},Et==null?void 0:Et.map(function(Lt){return t.a.createElement(w.a.Option,{key:Lt.language,value:Lt.language},Lt.language)})),t.a.createElement("span",null),t.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:en},t.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),t.a.createElement("a",{onClick:dt},t.a.createElement("i",{className:"iconfont icon-shezhi"})))}function ka(ot){var ut=ot.id,Et=ot.input,Dt=ot.showNote,on=ot.onShowNote,an=ot.notes,vt=ot.onCancelNote,dt=ot.onAddNote,Ht=ot.debugResult,yt=ot.language,en=ot.debuging,Lt=ot.submitting,rn=ot.executingMessage,Hn=ot.code,An=ot.onSubmitCode,vn=ot.onDebugCode,Xn=ot.onChangeCode,Cn=ot.onChangeInput,Ln=ot.onUpdateCode,Fn=Object(Z.a)(ot,["id","input","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function yr(ir){return t.a.createElement(Gi,Object(ae.a)({},Fn,{onShowCodeSetting:ir}))}var Qn={id:ut,input:Et,debugResult:Ht,debuging:en,submitting:Lt,executingMessage:rn,onDebugCode:vn,onChangeCode:Xn,onSubmitCode:An,onChangeInput:Cn};return t.a.createElement("div",{className:"right-panel"},t.a.createElement(x.a,{language:yt,value:Hn,onChange:Xn,ActionBarRender:yr}),t.a.createElement("div",{className:"note-form-area ".concat(Dt?"active":"")},t.a.createElement(ie,{onCancel:vt,notes:an,callback:dt})),t.a.createElement(F.b,Qn))}},WaYH:function($e,We,z){"use strict";var ae=z("rePB"),Z=z("Ff2n"),U=z("VTBJ"),w=z("1OyB"),P=z("vuIU"),S=z("JX7q"),C=z("Ji7U"),T=z("LK+K"),l=z("q1tI"),p=z("TSYQ"),h=z.n(p),d=z("sboe"),o=z("OZM5"),c=function(b){var v=b.prefixCls,m=b.level,E=b.isStart,a=b.isEnd;if(!m)return null;for(var x="".concat(v,"-indent-unit"),O=[],A=0;A<m;A+=1){var D;O.push(l.createElement("span",{key:A,className:h()(x,(D={},Object(ae.a)(D,"".concat(x,"-start"),E[A+1]),Object(ae.a)(D,"".concat(x,"-end"),a[A+1]),Object(ae.a)(D,"".concat(x,"-end-first-level"),!A&&a[0]),D))}))}return l.createElement("span",{"aria-hidden":"true",className:"".concat(v,"-indent")},O)},s=c,f=z("815F"),i="open",n="close",t="---",u=function(_){Object(C.a)(v,_);var b=Object(T.a)(v);function v(){var m;return Object(w.a)(this,v),m=b.apply(this,arguments),m.state={dragNodeHighlight:!1},m.onSelectorClick=function(E){var a=m.props.context.onNodeClick;a(E,Object(f.b)(m.props)),m.isSelectable()?m.onSelect(E):m.onCheck(E)},m.onSelectorDoubleClick=function(E){var a=m.props.context.onNodeDoubleClick;a(E,Object(f.b)(m.props))},m.onSelect=function(E){if(m.isDisabled())return;var a=m.props.context.onNodeSelect;E.preventDefault(),a(E,Object(f.b)(m.props))},m.onCheck=function(E){if(m.isDisabled())return;var a=m.props,x=a.disableCheckbox,O=a.checked,A=m.props.context.onNodeCheck;if(!m.isCheckable()||x)return;E.preventDefault();var D=!O;A(E,Object(f.b)(m.props),D)},m.onMouseEnter=function(E){var a=m.props.context.onNodeMouseEnter;a(E,Object(f.b)(m.props))},m.onMouseLeave=function(E){var a=m.props.context.onNodeMouseLeave;a(E,Object(f.b)(m.props))},m.onContextMenu=function(E){var a=m.props.context.onNodeContextMenu;a(E,Object(f.b)(m.props))},m.onDragStart=function(E){var a=m.props.context.onNodeDragStart;E.stopPropagation(),m.setState({dragNodeHighlight:!0}),a(E,Object(S.a)(m));try{E.dataTransfer.setData("text/plain","")}catch(x){}},m.onDragEnter=function(E){var a=m.props.context.onNodeDragEnter;E.preventDefault(),E.stopPropagation(),a(E,Object(S.a)(m))},m.onDragOver=function(E){var a=m.props.context.onNodeDragOver;E.preventDefault(),E.stopPropagation(),a(E,Object(S.a)(m))},m.onDragLeave=function(E){var a=m.props.context.onNodeDragLeave;E.stopPropagation(),a(E,Object(S.a)(m))},m.onDragEnd=function(E){var a=m.props.context.onNodeDragEnd;E.stopPropagation(),m.setState({dragNodeHighlight:!1}),a(E,Object(S.a)(m))},m.onDrop=function(E){var a=m.props.context.onNodeDrop;E.preventDefault(),E.stopPropagation(),m.setState({dragNodeHighlight:!1}),a(E,Object(S.a)(m))},m.onExpand=function(E){var a=m.props.context.onNodeExpand;a(E,Object(f.b)(m.props))},m.setSelectHandle=function(E){m.selectHandle=E},m.getNodeState=function(){var E=m.props.expanded;return m.isLeaf()?null:E?i:n},m.hasChildren=function(){var E=m.props.eventKey,a=m.props.context.keyEntities,x=a[E]||{},O=x.children;return!!(O||[]).length},m.isLeaf=function(){var E=m.props,a=E.isLeaf,x=E.loaded,O=m.props.context.loadData,A=m.hasChildren();return a===!1?!1:a||!O&&!A||O&&x&&!A},m.isDisabled=function(){var E=m.props.disabled,a=m.props.context.disabled;return!!(a||E)},m.isCheckable=function(){var E=m.props.checkable,a=m.props.context.checkable;return!a||E===!1?!1:a},m.syncLoadData=function(E){var a=E.expanded,x=E.loading,O=E.loaded,A=m.props.context,D=A.loadData,I=A.onNodeLoad;if(x)return;D&&a&&!m.isLeaf()&&(!m.hasChildren()&&!O&&I(Object(f.b)(m.props)))},m.renderSwitcher=function(){var E=m.props,a=E.expanded,x=E.switcherIcon,O=m.props.context,A=O.prefixCls,D=O.switcherIcon,I=x||D;if(m.isLeaf())return l.createElement("span",{className:h()("".concat(A,"-switcher"),"".concat(A,"-switcher-noop"))},typeof I=="function"?I(Object(U.a)(Object(U.a)({},m.props),{},{isLeaf:!0})):I);var F=h()("".concat(A,"-switcher"),"".concat(A,"-switcher_").concat(a?i:n));return l.createElement("span",{onClick:m.onExpand,className:F},typeof I=="function"?I(Object(U.a)(Object(U.a)({},m.props),{},{isLeaf:!1})):I)},m.renderCheckbox=function(){var E=m.props,a=E.checked,x=E.halfChecked,O=E.disableCheckbox,A=m.props.context.prefixCls,D=m.isDisabled(),I=m.isCheckable();if(!I)return null;var F=typeof I!="boolean"?I:null;return l.createElement("span",{className:h()("".concat(A,"-checkbox"),a&&"".concat(A,"-checkbox-checked"),!a&&x&&"".concat(A,"-checkbox-indeterminate"),(D||O)&&"".concat(A,"-checkbox-disabled")),onClick:m.onCheck},F)},m.renderIcon=function(){var E=m.props.loading,a=m.props.context.prefixCls;return l.createElement("span",{className:h()("".concat(a,"-iconEle"),"".concat(a,"-icon__").concat(m.getNodeState()||"docu"),E&&"".concat(a,"-icon_loading"))})},m.renderSelector=function(){var E=m.state.dragNodeHighlight,a=m.props,x=a.title,O=a.selected,A=a.icon,D=a.loading,I=a.data,F=m.props.context,K=F.prefixCls,ne=F.showIcon,j=F.icon,G=F.draggable,X=F.loadData,J=F.titleRender,B=m.isDisabled(),Q="".concat(K,"-node-content-wrapper"),ie;if(ne){var oe=A||j;ie=oe?l.createElement("span",{className:h()("".concat(K,"-iconEle"),"".concat(K,"-icon__customize"))},typeof oe=="function"?oe(m.props):oe):m.renderIcon()}else X&&D&&(ie=m.renderIcon());var xe;typeof x=="function"?xe=x(I):J?xe=J(I):xe=x;var ye=l.createElement("span",{className:"".concat(K,"-title")},xe);return l.createElement("span",{ref:m.setSelectHandle,title:typeof x=="string"?x:"",className:h()("".concat(Q),"".concat(Q,"-").concat(m.getNodeState()||"normal"),!B&&(O||E)&&"".concat(K,"-node-selected"),!B&&G&&"draggable"),draggable:!B&&G||void 0,"aria-grabbed":!B&&G||void 0,onMouseEnter:m.onMouseEnter,onMouseLeave:m.onMouseLeave,onContextMenu:m.onContextMenu,onClick:m.onSelectorClick,onDoubleClick:m.onSelectorDoubleClick,onDragStart:G?m.onDragStart:void 0},ie,ye)},m}return Object(P.a)(v,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var E=this.props.selectable,a=this.props.context.selectable;return typeof E=="boolean"?E:a}},{key:"render",value:function(){var E,a=this.props,x=a.eventKey,O=a.className,A=a.style,D=a.dragOver,I=a.dragOverGapTop,F=a.dragOverGapBottom,K=a.isLeaf,ne=a.isStart,j=a.isEnd,G=a.expanded,X=a.selected,J=a.checked,B=a.halfChecked,Q=a.loading,ie=a.domRef,oe=a.active,xe=a.onMouseMove,ye=Object(Z.a)(a,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Ae=this.props.context,pe=Ae.prefixCls,Oe=Ae.filterTreeNode,Fe=Ae.draggable,Me=Ae.keyEntities,Ce=this.isDisabled(),Le=Object(o.f)(ye),de=Me[x]||{},ue=de.level,ke=j[j.length-1];return l.createElement("div",Object.assign({ref:ie,className:h()(O,"".concat(pe,"-treenode"),(E={},Object(ae.a)(E,"".concat(pe,"-treenode-disabled"),Ce),Object(ae.a)(E,"".concat(pe,"-treenode-switcher-").concat(G?"open":"close"),!K),Object(ae.a)(E,"".concat(pe,"-treenode-checkbox-checked"),J),Object(ae.a)(E,"".concat(pe,"-treenode-checkbox-indeterminate"),B),Object(ae.a)(E,"".concat(pe,"-treenode-selected"),X),Object(ae.a)(E,"".concat(pe,"-treenode-loading"),Q),Object(ae.a)(E,"".concat(pe,"-treenode-active"),oe),Object(ae.a)(E,"".concat(pe,"-treenode-leaf-last"),ke),Object(ae.a)(E,"drag-over",!Ce&&D),Object(ae.a)(E,"drag-over-gap-top",!Ce&&I),Object(ae.a)(E,"drag-over-gap-bottom",!Ce&&F),Object(ae.a)(E,"filter-node",Oe&&Oe(Object(f.b)(this.props))),E)),style:A,onDragEnter:Fe?this.onDragEnter:void 0,onDragOver:Fe?this.onDragOver:void 0,onDragLeave:Fe?this.onDragLeave:void 0,onDrop:Fe?this.onDrop:void 0,onDragEnd:Fe?this.onDragEnd:void 0,onMouseMove:xe},Le),l.createElement(s,{prefixCls:pe,level:ue,isStart:ne,isEnd:j}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),v}(l.Component),y=function(b){return l.createElement(d.a.Consumer,null,function(v){return l.createElement(u,Object.assign({},b,{context:v}))})};y.displayName="TreeNode",y.defaultProps={title:t},y.isTreeNode=1;var g=We.a=y},Wtmd:function($e,We,z){$e.exports=z.p+"static/c.03ba6fd6.svg"},Wx9E:function($e,We,z){},XIdC:function($e,We,z){"use strict";var ae=z("rePB"),Z=z("ODXe"),U=z("Ff2n"),w=z("q1tI"),P=z.n(w),S=z("TSYQ"),C=z.n(S),T=z("6cGi"),l=z("4IlW"),p=w.forwardRef(function(h,d){var o,c=h.prefixCls,s=c===void 0?"rc-switch":c,f=h.className,i=h.checked,n=h.defaultChecked,t=h.disabled,u=h.loadingIcon,y=h.checkedChildren,g=h.unCheckedChildren,_=h.onClick,b=h.onChange,v=h.onKeyDown,m=Object(U.a)(h,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),E=Object(T.a)(!1,{value:i,defaultValue:n}),a=Object(Z.a)(E,2),x=a[0],O=a[1];function A(K,ne){var j=x;return t||(j=K,O(j),b==null||b(j,ne)),j}function D(K){K.which===l.a.LEFT?A(!1,K):K.which===l.a.RIGHT&&A(!0,K),v==null||v(K)}function I(K){var ne=A(!x,K);_==null||_(ne,K)}var F=C()(s,f,(o={},Object(ae.a)(o,"".concat(s,"-checked"),x),Object(ae.a)(o,"".concat(s,"-disabled"),t),o));return w.createElement("button",Object.assign({},m,{type:"button",role:"switch","aria-checked":x,disabled:t,className:F,ref:d,onKeyDown:D,onClick:I}),u,w.createElement("span",{className:"".concat(s,"-inner")},x?y:g))});p.displayName="Switch",We.a=p},Y1PL:function($e,We,z){"use strict";z.r(We),z.d(We,"ResizableTextArea",function(){return B});var ae=z("wx14"),Z=z("1OyB"),U=z("vuIU"),w=z("Ji7U"),P=z("LK+K"),S=z("q1tI"),C=z("VTBJ"),T=z("rePB"),l=z("Zm9Q"),p=z("Kwbf"),h=z("c+Xe"),d=z("m+aA"),o=z("bdgK"),c=new Map;function s(oe){oe.forEach(function(xe){var ye,Ae=xe.target;(ye=c.get(Ae))===null||ye===void 0||ye.forEach(function(pe){return pe(Ae)})})}var f=new o.default(s),i=null,n=null;function t(oe,xe){c.has(oe)||(c.set(oe,new Set),f.observe(oe)),c.get(oe).add(xe)}function u(oe,xe){c.has(oe)&&(c.get(oe).delete(xe),c.get(oe).size||(f.unobserve(oe),c.delete(oe)))}var y=function(oe){Object(w.a)(ye,oe);var xe=Object(P.a)(ye);function ye(){return Object(Z.a)(this,ye),xe.apply(this,arguments)}return Object(U.a)(ye,[{key:"render",value:function(){return this.props.children}}]),ye}(S.Component),g=S.createContext(null);function _(oe){var xe=oe.children,ye=oe.onBatchResize,Ae=S.useRef(0),pe=S.useRef([]),Oe=S.useContext(g),Fe=S.useCallback(function(Me,Ce,Le){Ae.current+=1;var de=Ae.current;pe.current.push({size:Me,element:Ce,data:Le}),Promise.resolve().then(function(){de===Ae.current&&(ye==null||ye(pe.current),pe.current=[])}),Oe==null||Oe(Me,Ce,Le)},[ye,Oe]);return S.createElement(g.Provider,{value:Fe},xe)}function b(oe){var xe=oe.children,ye=oe.disabled,Ae=S.useRef(null),pe=S.useRef(null),Oe=S.useContext(g),Fe=S.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Me=S.isValidElement(xe)&&Object(h.c)(xe),Ce=Me?xe.ref:null,Le=S.useMemo(function(){return Object(h.a)(Ce,Ae)},[Ce,Ae]),de=S.useRef(oe);de.current=oe;var ue=S.useCallback(function(ke){var Ue=de.current,Ye=Ue.onResize,ee=Ue.data,M=ke.getBoundingClientRect(),N=M.width,$=M.height,V=ke.offsetWidth,Y=ke.offsetHeight,me=Math.floor(N),Re=Math.floor($);if(Fe.current.width!==me||Fe.current.height!==Re||Fe.current.offsetWidth!==V||Fe.current.offsetHeight!==Y){var rt={width:me,height:Re,offsetWidth:V,offsetHeight:Y};Fe.current=rt;var Pe=V===Math.round(N)?N:V,Ie=Y===Math.round($)?$:Y,Xe=Object(C.a)(Object(C.a)({},rt),{},{offsetWidth:Pe,offsetHeight:Ie});Oe==null||Oe(Xe,ke,ee),Ye&&Promise.resolve().then(function(){Ye(Xe,ke)})}},[]);return S.useEffect(function(){var ke=Object(d.a)(Ae.current)||Object(d.a)(pe.current);return ke&&!ye&&t(ke,ue),function(){return u(ke,ue)}},[Ae.current,ye]),S.createElement(y,{ref:pe},Me?S.cloneElement(xe,{ref:Le}):xe)}var v="rc-observer-key";function m(oe){var xe=oe.children,ye=Object(l.a)(xe);return ye.map(function(Ae,pe){var Oe=(Ae==null?void 0:Ae.key)||"".concat(v,"-").concat(pe);return S.createElement(b,Object(ae.a)({},oe,{key:Oe}),Ae)})}m.Collection=_;var E=m,a=z("bT9E"),x=z("TSYQ"),O=z.n(x),A=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,D=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],I={},F;function K(oe){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(xe&&I[ye])return I[ye];var Ae=window.getComputedStyle(oe),pe=Ae.getPropertyValue("box-sizing")||Ae.getPropertyValue("-moz-box-sizing")||Ae.getPropertyValue("-webkit-box-sizing"),Oe=parseFloat(Ae.getPropertyValue("padding-bottom"))+parseFloat(Ae.getPropertyValue("padding-top")),Fe=parseFloat(Ae.getPropertyValue("border-bottom-width"))+parseFloat(Ae.getPropertyValue("border-top-width")),Me=D.map(function(Le){return"".concat(Le,":").concat(Ae.getPropertyValue(Le))}).join(";"),Ce={sizingStyle:Me,paddingSize:Oe,borderSize:Fe,boxSizing:pe};return xe&&ye&&(I[ye]=Ce),Ce}function ne(oe){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;F||(F=document.createElement("textarea"),F.setAttribute("tab-index","-1"),F.setAttribute("aria-hidden","true"),document.body.appendChild(F)),oe.getAttribute("wrap")?F.setAttribute("wrap",oe.getAttribute("wrap")):F.removeAttribute("wrap");var pe=K(oe,xe),Oe=pe.paddingSize,Fe=pe.borderSize,Me=pe.boxSizing,Ce=pe.sizingStyle;F.setAttribute("style","".concat(Ce,";").concat(A)),F.value=oe.value||oe.placeholder||"";var Le=Number.MIN_SAFE_INTEGER,de=Number.MAX_SAFE_INTEGER,ue=F.scrollHeight,ke;if(Me==="border-box"?ue+=Fe:Me==="content-box"&&(ue-=Oe),ye!==null||Ae!==null){F.value=" ";var Ue=F.scrollHeight-Oe;ye!==null&&(Le=Ue*ye,Me==="border-box"&&(Le=Le+Oe+Fe),ue=Math.max(Le,ue)),Ae!==null&&(de=Ue*Ae,Me==="border-box"&&(de=de+Oe+Fe),ke=ue>de?"":"hidden",ue=Math.min(de,ue))}return{height:ue,minHeight:Le,maxHeight:de,overflowY:ke,resize:"none"}}var j=z("Gytx"),G=z.n(j),X;(function(oe){oe[oe.NONE=0]="NONE",oe[oe.RESIZING=1]="RESIZING",oe[oe.RESIZED=2]="RESIZED"})(X||(X={}));var J=function(oe){Object(w.a)(ye,oe);var xe=Object(P.a)(ye);function ye(Ae){var pe;return Object(Z.a)(this,ye),pe=xe.call(this,Ae),pe.nextFrameActionId=void 0,pe.resizeFrameId=void 0,pe.textArea=void 0,pe.saveTextArea=function(Oe){pe.textArea=Oe},pe.handleResize=function(Oe){var Fe=pe.state.resizeStatus,Me=pe.props,Ce=Me.autoSize,Le=Me.onResize;if(Fe!==X.NONE)return;typeof Le=="function"&&Le(Oe),Ce&&pe.resizeOnNextFrame()},pe.resizeOnNextFrame=function(){cancelAnimationFrame(pe.nextFrameActionId),pe.nextFrameActionId=requestAnimationFrame(pe.resizeTextarea)},pe.resizeTextarea=function(){var Oe=pe.props.autoSize;if(!Oe||!pe.textArea)return;var Fe=Oe.minRows,Me=Oe.maxRows,Ce=ne(pe.textArea,!1,Fe,Me);pe.setState({textareaStyles:Ce,resizeStatus:X.RESIZING},function(){cancelAnimationFrame(pe.resizeFrameId),pe.resizeFrameId=requestAnimationFrame(function(){pe.setState({resizeStatus:X.RESIZED},function(){pe.resizeFrameId=requestAnimationFrame(function(){pe.setState({resizeStatus:X.NONE}),pe.fixFirefoxAutoScroll()})})})})},pe.renderTextArea=function(){var Oe=pe.props,Fe=Oe.prefixCls,Me=Fe===void 0?"rc-textarea":Fe,Ce=Oe.autoSize,Le=Oe.onResize,de=Oe.className,ue=Oe.disabled,ke=pe.state,Ue=ke.textareaStyles,Ye=ke.resizeStatus,ee=Object(a.a)(pe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),M=O()(Me,de,Object(T.a)({},"".concat(Me,"-disabled"),ue));"value"in ee&&(ee.value=ee.value||"");var N=Object(C.a)(Object(C.a)(Object(C.a)({},pe.props.style),Ue),Ye===X.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return S.createElement(E,{onResize:pe.handleResize,disabled:!(Ce||Le)},S.createElement("textarea",Object(ae.a)({},ee,{className:M,style:N,ref:pe.saveTextArea})))},pe.state={textareaStyles:{},resizeStatus:X.NONE},pe}return Object(U.a)(ye,[{key:"componentDidUpdate",value:function(pe){(pe.value!==this.props.value||!G()(pe.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var pe=this.textArea.selectionStart,Oe=this.textArea.selectionEnd;this.textArea.setSelectionRange(pe,Oe)}}catch(Fe){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ye}(S.Component),B=J,Q=function(oe){Object(w.a)(ye,oe);var xe=Object(P.a)(ye);function ye(Ae){var pe;Object(Z.a)(this,ye),pe=xe.call(this,Ae),pe.resizableTextArea=void 0,pe.focus=function(){pe.resizableTextArea.textArea.focus()},pe.saveTextArea=function(Fe){pe.resizableTextArea=Fe},pe.handleChange=function(Fe){var Me=pe.props.onChange;pe.setValue(Fe.target.value,function(){pe.resizableTextArea.resizeTextarea()}),Me&&Me(Fe)},pe.handleKeyDown=function(Fe){var Me=pe.props,Ce=Me.onPressEnter,Le=Me.onKeyDown;Fe.keyCode===13&&Ce&&Ce(Fe),Le&&Le(Fe)};var Oe=typeof Ae.value=="undefined"||Ae.value===null?Ae.defaultValue:Ae.value;return pe.state={value:Oe},pe}return Object(U.a)(ye,[{key:"setValue",value:function(pe,Oe){"value"in this.props||this.setState({value:pe},Oe)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return S.createElement(B,Object(ae.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(pe){return"value"in pe?{value:pe.value}:null}}]),ye}(S.Component),ie=We.default=Q},Z8dc:function($e,We,z){$e.exports={flex_box_center:"flex_box_center___3U5jH",flex_space_between:"flex_space_between___10tgP",flex_box_vertical_center:"flex_box_vertical_center___1e5pu",flex_box_center_end:"flex_box_center_end___WDBuM",flex_box_column:"flex_box_column___3TSEG",listForm:"listForm___264Pu",scroll:"scroll___CK9uS",formWrap:"formWrap___2n6e2",btns:"btns___2wuct",main:"main___1WFqr",mainLoading:"mainLoading___1kJWi",tip:"tip___10JaH",proWarp:"proWarp___TMP84",pro:"pro___1CLLm",mainSucceed:"mainSucceed___3NYgf",del:"del___34rdE"}},ZD9Y:function($e,We,z){"use strict";var ae=z("BoS7"),Z=z("Sdc0"),U=z("OaEy"),w=z("2fM7"),P=z("q1tI"),S=z.n(P),C=z("lOMy"),T=z.n(C),l=w.a.Option;We.a=function(p){var h=p.onFontSizeChange,d=p.cmFontSize,o=p.cmCodeMode,c=p.onCodeModeChange,s=p.onTabToSpace,f=p.className,i=f===void 0?"":f,n=p.tabToSpace,t=p.children;return S.a.createElement("div",{className:"tpi-code-setting ".concat(i)},S.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),S.a.createElement("section",null,S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),S.a.createElement(w.a,{bordered:!1,size:"small",value:o,onChange:c},S.a.createElement(l,{value:"vs"},"\u767D\u8272\u80CC\u666F"),S.a.createElement(l,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),S.a.createElement(w.a,{bordered:!1,size:"small",value:d,onChange:h},S.a.createElement(l,{value:12},"12px"),S.a.createElement(l,{value:14},"14px"),S.a.createElement(l,{value:16},"16px"),S.a.createElement(l,{value:18},"18px"),S.a.createElement(l,{value:20},"20px"),S.a.createElement(l,{value:22},"22px"))),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"Tab\u8F6C\u6362"),S.a.createElement(Z.a,{checked:n,onChange:s}))),S.a.createElement("h3",null,"\u5FEB\u6377\u952E"),S.a.createElement("section",null,S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),S.a.createElement("span",null,"Ctrl + S")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),S.a.createElement("span",null,"F1 / Alt + F1")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),S.a.createElement("span",null,"Ctrl + ]/[")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),S.a.createElement("span",null,"Ctrl + Shift + \\")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),S.a.createElement("span",null,"Home")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),S.a.createElement("span",null,"End"))),t)}},ZW9T:function($e,We,z){"use strict";z.d(We,"a",function(){return y});var ae=z("k1fw"),Z=z("miYZ"),U=z("tsqr"),w=z("rAM+"),P=z("tJVT"),S=z("PpiC"),C=z("q1tI"),T=z.n(C),l=z("bdgK");function p(g,_,b,v,m){var E=_.getWordUntilPosition(b),a={startLineNumber:b.lineNumber,endLineNumber:b.lineNumber,startColumn:E.startColumn,endColumn:E.endColumn},x=v.map(function(O){return{label:O,kind:g.languages.CompletionItemKind.Keyword,insertText:O,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:a}});return m.map(function(O){x.push(Object(ae.a)(Object(ae.a)({},O),{},{range:a}))}),x}var h=function(g){var _={label:"ifelse",kind:g.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet},b=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];g.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(a,x){var O=p(g,a,x,b,[_]);return{suggestions:O}}});var v=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];g.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(a,x){var O=[{label:"print",kind:g.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet}],A=p(g,a,x,v,O);return{suggestions:A}}});var m=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];g.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(a,x){var O=[_,{label:"main",kind:g.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:g.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet}],A=p(g,a,x,m,O);return{suggestions:A}}})},d="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",o=z("LvDl");function c(g){return/^\d+$/.test(g)?"".concat(g,"px"):g}function s(){}var f=!1,i={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function n(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=g;if(Array.isArray(g)){for(var b=0;b<g.length;b++){var v=i[g[b]];if(v)return v}return _[0]}return i[_]||_}var t=null,u=We.b=function(g){var _=g.width,b=_===void 0?"100%":_,v=g.height,m=v===void 0?"100%":v,E=g.value,a=g.language,x=a===void 0?"javascript":a,O=g.style,A=O===void 0?{}:O,D=g.options,I=D===void 0?{}:D,F=g.overrideServices,K=F===void 0?{}:F,ne=g.theme,j=ne===void 0?"vs-dark":ne,G=g.onEditBlur,X=g.onSave,J=g.autoHeight,B=J===void 0?!1:J,Q=g.forbidCopy,ie=Q===void 0?!1:Q,oe=g.onChange,xe=oe===void 0?s:oe,ye=g.editorDidMount,Ae=ye===void 0?s:ye,pe=g.onFocus,Oe=pe===void 0?s:pe,Fe=g.filename,Me=Fe===void 0?"educoder.txt":Fe,Ce=Object(S.a)(g,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Le=Object(C.useRef)(),de=Object(C.useRef)({}),ue=Object(C.useRef)(),ke=Object(C.useRef)(!1),Ue=Object(C.useRef)(),Ye=Object(C.useState)(!1),ee=Object(P.a)(Ye,2),M=ee[0],N=ee[1];function $(){var Ee;return Le.current&&(Ee=new l.default(function(be){var Ge=Object(w.a)(be),qe;try{for(Ge.s();!(qe=Ge.n()).done;){var pt=qe.value;(pt.target.offsetHeight>0||pt.target.offsetWidth>0)&&de.current.instance.layout()}}catch(Pt){Ge.e(Pt)}finally{Ge.f()}}),Ee.observe(Le.current)),Ee}function V(){U.b.warn(decodeURIComponent(d))}var Y=function(){var be=de.current.instance;if(E!=null&&be&&M){var Ge=be.getModel();Ge&&E!==Ge.getValue()&&(f=!0,Ge.setValue(E),be.layout(),f=!1)}};Object(C.useEffect)(function(){ue.current&&clearTimeout(ue.current),ue.current=setTimeout(function(){Y()},500)},[E,M,de.current]);function me(){var Ee=de.current.instance;if(Ee){var be=Ee.getSelection(),Ge=de.current.pastePos||{},qe=new t.Range(Ge.startLineNumber||be.endLineNumber,Ge.startColumn||be.endColumn,Ge.endLineNumber||be.endLineNumber,Ge.endColumn||be.endColumn);setTimeout(function(){Ee.executeEdits("",[{range:qe,text:""}])},300)}}function Re(Ee){(window.navigator.platform.match("Mac")?Ee.metaKey:Ee.ctrlKey)&&Ee.keyCode==83&&(Ee.preventDefault(),X())}var rt=function(){if(B&&de.current.instance){var be=de.current.instance.getContentHeight();he(be<m?m:be)}else he(m)};function Pe(Ee){var be=document.createEvent("MouseEvents");be.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Ee.dispatchEvent(be)}function Ie(Ee,be){var Ge=window.URL||window.webkitURL||window,qe=new Blob([be]),pt=document.createElementNS("http://www.w3.org/1999/xhtml","a");pt.href=Ge.createObjectURL(qe),pt.download=Ee,Pe(pt)}Object(C.useEffect)(function(){rt()},[rt]),Object(C.useEffect)(function(){Le.current&&!M&&z.e(26).then(z.t.bind(null,"M/lh",7)).then(function(Ee){try{t=Ee,de.current.instance=t.editor.create(Le.current,{value:E,language:n(x),theme:j,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},K);var be=de.current.instance;if(Ae(be,t),setTimeout(function(){rt(),de.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ie(Me||"educoder.txt",be.getValue())}})},500),de.current.subscription=be.onDidChangeModelContent(function(qe){ke.current?clearTimeout(Ue.current):(rt(),xe(be.getValue(),qe)),Ue.current=setTimeout(function(){ke.current=!1},500)}),window.Monaco||h(t),ie&&(be.addCommand(t.KeyMod.CtrlCmd|t.KeyMod.Shift|t.KeyCode.KEY_V,function(){return V(),null}),be.addCommand(t.KeyMod.CtrlCmd|t.KeyCode.KEY_C,function(){return V(),null})),window.Monaco=t,G&&be.onDidBlurEditorWidget(function(){G(be.getValue())}),Oe&&be.onDidFocusEditorText(function(){Oe(be.getValue())}),ie){be.addCommand(t.KeyMod.CtrlCmd|t.KeyCode.KEY_V,function(){return V(),null}),be.onDidPaste(function(qe){de.current.pastePos=qe});try{window.addEventListener("paste",me)}catch(qe){}}var Ge=$();return N(!0),function(){var qe=de.current.instance;qe.dispose();var pt=qe.getModel();pt&&pt.dispose(),de.current.subscription&&de.current.subscription.dispose(),ie&&window.removeEventListener("paste",me),Ge.unobserve(Le.current)}}catch(qe){}})},[]),Object(C.useEffect)(function(){var Ee=de.current.instance;if(Ee&&M)return document.addEventListener("keydown",Re,!1),function(){document.removeEventListener("keydown",Re)}},[X,M]),Object(C.useEffect)(function(){var Ee=de.current.instance;if(Ee&&M){var be=n(x);t.editor.setModelLanguage(Ee.getModel(),be),console.log("language:",x,Ee.getModel(),be)}},[x,M]),Object(C.useEffect)(function(){var Ee=de.current.instance;Ee&&M&&t.editor.setTheme(j)},[j,M]),Object(C.useEffect)(function(){var Ee=de.current.instance;Ee&&M&&(Ee.updateOptions(Object(ae.a)({},I)),setTimeout(function(){Ee.getModel().updateOptions(Object(ae.a)({},I))},200))},[JSON.stringify(I),M]),Object(C.useEffect)(function(){var Ee=de.current.instance;Ee&&M&&Ee.layout()},[b,m,M]);var Xe=Object(C.useState)(c(b)),tt=Object(P.a)(Xe,2),Ve=tt[0],Ke=tt[1],Ne=Object(C.useState)(c(m)),De=Object(P.a)(Ne,2),_e=De[0],he=De[1],ve=Object(ae.a)(Object(ae.a)({},A),{},{width:Ve,height:_e});return T.a.createElement("div",{className:"my-monaco-editor",ref:Le,style:ve})};function y(g){var _=g.width,b=_===void 0?"100%":_,v=g.height,m=v===void 0?"100%":v,E=g.original,a=g.modified,x=g.language,O=g.options,A=O===void 0?{}:O,D=Object(C.useRef)(),I=Object(C.useState)(null),F=Object(P.a)(I,2),K=F[0],ne=F[1];function j(B){var Q;return D.current&&(Q=new l.default(function(ie){var oe=Object(w.a)(ie),xe;try{for(oe.s();!(xe=oe.n()).done;){var ye=xe.value;(ye.target.offsetHeight>0||ye.target.offsetWidth>0)&&B.layout()}}catch(Ae){oe.e(Ae)}finally{oe.f()}}),Q.observe(D.current)),Q}Object(C.useEffect)(function(){D.current&&z.e(26).then(z.t.bind(null,"M/lh",7)).then(function(B){t=B;var Q=t.editor.createDiffEditor(D.current,Object(ae.a)(Object(ae.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},A),{},{wordWrap:!0}));ne(Q);var ie=j(Q);return function(){Q.dispose();var oe=Q.getModel();oe&&oe.dispose(),ie.unobserve(D.current)}})},[]),Object(C.useEffect)(function(){K&&K.setModel({original:t.editor.createModel(E,x),modified:t.editor.createModel(a,x)})},[E,a,x,K]);var G=c(b),X=c(m),J={width:G,height:X};return T.a.createElement("div",{className:"my-diff-editor",ref:D,style:J})}},ZpRC:function($e,We,z){"use strict";function ae(h){return typeof h=="object"&&h!=null&&h.nodeType===1}function Z(h,d){return(!d||h!=="hidden")&&h!=="visible"&&h!=="clip"}function U(h,d){if(h.clientHeight<h.scrollHeight||h.clientWidth<h.scrollWidth){var o=getComputedStyle(h,null);return Z(o.overflowY,d)||Z(o.overflowX,d)||function(c){var s=function(f){if(!f.ownerDocument||!f.ownerDocument.defaultView)return null;try{return f.ownerDocument.defaultView.frameElement}catch(i){return null}}(c);return!!s&&(s.clientHeight<c.scrollHeight||s.clientWidth<c.scrollWidth)}(h)}return!1}function w(h,d,o,c,s,f,i,n){return f<h&&i>d||f>h&&i<d?0:f<=h&&n<=o||i>=d&&n>=o?f-h-c:i>d&&n<o||f<h&&n>o?i-d+s:0}var P=function(h,d){var o=window,c=d.scrollMode,s=d.block,f=d.inline,i=d.boundary,n=d.skipOverflowHiddenElements,t=typeof i=="function"?i:function(Ue){return Ue!==i};if(!ae(h))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,y=[],g=h;ae(g)&&t(g);){if((g=g.parentElement)===u){y.push(g);break}g!=null&&g===document.body&&U(g)&&!U(document.documentElement)||g!=null&&U(g,n)&&y.push(g)}for(var _=o.visualViewport?o.visualViewport.width:innerWidth,b=o.visualViewport?o.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,m=window.scrollY||pageYOffset,E=h.getBoundingClientRect(),a=E.height,x=E.width,O=E.top,A=E.right,D=E.bottom,I=E.left,F=s==="start"||s==="nearest"?O:s==="end"?D:O+a/2,K=f==="center"?I+x/2:f==="end"?A:I,ne=[],j=0;j<y.length;j++){var G=y[j],X=G.getBoundingClientRect(),J=X.height,B=X.width,Q=X.top,ie=X.right,oe=X.bottom,xe=X.left;if(c==="if-needed"&&O>=0&&I>=0&&D<=b&&A<=_&&O>=Q&&D<=oe&&I>=xe&&A<=ie)return ne;var ye=getComputedStyle(G),Ae=parseInt(ye.borderLeftWidth,10),pe=parseInt(ye.borderTopWidth,10),Oe=parseInt(ye.borderRightWidth,10),Fe=parseInt(ye.borderBottomWidth,10),Me=0,Ce=0,Le="offsetWidth"in G?G.offsetWidth-G.clientWidth-Ae-Oe:0,de="offsetHeight"in G?G.offsetHeight-G.clientHeight-pe-Fe:0;if(u===G)Me=s==="start"?F:s==="end"?F-b:s==="nearest"?w(m,m+b,b,pe,Fe,m+F,m+F+a,a):F-b/2,Ce=f==="start"?K:f==="center"?K-_/2:f==="end"?K-_:w(v,v+_,_,Ae,Oe,v+K,v+K+x,x),Me=Math.max(0,Me+m),Ce=Math.max(0,Ce+v);else{Me=s==="start"?F-Q-pe:s==="end"?F-oe+Fe+de:s==="nearest"?w(Q,oe,J,pe,Fe+de,F,F+a,a):F-(Q+J/2)+de/2,Ce=f==="start"?K-xe-Ae:f==="center"?K-(xe+B/2)+Le/2:f==="end"?K-ie+Oe+Le:w(xe,ie,B,Ae,Oe+Le,K,K+x,x);var ue=G.scrollLeft,ke=G.scrollTop;F+=ke-(Me=Math.max(0,Math.min(ke+Me,G.scrollHeight-J+de))),K+=ue-(Ce=Math.max(0,Math.min(ue+Ce,G.scrollWidth-B+Le)))}ne.push({el:G,top:Me,left:Ce})}return ne};function S(h){return h===Object(h)&&Object.keys(h).length!==0}function C(h,d){d===void 0&&(d="auto");var o="scrollBehavior"in document.body.style;h.forEach(function(c){var s=c.el,f=c.top,i=c.left;s.scroll&&o?s.scroll({top:f,left:i,behavior:d}):(s.scrollTop=f,s.scrollLeft=i)})}function T(h){return h===!1?{block:"end",inline:"nearest"}:S(h)?h:{block:"start",inline:"nearest"}}function l(h,d){var o=!h.ownerDocument.documentElement.contains(h);if(S(d)&&typeof d.behavior=="function")return d.behavior(o?[]:P(h,d));if(o)return;var c=T(d);return C(P(h,c),c.behavior)}var p=We.a=l},ZsLC:function($e,We,z){$e.exports={"left-panel":"left-panel___FTwwW","tab-panel-body":"tab-panel-body___2YSOx",b1:"b1___3qx3o","oj-mr":"oj-mr___1GA9N","oj-width-input":"oj-width-input___3GkyP","s-navs":"s-navs___1fGGf","bg-white":"bg-white___1ZAy0",active:"active___39N6D"}},bCnd:function($e,We,z){"use strict";z.d(We,"b",function(){return w}),z.d(We,"a",function(){return P});var ae=z("je13"),Z=z.n(ae),U=!1;function w(S,C){var T=Z.a.get("__ec");T||(T={}),T[S]=C,Z.a.set("__ec",T)}function P(S,C){var T=Z.a.get("__ec");return T?T[S]===void 0?C:T[S]:C}},bT9E:function($e,We,z){"use strict";z.d(We,"a",function(){return Z});var ae=z("VTBJ");function Z(U,w){var P=Object(ae.a)({},U);return Array.isArray(w)&&w.forEach(function(S){delete P[S]}),P}},bdLU:function($e,We,z){"use strict";z.d(We,"a",function(){return ae});var ae;(function(Z){Z[Z.NOMATCH=-1]="NOMATCH",Z[Z.OK=0]="OK",Z[Z.TIMEOUT=2]="TIMEOUT",Z[Z.PODFAILURE=3]="PODFAILURE",Z[Z.COMPILEFAILURE=4]="COMPILEFAILURE",Z[Z.EXECUTEFAILURE=5]="EXECUTEFAILURE"})(ae||(ae={}))},biw7:function($e,We,z){"use strict";var ae=z("q1tI"),Z=z.n(ae),U=ae.createContext(null);We.a=U},c5Ni:function($e,We,z){},cDPC:function($e,We,z){"use strict";var ae=z("tJVT"),Z=z("q1tI"),U=z.n(Z),w=z("i3hx"),P=z.n(w);We.a=function(S){var C=S.defaultX,T=C===void 0?"40%":C,l=S.leftChild,p=S.rightChild,h=S.className,d=S.hideResize,o=d===void 0?!1:d,c=Object(Z.useState)(T),s=Object(ae.a)(c,2),f=s[0],i=s[1],n=Object(Z.useRef)();function t(){n.current=!0}Object(Z.useEffect)(function(){function g(b){n.current&&i(b.pageX)}function _(){n.current=!1}return window.addEventListener("mousemove",g),window.addEventListener("mouseup",_),function(){window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",_)}},[]);var u=typeof f=="number"&&f!==.01?"".concat(f,"px"):T,y="calc(100% - ".concat(o?"0px":"4px"," - ").concat(u,")");return U.a.createElement("div",{className:"split-panel-container ".concat(h)},U.a.createElement("section",{style:{width:u,display:f===.01?"none":""}},l),U.a.createElement("section",{className:"resize-x-bar",onMouseDown:t},U.a.createElement("a",{className:"btn-resize"},U.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},U.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),U.a.createElement("section",{style:{width:y}},p))}},dejd:function($e,We,z){},dmUQ:function($e,We,z){"use strict";var ae=z("Ff2n"),Z=z("rePB"),U=z("1OyB"),w=z("vuIU"),P=z("Ji7U"),S=z("md7G"),C=z("foSv"),T=z("q1tI"),l=z.n(T),p=z("TSYQ"),h=z.n(p),d=z("4IlW");function o(a,x){var O=Object.keys(a);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(a);x&&(A=A.filter(function(D){return Object.getOwnPropertyDescriptor(a,D).enumerable})),O.push.apply(O,A)}return O}function c(a){for(var x=1;x<arguments.length;x++){var O=arguments[x]!=null?arguments[x]:{};x%2?o(Object(O),!0).forEach(function(A){Object(Z.a)(a,A,O[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(O)):o(Object(O)).forEach(function(A){Object.defineProperty(a,A,Object.getOwnPropertyDescriptor(O,A))})}return a}function s(a){var x=f();return function(){var A=Object(C.a)(a),D;if(x){var I=Object(C.a)(this).constructor;D=Reflect.construct(A,arguments,I)}else D=A.apply(this,arguments);return Object(S.a)(this,D)}}function f(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}function i(){}function n(a){a.preventDefault()}var t=function(x){return x.replace(/[^\w.-]+/g,"")},u=200,y=600,g=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,_=function(x){return x!=null},b=function(x,O){return O===x||typeof O=="number"&&typeof x=="number"&&isNaN(O)&&isNaN(x)},v=function(a){Object(P.a)(O,a);var x=s(O);function O(A){var D;Object(U.a)(this,O),D=x.call(this,A),D.onKeyDown=function(K){var ne=D.props,j=ne.onKeyDown,G=ne.onPressEnter;if(K.keyCode===d.a.UP){var X=D.getRatio(K);D.up(K,X,null),D.stop()}else if(K.keyCode===d.a.DOWN){var J=D.getRatio(K);D.down(K,J,null),D.stop()}else K.keyCode===d.a.ENTER&&G&&G(K);if(D.recordCursorPosition(),D.lastKeyCode=K.keyCode,j){for(var B=arguments.length,Q=new Array(B>1?B-1:0),ie=1;ie<B;ie++)Q[ie-1]=arguments[ie];j.apply(void 0,[K].concat(Q))}},D.onKeyUp=function(K){var ne=D.props.onKeyUp;if(D.stop(),D.recordCursorPosition(),ne){for(var j=arguments.length,G=new Array(j>1?j-1:0),X=1;X<j;X++)G[X-1]=arguments[X];ne.apply(void 0,[K].concat(G))}},D.onChange=function(K){var ne=D.props.onChange;D.state.focused&&(D.inputting=!0),D.rawInput=D.props.parser(D.getValueFromEvent(K)),D.setState({inputValue:D.rawInput}),ne(D.toNumber(D.rawInput))},D.onMouseUp=function(){var K=D.props.onMouseUp;D.recordCursorPosition(),K&&K.apply(void 0,arguments)},D.onFocus=function(){var K;D.setState({focused:!0}),(K=D.props).onFocus.apply(K,arguments)},D.onBlur=function(){var K=D.props.onBlur;D.inputting=!1,D.setState({focused:!1});var ne=D.getCurrentValidValue(D.state.inputValue),j=D.setValue(ne,i);if(K){var G=D.input.value,X=D.getInputDisplayValue({focus:!1,value:j});D.input.value=X&&Number(X),K.apply(void 0,arguments),D.input.value=G}},D.getRatio=function(K){var ne=1;return K.metaKey||K.ctrlKey?ne=.1:K.shiftKey&&(ne=10),ne},D.getFullNum=function(K){return isNaN(K)?K:/e/i.test(String(K))?Number(K).toFixed(18).replace(/\.?0+$/,""):K},D.getPrecision=function(K){if(_(D.props.precision))return D.props.precision;var ne=String(K);if(ne.indexOf("e-")>=0)return parseInt(ne.slice(ne.indexOf("e-")+2),10);var j=0;return ne.indexOf(".")>=0&&(j=ne.length-ne.indexOf(".")-1),j},D.getInputDisplayValue=function(K){var ne=K||D.state,j=ne.focused,G=ne.inputValue,X=ne.value,J;j?J=G:J=D.toPrecisionAsStep(X),J==null&&(J="");var B=D.formatWrapper(J);return _(D.props.decimalSeparator)&&(B=B.toString().replace(".",D.props.decimalSeparator)),B},D.recordCursorPosition=function(){try{D.cursorStart=D.input.selectionStart,D.cursorEnd=D.input.selectionEnd,D.currentValue=D.input.value,D.cursorBefore=D.input.value.substring(0,D.cursorStart),D.cursorAfter=D.input.value.substring(D.cursorEnd)}catch(K){}},D.restoreByAfter=function(K){if(K===void 0)return!1;var ne=D.input.value,j=ne.lastIndexOf(K);if(j===-1)return!1;var G=D.cursorBefore.length;return D.lastKeyCode===d.a.DELETE&&D.cursorBefore.charAt(G-1)===K[0]?(D.fixCaret(G,G),!0):j+K.length===ne.length?(D.fixCaret(j,j),!0):!1},D.partRestoreByAfter=function(K){return K===void 0?!1:Array.prototype.some.call(K,function(ne,j){var G=K.substring(j);return D.restoreByAfter(G)})},D.isNotCompleteNumber=function(K){return isNaN(K)||K===""||K===null||K&&K.toString().indexOf(".")===K.toString().length-1},D.stop=function(){D.autoStepTimer&&clearTimeout(D.autoStepTimer)},D.down=function(K,ne,j){D.pressingUpOrDown=!0,D.step("down",K,ne,j)},D.up=function(K,ne,j){D.pressingUpOrDown=!0,D.step("up",K,ne,j)},D.saveInput=function(K){D.input=K};var I=A.value;I===void 0&&(I=A.defaultValue),D.state={focused:A.autoFocus};var F=D.getValidValue(D.toNumber(I));return D.state=c(c({},D.state),{},{inputValue:D.toPrecisionAsStep(F),value:F}),D}return Object(w.a)(O,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(D){var I=this.props,F=I.value,K=I.onChange,ne=I.max,j=I.min,G=this.state.focused;if(D){if(!b(D.value,F)||!b(D.max,ne)||!b(D.min,j)){var X=G?F:this.getValidValue(F),J;this.pressingUpOrDown?J=X:this.inputting?J=this.rawInput:J=this.toPrecisionAsStep(X),this.setState({value:X,inputValue:J})}var B="value"in this.props?F:this.state.value;"max"in this.props&&D.max!==ne&&typeof B=="number"&&B>ne&&K&&K(ne),"min"in this.props&&D.min!==j&&typeof B=="number"&&B<j&&K&&K(j)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Q=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===d.a.BACKSPACE?Q=this.cursorStart-1:this.lastKeyCode===d.a.DELETE&&(Q=this.cursorStart):Q=this.input.value.length,this.fixCaret(Q,Q)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case d.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case d.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(ie){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(D){var I=D;return I===""?I="":this.isNotCompleteNumber(parseFloat(I))?I=this.state.value:I=this.getValidValue(I),this.toNumber(I)}},{key:"getValueFromEvent",value:function(D){var I=D.target.value.trim().replace(/。/g,".");return _(this.props.decimalSeparator)&&(I=I.replace(this.props.decimalSeparator,".")),I}},{key:"getValidValue",value:function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,K=parseFloat(D);return isNaN(K)?D:(K<I&&(K=I),K>F&&(K=F),K)}},{key:"setValue",value:function(D,I){var F=this.props.precision,K=this.isNotCompleteNumber(parseFloat(D))?null:parseFloat(D),ne=this.state.value,j=ne===void 0?null:ne,G=this.state.inputValue,X=G===void 0?null:G,J=typeof K=="number"?K.toFixed(F):"".concat(K),B=K!==j||J!=="".concat(X);return"value"in this.props?(X=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:X},I)):this.setState({value:K,inputValue:this.toPrecisionAsStep(D)},I),B&&this.props.onChange(K),K}},{key:"getMaxPrecision",value:function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.props,K=F.precision,ne=F.step;if(_(K))return K;var j=this.getPrecision(I),G=this.getPrecision(ne),X=this.getPrecision(D);return D?Math.max(X,j+G):j+G}},{key:"getPrecisionFactor",value:function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.getMaxPrecision(D,I);return Math.pow(10,F)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(D){return this.props.formatter?this.props.formatter(D):D}},{key:"toPrecisionAsStep",value:function(D){if(this.isNotCompleteNumber(D)||D==="")return D;var I=Math.abs(this.getMaxPrecision(D));return isNaN(I)?D.toString():Number(D).toFixed(I)}},{key:"toNumber",value:function(D){var I=this.props.precision,F=this.state.focused,K=D&&D.length>16&&F;return this.isNotCompleteNumber(D)||K?D:_(I)?Math.round(D*Math.pow(10,I))/Math.pow(10,I):Number(D)}},{key:"upStep",value:function(D,I){var F=this.props.step,K=this.getPrecisionFactor(D,I),ne=Math.abs(this.getMaxPrecision(D,I)),j=((K*D+K*F*I)/K).toFixed(ne);return this.toNumber(j)}},{key:"downStep",value:function(D,I){var F=this.props.step,K=this.getPrecisionFactor(D,I),ne=Math.abs(this.getMaxPrecision(D,I)),j=((K*D-K*F*I)/K).toFixed(ne);return this.toNumber(j)}},{key:"step",value:function(D,I){var F=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,ne=arguments.length>3?arguments[3]:void 0;this.stop(),I&&(I.persist(),I.preventDefault());var j=this.props;if(j.disabled)return;var G=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(G))return;var X=this["".concat(D,"Step")](G,K),J=X>j.max||X<j.min;if(X>j.max?X=j.max:X<j.min&&(X=j.min),this.setValue(X,null),this.setState({focused:!0},function(){F.pressingUpOrDown=!1}),J)return;this.autoStepTimer=setTimeout(function(){F[D](I,K,!0)},ne?u:y)}},{key:"fixCaret",value:function(D,I){if(D===void 0||I===void 0||!this.input||!this.input.value)return;try{var F=this.input.selectionStart,K=this.input.selectionEnd;(D!==F||I!==K)&&this.input.setSelectionRange(D,I)}catch(ne){}}},{key:"render",value:function(){var D,I=this.props,F=I.prefixCls,K=I.disabled,ne=I.readOnly,j=I.useTouch,G=I.autoComplete,X=I.upHandler,J=I.downHandler,B=I.className,Q=I.max,ie=I.min,oe=I.style,xe=I.title,ye=I.onMouseEnter,Ae=I.onMouseLeave,pe=I.onMouseOver,Oe=I.onMouseOut,Fe=I.required,Me=I.onClick,Ce=I.tabIndex,Le=I.type,de=I.placeholder,ue=I.id,ke=I.inputMode,Ue=I.pattern,Ye=I.step,ee=I.maxLength,M=I.autoFocus,N=I.name,$=I.onPaste,V=I.onInput,Y=Object(ae.a)(I,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),me=this.state,Re=me.value,rt=me.focused,Pe=h()(F,(D={},Object(Z.a)(D,B,!!B),Object(Z.a)(D,"".concat(F,"-disabled"),K),Object(Z.a)(D,"".concat(F,"-focused"),rt),D)),Ie={};Object.keys(Y).forEach(function(be){(be.substr(0,5)==="data-"||be.substr(0,5)==="aria-"||be==="role")&&(Ie[be]=Y[be])});var Xe=!ne&&!K,tt=this.getInputDisplayValue(null),Ve=(Re||Re===0)&&(isNaN(Re)||Number(Re)>=Q),Ke=(Re||Re===0)&&(isNaN(Re)||Number(Re)<=ie),Ne=Ve||K||ne,De=Ke||K||ne,_e=h()("".concat(F,"-handler"),"".concat(F,"-handler-up"),Object(Z.a)({},"".concat(F,"-handler-up-disabled"),Ne)),he=h()("".concat(F,"-handler"),"".concat(F,"-handler-down"),Object(Z.a)({},"".concat(F,"-handler-down-disabled"),De)),ve=j?{onTouchStart:Ne?i:this.up,onTouchEnd:this.stop}:{onMouseDown:Ne?i:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ee=j?{onTouchStart:De?i:this.down,onTouchEnd:this.stop}:{onMouseDown:De?i:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return l.a.createElement("div",{className:Pe,style:oe,title:xe,onMouseEnter:ye,onMouseLeave:Ae,onMouseOver:pe,onMouseOut:Oe,onFocus:function(){return null},onBlur:function(){return null}},l.a.createElement("div",{className:"".concat(F,"-handler-wrap")},l.a.createElement("span",Object.assign({unselectable:"on"},ve,{role:"button","aria-label":"Increase Value","aria-disabled":Ne,className:_e}),X||l.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-up-inner"),onClick:n})),l.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Decrease Value","aria-disabled":De,className:he}),J||l.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-down-inner"),onClick:n}))),l.a.createElement("div",{className:"".concat(F,"-input-wrap")},l.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ie,"aria-valuemax":Q,"aria-valuenow":Re,required:Fe,type:Le,placeholder:de,onPaste:$,onClick:Me,onMouseUp:this.onMouseUp,className:"".concat(F,"-input"),tabIndex:Ce,autoComplete:G,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Xe?this.onKeyDown:i,onKeyUp:Xe?this.onKeyUp:i,autoFocus:M,maxLength:ee,readOnly:ne,disabled:K,max:Q,min:ie,step:Ye,name:N,title:xe,id:ue,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(tt),pattern:Ue,inputMode:ke,onInput:V},Ie))))}}]),O}(l.a.Component);v.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:g,min:-g,step:1,style:{},onChange:i,onKeyDown:i,onPressEnter:i,onFocus:i,onBlur:i,parser:t,required:!1,autoComplete:"off"};var m=v,E=We.a=m},fcSX:function($e,We,z){"use strict";var ae=z("Ff2n"),Z=z("1OyB"),U=z("vuIU"),w=z("Ji7U"),P=z("md7G"),S=z("foSv"),C=z("1W/9"),T=z("q1tI"),l=z("rePB"),p=z("JX7q"),h=z("TSYQ"),d=z.n(h),o=z("qx4F"),c=z("4IlW");function s(K){return Array.isArray(K)?K:[K]}var f={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},i=Object.keys(f).filter(function(K){if(typeof document=="undefined")return!1;var ne=document.getElementsByTagName("html")[0];return K in(ne?ne.style:{})})[0],n=f[i];function t(K,ne,j,G){K.addEventListener?K.addEventListener(ne,j,G):K.attachEvent&&K.attachEvent("on".concat(ne),j)}function u(K,ne,j,G){K.removeEventListener?K.removeEventListener(ne,j,G):K.attachEvent&&K.detachEvent("on".concat(ne),j)}function y(K,ne){var j=typeof K=="function"?K(ne):K;return Array.isArray(j)?j.length===2?j:[j[0],j[1]]:[j]}var g=function(ne){return!isNaN(parseFloat(ne))&&isFinite(ne)},_=!(typeof window!="undefined"&&window.document&&window.document.createElement),b=function K(ne,j,G,X){if(!j||j===document||j instanceof Document)return!1;if(j===ne.parentNode)return!0;var J=Math.max(Math.abs(G),Math.abs(X))===Math.abs(X),B=Math.max(Math.abs(G),Math.abs(X))===Math.abs(G),Q=j.scrollHeight-j.clientHeight,ie=j.scrollWidth-j.clientWidth,oe=document.defaultView.getComputedStyle(j),xe=oe.overflowY==="auto"||oe.overflowY==="scroll",ye=oe.overflowX==="auto"||oe.overflowX==="scroll",Ae=Q&&xe,pe=ie&&ye;return J&&(!Ae||Ae&&(j.scrollTop>=Q&&X<0||j.scrollTop<=0&&X>0))||B&&(!pe||pe&&(j.scrollLeft>=ie&&G<0||j.scrollLeft<=0&&G>0))?K(ne,j.parentNode,G,X):!1};function v(K){var ne=m();return function(){var G=Object(S.a)(K),X;if(ne){var J=Object(S.a)(this).constructor;X=Reflect.construct(G,arguments,J)}else X=G.apply(this,arguments);return Object(P.a)(this,X)}}function m(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(K){return!1}}var E={},a=function(K){Object(w.a)(j,K);var ne=v(j);function j(G){var X;return Object(Z.a)(this,j),X=ne.call(this,G),X.domFocus=function(){X.dom&&X.dom.focus()},X.removeStartHandler=function(J){if(J.touches.length>1)return;X.startPos={x:J.touches[0].clientX,y:J.touches[0].clientY}},X.removeMoveHandler=function(J){if(J.changedTouches.length>1)return;var B=J.currentTarget,Q=J.changedTouches[0].clientX-X.startPos.x,ie=J.changedTouches[0].clientY-X.startPos.y;(B===X.maskDom||B===X.handlerDom||B===X.contentDom&&b(B,J.target,Q,ie))&&J.cancelable&&J.preventDefault()},X.transitionEnd=function(J){var B=J.target;u(B,n,X.transitionEnd),B.style.transition=""},X.onKeyDown=function(J){if(J.keyCode===c.a.ESC){var B=X.props.onClose;J.stopPropagation(),B&&B(J)}},X.onWrapperTransitionEnd=function(J){var B=X.props,Q=B.open,ie=B.afterVisibleChange;J.target===X.contentWrapper&&J.propertyName.match(/transform$/)&&(X.dom.style.transition="",!Q&&X.getCurrentDrawerSome()&&(document.body.style.overflowX="",X.maskDom&&(X.maskDom.style.left="",X.maskDom.style.width="")),ie&&ie(!!Q))},X.openLevelTransition=function(){var J=X.props,B=J.open,Q=J.width,ie=J.height,oe=X.getHorizontalBoolAndPlacementName(),xe=oe.isHorizontal,ye=oe.placementName,Ae=X.contentDom?X.contentDom.getBoundingClientRect()[xe?"width":"height"]:0,pe=(xe?Q:ie)||Ae;X.setLevelAndScrolling(B,ye,pe)},X.setLevelTransform=function(J,B,Q,ie){var oe=X.props,xe=oe.placement,ye=oe.levelMove,Ae=oe.duration,pe=oe.ease,Oe=oe.showMask;X.levelDom.forEach(function(Fe){Fe.style.transition="transform ".concat(Ae," ").concat(pe),t(Fe,n,X.transitionEnd);var Me=J?Q:0;if(ye){var Ce=y(ye,{target:Fe,open:J});Me=J?Ce[0]:Ce[1]||0}var Le=typeof Me=="number"?"".concat(Me,"px"):Me,de=xe==="left"||xe==="top"?Le:"-".concat(Le);de=Oe&&xe==="right"&&ie?"calc(".concat(de," + ").concat(ie,"px)"):de,Fe.style.transform=Me?"".concat(B,"(").concat(de,")"):""})},X.setLevelAndScrolling=function(J,B,Q){var ie=X.props.onChange;if(!_){var oe=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(o.a)(!0):0;X.setLevelTransform(J,B,Q,oe),X.toggleScrollingToDrawerAndBody(oe)}ie&&ie(J)},X.toggleScrollingToDrawerAndBody=function(J){var B=X.props,Q=B.getOpenCount,ie=B.getContainer,oe=B.showMask,xe=B.open,ye=ie&&ie(),Ae=Q&&Q();if(ye&&ye.parentNode===document.body&&oe){var pe=["touchstart"],Oe=[document.body,X.maskDom,X.handlerDom,X.contentDom];xe&&document.body.style.overflow!=="hidden"?(J&&X.addScrollingEffect(J),Ae===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",Oe.forEach(function(Fe,Me){if(!Fe)return;t(Fe,pe[Me]||"touchmove",Me?X.removeMoveHandler:X.removeStartHandler,X.passive)})):X.getCurrentDrawerSome()&&(Ae||(document.body.style.overflow=""),document.body.style.touchAction="",J&&X.remScrollingEffect(J),Oe.forEach(function(Fe,Me){if(!Fe)return;u(Fe,pe[Me]||"touchmove",Me?X.removeMoveHandler:X.removeStartHandler,X.passive)}))}},X.addScrollingEffect=function(J){var B=X.props,Q=B.placement,ie=B.duration,oe=B.ease,xe=B.getOpenCount,ye=B.switchScrollingEffect,Ae=xe&&xe();Ae===1&&ye();var pe="width ".concat(ie," ").concat(oe),Oe="transform ".concat(ie," ").concat(oe);X.dom.style.transition="none";switch(Q){case"right":X.dom.style.transform="translateX(-".concat(J,"px)");break;case"top":case"bottom":X.dom.style.width="calc(100% - ".concat(J,"px)"),X.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(X.timeout),X.timeout=setTimeout(function(){X.dom&&(X.dom.style.transition="".concat(Oe,",").concat(pe),X.dom.style.width="",X.dom.style.transform="")})},X.remScrollingEffect=function(J){var B=X.props,Q=B.placement,ie=B.duration,oe=B.ease,xe=B.getOpenCount,ye=B.switchScrollingEffect,Ae=xe&&xe();Ae||ye(!0),i&&(document.body.style.overflowX="hidden"),X.dom.style.transition="none";var pe,Oe="width ".concat(ie," ").concat(oe),Fe="transform ".concat(ie," ").concat(oe);switch(Q){case"left":{X.dom.style.width="100%",Oe="width 0s ".concat(oe," ").concat(ie);break}case"right":{X.dom.style.transform="translateX(".concat(J,"px)"),X.dom.style.width="100%",Oe="width 0s ".concat(oe," ").concat(ie),X.maskDom&&(X.maskDom.style.left="-".concat(J,"px"),X.maskDom.style.width="calc(100% + ".concat(J,"px)"));break}case"top":case"bottom":{X.dom.style.width="calc(100% + ".concat(J,"px)"),X.dom.style.height="100%",X.dom.style.transform="translateZ(0)",pe="height 0s ".concat(oe," ").concat(ie);break}default:break}clearTimeout(X.timeout),X.timeout=setTimeout(function(){X.dom&&(X.dom.style.transition="".concat(Fe,",").concat(pe?"".concat(pe,","):"").concat(Oe),X.dom.style.transform="",X.dom.style.width="",X.dom.style.height="")})},X.getCurrentDrawerSome=function(){return!Object.keys(E).some(function(J){return E[J]})},X.getLevelDom=function(J){var B=J.level,Q=J.getContainer;if(_)return;var ie=Q&&Q(),oe=ie?ie.parentNode:null;if(X.levelDom=[],B==="all"){var xe=oe?Array.prototype.slice.call(oe.children):[];xe.forEach(function(ye){ye.nodeName!=="SCRIPT"&&ye.nodeName!=="STYLE"&&ye.nodeName!=="LINK"&&ye!==ie&&X.levelDom.push(ye)})}else B&&s(B).forEach(function(ye){document.querySelectorAll(ye).forEach(function(Ae){X.levelDom.push(Ae)})})},X.getHorizontalBoolAndPlacementName=function(){var J=X.props.placement,B=J==="left"||J==="right",Q="translate".concat(B?"X":"Y");return{isHorizontal:B,placementName:Q}},X.state={_self:Object(p.a)(X)},X}return Object(U.a)(j,[{key:"componentDidMount",value:function(){var X=this;if(!_){var J=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return J=!0,null}}))}catch(xe){}this.passive=J?{passive:!1}:!1}var B=this.props,Q=B.open,ie=B.getContainer,oe=ie&&ie();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),Q&&(oe&&oe.parentNode===document.body&&(E[this.drawerId]=Q),this.openLevelTransition(),this.forceUpdate(function(){X.domFocus()}))}},{key:"componentDidUpdate",value:function(X){var J=this.props,B=J.open,Q=J.getContainer,ie=Q&&Q();B!==X.open&&(B&&this.domFocus(),ie&&ie.parentNode===document.body&&(E[this.drawerId]=!!B),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var X=this.props,J=X.getOpenCount,B=X.open,Q=X.switchScrollingEffect,ie=typeof J=="function"&&J();delete E[this.drawerId],B&&(this.setLevelTransform(!1),document.body.style.touchAction=""),ie||(document.body.style.overflow="",Q(!0))}},{key:"render",value:function(){var X,J=this,B=this.props,Q=B.className,ie=B.children,oe=B.style,xe=B.width,ye=B.height,Ae=B.defaultOpen,pe=B.open,Oe=B.prefixCls,Fe=B.placement,Me=B.level,Ce=B.levelMove,Le=B.ease,de=B.duration,ue=B.getContainer,ke=B.handler,Ue=B.onChange,Ye=B.afterVisibleChange,ee=B.showMask,M=B.maskClosable,N=B.maskStyle,$=B.onClose,V=B.onHandleClick,Y=B.keyboard,me=B.getOpenCount,Re=B.switchScrollingEffect,rt=Object(ae.a)(B,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Pe=this.dom?pe:!1,Ie=d()(Oe,(X={},Object(l.a)(X,"".concat(Oe,"-").concat(Fe),!0),Object(l.a)(X,"".concat(Oe,"-open"),Pe),Object(l.a)(X,Q||"",!!Q),Object(l.a)(X,"no-mask",!ee),X)),Xe=this.getHorizontalBoolAndPlacementName(),tt=Xe.placementName,Ve=Fe==="left"||Fe==="top"?"-100%":"100%",Ke=Pe?"":"".concat(tt,"(").concat(Ve,")"),Ne=ke&&T.cloneElement(ke,{onClick:function(_e){ke.props.onClick&&ke.props.onClick(),V&&V(_e)},ref:function(_e){J.handlerDom=_e}});return T.createElement("div",Object.assign({},rt,{tabIndex:-1,className:Ie,style:oe,ref:function(_e){J.dom=_e},onKeyDown:Pe&&Y?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),ee&&T.createElement("div",{className:"".concat(Oe,"-mask"),onClick:M?$:void 0,style:N,ref:function(_e){J.maskDom=_e}}),T.createElement("div",{className:"".concat(Oe,"-content-wrapper"),style:{transform:Ke,msTransform:Ke,width:g(xe)?"".concat(xe,"px"):xe,height:g(ye)?"".concat(ye,"px"):ye},ref:function(_e){J.contentWrapper=_e}},T.createElement("div",{className:"".concat(Oe,"-content"),ref:function(_e){J.contentDom=_e},onTouchStart:Pe&&ee?this.removeStartHandler:void 0,onTouchMove:Pe&&ee?this.removeMoveHandler:void 0},ie),Ne))}}],[{key:"getDerivedStateFromProps",value:function(X,J){var B=J.prevProps,Q=J._self,ie={prevProps:X};if(B!==void 0){var oe=X.placement,xe=X.level;oe!==B.placement&&(Q.contentDom=null),xe!==B.level&&Q.getLevelDom(X)}return ie}}]),j}(T.Component);a.defaultProps={switchScrollingEffect:function(){}};var x=a;function O(K){var ne=A();return function(){var G=Object(S.a)(K),X;if(ne){var J=Object(S.a)(this).constructor;X=Reflect.construct(G,arguments,J)}else X=G.apply(this,arguments);return Object(P.a)(this,X)}}function A(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(K){return!1}}var D=function(K){Object(w.a)(j,K);var ne=O(j);function j(G){var X;Object(Z.a)(this,j),X=ne.call(this,G),X.onHandleClick=function(B){var Q=X.props,ie=Q.onHandleClick,oe=Q.open;if(ie&&ie(B),typeof oe=="undefined"){var xe=X.state.open;X.setState({open:!xe})}},X.onClose=function(B){var Q=X.props,ie=Q.onClose,oe=Q.open;ie&&ie(B),typeof oe=="undefined"&&X.setState({open:!1})};var J=typeof G.open!="undefined"?G.open:!!G.defaultOpen;return X.state={open:J},"onMaskClick"in G&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),X}return Object(U.a)(j,[{key:"render",value:function(){var X=this,J=this.props,B=J.defaultOpen,Q=J.getContainer,ie=J.wrapperClassName,oe=J.forceRender,xe=J.handler,ye=Object(ae.a)(J,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Ae=this.state.open;if(!Q)return T.createElement("div",{className:ie,ref:function(Fe){X.dom=Fe}},T.createElement(x,Object.assign({},ye,{open:Ae,handler:xe,getContainer:function(){return X.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var pe=!!xe||oe;return T.createElement(C.a,{visible:Ae,forceRender:pe,getContainer:Q,wrapperClassName:ie},function(Oe){var Fe=Oe.visible,Me=Oe.afterClose,Ce=Object(ae.a)(Oe,["visible","afterClose"]);return T.createElement(x,Object.assign({},ye,Ce,{open:Fe!==void 0?Fe:Ae,afterVisibleChange:Me!==void 0?Me:ye.afterVisibleChange,handler:xe,onClose:X.onClose,onHandleClick:X.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(X,J){var B=J.prevProps,Q={prevProps:X};return typeof B!="undefined"&&X.open!==B.open&&(Q.open=X.open),Q}}]),j}(T.Component);D.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:T.createElement("div",{className:"drawer-handle"},T.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var I=D,F=We.a=I},fcyK:function($e,We,z){},fyJ8:function($e,We,z){"use strict";var ae=z("rePB"),Z=z("VTBJ"),U=z("Ff2n"),w=z("U8pU"),P=z("q1tI"),S=z.n(P),C=z("TSYQ"),T=z.n(C),l=z("c+Xe"),p=z("sR1s");function h(f){return f&&Object(w.a)(f)==="object"&&!Array.isArray(f)&&!P.isValidElement(f)}function d(f){return typeof f=="string"?!0:Object(l.c)(f)}function o(f,i){var n,t=f.prefixCls,u=f.className,y=f.record,g=f.index,_=f.dataIndex,b=f.render,v=f.children,m=f.component,E=m===void 0?"td":m,a=f.colSpan,x=f.rowSpan,O=f.fixLeft,A=f.fixRight,D=f.firstFixLeft,I=f.lastFixLeft,F=f.firstFixRight,K=f.lastFixRight,ne=f.appendNode,j=f.additionalProps,G=j===void 0?{}:j,X=f.ellipsis,J=f.align,B=f.rowType,Q=f.isSticky,ie="".concat(t,"-cell"),oe,xe;if(v)xe=v;else{var ye=Object(p.b)(y,_);if(xe=ye,b){var Ae=b(ye,y,g);h(Ae)?(xe=Ae.children,oe=Ae.props):xe=Ae}}Object(w.a)(xe)==="object"&&!Array.isArray(xe)&&!P.isValidElement(xe)&&(xe=null),X&&(I||F)&&(xe=P.createElement("span",{className:"".concat(ie,"-content")},xe));var pe=oe||{},Oe=pe.colSpan,Fe=pe.rowSpan,Me=pe.style,Ce=pe.className,Le=Object(U.a)(pe,["colSpan","rowSpan","style","className"]),de=Oe!==void 0?Oe:a,ue=Fe!==void 0?Fe:x;if(de===0||ue===0)return null;var ke={},Ue=typeof O=="number",Ye=typeof A=="number";Ue&&(ke.position="sticky",ke.left=O),Ye&&(ke.position="sticky",ke.right=A);var ee={};J&&(ee.textAlign=J);var M,N=X===!0?{showTitle:!0}:X;N&&(N.showTitle||B==="header")&&(typeof xe=="string"||typeof xe=="number"?M=xe.toString():P.isValidElement(xe)&&typeof xe.props.children=="string"&&(M=xe.props.children));var $=Object(Z.a)(Object(Z.a)(Object(Z.a)({title:M},Le),G),{},{colSpan:de&&de!==1?de:null,rowSpan:ue&&ue!==1?ue:null,className:T()(ie,u,(n={},Object(ae.a)(n,"".concat(ie,"-fix-left"),Ue),Object(ae.a)(n,"".concat(ie,"-fix-left-first"),D),Object(ae.a)(n,"".concat(ie,"-fix-left-last"),I),Object(ae.a)(n,"".concat(ie,"-fix-right"),Ye),Object(ae.a)(n,"".concat(ie,"-fix-right-first"),F),Object(ae.a)(n,"".concat(ie,"-fix-right-last"),K),Object(ae.a)(n,"".concat(ie,"-ellipsis"),X),Object(ae.a)(n,"".concat(ie,"-with-append"),ne),Object(ae.a)(n,"".concat(ie,"-fix-sticky"),(Ue||Ye)&&Q),n),G.className,Ce),style:Object(Z.a)(Object(Z.a)(Object(Z.a)(Object(Z.a)({},G.style),ee),ke),Me),ref:d(E)?i:null});return P.createElement(E,Object.assign({},$),ne,xe)}var c=P.forwardRef(o);c.displayName="Cell";var s=P.memo(c,function(f,i){return i.shouldCellUpdate?!i.shouldCellUpdate(i.record,f.record):!1});We.a=s},gRFJ:function($e,We,z){$e.exports=[z("rdUC"),z("ynwM"),z("RELg"),z("DlR+"),z("CrYA"),z("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f($e){return $e<10?"0"+$e:$e}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote($e){return rx_escapable.lastIndex=0,rx_escapable.test($e)?'"'+$e.replace(rx_escapable,function(We){var z=meta[We];return typeof z=="string"?z:"\\u"+("0000"+We.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+$e+'"'}function str($e,We){var z,ae,Z,U,w=gap,P,S=We[$e];S&&typeof S=="object"&&typeof S.toJSON=="function"&&(S=S.toJSON($e)),typeof rep=="function"&&(S=rep.call(We,$e,S));switch(typeof S){case"string":return quote(S);case"number":return isFinite(S)?String(S):"null";case"boolean":case"null":return String(S);case"object":if(!S)return"null";if(gap+=indent,P=[],Object.prototype.toString.apply(S)==="[object Array]"){for(U=S.length,z=0;z<U;z+=1)P[z]=str(z,S)||"null";return Z=P.length===0?"[]":gap?`[
`+gap+P.join(`,
`+gap)+`
`+w+"]":"["+P.join(",")+"]",gap=w,Z}if(rep&&typeof rep=="object")for(U=rep.length,z=0;z<U;z+=1)typeof rep[z]=="string"&&(ae=rep[z],Z=str(ae,S),Z&&P.push(quote(ae)+(gap?": ":":")+Z));else for(ae in S)Object.prototype.hasOwnProperty.call(S,ae)&&(Z=str(ae,S),Z&&P.push(quote(ae)+(gap?": ":":")+Z));return Z=P.length===0?"{}":gap?`{
`+gap+P.join(`,
`+gap)+`
`+w+"}":"{"+P.join(",")+"}",gap=w,Z}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function($e,We,z){var ae;if(gap="",indent="",typeof z=="number")for(ae=0;ae<z;ae+=1)indent+=" ";else typeof z=="string"&&(indent=z);if(rep=We,We&&typeof We!="function"&&(typeof We!="object"||typeof We.length!="number"))throw new Error("JSON.stringify");return str("",{"":$e})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk($e,We){var z,ae,Z=$e[We];if(Z&&typeof Z=="object")for(z in Z)Object.prototype.hasOwnProperty.call(Z,z)&&(ae=walk(Z,z),ae!==void 0?Z[z]=ae:delete Z[z]);return reviver.call($e,We,Z)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function($e){return"\\u"+("0000"+$e.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},gqXR:function($e,We,z){$e.exports=z.p+"static/g.a5bcde87.svg"},hW8S:function($e,We,z){"use strict";z.d(We,"a",function(){return w}),z.d(We,"c",function(){return P}),z.d(We,"b",function(){return S});var ae=z("VTBJ"),Z=z("Ff2n"),U=z("Kwbf"),w="RC_TABLE_INTERNAL_COL_DEFINE";function P(C){var T=C.expandable,l=Object(Z.a)(C,["expandable"]);return"expandable"in C?Object(ae.a)(Object(ae.a)({},l),T):l}function S(C){return Object.keys(C).reduce(function(T,l){return(l.substr(0,5)==="data-"||l.substr(0,5)==="aria-")&&(T[l]=C[l]),T},{})}},hgre:function($e,We,z){"use strict";var ae=z("miYZ"),Z=z("tsqr"),U=z("9og8"),w=z("WmNS"),P=z.n(w),S=z("q1tI"),C=z.n(S),T=z("GUcZ"),l=z("ulZh"),p=z.n(l),h=z("xKgJ"),d=z("bntm"),o=z("4xil"),c=z.n(o);function s(t){if(isNaN(t))return{minutes:"00",seconds:"00"};var u=new Date(t*1e3).toISOString().substr(11,8);return{minutes:u.substr(3,2),seconds:u.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function f(t,u){return t-u}function i(t){t.sort(f);for(var u=0,y=0;y<t.length-1;y++){var g=Math.abs(t[y+1]-t[y]);g<21&&(u+=g)}return u}var n=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;We.a=Object(S.forwardRef)(function(t,u){var y,g,_,b=t.src,v=t.toLog,m=t.videoId,E=t.logWatchHistory,a=t.courseId,x=a===void 0?null:a,O=t.startTime,A=t.handlePause,D=A===void 0?function(){}:A,I=t.handlePlay,F=I===void 0?function(){}:I,K=t.handlePlayEnded,ne=K===void 0?function(){}:K,j=t.videoSpeed,G=j===void 0?1:j;b=(y=b)===null||y===void 0?void 0:y.replace("http://","https://");var X=(g=b)===null||g===void 0||((_=g.split("."))===null||_===void 0)?void 0:_.pop(),J=X==="flv",B=Object(S.useRef)(),Q=Object(S.useRef)(),ie=Object(S.useRef)(),oe=Object(S.useRef)(),xe=Object(S.useRef)(),ye=Object(S.useRef)(),Ae=Object(S.useRef)(),pe=Object(S.useRef)(),Oe=Object(S.useRef)(),Fe=Object(S.useRef)(),Me=Object(S.useRef)(),Ce=Object(S.useRef)(),Le=Object(S.useRef)(),de=Object(S.useRef)(),ue=navigator.userAgent.toLowerCase().match(n),ke=ue?ue[0]:"pc",Ue=Object(S.useRef)(!1),Ye=Object(h.x)(),ee=0,M=0,N=0,$=null,V=!1,Y=20,me=1,Re=!1,rt=!1,Pe=[];Object(S.useImperativeHandle)(u,function(){return{getLastUpdatedTime:function(){return B.current.currentTime},getDuration:function(){return B.current.duration}}});var Ie=Object(S.useCallback)(function(Ne){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_e={point:B.current.currentTime};$?(_e.log_id=$,_e.watch_duration=i(Pe),_e.total_duration=M):(x?(_e.video_id=parseInt(m,10),_e.course_id=x):_e.video_id=m,_e.duration=ee,_e.device=ke),De&&(_e.ed="1");function he(){return ve.apply(this,arguments)}function ve(){return ve=Object(U.a)(P.a.mark(function Ee(){var be;return P.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return Re=!0,qe.next=3,E(_e);case 3:be=qe.sent,$=be,Re=!1,Ne&&Ne();case 7:case"end":return qe.stop()}},Ee)})),ve.apply(this,arguments)}he()},[m,x]);Object(S.useEffect)(function(){var Ne;Z.b.destroy();var De=null;return T.a.isSupported&&J&&b&&((Ne=b)===null||Ne===void 0?void 0:Ne.indexOf(".m3u8"))<0?(De=T.a.createPlayer({type:"flv",volume:.8,cors:!0,url:b,muted:!1}),B.current&&(De.attachMediaElement(B.current),De.load())):B.current.setAttribute("src",b),tt(),function(){De&&(De.unload(),De.pause(),De.destroy(),De=null)}},[B,J,b]);function Xe(){B.current.paused?(oe.current.style.display="none",xe.current.style.display="block"):(oe.current.style.display="block",xe.current.style.display="none")}function tt(){Me.current.style.display="none",Le.current.style.display="none",Ce.current.style.display="none",B.current.muted||B.current.volume===0?Me.current.style.display="block":B.current.volume>0&&B.current.volume<=.5?Le.current.style.display="block":Ce.current.style.display="block"}Object(S.useEffect)(function(){var Ne=document.getElementById("play"),De=document.querySelectorAll(".playback-icons use");function _e(){F(),O&&!Ue.current&&(B.current.currentTime=O),Ue.current=!0,Pe.push(B.current.currentTime),V||(V=!0,v&&Ie())}function he(){return ve.apply(this,arguments)}function ve(){return ve=Object(U.a)(P.a.mark(function Qe(){return P.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:Xe(),Pe.push(B.current.currentTime),v&&Ie(function(){$=null,N=0,V=!1,Re=!1,rt=!1,Pe=[],M=0,me=1},!0);case 3:case"end":return je.stop()}},Qe)})),ve.apply(this,arguments)}function Ee(){ye.current.value=Math.floor(B.current.currentTime),Ae.current.value=Math.floor(B.current.currentTime)}function be(){var Qe=s(Math.round(B.current.currentTime));Oe.current.innerText="".concat(Qe.minutes,":").concat(Qe.seconds),Oe.current.setAttribute("datetime","".concat(Qe.minutes,"m ").concat(Qe.seconds,"s"))}function Ge(){var Qe=Math.round(B.current.duration);ye.current.setAttribute("max",Qe),Ae.current.setAttribute("max",Qe);var Te=s(Qe);pe.current.innerText="".concat(Te.minutes,":").concat(Te.seconds),pe.current.setAttribute("datetime","".concat(Te.minutes,"m ").concat(Te.seconds,"s"))}function qe(){var Qe=Math.round(B.current.duration);ye.current.setAttribute("max",Qe),Ae.current.setAttribute("max",Qe);var Te=s(Qe);pe.current.innerText="".concat(Te.minutes,":").concat(Te.seconds),pe.current.setAttribute("datetime","".concat(Te.minutes,"m ").concat(Te.seconds,"s")),Ee(),be();var je=Q.current.getBoundingClientRect(),ct=je.width,Ze=je.height,Tt=je.x,Ot=je.y;if(Tt<0||Ot<0||!ct)return;if(!rt){var st=B.current.currentTime,gt=st-N;Math.abs(gt)<10?(M+=Math.abs(gt),N=st,Re||M-me*Y>=0&&(me++,Pe.push(N),v&&Ie())):(N=st,v&&Ie())}}function pt(){rt=!0}function Pt(){B.current.playing&&Pe.push(B.current.currentTime,N),N=B.current.currentTime,rt=!1}function Rt(){ee=B.current.duration,ee<=20&&(Y=ee/3),B.current.addEventListener("play",_e)}function Mt(Qe){Qe.preventDefault(),Object(d.a)()?(B.current.style.width="100%",B.current.style.height="100%"):B.current.style.cssText=""}function wt(){D()}function lt(Qe){var Te=Qe.target.dataset.seek?Qe.target.dataset.seek:Qe.target.value;B.current.currentTime=Te,Ae.current.value=Te,ye.current.value=Te}function ft(Qe){var Te=Math.round(Qe.offsetX/Qe.target.clientWidth*parseInt(Qe.target.getAttribute("max"),10));ye.current.setAttribute("data-seek",Te);var je=s(Te);Fe.current.textContent="".concat(je.minutes,":").concat(je.seconds);var ct=B.current.getBoundingClientRect();Fe.current.style.left="".concat(Qe.pageX-ct.left,"px")}return ie.current.addEventListener(Object(d.c)(),Mt),B.current.addEventListener("canplay",Rt),B.current.addEventListener("ended",he),B.current.addEventListener("seeking",pt),B.current.addEventListener("seeked",Pt),B.current.addEventListener("loadedmetadata",Ge),ye.current.addEventListener("mousemove",ft),ye.current.addEventListener("input",lt),B.current.addEventListener("timeupdate",qe),B.current.addEventListener("pause",wt),B.current.addEventListener("volumechange",tt),function(){B.current.removeEventListener("canplay",Rt),B.current.removeEventListener("play",_e),B.current.removeEventListener("ended",he),B.current.removeEventListener("seeking",pt),B.current.removeEventListener("seeked",Pt),ye.current.removeEventListener("mousemove",ft),ye.current.removeEventListener("input",lt),B.current.removeEventListener("timeupdate",qe),B.current.removeEventListener("pause",wt),B.current.removeEventListener("loadedmetadata",Ge),B.current.removeEventListener("volumechange",tt),B.current.playing&&(Pe.push(N,B.current.currentTime),v&&Ie())}},[B,b]),Object(S.useEffect)(function(){var Ne;if(B.current.onended=function(){ne(B)},B.current.oncontextmenu=function(){return!1},((Ne=b)===null||Ne===void 0?void 0:Ne.indexOf(".m3u8"))>-1){if(B.current.canPlayType("application/vnd.apple.mpegurl"))B.current.src=b;else if(p.a.isSupported()){var De=new p.a;De.loadSource(b),De.attachMedia(B.current)}}},[b]),Object(S.useEffect)(function(){B.current.playbackRate=G},[G]);var Ve=function(){B.current.paused||B.current.ended?B.current.play():B.current.pause(),Xe()};function Ke(){B.current.muted=!B.current.muted,B.current.muted?(de.current.setAttribute("data-volume",volume.value),de.current.value=0):de.current.value=de.current.dataset.volume}return C.a.createElement("div",{style:{position:"relative"},ref:ie},C.a.createElement("div",{ref:Q,className:"".concat(c.a.watermark," animated_alternate animate__animated_10s animate__infinite animate__stepstart ").concat(c.a.animate__loop)},Ye?Ye.login:" "),C.a.createElement("div",{className:c.a.container},C.a.createElement("div",{className:c.a["video-container"],id:"video-container"},C.a.createElement("div",{className:c.a["playback-animation"],id:"playback-animation"},C.a.createElement("svg",{className:c.a["playback-icons"]},C.a.createElement("use",{className:"hidden",href:"#play-icon"}),C.a.createElement("use",{href:"#pause"}))),C.a.createElement("video",{className:c.a.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:B,autoPlay:!1}),C.a.createElement("div",{className:"".concat(c.a["video-controls"]," "),id:"video-controls"},C.a.createElement("div",{className:c.a["bottom-controls"]},C.a.createElement("div",{className:c.a["left-controls"]},C.a.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Ve},C.a.createElement("svg",{className:c.a["playback-icons"]},C.a.createElement("use",{ref:xe,href:"#play-icon"}),C.a.createElement("use",{ref:oe,style:{display:"none"},href:"#pause"}))),C.a.createElement("div",{className:c.a.time},C.a.createElement("time",{id:"time-elapsed",ref:Oe},"00:00"),C.a.createElement("span",null," / "),C.a.createElement("time",{id:"duration",ref:pe},"00:00"))),C.a.createElement("div",{className:c.a["right-controls"]},C.a.createElement("div",{className:c.a["volume-controls"]},C.a.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:c.a["volume-button"],id:"volume-button",onClick:Ke},C.a.createElement("svg",null,C.a.createElement("use",{ref:Me,href:"#volume-mute"}),C.a.createElement("use",{ref:Le,href:"#volume-low"}),C.a.createElement("use",{ref:Ce,href:"#volume-high"}))),C.a.createElement("input",{className:c.a.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:de,style:{display:"none"},onClick:tt})),C.a.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:c.a["fullscreen-button"],onClick:function(){Object(d.a)()?Object(d.b)():Object(d.d)(ie.current)}},C.a.createElement("svg",null,C.a.createElement("use",{href:"#fullscreen"}),C.a.createElement("use",{href:"#fullscreen-exit",className:"hidden"}))))),C.a.createElement("div",{className:c.a["video-progress"]},C.a.createElement("progress",{ref:Ae,value:"0",min:"0"}),C.a.createElement("input",{className:c.a.seek,ref:ye,value:"0",min:"0",type:"range",step:"1"}),C.a.createElement("div",{className:c.a["seek-tooltip"],ref:Fe,id:"seek-tooltip"},"00:00"))))),C.a.createElement("svg",{style:{display:"none"}},C.a.createElement("defs",null,C.a.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),C.a.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),C.a.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),C.a.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),C.a.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),C.a.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),C.a.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),C.a.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},i3hx:function($e,We,z){},je13:function($e,We,z){var ae=z("5nXd"),Z=z("gRFJ"),U=[z("uQRt")];$e.exports=ae.createStore(Z,U)},kSUc:function($e,We,z){},"kaH+":function($e,We,z){"use strict";var ae=z("+L6B"),Z=z("2/Rp"),U=z("tJVT"),w=z("q1tI"),P=z.n(w),S=z("UZu5"),C=z.n(S),T=z("dhSg"),l=z("rLCj"),p=z("dF/Y"),h=z("4i/N");We.a=function(){var d=Object(w.useState)(""),o=Object(U.a)(d,2),c=o[0],s=o[1],f=Object(w.useState)(0),i=Object(U.a)(f,2),n=i[0],t=i[1],u=Object(w.useRef)("");Object(w.useEffect)(function(){var b=T.a.subscribe("preview-image",function(v){s(v),document.body.style.overflow="hidden"});return b},[]),Object(w.useEffect)(function(){return document.addEventListener("keydown",y),function(){document.removeEventListener("keydown",y)}},[]),Object(w.useEffect)(function(){u.current=c},[c]);function y(b){b.keyCode==27&&u.current&&g()}function g(){document.body.style.overflow="auto",s("")}function _(){t(n+90)}return P.a.createElement(w.Fragment,null,c?P.a.createElement("div",{className:"image-preview-container"},P.a.createElement("div",{className:"button-group"},P.a.createElement(Z.a,{onClick:_},"\u65CB\u8F6C",P.a.createElement(l.a,null)),P.a.createElement(Z.a,{href:c},"\u4E0B\u8F7D",P.a.createElement(p.a,null)),P.a.createElement(Z.a,{onClick:g},"\u5173\u95ED",P.a.createElement(h.a,null))),P.a.createElement("div",{className:"preview-wrp-group"},P.a.createElement("img",{className:"image-preview",src:c,alt:"\u9884\u89C8\u5927\u56FE",style:{transform:"rotate(".concat(n,"deg)")}}))):null)}},kovY:function($e,We,z){$e.exports=z.p+"static/e.eabfa286.svg"},lOMy:function($e,We,z){},lZu9:function($e,We,z){(function(ae){ae(z("VrN/"),z("1eCo"),z("8EBN"))})(function(ae){"use strict";ae.defineMode("markdown",function(Z,U){var w=ae.getMode(Z,"text/html"),P=w.name=="null";function S(j){if(ae.findModeByName){var G=ae.findModeByName(j);G&&(j=G.mime||G.mimes[0])}var X=ae.getMode(Z,j);return X.name=="null"?null:X}U.highlightFormatting===void 0&&(U.highlightFormatting=!1),U.maxBlockquoteDepth===void 0&&(U.maxBlockquoteDepth=0),U.taskLists===void 0&&(U.taskLists=!1),U.strikethrough===void 0&&(U.strikethrough=!1),U.emoji===void 0&&(U.emoji=!1),U.fencedCodeBlockHighlighting===void 0&&(U.fencedCodeBlockHighlighting=!0),U.fencedCodeBlockDefaultMode===void 0&&(U.fencedCodeBlockDefaultMode="text/plain"),U.xml===void 0&&(U.xml=!0),U.tokenTypeOverrides===void 0&&(U.tokenTypeOverrides={});var C={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var T in C)C.hasOwnProperty(T)&&U.tokenTypeOverrides[T]&&(C[T]=U.tokenTypeOverrides[T]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,p=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,h=/^\[(x| )\](?=\s)/i,d=U.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,o=/^ {0,3}(?:\={1,}|-{2,})\s*$/,c=/^[^#!\[\]*_\\<>` "'(~:]+/,s=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,i=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,n=" ";function t(j,G,X){return G.f=G.inline=X,X(j,G)}function u(j,G,X){return G.f=G.block=X,X(j,G)}function y(j){return!j||!/\S/.test(j.string)}function g(j){if(j.linkTitle=!1,j.linkHref=!1,j.linkText=!1,j.em=!1,j.strong=!1,j.strikethrough=!1,j.quote=0,j.indentedCode=!1,j.f==b){var G=P;if(!G){var X=ae.innerMode(w,j.htmlState);G=X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText}G&&(j.f=a,j.block=_,j.htmlState=null)}return j.trailingSpace=0,j.trailingSpaceNewLine=!1,j.prevLine=j.thisLine,j.thisLine={stream:null},null}function _(j,G){var X=j.column()===G.indentation,J=y(G.prevLine.stream),B=G.indentedCode,Q=G.prevLine.hr,ie=G.list!==!1,oe=(G.listStack[G.listStack.length-1]||0)+3;G.indentedCode=!1;var xe=G.indentation;if(G.indentationDiff===null&&(G.indentationDiff=G.indentation,ie)){for(G.list=null;xe<G.listStack[G.listStack.length-1];)G.listStack.pop(),G.listStack.length?G.indentation=G.listStack[G.listStack.length-1]:G.list=!1;G.list!==!1&&(G.indentationDiff=xe-G.listStack[G.listStack.length-1])}var ye=!J&&!Q&&!G.prevLine.header&&(!ie||!B)&&!G.prevLine.fencedCodeEnd,Ae=(G.list===!1||Q||J)&&G.indentation<=oe&&j.match(l),pe=null;if(G.indentationDiff>=4&&(B||G.prevLine.fencedCodeEnd||G.prevLine.header||J))return j.skipToEnd(),G.indentedCode=!0,C.code;if(j.eatSpace())return null;if(X&&G.indentation<=oe&&(pe=j.match(d))&&pe[1].length<=6)return G.quote=0,G.header=pe[1].length,G.thisLine.header=!0,U.highlightFormatting&&(G.formatting="header"),G.f=G.inline,m(G);if(G.indentation<=oe&&j.eat(">"))return G.quote=X?1:G.quote+1,U.highlightFormatting&&(G.formatting="quote"),j.eatSpace(),m(G);if(!Ae&&!G.setext&&X&&G.indentation<=oe&&(pe=j.match(p))){var Oe=pe[1]?"ol":"ul";return G.indentation=xe+j.current().length,G.list=!0,G.quote=0,G.listStack.push(G.indentation),G.em=!1,G.strong=!1,G.code=!1,G.strikethrough=!1,U.taskLists&&j.match(h,!1)&&(G.taskList=!0),G.f=G.inline,U.highlightFormatting&&(G.formatting=["list","list-"+Oe]),m(G)}else{if(X&&G.indentation<=oe&&(pe=j.match(s,!0)))return G.quote=0,G.fencedEndRE=new RegExp(pe[1]+"+ *$"),G.localMode=U.fencedCodeBlockHighlighting&&S(pe[2]||U.fencedCodeBlockDefaultMode),G.localMode&&(G.localState=ae.startState(G.localMode)),G.f=G.block=v,U.highlightFormatting&&(G.formatting="code-block"),G.code=-1,m(G);if(G.setext||(!ye||!ie)&&!G.quote&&G.list===!1&&!G.code&&!Ae&&!f.test(j.string)&&(pe=j.lookAhead(1))&&(pe=pe.match(o)))return G.setext?(G.header=G.setext,G.setext=0,j.skipToEnd(),U.highlightFormatting&&(G.formatting="header")):(G.header=pe[0].charAt(0)=="="?1:2,G.setext=G.header),G.thisLine.header=!0,G.f=G.inline,m(G);if(Ae)return j.skipToEnd(),G.hr=!0,G.thisLine.hr=!0,C.hr;if(j.peek()==="[")return t(j,G,I)}return t(j,G,G.inline)}function b(j,G){var X=w.token(j,G.htmlState);if(!P){var J=ae.innerMode(w,G.htmlState);(J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText||G.md_inside&&j.current().indexOf(">")>-1)&&(G.f=a,G.block=_,G.htmlState=null)}return X}function v(j,G){var X=G.listStack[G.listStack.length-1]||0,J=G.indentation<X,B=X+3;if(G.fencedEndRE&&G.indentation<=B&&(J||j.match(G.fencedEndRE))){U.highlightFormatting&&(G.formatting="code-block");var Q;return J||(Q=m(G)),G.localMode=G.localState=null,G.block=_,G.f=a,G.fencedEndRE=null,G.code=0,G.thisLine.fencedCodeEnd=!0,J?u(j,G,G.block):Q}else return G.localMode?G.localMode.token(j,G.localState):(j.skipToEnd(),C.code)}function m(j){var G=[];if(j.formatting){G.push(C.formatting),typeof j.formatting=="string"&&(j.formatting=[j.formatting]);for(var X=0;X<j.formatting.length;X++)G.push(C.formatting+"-"+j.formatting[X]),j.formatting[X]==="header"&&G.push(C.formatting+"-"+j.formatting[X]+"-"+j.header),j.formatting[X]==="quote"&&(!U.maxBlockquoteDepth||U.maxBlockquoteDepth>=j.quote?G.push(C.formatting+"-"+j.formatting[X]+"-"+j.quote):G.push("error"))}if(j.taskOpen)return G.push("meta"),G.length?G.join(" "):null;if(j.taskClosed)return G.push("property"),G.length?G.join(" "):null;if(j.linkHref?G.push(C.linkHref,"url"):(j.strong&&G.push(C.strong),j.em&&G.push(C.em),j.strikethrough&&G.push(C.strikethrough),j.emoji&&G.push(C.emoji),j.linkText&&G.push(C.linkText),j.code&&G.push(C.code),j.image&&G.push(C.image),j.imageAltText&&G.push(C.imageAltText,"link"),j.imageMarker&&G.push(C.imageMarker)),j.header&&G.push(C.header,C.header+"-"+j.header),j.quote&&(G.push(C.quote),!U.maxBlockquoteDepth||U.maxBlockquoteDepth>=j.quote?G.push(C.quote+"-"+j.quote):G.push(C.quote+"-"+U.maxBlockquoteDepth)),j.list!==!1){var J=(j.listStack.length-1)%3;J?J===1?G.push(C.list2):G.push(C.list3):G.push(C.list1)}return j.trailingSpaceNewLine?G.push("trailing-space-new-line"):j.trailingSpace&&G.push("trailing-space-"+(j.trailingSpace%2?"a":"b")),G.length?G.join(" "):null}function E(j,G){return j.match(c,!0)?m(G):void 0}function a(j,G){var X=G.text(j,G);if(typeof X!="undefined")return X;if(G.list)return G.list=null,m(G);if(G.taskList){var J=j.match(h,!0)[1]===" ";return J?G.taskOpen=!0:G.taskClosed=!0,U.highlightFormatting&&(G.formatting="task"),G.taskList=!1,m(G)}if(G.taskOpen=!1,G.taskClosed=!1,G.header&&j.match(/^#+$/,!0))return U.highlightFormatting&&(G.formatting="header"),m(G);var B=j.next();if(G.linkTitle){G.linkTitle=!1;var Q=B;B==="("&&(Q=")"),Q=(Q+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ie="^\\s*(?:[^"+Q+"\\\\]+|\\\\\\\\|\\\\.)"+Q;if(j.match(new RegExp(ie),!0))return C.linkHref}if(B==="`"){var oe=G.formatting;U.highlightFormatting&&(G.formatting="code"),j.eatWhile("`");var xe=j.current().length;if(G.code==0&&(!G.quote||xe==1))return G.code=xe,m(G);if(xe==G.code){var ye=m(G);return G.code=0,ye}else return G.formatting=oe,m(G)}else if(G.code)return m(G);if(B==="\\"&&(j.next(),U.highlightFormatting)){var Ae=m(G),pe=C.formatting+"-escape";return Ae?Ae+" "+pe:pe}if(B==="!"&&j.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return G.imageMarker=!0,G.image=!0,U.highlightFormatting&&(G.formatting="image"),m(G);if(B==="["&&G.imageMarker&&j.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return G.imageMarker=!1,G.imageAltText=!0,U.highlightFormatting&&(G.formatting="image"),m(G);if(B==="]"&&G.imageAltText){U.highlightFormatting&&(G.formatting="image");var Ae=m(G);return G.imageAltText=!1,G.image=!1,G.inline=G.f=O,Ae}if(B==="["&&!G.image)return G.linkText&&j.match(/^.*?\]/)||(G.linkText=!0,U.highlightFormatting&&(G.formatting="link")),m(G);if(B==="]"&&G.linkText){U.highlightFormatting&&(G.formatting="link");var Ae=m(G);return G.linkText=!1,G.inline=G.f=j.match(/\(.*?\)| ?\[.*?\]/,!1)?O:a,Ae}if(B==="<"&&j.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=x,U.highlightFormatting&&(G.formatting="link");var Ae=m(G);return Ae?Ae+=" ":Ae="",Ae+C.linkInline}if(B==="<"&&j.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=x,U.highlightFormatting&&(G.formatting="link");var Ae=m(G);return Ae?Ae+=" ":Ae="",Ae+C.linkEmail}if(U.xml&&B==="<"&&j.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Oe=j.string.indexOf(">",j.pos);if(Oe!=-1){var Fe=j.string.substring(j.start,Oe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Fe)&&(G.md_inside=!0)}return j.backUp(1),G.htmlState=ae.startState(w),u(j,G,b)}if(U.xml&&B==="<"&&j.match(/^\/\w*?>/))return G.md_inside=!1,"tag";if(B==="*"||B==="_"){for(var Me=1,Ce=j.pos==1?" ":j.string.charAt(j.pos-2);Me<3&&j.eat(B);)Me++;var Le=j.peek()||" ",de=!/\s/.test(Le)&&(!i.test(Le)||/\s/.test(Ce)||i.test(Ce)),ue=!/\s/.test(Ce)&&(!i.test(Ce)||/\s/.test(Le)||i.test(Le)),ke=null,Ue=null;if(Me%2&&(!G.em&&de&&(B==="*"||!ue||i.test(Ce))?ke=!0:G.em==B&&ue&&(B==="*"||!de||i.test(Le))&&(ke=!1)),Me>1&&(!G.strong&&de&&(B==="*"||!ue||i.test(Ce))?Ue=!0:G.strong==B&&ue&&(B==="*"||!de||i.test(Le))&&(Ue=!1)),Ue!=null||ke!=null){U.highlightFormatting&&(G.formatting=ke==null?"strong":Ue==null?"em":"strong em"),ke===!0&&(G.em=B),Ue===!0&&(G.strong=B);var ye=m(G);return ke===!1&&(G.em=!1),Ue===!1&&(G.strong=!1),ye}}else if(B===" "&&(j.eat("*")||j.eat("_"))){if(j.peek()===" ")return m(G);j.backUp(1)}if(U.strikethrough){if(B==="~"&&j.eatWhile(B)){if(G.strikethrough){U.highlightFormatting&&(G.formatting="strikethrough");var ye=m(G);return G.strikethrough=!1,ye}else if(j.match(/^[^\s]/,!1))return G.strikethrough=!0,U.highlightFormatting&&(G.formatting="strikethrough"),m(G)}else if(B===" "&&j.match(/^~~/,!0)){if(j.peek()===" ")return m(G);j.backUp(2)}}if(U.emoji&&B===":"&&j.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){G.emoji=!0,U.highlightFormatting&&(G.formatting="emoji");var Ye=m(G);return G.emoji=!1,Ye}return B===" "&&(j.match(/^ +$/,!1)?G.trailingSpace++:G.trailingSpace&&(G.trailingSpaceNewLine=!0)),m(G)}function x(j,G){var X=j.next();if(X===">"){G.f=G.inline=a,U.highlightFormatting&&(G.formatting="link");var J=m(G);return J?J+=" ":J="",J+C.linkInline}return j.match(/^[^>]+/,!0),C.linkInline}function O(j,G){if(j.eatSpace())return null;var X=j.next();return X==="("||X==="["?(G.f=G.inline=D(X==="("?")":"]"),U.highlightFormatting&&(G.formatting="link-string"),G.linkHref=!0,m(G)):"error"}var A={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function D(j){return function(G,X){var J=G.next();if(J===j){X.f=X.inline=a,U.highlightFormatting&&(X.formatting="link-string");var B=m(X);return X.linkHref=!1,B}return G.match(A[j]),X.linkHref=!0,m(X)}}function I(j,G){return j.match(/^([^\]\\]|\\.)*\]:/,!1)?(G.f=F,j.next(),U.highlightFormatting&&(G.formatting="link"),G.linkText=!0,m(G)):t(j,G,a)}function F(j,G){if(j.match(/^\]:/,!0)){G.f=G.inline=K,U.highlightFormatting&&(G.formatting="link");var X=m(G);return G.linkText=!1,X}return j.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function K(j,G){return j.eatSpace()?null:(j.match(/^[^\s]+/,!0),j.peek()===void 0?G.linkTitle=!0:j.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),G.f=G.inline=a,C.linkHref+" url")}var ne={startState:function(){return{f:_,prevLine:{stream:null},thisLine:{stream:null},block:_,htmlState:null,indentation:0,inline:a,text:E,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(j){return{f:j.f,prevLine:j.prevLine,thisLine:j.thisLine,block:j.block,htmlState:j.htmlState&&ae.copyState(w,j.htmlState),indentation:j.indentation,localMode:j.localMode,localState:j.localMode?ae.copyState(j.localMode,j.localState):null,inline:j.inline,text:j.text,formatting:!1,linkText:j.linkText,linkTitle:j.linkTitle,linkHref:j.linkHref,code:j.code,em:j.em,strong:j.strong,strikethrough:j.strikethrough,emoji:j.emoji,header:j.header,setext:j.setext,hr:j.hr,taskList:j.taskList,list:j.list,listStack:j.listStack.slice(0),quote:j.quote,indentedCode:j.indentedCode,trailingSpace:j.trailingSpace,trailingSpaceNewLine:j.trailingSpaceNewLine,md_inside:j.md_inside,fencedEndRE:j.fencedEndRE}},token:function(j,G){if(G.formatting=!1,j!=G.thisLine.stream){if(G.header=0,G.hr=!1,j.match(/^\s*$/,!0))return g(G),null;if(G.prevLine=G.thisLine,G.thisLine={stream:j},G.taskList=!1,G.trailingSpace=0,G.trailingSpaceNewLine=!1,!G.localState&&(G.f=G.block,G.f!=b)){var X=j.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(G.indentation=X,G.indentationDiff=null,X>0)return null}}return G.f(j,G)},innerMode:function(j){return j.block==b?{state:j.htmlState,mode:w}:j.localState?{state:j.localState,mode:j.localMode}:{state:j,mode:ne}},indent:function(j,G,X){return j.block==b&&w.indent?w.indent(j.htmlState,G,X):j.localState&&j.localMode.indent?j.localMode.indent(j.localState,G,X):ae.Pass},blankLine:g,getType:m,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ne},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},n6Qo:function($e,We,z){"use strict";z.d(We,"a",function(){return T});var ae=z("q1tI"),Z=z("biw7"),U=z("fyJ8");function w(l){var p=l.className,h=l.index,d=l.children,o=l.colSpan,c=l.rowSpan,s=ae.useContext(Z.a),f=s.prefixCls,i=s.fixedInfoList,n=i[h];return ae.createElement(U.a,Object.assign({className:p,index:h,component:"td",prefixCls:f,record:null,dataIndex:null,render:function(){return{children:d,props:{colSpan:o,rowSpan:c}}}},n))}function P(l){return ae.createElement("tr",Object.assign({},l))}function S(l){var p=l.children,h=ae.useContext(Z.a),d=h.prefixCls;return ae.createElement("tfoot",{className:"".concat(d,"-summary")},p)}var C=We.b=S,T={Cell:w,Row:P}},nCk5:function($e,We,z){$e.exports=z.p+"static/d.53bf6ae3.svg"},nWbc:function($e,We,z){},oE5q:function($e,We,z){$e.exports=z.p+"static/t.0b94c5c3.svg"},oFv4:function($e,We,z){$e.exports=z.p+"static/internal.da228387.png"},osHv:function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";var Z=ae.Pos;function U(i,n){return i.line-n.line||i.ch-n.ch}var w="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",P=w+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",S=new RegExp("<(/?)(["+w+"]["+P+"]*)","g");function C(i,n,t,u){this.line=n,this.ch=t,this.cm=i,this.text=i.getLine(n),this.min=u?Math.max(u.from,i.firstLine()):i.firstLine(),this.max=u?Math.min(u.to-1,i.lastLine()):i.lastLine()}function T(i,n){var t=i.cm.getTokenTypeAt(Z(i.line,n));return t&&/\btag\b/.test(t)}function l(i){return i.line>=i.max?void 0:(i.ch=0,i.text=i.cm.getLine(++i.line),!0)}function p(i){return i.line<=i.min?void 0:(i.text=i.cm.getLine(--i.line),i.ch=i.text.length,!0)}function h(i){for(;;){var n=i.text.indexOf(">",i.ch);if(n==-1){if(l(i))continue;return}if(!T(i,n+1)){i.ch=n+1;continue}var t=i.text.lastIndexOf("/",n),u=t>-1&&!/\S/.test(i.text.slice(t+1,n));return i.ch=n+1,u?"selfClose":"regular"}}function d(i){for(;;){var n=i.ch?i.text.lastIndexOf("<",i.ch-1):-1;if(n==-1){if(p(i))continue;return}if(!T(i,n+1)){i.ch=n;continue}S.lastIndex=n,i.ch=n;var t=S.exec(i.text);if(t&&t.index==n)return t}}function o(i){for(;;){S.lastIndex=i.ch;var n=S.exec(i.text);if(!n){if(l(i))continue;return}if(!T(i,n.index+1)){i.ch=n.index+1;continue}return i.ch=n.index+n[0].length,n}}function c(i){for(;;){var n=i.ch?i.text.lastIndexOf(">",i.ch-1):-1;if(n==-1){if(p(i))continue;return}if(!T(i,n+1)){i.ch=n;continue}var t=i.text.lastIndexOf("/",n),u=t>-1&&!/\S/.test(i.text.slice(t+1,n));return i.ch=n+1,u?"selfClose":"regular"}}function s(i,n){for(var t=[];;){var u=o(i),y,g=i.line,_=i.ch-(u?u[0].length:0);if(!u||!(y=h(i)))return;if(y=="selfClose")continue;if(u[1]){for(var b=t.length-1;b>=0;--b)if(t[b]==u[2]){t.length=b;break}if(b<0&&(!n||n==u[2]))return{tag:u[2],from:Z(g,_),to:Z(i.line,i.ch)}}else t.push(u[2])}}function f(i,n){for(var t=[];;){var u=c(i);if(!u)return;if(u=="selfClose"){d(i);continue}var y=i.line,g=i.ch,_=d(i);if(!_)return;if(_[1])t.push(_[2]);else{for(var b=t.length-1;b>=0;--b)if(t[b]==_[2]){t.length=b;break}if(b<0&&(!n||n==_[2]))return{tag:_[2],from:Z(i.line,i.ch),to:Z(y,g)}}}}ae.registerHelper("fold","xml",function(i,n){for(var t=new C(i,n.line,0);;){var u=o(t);if(!u||t.line!=n.line)return;var y=h(t);if(!y)return;if(!u[1]&&y!="selfClose"){var g=Z(t.line,t.ch),_=s(t,u[2]);return _&&U(_.from,g)>0?{from:g,to:_.from}:null}}}),ae.findMatchingTag=function(i,n,t){var u=new C(i,n.line,n.ch,t);if(u.text.indexOf(">")==-1&&u.text.indexOf("<")==-1)return;var y=h(u),g=y&&Z(u.line,u.ch),_=y&&d(u);if(!y||!_||U(u,n)>0)return;var b={from:Z(u.line,u.ch),to:g,tag:_[2]};return y=="selfClose"?{open:b,close:null,at:"open"}:_[1]?{open:f(u,_[2]),close:b,at:"close"}:(u=new C(i,g.line,g.ch,t),{open:b,close:s(u,_[2]),at:"open"})},ae.findEnclosingTag=function(i,n,t,u){for(var y=new C(i,n.line,n.ch,t);;){var g=f(y,u);if(!g)break;var _=new C(i,n.line,n.ch,t),b=s(_,g.tag);if(b)return{open:g,close:b}}},ae.scanForClosingTag=function(i,n,t,u){var y=new C(i,n.line,n.ch,u?{from:0,to:u}:null);return s(y,t)}})},p5ED:function($e,We,z){"use strict";var ae=z("+L6B"),Z=z("2/Rp"),U=z("5Dmo"),w=z("3S7+"),P=z("k1fw"),S=z("tJVT"),C=z("q1tI"),T=z.n(C),l=z("vHTk"),p=z.n(l),h=z("yEEn"),d=z("ZW9T"),o=z("1vsH");We.a=function(c){var s=c.name,f=c.data,i=c.theme,n=c.type,t=c.filename,u=c.monacoEditor,y=c.className,g=c.style,_=c.close,b=c.onClose,v=c.hasMask,m=Object(C.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),E=Object(S.a)(m,2),a=E[0],x=E[1],O=Object(C.useState)(""),A=Object(S.a)(O,2),D=A[0],I=A[1],F=Object(C.useRef)();t&&(u.filename=t),Object(C.useEffect)(function(){var j,G,X=(j=document.cookie)===null||j===void 0||((G=j.replace(/\s/g,""))===null||G===void 0)?void 0:G.split(";");X==null||X.map(function(J){var B=J.split("=");B[0]==="_educoder_session"&&I(B[1])})},[]);var K=function(){if(f.startsWith("http")||f.startsWith("/")){ne();return}Object(o.y)(t||"educoder",f,t)},ne=function(){Object(o.w)(t||s,f)};return console.log("data:",f,"fileanme:",t," name:",s),T.a.createElement("div",{style:Object(P.a)({},g||{}),className:"".concat(v&&p.a.bgBlack," ").concat(n?p.a.wrp:"hide")},_&&T.a.createElement("div",{className:p.a.close,ref:F},T.a.createElement(w.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return F.current}},T.a.createElement("span",{onClick:ne},T.a.createElement("i",{className:"icon-quxiaozhiding"}))),T.a.createElement(w.a,{title:"\u5173\u95ED",getPopupContainer:function(){return F.current}},T.a.createElement("span",{className:"",onClick:b},T.a.createElement("i",{className:"icon-guanbi1"})))),T.a.createElement("div",{className:"".concat(p.a[y]," ").concat(y," ").concat(p.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&T.a.createElement(d.b,u)),n==="audio"&&T.a.createElement("audio",{src:"".concat(f!=null&&f.startsWith("/")||(f==null?void 0:f.indexOf("https://"))>-1?f:"data:audio/mp3;base64,").concat(f),autoPlay:!0}),n==="video"&&T.a.createElement(T.a.Fragment,null,f!=null&&f.startsWith("/")?T.a.createElement("video",{controls:!0,src:"".concat(f),autoPlay:!0}):T.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(f),autoPlay:!0})),n==="pdf"&&T.a.createElement("embed",{className:p.a.embed,src:f}),n==="image"&&T.a.createElement(T.a.Fragment,null,T.a.createElement("img",{src:"".concat(f!=null&&f.startsWith("/")||(f==null?void 0:f.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(f)})),n==="other"&&T.a.createElement("div",null,T.a.createElement(Z.a,{type:"primary",size:"large",onClick:K},T.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&T.a.createElement(Z.a,{type:"primary",size:"large",onClick:K},T.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function($e,We,z){},pYxM:function($e,We,z){$e.exports={flex_box_center:"flex_box_center___v-DUT",flex_space_between:"flex_space_between___1bRJc",flex_box_vertical_center:"flex_box_vertical_center___k_OZG",flex_box_center_end:"flex_box_center_end___2lt4j",flex_box_column:"flex_box_column___3fVE5",active:"active___-vjVj",line:"line___3pg8N",list:"list___3yqVJ",left:"left___2dr70",mask:"mask___186YH",right:"right___17A6Y",name:"name___v6M7T",title:"title___1BhMz",a:"a___3T4cN",b:"b___1z1Bk",des:"des___29QAn",tag:"tag___FfUI2"}},ppsT:function($e,We,z){(function(ae){var Z,Z;!function(U){if(!0)window.OSS=U(),$e.exports=U();else var w}(function(){var U;return function(){function w(P,S,C){function T(h,d){if(!S[h]){if(!P[h]){var o=typeof Z=="function"&&Z;if(!d&&o)return Z(h,!0);if(l)return l(h,!0);var c=new Error("Cannot find module '"+h+"'");throw c.code="MODULE_NOT_FOUND",c}var s=S[h]={exports:{}};P[h][0].call(s.exports,function(f){return T(P[h][1][f]||f)},s,s.exports,w,P,S,C)}return S[h].exports}for(var l=typeof Z=="function"&&Z,p=0;p<C.length;p++)T(C[p]);return T}return w}()({1:[function(w,P,S){"use strict";var C=w("./browser/client");C.Buffer=w("buffer").Buffer,C.co=w("co"),C.urllib=w("../shims/xhr"),C.version=w("./browser/version").version,P.exports=C},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(w,P,S){(function(C,T){"use strict";function l(J){return J&&J.__esModule?J:{default:J}}function p(J,B){return J[B]||J[B.toLowerCase()]}function h(J,B){var Q=a.parse(J);if(!Q.protocol){var ie=B?"https://":"http://";Q=a.parse(ie+J)}if(Q.protocol!=="http:"&&Q.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return Q}function d(J,B,Q){var ie=Q?"https://":"http://",oe=B?"-internal.aliyuncs.com":".aliyuncs.com";return J.substr(0,"vpc100-oss-cn-".length)==="vpc100-oss-cn-"&&(oe=".aliyuncs.com"),a.parse(ie+J+oe)}function o(){return document&&document.location&&document.location.protocol==="https:"}function c(J,B){if(!(this instanceof c))return new c(J,B);J&&J.inited?this.options=J:this.options=c.initOptions(J),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=D,this.agent=this.options.agent||G),this.ctx=B,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var s=w("babel-runtime/regenerator"),f=l(s),i=w("babel-runtime/core-js/object/keys"),n=l(i),t=w("debug")("ali-oss"),u=w("./../../shims/crypto/crypto.js"),y=w("path"),g=w("copy-to"),_=w("mime"),b=w("xml2js"),v=w("humanize-ms"),m=w("agentkeepalive"),E=w("merge-descriptors"),a=w("url"),x=w("is-type-of"),O=w("platform"),A=w("utility"),D=w("urllib"),I=w("./version"),F=w("dateformat"),K=w("bowser"),ne=w("../common/signUtils"),j=w("../common/utils"),G=new m;P.exports=c,c.initOptions=function(J){if(!J||!J.accessKeyId||!J.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var B=o(),Q={region:"oss-cn-hangzhou",internal:!1,secure:B,bucket:null,endpoint:null,cname:!1};if((0,n.default)(J).forEach(function(ie){J[ie]!==void 0&&(Q[ie]=J[ie])}),Q.accessKeyId=Q.accessKeyId.trim(),Q.accessKeySecret=Q.accessKeySecret.trim(),Q.timeout&&(Q.timeout=v(Q.timeout)),Q.endpoint)Q.endpoint=h(Q.endpoint,Q.secure);else{if(!Q.region)throw new Error("require options.endpoint or options.region");Q.endpoint=d(Q.region,Q.internal,Q.secure)}return Q.inited=!0,Q};var X=c.prototype;E(X,w("./object")),E(X,w("./managed_upload")),E(X,w("../common/multipart")),E(X,w("../common/thunkpool.js")),c.Wrapper=w("./wrapper"),X.signature=function(J){return t("authorization stringToSign: %s",J),ne.computeSignature(this.options.accessKeySecret,J)},X.authorization=function(J,B,Q,ie){var oe=ne.buildCanonicalString(J.toUpperCase(),B,{headers:ie,parameters:Q});return ne.authorization(this.options.accessKeyId,this.options.accessKeySecret,oe)},X.createRequest=function(J){var B={"x-oss-date":F(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(B["x-oss-security-token"]=this.options.stsToken),g(J.headers).to(B),p(B,"Content-Type")||(J.mime===_.default_type&&(J.mime=""),J.mime&&J.mime.indexOf("/")>0?B["Content-Type"]=J.mime:B["Content-Type"]=_.getType(J.mime||y.extname(J.object||""))||"application/octet-stream"),J.content&&(B["Content-Md5"]=u.createHash("md5").update(new T(J.content,"utf8")).digest("base64"),B["Content-Length"]||(B["Content-Length"]=J.content.length));var Q=this._getResource(J);B.authorization=this.authorization(J.method,Q,J.subres,B);var ie=this._getReqUrl(J);t("request %s %s, with headers %j, !!stream: %s",J.method,ie,B,!!J.stream);var oe=J.timeout||this.options.timeout;return{url:ie,params:{agent:this.agent,method:J.method,content:J.content,stream:J.stream,headers:B,timeout:oe,writeStream:J.writeStream,customResponse:J.customResponse,ctx:J.ctx||this.ctx}}},X.request=f.default.mark(function J(B){var Q,ie,oe,xe;return f.default.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return Q=this.createRequest(B),ie=void 0,oe=void 0,ye.prev=3,ye.next=6,this.urllib.request(Q.url,Q.params);case 6:ie=ye.sent,t("response %s %s, got %s, headers: %j",B.method,Q.url,ie.status,ie.headers),ye.next=13;break;case 10:ye.prev=10,ye.t0=ye.catch(3),oe=ye.t0;case 13:if(xe=void 0,!ie||!B.successStatuses||B.successStatuses.indexOf(ie.status)!==-1){ye.next=26;break}return ye.next=17,this.requestError(ie);case 17:if(xe=ye.sent,xe.code!=="RequestTimeTooSkewed"){ye.next=23;break}return this.options.amendTimeSkewed=+new Date(xe.serverTime)-new Date,ye.next=22,this.request(B);case 22:return ye.abrupt("return",ye.sent);case 23:xe.params=B,ye.next=30;break;case 26:if(!oe){ye.next=30;break}return ye.next=29,this.requestError(oe);case 29:xe=ye.sent;case 30:if(!xe){ye.next=32;break}throw xe;case 32:if(!B.xmlResponse){ye.next=36;break}return ye.next=35,this.parseXML(ie.data);case 35:ie.data=ye.sent;case 36:return ye.abrupt("return",ie);case 37:case"end":return ye.stop()}},J,this,[[3,10]])}),X._getResource=function(J){var B="/";return J.bucket&&(B+=J.bucket+"/"),J.object&&(B+=J.object),B},X._isIP=function(J){return j._isIP(J)},X._escape=function(J){return A.encodeURIComponent(J).replace(/%2F/g,"/")},X._getReqUrl=function(J){var B={};g(this.options.endpoint).to(B);var Q=this._isIP(B.hostname),ie=this.options.cname;!J.bucket||ie||Q||(B.host=J.bucket+"."+B.host);var oe="/";J.bucket&&Q&&(oe+=J.bucket+"/"),J.object&&(oe+=this._escape(J.object).replace(/\+/g,"%2B")),B.pathname=oe;var xe={};if(J.query&&E(xe,J.query),J.subres){var ye={};x.string(J.subres)?ye[J.subres]="":x.array(J.subres)?J.subres.forEach(function(Ae){ye[Ae]=""}):ye=J.subres,E(xe,ye)}return B.query=xe,a.format(B)},X._getUserAgent=function(){var J=C&&C.browser?"js":"nodejs",B="aliyun-sdk-"+J+"/"+I.version,Q=O.description;return!Q&&C&&(Q="Node.js "+C.version.slice(1)+" on "+C.platform+" "+C.arch),this._checkUserAgent(B+" "+Q)},X._checkUserAgent=function(J){return J.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},X.checkBrowserAndVersion=function(J,B){return K.name===J&&K.version.split(".")[0]===B},X.parseXML=function(J){return function(B){T.isBuffer(J)&&(J=J.toString()),b.parseString(J,{explicitRoot:!1,explicitArray:!1},B)}},X.requestError=f.default.mark(function J(B){var Q,ie,oe,xe;return f.default.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(Q=null,B.data&&B.data.length){ye.next=5;break}B.status===-1||B.status===-2?(Q=new Error(B.message),Q.name=B.name,Q.status=B.status,Q.code=B.name):(B.status===404?(Q=new Error("Object not exists"),Q.name="NoSuchKeyError",Q.status=404,Q.code="NoSuchKey"):B.status===412?(Q=new Error("Pre condition failed"),Q.name="PreconditionFailedError",Q.status=412,Q.code="PreconditionFailed"):(Q=new Error("Unknow error, status: "+B.status),Q.name="UnknowError",Q.status=B.status),Q.requestId=B.headers["x-oss-request-id"],Q.host=""),ye.next=30;break;case 5:return ie=String(B.data),t("request response error data: %s",ie),oe=void 0,ye.prev=8,ye.next=11,this.parseXML(ie)||{};case 11:oe=ye.sent,ye.next=21;break;case 14:return ye.prev=14,ye.t0=ye.catch(8),t(ie),ye.t0.message+=`
raw xml: `+ie,ye.t0.status=B.status,ye.t0.requestId=B.headers["x-oss-request-id"],ye.abrupt("return",ye.t0);case 21:xe=oe.Message||"unknow request error, status: "+B.status,oe.Condition&&(xe+=" (condition: "+oe.Condition+")"),Q=new Error(xe),Q.name=oe.Code?oe.Code+"Error":"UnknowError",Q.status=B.status,Q.code=oe.Code,Q.requestId=oe.RequestId,Q.hostId=oe.HostId,Q.serverTime=oe.ServerTime;case 30:return t("generate error %j",Q),ye.abrupt("return",Q);case 32:case"end":return ye.stop()}},J,this,[[8,14]])})}).call(this,w("_process"),w("buffer").Buffer)},{"../common/multipart":8,"../common/signUtils":9,"../common/thunkpool.js":10,"../common/utils":11,"./../../shims/crypto/crypto.js":237,"./managed_upload":3,"./object":4,"./version":5,"./wrapper":6,_process:173,agentkeepalive:12,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,bowser:35,buffer:38,"copy-to":43,dateformat:154,debug:155,"humanize-ms":160,"is-type-of":165,"merge-descriptors":168,mime:242,path:170,platform:171,url:203,urllib:244,utility:243,xml2js:213}],3:[function(w,P,S){(function(C){"use strict";function T(g){return g&&g.__esModule?g:{default:g}}function l(g,_){if(!(this instanceof l))return new l(g,_);y.call(this,_),this.file=g,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var p=w("babel-runtime/core-js/array/from"),h=T(p),d=w("babel-runtime/regenerator"),o=T(d),c=w("is-type-of"),s=w("util"),f=w("path"),i=w("mime"),n=w("copy-to"),t=S;t.multipartUpload=o.default.mark(function g(_,b,v){var m,E,a,x,O,A,D,I,F;return o.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:if(this.resetCancelFlag(),v=v||{},!v.checkpoint||!v.checkpoint.uploadId){K.next=6;break}return K.next=5,this._resumeMultipart(v.checkpoint,v);case 5:return K.abrupt("return",K.sent);case 6:return m=102400,v.mime||(c.file(b)?v.mime=i.getType(f.extname(b.name)):c.blob(b)?v.mime=b.type:v.mime=i.getType(f.extname(b))),v.headers=v.headers||{},this._convertMetaToHeaders(v.meta,v.headers),K.next=12,this._getFileSize(b);case 12:if(!((E=K.sent)<m)){K.next=25;break}return a=this._createStream(b,0,E),v.contentLength=E,K.next=18,this.putStream(_,a,v);case 18:if(x=K.sent,!v||!v.progress){K.next=22;break}return K.next=22,v.progress(1);case 22:return O={res:x.res,bucket:this.options.bucket,name:_,etag:x.res.headers.etag},(v.headers&&v.headers["x-oss-callback"]||v.callback)&&(O.data=x.data),K.abrupt("return",O);case 25:if(!(v.partSize&&v.partSize<m)){K.next=27;break}throw new Error("partSize must not be smaller than "+m);case 27:return K.next=29,this.initMultipartUpload(_,v);case 29:if(A=K.sent,D=A.uploadId,I=this._getPartSize(E,v.partSize),F={file:b,name:_,fileSize:E,partSize:I,uploadId:D,doneParts:[]},!v||!v.progress){K.next=36;break}return K.next=36,v.progress(0,F,A.res);case 36:return K.next=38,this._resumeMultipart(F,v);case 38:return K.abrupt("return",K.sent);case 39:case"end":return K.stop()}},g,this)}),t._resumeMultipart=o.default.mark(function g(_,b){var v,m,E,a,x,O,A,D,I,F,K,ne,j,G,X,J,B,Q,ie,oe,xe;return o.default.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(!this.isCancel()){ye.next=2;break}throw this._makeCancelEvent();case 2:if(v=_.file,m=_.fileSize,E=_.partSize,a=_.uploadId,x=_.doneParts,O=_.name,A=[],x.length>0&&n(x).to(A),D=this._divideParts(m,E),I=D.length,F=!1,K=o.default.mark(function Ae(pe,Oe){var Fe,Me,Ce;return o.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(pe.isCancel()){Le.next=21;break}return Le.prev=1,Fe=D[Oe-1],Me={stream:pe._createStream(v,Fe.start,Fe.end),size:Fe.end-Fe.start},Le.next=6,pe._uploadPart(O,a,Oe,Me);case 6:if(Ce=Le.sent,pe.isCancel()||F){Le.next=13;break}if(_.doneParts.push({number:Oe,etag:Ce.res.headers.etag}),A.push({number:Oe,etag:Ce.res.headers.etag}),!b||!b.progress){Le.next=13;break}return Le.next=13,b.progress(x.length/I,_,Ce.res);case 13:Le.next=21;break;case 15:if(Le.prev=15,Le.t0=Le.catch(1),pe.isCancel()){Le.next=21;break}throw pe.cancel(),Le.t0.partNum=Oe,Le.t0;case 21:case"end":return Le.stop()}},Ae,this,[[1,15]])}),ne=(0,h.default)(new Array(I),function(Ae,pe){return pe+1}),j=A.map(function(Ae){return Ae.number}),G=ne.filter(function(Ae){return j.indexOf(Ae)<0}),X=5,J=b.parallel||X,!this.checkBrowserAndVersion("Internet Explorer","10")&&J!==1){ye.next=26;break}B=0;case 16:if(!(B<G.length)){ye.next=24;break}if(!this.isCancel()){ye.next=19;break}throw this._makeCancelEvent();case 19:return ye.next=21,K(this,G[B]);case 21:B++,ye.next=16;break;case 24:ye.next=40;break;case 26:for(Q=[],ie=0;ie<G.length;ie++)Q.push(K(this,G[ie]));return ye.next=30,this._thunkPool(Q,J);case 30:if(oe=ye.sent,F=!0,!(oe&&oe.length>0)){ye.next=37;break}throw this.resetCancelFlag(),xe=oe[0],xe.message="Failed to upload some parts with error: "+xe.toString()+" part_num: "+xe.partNum,xe;case 37:if(!this.isCancel()){ye.next=40;break}throw Q=null,this._makeCancelEvent();case 40:return ye.next=42,this.completeMultipartUpload(O,a,A,b);case 42:return ye.abrupt("return",ye.sent);case 43:case"end":return ye.stop()}},g,this)}),c.file=function(g){return typeof File!="undefined"&&g instanceof File},c.blob=function(g){return typeof Blob!="undefined"&&g instanceof Blob},t._getFileSize=o.default.mark(function g(_){var b;return o.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(!c.buffer(_)){v.next=4;break}return v.abrupt("return",_.length);case 4:if(!c.blob(_)&&!c.file(_)){v.next=6;break}return v.abrupt("return",_.size);case 6:if(!c.string(_)){v.next=11;break}return v.next=9,this._statFile(_);case 9:return b=v.sent,v.abrupt("return",b.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return v.stop()}},g,this)});var u=w("stream"),y=u.Readable;s.inherits(l,y),l.prototype.readFileAndPush=function(g){if(this.fileBuffer)for(var _=!0;_&&this.fileBuffer&&this.start<this.fileBuffer.length;){var b=this.start,v=b+g;v=v>this.fileBuffer.length?this.fileBuffer.length:v,this.start=v,_=this.push(this.fileBuffer.slice(b,v))}},l.prototype._read=function(g){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);g=g||16384;var _=this;this.reader.onload=function(b){_.fileBuffer=new C(new Uint8Array(b.target.result)),_.file=null,_.readFileAndPush(g)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(g)},t._createStream=function(g,_,b){if(c.blob(g)||c.file(g))return new l(g.slice(_,b));throw new Error("_createStream requires File/String.")},t._getPartSize=function(g,_){return _?Math.max(Math.ceil(g/1e4),_):1048576},t._divideParts=function(g,_){for(var b=Math.ceil(g/_),v=[],m=0;m<b;m++){var E=_*m,a=Math.min(E+_,g);v.push({start:E,end:a})}return v},t._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,w("buffer").Buffer)},{"babel-runtime/core-js/array/from":16,"babel-runtime/regenerator":33,buffer:38,"copy-to":43,"is-type-of":165,mime:242,path:170,stream:195,util:207}],4:[function(w,P,S){"use strict";function C(_){return _&&_.__esModule?_:{default:_}}var T=w("babel-runtime/core-js/object/keys"),l=C(T),p=w("babel-runtime/regenerator"),h=C(p),d=w("debug")("ali-oss:object"),o=w("utility"),c=w("fs"),s=w("is-type-of"),f=w("url"),i=w("copy-to"),n=w("path"),t=w("mime"),u=w("../common/callback"),y=w("../common/signUtils"),g=S;g.append=h.default.mark(function _(b,v,m){var E;return h.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return m=m||{},m.position===void 0&&(m.position="0"),m.subres={append:"",position:m.position},m.method="POST",a.next=6,this.put(b,v,m);case 6:return E=a.sent,E.nextAppendPosition=E.res.headers["x-oss-next-append-position"],a.abrupt("return",E);case 9:case"end":return a.stop()}},_,this)}),g.put=h.default.mark(function _(b,v,m){var E,a,x,O,A,D;return h.default.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(E=void 0,m=m||{},!s.buffer(v)){I.next=6;break}E=v,I.next=18;break;case 6:if(!s.blob(v)&&!s.file(v)){I.next=17;break}return m.mime||(s.file(v)?m.mime=t.getType(n.extname(v.name)):m.mime=v.type),a=this._createStream(v,0,v.size),I.next=11,this._getFileSize(v);case 11:return m.contentLength=I.sent,I.next=14,this.putStream(b,a,m);case 14:return I.abrupt("return",I.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return m.headers=m.headers||{},this._convertMetaToHeaders(m.meta,m.headers),x=m.method||"PUT",O=this._objectRequestParams(x,b,m),u.encodeCallback(O,m),O.mime=m.mime,O.content=E,O.successStatuses=[200],I.next=28,this.request(O);case 28:return A=I.sent,D={name:b,url:this._objectUrl(b),res:A.res},O.headers&&O.headers["x-oss-callback"]&&(D.data=JSON.parse(A.data.toString())),I.abrupt("return",D);case 32:case"end":return I.stop()}},_,this)}),g.putStream=h.default.mark(function _(b,v,m){var E,a,x,O;return h.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return m=m||{},m.headers=m.headers||{},m.contentLength?m.headers["Content-Length"]=m.contentLength:m.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(m.meta,m.headers),E=m.method||"PUT",a=this._objectRequestParams(E,b,m),u.encodeCallback(a,m),a.mime=m.mime,a.stream=v,a.successStatuses=[200],A.next=12,this.request(a);case 12:return x=A.sent,O={name:b,url:this._objectUrl(b),res:x.res},a.headers&&a.headers["x-oss-callback"]&&(O.data=JSON.parse(x.data.toString())),A.abrupt("return",O);case 16:case"end":return A.stop()}},_,this)}),g.head=h.default.mark(function _(b,v){var m,E,a;return h.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return m=this._objectRequestParams("HEAD",b,v),m.successStatuses=[200,304],x.next=4,this.request(m);case 4:return E=x.sent,a={meta:null,res:E.res,status:E.status},E.status===200&&(0,l.default)(E.headers).forEach(function(O){O.indexOf("x-oss-meta-")===0&&(a.meta||(a.meta={}),a.meta[O.substring(11)]=E.headers[O])}),x.abrupt("return",a);case 8:case"end":return x.stop()}},_,this)}),g.get=h.default.mark(function _(b,v,m){var E,a,x,O;return h.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return E=null,a=!1,s.writableStream(v)?E=v:s.string(v)?(E=c.createWriteStream(v),a=!0):m=v,m=m||{},m.process&&(m.subres=m.subres||{},m.subres["x-oss-process"]=m.process),x=void 0,A.prev=6,O=this._objectRequestParams("GET",b,m),O.writeStream=E,O.successStatuses=[200,206,304],A.next=12,this.request(O);case 12:x=A.sent,a&&E.destroy(),A.next=24;break;case 16:if(A.prev=16,A.t0=A.catch(6),!a){A.next=23;break}return E.destroy(),d("get error: %s, delete the exists file %s",A.t0,v),A.next=23,this._deleteFileSafe(v);case 23:throw A.t0;case 24:return A.abrupt("return",{res:x.res,content:x.data});case 25:case"end":return A.stop()}},_,this,[[6,16]])}),g.getStream=h.default.mark(function _(b,v){var m,E;return h.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return v=v||{},m=this._objectRequestParams("GET",b,v),m.customResponse=!0,m.successStatuses=[200,206,304],a.next=6,this.request(m);case 6:return E=a.sent,a.abrupt("return",{stream:E.res,res:{status:E.status,headers:E.headers}});case 8:case"end":return a.stop()}},_,this)}),g.delete=h.default.mark(function _(b,v){var m,E;return h.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return m=this._objectRequestParams("DELETE",b,v),m.successStatuses=[204],a.next=4,this.request(m);case 4:return E=a.sent,a.abrupt("return",{res:E.res});case 6:case"end":return a.stop()}},_,this)}),g.deleteMulti=h.default.mark(function _(b,v){var m,E,a,x,O,A;return h.default.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:for(v=v||{},m=`<?xml version="1.0" encoding="UTF-8"?>
<Delete>
`,v.quiet?m+=` <Quiet>true</Quiet>
`:m+=` <Quiet>false</Quiet>
`,E=0;E<b.length;E++)m+=" <Object><Key>"+o.escape(this._objectName(b[E]))+`</Key></Object>
`;return m+="</Delete>",d("delete multi objects: %s",m),v.subres="delete",a=this._objectRequestParams("POST","",v),a.mime="xml",a.content=m,a.xmlResponse=!0,a.successStatuses=[200],D.next=14,this.request(a);case 14:return x=D.sent,O=x.data,A=O&&O.Deleted||null,A&&(Array.isArray(A)||(A=[A]),A=A.map(function(I){return I.Key})),D.abrupt("return",{res:x.res,deleted:A});case 19:case"end":return D.stop()}},_,this)}),g.copy=h.default.mark(function _(b,v,m){var E,a,x;return h.default.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return m=m||{},m.headers=m.headers||{},(0,l.default)(m.headers).forEach(function(A){m.headers["x-oss-copy-source-"+A.toLowerCase()]=m.headers[A]}),m.meta&&(m.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(m.meta,m.headers),v=v[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(v):"/"+encodeURIComponent(v.slice(1)),m.headers["x-oss-copy-source"]=v,E=this._objectRequestParams("PUT",b,m),E.xmlResponse=!0,E.successStatuses=[200,304],O.next=12,this.request(E);case 12:return a=O.sent,x=a.data,x&&(x={etag:x.ETag,lastModified:x.LastModified}),O.abrupt("return",{data:x,res:a.res});case 16:case"end":return O.stop()}},_,this)}),g.putMeta=h.default.mark(function _(b,v,m){return h.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,this.copy(b,b,{meta:v||{},timeout:m&&m.timeout,ctx:m&&m.ctx});case 2:return E.abrupt("return",E.sent);case 3:case"end":return E.stop()}},_,this)}),g.list=h.default.mark(function _(b,v){var m,E,a,x,O;return h.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return m=this._objectRequestParams("GET","",v),m.query=b,m.xmlResponse=!0,m.successStatuses=[200],A.next=6,this.request(m);case 6:return E=A.sent,a=E.data.Contents,x=this,a&&(Array.isArray(a)||(a=[a]),a=a.map(function(D){return{name:D.Key,url:x._objectUrl(D.Key),lastModified:D.LastModified,etag:D.ETag,type:D.Type,size:Number(D.Size),storageClass:D.StorageClass,owner:{id:D.Owner.ID,displayName:D.Owner.DisplayName}}})),O=E.data.CommonPrefixes||null,O&&(Array.isArray(O)||(O=[O]),O=O.map(function(D){return D.Prefix})),A.abrupt("return",{res:E.res,objects:a,prefixes:O,nextMarker:E.data.NextMarker||null,isTruncated:E.data.IsTruncated==="true"});case 13:case"end":return A.stop()}},_,this)}),g.putACL=h.default.mark(function _(b,v,m){var E,a;return h.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return m=m||{},m.subres="acl",m.headers=m.headers||{},m.headers["x-oss-object-acl"]=v,b=this._objectName(b),E=this._objectRequestParams("PUT",b,m),E.successStatuses=[200],x.next=9,this.request(E);case 9:return a=x.sent,x.abrupt("return",{res:a.res});case 11:case"end":return x.stop()}},_,this)}),g.getACL=h.default.mark(function _(b,v){var m,E;return h.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return v=v||{},v.subres="acl",b=this._objectName(b),m=this._objectRequestParams("GET",b,v),m.successStatuses=[200],m.xmlResponse=!0,a.next=8,this.request(m);case 8:return E=a.sent,a.abrupt("return",{acl:E.data.AccessControlList.Grant,owner:{id:E.data.Owner.ID,displayName:E.data.Owner.DisplayName},res:E.res});case 10:case"end":return a.stop()}},_,this)}),g.restore=h.default.mark(function _(b,v){var m,E;return h.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return v=v||{},v.subres="restore",m=this._objectRequestParams("POST",b,v),m.successStatuses=[202],a.next=6,this.request(m);case 6:return E=a.sent,a.abrupt("return",{res:E.res});case 8:case"end":return a.stop()}},_,this)}),g.signatureUrl=function(_,b){b=b||{},_=this._objectName(_),b.method=b.method||"GET";var v=o.timestamp()+(b.expires||1800),m={bucket:this.options.bucket,object:_},E=this._getResource(m);this.options.stsToken&&(b["security-token"]=this.options.stsToken);var a=y._signatureForURL(this.options.accessKeySecret,b,E,v),x=f.parse(this._getReqUrl(m));return x.query={OSSAccessKeyId:this.options.accessKeyId,Expires:v,Signature:a.Signature},i(a.subResource).to(x.query),x.format()},g.getObjectUrl=function(_,b){return b?b[b.length-1]!=="/"&&(b+="/"):b=this.options.endpoint.format(),b+this._escape(this._objectName(_))},g._objectUrl=function(_){return this._getReqUrl({bucket:this.options.bucket,object:_})},g.generateObjectUrl=function(_,b){if(b)b[b.length-1]!=="/"&&(b+="/");else{b=this.options.endpoint.format();var v=f.parse(b),m=this.options.bucket;v.hostname=m+"."+v.hostname,v.host=m+"."+v.host,b=v.format()}return b+this._escape(this._objectName(_))},g._objectRequestParams=function(_,b,v){if(!this.options.bucket)throw new Error("Please create a bucket first");v=v||{},b=this._objectName(b);var m={object:b,bucket:this.options.bucket,method:_,subres:v&&v.subres,timeout:v&&v.timeout,ctx:v&&v.ctx};return v.headers&&(m.headers={},i(v.headers).to(m.headers)),m},g._objectName=function(_){return _.replace(/^\/+/,"")},g._statFile=function(_){return function(b){c.stat(_,b)}},g._convertMetaToHeaders=function(_,b){_&&(0,l.default)(_).forEach(function(v){b["x-oss-meta-"+v]=_[v]})},g._deleteFileSafe=function(_){return function(b){c.exists(_,function(v){v?c.unlink(_,function(m){m&&d("unlink %j error: %s",_,m),b()}):b()})}}},{"../common/callback":7,"../common/signUtils":9,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,"copy-to":43,debug:155,fs:36,"is-type-of":165,mime:242,path:170,url:203,utility:243}],5:[function(w,P,S){"use strict";S.version="5.3.1"},{}],6:[function(w,P,S){"use strict";function C(n){return n&&n.__esModule?n:{default:n}}function T(n){return n&&typeof n.next=="function"&&typeof n.throw=="function"}function l(n){if(!n)return!1;var t=n.constructor;return!!t&&(t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction"||T(t.prototype)||T(n.prototype))}function p(n,t){var u=new n(t),y=(0,s.default)(u),g=(0,s.default)((0,o.default)(u));y.concat(g).forEach(function(_){l(u[_])?this[_]=f.wrap(u[_]).bind(u):this[_]=u[_]},this)}function h(n){if(!(this instanceof h))return new h(n);p.call(this,i,n)}var d=w("babel-runtime/core-js/object/get-prototype-of"),o=C(d),c=w("babel-runtime/core-js/object/keys"),s=C(c),f=w("co"),i=w("./client");P.exports=h,h.STS=function n(t){if(!(this instanceof n))return new n(t);p.call(this,i.STS,t)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(w,P,S){(function(C){"use strict";function T(o){return o&&o.__esModule?o:{default:o}}var l=w("babel-runtime/core-js/object/keys"),p=T(l),h=w("babel-runtime/core-js/json/stringify"),d=T(h);S.encodeCallback=function(o,c){if(o.headers=o.headers||{},!Object.prototype.hasOwnProperty.call(o.headers,"x-oss-callback")&&c.callback){var s={callbackUrl:encodeURI(c.callback.url),callbackBody:c.callback.body};c.callback.host&&(s.callbackHost=c.callback.host),c.callback.contentType&&(s.callbackBodyType=c.callback.contentType);var f=new C((0,d.default)(s)).toString("base64");if(o.headers["x-oss-callback"]=f,c.callback.customValue){var i={};(0,p.default)(c.callback.customValue).forEach(function(n){i["x:"+n]=c.callback.customValue[n]}),o.headers["x-oss-callback-var"]=new C((0,d.default)(i)).toString("base64")}}}}).call(this,w("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(w,P,S){"use strict";var C=w("babel-runtime/regenerator"),T=function(d){return d&&d.__esModule?d:{default:d}}(C),l=w("copy-to"),p=w("./callback"),h=S;h.listUploads=T.default.mark(function d(o,c){var s,f,i,n;return T.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=c||{},s={},l(c).to(s),s.subres="uploads",f=this._objectRequestParams("GET","",s),f.query=o,f.xmlResponse=!0,f.successStatuses=[200],t.next=10,this.request(f);case 10:return i=t.sent,n=i.data.Upload||[],Array.isArray(n)||(n=[n]),n=n.map(function(u){return{name:u.Key,uploadId:u.UploadId,initiated:u.Initiated}}),t.abrupt("return",{res:i.res,uploads:n,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:i.data.IsTruncated==="true"});case 15:case"end":return t.stop()}},d,this)}),h.listParts=T.default.mark(function d(o,c,s,f){var i,n,t;return T.default.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return f=f||{},i={},l(f).to(i),i.subres={uploadId:c},n=this._objectRequestParams("GET",o,i),n.query=s,n.xmlResponse=!0,n.successStatuses=[200],u.next=10,this.request(n);case 10:return t=u.sent,u.abrupt("return",{res:t.res,uploadId:t.data.UploadId,bucket:t.data.Bucket,name:t.data.Key,partNumberMarker:t.data.PartNumberMarker,nextPartNumberMarker:t.data.NextPartNumberMarker,maxParts:t.data.MaxParts,isTruncated:t.data.IsTruncated,parts:t.data.Part||[]});case 12:case"end":return u.stop()}},d,this)}),h.abortMultipartUpload=T.default.mark(function d(o,c,s){var f,i,n;return T.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.cancel(),s=s||{},f={},l(s).to(f),f.subres={uploadId:c},i=this._objectRequestParams("DELETE",o,f),i.successStatuses=[204],t.next=9,this.request(i);case 9:return n=t.sent,t.abrupt("return",{res:n.res});case 11:case"end":return t.stop()}},d,this)}),h.initMultipartUpload=T.default.mark(function d(o,c){var s,f,i;return T.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return c=c||{},s={},l(c).to(s),s.headers=s.headers||{},this._convertMetaToHeaders(c.meta,s.headers),s.subres="uploads",f=this._objectRequestParams("POST",o,s),f.mime=c.mime,f.xmlResponse=!0,f.successStatuses=[200],n.next=12,this.request(f);case 12:return i=n.sent,n.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return n.stop()}},d,this)}),h.uploadPart=T.default.mark(function d(o,c,s,f,i,n,t){var u;return T.default.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return u={stream:this._createStream(f,i,n),size:n-i},y.next=3,this._uploadPart(o,c,s,u,t);case 3:return y.abrupt("return",y.sent);case 4:case"end":return y.stop()}},d,this)}),h.completeMultipartUpload=T.default.mark(function d(o,c,s,f){var i,n,t,u,y,g,_,b;return T.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:for(i=s.concat().sort(function(m,E){return m.number-E.number}).filter(function(m,E,a){return!E||m.number!==a[E-1].number}),n=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,t=0;t<i.length;t++)u=i[t],n+=`<Part>
`,n+="<PartNumber>"+u.number+`</PartNumber>
`,n+="<ETag>"+u.etag+`</ETag>
`,n+=`</Part>
`;return n+="</CompleteMultipartUpload>",f=f||{},y={},l(f).to(y),y.subres={uploadId:c},g=this._objectRequestParams("POST",o,y),p.encodeCallback(g,y),g.mime="xml",g.content=n,g.headers&&g.headers["x-oss-callback"]||(g.xmlResponse=!0),g.successStatuses=[200],v.next=16,this.request(g);case 16:return _=v.sent,b={res:_.res,bucket:g.bucket,name:o,etag:_.res.headers.etag},g.headers&&g.headers["x-oss-callback"]&&(b.data=JSON.parse(_.data.toString())),v.abrupt("return",b);case 20:case"end":return v.stop()}},d,this)}),h._uploadPart=T.default.mark(function d(o,c,s,f,i){var n,t,u;return T.default.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return i=i||{},n={},l(i).to(n),n.headers={"Content-Length":f.size},n.subres={partNumber:s,uploadId:c},t=this._objectRequestParams("PUT",o,n),t.mime=n.mime,t.stream=f.stream,t.successStatuses=[200],y.next=11,this.request(t);case 11:return u=y.sent,f.stream=null,t.stream=null,y.abrupt("return",{name:o,etag:u.res.headers.etag,res:u.res});case 15:case"end":return y.stop()}},d,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(w,P,S){(function(C){"use strict";function T(s){return s&&s.__esModule?s:{default:s}}var l=w("babel-runtime/core-js/json/stringify"),p=T(l),h=w("babel-runtime/core-js/object/keys"),d=T(h),o=w("./../../shims/crypto/crypto.js"),c=w("is-type-of");S.buildCanonicalizedResource=function(s,f){var i=""+s,n="?";if(c.string(f)&&f.trim()!=="")i+=n+f;else if(c.array(f))f.sort(),i+=n+f.join("&");else if(f){var t=function(y,g){return y[0]>g[0]?1:y[0]<g[0]?-1:0},u=function(y){i+=n+y,f[y]&&(i+="="+f[y]),n="&"};(0,d.default)(f).sort(t).forEach(u)}return i},S.buildCanonicalString=function(s,f,i,n){i=i||{};var t=i.headers||{},u=[],y={},g=[s.toUpperCase(),t["Content-Md5"]||"",t["Content-Type"]||t["Content-Type".toLowerCase()],n||t["x-oss-date"]];return(0,d.default)(t).forEach(function(_){var b=_.toLowerCase();b.indexOf("x-oss-")===0&&(y[b]=String(t[_]).trim())}),(0,d.default)(y).sort().forEach(function(_){u.push(_+":"+y[_])}),g=g.concat(u),g.push(this.buildCanonicalizedResource(f,i.parameters)),g.join(`
`)},S.computeSignature=function(s,f){return o.createHmac("sha1",s).update(new C(f,"utf8")).digest("base64")},S.authorization=function(s,f,i){return"OSS "+s+":"+this.computeSignature(f,i)},S._signatureForURL=function(s,f,i,n){var t={},u={};if(f.process&&(u["x-oss-process"]=f.process),f.response&&(0,d.default)(f.response).forEach(function(b){var v="response-"+b.toLowerCase();u[v]=f.response[b]}),(0,d.default)(f).forEach(function(b){var v=b.toLowerCase(),m=f[b];v.indexOf("x-oss-")===0?t[v]=m:v.indexOf("content-md5")===0||v.indexOf("content-type")===0?t[b]=m:v!=="expires"&&v!=="response"&&v!=="process"&&v!=="method"&&(u[v]=m)}),Object.prototype.hasOwnProperty.call(f,"security-token")&&(u["security-token"]=f["security-token"]),Object.prototype.hasOwnProperty.call(f,"callback")){var y={callbackUrl:encodeURI(f.callback.url),callbackBody:f.callback.body};if(f.callback.host&&(y.callbackHost=f.callback.host),f.callback.contentType&&(y.callbackBodyType=f.callback.contentType),u.callback=new C((0,p.default)(y)).toString("base64"),f.callback.customValue){var g={};(0,d.default)(f.callback.customValue).forEach(function(b){g["x:"+b]=f.callback.customValue[b]}),u["callback-var"]=new C((0,p.default)(g)).toString("base64")}}var _=this.buildCanonicalString(f.method,i,{headers:t,parameters:u},n.toString());return{Signature:this.computeSignature(s,_),subResource:u}}}).call(this,w("buffer").Buffer)},{"./../../shims/crypto/crypto.js":237,"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38,"is-type-of":165}],10:[function(w,P,S){"use strict";var C=w("babel-runtime/regenerator"),T=function(o){return o&&o.__esModule?o:{default:o}}(C),l=w("co"),p=w("co-priority-queue"),h=w("any-promise"),d=S;d._thunkPool=function(o,c){function s(u,y){++n===u.length&&y(t)}function f(u,y){function g(){var a;return T.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:a=void 0;case 1:if(i.isCancel()){x.next=9;break}return x.next=4,v.next();case 4:return a=x.sent,x.next=7,a();case 7:x.next=1;break;case 9:m+=1,m===u&&(v.fns=[],v.buffer=[],y(t));case 11:case"end":return x.stop()}},b,this)}function _(a){console.error(a.stack)}for(var b=T.default.mark(g),v=new p,m=0,E=0;E<u;E++)l(g).catch(_);return function(a,x){return function(O){v.push(T.default.mark(function A(){return T.default.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.prev=0,D.t0=O,D.next=4,a;case 4:D.t1=D.sent,(0,D.t0)(null,D.t1),D.next=11;break;case 8:D.prev=8,D.t2=D.catch(0),O(D.t2);case 11:case"end":return D.stop()}},A,this,[[0,8]])}),x)}}}var i=this,n=0,t=[];return new h(function(u){function y(m){return T.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,b(o[m]);case 2:s(o,u);case 3:case"end":return E.stop()}},_,this)}function g(m){t.push(m),s(o,u)}for(var _=T.default.mark(y),b=new f(c,u),v=0;v<o.length;v++)l(y(v)).catch(g)})},d.cancel=function(){this.options.cancelFlag=!0},d.isCancel=function(){return this.options.cancelFlag},d.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(w,P,S){"use strict";S._isIP=function(C){var T=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,l=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return T.test(C)||l.test(C)}},{}],12:[function(w,P,S){function C(){}P.exports=C,P.exports.HttpsAgent=C},{}],13:[function(w,P,S){P.exports=w("./register")().Promise},{"./register":15}],14:[function(w,P,S){"use strict";var C=null;P.exports=function(T,l){return function(p,h){p=p||null,h=h||{};var d=h.global!==!1;if(C===null&&d&&(C=T["@@any-promise/REGISTRATION"]||null),C!==null&&p!==null&&C.implementation!==p)throw new Error('any-promise already defined as "'+C.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return C===null&&(C=p!==null&&h.Promise!==void 0?{Promise:h.Promise,implementation:p}:l(p),d&&(T["@@any-promise/REGISTRATION"]=C)),C}}},{}],15:[function(w,P,S){"use strict";function C(){if(window.Promise===void 0)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}P.exports=w("./loader")(window,C)},{"./loader":14}],16:[function(w,P,S){P.exports={default:w("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(w,P,S){P.exports={default:w("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(w,P,S){P.exports={default:w("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(w,P,S){P.exports={default:w("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(w,P,S){P.exports={default:w("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(w,P,S){P.exports={default:w("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(w,P,S){P.exports={default:w("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(w,P,S){P.exports={default:w("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(w,P,S){P.exports={default:w("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(w,P,S){P.exports={default:w("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(w,P,S){P.exports={default:w("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(w,P,S){P.exports={default:w("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(w,P,S){P.exports={default:w("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(w,P,S){P.exports={default:w("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(w,P,S){"use strict";S.__esModule=!0,S.default=function(C,T){if(!(C instanceof T))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(w,P,S){"use strict";S.__esModule=!0;var C=w("../core-js/object/define-property"),T=function(l){return l&&l.__esModule?l:{default:l}}(C);S.default=function(){function l(p,h){for(var d=0;d<h.length;d++){var o=h[d];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),(0,T.default)(p,o.key,o)}}return function(p,h,d){return h&&l(p.prototype,h),d&&l(p,d),p}}()},{"../core-js/object/define-property":20}],32:[function(w,P,S){"use strict";function C(o){return o&&o.__esModule?o:{default:o}}S.__esModule=!0;var T=w("../core-js/symbol/iterator"),l=C(T),p=w("../core-js/symbol"),h=C(p),d=typeof h.default=="function"&&typeof l.default=="symbol"?function(o){return typeof o}:function(o){return o&&typeof h.default=="function"&&o.constructor===h.default&&o!==h.default.prototype?"symbol":typeof o};S.default=typeof h.default=="function"&&d(l.default)==="symbol"?function(o){return o===void 0?"undefined":d(o)}:function(o){return o&&typeof h.default=="function"&&o.constructor===h.default&&o!==h.default.prototype?"symbol":o===void 0?"undefined":d(o)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(w,P,S){P.exports=w("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(w,P,S){"use strict";function C(u){var y=u.length;if(y%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=u.indexOf("=");return g===-1&&(g=y),[g,g===y?0:4-g%4]}function T(u){var y=C(u),g=y[0],_=y[1];return 3*(g+_)/4-_}function l(u,y,g){return 3*(y+g)/4-g}function p(u){for(var y,g=C(u),_=g[0],b=g[1],v=new f(l(u,_,b)),m=0,E=b>0?_-4:_,a=0;a<E;a+=4)y=s[u.charCodeAt(a)]<<18|s[u.charCodeAt(a+1)]<<12|s[u.charCodeAt(a+2)]<<6|s[u.charCodeAt(a+3)],v[m++]=y>>16&255,v[m++]=y>>8&255,v[m++]=255&y;return b===2&&(y=s[u.charCodeAt(a)]<<2|s[u.charCodeAt(a+1)]>>4,v[m++]=255&y),b===1&&(y=s[u.charCodeAt(a)]<<10|s[u.charCodeAt(a+1)]<<4|s[u.charCodeAt(a+2)]>>2,v[m++]=y>>8&255,v[m++]=255&y),v}function h(u){return c[u>>18&63]+c[u>>12&63]+c[u>>6&63]+c[63&u]}function d(u,y,g){for(var _,b=[],v=y;v<g;v+=3)_=(u[v]<<16&16711680)+(u[v+1]<<8&65280)+(255&u[v+2]),b.push(h(_));return b.join("")}function o(u){for(var y,g=u.length,_=g%3,b=[],v=0,m=g-_;v<m;v+=16383)b.push(d(u,v,v+16383>m?m:v+16383));return _===1?(y=u[g-1],b.push(c[y>>2]+c[y<<4&63]+"==")):_===2&&(y=(u[g-2]<<8)+u[g-1],b.push(c[y>>10]+c[y>>4&63]+c[y<<2&63]+"=")),b.join("")}S.byteLength=T,S.toByteArray=p,S.fromByteArray=o;for(var c=[],s=[],f=typeof Uint8Array!="undefined"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,t=i.length;n<t;++n)c[n]=i[n],s[i.charCodeAt(n)]=n;s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],35:[function(w,P,S){!function(C,T,l){P!==void 0&&P.exports?P.exports=l():typeof U=="function"&&U.amd?U("bowser",l):C.bowser=l()}(this,0,function(){function C(s){function f(J){var B=s.match(J);return B&&B.length>1&&B[1]||""}function i(J){var B=s.match(J);return B&&B.length>1&&B[2]||""}var n,t=f(/(ipod|iphone|ipad)/i).toLowerCase(),u=/like android/i.test(s),y=!u&&/android/i.test(s),g=/nexus\s*[0-6]\s*/i.test(s),_=!g&&/nexus\s*[0-9]+/i.test(s),b=/CrOS/.test(s),v=/silk/i.test(s),m=/sailfish/i.test(s),E=/tizen/i.test(s),a=/(web|hpw)os/i.test(s),x=/windows phone/i.test(s),O=(/SamsungBrowser/i.test(s),!x&&/windows/i.test(s)),A=!t&&!v&&/macintosh/i.test(s),D=!y&&!m&&!E&&!a&&/linux/i.test(s),I=i(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),F=f(/version\/(\d+(\.\d+)?)/i),K=/tablet/i.test(s)&&!/tablet pc/i.test(s),ne=!K&&/[^-]mobi/i.test(s),j=/xbox/i.test(s);/opera/i.test(s)?n={name:"Opera",opera:o,version:F||f(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(s)?n={name:"Opera",opera:o,version:f(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||F}:/SamsungBrowser/i.test(s)?n={name:"Samsung Internet for Android",samsungBrowser:o,version:F||f(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(s)?n={name:"Opera Coast",coast:o,version:F||f(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(s)?n={name:"Yandex Browser",yandexbrowser:o,version:F||f(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(s)?n={name:"UC Browser",ucbrowser:o,version:f(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(s)?n={name:"Maxthon",maxthon:o,version:f(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(s)?n={name:"Epiphany",epiphany:o,version:f(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(s)?n={name:"Puffin",puffin:o,version:f(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(s)?n={name:"Sleipnir",sleipnir:o,version:f(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(s)?n={name:"K-Meleon",kMeleon:o,version:f(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:x?(n={name:"Windows Phone",osname:"Windows Phone",windowsphone:o},I?(n.msedge=o,n.version=I):(n.msie=o,n.version=f(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(s)?n={name:"Internet Explorer",msie:o,version:f(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:b?n={name:"Chrome",osname:"Chrome OS",chromeos:o,chromeBook:o,chrome:o,version:f(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(s)?n={name:"Microsoft Edge",msedge:o,version:I}:/vivaldi/i.test(s)?n={name:"Vivaldi",vivaldi:o,version:f(/vivaldi\/(\d+(\.\d+)?)/i)||F}:m?n={name:"Sailfish",osname:"Sailfish OS",sailfish:o,version:f(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(s)?n={name:"SeaMonkey",seamonkey:o,version:f(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(s)?(n={name:"Firefox",firefox:o,version:f(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(s)&&(n.firefoxos=o,n.osname="Firefox OS")):v?n={name:"Amazon Silk",silk:o,version:f(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(s)?n={name:"PhantomJS",phantom:o,version:f(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(s)?n={name:"SlimerJS",slimer:o,version:f(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(s)||/rim\stablet/i.test(s)?n={name:"BlackBerry",osname:"BlackBerry OS",blackberry:o,version:F||f(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:a?(n={name:"WebOS",osname:"WebOS",webos:o,version:F||f(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(s)&&(n.touchpad=o)):/bada/i.test(s)?n={name:"Bada",osname:"Bada",bada:o,version:f(/dolfin\/(\d+(\.\d+)?)/i)}:E?n={name:"Tizen",osname:"Tizen",tizen:o,version:f(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||F}:/qupzilla/i.test(s)?n={name:"QupZilla",qupzilla:o,version:f(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||F}:/chromium/i.test(s)?n={name:"Chromium",chromium:o,version:f(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||F}:/chrome|crios|crmo/i.test(s)?n={name:"Chrome",chrome:o,version:f(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:y?n={name:"Android",version:F}:/safari|applewebkit/i.test(s)?(n={name:"Safari",safari:o},F&&(n.version=F)):t?(n={name:t=="iphone"?"iPhone":t=="ipad"?"iPad":"iPod"},F&&(n.version=F)):n=/googlebot/i.test(s)?{name:"Googlebot",googlebot:o,version:f(/googlebot\/(\d+(\.\d+))/i)||F}:{name:f(/^(.*)\/(.*) /),version:i(/^(.*)\/(.*) /)},!n.msedge&&/(apple)?webkit/i.test(s)?(/(apple)?webkit\/537\.36/i.test(s)?(n.name=n.name||"Blink",n.blink=o):(n.name=n.name||"Webkit",n.webkit=o),!n.version&&F&&(n.version=F)):!n.opera&&/gecko\//i.test(s)&&(n.name=n.name||"Gecko",n.gecko=o,n.version=n.version||f(/gecko\/(\d+(\.\d+)?)/i)),n.windowsphone||!y&&!n.silk?!n.windowsphone&&t?(n[t]=o,n.ios=o,n.osname="iOS"):A?(n.mac=o,n.osname="macOS"):j?(n.xbox=o,n.osname="Xbox"):O?(n.windows=o,n.osname="Windows"):D&&(n.linux=o,n.osname="Linux"):(n.android=o,n.osname="Android");var G="";n.windows?G=function(J){switch(J){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(f(/Windows ((NT|XP)( \d\d?.\d)?)/i)):n.windowsphone?G=f(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):n.mac?(G=f(/Mac OS X (\d+([_\.\s]\d+)*)/i),G=G.replace(/[_\s]/g,".")):t?(G=f(/os (\d+([_\s]\d+)*) like mac os x/i),G=G.replace(/[_\s]/g,".")):y?G=f(/android[ \/-](\d+(\.\d+)*)/i):n.webos?G=f(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):n.blackberry?G=f(/rim\stablet\sos\s(\d+(\.\d+)*)/i):n.bada?G=f(/bada\/(\d+(\.\d+)*)/i):n.tizen&&(G=f(/tizen[\/\s](\d+(\.\d+)*)/i)),G&&(n.osversion=G);var X=!n.windows&&G.split(".")[0];return K||_||t=="ipad"||y&&(X==3||X>=4&&!ne)||n.silk?n.tablet=o:(ne||t=="iphone"||t=="ipod"||y||g||n.blackberry||n.webos||n.bada)&&(n.mobile=o),n.msedge||n.msie&&n.version>=10||n.yandexbrowser&&n.version>=15||n.vivaldi&&n.version>=1||n.chrome&&n.version>=20||n.samsungBrowser&&n.version>=4||n.firefox&&n.version>=20||n.safari&&n.version>=6||n.opera&&n.version>=10||n.ios&&n.osversion&&n.osversion.split(".")[0]>=6||n.blackberry&&n.version>=10.1||n.chromium&&n.version>=20?n.a=o:n.msie&&n.version<10||n.chrome&&n.version<20||n.firefox&&n.version<20||n.safari&&n.version<6||n.opera&&n.version<10||n.ios&&n.osversion&&n.osversion.split(".")[0]<6||n.chromium&&n.version<20?n.c=o:n.x=o,n}function T(s){return s.split(".").length}function l(s,f){var i,n=[];if(Array.prototype.map)return Array.prototype.map.call(s,f);for(i=0;i<s.length;i++)n.push(f(s[i]));return n}function p(s){for(var f=Math.max(T(s[0]),T(s[1])),i=l(s,function(n){var t=f-T(n);return n+=new Array(t+1).join(".0"),l(n.split("."),function(u){return new Array(20-u.length).join("0")+u}).reverse()});--f>=0;){if(i[0][f]>i[1][f])return 1;if(i[0][f]!==i[1][f])return-1;if(f===0)return 0}}function h(s,f,i){var n=c;typeof f=="string"&&(i=f,f=void 0),f===void 0&&(f=!1),i&&(n=C(i));var t=""+n.version;for(var u in s)if(s.hasOwnProperty(u)&&n[u]){if(typeof s[u]!="string")throw new Error("Browser version in the minVersion map should be a string: "+u+": "+String(s));return p([t,s[u]])<0}return f}function d(s,f,i){return!h(s,f,i)}var o=!0,c=C(typeof navigator!="undefined"&&navigator.userAgent||"");return c.test=function(s){for(var f=0;f<s.length;++f){var i=s[f];if(typeof i=="string"&&i in c)return!0}return!1},c.isUnsupportedBrowser=h,c.compareVersions=p,c.check=d,c._detect=C,c.detect=C,c})},{}],36:[function(w,P,S){},{}],37:[function(w,P,S){function C(c){if(c&&!d(c))throw new Error("Unknown encoding: "+c)}function T(c){return c.toString(this.encoding)}function l(c){this.charReceived=c.length%2,this.charLength=this.charReceived?2:0}function p(c){this.charReceived=c.length%3,this.charLength=this.charReceived?3:0}var h=w("buffer").Buffer,d=h.isEncoding||function(c){switch(c&&c.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},o=S.StringDecoder=function(c){switch(this.encoding=(c||"utf8").toLowerCase().replace(/[-_]/,""),C(c),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=l;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=p;break;default:return void(this.write=T)}this.charBuffer=new h(6),this.charReceived=0,this.charLength=0};o.prototype.write=function(c){for(var s="";this.charLength;){var f=c.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:c.length;if(c.copy(this.charBuffer,this.charReceived,0,f),this.charReceived+=f,this.charReceived<this.charLength)return"";c=c.slice(f,c.length),s=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=s.charCodeAt(s.length-1);if(!(n>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,c.length===0)return s;break}this.charLength+=this.surrogateSize,s=""}this.detectIncompleteChar(c);var i=c.length;this.charLength&&(c.copy(this.charBuffer,0,c.length-this.charReceived,i),i-=this.charReceived),s+=c.toString(this.encoding,0,i);var i=s.length-1,n=s.charCodeAt(i);if(n>=55296&&n<=56319){var t=this.surrogateSize;return this.charLength+=t,this.charReceived+=t,this.charBuffer.copy(this.charBuffer,t,0,t),c.copy(this.charBuffer,0,0,t),s.substring(0,i)}return s},o.prototype.detectIncompleteChar=function(c){for(var s=c.length>=3?3:c.length;s>0;s--){var f=c[c.length-s];if(s==1&&f>>5==6){this.charLength=2;break}if(s<=2&&f>>4==14){this.charLength=3;break}if(s<=3&&f>>3==30){this.charLength=4;break}}this.charReceived=s},o.prototype.end=function(c){var s="";if(c&&c.length&&(s=this.write(c)),this.charReceived){var f=this.charReceived,i=this.charBuffer,n=this.encoding;s+=i.slice(0,f).toString(n)}return s}},{buffer:38}],38:[function(w,P,S){(function(C){"use strict";function T(){return p.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(M,N){if(T()<N)throw new RangeError("Invalid typed array length");return p.TYPED_ARRAY_SUPPORT?(M=new Uint8Array(N),M.__proto__=p.prototype):(M===null&&(M=new p(N)),M.length=N),M}function p(M,N,$){if(!(p.TYPED_ARRAY_SUPPORT||this instanceof p))return new p(M,N,$);if(typeof M=="number"){if(typeof N=="string")throw new Error("If encoding is specified then the first argument must be a string");return c(this,M)}return h(this,M,N,$)}function h(M,N,$,V){if(typeof N=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&N instanceof ArrayBuffer?i(M,N,$,V):typeof N=="string"?s(M,N,$):n(M,N)}function d(M){if(typeof M!="number")throw new TypeError('"size" argument must be a number');if(M<0)throw new RangeError('"size" argument must not be negative')}function o(M,N,$,V){return d(N),N<=0?l(M,N):$!==void 0?typeof V=="string"?l(M,N).fill($,V):l(M,N).fill($):l(M,N)}function c(M,N){if(d(N),M=l(M,N<0?0:0|t(N)),!p.TYPED_ARRAY_SUPPORT)for(var $=0;$<N;++$)M[$]=0;return M}function s(M,N,$){if(typeof $=="string"&&$!==""||($="utf8"),!p.isEncoding($))throw new TypeError('"encoding" must be a valid string encoding');var V=0|y(N,$);M=l(M,V);var Y=M.write(N,$);return Y!==V&&(M=M.slice(0,Y)),M}function f(M,N){var $=N.length<0?0:0|t(N.length);M=l(M,$);for(var V=0;V<$;V+=1)M[V]=255&N[V];return M}function i(M,N,$,V){if(N.byteLength,$<0||N.byteLength<$)throw new RangeError("'offset' is out of bounds");if(N.byteLength<$+(V||0))throw new RangeError("'length' is out of bounds");return N=$===void 0&&V===void 0?new Uint8Array(N):V===void 0?new Uint8Array(N,$):new Uint8Array(N,$,V),p.TYPED_ARRAY_SUPPORT?(M=N,M.__proto__=p.prototype):M=f(M,N),M}function n(M,N){if(p.isBuffer(N)){var $=0|t(N.length);return M=l(M,$),M.length===0||N.copy(M,0,0,$),M}if(N){if(typeof ArrayBuffer!="undefined"&&N.buffer instanceof ArrayBuffer||"length"in N)return typeof N.length!="number"||de(N.length)?l(M,0):f(M,N);if(N.type==="Buffer"&&Ue(N.data))return f(M,N.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function t(M){if(M>=T())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+T().toString(16)+" bytes");return 0|M}function u(M){return+M!=M&&(M=0),p.alloc(+M)}function y(M,N){if(p.isBuffer(M))return M.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(M)||M instanceof ArrayBuffer))return M.byteLength;typeof M!="string"&&(M=""+M);var $=M.length;if($===0)return 0;for(var V=!1;;)switch(N){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":case void 0:return Oe(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*$;case"hex":return $>>>1;case"base64":return Ce(M).length;default:if(V)return Oe(M).length;N=(""+N).toLowerCase(),V=!0}}function g(M,N,$){var V=!1;if((N===void 0||N<0)&&(N=0),N>this.length)return"";if(($===void 0||$>this.length)&&($=this.length),$<=0)return"";if($>>>=0,N>>>=0,$<=N)return"";for(M||(M="utf8");;)switch(M){case"hex":return j(this,N,$);case"utf8":case"utf-8":return I(this,N,$);case"ascii":return K(this,N,$);case"latin1":case"binary":return ne(this,N,$);case"base64":return D(this,N,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,N,$);default:if(V)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),V=!0}}function _(M,N,$){var V=M[N];M[N]=M[$],M[$]=V}function b(M,N,$,V,Y){if(M.length===0)return-1;if(typeof $=="string"?(V=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,isNaN($)&&($=Y?0:M.length-1),$<0&&($=M.length+$),$>=M.length){if(Y)return-1;$=M.length-1}else if($<0){if(!Y)return-1;$=0}if(typeof N=="string"&&(N=p.from(N,V)),p.isBuffer(N))return N.length===0?-1:v(M,N,$,V,Y);if(typeof N=="number")return N&=255,p.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Y?Uint8Array.prototype.indexOf.call(M,N,$):Uint8Array.prototype.lastIndexOf.call(M,N,$):v(M,[N],$,V,Y);throw new TypeError("val must be string, number or Buffer")}function v(M,N,$,V,Y){function me(Ke,Ne){return Re===1?Ke[Ne]:Ke.readUInt16BE(Ne*Re)}var Re=1,rt=M.length,Pe=N.length;if(V!==void 0&&((V=String(V).toLowerCase())==="ucs2"||V==="ucs-2"||V==="utf16le"||V==="utf-16le")){if(M.length<2||N.length<2)return-1;Re=2,rt/=2,Pe/=2,$/=2}var Ie;if(Y){var Xe=-1;for(Ie=$;Ie<rt;Ie++)if(me(M,Ie)===me(N,Xe===-1?0:Ie-Xe)){if(Xe===-1&&(Xe=Ie),Ie-Xe+1===Pe)return Xe*Re}else Xe!==-1&&(Ie-=Ie-Xe),Xe=-1}else for($+Pe>rt&&($=rt-Pe),Ie=$;Ie>=0;Ie--){for(var tt=!0,Ve=0;Ve<Pe;Ve++)if(me(M,Ie+Ve)!==me(N,Ve)){tt=!1;break}if(tt)return Ie}return-1}function m(M,N,$,V){$=Number($)||0;var Y=M.length-$;V?(V=Number(V))>Y&&(V=Y):V=Y;var me=N.length;if(me%2!=0)throw new TypeError("Invalid hex string");V>me/2&&(V=me/2);for(var Re=0;Re<V;++Re){var rt=parseInt(N.substr(2*Re,2),16);if(isNaN(rt))return Re;M[$+Re]=rt}return Re}function E(M,N,$,V){return Le(Oe(N,M.length-$),M,$,V)}function a(M,N,$,V){return Le(Fe(N),M,$,V)}function x(M,N,$,V){return a(M,N,$,V)}function O(M,N,$,V){return Le(Ce(N),M,$,V)}function A(M,N,$,V){return Le(Me(N,M.length-$),M,$,V)}function D(M,N,$){return N===0&&$===M.length?ue.fromByteArray(M):ue.fromByteArray(M.slice(N,$))}function I(M,N,$){$=Math.min(M.length,$);for(var V=[],Y=N;Y<$;){var me=M[Y],Re=null,rt=me>239?4:me>223?3:me>191?2:1;if(Y+rt<=$){var Pe,Ie,Xe,tt;switch(rt){case 1:me<128&&(Re=me);break;case 2:Pe=M[Y+1],(192&Pe)==128&&(tt=(31&me)<<6|63&Pe)>127&&(Re=tt);break;case 3:Pe=M[Y+1],Ie=M[Y+2],(192&Pe)==128&&(192&Ie)==128&&(tt=(15&me)<<12|(63&Pe)<<6|63&Ie)>2047&&(tt<55296||tt>57343)&&(Re=tt);break;case 4:Pe=M[Y+1],Ie=M[Y+2],Xe=M[Y+3],(192&Pe)==128&&(192&Ie)==128&&(192&Xe)==128&&(tt=(15&me)<<18|(63&Pe)<<12|(63&Ie)<<6|63&Xe)>65535&&tt<1114112&&(Re=tt)}}Re===null?(Re=65533,rt=1):Re>65535&&(Re-=65536,V.push(Re>>>10&1023|55296),Re=56320|1023&Re),V.push(Re),Y+=rt}return F(V)}function F(M){var N=M.length;if(N<=Ye)return String.fromCharCode.apply(String,M);for(var $="",V=0;V<N;)$+=String.fromCharCode.apply(String,M.slice(V,V+=Ye));return $}function K(M,N,$){var V="";$=Math.min(M.length,$);for(var Y=N;Y<$;++Y)V+=String.fromCharCode(127&M[Y]);return V}function ne(M,N,$){var V="";$=Math.min(M.length,$);for(var Y=N;Y<$;++Y)V+=String.fromCharCode(M[Y]);return V}function j(M,N,$){var V=M.length;(!N||N<0)&&(N=0),(!$||$<0||$>V)&&($=V);for(var Y="",me=N;me<$;++me)Y+=pe(M[me]);return Y}function G(M,N,$){for(var V=M.slice(N,$),Y="",me=0;me<V.length;me+=2)Y+=String.fromCharCode(V[me]+256*V[me+1]);return Y}function X(M,N,$){if(M%1!=0||M<0)throw new RangeError("offset is not uint");if(M+N>$)throw new RangeError("Trying to access beyond buffer length")}function J(M,N,$,V,Y,me){if(!p.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>Y||N<me)throw new RangeError('"value" argument is out of bounds');if($+V>M.length)throw new RangeError("Index out of range")}function B(M,N,$,V){N<0&&(N=65535+N+1);for(var Y=0,me=Math.min(M.length-$,2);Y<me;++Y)M[$+Y]=(N&255<<8*(V?Y:1-Y))>>>8*(V?Y:1-Y)}function Q(M,N,$,V){N<0&&(N=4294967295+N+1);for(var Y=0,me=Math.min(M.length-$,4);Y<me;++Y)M[$+Y]=N>>>8*(V?Y:3-Y)&255}function ie(M,N,$,V,Y,me){if($+V>M.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function oe(M,N,$,V,Y){return Y||ie(M,N,$,4,34028234663852886e22,-34028234663852886e22),ke.write(M,N,$,V,23,4),$+4}function xe(M,N,$,V,Y){return Y||ie(M,N,$,8,17976931348623157e292,-17976931348623157e292),ke.write(M,N,$,V,52,8),$+8}function ye(M){if(M=Ae(M).replace(ee,""),M.length<2)return"";for(;M.length%4!=0;)M+="=";return M}function Ae(M){return M.trim?M.trim():M.replace(/^\s+|\s+$/g,"")}function pe(M){return M<16?"0"+M.toString(16):M.toString(16)}function Oe(M,N){N=N||1/0;for(var $,V=M.length,Y=null,me=[],Re=0;Re<V;++Re){if(($=M.charCodeAt(Re))>55295&&$<57344){if(!Y){if($>56319){(N-=3)>-1&&me.push(239,191,189);continue}if(Re+1===V){(N-=3)>-1&&me.push(239,191,189);continue}Y=$;continue}if($<56320){(N-=3)>-1&&me.push(239,191,189),Y=$;continue}$=65536+(Y-55296<<10|$-56320)}else Y&&(N-=3)>-1&&me.push(239,191,189);if(Y=null,$<128){if((N-=1)<0)break;me.push($)}else if($<2048){if((N-=2)<0)break;me.push($>>6|192,63&$|128)}else if($<65536){if((N-=3)<0)break;me.push($>>12|224,$>>6&63|128,63&$|128)}else{if(!($<1114112))throw new Error("Invalid code point");if((N-=4)<0)break;me.push($>>18|240,$>>12&63|128,$>>6&63|128,63&$|128)}}return me}function Fe(M){for(var N=[],$=0;$<M.length;++$)N.push(255&M.charCodeAt($));return N}function Me(M,N){for(var $,V,Y,me=[],Re=0;Re<M.length&&!((N-=2)<0);++Re)$=M.charCodeAt(Re),V=$>>8,Y=$%256,me.push(Y),me.push(V);return me}function Ce(M){return ue.toByteArray(ye(M))}function Le(M,N,$,V){for(var Y=0;Y<V&&!(Y+$>=N.length||Y>=M.length);++Y)N[Y+$]=M[Y];return Y}function de(M){return M!==M}var ue=w("base64-js"),ke=w("ieee754"),Ue=w("isarray");S.Buffer=p,S.SlowBuffer=u,S.INSPECT_MAX_BYTES=50,p.TYPED_ARRAY_SUPPORT=C.TYPED_ARRAY_SUPPORT!==void 0?C.TYPED_ARRAY_SUPPORT:function(){try{var M=new Uint8Array(1);return M.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},M.foo()===42&&typeof M.subarray=="function"&&M.subarray(1,1).byteLength===0}catch(N){return!1}}(),S.kMaxLength=T(),p.poolSize=8192,p._augment=function(M){return M.__proto__=p.prototype,M},p.from=function(M,N,$){return h(null,M,N,$)},p.TYPED_ARRAY_SUPPORT&&(p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0})),p.alloc=function(M,N,$){return o(null,M,N,$)},p.allocUnsafe=function(M){return c(null,M)},p.allocUnsafeSlow=function(M){return c(null,M)},p.isBuffer=function(M){return!(M==null||!M._isBuffer)},p.compare=function(M,N){if(!p.isBuffer(M)||!p.isBuffer(N))throw new TypeError("Arguments must be Buffers");if(M===N)return 0;for(var $=M.length,V=N.length,Y=0,me=Math.min($,V);Y<me;++Y)if(M[Y]!==N[Y]){$=M[Y],V=N[Y];break}return $<V?-1:V<$?1:0},p.isEncoding=function(M){switch(String(M).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(M,N){if(!Ue(M))throw new TypeError('"list" argument must be an Array of Buffers');if(M.length===0)return p.alloc(0);var $;if(N===void 0)for(N=0,$=0;$<M.length;++$)N+=M[$].length;var V=p.allocUnsafe(N),Y=0;for($=0;$<M.length;++$){var me=M[$];if(!p.isBuffer(me))throw new TypeError('"list" argument must be an Array of Buffers');me.copy(V,Y),Y+=me.length}return V},p.byteLength=y,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var M=this.length;if(M%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var N=0;N<M;N+=2)_(this,N,N+1);return this},p.prototype.swap32=function(){var M=this.length;if(M%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var N=0;N<M;N+=4)_(this,N,N+3),_(this,N+1,N+2);return this},p.prototype.swap64=function(){var M=this.length;if(M%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var N=0;N<M;N+=8)_(this,N,N+7),_(this,N+1,N+6),_(this,N+2,N+5),_(this,N+3,N+4);return this},p.prototype.toString=function(){var M=0|this.length;return M===0?"":arguments.length===0?I(this,0,M):g.apply(this,arguments)},p.prototype.equals=function(M){if(!p.isBuffer(M))throw new TypeError("Argument must be a Buffer");return this===M||p.compare(this,M)===0},p.prototype.inspect=function(){var M="",N=S.INSPECT_MAX_BYTES;return this.length>0&&(M=this.toString("hex",0,N).match(/.{2}/g).join(" "),this.length>N&&(M+=" ... ")),"<Buffer "+M+">"},p.prototype.compare=function(M,N,$,V,Y){if(!p.isBuffer(M))throw new TypeError("Argument must be a Buffer");if(N===void 0&&(N=0),$===void 0&&($=M?M.length:0),V===void 0&&(V=0),Y===void 0&&(Y=this.length),N<0||$>M.length||V<0||Y>this.length)throw new RangeError("out of range index");if(V>=Y&&N>=$)return 0;if(V>=Y)return-1;if(N>=$)return 1;if(N>>>=0,$>>>=0,V>>>=0,Y>>>=0,this===M)return 0;for(var me=Y-V,Re=$-N,rt=Math.min(me,Re),Pe=this.slice(V,Y),Ie=M.slice(N,$),Xe=0;Xe<rt;++Xe)if(Pe[Xe]!==Ie[Xe]){me=Pe[Xe],Re=Ie[Xe];break}return me<Re?-1:Re<me?1:0},p.prototype.includes=function(M,N,$){return this.indexOf(M,N,$)!==-1},p.prototype.indexOf=function(M,N,$){return b(this,M,N,$,!0)},p.prototype.lastIndexOf=function(M,N,$){return b(this,M,N,$,!1)},p.prototype.write=function(M,N,$,V){if(N===void 0)V="utf8",$=this.length,N=0;else if($===void 0&&typeof N=="string")V=N,$=this.length,N=0;else{if(!isFinite(N))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");N|=0,isFinite($)?($|=0,V===void 0&&(V="utf8")):(V=$,$=void 0)}var Y=this.length-N;if(($===void 0||$>Y)&&($=Y),M.length>0&&($<0||N<0)||N>this.length)throw new RangeError("Attempt to write outside buffer bounds");V||(V="utf8");for(var me=!1;;)switch(V){case"hex":return m(this,M,N,$);case"utf8":case"utf-8":return E(this,M,N,$);case"ascii":return a(this,M,N,$);case"latin1":case"binary":return x(this,M,N,$);case"base64":return O(this,M,N,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,M,N,$);default:if(me)throw new TypeError("Unknown encoding: "+V);V=(""+V).toLowerCase(),me=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ye=4096;p.prototype.slice=function(M,N){var $=this.length;M=~~M,N=N===void 0?$:~~N,M<0?(M+=$)<0&&(M=0):M>$&&(M=$),N<0?(N+=$)<0&&(N=0):N>$&&(N=$),N<M&&(N=M);var V;if(p.TYPED_ARRAY_SUPPORT)V=this.subarray(M,N),V.__proto__=p.prototype;else{var Y=N-M;V=new p(Y,void 0);for(var me=0;me<Y;++me)V[me]=this[me+M]}return V},p.prototype.readUIntLE=function(M,N,$){M|=0,N|=0,$||X(M,N,this.length);for(var V=this[M],Y=1,me=0;++me<N&&(Y*=256);)V+=this[M+me]*Y;return V},p.prototype.readUIntBE=function(M,N,$){M|=0,N|=0,$||X(M,N,this.length);for(var V=this[M+--N],Y=1;N>0&&(Y*=256);)V+=this[M+--N]*Y;return V},p.prototype.readUInt8=function(M,N){return N||X(M,1,this.length),this[M]},p.prototype.readUInt16LE=function(M,N){return N||X(M,2,this.length),this[M]|this[M+1]<<8},p.prototype.readUInt16BE=function(M,N){return N||X(M,2,this.length),this[M]<<8|this[M+1]},p.prototype.readUInt32LE=function(M,N){return N||X(M,4,this.length),(this[M]|this[M+1]<<8|this[M+2]<<16)+16777216*this[M+3]},p.prototype.readUInt32BE=function(M,N){return N||X(M,4,this.length),16777216*this[M]+(this[M+1]<<16|this[M+2]<<8|this[M+3])},p.prototype.readIntLE=function(M,N,$){M|=0,N|=0,$||X(M,N,this.length);for(var V=this[M],Y=1,me=0;++me<N&&(Y*=256);)V+=this[M+me]*Y;return Y*=128,V>=Y&&(V-=Math.pow(2,8*N)),V},p.prototype.readIntBE=function(M,N,$){M|=0,N|=0,$||X(M,N,this.length);for(var V=N,Y=1,me=this[M+--V];V>0&&(Y*=256);)me+=this[M+--V]*Y;return Y*=128,me>=Y&&(me-=Math.pow(2,8*N)),me},p.prototype.readInt8=function(M,N){return N||X(M,1,this.length),128&this[M]?-1*(255-this[M]+1):this[M]},p.prototype.readInt16LE=function(M,N){N||X(M,2,this.length);var $=this[M]|this[M+1]<<8;return 32768&$?4294901760|$:$},p.prototype.readInt16BE=function(M,N){N||X(M,2,this.length);var $=this[M+1]|this[M]<<8;return 32768&$?4294901760|$:$},p.prototype.readInt32LE=function(M,N){return N||X(M,4,this.length),this[M]|this[M+1]<<8|this[M+2]<<16|this[M+3]<<24},p.prototype.readInt32BE=function(M,N){return N||X(M,4,this.length),this[M]<<24|this[M+1]<<16|this[M+2]<<8|this[M+3]},p.prototype.readFloatLE=function(M,N){return N||X(M,4,this.length),ke.read(this,M,!0,23,4)},p.prototype.readFloatBE=function(M,N){return N||X(M,4,this.length),ke.read(this,M,!1,23,4)},p.prototype.readDoubleLE=function(M,N){return N||X(M,8,this.length),ke.read(this,M,!0,52,8)},p.prototype.readDoubleBE=function(M,N){return N||X(M,8,this.length),ke.read(this,M,!1,52,8)},p.prototype.writeUIntLE=function(M,N,$,V){(M=+M,N|=0,$|=0,!V)&&J(this,M,N,$,Math.pow(2,8*$)-1,0);var Y=1,me=0;for(this[N]=255&M;++me<$&&(Y*=256);)this[N+me]=M/Y&255;return N+$},p.prototype.writeUIntBE=function(M,N,$,V){(M=+M,N|=0,$|=0,!V)&&J(this,M,N,$,Math.pow(2,8*$)-1,0);var Y=$-1,me=1;for(this[N+Y]=255&M;--Y>=0&&(me*=256);)this[N+Y]=M/me&255;return N+$},p.prototype.writeUInt8=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,1,255,0),p.TYPED_ARRAY_SUPPORT||(M=Math.floor(M)),this[N]=255&M,N+1},p.prototype.writeUInt16LE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[N]=255&M,this[N+1]=M>>>8):B(this,M,N,!0),N+2},p.prototype.writeUInt16BE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[N]=M>>>8,this[N+1]=255&M):B(this,M,N,!1),N+2},p.prototype.writeUInt32LE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[N+3]=M>>>24,this[N+2]=M>>>16,this[N+1]=M>>>8,this[N]=255&M):Q(this,M,N,!0),N+4},p.prototype.writeUInt32BE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[N]=M>>>24,this[N+1]=M>>>16,this[N+2]=M>>>8,this[N+3]=255&M):Q(this,M,N,!1),N+4},p.prototype.writeIntLE=function(M,N,$,V){if(M=+M,N|=0,!V){var Y=Math.pow(2,8*$-1);J(this,M,N,$,Y-1,-Y)}var me=0,Re=1,rt=0;for(this[N]=255&M;++me<$&&(Re*=256);)M<0&&rt===0&&this[N+me-1]!==0&&(rt=1),this[N+me]=(M/Re>>0)-rt&255;return N+$},p.prototype.writeIntBE=function(M,N,$,V){if(M=+M,N|=0,!V){var Y=Math.pow(2,8*$-1);J(this,M,N,$,Y-1,-Y)}var me=$-1,Re=1,rt=0;for(this[N+me]=255&M;--me>=0&&(Re*=256);)M<0&&rt===0&&this[N+me+1]!==0&&(rt=1),this[N+me]=(M/Re>>0)-rt&255;return N+$},p.prototype.writeInt8=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,1,127,-128),p.TYPED_ARRAY_SUPPORT||(M=Math.floor(M)),M<0&&(M=255+M+1),this[N]=255&M,N+1},p.prototype.writeInt16LE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[N]=255&M,this[N+1]=M>>>8):B(this,M,N,!0),N+2},p.prototype.writeInt16BE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[N]=M>>>8,this[N+1]=255&M):B(this,M,N,!1),N+2},p.prototype.writeInt32LE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,4,2147483647,-2147483648),p.TYPED_ARRAY_SUPPORT?(this[N]=255&M,this[N+1]=M>>>8,this[N+2]=M>>>16,this[N+3]=M>>>24):Q(this,M,N,!0),N+4},p.prototype.writeInt32BE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,4,2147483647,-2147483648),M<0&&(M=4294967295+M+1),p.TYPED_ARRAY_SUPPORT?(this[N]=M>>>24,this[N+1]=M>>>16,this[N+2]=M>>>8,this[N+3]=255&M):Q(this,M,N,!1),N+4},p.prototype.writeFloatLE=function(M,N,$){return oe(this,M,N,!0,$)},p.prototype.writeFloatBE=function(M,N,$){return oe(this,M,N,!1,$)},p.prototype.writeDoubleLE=function(M,N,$){return xe(this,M,N,!0,$)},p.prototype.writeDoubleBE=function(M,N,$){return xe(this,M,N,!1,$)},p.prototype.copy=function(M,N,$,V){if($||($=0),V||V===0||(V=this.length),N>=M.length&&(N=M.length),N||(N=0),V>0&&V<$&&(V=$),V===$)return 0;if(M.length===0||this.length===0)return 0;if(N<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("sourceStart out of bounds");if(V<0)throw new RangeError("sourceEnd out of bounds");V>this.length&&(V=this.length),M.length-N<V-$&&(V=M.length-N+$);var Y,me=V-$;if(this===M&&$<N&&N<V)for(Y=me-1;Y>=0;--Y)M[Y+N]=this[Y+$];else if(me<1e3||!p.TYPED_ARRAY_SUPPORT)for(Y=0;Y<me;++Y)M[Y+N]=this[Y+$];else Uint8Array.prototype.set.call(M,this.subarray($,$+me),N);return me},p.prototype.fill=function(M,N,$,V){if(typeof M=="string"){if(typeof N=="string"?(V=N,N=0,$=this.length):typeof $=="string"&&(V=$,$=this.length),M.length===1){var Y=M.charCodeAt(0);Y<256&&(M=Y)}if(V!==void 0&&typeof V!="string")throw new TypeError("encoding must be a string");if(typeof V=="string"&&!p.isEncoding(V))throw new TypeError("Unknown encoding: "+V)}else typeof M=="number"&&(M&=255);if(N<0||this.length<N||this.length<$)throw new RangeError("Out of range index");if($<=N)return this;N>>>=0,$=$===void 0?this.length:$>>>0,M||(M=0);var me;if(typeof M=="number")for(me=N;me<$;++me)this[me]=M;else{var Re=p.isBuffer(M)?M:Oe(new p(M,V).toString()),rt=Re.length;for(me=0;me<$-N;++me)this[me+N]=Re[me%rt]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(w,P,S){P.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],40:[function(w,P,S){"use strict";var C=function(){this.buffer=[],this.fns=[]};C.prototype.push=function(l,p){if(this.fns.length)return this.fns.shift()(null,l);var h={data:l,priority:p},d=T(this.buffer,h,function(o){return o.priority});this.buffer.splice(d,0,h)},C.prototype.next=function(){var l=this;return function(p){if(l.buffer.length)return p(null,l.buffer.pop().data);l.fns.push(p)}};var T=function(l,p,h){p=h(p);for(var d=0,o=l?l.length:d;d<o;){var c=d+o>>>1;h(l[c])<p?d=c+1:o=c}return d};P.exports=C},{}],41:[function(w,P,S){function C(i){var n=this,t=f.call(arguments,1);return new Promise(function(u,y){function g(v){var m;try{m=i.next(v)}catch(E){return y(E)}b(m)}function _(v){var m;try{m=i.throw(v)}catch(E){return y(E)}b(m)}function b(v){if(v.done)return u(v.value);var m=T.call(n,v.value);return m&&d(m)?m.then(g,_):_(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(v.value)+'"'))}if(typeof i=="function"&&(i=i.apply(n,t)),!i||typeof i.next!="function")return u(i);g()})}function T(i){return i&&(d(i)?i:c(i)||o(i)?C.call(this,i):typeof i=="function"?l.call(this,i):Array.isArray(i)?p.call(this,i):s(i)?h.call(this,i):i)}function l(i){var n=this;return new Promise(function(t,u){i.call(n,function(y,g){if(y)return u(y);arguments.length>2&&(g=f.call(arguments,1)),t(g)})})}function p(i){return Promise.all(i.map(T,this))}function h(i){for(var n=new i.constructor,t=Object.keys(i),u=[],y=0;y<t.length;y++){var g=t[y],_=T.call(this,i[g]);_&&d(_)?function(b,v){n[v]=void 0,u.push(b.then(function(m){n[v]=m}))}(_,g):n[g]=i[g]}return Promise.all(u).then(function(){return n})}function d(i){return typeof i.then=="function"}function o(i){return typeof i.next=="function"&&typeof i.throw=="function"}function c(i){var n=i.constructor;return!!n&&(n.name==="GeneratorFunction"||n.displayName==="GeneratorFunction"||o(n.prototype))}function s(i){return Object==i.constructor}var f=Array.prototype.slice;P.exports=C.default=C.co=C,C.wrap=function(i){function n(){return C.call(this,i.apply(this,arguments))}return n.__generatorFunction__=i,n}},{}],42:[function(w,P,S){P.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],43:[function(w,P,S){"use strict";function C(p,h){if(!(this instanceof C))return new C(p,h);this.src=p,this._withAccess=h}function T(p,h){return p[h]===void 0&&p.__lookupGetter__(h)===void 0&&p.__lookupSetter__(h)===void 0}var l=Array.prototype.slice;P.exports=C,C.prototype.withAccess=function(p){return this._withAccess=p!==!1,this},C.prototype.pick=function(p){return Array.isArray(p)||(p=l.call(arguments)),p.length&&(this.keys=p),this},C.prototype.to=function(p){if(p=p||{},!this.src)return p;var h=this.keys||Object.keys(this.src);if(!this._withAccess){for(var d=0;d<h.length;d++)o=h[d],p[o]===void 0&&(p[o]=this.src[o]);return p}for(var d=0;d<h.length;d++){var o=h[d];if(T(p,o)){var c=this.src.__lookupGetter__(o),s=this.src.__lookupSetter__(o);c&&p.__defineGetter__(o,c),s&&p.__defineSetter__(o,s),c||s||(p[o]=this.src[o])}}return p},C.prototype.toCover=function(p){for(var h=this.keys||Object.keys(this.src),d=0;d<h.length;d++){var o=h[d];delete p[o];var c=this.src.__lookupGetter__(o),s=this.src.__lookupSetter__(o);c&&p.__defineGetter__(o,c),s&&p.__defineSetter__(o,s),c||s||(p[o]=this.src[o])}},C.prototype.override=C.prototype.toCover,C.prototype.and=function(p){var h={};return this.to(h),this.src=p,this.to(h),this.src=h,this}},{}],44:[function(w,P,S){w("../../modules/es6.string.iterator"),w("../../modules/es6.array.from"),P.exports=w("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(w,P,S){var C=w("../../modules/_core"),T=C.JSON||(C.JSON={stringify:JSON.stringify});P.exports=function(l){return T.stringify.apply(T,arguments)}},{"../../modules/_core":65}],46:[function(w,P,S){w("../../modules/es6.object.assign"),P.exports=w("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(w,P,S){w("../../modules/es6.object.create");var C=w("../../modules/_core").Object;P.exports=function(T,l){return C.create(T,l)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(w,P,S){w("../../modules/es6.object.define-property");var C=w("../../modules/_core").Object;P.exports=function(T,l,p){return C.defineProperty(T,l,p)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(w,P,S){w("../../modules/es6.object.get-own-property-names");var C=w("../../modules/_core").Object;P.exports=function(T){return C.getOwnPropertyNames(T)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(w,P,S){w("../../modules/es6.object.get-prototype-of"),P.exports=w("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(w,P,S){w("../../modules/es6.object.keys"),P.exports=w("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(w,P,S){w("../modules/es6.object.to-string"),w("../modules/es6.string.iterator"),w("../modules/web.dom.iterable"),w("../modules/es6.promise"),w("../modules/es7.promise.finally"),w("../modules/es7.promise.try"),P.exports=w("../modules/_core").Promise},{"../modules/_core":65,"../modules/es6.object.to-string":142,"../modules/es6.promise":143,"../modules/es6.string.iterator":145,"../modules/es7.promise.finally":147,"../modules/es7.promise.try":148,"../modules/web.dom.iterable":151}],53:[function(w,P,S){w("../modules/web.immediate"),P.exports=w("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(w,P,S){w("../../modules/es6.string.from-code-point"),P.exports=w("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(w,P,S){w("../../modules/es6.function.has-instance"),P.exports=w("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(w,P,S){w("../../modules/es6.symbol"),w("../../modules/es6.object.to-string"),w("../../modules/es7.symbol.async-iterator"),w("../../modules/es7.symbol.observable"),P.exports=w("../../modules/_core").Symbol},{"../../modules/_core":65,"../../modules/es6.object.to-string":142,"../../modules/es6.symbol":146,"../../modules/es7.symbol.async-iterator":149,"../../modules/es7.symbol.observable":150}],57:[function(w,P,S){w("../../modules/es6.string.iterator"),w("../../modules/web.dom.iterable"),P.exports=w("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(w,P,S){P.exports=function(C){if(typeof C!="function")throw TypeError(C+" is not a function!");return C}},{}],59:[function(w,P,S){P.exports=function(){}},{}],60:[function(w,P,S){P.exports=function(C,T,l,p){if(!(C instanceof T)||p!==void 0&&p in C)throw TypeError(l+": incorrect invocation!");return C}},{}],61:[function(w,P,S){var C=w("./_is-object");P.exports=function(T){if(!C(T))throw TypeError(T+" is not an object!");return T}},{"./_is-object":85}],62:[function(w,P,S){var C=w("./_to-iobject"),T=w("./_to-length"),l=w("./_to-absolute-index");P.exports=function(p){return function(h,d,o){var c,s=C(h),f=T(s.length),i=l(o,f);if(p&&d!=d){for(;f>i;)if((c=s[i++])!=c)return!0}else for(;f>i;i++)if((p||i in s)&&s[i]===d)return p||i||0;return!p&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(w,P,S){var C=w("./_cof"),T=w("./_wks")("toStringTag"),l=C(function(){return arguments}())=="Arguments",p=function(h,d){try{return h[d]}catch(o){}};P.exports=function(h){var d,o,c;return h===void 0?"Undefined":h===null?"Null":typeof(o=p(d=Object(h),T))=="string"?o:l?C(d):(c=C(d))=="Object"&&typeof d.callee=="function"?"Arguments":c}},{"./_cof":64,"./_wks":131}],64:[function(w,P,S){var C={}.toString;P.exports=function(T){return C.call(T).slice(8,-1)}},{}],65:[function(w,P,S){var C=P.exports={version:"2.5.7"};typeof __e=="number"&&(__e=C)},{}],66:[function(w,P,S){"use strict";var C=w("./_object-dp"),T=w("./_property-desc");P.exports=function(l,p,h){p in l?C.f(l,p,T(0,h)):l[p]=h}},{"./_object-dp":98,"./_property-desc":111}],67:[function(w,P,S){var C=w("./_a-function");P.exports=function(T,l,p){if(C(T),l===void 0)return T;switch(p){case 1:return function(h){return T.call(l,h)};case 2:return function(h,d){return T.call(l,h,d)};case 3:return function(h,d,o){return T.call(l,h,d,o)}}return function(){return T.apply(l,arguments)}}},{"./_a-function":58}],68:[function(w,P,S){P.exports=function(C){if(C==null)throw TypeError("Can't call method on "+C);return C}},{}],69:[function(w,P,S){P.exports=!w("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(w,P,S){var C=w("./_is-object"),T=w("./_global").document,l=C(T)&&C(T.createElement);P.exports=function(p){return l?T.createElement(p):{}}},{"./_global":76,"./_is-object":85}],71:[function(w,P,S){P.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(w,P,S){var C=w("./_object-keys"),T=w("./_object-gops"),l=w("./_object-pie");P.exports=function(p){var h=C(p),d=T.f;if(d)for(var o,c=d(p),s=l.f,f=0;c.length>f;)s.call(p,o=c[f++])&&h.push(o);return h}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(w,P,S){var C=w("./_global"),T=w("./_core"),l=w("./_ctx"),p=w("./_hide"),h=w("./_has"),d=function(o,c,s){var f,i,n,t=o&d.F,u=o&d.G,y=o&d.S,g=o&d.P,_=o&d.B,b=o&d.W,v=u?T:T[c]||(T[c]={}),m=v.prototype,E=u?C:y?C[c]:(C[c]||{}).prototype;u&&(s=c);for(f in s)(i=!t&&E&&E[f]!==void 0)&&h(v,f)||(n=i?E[f]:s[f],v[f]=u&&typeof E[f]!="function"?s[f]:_&&i?l(n,C):b&&E[f]==n?function(a){var x=function(O,A,D){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(O);case 2:return new a(O,A)}return new a(O,A,D)}return a.apply(this,arguments)};return x.prototype=a.prototype,x}(n):g&&typeof n=="function"?l(Function.call,n):n,g&&((v.virtual||(v.virtual={}))[f]=n,o&d.R&&m&&!m[f]&&p(m,f,n)))};d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,P.exports=d},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(w,P,S){P.exports=function(C){try{return!!C()}catch(T){return!0}}},{}],75:[function(w,P,S){var C=w("./_ctx"),T=w("./_iter-call"),l=w("./_is-array-iter"),p=w("./_an-object"),h=w("./_to-length"),d=w("./core.get-iterator-method"),o={},c={},S=P.exports=function(s,f,i,n,t){var u,y,g,_,b=t?function(){return s}:d(s),v=C(i,n,f?2:1),m=0;if(typeof b!="function")throw TypeError(s+" is not iterable!");if(l(b)){for(u=h(s.length);u>m;m++)if((_=f?v(p(y=s[m])[0],y[1]):v(s[m]))===o||_===c)return _}else for(g=b.call(s);!(y=g.next()).done;)if((_=T(g,v,y.value,f))===o||_===c)return _};S.BREAK=o,S.RETURN=c},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(w,P,S){var C=P.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=C)},{}],77:[function(w,P,S){var C={}.hasOwnProperty;P.exports=function(T,l){return C.call(T,l)}},{}],78:[function(w,P,S){var C=w("./_object-dp"),T=w("./_property-desc");P.exports=w("./_descriptors")?function(l,p,h){return C.f(l,p,T(1,h))}:function(l,p,h){return l[p]=h,l}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(w,P,S){var C=w("./_global").document;P.exports=C&&C.documentElement},{"./_global":76}],80:[function(w,P,S){P.exports=!w("./_descriptors")&&!w("./_fails")(function(){return Object.defineProperty(w("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(w,P,S){P.exports=function(C,T,l){var p=l===void 0;switch(T.length){case 0:return p?C():C.call(l);case 1:return p?C(T[0]):C.call(l,T[0]);case 2:return p?C(T[0],T[1]):C.call(l,T[0],T[1]);case 3:return p?C(T[0],T[1],T[2]):C.call(l,T[0],T[1],T[2]);case 4:return p?C(T[0],T[1],T[2],T[3]):C.call(l,T[0],T[1],T[2],T[3])}return C.apply(l,T)}},{}],82:[function(w,P,S){var C=w("./_cof");P.exports=Object("z").propertyIsEnumerable(0)?Object:function(T){return C(T)=="String"?T.split(""):Object(T)}},{"./_cof":64}],83:[function(w,P,S){var C=w("./_iterators"),T=w("./_wks")("iterator"),l=Array.prototype;P.exports=function(p){return p!==void 0&&(C.Array===p||l[T]===p)}},{"./_iterators":91,"./_wks":131}],84:[function(w,P,S){var C=w("./_cof");P.exports=Array.isArray||function(T){return C(T)=="Array"}},{"./_cof":64}],85:[function(w,P,S){P.exports=function(C){return typeof C=="object"?C!==null:typeof C=="function"}},{}],86:[function(w,P,S){var C=w("./_an-object");P.exports=function(T,l,p,h){try{return h?l(C(p)[0],p[1]):l(p)}catch(o){var d=T.return;throw d!==void 0&&C(d.call(T)),o}}},{"./_an-object":61}],87:[function(w,P,S){"use strict";var C=w("./_object-create"),T=w("./_property-desc"),l=w("./_set-to-string-tag"),p={};w("./_hide")(p,w("./_wks")("iterator"),function(){return this}),P.exports=function(h,d,o){h.prototype=C(p,{next:T(1,o)}),l(h,d+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(w,P,S){"use strict";var C=w("./_library"),T=w("./_export"),l=w("./_redefine"),p=w("./_hide"),h=w("./_iterators"),d=w("./_iter-create"),o=w("./_set-to-string-tag"),c=w("./_object-gpo"),s=w("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),i=function(){return this};P.exports=function(n,t,u,y,g,_,b){d(u,t,y);var v,m,E,a=function(j){if(!f&&j in D)return D[j];switch(j){case"keys":case"values":return function(){return new u(this,j)}}return function(){return new u(this,j)}},x=t+" Iterator",O=g=="values",A=!1,D=n.prototype,I=D[s]||D["@@iterator"]||g&&D[g],F=I||a(g),K=g?O?a("entries"):F:void 0,ne=t=="Array"&&D.entries||I;if(ne&&(E=c(ne.call(new n)))!==Object.prototype&&E.next&&(o(E,x,!0),C||typeof E[s]=="function"||p(E,s,i)),O&&I&&I.name!=="values"&&(A=!0,F=function(){return I.call(this)}),C&&!b||!f&&!A&&D[s]||p(D,s,F),h[t]=F,h[x]=i,g)if(v={values:O?F:a("values"),keys:_?F:a("keys"),entries:K},b)for(m in v)m in D||l(D,m,v[m]);else T(T.P+T.F*(f||A),t,v);return v}},{"./_export":73,"./_hide":78,"./_iter-create":87,"./_iterators":91,"./_library":92,"./_object-gpo":104,"./_redefine":113,"./_set-to-string-tag":115,"./_wks":131}],89:[function(w,P,S){var C=w("./_wks")("iterator"),T=!1;try{var l=[7][C]();l.return=function(){T=!0},Array.from(l,function(){throw 2})}catch(p){}P.exports=function(p,h){if(!h&&!T)return!1;var d=!1;try{var o=[7],c=o[C]();c.next=function(){return{done:d=!0}},o[C]=function(){return c},p(o)}catch(s){}return d}},{"./_wks":131}],90:[function(w,P,S){P.exports=function(C,T){return{value:T,done:!!C}}},{}],91:[function(w,P,S){P.exports={}},{}],92:[function(w,P,S){P.exports=!0},{}],93:[function(w,P,S){var C=w("./_uid")("meta"),T=w("./_is-object"),l=w("./_has"),p=w("./_object-dp").f,h=0,d=Object.isExtensible||function(){return!0},o=!w("./_fails")(function(){return d(Object.preventExtensions({}))}),c=function(t){p(t,C,{value:{i:"O"+ ++h,w:{}}})},s=function(t,u){if(!T(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!l(t,C)){if(!d(t))return"F";if(!u)return"E";c(t)}return t[C].i},f=function(t,u){if(!l(t,C)){if(!d(t))return!0;if(!u)return!1;c(t)}return t[C].w},i=function(t){return o&&n.NEED&&d(t)&&!l(t,C)&&c(t),t},n=P.exports={KEY:C,NEED:!1,fastKey:s,getWeak:f,onFreeze:i}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(w,P,S){var C=w("./_global"),T=w("./_task").set,l=C.MutationObserver||C.WebKitMutationObserver,p=C.process,h=C.Promise,d=w("./_cof")(p)=="process";P.exports=function(){var o,c,s,f=function(){var u,y;for(d&&(u=p.domain)&&u.exit();o;){y=o.fn,o=o.next;try{y()}catch(g){throw o?s():c=void 0,g}}c=void 0,u&&u.enter()};if(d)s=function(){p.nextTick(f)};else if(!l||C.navigator&&C.navigator.standalone)if(h&&h.resolve){var i=h.resolve(void 0);s=function(){i.then(f)}}else s=function(){T.call(C,f)};else{var n=!0,t=document.createTextNode("");new l(f).observe(t,{characterData:!0}),s=function(){t.data=n=!n}}return function(u){var y={fn:u,next:void 0};c&&(c.next=y),o||(o=y,s()),c=y}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(w,P,S){"use strict";function C(l){var p,h;this.promise=new l(function(d,o){if(p!==void 0||h!==void 0)throw TypeError("Bad Promise constructor");p=d,h=o}),this.resolve=T(p),this.reject=T(h)}var T=w("./_a-function");P.exports.f=function(l){return new C(l)}},{"./_a-function":58}],96:[function(w,P,S){"use strict";var C=w("./_object-keys"),T=w("./_object-gops"),l=w("./_object-pie"),p=w("./_to-object"),h=w("./_iobject"),d=Object.assign;P.exports=!d||w("./_fails")(function(){var o={},c={},s=Symbol(),f="abcdefghijklmnopqrst";return o[s]=7,f.split("").forEach(function(i){c[i]=i}),d({},o)[s]!=7||Object.keys(d({},c)).join("")!=f})?function(o,c){for(var s=p(o),f=arguments.length,i=1,n=T.f,t=l.f;f>i;)for(var u,y=h(arguments[i++]),g=n?C(y).concat(n(y)):C(y),_=g.length,b=0;_>b;)t.call(y,u=g[b++])&&(s[u]=y[u]);return s}:d},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(w,P,S){var C=w("./_an-object"),T=w("./_object-dps"),l=w("./_enum-bug-keys"),p=w("./_shared-key")("IE_PROTO"),h=function(){},d=function(){var o,c=w("./_dom-create")("iframe"),s=l.length;for(c.style.display="none",w("./_html").appendChild(c),c.src="javascript:",o=c.contentWindow.document,o.open(),o.write("<script>document.F=Object</script>"),o.close(),d=o.F;s--;)delete d.prototype[l[s]];return d()};P.exports=Object.create||function(o,c){var s;return o!==null?(h.prototype=C(o),s=new h,h.prototype=null,s[p]=o):s=d(),c===void 0?s:T(s,c)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(w,P,S){var C=w("./_an-object"),T=w("./_ie8-dom-define"),l=w("./_to-primitive"),p=Object.defineProperty;S.f=w("./_descriptors")?Object.defineProperty:function(h,d,o){if(C(h),d=l(d,!0),C(o),T)try{return p(h,d,o)}catch(c){}if("get"in o||"set"in o)throw TypeError("Accessors not supported!");return"value"in o&&(h[d]=o.value),h}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(w,P,S){var C=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,o=l(h),c=o.length,s=0;c>s;)C.f(p,d=o[s++],h[d]);return p}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(w,P,S){var C=w("./_object-pie"),T=w("./_property-desc"),l=w("./_to-iobject"),p=w("./_to-primitive"),h=w("./_has"),d=w("./_ie8-dom-define"),o=Object.getOwnPropertyDescriptor;S.f=w("./_descriptors")?o:function(c,s){if(c=l(c),s=p(s,!0),d)try{return o(c,s)}catch(f){}if(h(c,s))return T(!C.f.call(c,s),c[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 C=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(o){return p.slice()}};P.exports.f=function(d){return p&&l.call(d)=="[object Window]"?h(d):T(C(d))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(w,P,S){var C=w("./_object-keys-internal"),T=w("./_enum-bug-keys").concat("length","prototype");S.f=Object.getOwnPropertyNames||function(l){return C(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 C=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),C(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 C=w("./_has"),T=w("./_to-iobject"),l=w("./_array-includes")(!1),p=w("./_shared-key")("IE_PROTO");P.exports=function(h,d){var o,c=T(h),s=0,f=[];for(o in c)o!=p&&C(c,o)&&f.push(o);for(;d.length>s;)C(c,o=d[s++])&&(~l(f,o)||f.push(o));return f}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(w,P,S){var C=w("./_object-keys-internal"),T=w("./_enum-bug-keys");P.exports=Object.keys||function(l){return C(l,T)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(w,P,S){S.f={}.propertyIsEnumerable},{}],108:[function(w,P,S){var C=w("./_export"),T=w("./_core"),l=w("./_fails");P.exports=function(p,h){var d=(T.Object||{})[p]||Object[p],o={};o[p]=h(d),C(C.S+C.F*l(function(){d(1)}),"Object",o)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(w,P,S){P.exports=function(C){try{return{e:!1,v:C()}}catch(T){return{e:!0,v:T}}}},{}],110:[function(w,P,S){var C=w("./_an-object"),T=w("./_is-object"),l=w("./_new-promise-capability");P.exports=function(p,h){if(C(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(C,T){return{enumerable:!(1&C),configurable:!(2&C),writable:!(4&C),value:T}}},{}],112:[function(w,P,S){var C=w("./_hide");P.exports=function(T,l,p){for(var h in l)p&&T[h]?T[h]=l[h]:C(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 C=w("./_global"),T=w("./_core"),l=w("./_object-dp"),p=w("./_descriptors"),h=w("./_wks")("species");P.exports=function(d){var o=typeof T[d]=="function"?T[d]:C[d];p&&o&&!o[h]&&l.f(o,h,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(w,P,S){var C=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)&&C(p,l,{configurable:!0,value:h})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(w,P,S){var C=w("./_shared")("keys"),T=w("./_uid");P.exports=function(l){return C[l]||(C[l]=T(l))}},{"./_shared":117,"./_uid":127}],117:[function(w,P,S){var C=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:C.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 C=w("./_an-object"),T=w("./_a-function"),l=w("./_wks")("species");P.exports=function(p,h){var d,o=C(p).constructor;return o===void 0||(d=C(o)[l])==null?h:T(d)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(w,P,S){var C=w("./_to-integer"),T=w("./_defined");P.exports=function(l){return function(p,h){var d,o,c=String(T(p)),s=C(h),f=c.length;return s<0||s>=f?l?"":void 0:(d=c.charCodeAt(s),d<55296||d>56319||s+1===f||(o=c.charCodeAt(s+1))<56320||o>57343?l?c.charAt(s):d:l?c.slice(s,s+2):o-56320+(d-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(w,P,S){var C,T,l,p=w("./_ctx"),h=w("./_invoke"),d=w("./_html"),o=w("./_dom-create"),c=w("./_global"),s=c.process,f=c.setImmediate,i=c.clearImmediate,n=c.MessageChannel,t=c.Dispatch,u=0,y={},g=function(){var b=+this;if(y.hasOwnProperty(b)){var v=y[b];delete y[b],v()}},_=function(b){g.call(b.data)};f&&i||(f=function(b){for(var v=[],m=1;arguments.length>m;)v.push(arguments[m++]);return y[++u]=function(){h(typeof b=="function"?b:Function(b),v)},C(u),u},i=function(b){delete y[b]},w("./_cof")(s)=="process"?C=function(b){s.nextTick(p(g,b,1))}:t&&t.now?C=function(b){t.now(p(g,b,1))}:n?(T=new n,l=T.port2,T.port1.onmessage=_,C=p(l.postMessage,l,1)):c.addEventListener&&typeof postMessage=="function"&&!c.importScripts?(C=function(b){c.postMessage(b+"","*")},c.addEventListener("message",_,!1)):C="onreadystatechange"in o("script")?function(b){d.appendChild(o("script")).onreadystatechange=function(){d.removeChild(this),g.call(b)}}:function(b){setTimeout(p(g,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 C=w("./_to-integer"),T=Math.max,l=Math.min;P.exports=function(p,h){return p=C(p),p<0?T(p+h,0):l(p,h)}},{"./_to-integer":122}],122:[function(w,P,S){var C=Math.ceil,T=Math.floor;P.exports=function(l){return isNaN(l=+l)?0:(l>0?T:C)(l)}},{}],123:[function(w,P,S){var C=w("./_iobject"),T=w("./_defined");P.exports=function(l){return C(T(l))}},{"./_defined":68,"./_iobject":82}],124:[function(w,P,S){var C=w("./_to-integer"),T=Math.min;P.exports=function(l){return l>0?T(C(l),9007199254740991):0}},{"./_to-integer":122}],125:[function(w,P,S){var C=w("./_defined");P.exports=function(T){return Object(C(T))}},{"./_defined":68}],126:[function(w,P,S){var C=w("./_is-object");P.exports=function(T,l){if(!C(T))return T;var p,h;if(l&&typeof(p=T.toString)=="function"&&!C(h=p.call(T)))return h;if(typeof(p=T.valueOf)=="function"&&!C(h=p.call(T)))return h;if(!l&&typeof(p=T.toString)=="function"&&!C(h=p.call(T)))return h;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(w,P,S){var C=0,T=Math.random();P.exports=function(l){return"Symbol(".concat(l===void 0?"":l,")_",(++C+T).toString(36))}},{}],128:[function(w,P,S){var C=w("./_global"),T=C.navigator;P.exports=T&&T.userAgent||""},{"./_global":76}],129:[function(w,P,S){var C=w("./_global"),T=w("./_core"),l=w("./_library"),p=w("./_wks-ext"),h=w("./_object-dp").f;P.exports=function(d){var o=T.Symbol||(T.Symbol=l?{}:C.Symbol||{});d.charAt(0)=="_"||d in o||h(o,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 C=w("./_shared")("wks"),T=w("./_uid"),l=w("./_global").Symbol,p=typeof l=="function";(P.exports=function(h){return C[h]||(C[h]=p&&l[h]||(p?l:T)("Symbol."+h))}).store=C},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(w,P,S){var C=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[C(p)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(w,P,S){"use strict";var C=w("./_ctx"),T=w("./_export"),l=w("./_to-object"),p=w("./_iter-call"),h=w("./_is-array-iter"),d=w("./_to-length"),o=w("./_create-property"),c=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,u=l(s),y=typeof this=="function"?this:Array,g=arguments.length,_=g>1?arguments[1]:void 0,b=_!==void 0,v=0,m=c(u);if(b&&(_=C(_,g>2?arguments[2]:void 0,2)),m==null||y==Array&&h(m))for(f=d(u.length),i=new y(f);f>v;v++)o(i,v,b?_(u[v],v):u[v]);else for(t=m.call(u),i=new y;!(n=t.next()).done;v++)o(i,v,b?p(t,_,[n.value,v],!0):n.value);return i.length=v,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 C=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,o=this._i++;return!h||o>=h.length?(this._t=void 0,T(1)):d=="keys"?T(0,o):d=="values"?T(0,h[o]):T(0,[o,h[o]])},"values"),l.Arguments=l.Array,C("keys"),C("values"),C("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(w,P,S){"use strict";var C=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"||!C(h))return!1;if(!C(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 C=w("./_export");C(C.S+C.F,"Object",{assign:w("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(w,P,S){var C=w("./_export");C(C.S,"Object",{create:w("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(w,P,S){var C=w("./_export");C(C.S+C.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 C=w("./_to-object"),T=w("./_object-gpo");w("./_object-sap")("getPrototypeOf",function(){return function(l){return T(C(l))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(w,P,S){var C=w("./_to-object"),T=w("./_object-keys");w("./_object-sap")("keys",function(){return function(l){return T(C(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 C,T,l,p,h=w("./_library"),d=w("./_global"),o=w("./_ctx"),c=w("./_classof"),s=w("./_export"),f=w("./_is-object"),i=w("./_a-function"),n=w("./_an-instance"),t=w("./_for-of"),u=w("./_species-constructor"),y=w("./_task").set,g=w("./_microtask")(),_=w("./_new-promise-capability"),b=w("./_perform"),v=w("./_user-agent"),m=w("./_promise-resolve"),E=d.TypeError,a=d.process,x=a&&a.versions,O=x&&x.v8||"",A=d.Promise,D=c(a)=="process",I=function(){},F=T=_.f,K=!!function(){try{var ie=A.resolve(1),oe=(ie.constructor={})[w("./_wks")("species")]=function(xe){xe(I,I)};return(D||typeof PromiseRejectionEvent=="function")&&ie.then(I)instanceof oe&&O.indexOf("6.6")!==0&&v.indexOf("Chrome/66")===-1}catch(xe){}}(),ne=function(ie){var oe;return!(!f(ie)||typeof(oe=ie.then)!="function")&&oe},j=function(ie,oe){if(!ie._n){ie._n=!0;var xe=ie._c;g(function(){for(var ye=ie._v,Ae=ie._s==1,pe=0;xe.length>pe;)!function(Oe){var Fe,Me,Ce,Le=Ae?Oe.ok:Oe.fail,de=Oe.resolve,ue=Oe.reject,ke=Oe.domain;try{Le?(Ae||(ie._h==2&&J(ie),ie._h=1),Le===!0?Fe=ye:(ke&&ke.enter(),Fe=Le(ye),ke&&(ke.exit(),Ce=!0)),Fe===Oe.promise?ue(E("Promise-chain cycle")):(Me=ne(Fe))?Me.call(Fe,de,ue):de(Fe)):ue(ye)}catch(Ue){ke&&!Ce&&ke.exit(),ue(Ue)}}(xe[pe++]);ie._c=[],ie._n=!1,oe&&!ie._h&&G(ie)})}},G=function(ie){y.call(d,function(){var oe,xe,ye,Ae=ie._v,pe=X(ie);if(pe&&(oe=b(function(){D?a.emit("unhandledRejection",Ae,ie):(xe=d.onunhandledrejection)?xe({promise:ie,reason:Ae}):(ye=d.console)&&ye.error&&ye.error("Unhandled promise rejection",Ae)}),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?a.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,xe=this;if(!xe._d){xe._d=!0,xe=xe._w||xe;try{if(xe===ie)throw E("Promise can't be resolved itself");(oe=ne(ie))?g(function(){var ye={_w:xe,_d:!1};try{oe.call(ie,o(Q,ye,1),o(B,ye,1))}catch(Ae){B.call(ye,Ae)}}):(xe._v=ie,xe._s=1,j(xe,!1))}catch(ye){B.call({_w:xe,_d:!1},ye)}}};K||(A=function(ie){n(this,A,"Promise","_h"),i(ie),C.call(this);try{ie(o(Q,this,1),o(B,this,1))}catch(oe){B.call(this,oe)}},C=function(ie){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},C.prototype=w("./_redefine-all")(A.prototype,{then:function(ie,oe){var xe=F(u(this,A));return xe.ok=typeof ie!="function"||ie,xe.fail=typeof oe=="function"&&oe,xe.domain=D?a.domain:void 0,this._c.push(xe),this._a&&this._a.push(xe),this._s&&j(this,!1),xe.promise},catch:function(ie){return this.then(void 0,ie)}}),l=function(){var ie=new C;this.promise=ie,this.resolve=o(Q,ie,1),this.reject=o(B,ie,1)},_.f=F=function(ie){return ie===A||ie===p?new l(ie):T(ie)}),s(s.G+s.W+s.F*!K,{Promise:A}),w("./_set-to-string-tag")(A,"Promise"),w("./_set-species")("Promise"),p=w("./_core").Promise,s(s.S+s.F*!K,"Promise",{reject:function(ie){var oe=F(this);return(0,oe.reject)(ie),oe.promise}}),s(s.S+s.F*(h||!K),"Promise",{resolve:function(ie){return m(h&&this===p?A:this,ie)}}),s(s.S+s.F*!(K&&w("./_iter-detect")(function(ie){A.all(ie).catch(I)})),"Promise",{all:function(ie){var oe=this,xe=F(oe),ye=xe.resolve,Ae=xe.reject,pe=b(function(){var Oe=[],Fe=0,Me=1;t(ie,!1,function(Ce){var Le=Fe++,de=!1;Oe.push(void 0),Me++,oe.resolve(Ce).then(function(ue){de||(de=!0,Oe[Le]=ue,--Me||ye(Oe))},Ae)}),--Me||ye(Oe)});return pe.e&&Ae(pe.v),xe.promise},race:function(ie){var oe=this,xe=F(oe),ye=xe.reject,Ae=b(function(){t(ie,!1,function(pe){oe.resolve(pe).then(xe.resolve,ye)})});return Ae.e&&ye(Ae.v),xe.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 C=w("./_export"),T=w("./_to-absolute-index"),l=String.fromCharCode,p=String.fromCodePoint;C(C.S+C.F*(!!p&&p.length!=1),"String",{fromCodePoint:function(h){for(var d,o=[],c=arguments.length,s=0;c>s;){if(d=+arguments[s++],T(d,1114111)!==d)throw RangeError(d+" is not a valid code point");o.push(d<65536?l(d):l(55296+((d-=65536)>>10),d%1024+56320))}return o.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(w,P,S){"use strict";var C=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=C(l,p),this._i+=T.length,{value:T,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(w,P,S){"use strict";var C=w("./_global"),T=w("./_has"),l=w("./_descriptors"),p=w("./_export"),h=w("./_redefine"),d=w("./_meta").KEY,o=w("./_fails"),c=w("./_shared"),s=w("./_set-to-string-tag"),f=w("./_uid"),i=w("./_wks"),n=w("./_wks-ext"),t=w("./_wks-define"),u=w("./_enum-keys"),y=w("./_is-array"),g=w("./_an-object"),_=w("./_is-object"),b=w("./_to-iobject"),v=w("./_to-primitive"),m=w("./_property-desc"),E=w("./_object-create"),a=w("./_object-gopn-ext"),x=w("./_object-gopd"),O=w("./_object-dp"),A=w("./_object-keys"),D=x.f,I=O.f,F=a.f,K=C.Symbol,ne=C.JSON,j=ne&&ne.stringify,G=i("_hidden"),X=i("toPrimitive"),J={}.propertyIsEnumerable,B=c("symbol-registry"),Q=c("symbols"),ie=c("op-symbols"),oe=Object.prototype,xe=typeof K=="function",ye=C.QObject,Ae=!ye||!ye.prototype||!ye.prototype.findChild,pe=l&&o(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,Oe=function($){var V=Q[$]=E(K.prototype);return V._k=$,V},Fe=xe&&typeof K.iterator=="symbol"?function($){return typeof $=="symbol"}:function($){return $ instanceof K},Me=function($,V,Y){return $===oe&&Me(ie,V,Y),g($),V=v(V,!0),g(Y),T(Q,V)?(Y.enumerable?(T($,G)&&$[G][V]&&($[G][V]=!1),Y=E(Y,{enumerable:m(0,!1)})):(T($,G)||I($,G,m(1,{})),$[G][V]=!0),pe($,V,Y)):I($,V,Y)},Ce=function($,V){g($);for(var Y,me=u(V=b(V)),Re=0,rt=me.length;rt>Re;)Me($,Y=me[Re++],V[Y]);return $},Le=function($,V){return V===void 0?E($):Ce(E($),V)},de=function($){var V=J.call(this,$=v($,!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=v(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}},ke=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};xe||(K=function(){if(this instanceof K)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,$,m(1,Y))};return l&&Ae&&pe(oe,$,{configurable:!0,set:V}),Oe($)},h(K.prototype,"toString",function(){return this._k}),x.f=ue,O.f=Me,w("./_object-gopn").f=a.f=ke,w("./_object-pie").f=de,w("./_object-gops").f=Ue,l&&!w("./_library")&&h(oe,"propertyIsEnumerable",de,!0),n.f=function($){return Oe(i($))}),p(p.G+p.W+p.F*!xe,{Symbol:K});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*!xe,"Symbol",{for:function($){return T(B,$+="")?B[$]:B[$]=K($)},keyFor:function($){if(!Fe($))throw TypeError($+" is not a symbol!");for(var V in B)if(B[V]===$)return V},useSetter:function(){Ae=!0},useSimple:function(){Ae=!1}}),p(p.S+p.F*!xe,"Object",{create:Le,defineProperty:Me,defineProperties:Ce,getOwnPropertyDescriptor:ue,getOwnPropertyNames:ke,getOwnPropertySymbols:Ue}),ne&&p(p.S+p.F*(!xe||o(function(){var $=K();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)&&!Fe($))return y(V)||(V=function(rt,Pe){if(typeof Y=="function"&&(Pe=Y.call(this,rt,Pe)),!Fe(Pe))return Pe}),me[1]=V,j.apply(ne,me)}}),K.prototype[X]||w("./_hide")(K.prototype,X,K.prototype.valueOf),s(K,"Symbol"),s(Math,"Math",!0),s(C.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 C=w("./_export"),T=w("./_core"),l=w("./_global"),p=w("./_species-constructor"),h=w("./_promise-resolve");C(C.P+C.R,"Promise",{finally:function(d){var o=p(this,T.Promise||l.Promise),c=typeof d=="function";return this.then(c?function(s){return h(o,d()).then(function(){return s})}:d,c?function(s){return h(o,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 C=w("./_export"),T=w("./_new-promise-capability"),l=w("./_perform");C(C.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 C=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;d<h.length;d++){var o=h[d],c=C[o],s=c&&c.prototype;s&&!s[p]&&T(s,p,o),l[o]=l.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(w,P,S){var C=w("./_export"),T=w("./_task");C(C.G+C.B,{setImmediate:T.set,clearImmediate:T.clear})},{"./_export":73,"./_task":120}],153:[function(w,P,S){(function(C){"use strict";function T(v){return Array.isArray?Array.isArray(v):g(v)==="[object Array]"}function l(v){return typeof v=="boolean"}function p(v){return v===null}function h(v){return v==null}function d(v){return typeof v=="number"}function o(v){return typeof v=="string"}function c(v){return(v===void 0?"undefined":(0,b.default)(v))==="symbol"}function s(v){return v===void 0}function f(v){return g(v)==="[object RegExp]"}function i(v){return(v===void 0?"undefined":(0,b.default)(v))==="object"&&v!==null}function n(v){return g(v)==="[object Date]"}function t(v){return g(v)==="[object Error]"||v instanceof Error}function u(v){return typeof v=="function"}function y(v){return v===null||typeof v=="boolean"||typeof v=="number"||typeof v=="string"||(v===void 0?"undefined":(0,b.default)(v))==="symbol"||v===void 0}function g(v){return Object.prototype.toString.call(v)}var _=w("babel-runtime/helpers/typeof"),b=function(v){return v&&v.__esModule?v:{default:v}}(_);S.isArray=T,S.isBoolean=l,S.isNull=p,S.isNullOrUndefined=h,S.isNumber=d,S.isString=o,S.isSymbol=c,S.isUndefined=s,S.isRegExp=f,S.isObject=i,S.isDate=n,S.isError=t,S.isFunction=u,S.isPrimitive=y,S.isBuffer=C.isBuffer}).call(this,{isBuffer:w("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(w,P,S){"use strict";var C=w("babel-runtime/helpers/typeof"),T=function(l){return l&&l.__esModule?l:{default:l}}(C);!function(l){function p(s,f){for(s=String(s),f=f||2;s.length<f;)s="0"+s;return s}function h(s){var f=new Date(s.getFullYear(),s.getMonth(),s.getDate());f.setDate(f.getDate()-(f.getDay()+6)%7+3);var i=new Date(f.getFullYear(),0,4);i.setDate(i.getDate()-(i.getDay()+6)%7+3);var n=f.getTimezoneOffset()-i.getTimezoneOffset();f.setHours(f.getHours()-n);var t=(f-i)/6048e5;return 1+Math.floor(t)}function d(s){var f=s.getDay();return f===0&&(f=7),f}function o(s){return s===null?"null":s===void 0?"undefined":(s===void 0?"undefined":(0,T.default)(s))!=="object"?s===void 0?"undefined":(0,T.default)(s):Array.isArray(s)?"array":{}.toString.call(s).slice(8,-1).toLowerCase()}var c=function(){var s=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,i=/[^-+\dA-Z]/g;return function(n,t,u,y){if(arguments.length!==1||o(n)!=="string"||/\d/.test(n)||(t=n,n=void 0),n=n||new Date,n instanceof Date||(n=new Date(n)),isNaN(n))throw TypeError("Invalid date");t=String(c.masks[t]||t||c.masks.default);var g=t.slice(0,4);g!=="UTC:"&&g!=="GMT:"||(t=t.slice(4),u=!0,g==="GMT:"&&(y=!0));var _=u?"getUTC":"get",b=n[_+"Date"](),v=n[_+"Day"](),m=n[_+"Month"](),E=n[_+"FullYear"](),a=n[_+"Hours"](),x=n[_+"Minutes"](),O=n[_+"Seconds"](),A=n[_+"Milliseconds"](),D=u?0:n.getTimezoneOffset(),I=h(n),F=d(n),K={d:b,dd:p(b),ddd:c.i18n.dayNames[v],dddd:c.i18n.dayNames[v+7],m:m+1,mm:p(m+1),mmm:c.i18n.monthNames[m],mmmm:c.i18n.monthNames[m+12],yy:String(E).slice(2),yyyy:E,h:a%12||12,hh:p(a%12||12),H:a,HH:p(a),M:x,MM:p(x),s:O,ss:p(O),l:p(A,3),L:p(Math.round(A/10)),t:a<12?"a":"p",tt:a<12?"am":"pm",T:a<12?"A":"P",TT:a<12?"AM":"PM",Z:y?"GMT":u?"UTC":(String(n).match(f)||[""]).pop().replace(i,""),o:(D>0?"-":"+")+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(ne){return ne in K?K[ne]:ne.slice(1,ne.length-1)})}}();c.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"},c.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 c}):(S===void 0?"undefined":(0,T.default)(S))==="object"?P.exports=c:l.dateFormat=c}(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(w,P,S){(function(C){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(o){var c=this.useColors;if(o[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+o[0]+(c?"%c ":" ")+"+"+S.humanize(this.diff),c){var s="color: "+this.color;o.splice(1,0,s,"color: inherit");var f=0,i=0;o[0].replace(/%[a-zA-Z%]/g,function(n){n!=="%%"&&(f++,n==="%c"&&(i=f))}),o.splice(i,0,s)}}function p(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function h(o){try{o==null?S.storage.removeItem("debug"):S.storage.debug=o}catch(c){}}function d(){var o;try{o=S.storage.debug}catch(c){}return!o&&C!==void 0&&"env"in C&&(o=C.env.DEBUG),o}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(o){}}(),S.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],S.formatters.j=function(o){try{return JSON.stringify(o)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}},S.enable(d())}).call(this,w("_process"))},{"./debug":156,_process:173}],156:[function(w,P,S){function C(c){var s,f=0;for(s in c)f=(f<<5)-f+c.charCodeAt(s),f|=0;return S.colors[Math.abs(f)%S.colors.length]}function T(c){function s(){if(s.enabled){var f=s,i=+new Date,n=i-(o||i);f.diff=n,f.prev=o,f.curr=i,o=i;for(var t=new Array(arguments.length),u=0;u<t.length;u++)t[u]=arguments[u];t[0]=S.coerce(t[0]),typeof t[0]!="string"&&t.unshift("%O");var y=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(g,_){if(g==="%%")return g;y++;var b=S.formatters[_];if(typeof b=="function"){var v=t[y];g=b.call(f,v),t.splice(y,1),y--}return g}),S.formatArgs.call(f,t),(s.log||S.log||console.log.bind(console)).apply(f,t)}}return s.namespace=c,s.enabled=S.enabled(c),s.useColors=S.useColors(),s.color=C(c),typeof S.init=="function"&&S.init(s),s}function l(c){S.save(c),S.names=[],S.skips=[];for(var s=(typeof c=="string"?c:"").split(/[\s,]+/),f=s.length,i=0;i<f;i++)s[i]&&(c=s[i].replace(/\*/g,".*?"),c[0]==="-"?S.skips.push(new RegExp("^"+c.substr(1)+"$")):S.names.push(new RegExp("^"+c+"$")))}function p(){S.enable("")}function h(c){var s,f;for(s=0,f=S.skips.length;s<f;s++)if(S.skips[s].test(c))return!1;for(s=0,f=S.names.length;s<f;s++)if(S.names[s].test(c))return!0;return!1}function d(c){return c instanceof Error?c.stack||c.message:c}S=P.exports=T.debug=T.default=T,S.coerce=d,S.disable=p,S.enable=l,S.enabled=h,S.humanize=w("ms"),S.names=[],S.skips=[],S.formatters={};var o},{ms:169}],157:[function(w,P,S){"use strict";function C(l){var p=""+l,h=T.exec(p);if(!h)return p;var d,o="",c=0,s=0;for(c=h.index;c<p.length;c++){switch(p.charCodeAt(c)){case 34:d="&quot;";break;case 38:d="&amp;";break;case 39:d="&#39;";break;case 60:d="&lt;";break;case 62:d="&gt;";break;default:continue}s!==c&&(o+=p.substring(s,c)),s=c+1,o+=d}return s!==c?o+p.substring(s,c):o}var T=/["'&<>]/;P.exports=C},{}],158:[function(w,P,S){function C(){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=C,C.EventEmitter=C,C.prototype._events=void 0,C.prototype._maxListeners=void 0,C.defaultMaxListeners=10,C.prototype.setMaxListeners=function(d){if(!l(d)||d<0||isNaN(d))throw TypeError("n must be a positive number");return this._maxListeners=d,this},C.prototype.emit=function(d){var o,c,s,f,i,n;if(this._events||(this._events={}),d==="error"&&(!this._events.error||p(this._events.error)&&!this._events.error.length)){if((o=arguments[1])instanceof Error)throw o;var t=new Error('Uncaught, unspecified "error" event. ('+o+")");throw t.context=o,t}if(c=this._events[d],h(c))return!1;if(T(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:f=Array.prototype.slice.call(arguments,1),c.apply(this,f)}else if(p(c))for(f=Array.prototype.slice.call(arguments,1),n=c.slice(),s=n.length,i=0;i<s;i++)n[i].apply(this,f);return!0},C.prototype.addListener=function(d,o){var c;if(!T(o))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",d,T(o.listener)?o.listener:o),this._events[d]?p(this._events[d])?this._events[d].push(o):this._events[d]=[this._events[d],o]:this._events[d]=o,p(this._events[d])&&!this._events[d].warned&&(c=h(this._maxListeners)?C.defaultMaxListeners:this._maxListeners)&&c>0&&this._events[d].length>c&&(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},C.prototype.on=C.prototype.addListener,C.prototype.once=function(d,o){function c(){this.removeListener(d,c),s||(s=!0,o.apply(this,arguments))}if(!T(o))throw TypeError("listener must be a function");var s=!1;return c.listener=o,this.on(d,c),this},C.prototype.removeListener=function(d,o){var c,s,f,i;if(!T(o))throw TypeError("listener must be a function");if(!this._events||!this._events[d])return this;if(c=this._events[d],f=c.length,s=-1,c===o||T(c.listener)&&c.listener===o)delete this._events[d],this._events.removeListener&&this.emit("removeListener",d,o);else if(p(c)){for(i=f;i-- >0;)if(c[i]===o||c[i].listener&&c[i].listener===o){s=i;break}if(s<0)return this;c.length===1?(c.length=0,delete this._events[d]):c.splice(s,1),this._events.removeListener&&this.emit("removeListener",d,o)}return this},C.prototype.removeAllListeners=function(d){var o,c;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(o in this._events)o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[d],T(c))this.removeListener(d,c);else if(c)for(;c.length;)this.removeListener(d,c[c.length-1]);return delete this._events[d],this},C.prototype.listeners=function(d){return this._events&&this._events[d]?T(this._events[d])?[this._events[d]]:this._events[d].slice():[]},C.prototype.listenerCount=function(d){if(this._events){var o=this._events[d];if(T(o))return 1;if(o)return o.length}return 0},C.listenerCount=function(d,o){return d.listenerCount(o)}},{}],159:[function(w,P,S){var C=w("http"),T=P.exports;for(var l in C)C.hasOwnProperty(l)&&(T[l]=C[l]);T.request=function(p,h){return p||(p={}),p.scheme="https",p.protocol="https:",C.request.call(this,p,h)}},{http:196}],160:[function(w,P,S){"use strict";var C=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(C.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(C,T,l,p,h){var d,o,c=8*h-p-1,s=(1<<c)-1,f=s>>1,i=-7,n=l?h-1:0,t=l?-1:1,u=C[T+n];for(n+=t,d=u&(1<<-i)-1,u>>=-i,i+=c;i>0;d=256*d+C[T+n],n+=t,i-=8);for(o=d&(1<<-i)-1,d>>=-i,i+=p;i>0;o=256*o+C[T+n],n+=t,i-=8);if(d===0)d=1-f;else{if(d===s)return o?NaN:1/0*(u?-1:1);o+=Math.pow(2,p),d-=f}return(u?-1:1)*o*Math.pow(2,d-p)},S.write=function(C,T,l,p,h,d){var o,c,s,f=8*d-h-1,i=(1<<f)-1,n=i>>1,t=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=p?0:d-1,y=p?1:-1,g=T<0||T===0&&1/T<0?1:0;for(T=Math.abs(T),isNaN(T)||T===1/0?(c=isNaN(T)?1:0,o=i):(o=Math.floor(Math.log(T)/Math.LN2),T*(s=Math.pow(2,-o))<1&&(o--,s*=2),T+=o+n>=1?t/s:t*Math.pow(2,1-n),T*s>=2&&(o++,s/=2),o+n>=i?(c=0,o=i):o+n>=1?(c=(T*s-1)*Math.pow(2,h),o+=n):(c=T*Math.pow(2,n-1)*Math.pow(2,h),o=0));h>=8;C[l+u]=255&c,u+=y,c/=256,h-=8);for(o=o<<h|c,f+=h;f>0;C[l+u]=255&o,u+=y,o/=256,f-=8);C[l+u-y]|=128*g}},{}],162:[function(w,P,S){typeof Object.create=="function"?P.exports=function(C,T){C.super_=T,C.prototype=Object.create(T.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}})}:P.exports=function(C,T){C.super_=T;var l=function(){};l.prototype=T.prototype,C.prototype=new l,C.prototype.constructor=C}},{}],163:[function(w,P,S){function C(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"&&C(l.slice(0,0))}P.exports=function(l){return l!=null&&(C(l)||T(l)||!!l._isBuffer)}},{}],164:[function(w,P,S){!function(C){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}):C.isClass=l}(this)},{}],165:[function(w,P,S){"use strict";function C(d){var o=d.slice(2);return o=o[0].toLowerCase()+o.slice(1)}var T=w("core-util-is"),l=w("isstream"),p=w("is-class");Object.keys(T).map(function(d){S[C(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&&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 C={}.toString;P.exports=Array.isArray||function(T){return C.call(T)=="[object Array]"}},{}],167:[function(w,P,S){function C(d){return d instanceof h.Stream}function T(d){return C(d)&&typeof d._read=="function"&&typeof d._readableState=="object"}function l(d){return C(d)&&typeof d._write=="function"&&typeof d._writableState=="object"}function p(d){return T(d)&&l(d)}var h=w("stream");P.exports=C,P.exports.isReadable=T,P.exports.isWritable=l,P.exports.isDuplex=p},{stream:195}],168:[function(w,P,S){"use strict";function C(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 o=Object.getOwnPropertyDescriptor(p,d);Object.defineProperty(l,d,o)}}),l}P.exports=C;var T=Object.prototype.hasOwnProperty},{}],169:[function(w,P,S){function C(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*c;case"hours":case"hour":case"hrs":case"hr":case"h":return n*o;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>=c?Math.round(f/c)+"d":f>=o?Math.round(f/o)+"h":f>=d?Math.round(f/d)+"m":f>=h?Math.round(f/h)+"s":f+"ms"}function l(f){return p(f,c,"day")||p(f,o,"hour")||p(f,d,"minute")||p(f,h,"second")||f+" ms"}function p(f,i,n){if(!(f<i))return f<1.5*i?Math.floor(f/i)+" "+n:Math.ceil(f/i)+" "+n+"s"}var h=1e3,d=60*h,o=60*d,c=24*o,s=365.25*c;P.exports=function(f,i){i=i||{};var n=typeof f;if(n==="string"&&f.length>0)return C(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(C){function T(d,o){for(var c=0,s=d.length-1;s>=0;s--){var f=d[s];f==="."?d.splice(s,1):f===".."?(d.splice(s,1),c++):c&&(d.splice(s,1),c--)}if(o)for(;c--;c)d.unshift("..");return d}function l(d){typeof d!="string"&&(d+="");var o,c=0,s=-1,f=!0;for(o=d.length-1;o>=0;--o)if(d.charCodeAt(o)===47){if(!f){c=o+1;break}}else s===-1&&(f=!1,s=o+1);return s===-1?"":d.slice(c,s)}function p(d,o){if(d.filter)return d.filter(o);for(var c=[],s=0;s<d.length;s++)o(d[s],s,d)&&c.push(d[s]);return c}S.resolve=function(){for(var d="",o=!1,c=arguments.length-1;c>=-1&&!o;c--){var s=c>=0?arguments[c]:C.cwd();if(typeof s!="string")throw new TypeError("Arguments to path.resolve must be strings");s&&(d=s+"/"+d,o=s.charAt(0)==="/")}return d=T(p(d.split("/"),function(f){return!!f}),!o).join("/"),(o?"/":"")+d||"."},S.normalize=function(d){var o=S.isAbsolute(d),c=h(d,-1)==="/";return d=T(p(d.split("/"),function(s){return!!s}),!o).join("/"),d||o||(d="."),d&&c&&(d+="/"),(o?"/":"")+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(o,c){if(typeof o!="string")throw new TypeError("Arguments to path.join must be strings");return o}).join("/"))},S.relative=function(d,o){function c(y){for(var g=0;g<y.length&&y[g]==="";g++);for(var _=y.length-1;_>=0&&y[_]==="";_--);return g>_?[]:y.slice(g,_-g+1)}d=S.resolve(d).substr(1),o=S.resolve(o).substr(1);for(var s=c(d.split("/")),f=c(o.split("/")),i=Math.min(s.length,f.length),n=i,t=0;t<i;t++)if(s[t]!==f[t]){n=t;break}for(var u=[],t=n;t<s.length;t++)u.push("..");return u=u.concat(f.slice(n)),u.join("/")},S.sep="/",S.delimiter=":",S.dirname=function(d){if(typeof d!="string"&&(d+=""),d.length===0)return".";for(var o=d.charCodeAt(0),c=o===47,s=-1,f=!0,i=d.length-1;i>=1;--i)if((o=d.charCodeAt(i))===47){if(!f){s=i;break}}else f=!1;return s===-1?c?"/":".":c&&s===1?"/":d.slice(0,s)},S.basename=function(d,o){var c=l(d);return o&&c.substr(-1*o.length)===o&&(c=c.substr(0,c.length-o.length)),c},S.extname=function(d){typeof d!="string"&&(d+="");for(var o=-1,c=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?o===-1?o=n:i!==1&&(i=1):o!==-1&&(i=-1);else if(!f){c=n+1;break}}return o===-1||s===-1||i===0||i===1&&o===s-1&&o===c+1?"":d.slice(o,s)};var h="ab".substr(-1)==="b"?function(d,o,c){return d.substr(o,c)}:function(d,o,c){return o<0&&(o=d.length+o),d.substr(o,c)}}).call(this,w("_process"))},{_process:173}],171:[function(w,P,S){(function(C){(function(){"use strict";function T(O){return O=String(O),O.charAt(0).toUpperCase()+O.slice(1)}function l(O,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(O)&&!/^Windows Phone /i.test(O)&&(I=I[/[\d.]+$/.exec(O)])&&(O="Windows "+I),O=String(O),A&&D&&(O=O.replace(RegExp(A,"i"),D)),O=h(O.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(O,A){var D=-1,I=O?O.length:0;if(typeof I=="number"&&I>-1&&I<=b)for(;++D<I;)A(O[D],D,O);else d(O,A)}function h(O){return O=i(O),/^(?:webOS|i(?:OS|P))/.test(O)?O:T(O)}function d(O,A){for(var D in O)E.call(O,D)&&A(O[D],D,O)}function o(O){return O==null?T(O):a.call(O).slice(8,-1)}function c(O,A){var D=O!=null?typeof O[A]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(D)||D=="object"&&!O[A])}function s(O){return String(O).replace(/([ -])(?!$)/g,"$1?")}function f(O,A){var D=null;return p(O,function(I,F){D=A(D,I,F,O)}),D}function i(O){return String(O).replace(/^ +| +$/g,"")}function n(O){function A($){return f($,function(V,Y){var me=Y.pattern||s(Y);return!V&&(V=RegExp("\\b"+me+" *\\d+[.\\w_]*","i").exec(O)||RegExp("\\b"+me+" *\\w+-[\\w]*","i").exec(O)||RegExp("\\b"+me+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(O))&&((V=String(Y.label&&!RegExp(me,"i").test(Y.label)?Y.label:V).split("/"))[1]&&!/[\d.]+/.test(V[0])&&(V[0]+=" "+V[1]),Y=Y.label||Y,V=h(V[0].replace(RegExp(me,"i"),Y).replace(RegExp("; *(?:"+Y+"[_-])?","i")," ").replace(RegExp("("+Y+")[-_.]?(\\w)","i"),"$1 $2"))),V})}function D(){return this.description||""}var I=u,F=O&&typeof O=="object"&&o(O)!="String";F&&(I=O,O=null);var K=I.navigator||{},ne=K.userAgent||"";O||(O=ne);var j,G,X=F?!!K.likeChrome:/\bChrome\b/.test(O)&&!/internal|\n/i.test(a.toString()),J=F?"Object":"ScriptBridgingProxyObject",B=F?"Object":"Environment",Q=F&&I.java?"JavaPackage":o(I.java),ie=F?"Object":"RuntimeObject",oe=/\bJava/.test(Q)&&I.java,xe=oe&&o(I.environment)==B,ye=oe?"a":"\u4F2A",Ae=oe?"b":"\u5C3E",pe=I.document||{},Oe=I.operamini||I.opera,Fe=v.test(Fe=F&&Oe?Oe["[[Class]]"]:o(Oe))?Fe:Oe=null,Me=O,Ce=[],Le=null,de=O==ne,ue=de&&Oe&&typeof Oe.version=="function"&&Oe.version(),ke=function($){return f($,function(V,Y){return V||RegExp("\\b"+(Y.pattern||s(Y))+"\\b","i").exec(O)&&(Y.label||Y)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Ue=function($){return f($,function(V,Y){return V||RegExp("\\b"+(Y.pattern||s(Y))+"\\b","i").exec(O)&&(Y.label||Y)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),Ye=A([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),ee=function($){return f($,function(V,Y,me){return V||(Y[Ye]||Y[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ye)]||RegExp("\\b"+s(me)+"(?:\\b|\\w*\\d)","i").exec(O))&&me})}({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),M=function($){return f($,function(V,Y){var me=Y.pattern||s(Y);return!V&&(V=RegExp("\\b"+me+"(?:/[\\d.]+|[ \\w.]*)","i").exec(O))&&(V=l(V,me,Y.label||Y)),V})}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(ke&&(ke=[ke]),ee&&!Ye&&(Ye=A([ee])),(j=/\bGoogle TV\b/.exec(Ye))&&(Ye=j[0]),/\bSimulator\b/i.test(O)&&(Ye=(Ye?Ye+" ":"")+"Simulator"),Ue=="Opera Mini"&&/\bOPiOS\b/.test(O)&&Ce.push("running in Turbo/Uncompressed mode"),Ue=="IE"&&/\blike iPhone OS\b/.test(O)?(j=n(O.replace(/like iPhone OS/,"")),ee=j.manufacturer,Ye=j.product):/^iP/.test(Ye)?(Ue||(Ue="Safari"),M="iOS"+((j=/ OS ([\d_]+)/i.exec(O))?" "+j[1].replace(/_/g,"."):"")):Ue!="Konqueror"||/buntu/i.test(M)?ee&&ee!="Google"&&(/Chrome/.test(Ue)&&!/\bMobile Safari\b/i.test(O)||/\bVita\b/.test(Ye))||/\bAndroid\b/.test(M)&&/^Chrome/.test(Ue)&&/\bVersion\//i.test(O)?(Ue="Android Browser",M=/\bAndroid\b/.test(M)?M:"Android"):Ue=="Silk"?(/\bMobi/i.test(O)||(M="Android",Ce.unshift("desktop mode")),/Accelerated *= *true/i.test(O)&&Ce.unshift("accelerated")):Ue=="PaleMoon"&&(j=/\bFirefox\/([\d.]+)\b/.exec(O))?Ce.push("identifying as Firefox "+j[1]):Ue=="Firefox"&&(j=/\b(Mobile|Tablet|TV)\b/i.exec(O))?(M||(M="Firefox OS"),Ye||(Ye=j[1])):!Ue||(j=!/\bMinefield\b/i.test(O)&&/\b(?:Firefox|Safari)\b/.exec(Ue))?(Ue&&!Ye&&/[\/,]|^[^(]+?\)/.test(O.slice(O.indexOf(j+"/")+8))&&(Ue=null),(j=Ye||ee||M)&&(Ye||ee||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(M))&&(Ue=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(M)?M:j)+" Browser")):Ue=="Electron"&&(j=(/\bChrome\/([\d.]+)\b/.exec(O)||0)[1])&&Ce.push("Chromium "+j):M="Kubuntu",ue||(ue=function($){return f($,function(V,Y){return V||(RegExp(Y+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(O)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",s(Ue),"(?:Firefox|Minefield|NetFront)"])),(j=ke=="iCab"&&parseFloat(ue)>3&&"WebKit"||/\bOpera\b/.test(Ue)&&(/\bOPR\b/.test(O)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(O)&&!/^(?:Trident|EdgeHTML)$/.test(ke)&&"WebKit"||!ke&&/\bMSIE\b/i.test(O)&&(M=="Mac OS"?"Tasman":"Trident")||ke=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ue)&&"NetFront")&&(ke=[j]),Ue=="IE"&&(j=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(O)||0)[1])?(Ue+=" Mobile",M="Windows Phone "+(/\+$/.test(j)?j:j+".x"),Ce.unshift("desktop mode")):/\bWPDesktop\b/i.test(O)?(Ue="IE Mobile",M="Windows Phone 8.x",Ce.unshift("desktop mode"),ue||(ue=(/\brv:([\d.]+)/.exec(O)||0)[1])):Ue!="IE"&&ke=="Trident"&&(j=/\brv:([\d.]+)/.exec(O))&&(Ue&&Ce.push("identifying as "+Ue+(ue?" "+ue:"")),Ue="IE",ue=j[1]),de){if(c(I,"global"))if(oe&&(j=oe.lang.System,Me=j.getProperty("os.arch"),M=M||j.getProperty("os.name")+" "+j.getProperty("os.version")),xe){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"?(Ce.push("Node "+j.versions.node),Ue="Electron",ue=j.versions.electron):typeof j.versions.nw=="string"&&(Ce.push("Chromium "+ue,"Node "+j.versions.node),Ue="NW.js",ue=j.versions.nw)),Ue||(Ue="Node.js",Me=j.arch,M=j.platform,ue=/[\d.]+/.exec(j.version),ue=ue?ue[0]:null));else o(j=I.runtime)==J?(Ue="Adobe AIR",M=j.flash.system.Capabilities.os):o(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(O))?(ue=[ue,pe.documentMode],(j=+j[1]+4)!=ue[1]&&(Ce.push("IE "+ue[1]+" mode"),ke&&(ke[1]=""),ue[1]=j),ue=Ue=="IE"?String(ue[1].toFixed(1)):ue[0]):typeof pe.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ue)&&(Ce.push("masking as "+Ue+" "+ue),Ue="IE",ue="11.0",ke=["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(O+";"+(de&&K.appMinorVersion))||/\bMinefield\b/i.test(O)&&"a")&&(Le=/b/i.test(j)?"beta":"alpha",ue=ue.replace(RegExp(j+"\\+?$"),"")+(Le=="beta"?Ae: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(O)&&Ce.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(Ue)&&(!Ue||Ye||/Browser|Mobi/.test(Ue))||M!="Windows CE"&&!/Mobi/i.test(O))if(Ue=="IE"&&de)try{I.external===null&&Ce.unshift("platform preview")}catch($){Ce.unshift("embedded")}else(/\bBlackBerry\b/.test(Ye)||/\bBB10\b/.test(O))&&(j=(RegExp(Ye.replace(/ +/g," *")+"/([.\\d]+)","i").exec(O)||0)[1]||ue)?(j=[j,/BB10/.test(O)],M=(j[1]?(Ye=null,ee="BlackBerry"):"Device Software")+" "+j[0],ue=null):this!=d&&Ye!="Wii"&&(de&&Oe||/Opera/.test(Ue)&&/\b(?:MSIE|Firefox)\b/i.test(O)||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(O)))&&!v.test(j=n.call(d,O.replace(v,"")+";"))&&j.name&&(j="ing as "+j.name+((j=j.version)?" "+j:""),v.test(Ue)?(/\bIE\b/.test(j)&&M=="Mac OS"&&(M=null),j="identify"+j):(j="mask"+j,Ue=Fe?h(Fe.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(j)&&(M=null),de||(ue=null)),ke=["Presto"],Ce.push(j));else Ue+=" Mobile";(j=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(O)||0)[1])&&(j=[parseFloat(j.replace(/\.(\d)$/,".0$1")),j],Ue=="Safari"&&j[1].slice(-1)=="+"?(Ue="WebKit Nightly",Le="alpha",ue=j[1].slice(0,-1)):ue!=j[1]&&ue!=(j[2]=(/\bSafari\/([\d.]+\+?)/i.exec(O)||0)[1])||(ue=null),j[1]=(/\bChrome\/([\d.]+)/i.exec(O)||0)[1],j[0]==537.36&&j[2]==537.36&&parseFloat(j[1])>=28&&ke=="WebKit"&&(ke=["Blink"]),de&&(X||j[1])?(ke&&(ke[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:ke!="Blink"?"27":"28")):(ke&&(ke[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"),ke&&(ke[1]+=" "+(j+=typeof j=="number"?".x":/[.+]/.test(j)?"":"+")),Ue=="Safari"&&(!ue||parseInt(ue)>45)&&(ue=j)),Ue=="Opera"&&(j=/\bzbov|zvav$/.exec(M))?(Ue+=" ",Ce.unshift("desktop mode"),j=="zvav"?(Ue+="Mini",ue=null):Ue+="Mobile",M=M.replace(RegExp(" *"+j+"$"),"")):Ue=="Safari"&&/\bChrome\b/.exec(ke&&ke[1])&&(Ce.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&&O.indexOf("/"+j+"-")>-1&&(M=i(M.replace(j,""))),ke&&!/\b(?:Avant|Nook)\b/.test(Ue)&&(/Browser|Lunascape|Maxthon/.test(Ue)||Ue!="Safari"&&/^iOS/.test(M)&&/\bSafari\b/.test(ke[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Ue)&&ke[1])&&(j=ke[ke.length-1])&&Ce.push(j),Ce.length&&(Ce=["("+Ce.join("; ")+")"]),ee&&Ye&&Ye.indexOf(ee)<0&&Ce.push("on "+ee),Ye&&Ce.push((/^on /.test(Ce[Ce.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(Me))&&!/\bi686\b/i.test(Me)?(M&&(M.architecture=64,M.family=M.family.replace(RegExp(" *"+j),"")),Ue&&(/\bWOW64\b/i.test(O)||de&&/\w(?:86|32)$/.test(K.cpuClass||K.platform)&&!/\bWin64; x64\b/i.test(O))&&Ce.unshift("32-bit")):M&&/^OS X/.test(M.family)&&Ue=="Chrome"&&parseFloat(ue)>=39&&(M.architecture=64),O||(O=null);var N={};return N.description=O,N.layout=ke&&ke[0],N.manufacturer=ee,N.name=Ue,N.prerelease=Le,N.product=Ye,N.ua=O,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&&Ce.unshift(ue),N.name&&Ce.unshift(Ue),M&&Ue&&(M!=String(M).split(" ")[0]||M!=Ue.split(" ")[0]&&!Ye)&&Ce.push(Ye?"("+M+")":"on "+M),Ce.length&&(N.description=Ce.join(" ")),N}var t={function:!0,object:!0},u=t[typeof window]&&window||this,y=t[typeof S]&&S,g=t[typeof P]&&P&&!P.nodeType&&P,_=y&&g&&typeof C=="object"&&C;!_||_.global!==_&&_.window!==_&&_.self!==_||(u=_);var b=Math.pow(2,53)-1,v=/\bOpera/,m=Object.prototype,E=m.hasOwnProperty,a=m.toString,x=n();typeof U=="function"&&typeof U.amd=="object"&&U.amd?(u.platform=x,U(function(){return x})):y&&g?d(x,function(O,A){y[A]=O}):u.platform=x}).call(this)}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(w,P,S){(function(C){"use strict";function T(l,p,h,d){if(typeof l!="function")throw new TypeError('"callback" argument must be a function');var o,c,s=arguments.length;switch(s){case 0:case 1:return C.nextTick(l);case 2:return C.nextTick(function(){l.call(null,p)});case 3:return C.nextTick(function(){l.call(null,p,h)});case 4:return C.nextTick(function(){l.call(null,p,h,d)});default:for(o=new Array(s-1),c=0;c<o.length;)o[c++]=arguments[c];return C.nextTick(function(){l.apply(null,o)})}}!C.version||C.version.indexOf("v0.")===0||C.version.indexOf("v1.")===0&&C.version.indexOf("v1.8.")!==0?P.exports={nextTick:T}:P.exports=C}).call(this,w("_process"))},{_process:173}],173:[function(w,P,S){function C(){throw new Error("setTimeout has not been defined")}function T(){throw new Error("clearTimeout has not been defined")}function l(g){if(s===setTimeout)return setTimeout(g,0);if((s===C||!s)&&setTimeout)return s=setTimeout,setTimeout(g,0);try{return s(g,0)}catch(_){try{return s.call(null,g,0)}catch(b){return s.call(this,g,0)}}}function p(g){if(f===clearTimeout)return clearTimeout(g);if((f===T||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(g);try{return f(g)}catch(_){try{return f.call(null,g)}catch(b){return f.call(this,g)}}}function h(){u&&n&&(u=!1,n.length?t=n.concat(t):y=-1,t.length&&d())}function d(){if(!u){var g=l(h);u=!0;for(var _=t.length;_;){for(n=t,t=[];++y<_;)n&&n[y].run();y=-1,_=t.length}n=null,u=!1,p(g)}}function o(g,_){this.fun=g,this.array=_}function c(){}var s,f,i=P.exports={};!function(){try{s=typeof setTimeout=="function"?setTimeout:C}catch(g){s=C}try{f=typeof clearTimeout=="function"?clearTimeout:T}catch(g){f=T}}();var n,t=[],u=!1,y=-1;i.nextTick=function(g){var _=new Array(arguments.length-1);if(arguments.length>1)for(var b=1;b<arguments.length;b++)_[b-1]=arguments[b];t.push(new o(g,_)),t.length!==1||u||l(d)},o.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=c,i.addListener=c,i.once=c,i.off=c,i.removeListener=c,i.removeAllListeners=c,i.emit=c,i.prependListener=c,i.prependOnceListener=c,i.listeners=function(g){return[]},i.binding=function(g){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(g){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],174:[function(w,P,S){(function(C){!function(T){function l(Q){throw new RangeError(G[Q])}function p(Q,ie){for(var oe=Q.length,xe=[];oe--;)xe[oe]=ie(Q[oe]);return xe}function h(Q,ie){var oe=Q.split("@"),xe="";return oe.length>1&&(xe=oe[0]+"@",Q=oe[1]),Q=Q.replace(j,"."),xe+p(Q.split("."),ie).join(".")}function d(Q){for(var ie,oe,xe=[],ye=0,Ae=Q.length;ye<Ae;)ie=Q.charCodeAt(ye++),ie>=55296&&ie<=56319&&ye<Ae?(oe=Q.charCodeAt(ye++),(64512&oe)==56320?xe.push(((1023&ie)<<10)+(1023&oe)+65536):(xe.push(ie),ye--)):xe.push(ie);return xe}function o(Q){return p(Q,function(ie){var oe="";return ie>65535&&(ie-=65536,oe+=B(ie>>>10&1023|55296),ie=56320|1023&ie),oe+=B(ie)}).join("")}function c(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 xe=0;for(Q=oe?J(Q/A):Q>>1,Q+=J(Q/ie);Q>X*x>>1;xe+=E)Q=J(Q/X);return J(xe+(X+1)*Q/(Q+O))}function i(Q){var ie,oe,xe,ye,Ae,pe,Oe,Fe,Me,Ce,Le=[],de=Q.length,ue=0,ke=I,Ue=D;for(oe=Q.lastIndexOf(F),oe<0&&(oe=0),xe=0;xe<oe;++xe)Q.charCodeAt(xe)>=128&&l("not-basic"),Le.push(Q.charCodeAt(xe));for(ye=oe>0?oe+1:0;ye<de;){for(Ae=ue,pe=1,Oe=E;ye>=de&&l("invalid-input"),Fe=c(Q.charCodeAt(ye++)),(Fe>=E||Fe>J((m-ue)/pe))&&l("overflow"),ue+=Fe*pe,Me=Oe<=Ue?a:Oe>=Ue+x?x:Oe-Ue,!(Fe<Me);Oe+=E)Ce=E-Me,pe>J(m/Ce)&&l("overflow"),pe*=Ce;ie=Le.length+1,Ue=f(ue-Ae,ie,Ae==0),J(ue/ie)>m-ke&&l("overflow"),ke+=J(ue/ie),ue%=ie,Le.splice(ue++,0,ke)}return o(Le)}function n(Q){var ie,oe,xe,ye,Ae,pe,Oe,Fe,Me,Ce,Le,de,ue,ke,Ue,Ye=[];for(Q=d(Q),de=Q.length,ie=I,oe=0,Ae=D,pe=0;pe<de;++pe)(Le=Q[pe])<128&&Ye.push(B(Le));for(xe=ye=Ye.length,ye&&Ye.push(F);xe<de;){for(Oe=m,pe=0;pe<de;++pe)(Le=Q[pe])>=ie&&Le<Oe&&(Oe=Le);for(ue=xe+1,Oe-ie>J((m-oe)/ue)&&l("overflow"),oe+=(Oe-ie)*ue,ie=Oe,pe=0;pe<de;++pe)if(Le=Q[pe],Le<ie&&++oe>m&&l("overflow"),Le==ie){for(Fe=oe,Me=E;Ce=Me<=Ae?a:Me>=Ae+x?x:Me-Ae,!(Fe<Ce);Me+=E)Ue=Fe-Ce,ke=E-Ce,Ye.push(B(s(Ce+Ue%ke,0))),Fe=J(Ue/ke);Ye.push(B(s(Fe,0))),Ae=f(oe,ue,xe==ye),oe=0,++xe}++oe,++ie}return Ye.join("")}function t(Q){return h(Q,function(ie){return K.test(ie)?i(ie.slice(4).toLowerCase()):ie})}function u(Q){return h(Q,function(ie){return ne.test(ie)?"xn--"+n(ie):ie})}var y=typeof S=="object"&&S&&!S.nodeType&&S,g=typeof P=="object"&&P&&!P.nodeType&&P,_=typeof C=="object"&&C;_.global!==_&&_.window!==_&&_.self!==_||(T=_);var b,v,m=2147483647,E=36,a=1,x=26,O=38,A=700,D=72,I=128,F="-",K=/^xn--/,ne=/[^\x20-\x7E]/,j=/[\x2E\u3002\uFF0E\uFF61]/g,G={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},X=E-a,J=Math.floor,B=String.fromCharCode;if(b={version:"1.4.1",ucs2:{decode:d,encode:o},decode:i,encode:n,toASCII:u,toUnicode:t},typeof U=="function"&&typeof U.amd=="object"&&U.amd)U("punycode",function(){return b});else if(y&&g)if(P.exports==y)g.exports=b;else for(v in b)b.hasOwnProperty(v)&&(y[v]=b[v]);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 C(l,p){return Object.prototype.hasOwnProperty.call(l,p)}P.exports=function(l,p,h,d){p=p||"&",h=h||"=";var o={};if(typeof l!="string"||l.length===0)return o;var c=/\+/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<f;++i){var n,t,u,y,g=l[i].replace(c,"%20"),_=g.indexOf(h);_>=0?(n=g.substr(0,_),t=g.substr(_+1)):(n=g,t=""),u=decodeURIComponent(n),y=decodeURIComponent(t),C(o,u)?T(o[u])?o[u].push(y):o[u]=[o[u],y]:o[u]=y}return o};var T=Array.isArray||function(l){return Object.prototype.toString.call(l)==="[object Array]"}},{}],176:[function(w,P,S){"use strict";function C(h,d){if(h.map)return h.map(d);for(var o=[],c=0;c<h.length;c++)o.push(d(h[c],c));return o}var T=function(h){switch(typeof h){case"string":return h;case"boolean":return h?"true":"false";case"number":return isFinite(h)?h:"";default:return""}};P.exports=function(h,d,o,c){return d=d||"&",o=o||"=",h===null&&(h=void 0),typeof h=="object"?C(p(h),function(s){var f=encodeURIComponent(T(s))+o;return l(h[s])?C(h[s],function(i){return f+encodeURIComponent(T(i))}).join(d):f+encodeURIComponent(T(h[s]))}).join(d):c?encodeURIComponent(T(c))+o+encodeURIComponent(T(h)):""};var l=Array.isArray||function(h){return Object.prototype.toString.call(h)==="[object Array]"},p=Object.keys||function(h){var d=[];for(var o in h)Object.prototype.hasOwnProperty.call(h,o)&&d.push(o);return d}},{}],177:[function(w,P,S){"use strict";S.decode=S.parse=w("./decode"),S.encode=S.stringify=w("./encode")},{"./decode":175,"./encode":176}],178:[function(w,P,S){P.exports=w("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(w,P,S){"use strict";function C(u){if(!(this instanceof C))return new C(u);s.call(this,u),f.call(this,u),u&&u.readable===!1&&(this.readable=!1),u&&u.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,u&&u.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",T)}function T(){this.allowHalfOpen||this._writableState.ended||d.nextTick(l,this)}function l(u){u.end()}var p=w("babel-runtime/core-js/object/keys"),h=function(u){return u&&u.__esModule?u:{default:u}}(p),d=w("process-nextick-args"),o=h.default||function(u){var y=[];for(var g in u)y.push(g);return y};P.exports=C;var c=w("core-util-is");c.inherits=w("inherits");var s=w("./_stream_readable"),f=w("./_stream_writable");c.inherits(C,s);for(var i=o(f.prototype),n=0;n<i.length;n++){var t=i[n];C.prototype[t]||(C.prototype[t]=f.prototype[t])}Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(C.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(u){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=u,this._writableState.destroyed=u)}}),C.prototype._destroy=function(u,y){this.push(null),this.end(),d.nextTick(y,u)}},{"./_stream_readable":181,"./_stream_writable":183,"babel-runtime/core-js/object/keys":23,"core-util-is":153,inherits:162,"process-nextick-args":172}],180:[function(w,P,S){"use strict";function C(p){if(!(this instanceof C))return new C(p);T.call(this,p)}P.exports=C;var T=w("./_stream_transform"),l=w("core-util-is");l.inherits=w("inherits"),l.inherits(C,T),C.prototype._transform=function(p,h,d){d(null,p)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(w,P,S){(function(C,T){"use strict";function l(de){return oe.from(de)}function p(de){return oe.isBuffer(de)||de instanceof xe}function h(de,ue,ke){if(typeof de.prependListener=="function")return de.prependListener(ue,ke);de._events&&de._events[ue]?B(de._events[ue])?de._events[ue].unshift(ke):de._events[ue]=[ke,de._events[ue]]:de.on(ue,ke)}function d(de,ue){J=J||w("./_stream_duplex"),de=de||{};var ke=ue instanceof J;this.objectMode=!!de.objectMode,ke&&(this.objectMode=this.objectMode||!!de.readableObjectMode);var Ue=de.highWaterMark,Ye=de.readableHighWaterMark,ee=this.objectMode?16:16384;this.highWaterMark=Ue||Ue===0?Ue:ke&&(Ye||Ye===0)?Ye:ee,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Fe,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=de.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,de.encoding&&(Oe||(Oe=w("string_decoder/").StringDecoder),this.decoder=new Oe(de.encoding),this.encoding=de.encoding)}function o(de){if(J=J||w("./_stream_duplex"),!(this instanceof o))return new o(de);this._readableState=new d(de,this),this.readable=!0,de&&(typeof de.read=="function"&&(this._read=de.read),typeof de.destroy=="function"&&(this._destroy=de.destroy)),ie.call(this)}function c(de,ue,ke,Ue,Ye){var ee=de._readableState;if(ue===null)ee.reading=!1,u(de,ee);else{var M;Ye||(M=f(ee,ue)),M?de.emit("error",M):ee.objectMode||ue&&ue.length>0?(typeof ue=="string"||ee.objectMode||(0,G.default)(ue)===oe.prototype||(ue=l(ue)),Ue?ee.endEmitted?de.emit("error",new Error("stream.unshift() after end event")):s(de,ee,ue,!0):ee.ended?de.emit("error",new Error("stream.push() after EOF")):(ee.reading=!1,ee.decoder&&!ke?(ue=ee.decoder.write(ue),ee.objectMode||ue.length!==0?s(de,ee,ue,!1):_(de,ee)):s(de,ee,ue,!1))):Ue||(ee.reading=!1)}return i(ee)}function s(de,ue,ke,Ue){ue.flowing&&ue.length===0&&!ue.sync?(de.emit("data",ke),de.read(0)):(ue.length+=ue.objectMode?1:ke.length,Ue?ue.buffer.unshift(ke):ue.buffer.push(ke),ue.needReadable&&y(de)),_(de,ue)}function f(de,ue){var ke;return p(ue)||typeof ue=="string"||ue===void 0||de.objectMode||(ke=new TypeError("Invalid non-string/buffer chunk")),ke}function i(de){return!de.ended&&(de.needReadable||de.length<de.highWaterMark||de.length===0)}function n(de){return de>=Le?de=Le:(de--,de|=de>>>1,de|=de>>>2,de|=de>>>4,de|=de>>>8,de|=de>>>16,de++),de}function t(de,ue){return de<=0||ue.length===0&&ue.ended?0:ue.objectMode?1:de!==de?ue.flowing&&ue.length?ue.buffer.head.data.length:ue.length:(de>ue.highWaterMark&&(ue.highWaterMark=n(de)),de<=ue.length?de:ue.ended?ue.length:(ue.needReadable=!0,0))}function u(de,ue){if(!ue.ended){if(ue.decoder){var ke=ue.decoder.end();ke&&ke.length&&(ue.buffer.push(ke),ue.length+=ue.objectMode?1:ke.length)}ue.ended=!0,y(de)}}function y(de){var ue=de._readableState;ue.needReadable=!1,ue.emittedReadable||(pe("emitReadable",ue.flowing),ue.emittedReadable=!0,ue.sync?X.nextTick(g,de):g(de))}function g(de){pe("emit readable"),de.emit("readable"),x(de)}function _(de,ue){ue.readingMore||(ue.readingMore=!0,X.nextTick(b,de,ue))}function b(de,ue){for(var ke=ue.length;!ue.reading&&!ue.flowing&&!ue.ended&&ue.length<ue.highWaterMark&&(pe("maybeReadMore read 0"),de.read(0),ke!==ue.length);)ke=ue.length;ue.readingMore=!1}function v(de){return function(){var ue=de._readableState;pe("pipeOnDrain",ue.awaitDrain),ue.awaitDrain&&ue.awaitDrain--,ue.awaitDrain===0&&Q(de,"data")&&(ue.flowing=!0,x(de))}}function m(de){pe("readable nexttick read 0"),de.read(0)}function E(de,ue){ue.resumeScheduled||(ue.resumeScheduled=!0,X.nextTick(a,de,ue))}function a(de,ue){ue.reading||(pe("resume read 0"),de.read(0)),ue.resumeScheduled=!1,ue.awaitDrain=0,de.emit("resume"),x(de),ue.flowing&&!ue.reading&&de.read(0)}function x(de){var ue=de._readableState;for(pe("flow",ue.flowing);ue.flowing&&de.read()!==null;);}function O(de,ue){if(ue.length===0)return null;var ke;return ue.objectMode?ke=ue.buffer.shift():!de||de>=ue.length?(ke=ue.decoder?ue.buffer.join(""):ue.buffer.length===1?ue.buffer.head.data:ue.buffer.concat(ue.length),ue.buffer.clear()):ke=A(de,ue.buffer,ue.decoder),ke}function A(de,ue,ke){var Ue;return de<ue.head.data.length?(Ue=ue.head.data.slice(0,de),ue.head.data=ue.head.data.slice(de)):Ue=de===ue.head.data.length?ue.shift():ke?D(de,ue):I(de,ue),Ue}function D(de,ue){var ke=ue.head,Ue=1,Ye=ke.data;for(de-=Ye.length;ke=ke.next;){var ee=ke.data,M=de>ee.length?ee.length:de;if(M===ee.length?Ye+=ee:Ye+=ee.slice(0,de),(de-=M)===0){M===ee.length?(++Ue,ke.next?ue.head=ke.next:ue.head=ue.tail=null):(ue.head=ke,ke.data=ee.slice(M));break}++Ue}return ue.length-=Ue,Ye}function I(de,ue){var ke=oe.allocUnsafe(de),Ue=ue.head,Ye=1;for(Ue.data.copy(ke),de-=Ue.data.length;Ue=Ue.next;){var ee=Ue.data,M=de>ee.length?ee.length:de;if(ee.copy(ke,ke.length-de,0,M),(de-=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,ke}function F(de){var ue=de._readableState;if(ue.length>0)throw new Error('"endReadable()" called on non-empty stream');ue.endEmitted||(ue.ended=!0,X.nextTick(K,ue,de))}function K(de,ue){de.endEmitted||de.length!==0||(de.endEmitted=!0,ue.readable=!1,ue.emit("end"))}function ne(de,ue){for(var ke=0,Ue=de.length;ke<Ue;ke++)if(de[ke]===ue)return ke;return-1}var j=w("babel-runtime/core-js/object/get-prototype-of"),G=function(de){return de&&de.__esModule?de:{default:de}}(j),X=w("process-nextick-args");P.exports=o;var J,B=w("isarray");o.ReadableState=d;var Q=(w("events").EventEmitter,function(de,ue){return de.listeners(ue).length}),ie=w("./internal/streams/stream"),oe=w("safe-buffer").Buffer,xe=T.Uint8Array||function(){},ye=w("core-util-is");ye.inherits=w("inherits");var Ae=w("util"),pe=void 0;pe=Ae&&Ae.debuglog?Ae.debuglog("stream"):function(){};var Oe,Fe=w("./internal/streams/BufferList"),Me=w("./internal/streams/destroy");ye.inherits(o,ie);var Ce=["error","close","destroy","pause","resume"];Object.defineProperty(o.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(de){this._readableState&&(this._readableState.destroyed=de)}}),o.prototype.destroy=Me.destroy,o.prototype._undestroy=Me.undestroy,o.prototype._destroy=function(de,ue){this.push(null),ue(de)},o.prototype.push=function(de,ue){var ke,Ue=this._readableState;return Ue.objectMode?ke=!0:typeof de=="string"&&(ue=ue||Ue.defaultEncoding,ue!==Ue.encoding&&(de=oe.from(de,ue),ue=""),ke=!0),c(this,de,ue,!1,ke)},o.prototype.unshift=function(de){return c(this,de,null,!0,!1)},o.prototype.isPaused=function(){return this._readableState.flowing===!1},o.prototype.setEncoding=function(de){return Oe||(Oe=w("string_decoder/").StringDecoder),this._readableState.decoder=new Oe(de),this._readableState.encoding=de,this};var Le=8388608;o.prototype.read=function(de){pe("read",de),de=parseInt(de,10);var ue=this._readableState,ke=de;if(de!==0&&(ue.emittedReadable=!1),de===0&&ue.needReadable&&(ue.length>=ue.highWaterMark||ue.ended))return pe("read: emitReadable",ue.length,ue.ended),ue.length===0&&ue.ended?F(this):y(this),null;if((de=t(de,ue))===0&&ue.ended)return ue.length===0&&F(this),null;var Ue=ue.needReadable;pe("need readable",Ue),(ue.length===0||ue.length-de<ue.highWaterMark)&&(Ue=!0,pe("length less than watermark",Ue)),ue.ended||ue.reading?(Ue=!1,pe("reading or ended",Ue)):Ue&&(pe("do read"),ue.reading=!0,ue.sync=!0,ue.length===0&&(ue.needReadable=!0),this._read(ue.highWaterMark),ue.sync=!1,ue.reading||(de=t(ke,ue)));var Ye;return Ye=de>0?O(de,ue):null,Ye===null?(ue.needReadable=!0,de=0):ue.length-=de,ue.length===0&&(ue.ended||(ue.needReadable=!0),ke!==de&&ue.ended&&F(this)),Ye!==null&&this.emit("data",Ye),Ye},o.prototype._read=function(de){this.emit("error",new Error("_read() is not implemented"))},o.prototype.pipe=function(de,ue){function ke(tt,Ve){pe("onunpipe"),tt===Y&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,Ye())}function Ue(){pe("onend"),de.end()}function Ye(){pe("cleanup"),de.removeListener("close",N),de.removeListener("finish",$),de.removeListener("drain",Pe),de.removeListener("error",M),de.removeListener("unpipe",ke),Y.removeListener("end",Ue),Y.removeListener("end",V),Y.removeListener("data",ee),Ie=!0,!me.awaitDrain||de._writableState&&!de._writableState.needDrain||Pe()}function ee(tt){pe("ondata"),Xe=!1,de.write(tt)!==!1||Xe||((me.pipesCount===1&&me.pipes===de||me.pipesCount>1&&ne(me.pipes,de)!==-1)&&!Ie&&(pe("false write response, pause",Y._readableState.awaitDrain),Y._readableState.awaitDrain++,Xe=!0),Y.pause())}function M(tt){pe("onerror",tt),V(),de.removeListener("error",M),Q(de,"error")===0&&de.emit("error",tt)}function N(){de.removeListener("finish",$),V()}function $(){pe("onfinish"),de.removeListener("close",N),V()}function V(){pe("unpipe"),Y.unpipe(de)}var Y=this,me=this._readableState;switch(me.pipesCount){case 0:me.pipes=de;break;case 1:me.pipes=[me.pipes,de];break;default:me.pipes.push(de)}me.pipesCount+=1,pe("pipe count=%d opts=%j",me.pipesCount,ue);var Re=(!ue||ue.end!==!1)&&de!==C.stdout&&de!==C.stderr,rt=Re?Ue:V;me.endEmitted?X.nextTick(rt):Y.once("end",rt),de.on("unpipe",ke);var Pe=v(Y);de.on("drain",Pe);var Ie=!1,Xe=!1;return Y.on("data",ee),h(de,"error",M),de.once("close",N),de.once("finish",$),de.emit("pipe",Y),me.flowing||(pe("pipe resume"),Y.resume()),de},o.prototype.unpipe=function(de){var ue=this._readableState,ke={hasUnpiped:!1};if(ue.pipesCount===0)return this;if(ue.pipesCount===1)return de&&de!==ue.pipes?this:(de||(de=ue.pipes),ue.pipes=null,ue.pipesCount=0,ue.flowing=!1,de&&de.emit("unpipe",this,ke),this);if(!de){var Ue=ue.pipes,Ye=ue.pipesCount;ue.pipes=null,ue.pipesCount=0,ue.flowing=!1;for(var ee=0;ee<Ye;ee++)Ue[ee].emit("unpipe",this,ke);return this}var M=ne(ue.pipes,de);return M===-1?this:(ue.pipes.splice(M,1),ue.pipesCount-=1,ue.pipesCount===1&&(ue.pipes=ue.pipes[0]),de.emit("unpipe",this,ke),this)},o.prototype.on=function(de,ue){var ke=ie.prototype.on.call(this,de,ue);if(de==="data")this._readableState.flowing!==!1&&this.resume();else if(de==="readable"){var Ue=this._readableState;Ue.endEmitted||Ue.readableListening||(Ue.readableListening=Ue.needReadable=!0,Ue.emittedReadable=!1,Ue.reading?Ue.length&&y(this):X.nextTick(m,this))}return ke},o.prototype.addListener=o.prototype.on,o.prototype.resume=function(){var de=this._readableState;return de.flowing||(pe("resume"),de.flowing=!0,E(this,de)),this},o.prototype.pause=function(){return pe("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(pe("pause"),this._readableState.flowing=!1,this.emit("pause")),this},o.prototype.wrap=function(de){var ue=this,ke=this._readableState,Ue=!1;de.on("end",function(){if(pe("wrapped end"),ke.decoder&&!ke.ended){var M=ke.decoder.end();M&&M.length&&ue.push(M)}ue.push(null)}),de.on("data",function(M){(pe("wrapped data"),ke.decoder&&(M=ke.decoder.write(M)),(!ke.objectMode||M!=null)&&(ke.objectMode||M&&M.length))&&(ue.push(M)||(Ue=!0,de.pause()))});for(var Ye in de)this[Ye]===void 0&&typeof de[Ye]=="function"&&(this[Ye]=function(M){return function(){return de[M].apply(de,arguments)}}(Ye));for(var ee=0;ee<Ce.length;ee++)de.on(Ce[ee],this.emit.bind(this,Ce[ee]));return this._read=function(M){pe("wrapped _read",M),Ue&&(Ue=!1,de.resume())},this},Object.defineProperty(o.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),o._fromList=O}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/BufferList":184,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/get-prototype-of":22,"core-util-is":153,events:158,inherits:162,isarray:166,"process-nextick-args":172,"safe-buffer":193,"string_decoder/":200,util:36}],182:[function(w,P,S){"use strict";function C(o,c){var s=this._transformState;s.transforming=!1;var f=s.writecb;if(!f)return this.emit("error",new Error("write callback called multiple times"));s.writechunk=null,s.writecb=null,c!=null&&this.push(c),f(o);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function T(o){if(!(this instanceof T))return new T(o);h.call(this,o),this._transformState={afterTransform:C.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,o&&(typeof o.transform=="function"&&(this._transform=o.transform),typeof o.flush=="function"&&(this._flush=o.flush)),this.on("prefinish",l)}function l(){var o=this;typeof this._flush=="function"?this._flush(function(c,s){p(o,c,s)}):p(this,null,null)}function p(o,c,s){if(c)return o.emit("error",c);if(s!=null&&o.push(s),o._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(o._transformState.transforming)throw new Error("Calling transform done when still transforming");return o.push(null)}P.exports=T;var h=w("./_stream_duplex"),d=w("core-util-is");d.inherits=w("inherits"),d.inherits(T,h),T.prototype.push=function(o,c){return this._transformState.needTransform=!1,h.prototype.push.call(this,o,c)},T.prototype._transform=function(o,c,s){throw new Error("_transform() is not implemented")},T.prototype._write=function(o,c,s){var f=this._transformState;if(f.writecb=s,f.writechunk=o,f.writeencoding=c,!f.transforming){var i=this._readableState;(f.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},T.prototype._read=function(o){var c=this._transformState;c.writechunk!==null&&c.writecb&&!c.transforming?(c.transforming=!0,this._transform(c.writechunk,c.writeencoding,c.afterTransform)):c.needTransform=!0},T.prototype._destroy=function(o,c){var s=this;h.prototype._destroy.call(this,o,function(f){c(f),s.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(w,P,S){(function(C,T){"use strict";function l(Me){return Me&&Me.__esModule?Me:{default:Me}}function p(Me){var Ce=this;this.next=null,this.entry=null,this.finish=function(){D(Ce,Me)}}function h(Me){return Ae.from(Me)}function d(Me){return Ae.isBuffer(Me)||Me instanceof pe}function o(){}function c(Me,Ce){Q=Q||w("./_stream_duplex"),Me=Me||{};var Le=Ce instanceof Q;this.objectMode=!!Me.objectMode,Le&&(this.objectMode=this.objectMode||!!Me.writableObjectMode);var de=Me.highWaterMark,ue=Me.writableHighWaterMark,ke=this.objectMode?16:16384;this.highWaterMark=de||de===0?de:Le&&(ue||ue===0)?ue:ke,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Ue=Me.decodeStrings===!1;this.decodeStrings=!Ue,this.defaultEncoding=Me.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ye){_(Ce,Ye)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new p(this)}function s(Me){if(Q=Q||w("./_stream_duplex"),!(Fe.call(s,this)||this instanceof Q))return new s(Me);this._writableState=new c(Me,this),this.writable=!0,Me&&(typeof Me.write=="function"&&(this._write=Me.write),typeof Me.writev=="function"&&(this._writev=Me.writev),typeof Me.destroy=="function"&&(this._destroy=Me.destroy),typeof Me.final=="function"&&(this._final=Me.final)),ye.call(this)}function f(Me,Ce){var Le=new Error("write after end");Me.emit("error",Le),B.nextTick(Ce,Le)}function i(Me,Ce,Le,de){var ue=!0,ke=!1;return Le===null?ke=new TypeError("May not write null values to stream"):typeof Le=="string"||Le===void 0||Ce.objectMode||(ke=new TypeError("Invalid non-string/buffer chunk")),ke&&(Me.emit("error",ke),B.nextTick(de,ke),ue=!1),ue}function n(Me,Ce,Le){return Me.objectMode||Me.decodeStrings===!1||typeof Ce!="string"||(Ce=Ae.from(Ce,Le)),Ce}function t(Me,Ce,Le,de,ue,ke){if(!Le){var Ue=n(Ce,de,ue);de!==Ue&&(Le=!0,ue="buffer",de=Ue)}var Ye=Ce.objectMode?1:de.length;Ce.length+=Ye;var ee=Ce.length<Ce.highWaterMark;if(ee||(Ce.needDrain=!0),Ce.writing||Ce.corked){var M=Ce.lastBufferedRequest;Ce.lastBufferedRequest={chunk:de,encoding:ue,isBuf:Le,callback:ke,next:null},M?M.next=Ce.lastBufferedRequest:Ce.bufferedRequest=Ce.lastBufferedRequest,Ce.bufferedRequestCount+=1}else u(Me,Ce,!1,Ye,de,ue,ke);return ee}function u(Me,Ce,Le,de,ue,ke,Ue){Ce.writelen=de,Ce.writecb=Ue,Ce.writing=!0,Ce.sync=!0,Le?Me._writev(ue,Ce.onwrite):Me._write(ue,ke,Ce.onwrite),Ce.sync=!1}function y(Me,Ce,Le,de,ue){--Ce.pendingcb,Le?(B.nextTick(ue,de),B.nextTick(O,Me,Ce),Me._writableState.errorEmitted=!0,Me.emit("error",de)):(ue(de),Me._writableState.errorEmitted=!0,Me.emit("error",de),O(Me,Ce))}function g(Me){Me.writing=!1,Me.writecb=null,Me.length-=Me.writelen,Me.writelen=0}function _(Me,Ce){var Le=Me._writableState,de=Le.sync,ue=Le.writecb;if(g(Le),Ce)y(Me,Le,de,Ce,ue);else{var ke=E(Le);ke||Le.corked||Le.bufferProcessing||!Le.bufferedRequest||m(Me,Le),de?ie(b,Me,Le,ke,ue):b(Me,Le,ke,ue)}}function b(Me,Ce,Le,de){Le||v(Me,Ce),Ce.pendingcb--,de(),O(Me,Ce)}function v(Me,Ce){Ce.length===0&&Ce.needDrain&&(Ce.needDrain=!1,Me.emit("drain"))}function m(Me,Ce){Ce.bufferProcessing=!0;var Le=Ce.bufferedRequest;if(Me._writev&&Le&&Le.next){var de=Ce.bufferedRequestCount,ue=new Array(de),ke=Ce.corkedRequestsFree;ke.entry=Le;for(var Ue=0,Ye=!0;Le;)ue[Ue]=Le,Le.isBuf||(Ye=!1),Le=Le.next,Ue+=1;ue.allBuffers=Ye,u(Me,Ce,!0,Ce.length,ue,"",ke.finish),Ce.pendingcb++,Ce.lastBufferedRequest=null,ke.next?(Ce.corkedRequestsFree=ke.next,ke.next=null):Ce.corkedRequestsFree=new p(Ce),Ce.bufferedRequestCount=0}else{for(;Le;){var ee=Le.chunk,M=Le.encoding,N=Le.callback;if(u(Me,Ce,!1,Ce.objectMode?1:ee.length,ee,M,N),Le=Le.next,Ce.bufferedRequestCount--,Ce.writing)break}Le===null&&(Ce.lastBufferedRequest=null)}Ce.bufferedRequest=Le,Ce.bufferProcessing=!1}function E(Me){return Me.ending&&Me.length===0&&Me.bufferedRequest===null&&!Me.finished&&!Me.writing}function a(Me,Ce){Me._final(function(Le){Ce.pendingcb--,Le&&Me.emit("error",Le),Ce.prefinished=!0,Me.emit("prefinish"),O(Me,Ce)})}function x(Me,Ce){Ce.prefinished||Ce.finalCalled||(typeof Me._final=="function"?(Ce.pendingcb++,Ce.finalCalled=!0,B.nextTick(a,Me,Ce)):(Ce.prefinished=!0,Me.emit("prefinish")))}function O(Me,Ce){var Le=E(Ce);return Le&&(x(Me,Ce),Ce.pendingcb===0&&(Ce.finished=!0,Me.emit("finish"))),Le}function A(Me,Ce,Le){Ce.ending=!0,O(Me,Ce),Le&&(Ce.finished?B.nextTick(Le):Me.once("finish",Le)),Ce.ended=!0,Me.writable=!1}function D(Me,Ce,Le){var de=Me.entry;for(Me.entry=null;de;){var ue=de.callback;Ce.pendingcb--,ue(Le),de=de.next}Ce.corkedRequestsFree?Ce.corkedRequestsFree.next=Me:Ce.corkedRequestsFree=Me}var I=w("babel-runtime/core-js/object/define-property"),F=l(I),K=w("babel-runtime/core-js/symbol/has-instance"),ne=l(K),j=w("babel-runtime/core-js/symbol"),G=l(j),X=w("babel-runtime/core-js/set-immediate"),J=l(X),B=w("process-nextick-args");P.exports=s;var Q,ie=!C.browser&&["v0.10","v0.9."].indexOf(C.version.slice(0,5))>-1?J.default:B.nextTick;s.WritableState=c;var oe=w("core-util-is");oe.inherits=w("inherits");var xe={deprecate:w("util-deprecate")},ye=w("./internal/streams/stream"),Ae=w("safe-buffer").Buffer,pe=T.Uint8Array||function(){},Oe=w("./internal/streams/destroy");oe.inherits(s,ye),c.prototype.getBuffer=function(){for(var Me=this.bufferedRequest,Ce=[];Me;)Ce.push(Me),Me=Me.next;return Ce},function(){try{Object.defineProperty(c.prototype,"buffer",{get:xe.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Me){}}();var Fe;typeof G.default=="function"&&ne.default&&typeof Function.prototype[ne.default]=="function"?(Fe=Function.prototype[ne.default],(0,F.default)(s,ne.default,{value:function(Me){return!!Fe.call(this,Me)||this===s&&Me&&Me._writableState instanceof c}})):Fe=function(Me){return Me instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(Me,Ce,Le){var de=this._writableState,ue=!1,ke=!de.objectMode&&d(Me);return ke&&!Ae.isBuffer(Me)&&(Me=h(Me)),typeof Ce=="function"&&(Le=Ce,Ce=null),ke?Ce="buffer":Ce||(Ce=de.defaultEncoding),typeof Le!="function"&&(Le=o),de.ended?f(this,Le):(ke||i(this,de,Me,Le))&&(de.pendingcb++,ue=t(this,de,ke,Me,Ce,Le)),ue},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var Me=this._writableState;Me.corked&&(Me.corked--,Me.writing||Me.corked||Me.finished||Me.bufferProcessing||!Me.bufferedRequest||m(this,Me))},s.prototype.setDefaultEncoding=function(Me){if(typeof Me=="string"&&(Me=Me.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Me+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Me);return this._writableState.defaultEncoding=Me,this},Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),s.prototype._write=function(Me,Ce,Le){Le(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(Me,Ce,Le){var de=this._writableState;typeof Me=="function"?(Le=Me,Me=null,Ce=null):typeof Ce=="function"&&(Le=Ce,Ce=null),Me!=null&&this.write(Me,Ce),de.corked&&(de.corked=1,this.uncork()),de.ending||de.finished||A(this,de,Le)},Object.defineProperty(s.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Me){this._writableState&&(this._writableState.destroyed=Me)}}),s.prototype.destroy=Oe.destroy,s.prototype._undestroy=Oe.undestroy,s.prototype._destroy=function(Me,Ce){this.end(),Ce(Me)}}).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 C(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}function T(h,d,o){h.copy(d,o)}var l=w("safe-buffer").Buffer,p=w("util");P.exports=function(){function h(){C(this,h),this.head=null,this.tail=null,this.length=0}return h.prototype.push=function(d){var o={data:d,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length},h.prototype.unshift=function(d){var o={data:d,next:this.head};this.length===0&&(this.tail=o),this.head=o,++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 o=this.head,c=""+o.data;o=o.next;)c+=d+o.data;return c},h.prototype.concat=function(d){if(this.length===0)return l.alloc(0);if(this.length===1)return this.head.data;for(var o=l.allocUnsafe(d>>>0),c=this.head,s=0;c;)T(c.data,o,s),s+=c.data.length,c=c.next;return o},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 C(h,d){var o=this,c=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return c||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,o,f),o._writableState&&(o._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:C,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 C=function(){return this}()||Function("return this")(),T=C.regeneratorRuntime&&Object.getOwnPropertyNames(C).indexOf("regeneratorRuntime")>=0,l=T&&C.regeneratorRuntime;if(C.regeneratorRuntime=void 0,P.exports=w("./runtime"),T)C.regeneratorRuntime=l;else try{delete C.regeneratorRuntime}catch(p){C.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(w,P,S){!function(C){"use strict";function T(J,B,Q,ie){var oe=B&&B.prototype instanceof p?B:p,xe=Object.create(oe.prototype),ye=new t(ie||[]);return xe._invoke=s(J,Q,ye),xe}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 o(J){["next","throw","return"].forEach(function(B){J[B]=function(Q){return this._invoke(B,Q)}})}function c(J){function B(oe,xe,ye,Ae){var pe=l(J[oe],J,xe);if(pe.type!=="throw"){var Oe=pe.arg,Fe=Oe.value;return Fe&&typeof Fe=="object"&&b.call(Fe,"__await")?Promise.resolve(Fe.__await).then(function(Me){B("next",Me,ye,Ae)},function(Me){B("throw",Me,ye,Ae)}):Promise.resolve(Fe).then(function(Me){Oe.value=Me,ye(Oe)},Ae)}Ae(pe.arg)}function Q(oe,xe){function ye(){return new Promise(function(Ae,pe){B(oe,xe,Ae,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,xe){if(ie===I)throw new Error("Generator is already running");if(ie===F){if(oe==="throw")throw xe;return y()}for(Q.method=oe,Q.arg=xe;;){var ye=Q.delegate;if(ye){var Ae=f(ye,Q);if(Ae){if(Ae===K)continue;return Ae}}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===K)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===g){if(B.delegate=null,B.method==="throw"){if(J.iterator.return&&(B.method="return",B.arg=g,f(J,B),B.method==="throw"))return K;B.method="throw",B.arg=new TypeError("The iterator does not provide a 'throw' method")}return K}var ie=l(Q,J.iterator,B.arg);if(ie.type==="throw")return B.method="throw",B.arg=ie.arg,B.delegate=null,K;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=g),B.delegate=null,K):oe:(B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,K)}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 u(J){if(J){var B=J[m];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<J.length;)if(b.call(J,Q))return oe.value=J[Q],oe.done=!1,oe;return oe.value=g,oe.done=!0,oe};return ie.next=ie}}return{next:y}}function y(){return{value:g,done:!0}}var g,_=Object.prototype,b=_.hasOwnProperty,v=typeof Symbol=="function"?Symbol:{},m=v.iterator||"@@iterator",E=v.asyncIterator||"@@asyncIterator",a=v.toStringTag||"@@toStringTag",x=typeof P=="object",O=C.regeneratorRuntime;if(O)return void(x&&(P.exports=O));O=C.regeneratorRuntime=x?P.exports:{},O.wrap=T;var A="suspendedStart",D="suspendedYield",I="executing",F="completed",K={},ne={};ne[m]=function(){return this};var j=Object.getPrototypeOf,G=j&&j(j(u([])));G&&G!==_&&b.call(G,m)&&(ne=G);var X=d.prototype=p.prototype=Object.create(ne);h.prototype=X.constructor=d,d.constructor=h,d[a]=h.displayName="GeneratorFunction",O.isGeneratorFunction=function(J){var B=typeof J=="function"&&J.constructor;return!!B&&(B===h||(B.displayName||B.name)==="GeneratorFunction")},O.mark=function(J){return Object.setPrototypeOf?Object.setPrototypeOf(J,d):(J.__proto__=d,a in J||(J[a]="GeneratorFunction")),J.prototype=Object.create(X),J},O.awrap=function(J){return{__await:J}},o(c.prototype),c.prototype[E]=function(){return this},O.AsyncIterator=c,O.async=function(J,B,Q,ie){var oe=new c(T(J,B,Q,ie));return O.isGeneratorFunction(B)?oe:oe.next().then(function(xe){return xe.done?xe.value:oe.next()})},o(X),X[a]="Generator",X[m]=function(){return this},X.toString=function(){return"[object Generator]"},O.keys=function(J){var B=[];for(var Q in J)B.push(Q);return B.reverse(),function ie(){for(;B.length;){var oe=B.pop();if(oe in J)return ie.value=oe,ie.done=!1,ie}return ie.done=!0,ie}},O.values=u,t.prototype={constructor:t,reset:function(J){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(n),!J)for(var B in this)B.charAt(0)==="t"&&b.call(this,B)&&!isNaN(+B.slice(1))&&(this[B]=g)},stop:function(){this.done=!0;var J=this.tryEntries[0],B=J.completion;if(B.type==="throw")throw B.arg;return this.rval},dispatchException:function(J){function B(pe,Oe){return xe.type="throw",xe.arg=J,Q.next=pe,Oe&&(Q.method="next",Q.arg=g),!!Oe}if(this.done)throw J;for(var Q=this,ie=this.tryEntries.length-1;ie>=0;--ie){var oe=this.tryEntries[ie],xe=oe.completion;if(oe.tryLoc==="root")return B("end");if(oe.tryLoc<=this.prev){var ye=b.call(oe,"catchLoc"),Ae=b.call(oe,"finallyLoc");if(ye&&Ae){if(this.prev<oe.catchLoc)return B(oe.catchLoc,!0);if(this.prev<oe.finallyLoc)return B(oe.finallyLoc)}else if(ye){if(this.prev<oe.catchLoc)return B(oe.catchLoc,!0)}else{if(!Ae)throw new Error("try statement without catch or finally");if(this.prev<oe.finallyLoc)return B(oe.finallyLoc)}}}},abrupt:function(J,B){for(var Q=this.tryEntries.length-1;Q>=0;--Q){var ie=this.tryEntries[Q];if(ie.tryLoc<=this.prev&&b.call(ie,"finallyLoc")&&this.prev<ie.finallyLoc){var oe=ie;break}}oe&&(J==="break"||J==="continue")&&oe.tryLoc<=B&&B<=oe.finallyLoc&&(oe=null);var xe=oe?oe.completion:{};return xe.type=J,xe.arg=B,oe?(this.method="next",this.next=oe.finallyLoc,K):this.complete(xe)},complete:function(J,B){if(J.type==="throw")throw J.arg;return J.type==="break"||J.type==="continue"?this.next=J.arg:J.type==="return"?(this.rval=this.arg=J.arg,this.method="return",this.next="end"):J.type==="normal"&&B&&(this.next=B),K},finish:function(J){for(var B=this.tryEntries.length-1;B>=0;--B){var Q=this.tryEntries[B];if(Q.finallyLoc===J)return this.complete(Q.completion,Q.afterLoc),n(Q),K}},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:u(J),resultName:B,nextLoc:Q},this.method==="next"&&(this.arg=g),K}}}(function(){return this}()||Function("return this")())},{}],193:[function(w,P,S){function C(h,d){for(var o in h)d[o]=h[o]}function T(h,d,o){return p(h,d,o)}var l=w("buffer"),p=l.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?P.exports=l:(C(l,S),S.Buffer=T),C(p,T),T.from=function(h,d,o){if(typeof h=="number")throw new TypeError("Argument must not be a number");return p(h,d,o)},T.alloc=function(h,d,o){if(typeof h!="number")throw new TypeError("Argument must be a number");var c=p(h);return d!==void 0?typeof o=="string"?c.fill(d,o):c.fill(d):c.fill(0),c},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(C){"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),o=w("babel-runtime/helpers/typeof"),c=T(o),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"),u=T(t);!function(y){function g(V,Y){if(!(this instanceof g))return new g(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,u.default)(y.XML_ENTITIES):(0,u.default)(y.ENTITIES),me.attribList=[],me.opt.xmlns&&(me.ns=(0,u.default)(ke)),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=Oe.length;Re<rt;Re++){var Pe=V[Oe[Re]].length;if(Pe>Y)switch(Oe[Re]){case"textNode":K(V);break;case"cdata":F(V,"oncdata",V.cdata),V.cdata="";break;case"script":F(V,"onscript",V.script),V.script="";break;default:j(V,"Max buffer length exceeded: "+Oe[Re])}me=Math.max(me,Pe)}var Ie=y.MAX_BUFFER_LENGTH-me;V.bufferCheckPosition=Ie+V.position}function b(V){for(var Y=0,me=Oe.length;Y<me;Y++)V[Oe[Y]]=""}function v(V){K(V),V.cdata!==""&&(F(V,"oncdata",V.cdata),V.cdata=""),V.script!==""&&(F(V,"onscript",V.script),V.script="")}function m(V,Y){return new E(V,Y)}function E(V,Y){if(!(this instanceof E))return new E(V,Y);Fe.apply(this),this._parser=new g(V,Y),this.writable=!0,this.readable=!0;var me=this;this._parser.onend=function(){me.emit("end")},this._parser.onerror=function(Re){me.emit("error",Re),me._parser.error=null},this._decoder=null,Me.forEach(function(Re){(0,f.default)(me,"on"+Re,{get:function(){return me._parser["on"+Re]},set:function(rt){if(!rt)return me.removeAllListeners(Re),me._parser["on"+Re]=rt,rt;me.on(Re,rt)},enumerable:!0,configurable:!1})})}function a(V){return V===" "||V===`
`||V==="\r"||V===" "}function x(V){return V==='"'||V==="'"}function O(V){return V===">"||a(V)}function A(V,Y){return V.test(Y)}function D(V,Y){return!A(V,Y)}function I(V,Y,me){V[Y]&&V[Y](me)}function F(V,Y,me){V.textNode&&K(V),I(V,Y,me)}function K(V){V.textNode=ne(V.opt,V.textNode),V.textNode&&I(V,"ontext",V.textNode),V.textNode=""}function ne(V,Y){return V.trim&&(Y=Y.trim()),V.normalize&&(Y=Y.replace(/\s+/g," ")),Y}function j(V,Y){return K(V),V.trackPosition&&(Y+=`
Line: `+V.line+`
Column: `+V.column+`
Char: `+V.c),Y=new Error(Y),V.error=Y,I(V,"onerror",Y),V}function G(V){return V.sawRoot&&!V.closedRoot&&X(V,"Unclosed root tag"),V.state!==N.BEGIN&&V.state!==N.BEGIN_WHITESPACE&&V.state!==N.TEXT&&j(V,"Unexpected end"),K(V),V.c="",V.closed=!0,I(V,"onend"),g.call(V,V.strict,V.opt),V}function X(V,Y){if((V===void 0?"undefined":(0,c.default)(V))!=="object"||!(V instanceof g))throw new Error("bad call to strictFail");V.strict&&j(V,Y)}function J(V){V.strict||(V.tagName=V.tagName[V.looseCase]());var Y=V.tags[V.tags.length-1]||V,me=V.tag={name:V.tagName,attributes:{}};V.opt.xmlns&&(me.ns=Y.ns),V.attribList.length=0,F(V,"onopentagstart",me)}function B(V,Y){var me=V.indexOf(":"),Re=me<0?["",V]:V.split(":"),rt=Re[0],Pe=Re[1];return Y&&V==="xmlns"&&(rt="xmlns",Pe=""),{prefix:rt,local:Pe}}function Q(V){if(V.strict||(V.attribName=V.attribName[V.looseCase]()),V.attribList.indexOf(V.attribName)!==-1||V.tag.attributes.hasOwnProperty(V.attribName))return void(V.attribName=V.attribValue="");if(V.opt.xmlns){var Y=B(V.attribName,!0),me=Y.prefix,Re=Y.local;if(me==="xmlns")if(Re==="xml"&&V.attribValue!==de)X(V,"xml: prefix must be bound to "+de+`
Actual: `+V.attribValue);else if(Re==="xmlns"&&V.attribValue!==ue)X(V,"xmlns: prefix must be bound to "+ue+`
Actual: `+V.attribValue);else{var rt=V.tag,Pe=V.tags[V.tags.length-1]||V;rt.ns===Pe.ns&&(rt.ns=(0,u.default)(Pe.ns)),rt.ns[Re]=V.attribValue}V.attribList.push([V.attribName,V.attribValue])}else V.tag.attributes[V.attribName]=V.attribValue,F(V,"onattribute",{name:V.attribName,value:V.attribValue});V.attribName=V.attribValue=""}function ie(V,Y){if(V.opt.xmlns){var me=V.tag,Re=B(V.tagName);me.prefix=Re.prefix,me.local=Re.local,me.uri=me.ns[Re.prefix]||"",me.prefix&&!me.uri&&(X(V,"Unbound namespace prefix: "+(0,d.default)(V.tagName)),me.uri=Re.prefix);var rt=V.tags[V.tags.length-1]||V;me.ns&&rt.ns!==me.ns&&(0,n.default)(me.ns).forEach(function(ve){F(V,"onopennamespace",{prefix:ve,uri:me.ns[ve]})});for(var Pe=0,Ie=V.attribList.length;Pe<Ie;Pe++){var Xe=V.attribList[Pe],tt=Xe[0],Ve=Xe[1],Ke=B(tt,!0),Ne=Ke.prefix,De=Ke.local,_e=Ne===""?"":me.ns[Ne]||"",he={name:tt,value:Ve,prefix:Ne,local:De,uri:_e};Ne&&Ne!=="xmlns"&&!_e&&(X(V,"Unbound namespace prefix: "+(0,d.default)(Ne)),he.uri=Ne),V.tag.attributes[tt]=he,F(V,"onattribute",he)}V.attribList.length=0}V.tag.isSelfClosing=!!Y,V.sawRoot=!0,V.tags.push(V.tag),F(V,"onopentag",V.tag),Y||(V.noscript||V.tagName.toLowerCase()!=="script"?V.state=N.TEXT:V.state=N.SCRIPT,V.tag=null,V.tagName=""),V.attribName=V.attribValue="",V.attribList.length=0}function oe(V){if(!V.tagName)return X(V,"Weird empty close tag."),V.textNode+="</>",void(V.state=N.TEXT);if(V.script){if(V.tagName!=="script")return V.script+="</"+V.tagName+">",V.tagName="",void(V.state=N.SCRIPT);F(V,"onscript",V.script),V.script=""}var Y=V.tags.length,me=V.tagName;V.strict||(me=me[V.looseCase]());for(var Re=me;Y--&&!(V.tags[Y].name===Re);)X(V,"Unexpected close tag");if(Y<0)return X(V,"Unmatched closing tag: "+V.tagName),V.textNode+="</"+V.tagName+">",void(V.state=N.TEXT);V.tagName=me;for(var rt=V.tags.length;rt-- >Y;){var Pe=V.tag=V.tags.pop();V.tagName=V.tag.name,F(V,"onclosetag",V.tagName);var Ie={};for(var Xe in Pe.ns)Ie[Xe]=Pe.ns[Xe];var tt=V.tags[V.tags.length-1]||V;V.opt.xmlns&&Pe.ns!==tt.ns&&(0,n.default)(Pe.ns).forEach(function(Ve){var Ke=Pe.ns[Ve];F(V,"onclosenamespace",{prefix:Ve,uri:Ke})})}Y===0&&(V.closedRoot=!0),V.tagName=V.attribValue=V.attribName="",V.attribList.length=0,V.state=N.TEXT}function xe(V){var Y,me=V.entity,Re=me.toLowerCase(),rt="";return V.ENTITIES[me]?V.ENTITIES[me]:V.ENTITIES[Re]?V.ENTITIES[Re]:(me=Re,me.charAt(0)==="#"&&(me.charAt(1)==="x"?(me=me.slice(2),Y=parseInt(me,16),rt=Y.toString(16)):(me=me.slice(1),Y=parseInt(me,10),rt=Y.toString(10))),me=me.replace(/^0+/,""),isNaN(Y)||rt.toLowerCase()!==me?(X(V,"Invalid character entity"),"&"+V.entity+";"):(0,p.default)(Y))}function ye(V,Y){Y==="<"?(V.state=N.OPEN_WAKA,V.startTagPosition=V.position):a(Y)||(X(V,"Non-whitespace before first tag."),V.textNode=Y,V.state=N.TEXT)}function Ae(V,Y){var me="";return Y<V.length&&(me=V.charAt(Y)),me}function pe(V){var Y=this;if(this.error)throw this.error;if(Y.closed)return j(Y,"Cannot write after close. Assign an onready handler.");if(V===null)return G(Y);(V===void 0?"undefined":(0,c.default)(V))==="object"&&(V=V.toString());for(var me=0,Re="";!(Re=Ae(V,me++),Y.c=Re,!Re);)switch(Y.trackPosition&&(Y.position++,Re===`
`?(Y.line++,Y.column=0):Y.column++),Y.state){case N.BEGIN:if(Y.state=N.BEGIN_WHITESPACE,Re==="\uFEFF")continue;ye(Y,Re);continue;case N.BEGIN_WHITESPACE:ye(Y,Re);continue;case N.TEXT:if(Y.sawRoot&&!Y.closedRoot){for(var rt=me-1;Re&&Re!=="<"&&Re!=="&";)(Re=Ae(V,me++))&&Y.trackPosition&&(Y.position++,Re===`
`?(Y.line++,Y.column=0):Y.column++);Y.textNode+=V.substring(rt,me-1)}Re!=="<"||Y.sawRoot&&Y.closedRoot&&!Y.strict?(a(Re)||Y.sawRoot&&!Y.closedRoot||X(Y,"Text data outside of root node."),Re==="&"?Y.state=N.TEXT_ENTITY:Y.textNode+=Re):(Y.state=N.OPEN_WAKA,Y.startTagPosition=Y.position);continue;case N.SCRIPT:Re==="<"?Y.state=N.SCRIPT_ENDING:Y.script+=Re;continue;case N.SCRIPT_ENDING:Re==="/"?Y.state=N.CLOSE_TAG:(Y.script+="<"+Re,Y.state=N.SCRIPT);continue;case N.OPEN_WAKA:if(Re==="!")Y.state=N.SGML_DECL,Y.sgmlDecl="";else if(!a(Re))if(A(Ue,Re))Y.state=N.OPEN_TAG,Y.tagName=Re;else if(Re==="/")Y.state=N.CLOSE_TAG,Y.tagName="";else if(Re==="?")Y.state=N.PROC_INST,Y.procInstName=Y.procInstBody="";else{if(X(Y,"Unencoded <"),Y.startTagPosition+1<Y.position){var Pe=Y.position-Y.startTagPosition;Re=new Array(Pe).join(" ")+Re}Y.textNode+="<"+Re,Y.state=N.TEXT}continue;case N.SGML_DECL:(Y.sgmlDecl+Re).toUpperCase()===Ce?(F(Y,"onopencdata"),Y.state=N.CDATA,Y.sgmlDecl="",Y.cdata=""):Y.sgmlDecl+Re==="--"?(Y.state=N.COMMENT,Y.comment="",Y.sgmlDecl=""):(Y.sgmlDecl+Re).toUpperCase()===Le?(Y.state=N.DOCTYPE,(Y.doctype||Y.sawRoot)&&X(Y,"Inappropriately located doctype declaration"),Y.doctype="",Y.sgmlDecl=""):Re===">"?(F(Y,"onsgmldeclaration",Y.sgmlDecl),Y.sgmlDecl="",Y.state=N.TEXT):(x(Re)&&(Y.state=N.SGML_DECL_QUOTED),Y.sgmlDecl+=Re);continue;case N.SGML_DECL_QUOTED:Re===Y.q&&(Y.state=N.SGML_DECL,Y.q=""),Y.sgmlDecl+=Re;continue;case N.DOCTYPE:Re===">"?(Y.state=N.TEXT,F(Y,"ondoctype",Y.doctype),Y.doctype=!0):(Y.doctype+=Re,Re==="["?Y.state=N.DOCTYPE_DTD:x(Re)&&(Y.state=N.DOCTYPE_QUOTED,Y.q=Re));continue;case N.DOCTYPE_QUOTED:Y.doctype+=Re,Re===Y.q&&(Y.q="",Y.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:Y.doctype+=Re,Re==="]"?Y.state=N.DOCTYPE:x(Re)&&(Y.state=N.DOCTYPE_DTD_QUOTED,Y.q=Re);continue;case N.DOCTYPE_DTD_QUOTED:Y.doctype+=Re,Re===Y.q&&(Y.state=N.DOCTYPE_DTD,Y.q="");continue;case N.COMMENT:Re==="-"?Y.state=N.COMMENT_ENDING:Y.comment+=Re;continue;case N.COMMENT_ENDING:Re==="-"?(Y.state=N.COMMENT_ENDED,Y.comment=ne(Y.opt,Y.comment),Y.comment&&F(Y,"oncomment",Y.comment),Y.comment=""):(Y.comment+="-"+Re,Y.state=N.COMMENT);continue;case N.COMMENT_ENDED:Re!==">"?(X(Y,"Malformed comment"),Y.comment+="--"+Re,Y.state=N.COMMENT):Y.state=N.TEXT;continue;case N.CDATA:Re==="]"?Y.state=N.CDATA_ENDING:Y.cdata+=Re;continue;case N.CDATA_ENDING:Re==="]"?Y.state=N.CDATA_ENDING_2:(Y.cdata+="]"+Re,Y.state=N.CDATA);continue;case N.CDATA_ENDING_2:Re===">"?(Y.cdata&&F(Y,"oncdata",Y.cdata),F(Y,"onclosecdata"),Y.cdata="",Y.state=N.TEXT):Re==="]"?Y.cdata+="]":(Y.cdata+="]]"+Re,Y.state=N.CDATA);continue;case N.PROC_INST:Re==="?"?Y.state=N.PROC_INST_ENDING:a(Re)?Y.state=N.PROC_INST_BODY:Y.procInstName+=Re;continue;case N.PROC_INST_BODY:if(!Y.procInstBody&&a(Re))continue;Re==="?"?Y.state=N.PROC_INST_ENDING:Y.procInstBody+=Re;continue;case N.PROC_INST_ENDING:Re===">"?(F(Y,"onprocessinginstruction",{name:Y.procInstName,body:Y.procInstBody}),Y.procInstName=Y.procInstBody="",Y.state=N.TEXT):(Y.procInstBody+="?"+Re,Y.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:A(Ye,Re)?Y.tagName+=Re:(J(Y),Re===">"?ie(Y):Re==="/"?Y.state=N.OPEN_TAG_SLASH:(a(Re)||X(Y,"Invalid character in tag name"),Y.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:Re===">"?(ie(Y,!0),oe(Y)):(X(Y,"Forward-slash in opening tag not followed by >"),Y.state=N.ATTRIB);continue;case N.ATTRIB:if(a(Re))continue;Re===">"?ie(Y):Re==="/"?Y.state=N.OPEN_TAG_SLASH:A(Ue,Re)?(Y.attribName=Re,Y.attribValue="",Y.state=N.ATTRIB_NAME):X(Y,"Invalid attribute name");continue;case N.ATTRIB_NAME:Re==="="?Y.state=N.ATTRIB_VALUE:Re===">"?(X(Y,"Attribute without value"),Y.attribValue=Y.attribName,Q(Y),ie(Y)):a(Re)?Y.state=N.ATTRIB_NAME_SAW_WHITE:A(Ye,Re)?Y.attribName+=Re:X(Y,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if(Re==="=")Y.state=N.ATTRIB_VALUE;else{if(a(Re))continue;X(Y,"Attribute without value"),Y.tag.attributes[Y.attribName]="",Y.attribValue="",F(Y,"onattribute",{name:Y.attribName,value:""}),Y.attribName="",Re===">"?ie(Y):A(Ue,Re)?(Y.attribName=Re,Y.state=N.ATTRIB_NAME):(X(Y,"Invalid attribute name"),Y.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(a(Re))continue;x(Re)?(Y.q=Re,Y.state=N.ATTRIB_VALUE_QUOTED):(X(Y,"Unquoted attribute value"),Y.state=N.ATTRIB_VALUE_UNQUOTED,Y.attribValue=Re);continue;case N.ATTRIB_VALUE_QUOTED:if(Re!==Y.q){Re==="&"?Y.state=N.ATTRIB_VALUE_ENTITY_Q:Y.attribValue+=Re;continue}Q(Y),Y.q="",Y.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:a(Re)?Y.state=N.ATTRIB:Re===">"?ie(Y):Re==="/"?Y.state=N.OPEN_TAG_SLASH:A(Ue,Re)?(X(Y,"No whitespace between attributes"),Y.attribName=Re,Y.attribValue="",Y.state=N.ATTRIB_NAME):X(Y,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(!O(Re)){Re==="&"?Y.state=N.ATTRIB_VALUE_ENTITY_U:Y.attribValue+=Re;continue}Q(Y),Re===">"?ie(Y):Y.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(Y.tagName)Re===">"?oe(Y):A(Ye,Re)?Y.tagName+=Re:Y.script?(Y.script+="</"+Y.tagName,Y.tagName="",Y.state=N.SCRIPT):(a(Re)||X(Y,"Invalid tagname in closing tag"),Y.state=N.CLOSE_TAG_SAW_WHITE);else{if(a(Re))continue;D(Ue,Re)?Y.script?(Y.script+="</"+Re,Y.state=N.SCRIPT):X(Y,"Invalid tagname in closing tag."):Y.tagName=Re}continue;case N.CLOSE_TAG_SAW_WHITE:if(a(Re))continue;Re===">"?oe(Y):X(Y,"Invalid characters in closing tag");continue;case N.TEXT_ENTITY:case N.ATTRIB_VALUE_ENTITY_Q:case N.ATTRIB_VALUE_ENTITY_U:var Ie,Xe;switch(Y.state){case N.TEXT_ENTITY:Ie=N.TEXT,Xe="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:Ie=N.ATTRIB_VALUE_QUOTED,Xe="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:Ie=N.ATTRIB_VALUE_UNQUOTED,Xe="attribValue"}Re===";"?(Y[Xe]+=xe(Y),Y.entity="",Y.state=Ie):A(Y.entity.length?M:ee,Re)?Y.entity+=Re:(X(Y,"Invalid character in entity name"),Y[Xe]+="&"+Y.entity+Re,Y.entity="",Y.state=Ie);continue;default:throw new Error(Y,"Unknown state: "+Y.state)}return Y.position>=Y.bufferCheckPosition&&_(Y),Y}y.parser=function(V,Y){return new g(V,Y)},y.SAXParser=g,y.SAXStream=E,y.createStream=m,y.MAX_BUFFER_LENGTH=65536;var Oe=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];y.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],u.default||(Object.create=function(V){function Y(){}return Y.prototype=V,new Y}),n.default||(Object.keys=function(V){var Y=[];for(var me in V)V.hasOwnProperty(me)&&Y.push(me);return Y}),g.prototype={end:function(){G(this)},write:pe,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){v(this)}};var Fe;try{Fe=w("stream").Stream}catch(V){Fe=function(){}}var Me=y.EVENTS.filter(function(V){return V!=="error"&&V!=="end"});E.prototype=(0,u.default)(Fe.prototype,{constructor:{value:E}}),E.prototype.write=function(V){if(typeof C=="function"&&typeof C.isBuffer=="function"&&C.isBuffer(V)){if(!this._decoder){var Y=w("string_decoder").StringDecoder;this._decoder=new Y("utf8")}V=this._decoder.write(V)}return this._parser.write(V.toString()),this.emit("data",V),!0},E.prototype.end=function(V){return V&&V.length&&this.write(V),this._parser.end(),!0},E.prototype.on=function(V,Y){var me=this;return me._parser["on"+V]||Me.indexOf(V)===-1||(me._parser["on"+V]=function(){var Re=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Re.splice(0,0,V),me.emit.apply(me,Re)}),Fe.prototype.on.call(me,V,Y)};var Ce="[CDATA[",Le="DOCTYPE",de="http://www.w3.org/XML/1998/namespace",ue="http://www.w3.org/2000/xmlns/",ke={xml:de,xmlns:ue},Ue=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Ye=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,ee=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,M=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,N=0;y.STATE={BEGIN:N++,BEGIN_WHITESPACE:N++,TEXT:N++,TEXT_ENTITY:N++,OPEN_WAKA:N++,SGML_DECL:N++,SGML_DECL_QUOTED:N++,DOCTYPE:N++,DOCTYPE_QUOTED:N++,DOCTYPE_DTD:N++,DOCTYPE_DTD_QUOTED:N++,COMMENT_STARTING:N++,COMMENT:N++,COMMENT_ENDING:N++,COMMENT_ENDED:N++,CDATA:N++,CDATA_ENDING:N++,CDATA_ENDING_2:N++,PROC_INST:N++,PROC_INST_BODY:N++,PROC_INST_ENDING:N++,OPEN_TAG:N++,OPEN_TAG_SLASH:N++,ATTRIB:N++,ATTRIB_NAME:N++,ATTRIB_NAME_SAW_WHITE:N++,ATTRIB_VALUE:N++,ATTRIB_VALUE_QUOTED:N++,ATTRIB_VALUE_CLOSED:N++,ATTRIB_VALUE_UNQUOTED:N++,ATTRIB_VALUE_ENTITY_Q:N++,ATTRIB_VALUE_ENTITY_U:N++,CLOSE_TAG:N++,CLOSE_TAG_SAW_WHITE:N++,SCRIPT:N++,SCRIPT_ENDING:N++},y.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},y.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,n.default)(y.ENTITIES).forEach(function(V){var Y=y.ENTITIES[V],me=typeof Y=="number"?String.fromCharCode(Y):Y;y.ENTITIES[V]=me});for(var $ in y.STATE)y.STATE[y.STATE[$]]=$;N=y.STATE,p.default||function(){var V=String.fromCharCode,Y=Math.floor,me=function(){var Re,rt,Pe=[],Ie=-1,Xe=arguments.length;if(!Xe)return"";for(var tt="";++Ie<Xe;){var Ve=Number(arguments[Ie]);if(!isFinite(Ve)||Ve<0||Ve>1114111||Y(Ve)!==Ve)throw RangeError("Invalid code point: "+Ve);Ve<=65535?Pe.push(Ve):(Ve-=65536,Re=55296+(Ve>>10),rt=Ve%1024+56320,Pe.push(Re,rt)),(Ie+1===Xe||Pe.length>16384)&&(tt+=V.apply(null,Pe),Pe.length=0)}return tt};f.default?Object.defineProperty(String,"fromCodePoint",{value:me,configurable:!0,writable:!0}):String.fromCodePoint=me}()}(S===void 0?(void 0).sax={}:S)}).call(this,w("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/create":19,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/object/keys":23,"babel-runtime/core-js/string/from-code-point":26,"babel-runtime/helpers/typeof":32,buffer:38,stream:195,string_decoder:37}],195:[function(w,P,S){function C(){T.call(this)}P.exports=C;var T=w("events").EventEmitter;w("inherits")(C,T),C.Readable=w("readable-stream/readable.js"),C.Writable=w("readable-stream/writable.js"),C.Duplex=w("readable-stream/duplex.js"),C.Transform=w("readable-stream/transform.js"),C.PassThrough=w("readable-stream/passthrough.js"),C.Stream=C,C.prototype.pipe=function(l,p){function h(t){l.writable&&l.write(t)===!1&&i.pause&&i.pause()}function d(){i.readable&&i.resume&&i.resume()}function o(){n||(n=!0,l.end())}function c(){n||(n=!0,typeof l.destroy=="function"&&l.destroy())}function s(t){if(f(),T.listenerCount(this,"error")===0)throw t}function f(){i.removeListener("data",h),l.removeListener("drain",d),i.removeListener("end",o),i.removeListener("close",c),i.removeListener("error",s),l.removeListener("error",s),i.removeListener("end",f),i.removeListener("close",f),l.removeListener("close",f)}var i=this;i.on("data",h),l.on("drain",d),l._isStdio||p&&p.end===!1||(i.on("end",o),i.on("close",c));var n=!1;return i.on("error",s),l.on("error",s),i.on("end",f),i.on("close",f),l.on("close",f),l.emit("pipe",i),l}},{events:158,inherits:162,"readable-stream/duplex.js":178,"readable-stream/passthrough.js":187,"readable-stream/readable.js":188,"readable-stream/transform.js":189,"readable-stream/writable.js":190}],196:[function(w,P,S){(function(C){var T=w("./lib/request"),l=w("./lib/response"),p=w("xtend"),h=w("builtin-status-codes"),d=w("url"),o=S;o.request=function(c,s){c=typeof c=="string"?d.parse(c):p(c);var f=C.location.protocol.search(/^https?:$/)===-1?"http:":"",i=c.protocol||f,n=c.hostname||c.host,t=c.port,u=c.path||"/";n&&n.indexOf(":")!==-1&&(n="["+n+"]"),c.url=(n?i+"//"+n:"")+(t?":"+t:"")+u,c.method=(c.method||"GET").toUpperCase(),c.headers=c.headers||{};var y=new T(c);return s&&y.on("response",s),y},o.get=function(c,s){var f=o.request(c,s);return f.end(),f},o.ClientRequest=T,o.IncomingMessage=l.IncomingMessage,o.Agent=function(){},o.Agent.defaultMaxSockets=4,o.globalAgent=new o.Agent,o.STATUS_CODES=h,o.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(w,P,S){(function(C){"use strict";function T(){if(h!==void 0)return h;if(C.XMLHttpRequest){h=new C.XMLHttpRequest;try{h.open("GET",C.XDomainRequest?"/":"https://example.com")}catch(c){h=null}}else h=null;return h}function l(c){var s=T();if(!s)return!1;try{return s.responseType=c,s.responseType===c}catch(f){}return!1}function p(c){return typeof c=="function"}S.fetch=p(C.fetch)&&p(C.ReadableStream),S.writableStream=p(C.WritableStream),S.abortController=p(C.AbortController),S.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),S.blobConstructor=!0}catch(c){}var h,d=C.ArrayBuffer!==void 0,o=d&&p(C.ArrayBuffer.prototype.slice);S.arraybuffer=S.fetch||d&&l("arraybuffer"),S.msstream=!S.fetch&&o&&l("ms-stream"),S.mozchunkedarraybuffer=!S.fetch&&d&&l("moz-chunked-arraybuffer"),S.overrideMimeType=S.fetch||!!T()&&p(T().overrideMimeType),S.vbArray=p(C.VBArray),h=null}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(w,P,S){(function(C,T,l){"use strict";function p(_,b){return c.fetch&&b?"fetch":c.mozchunkedarraybuffer?"moz-chunked-arraybuffer":c.msstream?"ms-stream":c.arraybuffer&&_?"arraybuffer":c.vbArray&&_?"text:vbarray":"text"}function h(_){try{var b=_.status;return b!==null&&b!==0}catch(v){return!1}}var d=w("babel-runtime/core-js/object/keys"),o=function(_){return _&&_.__esModule?_:{default:_}}(d),c=w("./capability"),s=w("inherits"),f=w("./response"),i=w("readable-stream"),n=w("to-arraybuffer"),t=f.IncomingMessage,u=f.readyStates,y=P.exports=function(_){var b=this;i.Writable.call(b),b._opts=_,b._body=[],b._headers={},_.auth&&b.setHeader("Authorization","Basic "+new l(_.auth).toString("base64")),(0,o.default)(_.headers).forEach(function(E){b.setHeader(E,_.headers[E])});var v,m=!0;if(_.mode==="disable-fetch"||"requestTimeout"in _&&!c.abortController)m=!1,v=!0;else if(_.mode==="prefer-streaming")v=!1;else if(_.mode==="allow-wrong-content-type")v=!c.overrideMimeType;else{if(_.mode&&_.mode!=="default"&&_.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");v=!0}b._mode=p(v,m),b._fetchTimer=null,b.on("finish",function(){b._onFinish()})};s(y,i.Writable),y.prototype.setHeader=function(_,b){var v=this,m=_.toLowerCase();g.indexOf(m)===-1&&(v._headers[m]={name:_,value:b})},y.prototype.getHeader=function(_){var b=this._headers[_.toLowerCase()];return b?b.value:null},y.prototype.removeHeader=function(_){delete this._headers[_.toLowerCase()]},y.prototype._onFinish=function(){var _=this;if(!_._destroyed){var b=_._opts,v=_._headers,m=null;b.method!=="GET"&&b.method!=="HEAD"&&(m=c.arraybuffer?n(l.concat(_._body)):c.blobConstructor?new T.Blob(_._body.map(function(A){return n(A)}),{type:(v["content-type"]||{}).value||""}):l.concat(_._body).toString());var E=[];if((0,o.default)(v).forEach(function(A){var D=v[A].name,I=v[A].value;Array.isArray(I)?I.forEach(function(F){E.push([D,F])}):E.push([D,I])}),_._mode==="fetch"){var a=null;if(c.abortController){var x=new AbortController;a=x.signal,_._fetchAbortController=x,"requestTimeout"in b&&b.requestTimeout!==0&&(_._fetchTimer=T.setTimeout(function(){_.emit("requestTimeout"),_._fetchAbortController&&_._fetchAbortController.abort()},b.requestTimeout))}T.fetch(_._opts.url,{method:_._opts.method,headers:E,body:m||void 0,mode:"cors",credentials:b.withCredentials?"include":"same-origin",signal:a}).then(function(A){_._fetchResponse=A,_._connect()},function(A){T.clearTimeout(_._fetchTimer),_._destroyed||_.emit("error",A)})}else{var O=_._xhr=new T.XMLHttpRequest;try{O.open(_._opts.method,_._opts.url,!0)}catch(A){return void C.nextTick(function(){_.emit("error",A)})}"responseType"in O&&(O.responseType=_._mode.split(":")[0]),"withCredentials"in O&&(O.withCredentials=!!b.withCredentials),_._mode==="text"&&"overrideMimeType"in O&&O.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in b&&(O.timeout=b.requestTimeout,O.ontimeout=function(){_.emit("requestTimeout")}),E.forEach(function(A){O.setRequestHeader(A[0],A[1])}),_._response=null,O.onreadystatechange=function(){switch(O.readyState){case u.LOADING:case u.DONE:_._onXHRProgress()}},_._mode==="moz-chunked-arraybuffer"&&(O.onprogress=function(){_._onXHRProgress()}),O.onerror=function(){_._destroyed||_.emit("error",new Error("XHR error"))};try{O.send(m)}catch(A){return void C.nextTick(function(){_.emit("error",A)})}}}},y.prototype._onXHRProgress=function(){var _=this;h(_._xhr)&&!_._destroyed&&(_._response||_._connect(),_._response._onXHRProgress())},y.prototype._connect=function(){var _=this;_._destroyed||(_._response=new t(_._xhr,_._fetchResponse,_._mode,_._fetchTimer),_._response.on("error",function(b){_.emit("error",b)}),_.emit("response",_._response))},y.prototype._write=function(_,b,v){this._body.push(_),v()},y.prototype.abort=y.prototype.destroy=function(){var _=this;_._destroyed=!0,T.clearTimeout(_._fetchTimer),_._response&&(_._response._destroyed=!0),_._xhr?_._xhr.abort():_._fetchAbortController&&_._fetchAbortController.abort()},y.prototype.end=function(_,b,v){var m=this;typeof _=="function"&&(v=_,_=void 0),i.Writable.prototype.end.call(m,_,b,v)},y.prototype.flushHeaders=function(){},y.prototype.setTimeout=function(){},y.prototype.setNoDelay=function(){},y.prototype.setSocketKeepAlive=function(){};var g=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{},w("buffer").Buffer)},{"./capability":197,"./response":199,_process:173,"babel-runtime/core-js/object/keys":23,buffer:38,inherits:162,"readable-stream":188,"to-arraybuffer":202}],199:[function(w,P,S){(function(C,T,l){"use strict";var p=w("babel-runtime/core-js/promise"),h=function(i){return i&&i.__esModule?i:{default:i}}(p),d=w("./capability"),o=w("inherits"),c=w("readable-stream"),s=S.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},f=S.IncomingMessage=function(i,n,t,u){var y=this;if(c.Readable.call(y),y._mode=t,y.headers={},y.rawHeaders=[],y.trailers={},y.rawTrailers=[],y.on("end",function(){C.nextTick(function(){y.emit("close")})}),t==="fetch"){if(y._fetchResponse=n,y.url=n.url,y.statusCode=n.status,y.statusMessage=n.statusText,n.headers.forEach(function(m,E){y.headers[E.toLowerCase()]=m,y.rawHeaders.push(E,m)}),d.writableStream){var g=new WritableStream({write:function(m){return new h.default(function(E,a){y._destroyed?a():y.push(new l(m))?E():y._resumeFetch=E})},close:function(){T.clearTimeout(u),y._destroyed||y.push(null)},abort:function(m){y._destroyed||y.emit("error",m)}});try{return void n.body.pipeTo(g).catch(function(m){T.clearTimeout(u),y._destroyed||y.emit("error",m)})}catch(m){}}var _=n.body.getReader();!function m(){_.read().then(function(E){if(!y._destroyed){if(E.done)return T.clearTimeout(u),void y.push(null);y.push(new l(E.value)),m()}}).catch(function(E){T.clearTimeout(u),y._destroyed||y.emit("error",E)})}()}else if(y._xhr=i,y._pos=0,y.url=i.responseURL,y.statusCode=i.status,y.statusMessage=i.statusText,i.getAllResponseHeaders().split(/\r?\n/).forEach(function(m){var E=m.match(/^([^:]+):\s*(.*)/);if(E){var a=E[1].toLowerCase();a==="set-cookie"?(y.headers[a]===void 0&&(y.headers[a]=[]),y.headers[a].push(E[2])):y.headers[a]!==void 0?y.headers[a]+=", "+E[2]:y.headers[a]=E[2],y.rawHeaders.push(E[1],E[2])}}),y._charset="x-user-defined",!d.overrideMimeType){var b=y.rawHeaders["mime-type"];if(b){var v=b.match(/;\s*charset=([^;])(;|$)/);v&&(y._charset=v[1].toLowerCase())}y._charset||(y._charset="utf-8")}};o(f,c.Readable),f.prototype._read=function(){var i=this,n=i._resumeFetch;n&&(i._resumeFetch=null,n())},f.prototype._onXHRProgress=function(){var i=this,n=i._xhr,t=null;switch(i._mode){case"text:vbarray":if(n.readyState!==s.DONE)break;try{t=new T.VBArray(n.responseBody).toArray()}catch(b){}if(t!==null){i.push(new l(t));break}case"text":try{t=n.responseText}catch(b){i._mode="text:vbarray";break}if(t.length>i._pos){var u=t.substr(i._pos);if(i._charset==="x-user-defined"){for(var y=new l(u.length),g=0;g<u.length;g++)y[g]=255&u.charCodeAt(g);i.push(y)}else i.push(u,i._charset);i._pos=t.length}break;case"arraybuffer":if(n.readyState!==s.DONE||!n.response)break;t=n.response,i.push(new l(new Uint8Array(t)));break;case"moz-chunked-arraybuffer":if(t=n.response,n.readyState!==s.LOADING||!t)break;i.push(new l(new Uint8Array(t)));break;case"ms-stream":if(t=n.response,n.readyState!==s.LOADING)break;var _=new T.MSStreamReader;_.onprogress=function(){_.result.byteLength>i._pos&&(i.push(new l(new Uint8Array(_.result.slice(i._pos)))),i._pos=_.result.byteLength)},_.onload=function(){i.push(null)},_.readAsArrayBuffer(t)}i._xhr.readyState===s.DONE&&i._mode!=="ms-stream"&&i.push(null)}}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{},w("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(w,P,S){"use strict";function C(b){if(!b)return"utf8";for(var v;;)switch(b){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return b;default:if(v)return;b=(""+b).toLowerCase(),v=!0}}function T(b){var v=C(b);if(typeof v!="string"&&(g.isEncoding===_||!_(b)))throw new Error("Unknown encoding: "+b);return v||b}function l(b){this.encoding=T(b);var v;switch(this.encoding){case"utf16le":this.text=f,this.end=i,v=4;break;case"utf8":this.fillLast=o,v=4;break;case"base64":this.text=n,this.end=t,v=3;break;default:return this.write=u,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(v)}function p(b){return b<=127?0:b>>5==6?2:b>>4==14?3:b>>3==30?4:b>>6==2?-1:-2}function h(b,v,m){var E=v.length-1;if(E<m)return 0;var a=p(v[E]);return a>=0?(a>0&&(b.lastNeed=a-1),a):--E<m||a===-2?0:(a=p(v[E]))>=0?(a>0&&(b.lastNeed=a-2),a):--E<m||a===-2?0:(a=p(v[E]),a>=0?(a>0&&(a===2?a=0:b.lastNeed=a-3),a):0)}function d(b,v,m){if((192&v[0])!=128)return b.lastNeed=0,"\u951F\uFFFD";if(b.lastNeed>1&&v.length>1){if((192&v[1])!=128)return b.lastNeed=1,"\u951F\uFFFD";if(b.lastNeed>2&&v.length>2&&(192&v[2])!=128)return b.lastNeed=2,"\u951F\uFFFD"}}function o(b){var v=this.lastTotal-this.lastNeed,m=d(this,b,v);return m!==void 0?m:this.lastNeed<=b.length?(b.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(b.copy(this.lastChar,v,0,b.length),void(this.lastNeed-=b.length))}function c(b,v){var m=h(this,b,v);if(!this.lastNeed)return b.toString("utf8",v);this.lastTotal=m;var E=b.length-(m-this.lastNeed);return b.copy(this.lastChar,0,E),b.toString("utf8",v,E)}function s(b){var v=b&&b.length?this.write(b):"";return this.lastNeed?v+"\u951F\uFFFD":v}function f(b,v){if((b.length-v)%2==0){var m=b.toString("utf16le",v);if(m){var E=m.charCodeAt(m.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],m.slice(0,-1)}return m}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",v,b.length-1)}function i(b){var v=b&&b.length?this.write(b):"";if(this.lastNeed){var m=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,m)}return v}function n(b,v){var m=(b.length-v)%3;return m===0?b.toString("base64",v):(this.lastNeed=3-m,this.lastTotal=3,m===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",v,b.length-m))}function t(b){var v=b&&b.length?this.write(b):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function u(b){return b.toString(this.encoding)}function y(b){return b&&b.length?this.write(b):""}var g=w("safe-buffer").Buffer,_=g.isEncoding||function(b){switch((b=""+b)&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};S.StringDecoder=l,l.prototype.write=function(b){if(b.length===0)return"";var v,m;if(this.lastNeed){if((v=this.fillLast(b))===void 0)return"";m=this.lastNeed,this.lastNeed=0}else m=0;return m<b.length?v?v+this.text(b,m):this.text(b,m):v||""},l.prototype.end=s,l.prototype.text=c,l.prototype.fillLast=function(b){if(this.lastNeed<=b.length)return b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,b.length),this.lastNeed-=b.length}},{"safe-buffer":193}],201:[function(w,P,S){(function(C,T){function l(s,f){this._id=s,this._clearFn=f}var p=w("process/browser.js").nextTick,h=Function.prototype.apply,d=Array.prototype.slice,o={},c=0;S.setTimeout=function(){return new l(h.call(setTimeout,window,arguments),clearTimeout)},S.setInterval=function(){return new l(h.call(setInterval,window,arguments),clearInterval)},S.clearTimeout=S.clearInterval=function(s){s.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},S.enroll=function(s,f){clearTimeout(s._idleTimeoutId),s._idleTimeout=f},S.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},S._unrefActive=S.active=function(s){clearTimeout(s._idleTimeoutId);var f=s._idleTimeout;f>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},f))},S.setImmediate=typeof C=="function"?C:function(s){var f=c++,i=!(arguments.length<2)&&d.call(arguments,1);return o[f]=!0,p(function(){o[f]&&(i?s.apply(null,i):s.call(null),S.clearImmediate(f))}),f},S.clearImmediate=typeof T=="function"?T:function(s){delete o[s]}}).call(this,w("timers").setImmediate,w("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(w,P,S){var C=w("buffer").Buffer;P.exports=function(T){if(T instanceof Uint8Array){if(T.byteOffset===0&&T.byteLength===T.buffer.byteLength)return T.buffer;if(typeof T.buffer.slice=="function")return T.buffer.slice(T.byteOffset,T.byteOffset+T.byteLength)}if(C.isBuffer(T)){for(var l=new Uint8Array(T.length),p=T.length,h=0;h<p;h++)l[h]=T[h];return l.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(w,P,S){"use strict";function C(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function T(a,x,O){if(a&&o.isObject(a)&&a instanceof C)return a;var A=new C;return A.parse(a,x,O),A}function l(a){return o.isString(a)&&(a=T(a)),a instanceof C?a.format():C.prototype.format.call(a)}function p(a,x){return T(a,!1,!0).resolve(x)}function h(a,x){return a?T(a,!1,!0).resolveObject(x):x}var d=w("punycode"),o=w("./util");S.parse=T,S.resolve=p,S.resolveObject=h,S.format=l,S.Url=C;var c=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=["<",">",'"',"`"," ","\r",`
`," "],n=["{","}","|","\\","^","`"].concat(i),t=["'"].concat(n),u=["%","/","?",";","#"].concat(t),y=["/","?","#"],g=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=w("querystring");C.prototype.parse=function(a,x,O){if(!o.isString(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var A=a.indexOf("?"),D=A!==-1&&A<a.indexOf("#")?"?":"#",I=a.split(D),F=/\\/g;I[0]=I[0].replace(F,"/"),a=I.join(D);var K=a;if(K=K.trim(),!O&&a.split("#").length===1){var ne=f.exec(K);if(ne)return this.path=K,this.href=K,this.pathname=ne[1],ne[2]?(this.search=ne[2],this.query=x?E.parse(this.search.substr(1)):this.search.substr(1)):x&&(this.search="",this.query={}),this}var j=c.exec(K);if(j){j=j[0];var G=j.toLowerCase();this.protocol=G,K=K.substr(j.length)}if(O||j||K.match(/^\/\/[^@\/]+@[^@\/]+/)){var X=K.substr(0,2)==="//";!X||j&&v[j]||(K=K.substr(2),this.slashes=!0)}if(!v[j]&&(X||j&&!m[j])){for(var J=-1,B=0;B<y.length;B++){var Q=K.indexOf(y[B]);Q!==-1&&(J===-1||Q<J)&&(J=Q)}var ie,oe;oe=J===-1?K.lastIndexOf("@"):K.lastIndexOf("@",J),oe!==-1&&(ie=K.slice(0,oe),K=K.slice(oe+1),this.auth=decodeURIComponent(ie)),J=-1;for(var B=0;B<u.length;B++){var Q=K.indexOf(u[B]);Q!==-1&&(J===-1||Q<J)&&(J=Q)}J===-1&&(J=K.length),this.host=K.slice(0,J),K=K.slice(J),this.parseHost(),this.hostname=this.hostname||"";var xe=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!xe)for(var ye=this.hostname.split(/\./),B=0,Ae=ye.length;B<Ae;B++){var pe=ye[B];if(pe&&!pe.match(g)){for(var Oe="",Fe=0,Me=pe.length;Fe<Me;Fe++)pe.charCodeAt(Fe)>127?Oe+="x":Oe+=pe[Fe];if(!Oe.match(g)){var Ce=ye.slice(0,B),Le=ye.slice(B+1),de=pe.match(_);de&&(Ce.push(de[1]),Le.unshift(de[2])),Le.length&&(K="/"+Le.join(".")+K),this.hostname=Ce.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),xe||(this.hostname=d.toASCII(this.hostname));var ue=this.port?":"+this.port:"",ke=this.hostname||"";this.host=ke+ue,this.href+=this.host,xe&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),K[0]!=="/"&&(K="/"+K))}if(!b[G])for(var B=0,Ae=t.length;B<Ae;B++){var Ue=t[B];if(K.indexOf(Ue)!==-1){var Ye=encodeURIComponent(Ue);Ye===Ue&&(Ye=escape(Ue)),K=K.split(Ue).join(Ye)}}var ee=K.indexOf("#");ee!==-1&&(this.hash=K.substr(ee),K=K.slice(0,ee));var M=K.indexOf("?");if(M!==-1?(this.search=K.substr(M),this.query=K.substr(M+1),x&&(this.query=E.parse(this.query)),K=K.slice(0,M)):x&&(this.search="",this.query={}),K&&(this.pathname=K),m[G]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ue=this.pathname||"",N=this.search||"";this.path=ue+N}return this.href=this.format(),this},C.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var x=this.protocol||"",O=this.pathname||"",A=this.hash||"",D=!1,I="";this.host?D=a+this.host:this.hostname&&(D=a+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(D+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(I=E.stringify(this.query));var F=this.search||I&&"?"+I||"";return x&&x.substr(-1)!==":"&&(x+=":"),this.slashes||(!x||m[x])&&D!==!1?(D="//"+(D||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):D||(D=""),A&&A.charAt(0)!=="#"&&(A="#"+A),F&&F.charAt(0)!=="?"&&(F="?"+F),O=O.replace(/[?#]/g,function(K){return encodeURIComponent(K)}),F=F.replace("#","%23"),x+D+O+F+A},C.prototype.resolve=function(a){return this.resolveObject(T(a,!1,!0)).format()},C.prototype.resolveObject=function(a){if(o.isString(a)){var x=new C;x.parse(a,!1,!0),a=x}for(var O=new C,A=Object.keys(this),D=0;D<A.length;D++){var I=A[D];O[I]=this[I]}if(O.hash=a.hash,a.href==="")return O.href=O.format(),O;if(a.slashes&&!a.protocol){for(var F=Object.keys(a),K=0;K<F.length;K++){var ne=F[K];ne!=="protocol"&&(O[ne]=a[ne])}return m[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(a.protocol&&a.protocol!==O.protocol){if(!m[a.protocol]){for(var j=Object.keys(a),G=0;G<j.length;G++){var X=j[G];O[X]=a[X]}return O.href=O.format(),O}if(O.protocol=a.protocol,a.host||v[a.protocol])O.pathname=a.pathname;else{for(var Ae=(a.pathname||"").split("/");Ae.length&&!(a.host=Ae.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),Ae[0]!==""&&Ae.unshift(""),Ae.length<2&&Ae.unshift(""),O.pathname=Ae.join("/")}if(O.search=a.search,O.query=a.query,O.host=a.host||"",O.auth=a.auth,O.hostname=a.hostname||a.host,O.port=a.port,O.pathname||O.search){var J=O.pathname||"",B=O.search||"";O.path=J+B}return O.slashes=O.slashes||a.slashes,O.href=O.format(),O}var Q=O.pathname&&O.pathname.charAt(0)==="/",ie=a.host||a.pathname&&a.pathname.charAt(0)==="/",oe=ie||Q||O.host&&a.pathname,xe=oe,ye=O.pathname&&O.pathname.split("/")||[],Ae=a.pathname&&a.pathname.split("/")||[],pe=O.protocol&&!m[O.protocol];if(pe&&(O.hostname="",O.port=null,O.host&&(ye[0]===""?ye[0]=O.host:ye.unshift(O.host)),O.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(Ae[0]===""?Ae[0]=a.host:Ae.unshift(a.host)),a.host=null),oe=oe&&(Ae[0]===""||ye[0]==="")),ie)O.host=a.host||a.host===""?a.host:O.host,O.hostname=a.hostname||a.hostname===""?a.hostname:O.hostname,O.search=a.search,O.query=a.query,ye=Ae;else if(Ae.length)ye||(ye=[]),ye.pop(),ye=ye.concat(Ae),O.search=a.search,O.query=a.query;else if(!o.isNullOrUndefined(a.search)){if(pe){O.hostname=O.host=ye.shift();var Oe=!!(O.host&&O.host.indexOf("@")>0)&&O.host.split("@");Oe&&(O.auth=Oe.shift(),O.host=O.hostname=Oe.shift())}return O.search=a.search,O.query=a.query,o.isNull(O.pathname)&&o.isNull(O.search)||(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!ye.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var Fe=ye.slice(-1)[0],Me=(O.host||a.host||ye.length>1)&&(Fe==="."||Fe==="..")||Fe==="",Ce=0,Le=ye.length;Le>=0;Le--)Fe=ye[Le],Fe==="."?ye.splice(Le,1):Fe===".."?(ye.splice(Le,1),Ce++):Ce&&(ye.splice(Le,1),Ce--);if(!oe&&!xe)for(;Ce--;Ce)ye.unshift("..");!oe||ye[0]===""||ye[0]&&ye[0].charAt(0)==="/"||ye.unshift(""),Me&&ye.join("/").substr(-1)!=="/"&&ye.push("");var de=ye[0]===""||ye[0]&&ye[0].charAt(0)==="/";if(pe){O.hostname=O.host=de?"":ye.length?ye.shift():"";var Oe=!!(O.host&&O.host.indexOf("@")>0)&&O.host.split("@");Oe&&(O.auth=Oe.shift(),O.host=O.hostname=Oe.shift())}return oe=oe||O.host&&ye.length,oe&&!de&&ye.unshift(""),ye.length?O.pathname=ye.join("/"):(O.pathname=null,O.path=null),o.isNull(O.pathname)&&o.isNull(O.search)||(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=a.auth||O.auth,O.slashes=O.slashes||a.slashes,O.href=O.format(),O},C.prototype.parseHost=function(){var a=this.host,x=s.exec(a);x&&(x=x[0],x!==":"&&(this.port=x.substr(1)),a=a.substr(0,a.length-x.length)),a&&(this.hostname=a)}},{"./util":204,punycode:174,querystring:177}],204:[function(w,P,S){"use strict";P.exports={isString:function(C){return typeof C=="string"},isObject:function(C){return typeof C=="object"&&C!==null},isNull:function(C){return C===null},isNullOrUndefined:function(C){return C==null}}},{}],205:[function(w,P,S){(function(C){function T(p,h){function d(){if(!o){if(l("throwDeprecation"))throw new Error(h);l("traceDeprecation")?console.trace(h):console.warn(h),o=!0}return p.apply(this,arguments)}if(l("noDeprecation"))return p;var o=!1;return d}function l(p){try{if(!C.localStorage)return!1}catch(d){return!1}var h=C.localStorage[p];return h!=null&&String(h).toLowerCase()==="true"}P.exports=T}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(w,P,S){P.exports=function(C){return C&&typeof C=="object"&&typeof C.copy=="function"&&typeof C.fill=="function"&&typeof C.readUInt8=="function"}},{}],207:[function(w,P,S){(function(C,T){function l(B,Q){var ie={seen:[],stylize:h};return arguments.length>=3&&(ie.depth=arguments[2]),arguments.length>=4&&(ie.colors=arguments[3]),u(Q)?ie.showHidden=Q:Q&&S._extend(ie,Q),m(ie.showHidden)&&(ie.showHidden=!1),m(ie.depth)&&(ie.depth=2),m(ie.colors)&&(ie.colors=!1),m(ie.customInspect)&&(ie.customInspect=!0),ie.colors&&(ie.stylize=p),o(ie,B,ie.depth)}function p(B,Q){var ie=l.styles[Q];return ie?"["+l.colors[ie][0]+"m"+B+"["+l.colors[ie][1]+"m":B}function h(B,Q){return B}function d(B){var Q={};return B.forEach(function(ie,oe){Q[ie]=!0}),Q}function o(B,Q,ie){if(B.customInspect&&Q&&A(Q.inspect)&&Q.inspect!==S.inspect&&(!Q.constructor||Q.constructor.prototype!==Q)){var oe=Q.inspect(ie,B);return b(oe)||(oe=o(B,oe,ie)),oe}var xe=c(B,Q);if(xe)return xe;var ye=Object.keys(Q),Ae=d(ye);if(B.showHidden&&(ye=Object.getOwnPropertyNames(Q)),O(Q)&&(ye.indexOf("message")>=0||ye.indexOf("description")>=0))return s(Q);if(ye.length===0){if(A(Q)){var pe=Q.name?": "+Q.name:"";return B.stylize("[Function"+pe+"]","special")}if(E(Q))return B.stylize(RegExp.prototype.toString.call(Q),"regexp");if(x(Q))return B.stylize(Date.prototype.toString.call(Q),"date");if(O(Q))return s(Q)}var Oe="",Fe=!1,Me=["{","}"];if((t(Q)&&(Fe=!0,Me=["[","]"]),A(Q))&&(Oe=" [Function"+(Q.name?": "+Q.name:"")+"]"),E(Q)&&(Oe=" "+RegExp.prototype.toString.call(Q)),x(Q)&&(Oe=" "+Date.prototype.toUTCString.call(Q)),O(Q)&&(Oe=" "+s(Q)),ye.length===0&&(!Fe||Q.length==0))return Me[0]+Oe+Me[1];if(ie<0)return E(Q)?B.stylize(RegExp.prototype.toString.call(Q),"regexp"):B.stylize("[Object]","special");B.seen.push(Q);var Ce;return Ce=Fe?f(B,Q,ie,Ae,ye):ye.map(function(Le){return i(B,Q,ie,Ae,Le,Fe)}),B.seen.pop(),n(Ce,Oe,Me)}function c(B,Q){if(m(Q))return B.stylize("undefined","undefined");if(b(Q)){var ie="'"+JSON.stringify(Q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(ie,"string")}return _(Q)?B.stylize(""+Q,"number"):u(Q)?B.stylize(""+Q,"boolean"):y(Q)?B.stylize("null","null"):void 0}function s(B){return"["+Error.prototype.toString.call(B)+"]"}function f(B,Q,ie,oe,xe){for(var ye=[],Ae=0,pe=Q.length;Ae<pe;++Ae)ne(Q,String(Ae))?ye.push(i(B,Q,ie,oe,String(Ae),!0)):ye.push("");return xe.forEach(function(Oe){Oe.match(/^\d+$/)||ye.push(i(B,Q,ie,oe,Oe,!0))}),ye}function i(B,Q,ie,oe,xe,ye){var Ae,pe,Oe;if(Oe=Object.getOwnPropertyDescriptor(Q,xe)||{value:Q[xe]},Oe.get?pe=Oe.set?B.stylize("[Getter/Setter]","special"):B.stylize("[Getter]","special"):Oe.set&&(pe=B.stylize("[Setter]","special")),ne(oe,xe)||(Ae="["+xe+"]"),pe||(B.seen.indexOf(Oe.value)<0?(pe=y(ie)?o(B,Oe.value,null):o(B,Oe.value,ie-1),pe.indexOf(`
`)>-1&&(pe=ye?pe.split(`
`).map(function(Fe){return" "+Fe}).join(`
`).substr(2):`
`+pe.split(`
`).map(function(Fe){return" "+Fe}).join(`
`))):pe=B.stylize("[Circular]","special")),m(Ae)){if(ye&&xe.match(/^\d+$/))return pe;Ae=JSON.stringify(""+xe),Ae.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Ae=Ae.substr(1,Ae.length-2),Ae=B.stylize(Ae,"name")):(Ae=Ae.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Ae=B.stylize(Ae,"string"))}return Ae+": "+pe}function n(B,Q,ie){var oe=0;return B.reduce(function(xe,ye){return oe++,ye.indexOf(`
`)>=0&&oe++,xe+ye.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?ie[0]+(Q===""?"":Q+`
`)+" "+B.join(`,
`)+" "+ie[1]:ie[0]+Q+" "+B.join(", ")+" "+ie[1]}function t(B){return Array.isArray(B)}function u(B){return typeof B=="boolean"}function y(B){return B===null}function g(B){return B==null}function _(B){return typeof B=="number"}function b(B){return typeof B=="string"}function v(B){return typeof B=="symbol"}function m(B){return B===void 0}function E(B){return a(B)&&I(B)==="[object RegExp]"}function a(B){return typeof B=="object"&&B!==null}function x(B){return a(B)&&I(B)==="[object Date]"}function O(B){return a(B)&&(I(B)==="[object Error]"||B instanceof Error)}function A(B){return typeof B=="function"}function D(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||B===void 0}function I(B){return Object.prototype.toString.call(B)}function F(B){return B<10?"0"+B.toString(10):B.toString(10)}function K(){var B=new Date,Q=[F(B.getHours()),F(B.getMinutes()),F(B.getSeconds())].join(":");return[B.getDate(),J[B.getMonth()],Q].join(" ")}function ne(B,Q){return Object.prototype.hasOwnProperty.call(B,Q)}var j=/%[sdj%]/g;S.format=function(B){if(!b(B)){for(var Q=[],ie=0;ie<arguments.length;ie++)Q.push(l(arguments[ie]));return Q.join(" ")}for(var ie=1,oe=arguments,xe=oe.length,ye=String(B).replace(j,function(Oe){if(Oe==="%%")return"%";if(ie>=xe)return Oe;switch(Oe){case"%s":return String(oe[ie++]);case"%d":return Number(oe[ie++]);case"%j":try{return JSON.stringify(oe[ie++])}catch(Fe){return"[Circular]"}default:return Oe}}),Ae=oe[ie];ie<xe;Ae=oe[++ie])y(Ae)||!a(Ae)?ye+=" "+Ae:ye+=" "+l(Ae);return ye},S.deprecate=function(B,Q){function ie(){if(!oe){if(C.throwDeprecation)throw new Error(Q);C.traceDeprecation?console.trace(Q):console.error(Q),oe=!0}return B.apply(this,arguments)}if(m(T.process))return function(){return S.deprecate(B,Q).apply(this,arguments)};if(C.noDeprecation===!0)return B;var oe=!1;return ie};var G,X={};S.debuglog=function(B){if(m(G)&&(G=C.env.NODE_DEBUG||""),B=B.toUpperCase(),!X[B])if(new RegExp("\\b"+B+"\\b","i").test(G)){var Q=C.pid;X[B]=function(){var ie=S.format.apply(S,arguments);console.error("%s %d: %s",B,Q,ie)}}else X[B]=function(){};return X[B]},S.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},S.isArray=t,S.isBoolean=u,S.isNull=y,S.isNullOrUndefined=g,S.isNumber=_,S.isString=b,S.isSymbol=v,S.isUndefined=m,S.isRegExp=E,S.isObject=a,S.isDate=x,S.isError=O,S.isFunction=A,S.isPrimitive=D,S.isBuffer=w("./support/isBuffer");var J=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];S.log=function(){console.log("%s - %s",K(),S.format.apply(S,arguments))},S.inherits=w("inherits"),S._extend=function(B,Q){if(!Q||!a(Q))return B;for(var ie=Object.keys(Q),oe=ie.length;oe--;)B[ie[oe]]=Q[ie[oe]];return B}}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(w,P,S){"use strict";(function(){S.stripBOM=function(C){return C[0]==="\uFEFF"?C.substring(1):C}}).call(void 0)},{}],209:[function(w,P,S){"use strict";function C(d){return d&&d.__esModule?d:{default:d}}var T=w("babel-runtime/helpers/typeof"),l=C(T),p=w("babel-runtime/core-js/object/keys"),h=C(p);(function(){var d,o,c,s,f,i={}.hasOwnProperty;d=w("xmlbuilder"),o=w("./defaults").defaults,s=function(n){return typeof n=="string"&&(n.indexOf("&")>=0||n.indexOf(">")>=0||n.indexOf("<")>=0)},f=function(n){return"<![CDATA["+c(n)+"]]>"},c=function(n){return n.replace("]]>","]]]]><![CDATA[>")},S.Builder=function(){function n(t){var u,y,g;this.options={},y=o[.2];for(u in y)i.call(y,u)&&(g=y[u],this.options[u]=g);for(u in t)i.call(t,u)&&(g=t[u],this.options[u]=g)}return n.prototype.buildObject=function(t){var u,y,g,_,b;return u=this.options.attrkey,y=this.options.charkey,(0,h.default)(t).length===1&&this.options.rootName===o[.2].rootName?(b=(0,h.default)(t)[0],t=t[b]):b=this.options.rootName,g=function(v){return function(m,E){var a,x,O,A,D,I;if((E===void 0?"undefined":(0,l.default)(E))!=="object")v.options.cdata&&s(E)?m.raw(f(E)):m.txt(E);else if(Array.isArray(E)){for(A in E)if(i.call(E,A)){x=E[A];for(D in x)O=x[D],m=g(m.ele(D),O).up()}}else for(D in E)if(i.call(E,D))if(x=E[D],D===u){if((x===void 0?"undefined":(0,l.default)(x))==="object")for(a in x)I=x[a],m=m.att(a,I)}else if(D===y)m=v.options.cdata&&s(x)?m.raw(f(x)):m.txt(x);else if(Array.isArray(x))for(A in x)i.call(x,A)&&(O=x[A],m=typeof O=="string"?v.options.cdata&&s(O)?m.ele(D).raw(f(O)).up():m.ele(D,O).up():g(m.ele(D),O).up());else(x===void 0?"undefined":(0,l.default)(x))==="object"?m=g(m.ele(D),x).up():typeof x=="string"&&v.options.cdata&&s(x)?m=m.ele(D).raw(f(x)).up():(x==null&&(x=""),m=m.ele(D,x.toString()).up());return m}}(this),_=d.create(b,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),g(_,t).end(this.options.renderOpts)},n}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(w,P,S){"use strict";(function(){S.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],211:[function(w,P,S){"use strict";function C(c){return c&&c.__esModule?c:{default:c}}var T=w("babel-runtime/core-js/object/get-own-property-names"),l=C(T),p=w("babel-runtime/core-js/object/keys"),h=C(p),d=w("babel-runtime/helpers/typeof"),o=C(d);(function(){var c,s,f,i,n,t,u,y,g=function(v,m){return function(){return v.apply(m,arguments)}},_=function(v,m){function E(){this.constructor=v}for(var a in m)b.call(m,a)&&(v[a]=m[a]);return E.prototype=m.prototype,v.prototype=new E,v.__super__=m.prototype,v},b={}.hasOwnProperty;u=w("sax"),f=w("events"),c=w("./bom"),t=w("./processors"),y=w("timers").setImmediate,s=w("./defaults").defaults,i=function(v){return(v===void 0?"undefined":(0,o.default)(v))==="object"&&v!=null&&(0,h.default)(v).length===0},n=function(v,m,E){var a,x,O;for(a=0,x=v.length;a<x;a++)O=v[a],m=O(m,E);return m},S.Parser=function(v){function m(E){this.parseString=g(this.parseString,this),this.reset=g(this.reset,this),this.assignOrPush=g(this.assignOrPush,this),this.processAsync=g(this.processAsync,this);var a,x,O;if(!(this instanceof S.Parser))return new S.Parser(E);this.options={},x=s[.2];for(a in x)b.call(x,a)&&(O=x[a],this.options[a]=O);for(a in E)b.call(E,a)&&(O=E[a],this.options[a]=O);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(t.normalize)),this.reset()}return _(m,v),m.prototype.processAsync=function(){var E,a;try{return this.remaining.length<=this.options.chunkSize?(E=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(E),this.saxParser.close()):(E=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(E),y(this.processAsync))}catch(x){if(a=x,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(a)}},m.prototype.assignOrPush=function(E,a,x){return a in E?(E[a]instanceof Array||(E[a]=[E[a]]),E[a].push(x)):this.options.explicitArray?E[a]=[x]:E[a]=x},m.prototype.reset=function(){var E,a,x,O;return this.removeAllListeners(),this.saxParser=u.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(A){return function(D){if(A.saxParser.resume(),!A.saxParser.errThrown)return A.saxParser.errThrown=!0,A.emit("error",D)}}(this),this.saxParser.onend=function(A){return function(){if(!A.saxParser.ended)return A.saxParser.ended=!0,A.emit("end",A.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,O=[],E=this.options.attrkey,a=this.options.charkey,this.saxParser.onopentag=function(A){return function(D){var I,F,K,ne,j;if(K={},K[a]="",!A.options.ignoreAttrs){j=D.attributes;for(I in j)b.call(j,I)&&(E in K||A.options.mergeAttrs||(K[E]={}),F=A.options.attrValueProcessors?n(A.options.attrValueProcessors,D.attributes[I],I):D.attributes[I],ne=A.options.attrNameProcessors?n(A.options.attrNameProcessors,I):I,A.options.mergeAttrs?A.assignOrPush(K,ne,F):K[E][ne]=F)}return K["#name"]=A.options.tagNameProcessors?n(A.options.tagNameProcessors,D.name):D.name,A.options.xmlns&&(K[A.options.xmlnskey]={uri:D.uri,local:D.local}),O.push(K)}}(this),this.saxParser.onclosetag=function(A){return function(){var D,I,F,K,ne,j,G,X,J,B;if(j=O.pop(),ne=j["#name"],A.options.explicitChildren&&A.options.preserveChildrenOrder||delete j["#name"],j.cdata===!0&&(D=j.cdata,delete j.cdata),J=O[O.length-1],j[a].match(/^\s*$/)&&!D?(I=j[a],delete j[a]):(A.options.trim&&(j[a]=j[a].trim()),A.options.normalize&&(j[a]=j[a].replace(/\s{2,}/g," ").trim()),j[a]=A.options.valueProcessors?n(A.options.valueProcessors,j[a],ne):j[a],(0,h.default)(j).length===1&&a in j&&!A.EXPLICIT_CHARKEY&&(j=j[a])),i(j)&&(j=A.options.emptyTag!==""?A.options.emptyTag:I),A.options.validator!=null&&(B="/"+function(){var Q,ie,oe;for(oe=[],Q=0,ie=O.length;Q<ie;Q++)K=O[Q],oe.push(K["#name"]);return oe}().concat(ne).join("/"),function(){var Q;try{j=A.options.validator(B,J&&J[ne],j)}catch(ie){return Q=ie,A.emit("error",Q)}}()),A.options.explicitChildren&&!A.options.mergeAttrs&&(j===void 0?"undefined":(0,o.default)(j))==="object")if(A.options.preserveChildrenOrder){if(J){J[A.options.childkey]=J[A.options.childkey]||[],G={};for(F in j)b.call(j,F)&&(G[F]=j[F]);J[A.options.childkey].push(G),delete j["#name"],(0,h.default)(j).length===1&&a in j&&!A.EXPLICIT_CHARKEY&&(j=j[a])}}else K={},A.options.attrkey in j&&(K[A.options.attrkey]=j[A.options.attrkey],delete j[A.options.attrkey]),!A.options.charsAsChildren&&A.options.charkey in j&&(K[A.options.charkey]=j[A.options.charkey],delete j[A.options.charkey]),(0,l.default)(j).length>0&&(K[A.options.childkey]=j),j=K;return O.length>0?A.assignOrPush(J,ne,j):(A.options.explicitRoot&&(X=j,j={},j[ne]=X),A.resultObject=j,A.saxParser.ended=!0,A.emit("end",A.resultObject))}}(this),x=function(A){return function(D){var I,F;if(F=O[O.length-1])return F[a]+=D,A.options.explicitChildren&&A.options.preserveChildrenOrder&&A.options.charsAsChildren&&(A.options.includeWhiteChars||D.replace(/\\n/g,"").trim()!=="")&&(F[A.options.childkey]=F[A.options.childkey]||[],I={"#name":"__text__"},I[a]=D,A.options.normalize&&(I[a]=I[a].replace(/\s{2,}/g," ").trim()),F[A.options.childkey].push(I)),F}}(this),this.saxParser.ontext=x,this.saxParser.oncdata=function(A){return function(D){var I;if(I=x(D))return I.cdata=!0}}()},m.prototype.parseString=function(E,a){var x;a!=null&&typeof a=="function"&&(this.on("end",function(O){return this.reset(),a(null,O)}),this.on("error",function(O){return this.reset(),a(O)}));try{return E=E.toString(),E.trim()===""?(this.emit("end",null),!0):(E=c.stripBOM(E),this.options.async?(this.remaining=E,y(this.processAsync),this.saxParser):this.saxParser.write(E).close())}catch(O){if(x=O,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",x),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw x}},m}(f.EventEmitter),S.parseString=function(v,m,E){var a,x,O;return E!=null?(typeof E=="function"&&(a=E),(m===void 0?"undefined":(0,o.default)(m))==="object"&&(x=m)):(typeof m=="function"&&(a=m),x={}),O=new S.Parser(x),O.parseString(v,a)}}).call(void 0)},{"./bom":208,"./defaults":210,"./processors":212,"babel-runtime/core-js/object/get-own-property-names":21,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,events:158,sax:194,timers:201}],212:[function(w,P,S){"use strict";(function(){var C;C=new RegExp(/(?!xmlns)^.*:/),S.normalize=function(T){return T.toLowerCase()},S.firstCharLowerCase=function(T){return T.charAt(0).toLowerCase()+T.slice(1)},S.stripPrefix=function(T){return T.replace(C,"")},S.parseNumbers=function(T){return isNaN(T)||(T=T%1==0?parseInt(T,10):parseFloat(T)),T},S.parseBooleans=function(T){return/^(?:true|false)$/i.test(T)&&(T=T.toLowerCase()==="true"),T}}).call(void 0)},{}],213:[function(w,P,S){"use strict";(function(){var C,T,l,p,h=function(o,c){function s(){this.constructor=o}for(var f in c)d.call(c,f)&&(o[f]=c[f]);return s.prototype=c.prototype,o.prototype=new s,o.__super__=c.prototype,o},d={}.hasOwnProperty;T=w("./defaults"),C=w("./builder"),l=w("./parser"),p=w("./processors"),S.defaults=T.defaults,S.processors=p,S.ValidationError=function(o){function c(s){this.message=s}return h(c,o),c}(Error),S.Builder=C.Builder,S.Parser=l.Parser,S.parseString=l.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(w,P,S){"use strict";function C(c){return c&&c.__esModule?c:{default:c}}var T=w("babel-runtime/core-js/object/get-prototype-of"),l=C(T),p=w("babel-runtime/helpers/typeof"),h=C(p),d=w("babel-runtime/core-js/object/assign"),o=C(d);(function(){var c,s,f,i,n,t,u=[].slice,y={}.hasOwnProperty;c=function(){var g,_,b,v,m,E;if(E=arguments[0],m=2<=arguments.length?u.call(arguments,1):[],i(o.default))o.default.apply(null,arguments);else for(g=0,b=m.length;g<b;g++)if((v=m[g])!=null)for(_ in v)y.call(v,_)&&(E[_]=v[_]);return E},i=function(g){return!!g&&Object.prototype.toString.call(g)==="[object Function]"},n=function(g){var _;return!!g&&((_=g===void 0?"undefined":(0,h.default)(g))==="function"||_==="object")},s=function(g){return i(Array.isArray)?Array.isArray(g):Object.prototype.toString.call(g)==="[object Array]"},f=function(g){var _;if(s(g))return!g.length;for(_ in g)if(y.call(g,_))return!1;return!0},t=function(g){var _,b;return n(g)&&(b=(0,l.default)(g))&&(_=b.constructor)&&typeof _=="function"&&_ instanceof _&&Function.prototype.toString.call(_)===Function.prototype.toString.call(Object)},P.exports.assign=c,P.exports.isFunction=i,P.exports.isObject=n,P.exports.isArray=s,P.exports.isEmpty=f,P.exports.isPlainObject=t}).call(void 0)},{"babel-runtime/core-js/object/assign":18,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/helpers/typeof":32}],215:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(C);(function(){P.exports=function(){function l(p,h,d){if(this.options=p.options,this.stringify=p.stringify,h==null)throw new Error("Missing attribute name of element "+p.name);if(d==null)throw new Error("Missing attribute value for attribute "+h+" of element "+p.name);this.name=this.stringify.attName(h),this.value=this.stringify.attValue(d)}return l.prototype.clone=function(){return(0,T.default)(this)},l.prototype.toString=function(p){return this.options.writer.set(p).attribute(this)},l}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(C);(function(){var l,p=function(d,o){function c(){this.constructor=d}for(var s in o)h.call(o,s)&&(d[s]=o[s]);return c.prototype=o.prototype,d.prototype=new c,d.__super__=o.prototype,d},h={}.hasOwnProperty;l=w("./XMLNode"),P.exports=function(d){function o(c,s){if(o.__super__.constructor.call(this,c),s==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(s)}return p(o,d),o.prototype.clone=function(){return(0,T.default)(this)},o.prototype.toString=function(c){return this.options.writer.set(c).cdata(this)},o}(l)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(C);(function(){var l,p=function(d,o){function c(){this.constructor=d}for(var s in o)h.call(o,s)&&(d[s]=o[s]);return c.prototype=o.prototype,d.prototype=new c,d.__super__=o.prototype,d},h={}.hasOwnProperty;l=w("./XMLNode"),P.exports=function(d){function o(c,s){if(o.__super__.constructor.call(this,c),s==null)throw new Error("Missing comment text");this.text=this.stringify.comment(s)}return p(o,d),o.prototype.clone=function(){return(0,T.default)(this)},o.prototype.toString=function(c){return this.options.writer.set(c).comment(this)},o}(l)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(w,P,S){"use strict";(function(){var C,T=function(p,h){function d(){this.constructor=p}for(var o in h)l.call(h,o)&&(p[o]=h[o]);return d.prototype=h.prototype,p.prototype=new d,p.__super__=h.prototype,p},l={}.hasOwnProperty;C=w("./XMLNode"),P.exports=function(p){function h(d,o,c,s,f,i){if(h.__super__.constructor.call(this,d),o==null)throw new Error("Missing DTD element name");if(c==null)throw new Error("Missing DTD attribute name");if(!s)throw new Error("Missing DTD attribute type");if(!f)throw new Error("Missing DTD attribute default");if(f.indexOf("#")!==0&&(f="#"+f),!f.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(i&&!f.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(o),this.attributeName=this.stringify.attName(c),this.attributeType=this.stringify.dtdAttType(s),this.defaultValue=this.stringify.dtdAttDefault(i),this.defaultValueType=f}return T(h,p),h.prototype.toString=function(d){return this.options.writer.set(d).dtdAttList(this)},h}(C)}).call(void 0)},{"./XMLNode":227}],219:[function(w,P,S){"use strict";(function(){var C,T=function(p,h){function d(){this.constructor=p}for(var o in h)l.call(h,o)&&(p[o]=h[o]);return d.prototype=h.prototype,p.prototype=new d,p.__super__=h.prototype,p},l={}.hasOwnProperty;C=w("./XMLNode"),P.exports=function(p){function h(d,o,c){if(h.__super__.constructor.call(this,d),o==null)throw new Error("Missing DTD element name");c||(c="(#PCDATA)"),Array.isArray(c)&&(c="("+c.join(",")+")"),this.name=this.stringify.eleName(o),this.value=this.stringify.dtdElementValue(c)}return T(h,p),h.prototype.toString=function(d){return this.options.writer.set(d).dtdElement(this)},h}(C)}).call(void 0)},{"./XMLNode":227}],220:[function(w,P,S){"use strict";(function(){var C,T,l=function(h,d){function o(){this.constructor=h}for(var c in d)p.call(d,c)&&(h[c]=d[c]);return o.prototype=d.prototype,h.prototype=new o,h.__super__=d.prototype,h},p={}.hasOwnProperty;T=w("./Utility").isObject,C=w("./XMLNode"),P.exports=function(h){function d(o,c,s,f){if(d.__super__.constructor.call(this,o),s==null)throw new Error("Missing entity name");if(f==null)throw new Error("Missing entity value");if(this.pe=!!c,this.name=this.stringify.eleName(s),T(f)){if(!f.pubID&&!f.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(f.pubID&&!f.sysID)throw new Error("System identifier is required for a public external entity");if(f.pubID!=null&&(this.pubID=this.stringify.dtdPubID(f.pubID)),f.sysID!=null&&(this.sysID=this.stringify.dtdSysID(f.sysID)),f.nData!=null&&(this.nData=this.stringify.dtdNData(f.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(f)}return l(d,h),d.prototype.toString=function(o){return this.options.writer.set(o).dtdEntity(this)},d}(C)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(w,P,S){"use strict";(function(){var C,T=function(p,h){function d(){this.constructor=p}for(var o in h)l.call(h,o)&&(p[o]=h[o]);return d.prototype=h.prototype,p.prototype=new d,p.__super__=h.prototype,p},l={}.hasOwnProperty;C=w("./XMLNode"),P.exports=function(p){function h(d,o,c){if(h.__super__.constructor.call(this,d),o==null)throw new Error("Missing notation name");if(!c.pubID&&!c.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(o),c.pubID!=null&&(this.pubID=this.stringify.dtdPubID(c.pubID)),c.sysID!=null&&(this.sysID=this.stringify.dtdSysID(c.sysID))}return T(h,p),h.prototype.toString=function(d){return this.options.writer.set(d).dtdNotation(this)},h}(C)}).call(void 0)},{"./XMLNode":227}],222:[function(w,P,S){"use strict";(function(){var C,T,l=function(h,d){function o(){this.constructor=h}for(var c in d)p.call(d,c)&&(h[c]=d[c]);return o.prototype=d.prototype,h.prototype=new o,h.__super__=d.prototype,h},p={}.hasOwnProperty;T=w("./Utility").isObject,C=w("./XMLNode"),P.exports=function(h){function d(o,c,s,f){var i;d.__super__.constructor.call(this,o),T(c)&&(i=c,c=i.version,s=i.encoding,f=i.standalone),c||(c="1.0"),this.version=this.stringify.xmlVersion(c),s!=null&&(this.encoding=this.stringify.xmlEncoding(s)),f!=null&&(this.standalone=this.stringify.xmlStandalone(f))}return l(d,h),d.prototype.toString=function(o){return this.options.writer.set(o).declaration(this)},d}(C)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(w,P,S){"use strict";(function(){var C,T,l,p,h,d,o=function(s,f){function i(){this.constructor=s}for(var n in f)c.call(f,n)&&(s[n]=f[n]);return i.prototype=f.prototype,s.prototype=new i,s.__super__=f.prototype,s},c={}.hasOwnProperty;d=w("./Utility").isObject,h=w("./XMLNode"),C=w("./XMLDTDAttList"),l=w("./XMLDTDEntity"),T=w("./XMLDTDElement"),p=w("./XMLDTDNotation"),P.exports=function(s){function f(i,n,t){var u,y;f.__super__.constructor.call(this,i),this.documentObject=i,d(n)&&(u=n,n=u.pubID,t=u.sysID),t==null&&(y=[n,t],t=y[0],n=y[1]),n!=null&&(this.pubID=this.stringify.dtdPubID(n)),t!=null&&(this.sysID=this.stringify.dtdSysID(t))}return o(f,s),f.prototype.element=function(i,n){var t;return t=new T(this,i,n),this.children.push(t),this},f.prototype.attList=function(i,n,t,u,y){var g;return g=new C(this,i,n,t,u,y),this.children.push(g),this},f.prototype.entity=function(i,n){var t;return t=new l(this,!1,i,n),this.children.push(t),this},f.prototype.pEntity=function(i,n){var t;return t=new l(this,!0,i,n),this.children.push(t),this},f.prototype.notation=function(i,n){var t;return t=new p(this,i,n),this.children.push(t),this},f.prototype.toString=function(i){return this.options.writer.set(i).docType(this)},f.prototype.ele=function(i,n){return this.element(i,n)},f.prototype.att=function(i,n,t,u,y){return this.attList(i,n,t,u,y)},f.prototype.ent=function(i,n){return this.entity(i,n)},f.prototype.pent=function(i,n){return this.pEntity(i,n)},f.prototype.not=function(i,n){return this.notation(i,n)},f.prototype.up=function(){return this.root()||this.documentObject},f}(h)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(w,P,S){"use strict";(function(){var C,T,l,p,h=function(o,c){function s(){this.constructor=o}for(var f in c)d.call(c,f)&&(o[f]=c[f]);return s.prototype=c.prototype,o.prototype=new s,o.__super__=c.prototype,o},d={}.hasOwnProperty;p=w("./Utility").isPlainObject,C=w("./XMLNode"),l=w("./XMLStringifier"),T=w("./XMLStringWriter"),P.exports=function(o){function c(s){c.__super__.constructor.call(this,null),s||(s={}),s.writer||(s.writer=new T),this.options=s,this.stringify=new l(s),this.isDocument=!0}return h(c,o),c.prototype.end=function(s){var f;return s?p(s)&&(f=s,s=this.options.writer.set(f)):s=this.options.writer,s.document(this)},c.prototype.toString=function(s){return this.options.writer.set(s).document(this)},c}(C)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(w,P,S){"use strict";(function(){var C,T,l,p,h,d,o,c,s,f,i,n,t,u,y,g,_,b,v,m={}.hasOwnProperty;v=w("./Utility"),_=v.isObject,g=v.isFunction,b=v.isPlainObject,f=w("./XMLElement"),T=w("./XMLCData"),l=w("./XMLComment"),n=w("./XMLRaw"),y=w("./XMLText"),i=w("./XMLProcessingInstruction"),c=w("./XMLDeclaration"),s=w("./XMLDocType"),p=w("./XMLDTDAttList"),d=w("./XMLDTDEntity"),h=w("./XMLDTDElement"),o=w("./XMLDTDNotation"),C=w("./XMLAttribute"),u=w("./XMLStringifier"),t=w("./XMLStringWriter"),P.exports=function(){function E(a,x,O){var A;a||(a={}),a.writer?b(a.writer)&&(A=a.writer,a.writer=new t(A)):a.writer=new t(a),this.options=a,this.writer=a.writer,this.stringify=new u(a),this.onDataCallback=x||function(){},this.onEndCallback=O||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return E.prototype.node=function(a,x,O){var A;if(a==null)throw new Error("Missing node name");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),a=a.valueOf(),x==null&&(x={}),x=x.valueOf(),_(x)||(A=[x,O],O=A[0],x=A[1]),this.currentNode=new f(this,a,x),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,O!=null&&this.text(O),this},E.prototype.element=function(a,x,O){return this.currentNode&&this.currentNode instanceof s?this.dtdElement.apply(this,arguments):this.node(a,x,O)},E.prototype.attribute=function(a,x){var O,A;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(a!=null&&(a=a.valueOf()),_(a))for(O in a)m.call(a,O)&&(A=a[O],this.attribute(O,A));else g(x)&&(x=x.apply()),this.options.skipNullAttributes&&x==null||(this.currentNode.attributes[a]=new C(this,a,x));return this},E.prototype.text=function(a){var x;return this.openCurrent(),x=new y(this,a),this.onData(this.writer.text(x,this.currentLevel+1)),this},E.prototype.cdata=function(a){var x;return this.openCurrent(),x=new T(this,a),this.onData(this.writer.cdata(x,this.currentLevel+1)),this},E.prototype.comment=function(a){var x;return this.openCurrent(),x=new l(this,a),this.onData(this.writer.comment(x,this.currentLevel+1)),this},E.prototype.raw=function(a){var x;return this.openCurrent(),x=new n(this,a),this.onData(this.writer.raw(x,this.currentLevel+1)),this},E.prototype.instruction=function(a,x){var O,A,D,I,F;if(this.openCurrent(),a!=null&&(a=a.valueOf()),x!=null&&(x=x.valueOf()),Array.isArray(a))for(O=0,I=a.length;O<I;O++)A=a[O],this.instruction(A);else if(_(a))for(A in a)m.call(a,A)&&(D=a[A],this.instruction(A,D));else g(x)&&(x=x.apply()),F=new i(this,a,x),this.onData(this.writer.processingInstruction(F,this.currentLevel+1));return this},E.prototype.declaration=function(a,x,O){var A;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return A=new c(this,a,x,O),this.onData(this.writer.declaration(A,this.currentLevel+1)),this},E.prototype.doctype=function(a,x,O){if(this.openCurrent(),a==null)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new s(this,x,O),this.currentNode.rootNodeName=a,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},E.prototype.dtdElement=function(a,x){var O;return this.openCurrent(),O=new h(this,a,x),this.onData(this.writer.dtdElement(O,this.currentLevel+1)),this},E.prototype.attList=function(a,x,O,A,D){var I;return this.openCurrent(),I=new p(this,a,x,O,A,D),this.onData(this.writer.dtdAttList(I,this.currentLevel+1)),this},E.prototype.entity=function(a,x){var O;return this.openCurrent(),O=new d(this,!1,a,x),this.onData(this.writer.dtdEntity(O,this.currentLevel+1)),this},E.prototype.pEntity=function(a,x){var O;return this.openCurrent(),O=new d(this,!0,a,x),this.onData(this.writer.dtdEntity(O,this.currentLevel+1)),this},E.prototype.notation=function(a,x){var O;return this.openCurrent(),O=new o(this,a,x),this.onData(this.writer.dtdNotation(O,this.currentLevel+1)),this},E.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},E.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},E.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},E.prototype.openNode=function(a){if(!a.isOpen)return!this.root&&this.currentLevel===0&&a instanceof f&&(this.root=a),this.onData(this.writer.openNode(a,this.currentLevel)),a.isOpen=!0},E.prototype.closeNode=function(a){if(!a.isClosed)return this.onData(this.writer.closeNode(a,this.currentLevel)),a.isClosed=!0},E.prototype.onData=function(a){return this.documentStarted=!0,this.onDataCallback(a)},E.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},E.prototype.ele=function(){return this.element.apply(this,arguments)},E.prototype.nod=function(a,x,O){return this.node(a,x,O)},E.prototype.txt=function(a){return this.text(a)},E.prototype.dat=function(a){return this.cdata(a)},E.prototype.com=function(a){return this.comment(a)},E.prototype.ins=function(a,x){return this.instruction(a,x)},E.prototype.dec=function(a,x,O){return this.declaration(a,x,O)},E.prototype.dtd=function(a,x,O){return this.doctype(a,x,O)},E.prototype.e=function(a,x,O){return this.element(a,x,O)},E.prototype.n=function(a,x,O){return this.node(a,x,O)},E.prototype.t=function(a){return this.text(a)},E.prototype.d=function(a){return this.cdata(a)},E.prototype.c=function(a){return this.comment(a)},E.prototype.r=function(a){return this.raw(a)},E.prototype.i=function(a,x){return this.instruction(a,x)},E.prototype.att=function(){return this.currentNode&&this.currentNode instanceof s?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},E.prototype.a=function(){return this.currentNode&&this.currentNode instanceof s?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},E.prototype.ent=function(a,x){return this.entity(a,x)},E.prototype.pent=function(a,x){return this.pEntity(a,x)},E.prototype.not=function(a,x){return this.notation(a,x)},E}()}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLStringWriter":231,"./XMLStringifier":232,"./XMLText":233}],226:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(C);(function(){var l,p,h,d,o,c=function(f,i){function n(){this.constructor=f}for(var t in i)s.call(i,t)&&(f[t]=i[t]);return n.prototype=i.prototype,f.prototype=new n,f.__super__=i.prototype,f},s={}.hasOwnProperty;o=w("./Utility"),d=o.isObject,h=o.isFunction,p=w("./XMLNode"),l=w("./XMLAttribute"),P.exports=function(f){function i(n,t,u){if(i.__super__.constructor.call(this,n),t==null)throw new Error("Missing element name");this.name=this.stringify.eleName(t),this.attributes={},u!=null&&this.attribute(u),n.isDocument&&(this.isRoot=!0,this.documentObject=n,n.rootObject=this)}return c(i,f),i.prototype.clone=function(){var n,t,u,y;u=(0,T.default)(this),u.isRoot&&(u.documentObject=null),u.attributes={},y=this.attributes;for(t in y)s.call(y,t)&&(n=y[t],u.attributes[t]=n.clone());return u.children=[],this.children.forEach(function(g){var _;return _=g.clone(),_.parent=u,u.children.push(_)}),u},i.prototype.attribute=function(n,t){var u,y;if(n!=null&&(n=n.valueOf()),d(n))for(u in n)s.call(n,u)&&(y=n[u],this.attribute(u,y));else h(t)&&(t=t.apply()),this.options.skipNullAttributes&&t==null||(this.attributes[n]=new l(this,n,t));return this},i.prototype.removeAttribute=function(n){var t,u,y;if(n==null)throw new Error("Missing attribute name");if(n=n.valueOf(),Array.isArray(n))for(u=0,y=n.length;u<y;u++)t=n[u],delete this.attributes[t];else delete this.attributes[n];return this},i.prototype.toString=function(n){return this.options.writer.set(n).element(this)},i.prototype.att=function(n,t){return this.attribute(n,t)},i.prototype.a=function(n,t){return this.attribute(n,t)},i}(p)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(w,P,S){"use strict";(function(){var C,T,l,p,h,d,o,c,s,f,i,n,t={}.hasOwnProperty;n=w("./Utility"),i=n.isObject,f=n.isFunction,s=n.isEmpty,h=null,C=null,T=null,l=null,p=null,o=null,c=null,d=null,P.exports=function(){function u(y){this.parent=y,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],h||(h=w("./XMLElement"),C=w("./XMLCData"),T=w("./XMLComment"),l=w("./XMLDeclaration"),p=w("./XMLDocType"),o=w("./XMLRaw"),c=w("./XMLText"),d=w("./XMLProcessingInstruction"))}return u.prototype.element=function(y,g,_){var b,v,m,E,a,x,O,A,D,I;if(x=null,g==null&&(g={}),g=g.valueOf(),i(g)||(D=[g,_],_=D[0],g=D[1]),y!=null&&(y=y.valueOf()),Array.isArray(y))for(m=0,O=y.length;m<O;m++)v=y[m],x=this.element(v);else if(f(y))x=this.element(y.apply());else if(i(y)){for(a in y)if(t.call(y,a))if(I=y[a],f(I)&&(I=I.apply()),i(I)&&s(I)&&(I=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&a.indexOf(this.stringify.convertAttKey)===0)x=this.attribute(a.substr(this.stringify.convertAttKey.length),I);else if(!this.options.separateArrayItems&&Array.isArray(I))for(E=0,A=I.length;E<A;E++)v=I[E],b={},b[a]=v,x=this.element(b);else i(I)?(x=this.element(a),x.element(I)):x=this.element(a,I)}else x=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&y.indexOf(this.stringify.convertTextKey)===0?this.text(_):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&y.indexOf(this.stringify.convertCDataKey)===0?this.cdata(_):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&y.indexOf(this.stringify.convertCommentKey)===0?this.comment(_):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&y.indexOf(this.stringify.convertRawKey)===0?this.raw(_):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&y.indexOf(this.stringify.convertPIKey)===0?this.instruction(y.substr(this.stringify.convertPIKey.length),_):this.node(y,g,_);if(x==null)throw new Error("Could not create any elements with: "+y);return x},u.prototype.insertBefore=function(y,g,_){var b,v,m;if(this.isRoot)throw new Error("Cannot insert elements at root level");return v=this.parent.children.indexOf(this),m=this.parent.children.splice(v),b=this.parent.element(y,g,_),Array.prototype.push.apply(this.parent.children,m),b},u.prototype.insertAfter=function(y,g,_){var b,v,m;if(this.isRoot)throw new Error("Cannot insert elements at root level");return v=this.parent.children.indexOf(this),m=this.parent.children.splice(v+1),b=this.parent.element(y,g,_),Array.prototype.push.apply(this.parent.children,m),b},u.prototype.remove=function(){var y;if(this.isRoot)throw new Error("Cannot remove the root element");return y=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[y,y-y+1].concat([])),this.parent},u.prototype.node=function(y,g,_){var b,v;return y!=null&&(y=y.valueOf()),g||(g={}),g=g.valueOf(),i(g)||(v=[g,_],_=v[0],g=v[1]),b=new h(this,y,g),_!=null&&b.text(_),this.children.push(b),b},u.prototype.text=function(y){var g;return g=new c(this,y),this.children.push(g),this},u.prototype.cdata=function(y){var g;return g=new C(this,y),this.children.push(g),this},u.prototype.comment=function(y){var g;return g=new T(this,y),this.children.push(g),this},u.prototype.commentBefore=function(y){var g,_;return g=this.parent.children.indexOf(this),_=this.parent.children.splice(g),this.parent.comment(y),Array.prototype.push.apply(this.parent.children,_),this},u.prototype.commentAfter=function(y){var g,_;return g=this.parent.children.indexOf(this),_=this.parent.children.splice(g+1),this.parent.comment(y),Array.prototype.push.apply(this.parent.children,_),this},u.prototype.raw=function(y){var g;return g=new o(this,y),this.children.push(g),this},u.prototype.instruction=function(y,g){var _,b,v,m,E;if(y!=null&&(y=y.valueOf()),g!=null&&(g=g.valueOf()),Array.isArray(y))for(m=0,E=y.length;m<E;m++)_=y[m],this.instruction(_);else if(i(y))for(_ in y)t.call(y,_)&&(b=y[_],this.instruction(_,b));else f(g)&&(g=g.apply()),v=new d(this,y,g),this.children.push(v);return this},u.prototype.instructionBefore=function(y,g){var _,b;return _=this.parent.children.indexOf(this),b=this.parent.children.splice(_),this.parent.instruction(y,g),Array.prototype.push.apply(this.parent.children,b),this},u.prototype.instructionAfter=function(y,g){var _,b;return _=this.parent.children.indexOf(this),b=this.parent.children.splice(_+1),this.parent.instruction(y,g),Array.prototype.push.apply(this.parent.children,b),this},u.prototype.declaration=function(y,g,_){var b,v;return b=this.document(),v=new l(b,y,g,_),b.children[0]instanceof l?b.children[0]=v:b.children.unshift(v),b.root()||b},u.prototype.doctype=function(y,g){var _,b,v,m,E,a,x,O,A,D;for(b=this.document(),v=new p(b,y,g),A=b.children,m=E=0,x=A.length;E<x;m=++E)if((_=A[m])instanceof p)return b.children[m]=v,v;for(D=b.children,m=a=0,O=D.length;a<O;m=++a)if(_=D[m],_.isRoot)return b.children.splice(m,0,v),v;return b.children.push(v),v},u.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},u.prototype.root=function(){var y;for(y=this;y;){if(y.isDocument)return y.rootObject;if(y.isRoot)return y;y=y.parent}},u.prototype.document=function(){var y;for(y=this;y;){if(y.isDocument)return y;y=y.parent}},u.prototype.end=function(y){return this.document().end(y)},u.prototype.prev=function(){var y;if((y=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[y-1]},u.prototype.next=function(){var y;if((y=this.parent.children.indexOf(this))===-1||y===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[y+1]},u.prototype.importDocument=function(y){var g;return g=y.root().clone(),g.parent=this,g.isRoot=!1,this.children.push(g),this},u.prototype.ele=function(y,g,_){return this.element(y,g,_)},u.prototype.nod=function(y,g,_){return this.node(y,g,_)},u.prototype.txt=function(y){return this.text(y)},u.prototype.dat=function(y){return this.cdata(y)},u.prototype.com=function(y){return this.comment(y)},u.prototype.ins=function(y,g){return this.instruction(y,g)},u.prototype.doc=function(){return this.document()},u.prototype.dec=function(y,g,_){return this.declaration(y,g,_)},u.prototype.dtd=function(y,g){return this.doctype(y,g)},u.prototype.e=function(y,g,_){return this.element(y,g,_)},u.prototype.n=function(y,g,_){return this.node(y,g,_)},u.prototype.t=function(y){return this.text(y)},u.prototype.d=function(y){return this.cdata(y)},u.prototype.c=function(y){return this.comment(y)},u.prototype.r=function(y){return this.raw(y)},u.prototype.i=function(y,g){return this.instruction(y,g)},u.prototype.u=function(){return this.up()},u.prototype.importXMLBuilder=function(y){return this.importDocument(y)},u}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(C);(function(){var l,p=function(d,o){function c(){this.constructor=d}for(var s in o)h.call(o,s)&&(d[s]=o[s]);return c.prototype=o.prototype,d.prototype=new c,d.__super__=o.prototype,d},h={}.hasOwnProperty;l=w("./XMLNode"),P.exports=function(d){function o(c,s,f){if(o.__super__.constructor.call(this,c),s==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(s),f&&(this.value=this.stringify.insValue(f))}return p(o,d),o.prototype.clone=function(){return(0,T.default)(this)},o.prototype.toString=function(c){return this.options.writer.set(c).processingInstruction(this)},o}(l)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(C);(function(){var l,p=function(d,o){function c(){this.constructor=d}for(var s in o)h.call(o,s)&&(d[s]=o[s]);return c.prototype=o.prototype,d.prototype=new c,d.__super__=o.prototype,d},h={}.hasOwnProperty;l=w("./XMLNode"),P.exports=function(d){function o(c,s){if(o.__super__.constructor.call(this,c),s==null)throw new Error("Missing raw text");this.value=this.stringify.raw(s)}return p(o,d),o.prototype.clone=function(){return(0,T.default)(this)},o.prototype.toString=function(c){return this.options.writer.set(c).raw(this)},o}(l)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(w,P,S){"use strict";(function(){var C,T,l,p,h,d,o,c,s,f,i,n,t,u=function(g,_){function b(){this.constructor=g}for(var v in _)y.call(_,v)&&(g[v]=_[v]);return b.prototype=_.prototype,g.prototype=new b,g.__super__=_.prototype,g},y={}.hasOwnProperty;o=w("./XMLDeclaration"),c=w("./XMLDocType"),C=w("./XMLCData"),T=w("./XMLComment"),s=w("./XMLElement"),i=w("./XMLRaw"),n=w("./XMLText"),f=w("./XMLProcessingInstruction"),l=w("./XMLDTDAttList"),p=w("./XMLDTDElement"),h=w("./XMLDTDEntity"),d=w("./XMLDTDNotation"),t=w("./XMLWriterBase"),P.exports=function(g){function _(b,v){_.__super__.constructor.call(this,v),this.stream=b}return u(_,g),_.prototype.document=function(b){var v,m,E,a,x,O,A,D;for(O=b.children,m=0,a=O.length;m<a;m++)v=O[m],v.isLastRootNode=!1;for(b.children[b.children.length-1].isLastRootNode=!0,A=b.children,D=[],E=0,x=A.length;E<x;E++)switch(v=A[E],!1){case!(v instanceof o):D.push(this.declaration(v));break;case!(v instanceof c):D.push(this.docType(v));break;case!(v instanceof T):D.push(this.comment(v));break;case!(v instanceof f):D.push(this.processingInstruction(v));break;default:D.push(this.element(v))}return D},_.prototype.attribute=function(b){return this.stream.write(" "+b.name+'="'+b.value+'"')},_.prototype.cdata=function(b,v){return this.stream.write(this.space(v)+"<![CDATA["+b.text+"]]>"+this.endline(b))},_.prototype.comment=function(b,v){return this.stream.write(this.space(v)+"<!-- "+b.text+" -->"+this.endline(b))},_.prototype.declaration=function(b,v){return this.stream.write(this.space(v)),this.stream.write('<?xml version="'+b.version+'"'),b.encoding!=null&&this.stream.write(' encoding="'+b.encoding+'"'),b.standalone!=null&&this.stream.write(' standalone="'+b.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(b))},_.prototype.docType=function(b,v){var m,E,a,x;if(v||(v=0),this.stream.write(this.space(v)),this.stream.write("<!DOCTYPE "+b.root().name),b.pubID&&b.sysID?this.stream.write(' PUBLIC "'+b.pubID+'" "'+b.sysID+'"'):b.sysID&&this.stream.write(' SYSTEM "'+b.sysID+'"'),b.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(b)),x=b.children,E=0,a=x.length;E<a;E++)switch(m=x[E],!1){case!(m instanceof l):this.dtdAttList(m,v+1);break;case!(m instanceof p):this.dtdElement(m,v+1);break;case!(m instanceof h):this.dtdEntity(m,v+1);break;case!(m instanceof d):this.dtdNotation(m,v+1);break;case!(m instanceof C):this.cdata(m,v+1);break;case!(m instanceof T):this.comment(m,v+1);break;case!(m instanceof f):this.processingInstruction(m,v+1);break;default:throw new Error("Unknown DTD node type: "+m.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(b))},_.prototype.element=function(b,v){var m,E,a,x,O,A,D,I;v||(v=0),I=this.space(v),this.stream.write(I+"<"+b.name),A=b.attributes;for(O in A)y.call(A,O)&&(m=A[O],this.attribute(m));if(b.children.length===0||b.children.every(function(F){return F.value===""}))this.allowEmpty?this.stream.write("></"+b.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&b.children.length===1&&b.children[0].value!=null)this.stream.write(">"),this.stream.write(b.children[0].value),this.stream.write("</"+b.name+">");else{for(this.stream.write(">"+this.newline),D=b.children,a=0,x=D.length;a<x;a++)switch(E=D[a],!1){case!(E instanceof C):this.cdata(E,v+1);break;case!(E instanceof T):this.comment(E,v+1);break;case!(E instanceof s):this.element(E,v+1);break;case!(E instanceof i):this.raw(E,v+1);break;case!(E instanceof n):this.text(E,v+1);break;case!(E instanceof f):this.processingInstruction(E,v+1);break;default:throw new Error("Unknown XML node type: "+E.constructor.name)}this.stream.write(I+"</"+b.name+">")}return this.stream.write(this.endline(b))},_.prototype.processingInstruction=function(b,v){return this.stream.write(this.space(v)+"<?"+b.target),b.value&&this.stream.write(" "+b.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(b))},_.prototype.raw=function(b,v){return this.stream.write(this.space(v)+b.value+this.endline(b))},_.prototype.text=function(b,v){return this.stream.write(this.space(v)+b.value+this.endline(b))},_.prototype.dtdAttList=function(b,v){return this.stream.write(this.space(v)+"<!ATTLIST "+b.elementName+" "+b.attributeName+" "+b.attributeType),b.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+b.defaultValueType),b.defaultValue&&this.stream.write(' "'+b.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(b))},_.prototype.dtdElement=function(b,v){return this.stream.write(this.space(v)+"<!ELEMENT "+b.name+" "+b.value),this.stream.write(this.spacebeforeslash+">"+this.endline(b))},_.prototype.dtdEntity=function(b,v){return this.stream.write(this.space(v)+"<!ENTITY"),b.pe&&this.stream.write(" %"),this.stream.write(" "+b.name),b.value?this.stream.write(' "'+b.value+'"'):(b.pubID&&b.sysID?this.stream.write(' PUBLIC "'+b.pubID+'" "'+b.sysID+'"'):b.sysID&&this.stream.write(' SYSTEM "'+b.sysID+'"'),b.nData&&this.stream.write(" NDATA "+b.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(b))},_.prototype.dtdNotation=function(b,v){return this.stream.write(this.space(v)+"<!NOTATION "+b.name),b.pubID&&b.sysID?this.stream.write(' PUBLIC "'+b.pubID+'" "'+b.sysID+'"'):b.pubID?this.stream.write(' PUBLIC "'+b.pubID+'"'):b.sysID&&this.stream.write(' SYSTEM "'+b.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(b))},_.prototype.endline=function(b){return b.isLastRootNode?"":this.newline},_}(t)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],231:[function(w,P,S){"use strict";(function(){var C,T,l,p,h,d,o,c,s,f,i,n,t,u=function(g,_){function b(){this.constructor=g}for(var v in _)y.call(_,v)&&(g[v]=_[v]);return b.prototype=_.prototype,g.prototype=new b,g.__super__=_.prototype,g},y={}.hasOwnProperty;o=w("./XMLDeclaration"),c=w("./XMLDocType"),C=w("./XMLCData"),T=w("./XMLComment"),s=w("./XMLElement"),i=w("./XMLRaw"),n=w("./XMLText"),f=w("./XMLProcessingInstruction"),l=w("./XMLDTDAttList"),p=w("./XMLDTDElement"),h=w("./XMLDTDEntity"),d=w("./XMLDTDNotation"),t=w("./XMLWriterBase"),P.exports=function(g){function _(b){_.__super__.constructor.call(this,b)}return u(_,g),_.prototype.document=function(b){var v,m,E,a,x;for(this.textispresent=!1,a="",x=b.children,m=0,E=x.length;m<E;m++)v=x[m],a+=function(){switch(!1){case!(v instanceof o):return this.declaration(v);case!(v instanceof c):return this.docType(v);case!(v instanceof T):return this.comment(v);case!(v instanceof f):return this.processingInstruction(v);default:return this.element(v,0)}}.call(this);return this.pretty&&a.slice(-this.newline.length)===this.newline&&(a=a.slice(0,-this.newline.length)),a},_.prototype.attribute=function(b){return" "+b.name+'="'+b.value+'"'},_.prototype.cdata=function(b,v){return this.space(v)+"<![CDATA["+b.text+"]]>"+this.newline},_.prototype.comment=function(b,v){return this.space(v)+"<!-- "+b.text+" -->"+this.newline},_.prototype.declaration=function(b,v){var m;return m=this.space(v),m+='<?xml version="'+b.version+'"',b.encoding!=null&&(m+=' encoding="'+b.encoding+'"'),b.standalone!=null&&(m+=' standalone="'+b.standalone+'"'),m+=this.spacebeforeslash+"?>",m+=this.newline},_.prototype.docType=function(b,v){var m,E,a,x,O;if(v||(v=0),x=this.space(v),x+="<!DOCTYPE "+b.root().name,b.pubID&&b.sysID?x+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(x+=' SYSTEM "'+b.sysID+'"'),b.children.length>0){for(x+=" [",x+=this.newline,O=b.children,E=0,a=O.length;E<a;E++)m=O[E],x+=function(){switch(!1){case!(m instanceof l):return this.dtdAttList(m,v+1);case!(m instanceof p):return this.dtdElement(m,v+1);case!(m instanceof h):return this.dtdEntity(m,v+1);case!(m instanceof d):return this.dtdNotation(m,v+1);case!(m instanceof C):return this.cdata(m,v+1);case!(m instanceof T):return this.comment(m,v+1);case!(m instanceof f):return this.processingInstruction(m,v+1);default:throw new Error("Unknown DTD node type: "+m.constructor.name)}}.call(this);x+="]"}return x+=this.spacebeforeslash+">",x+=this.newline},_.prototype.element=function(b,v){var m,E,a,x,O,A,D,I,F,K,ne,j,G;v||(v=0),G=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),j=this.space(v),I="",I+=j+"<"+b.name,F=b.attributes;for(D in F)y.call(F,D)&&(m=F[D],I+=this.attribute(m));if(b.children.length===0||b.children.every(function(X){return X.value===""}))this.allowEmpty?I+="></"+b.name+">"+this.newline:I+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&b.children.length===1&&b.children[0].value!=null)I+=">",I+=b.children[0].value,I+="</"+b.name+">"+this.newline;else{if(this.dontprettytextnodes){for(K=b.children,a=0,O=K.length;a<O;a++)if(E=K[a],E.value!=null){this.textispresent++,G=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,j=this.space(v)),I+=">"+this.newline,ne=b.children,x=0,A=ne.length;x<A;x++)E=ne[x],I+=function(){switch(!1){case!(E instanceof C):return this.cdata(E,v+1);case!(E instanceof T):return this.comment(E,v+1);case!(E instanceof s):return this.element(E,v+1);case!(E instanceof i):return this.raw(E,v+1);case!(E instanceof n):return this.text(E,v+1);case!(E instanceof f):return this.processingInstruction(E,v+1);default:throw new Error("Unknown XML node type: "+E.constructor.name)}}.call(this);G&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),I+=j+"</"+b.name+">"+this.newline}return I},_.prototype.processingInstruction=function(b,v){var m;return m=this.space(v)+"<?"+b.target,b.value&&(m+=" "+b.value),m+=this.spacebeforeslash+"?>"+this.newline},_.prototype.raw=function(b,v){return this.space(v)+b.value+this.newline},_.prototype.text=function(b,v){return this.space(v)+b.value+this.newline},_.prototype.dtdAttList=function(b,v){var m;return m=this.space(v)+"<!ATTLIST "+b.elementName+" "+b.attributeName+" "+b.attributeType,b.defaultValueType!=="#DEFAULT"&&(m+=" "+b.defaultValueType),b.defaultValue&&(m+=' "'+b.defaultValue+'"'),m+=this.spacebeforeslash+">"+this.newline},_.prototype.dtdElement=function(b,v){return this.space(v)+"<!ELEMENT "+b.name+" "+b.value+this.spacebeforeslash+">"+this.newline},_.prototype.dtdEntity=function(b,v){var m;return m=this.space(v)+"<!ENTITY",b.pe&&(m+=" %"),m+=" "+b.name,b.value?m+=' "'+b.value+'"':(b.pubID&&b.sysID?m+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(m+=' SYSTEM "'+b.sysID+'"'),b.nData&&(m+=" NDATA "+b.nData)),m+=this.spacebeforeslash+">"+this.newline},_.prototype.dtdNotation=function(b,v){var m;return m=this.space(v)+"<!NOTATION "+b.name,b.pubID&&b.sysID?m+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.pubID?m+=' PUBLIC "'+b.pubID+'"':b.sysID&&(m+=' SYSTEM "'+b.sysID+'"'),m+=this.spacebeforeslash+">"+this.newline},_.prototype.openNode=function(b,v){var m,E,a,x;if(v||(v=0),b instanceof s){a=this.space(v)+"<"+b.name,x=b.attributes;for(E in x)y.call(x,E)&&(m=x[E],a+=this.attribute(m));return a+=(b.children?">":"/>")+this.newline}return a=this.space(v)+"<!DOCTYPE "+b.rootNodeName,b.pubID&&b.sysID?a+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(a+=' SYSTEM "'+b.sysID+'"'),a+=(b.children?" [":">")+this.newline},_.prototype.closeNode=function(b,v){switch(v||(v=0),!1){case!(b instanceof s):return this.space(v)+"</"+b.name+">"+this.newline;case!(b instanceof c):return this.space(v)+"]>"+this.newline}},_}(t)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],232:[function(w,P,S){"use strict";(function(){var C=function(l,p){return function(){return l.apply(p,arguments)}},T={}.hasOwnProperty;P.exports=function(){function l(p){this.assertLegalChar=C(this.assertLegalChar,this);var h,d,o;p||(p={}),this.noDoubleEncoding=p.noDoubleEncoding,d=p.stringify||{};for(h in d)T.call(d,h)&&(o=d[h],this[h]=o)}return l.prototype.eleName=function(p){return p=""+p||"",this.assertLegalChar(p)},l.prototype.eleText=function(p){return p=""+p||"",this.assertLegalChar(this.elEscape(p))},l.prototype.cdata=function(p){return p=""+p||"",p=p.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(p)},l.prototype.comment=function(p){if(p=""+p||"",p.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+p);return this.assertLegalChar(p)},l.prototype.raw=function(p){return""+p||""},l.prototype.attName=function(p){return p=""+p||""},l.prototype.attValue=function(p){return p=""+p||"",this.attEscape(p)},l.prototype.insTarget=function(p){return""+p||""},l.prototype.insValue=function(p){if(p=""+p||"",p.match(/\?>/))throw new Error("Invalid processing instruction value: "+p);return p},l.prototype.xmlVersion=function(p){if(p=""+p||"",!p.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+p);return p},l.prototype.xmlEncoding=function(p){if(p=""+p||"",!p.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+p);return p},l.prototype.xmlStandalone=function(p){return p?"yes":"no"},l.prototype.dtdPubID=function(p){return""+p||""},l.prototype.dtdSysID=function(p){return""+p||""},l.prototype.dtdElementValue=function(p){return""+p||""},l.prototype.dtdAttType=function(p){return""+p||""},l.prototype.dtdAttDefault=function(p){return p!=null?""+p||"":p},l.prototype.dtdEntityValue=function(p){return""+p||""},l.prototype.dtdNData=function(p){return""+p||""},l.prototype.convertAttKey="@",l.prototype.convertPIKey="?",l.prototype.convertTextKey="#text",l.prototype.convertCDataKey="#cdata",l.prototype.convertCommentKey="#comment",l.prototype.convertRawKey="#raw",l.prototype.assertLegalChar=function(p){var h;if(h=p.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+p+" at index "+h.index);return p},l.prototype.elEscape=function(p){var h;return h=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(h,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")},l.prototype.attEscape=function(p){var h;return h=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(h,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")},l}()}).call(void 0)},{}],233:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(C);(function(){var l,p=function(d,o){function c(){this.constructor=d}for(var s in o)h.call(o,s)&&(d[s]=o[s]);return c.prototype=o.prototype,d.prototype=new c,d.__super__=o.prototype,d},h={}.hasOwnProperty;l=w("./XMLNode"),P.exports=function(d){function o(c,s){if(o.__super__.constructor.call(this,c),s==null)throw new Error("Missing element text");this.value=this.stringify.eleText(s)}return p(o,d),o.prototype.clone=function(){return(0,T.default)(this)},o.prototype.toString=function(c){return this.options.writer.set(c).text(this)},o}(l)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(w,P,S){"use strict";(function(){var C={}.hasOwnProperty;P.exports=function(){function T(l){var p,h,d,o,c,s,f,i,n;l||(l={}),this.pretty=l.pretty||!1,this.allowEmpty=(h=l.allowEmpty)!=null&&h,this.pretty?(this.indent=(d=l.indent)!=null?d:" ",this.newline=(o=l.newline)!=null?o:`
`,this.offset=(c=l.offset)!=null?c:0,this.dontprettytextnodes=(s=l.dontprettytextnodes)!=null?s:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(f=l.spacebeforeslash)!=null?f:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,i=l.writer||{};for(p in i)C.call(i,p)&&(n=i[p],this[p]=n)}return T.prototype.set=function(l){var p,h,d;l||(l={}),"pretty"in l&&(this.pretty=l.pretty),"allowEmpty"in l&&(this.allowEmpty=l.allowEmpty),this.pretty?(this.indent="indent"in l?l.indent:" ",this.newline="newline"in l?l.newline:`
`,this.offset="offset"in l?l.offset:0,this.dontprettytextnodes="dontprettytextnodes"in l?l.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in l?l.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,h=l.writer||{};for(p in h)C.call(h,p)&&(d=h[p],this[p]=d);return this},T.prototype.space=function(l){var p;return this.pretty?(p=(l||0)+this.offset+1,p>0?new Array(p).join(this.indent):""):""},T}()}).call(void 0)},{}],235:[function(w,P,S){"use strict";(function(){var C,T,l,p,h,d,o;o=w("./Utility"),h=o.assign,d=o.isFunction,C=w("./XMLDocument"),T=w("./XMLDocumentCB"),p=w("./XMLStringWriter"),l=w("./XMLStreamWriter"),P.exports.create=function(c,s,f,i){var n,t;if(c==null)throw new Error("Root element needs a name");return i=h({},s,f,i),n=new C(i),t=n.element(c),i.headless||(n.declaration(i),i.pubID==null&&i.sysID==null||n.doctype(i)),t},P.exports.begin=function(c,s,f){var i;return d(c)&&(i=[c,s],s=i[0],f=i[1],c={}),s?new T(c,s,f):new C(c)},P.exports.stringWriter=function(c){return new p(c)},P.exports.streamWriter=function(c,s){return new l(c,s)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(w,P,S){function C(){for(var l={},p=0;p<arguments.length;p++){var h=arguments[p];for(var d in h)T.call(h,d)&&(l[d]=h[d])}return l}P.exports=C;var T=Object.prototype.hasOwnProperty},{}],237:[function(w,P,S){"use strict";function C(i,n,t){p.isBuffer(n)||(n=new p(n)),p.isBuffer(t)||(t=new p(t)),n.length>s?n=i(n):n.length<s&&(n=p.concat([n,f],s));for(var u=new p(s),y=new p(s),g=0;g<s;g++)u[g]=54^n[g],y[g]=92^n[g];var _=i(p.concat([u,t]));return i(p.concat([y,_]))}function T(i,n){i=i||"sha1";var t=c[i],u=[],y=0;return t||l("algorithm:",i,"is not yet supported"),{update:function(g){return p.isBuffer(g)||(g=new p(g)),u.push(g),y+=g.length,this},digest:function(g){var _=p.concat(u),b=n?C(t,n,_):t(_);return u=null,g?b.toString(g):b}}}function l(){var i=[].slice.call(arguments).join(" ");throw new Error([i,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}var p=w("buffer").Buffer,h=w("./sha"),d=w("./sha256"),o=w("./md5"),c={sha1:h,sha256:d,md5:o},s=64,f=new p(s);f.fill(0),S.createHash=function(i){return T(i)},S.createHmac=function(i,n){return T(i,n)},function(i,n){for(var t in i)n(i[t],t)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(i){S[i]=function(){l("sorry,",i,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(w,P,S){"use strict";function C(c,s){if(c.length%h!=0){var f=c.length+(h-c.length%h);c=p.concat([c,d],f)}for(var i=[],n=s?c.readInt32BE:c.readInt32LE,t=0;t<c.length;t+=h)i.push(n.call(c,t));return i}function T(c,s,f){for(var i=new p(s),n=f?i.writeInt32BE:i.writeInt32LE,t=0;t<c.length;t++)n.call(i,c[t],4*t,!0);return i}function l(c,s,f,i){return p.isBuffer(c)||(c=new p(c)),T(s(C(c,i),c.length*o),f,i)}var p=w("buffer").Buffer,h=4,d=new p(h);d.fill(0);var o=8;P.exports={hash:l}},{buffer:38}],239:[function(w,P,S){"use strict";function C(f,i){f[i>>5]|=128<<i%32,f[14+(i+64>>>9<<4)]=i;for(var n=1732584193,t=-271733879,u=-1732584194,y=271733878,g=0;g<f.length;g+=16){var _=n,b=t,v=u,m=y;n=l(n,t,u,y,f[g+0],7,-680876936),y=l(y,n,t,u,f[g+1],12,-389564586),u=l(u,y,n,t,f[g+2],17,606105819),t=l(t,u,y,n,f[g+3],22,-1044525330),n=l(n,t,u,y,f[g+4],7,-176418897),y=l(y,n,t,u,f[g+5],12,1200080426),u=l(u,y,n,t,f[g+6],17,-1473231341),t=l(t,u,y,n,f[g+7],22,-45705983),n=l(n,t,u,y,f[g+8],7,1770035416),y=l(y,n,t,u,f[g+9],12,-1958414417),u=l(u,y,n,t,f[g+10],17,-42063),t=l(t,u,y,n,f[g+11],22,-1990404162),n=l(n,t,u,y,f[g+12],7,1804603682),y=l(y,n,t,u,f[g+13],12,-40341101),u=l(u,y,n,t,f[g+14],17,-1502002290),t=l(t,u,y,n,f[g+15],22,1236535329),n=p(n,t,u,y,f[g+1],5,-165796510),y=p(y,n,t,u,f[g+6],9,-1069501632),u=p(u,y,n,t,f[g+11],14,643717713),t=p(t,u,y,n,f[g+0],20,-373897302),n=p(n,t,u,y,f[g+5],5,-701558691),y=p(y,n,t,u,f[g+10],9,38016083),u=p(u,y,n,t,f[g+15],14,-660478335),t=p(t,u,y,n,f[g+4],20,-405537848),n=p(n,t,u,y,f[g+9],5,568446438),y=p(y,n,t,u,f[g+14],9,-1019803690),u=p(u,y,n,t,f[g+3],14,-187363961),t=p(t,u,y,n,f[g+8],20,1163531501),n=p(n,t,u,y,f[g+13],5,-1444681467),y=p(y,n,t,u,f[g+2],9,-51403784),u=p(u,y,n,t,f[g+7],14,1735328473),t=p(t,u,y,n,f[g+12],20,-1926607734),n=h(n,t,u,y,f[g+5],4,-378558),y=h(y,n,t,u,f[g+8],11,-2022574463),u=h(u,y,n,t,f[g+11],16,1839030562),t=h(t,u,y,n,f[g+14],23,-35309556),n=h(n,t,u,y,f[g+1],4,-1530992060),y=h(y,n,t,u,f[g+4],11,1272893353),u=h(u,y,n,t,f[g+7],16,-155497632),t=h(t,u,y,n,f[g+10],23,-1094730640),n=h(n,t,u,y,f[g+13],4,681279174),y=h(y,n,t,u,f[g+0],11,-358537222),u=h(u,y,n,t,f[g+3],16,-722521979),t=h(t,u,y,n,f[g+6],23,76029189),n=h(n,t,u,y,f[g+9],4,-640364487),y=h(y,n,t,u,f[g+12],11,-421815835),u=h(u,y,n,t,f[g+15],16,530742520),t=h(t,u,y,n,f[g+2],23,-995338651),n=d(n,t,u,y,f[g+0],6,-198630844),y=d(y,n,t,u,f[g+7],10,1126891415),u=d(u,y,n,t,f[g+14],15,-1416354905),t=d(t,u,y,n,f[g+5],21,-57434055),n=d(n,t,u,y,f[g+12],6,1700485571),y=d(y,n,t,u,f[g+3],10,-1894986606),u=d(u,y,n,t,f[g+10],15,-1051523),t=d(t,u,y,n,f[g+1],21,-2054922799),n=d(n,t,u,y,f[g+8],6,1873313359),y=d(y,n,t,u,f[g+15],10,-30611744),u=d(u,y,n,t,f[g+6],15,-1560198380),t=d(t,u,y,n,f[g+13],21,1309151649),n=d(n,t,u,y,f[g+4],6,-145523070),y=d(y,n,t,u,f[g+11],10,-1120210379),u=d(u,y,n,t,f[g+2],15,718787259),t=d(t,u,y,n,f[g+9],21,-343485551),n=o(n,_),t=o(t,b),u=o(u,v),y=o(y,m)}return Array(n,t,u,y)}function T(f,i,n,t,u,y){return o(c(o(o(i,f),o(t,y)),u),n)}function l(f,i,n,t,u,y,g){return T(i&n|~i&t,f,i,u,y,g)}function p(f,i,n,t,u,y,g){return T(i&t|n&~t,f,i,u,y,g)}function h(f,i,n,t,u,y,g){return T(i^n^t,f,i,u,y,g)}function d(f,i,n,t,u,y,g){return T(n^(i|~t),f,i,u,y,g)}function o(f,i){var n=(65535&f)+(65535&i);return(f>>16)+(i>>16)+(n>>16)<<16|65535&n}function c(f,i){return f<<i|f>>>32-i}var s=w("./helpers");P.exports=function(f){return s.hash(f,C,16)}},{"./helpers":238}],240:[function(w,P,S){"use strict";function C(o,c){o[c>>5]|=128<<24-c%32,o[15+(c+64>>9<<4)]=c;for(var s=Array(80),f=1732584193,i=-271733879,n=-1732584194,t=271733878,u=-1009589776,y=0;y<o.length;y+=16){for(var g=f,_=i,b=n,v=t,m=u,E=0;E<80;E++){s[E]=E<16?o[y+E]:h(s[E-3]^s[E-8]^s[E-14]^s[E-16],1);var a=p(p(h(f,5),T(E,i,n,t)),p(p(u,s[E]),l(E)));u=t,t=n,n=h(i,30),i=f,f=a}f=p(f,g),i=p(i,_),n=p(n,b),t=p(t,v),u=p(u,m)}return Array(f,i,n,t,u)}function T(o,c,s,f){return o<20?c&s|~c&f:o<40?c^s^f:o<60?c&s|c&f|s&f:c^s^f}function l(o){return o<20?1518500249:o<40?1859775393:o<60?-1894007588:-899497514}function p(o,c){var s=(65535&o)+(65535&c);return(o>>16)+(c>>16)+(s>>16)<<16|65535&s}function h(o,c){return o<<c|o>>>32-c}var d=w("./helpers");P.exports=function(o){return d.hash(o,C,20,!0)}},{"./helpers":238}],241:[function(w,P,S){"use strict";var C=w("./helpers"),T=function(n,t){var u=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(u>>16)<<16|65535&u},l=function(n,t){return n>>>t|n<<32-t},p=function(n,t){return n>>>t},h=function(n,t,u){return n&t^~n&u},d=function(n,t,u){return n&t^n&u^t&u},o=function(n){return l(n,2)^l(n,13)^l(n,22)},c=function(n){return l(n,6)^l(n,11)^l(n,25)},s=function(n){return l(n,7)^l(n,18)^p(n,3)},f=function(n){return l(n,17)^l(n,19)^p(n,10)},i=function(n,t){var u,y,g,_,b,v,m,E,a,x,O,A,D=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),I=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),F=new Array(64);n[t>>5]|=128<<24-t%32,n[15+(t+64>>9<<4)]=t;for(var a=0;a<n.length;a+=16){u=I[0],y=I[1],g=I[2],_=I[3],b=I[4],v=I[5],m=I[6],E=I[7];for(var x=0;x<64;x++)F[x]=x<16?n[x+a]:T(T(T(f(F[x-2]),F[x-7]),s(F[x-15])),F[x-16]),O=T(T(T(T(E,c(b)),h(b,v,m)),D[x]),F[x]),A=T(o(u),d(u,y,g)),E=m,m=v,v=b,b=T(_,O),_=g,g=y,y=u,u=T(O,A);I[0]=T(u,I[0]),I[1]=T(y,I[1]),I[2]=T(g,I[2]),I[3]=T(_,I[3]),I[4]=T(b,I[4]),I[5]=T(v,I[5]),I[6]=T(m,I[6]),I[7]=T(E,I[7])}return I};P.exports=function(n){return C.hash(n,i,32,!0)}},{"./helpers":238}],242:[function(w,P,S){(function(C){"use strict";function T(i){return i&&i.__esModule?i:{default:i}}var l=w("babel-runtime/core-js/object/create"),p=T(l),h=w("babel-runtime/helpers/classCallCheck"),d=T(h),o=w("babel-runtime/helpers/createClass"),c=T(o),s=w("babel-runtime/helpers/typeof"),f=T(s);!function(i){if((S===void 0?"undefined":(0,f.default)(S))==="object"&&P!==void 0)P.exports=i();else if(typeof U=="function"&&U.amd)U([],i);else{var n;n=typeof window!="undefined"?window:C!==void 0?C:typeof self!="undefined"?self:this,n.mime=i()}}(function(){return function i(n,t,u){function y(b,v){if(!t[b]){if(!n[b]){var m=typeof w=="function"&&w;if(!v&&m)return m(b,!0);if(g)return g(b,!0);var E=new Error("Cannot find module '"+b+"'");throw E.code="MODULE_NOT_FOUND",E}var a=t[b]={exports:{}};n[b][0].call(a.exports,function(x){var O=n[b][1][x];return y(O||x)},a,a.exports,i,n,t,u)}return t[b].exports}for(var g=typeof w=="function"&&w,_=0;_<u.length;_++)y(u[_]);return y}({1:[function(i,n,t){var u=function(){function y(){(0,d.default)(this,y),this._types=(0,p.default)(null),this._extensions=(0,p.default)(null);for(var g=0;g<arguments.length;g++)this.define(arguments[g])}return(0,c.default)(y,[{key:"define",value:function(g,_){for(var b in g){for(var v=g[b],m=0;m<v.length;m++){var E=v[m];if(!_&&E in this._types)throw new Error('Attempt to change mapping for "'+E+'" extension from "'+this._types[E]+'" to "'+b+'". Pass `force=true` to allow this, otherwise remove "'+E+'" from the list of extensions for "'+b+'".');this._types[E]=b}!_&&this._extensions[b]||(this._extensions[b]=v[0])}}},{key:"getType",value:function(g){g=String(g);var _=g.replace(/^.*[\/\\]/,"").toLowerCase(),b=_.replace(/^.*\./,"").toLowerCase(),v=_.length<g.length;return(b.length<_.length-1||!v)&&this._types[b]||null}},{key:"getExtension",value:function(g){return(g=/^\s*([^;\s]*)/.test(g)&&RegExp.$1)&&this._extensions[g.toLowerCase()]||null}}]),y}();n.exports=u},{}],2:[function(i,n,t){var u=i("./Mime");n.exports=new u(i("./types/standard"),i("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(i,n,t){n.exports={"application/prs.cww":["cww"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":[],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},{}],4:[function(i,n,t){n.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/xm":["xm"],"font/otf":["otf"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/webp":["webp"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}]},{},[2])(2)})}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"babel-runtime/core-js/object/create":19,"babel-runtime/helpers/classCallCheck":30,"babel-runtime/helpers/createClass":31,"babel-runtime/helpers/typeof":32}],243:[function(w,P,S){"use strict";S.encodeURIComponent=function(C){try{return encodeURIComponent(C)}catch(T){return C}},S.escape=w("escape-html"),S.timestamp=function(C){if(C){var T=C;return typeof T=="string"&&(T=Number(T)),String(C).length===10&&(T*=1e3),new Date(T)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(w,P,S){(function(C,T){"use strict";function l(E){return E&&E.__esModule?E:{default:E}}function p(E,a){return E===void 0?a:E}function h(E,a){return function(x,O,A){if(x)return a(x);E({data:O,status:A.statusCode,headers:A.headers,res:A})}}var d,o=w("babel-runtime/core-js/json/stringify"),c=l(o),s=w("babel-runtime/helpers/typeof"),f=l(s),i=w("util"),n=w("url"),t=w("http"),u=w("https"),y=w("debug")("urllib"),g=w("humanize-ms"),_=0,b=Math.pow(2,31)-10,v=/^https?:\/\//i;S.TIMEOUTS=[g("300s"),g("300s")];var m=["json","text"];S.request=function(E,a,x){return arguments.length===2&&typeof a=="function"&&(x=a,a=null),typeof x=="function"?S.requestWithCallback(E,a,x):(d||(d=w("any-promise")),new d(function(O,A){S.requestWithCallback(E,a,h(O,A))}))},S.requestWithCallback=function(E,a,x){function O(){Ye&&(clearTimeout(Ye),Ye=null)}function A(){ee&&(clearTimeout(ee),ee=null)}function D(Ke,Ne,De){if(A(),!x)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),X,C.pid,pe.method,E),void(Ke&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),X,C.pid,Ke.name,Ke.message,Ke.stack));var _e=x;x=null;var he={};if(De&&(Y=De.statusCode,he=De.headers),Y===401&&he["www-authenticate"]&&(!a.headers||!a.headers.Authorization)&&a.digestAuth){var ve=he["www-authenticate"];if(ve.indexOf("Digest ")>=0)return y("Request#%d %s: got digest auth header WWW-Authenticate: %s",X,E,ve),a.headers=a.headers||{},a.headers.Authorization=digestAuthHeader(pe.method,pe.path,ve,a.digestAuth),y("Request#%d %s: auth with digest header: %s",X,E,a.headers.Authorization),De.headers["set-cookie"]&&(a.headers.Cookie=De.headers["set-cookie"].join(";")),S.requestWithCallback(E,a,_e)}var Ee=Date.now()-Q;Pe&&(Pe.contentDownload=Ee),y("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Ee,V,Y,pe.method,pe.host,pe.path,$,Pe);var be={status:Y,statusCode:Y,headers:he,size:V,aborted:me,rt:Ee,keepAliveSocket:$,data:Ne,requestUrls:a.requestUrls,timing:Pe,remoteAddress:Re,remotePort:rt};if(Ke){var Ge="";ye&&typeof ye.getCurrentStatus=="function"&&(Ge=", agent status: "+(0,c.default)(ye.getCurrentStatus())),Ke.message+=", "+pe.method+" "+E+" "+Y+" (connected: "+N+", keepalive socket: "+$+Ge+`)
headers: `+(0,c.default)(he),Ke.data=Ne,Ke.path=pe.path,Ke.status=Y,Ke.headers=he,Ke.res=be}_e(Ke,Ne,a.streaming?De:be),a.emitter&&(J.url=E,J.socket=Ve&&Ve.connection,J.options=pe,J.size=ke,a.emitter.emit("response",{requestId:X,error:Ke,ctx:a.ctx,req:J,res:be}))}function I(Ke){var Ne=null;if(a.followRedirect&&statuses.redirect[Ke.statusCode]){a._followRedirectCount=(a._followRedirectCount||0)+1;var De=Ke.headers.location;if(De){if(!(a._followRedirectCount>a.maxRedirects)){var _e=a.formatRedirectUrl?a.formatRedirectUrl(E,De):n.resolve(E,De);y("Request#%d %s: `redirected` from %s to %s",X,pe.path,E,_e),A(),a.headers&&a.headers.Host&&v.test(De)&&(a.headers.Host=null);var he=x;return x=null,S.requestWithCallback(_e,a,he),{redirect:!0,error:null}}Ne=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+E),Ne.name="MaxRedirectError"}else Ne=new Error("Got statusCode "+Ke.statusCode+" but cannot resolve next location from headers"),Ne.name="FollowRedirectError"}return{redirect:!1,error:Ne}}function F(Ke,Ne,De){return De(null,Ne,Ke.headers["content-encoding"])}function K(Ke){if(Pe&&(Pe.waiting=Date.now()-Q),y("Request#%d %s `req response` event emit: status %d, headers: %j",X,E,Ke.statusCode,Ke.headers),a.streaming){var Ne=I(Ke);return Ne.redirect?void Ke.resume():Ne.error?(Ke.resume(),D(Ne.error,null,Ke)):D(null,null,Ke)}if(Ke.on("close",function(){y("Request#%d %s: `res close` event emit, total size %d",X,E,V)}),Ke.on("error",function(){y("Request#%d %s: `res error` event emit, total size %d",X,E,V)}),Ke.on("aborted",function(){me=!0,y("Request#%d %s: `res aborted` event emit, total size %d",X,E,V)}),Ie){var Ne=I(Ke);return Ne.redirect?void Ke.resume():Ne.error?(Ke.resume(),Ie.end(),D(Ne.error,null,Ke)):(a.consumeWriteStream===!1?Ke.on("end",D.bind(null,null,null,Ke)):isNode010||isNode012?first([[Ie,"close"],[Ke,"aborted"]],function(he,ve,Ee){y("Request#%d %s: writeStream or res %s event emitted",X,E,Ee),D(M||null,null,Ke)}):Ie.on("close",function(){y("Request#%d %s: writeStream close event emitted",X,E),D(M||null,null,Ke)}),Ke.pipe(Ie))}var De=[];Ke.on("data",function(_e){y("Request#%d %s: `res data` event emit, size %d",X,E,_e.length),V+=_e.length,De.push(_e)}),Ke.on("end",function(){var _e=T.concat(De,V);if(y("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",X,E,V,Ke._dumped),M)return D(M,_e,Ke);var he=I(Ke);if(he.error)return D(he.error,_e,Ke);he.redirect||F(Ke,_e,function(ve,Ee,be){if(ve)return D(ve,_e,Ke);if(!be&&m.indexOf(a.dataType)>=0){try{Ee=decodeBodyByCharset(Ee,Ke)}catch(qe){return y("decodeBodyByCharset error: %s",qe),D(null,Ee,Ke)}if(a.dataType==="json")if(V===0)Ee=null;else{var Ge=parseJSON(Ee,Ae);Ge.error?ve=Ge.error:Ee=Ge.data}}me&&y("Request#%d %s: Remote socket was terminated before `response.end()` was called",X,E),D(ve,Ee,Ke)})})}function ne(){y("Response timer ticking, timeout: %d",tt),ee=setTimeout(function(){ee=null;var Ke="Response timeout for "+tt+"ms";M=new Error(Ke),M.name="ResponseTimeoutError",M.requestId=X,y("ResponseTimeout: Request#%d %s %s: %s, connected: %s",X,E,M.name,Ke,N),j()},tt)}function j(){y("Request#%d %s abort, connected: %s",X,E,N),Ve.socket||(M.noSocket=!0,D(M)),Ve.abort()}if(!E||typeof E!="string"&&(E===void 0?"undefined":(0,f.default)(E))!=="object"){var G=i.format("expect request url to be a string or a http request options, but got %j",E);throw new Error(G)}arguments.length===2&&typeof a=="function"&&(x=a,a=null),a=a||{},_>=b&&(_=0);var X=++_;a.requestUrls=a.requestUrls||[];var J={requestId:X,url:E,args:a,ctx:a.ctx};a.emitter&&a.emitter.emit("request",J),a.timeout=a.timeout||S.TIMEOUTS,a.maxRedirects=a.maxRedirects||10,a.streaming=a.streaming||a.customResponse;var B,Q=Date.now();typeof E=="string"?(v.test(E)||(E="http://"+E),B=n.parse(E)):B=E;var ie=(a.type||a.method||B.method||"GET").toUpperCase(),oe=B.port||80,xe=t,ye=p(a.agent,S.agent),Ae=a.fixJSONCtlChars;B.protocol==="https:"&&(xe=u,ye=p(a.httpsAgent,S.httpsAgent),B.port||(oe=443));var pe={host:B.hostname||B.host||"localhost",path:B.path||"/",method:ie,port:oe,agent:ye,headers:a.headers||{},lookup:a.lookup};Array.isArray(a.timeout)?pe.requestTimeout=a.timeout[a.timeout.length-1]:a.timeout!==void 0&&(pe.requestTimeout=a.timeout);for(var Oe=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],Fe=0;Fe<Oe.length;Fe++){var Me=Oe[Fe];a.hasOwnProperty(Me)&&(pe[Me]=a[Me])}pe.rejectUnauthorized!==!1||pe.hasOwnProperty("secureOptions")||(pe.secureOptions=w("constants").SSL_OP_NO_TLSv1_2);var Ce=a.auth||B.auth;Ce&&(pe.auth=Ce);var Le=a.content||a.data,de=ie==="GET"||ie==="HEAD"||a.dataAsQueryString;if(!a.content&&Le&&typeof Le!="string"&&!T.isBuffer(Le))if(de)Le=a.nestedQuerystring?qs.stringify(Le):querystring.stringify(Le);else{var ue=pe.headers["Content-Type"]||pe.headers["content-type"];ue||(ue=a.contentType==="json"?"application/json":"application/x-www-form-urlencoded",pe.headers["Content-Type"]=ue),Le=parseContentType(ue).type==="application/json"?(0,c.default)(Le):a.nestedQuerystring?qs.stringify(Le):querystring.stringify(Le)}de&&Le&&(pe.path+=(B.query?"&":"?")+Le,Le=null);var ke=0;if(Le){var Ue=Le.length;T.isBuffer(Le)||(Ue=T.byteLength(Le)),ke=pe.headers["Content-Length"]=Ue}a.dataType==="json"&&(pe.headers.Accept="application/json"),typeof a.beforeRequest=="function"&&a.beforeRequest(pe);var Ye=null,ee=null,M=null,N=!1,$=!1,V=0,Y=-1,me=!1,Re="",rt="",Pe=null;a.timing&&(Pe={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),pe.headers["User-Agent"]||pe.headers["user-agent"]||(pe.headers["User-Agent"]=navigator.userAgent),a.gzip&&(pe.headers["Accept-Encoding"]||pe.headers["accept-encoding"]||(pe.headers["Accept-Encoding"]="gzip"));var Ie=a.writeStream;y("Request#%d %s %s with headers %j, options.path: %s",X,ie,E,pe.headers,pe.path),a.requestUrls.push(E);var Xe,tt;Array.isArray(a.timeout)?(Xe=g(a.timeout[0]),tt=g(a.timeout[1])):Xe=tt=g(a.timeout),y("ConnectTimeout: %d, ResponseTimeout: %d",Xe,tt);var Ve;try{Ve=xe.request(pe,K)}catch(Ke){return D(Ke)}return typeof window=="undefined"?function(){y("Connect timer ticking, timeout: %d",Xe),Ye=setTimeout(function(){Ye=null,Y===-1&&(Y=-2);var Ke="Connect timeout for "+Xe+"ms",Ne="ConnectionTimeoutError";Ve.socket||(Ne="SocketAssignTimeoutError",Ke+=", working sockets is full"),M=new Error(Ke),M.name=Ne,M.requestId=X,y("ConnectTimeout: Request#%d %s %s: %s, connected: %s",X,E,M.name,Ke,N),j()},Xe)}():Ve.on("requestTimeout",function(){Y===-1&&(Y=-2);var Ke="Connect timeout for "+Xe+"ms";M=new Error(Ke),M.name="ConnectionTimeoutError",M.requestId=X,j()}),Pe&&Ve.on("finish",function(){Pe.requestSent=Date.now()-Q}),Ve.once("socket",function(Ke){Pe&&(Pe.queuing=Date.now()-Q),isNode010&&Ke.socket&&(Ke=Ke.socket);var Ne=Ke.readyState;if(Ne==="opening")return Ke.once("lookup",function(De,_e,he){y("Request#%d %s lookup: %s, %s, %s",X,E,De,_e,he),Pe&&(Pe.dnslookup=Date.now()-Q),_e&&(Re=_e)}),void Ke.once("connect",function(){Pe&&(Pe.connected=Date.now()-Q),O(),ne(),y("Request#%d %s new socket connected",X,E),N=!0,Re||(Re=Ke.remoteAddress),rt=Ke.remotePort});y("Request#%d %s reuse socket connected, readyState: %s",X,E,Ne),N=!0,$=!0,Re||(Re=Ke.remoteAddress),rt=Ke.remotePort,O(),ne()}),Ve.on("error",function(Ke){Ke.name!=="Error"&&Ke.name!=="TypeError"||(Ke.name=N?"ResponseError":"RequestError"),Ke.message+=' (req "error")',y("Request#%d %s `req error` event emit, %s: %s",X,E,Ke.name,Ke.message),D(M||Ke)}),Ie&&Ie.once("error",function(Ke){Ke.message+=' (writeStream "error")',M=Ke,y("Request#%d %s `writeStream error` event emit, %s: %s",X,E,Ke.name,Ke.message),j()}),a.stream?(a.stream.pipe(Ve),a.stream.once("error",function(Ke){Ke.message+=' (stream "error")',M=Ke,y("Request#%d %s `readStream error` event emit, %s: %s",X,E,Ke.name,Ke.message),j()})):Ve.end(Le),Ve.requestId=X,Ve}}).call(this,w("_process"),w("buffer").Buffer)},{_process:173,"any-promise":13,"babel-runtime/core-js/json/stringify":17,"babel-runtime/helpers/typeof":32,buffer:38,constants:42,debug:155,http:196,https:159,"humanize-ms":160,url:203,util:207}]},{},[1])(1)}),!function(U){function w(S){if(P[S])return P[S].exports;var C=P[S]={i:S,l:!1,exports:{}};return U[S].call(C.exports,C,C.exports,w),C.l=!0,C.exports}var P={};w.m=U,w.c=P,w.d=function(S,C,T){w.o(S,C)||Object.defineProperty(S,C,{configurable:!1,enumerable:!0,get:T})},w.n=function(S){var C=S&&S.__esModule?function(){return S.default}:function(){return S};return w.d(C,"a",C),C},w.o=function(S,C){return Object.prototype.hasOwnProperty.call(S,C)},w.p="",w(w.s=12)}([function(U,w,P){!function(S,C){U.exports=w=C()}(0,function(){var S=S||function(C,T){var l=Object.create||function(){function u(){}return function(y){var g;return u.prototype=y,g=new u,u.prototype=null,g}}(),p={},h=p.lib={},d=h.Base=function(){return{extend:function(u){var y=l(this);return u&&y.mixIn(u),y.hasOwnProperty("init")&&this.init!==y.init||(y.init=function(){y.$super.init.apply(this,arguments)}),y.init.prototype=y,y.$super=this,y},create:function(){var u=this.extend();return u.init.apply(u,arguments),u},init:function(){},mixIn:function(u){for(var y in u)u.hasOwnProperty(y)&&(this[y]=u[y]);u.hasOwnProperty("toString")&&(this.toString=u.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),o=h.WordArray=d.extend({init:function(u,y){u=this.words=u||[],this.sigBytes=y!=null?y:4*u.length},toString:function(u){return(u||s).stringify(this)},concat:function(u){var y=this.words,g=u.words,_=this.sigBytes,b=u.sigBytes;if(this.clamp(),_%4)for(var v=0;v<b;v++){var m=g[v>>>2]>>>24-v%4*8&255;y[_+v>>>2]|=m<<24-(_+v)%4*8}else for(var v=0;v<b;v+=4)y[_+v>>>2]=g[v>>>2];return this.sigBytes+=b,this},clamp:function(){var u=this.words,y=this.sigBytes;u[y>>>2]&=4294967295<<32-y%4*8,u.length=C.ceil(y/4)},clone:function(){var u=d.clone.call(this);return u.words=this.words.slice(0),u},random:function(u){for(var y,g=[],_=0;_<u;_+=4){var b=function(v){var v=v,m=987654321,E=4294967295;return function(){m=36969*(65535&m)+(m>>16)&E,v=18e3*(65535&v)+(v>>16)&E;var a=(m<<16)+v&E;return a/=4294967296,(a+=.5)*(C.random()>.5?1:-1)}}(4294967296*(y||C.random()));y=987654071*b(),g.push(4294967296*b()|0)}return new o.init(g,u)}}),c=p.enc={},s=c.Hex={stringify:function(u){for(var y=u.words,g=u.sigBytes,_=[],b=0;b<g;b++){var v=y[b>>>2]>>>24-b%4*8&255;_.push((v>>>4).toString(16)),_.push((15&v).toString(16))}return _.join("")},parse:function(u){for(var y=u.length,g=[],_=0;_<y;_+=2)g[_>>>3]|=parseInt(u.substr(_,2),16)<<24-_%8*4;return new o.init(g,y/2)}},f=c.Latin1={stringify:function(u){for(var y=u.words,g=u.sigBytes,_=[],b=0;b<g;b++){var v=y[b>>>2]>>>24-b%4*8&255;_.push(String.fromCharCode(v))}return _.join("")},parse:function(u){for(var y=u.length,g=[],_=0;_<y;_++)g[_>>>2]|=(255&u.charCodeAt(_))<<24-_%4*8;return new o.init(g,y)}},i=c.Utf8={stringify:function(u){try{return decodeURIComponent(escape(f.stringify(u)))}catch(y){throw new Error("Malformed UTF-8 data")}},parse:function(u){return f.parse(unescape(encodeURIComponent(u)))}},n=h.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(u){typeof u=="string"&&(u=i.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},_process:function(u){var y=this._data,g=y.words,_=y.sigBytes,b=this.blockSize,v=4*b,m=_/v;m=u?C.ceil(m):C.max((0|m)-this._minBufferSize,0);var E=m*b,a=C.min(4*E,_);if(E){for(var x=0;x<E;x+=b)this._doProcessBlock(g,x);var O=g.splice(0,E);y.sigBytes-=a}return new o.init(O,a)},clone:function(){var u=d.clone.call(this);return u._data=this._data.clone(),u},_minBufferSize:0}),t=(h.Hasher=n.extend({cfg:d.extend(),init:function(u){this.cfg=this.cfg.extend(u),this.reset()},reset:function(){n.reset.call(this),this._doReset()},update:function(u){return this._append(u),this._process(),this},finalize:function(u){return u&&this._append(u),this._doFinalize()},blockSize:16,_createHelper:function(u){return function(y,g){return new u.init(g).finalize(y)}},_createHmacHelper:function(u){return function(y,g){return new t.HMAC.init(u,g).finalize(y)}}}),p.algo={});return p}(Math);return S})},function(U,w,P){"use strict";function S(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function l(p,h){for(var d=0;d<h.length;d++){var o=h[d];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(p,o.key,o)}}return function(p,h,d){return h&&l(p.prototype,h),d&&l(p,d),p}}(),T=function(){function l(){S(this,l)}return C(l,null,[{key:"detectIEVersion",value:function(){for(var p=4,h=document.createElement("div"),d=h.getElementsByTagName("i");h.innerHTML="<!--[if gt IE "+p+"]><i></i><![endif]-->",d[0];)p++;return p>4&&p}},{key:"extend",value:function(p,h){for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&h[d]&&(p[d]=h[d])}},{key:"isArray",value:function(p){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(p){return p=p.toLowerCase(),/.mp4|.flv|.m3u8|.avi|.rm|.rmvb|.mpeg|.mpg|.mov|.wmv|.3gp|.asf|.dat|.dv|.f4v|.gif|.m2t|.m4v|.mj2|.mjpeg|.mpe|.mts|.ogg|.qt|.swf|.ts|.vob|.wmv|.webm/.test(p)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(p)?"audio":/.bmp|.jpg|.jpeg|.png/.test(p)?"img":"other"}},{key:"isImage",value:function(p){return p=p.toLowerCase(),!!/.jpg|.jpeg|.png/.test(p)}},{key:"ISODateString",value:function(p){function h(d){return d<10?"0"+d:d}return p.getUTCFullYear()+"-"+h(p.getUTCMonth()+1)+"-"+h(p.getUTCDate())+"T"+h(p.getUTCHours())+":"+h(p.getUTCMinutes())+":"+h(p.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(p){return!!/^\d+$/.test(p)}}]),l}();w.default=T},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){return function(C){function T(t,u,y,g,_,b,v){var m=t+(u&y|~u&g)+_+v;return(m<<b|m>>>32-b)+u}function l(t,u,y,g,_,b,v){var m=t+(u&g|y&~g)+_+v;return(m<<b|m>>>32-b)+u}function p(t,u,y,g,_,b,v){var m=t+(u^y^g)+_+v;return(m<<b|m>>>32-b)+u}function h(t,u,y,g,_,b,v){var m=t+(y^(u|~g))+_+v;return(m<<b|m>>>32-b)+u}var d=S,o=d.lib,c=o.WordArray,s=o.Hasher,f=d.algo,i=[];!function(){for(var t=0;t<64;t++)i[t]=4294967296*C.abs(C.sin(t+1))|0}();var n=f.MD5=s.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,u){for(var y=0;y<16;y++){var g=u+y,_=t[g];t[g]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8)}var b=this._hash.words,v=t[u+0],m=t[u+1],E=t[u+2],a=t[u+3],x=t[u+4],O=t[u+5],A=t[u+6],D=t[u+7],I=t[u+8],F=t[u+9],K=t[u+10],ne=t[u+11],j=t[u+12],G=t[u+13],X=t[u+14],J=t[u+15],B=b[0],Q=b[1],ie=b[2],oe=b[3];B=T(B,Q,ie,oe,v,7,i[0]),oe=T(oe,B,Q,ie,m,12,i[1]),ie=T(ie,oe,B,Q,E,17,i[2]),Q=T(Q,ie,oe,B,a,22,i[3]),B=T(B,Q,ie,oe,x,7,i[4]),oe=T(oe,B,Q,ie,O,12,i[5]),ie=T(ie,oe,B,Q,A,17,i[6]),Q=T(Q,ie,oe,B,D,22,i[7]),B=T(B,Q,ie,oe,I,7,i[8]),oe=T(oe,B,Q,ie,F,12,i[9]),ie=T(ie,oe,B,Q,K,17,i[10]),Q=T(Q,ie,oe,B,ne,22,i[11]),B=T(B,Q,ie,oe,j,7,i[12]),oe=T(oe,B,Q,ie,G,12,i[13]),ie=T(ie,oe,B,Q,X,17,i[14]),Q=T(Q,ie,oe,B,J,22,i[15]),B=l(B,Q,ie,oe,m,5,i[16]),oe=l(oe,B,Q,ie,A,9,i[17]),ie=l(ie,oe,B,Q,ne,14,i[18]),Q=l(Q,ie,oe,B,v,20,i[19]),B=l(B,Q,ie,oe,O,5,i[20]),oe=l(oe,B,Q,ie,K,9,i[21]),ie=l(ie,oe,B,Q,J,14,i[22]),Q=l(Q,ie,oe,B,x,20,i[23]),B=l(B,Q,ie,oe,F,5,i[24]),oe=l(oe,B,Q,ie,X,9,i[25]),ie=l(ie,oe,B,Q,a,14,i[26]),Q=l(Q,ie,oe,B,I,20,i[27]),B=l(B,Q,ie,oe,G,5,i[28]),oe=l(oe,B,Q,ie,E,9,i[29]),ie=l(ie,oe,B,Q,D,14,i[30]),Q=l(Q,ie,oe,B,j,20,i[31]),B=p(B,Q,ie,oe,O,4,i[32]),oe=p(oe,B,Q,ie,I,11,i[33]),ie=p(ie,oe,B,Q,ne,16,i[34]),Q=p(Q,ie,oe,B,X,23,i[35]),B=p(B,Q,ie,oe,m,4,i[36]),oe=p(oe,B,Q,ie,x,11,i[37]),ie=p(ie,oe,B,Q,D,16,i[38]),Q=p(Q,ie,oe,B,K,23,i[39]),B=p(B,Q,ie,oe,G,4,i[40]),oe=p(oe,B,Q,ie,v,11,i[41]),ie=p(ie,oe,B,Q,a,16,i[42]),Q=p(Q,ie,oe,B,A,23,i[43]),B=p(B,Q,ie,oe,F,4,i[44]),oe=p(oe,B,Q,ie,j,11,i[45]),ie=p(ie,oe,B,Q,J,16,i[46]),Q=p(Q,ie,oe,B,E,23,i[47]),B=h(B,Q,ie,oe,v,6,i[48]),oe=h(oe,B,Q,ie,D,10,i[49]),ie=h(ie,oe,B,Q,X,15,i[50]),Q=h(Q,ie,oe,B,O,21,i[51]),B=h(B,Q,ie,oe,j,6,i[52]),oe=h(oe,B,Q,ie,a,10,i[53]),ie=h(ie,oe,B,Q,K,15,i[54]),Q=h(Q,ie,oe,B,m,21,i[55]),B=h(B,Q,ie,oe,I,6,i[56]),oe=h(oe,B,Q,ie,J,10,i[57]),ie=h(ie,oe,B,Q,A,15,i[58]),Q=h(Q,ie,oe,B,G,21,i[59]),B=h(B,Q,ie,oe,x,6,i[60]),oe=h(oe,B,Q,ie,ne,10,i[61]),ie=h(ie,oe,B,Q,E,15,i[62]),Q=h(Q,ie,oe,B,F,21,i[63]),b[0]=b[0]+B|0,b[1]=b[1]+Q|0,b[2]=b[2]+ie|0,b[3]=b[3]+oe|0},_doFinalize:function(){var t=this._data,u=t.words,y=8*this._nDataBytes,g=8*t.sigBytes;u[g>>>5]|=128<<24-g%32;var _=C.floor(y/4294967296),b=y;u[15+(g+64>>>9<<4)]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8),u[14+(g+64>>>9<<4)]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8),t.sigBytes=4*(u.length+1),this._process();for(var v=this._hash,m=v.words,E=0;E<4;E++){var a=m[E];m[E]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return v},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}});d.MD5=s._createHelper(n),d.HmacMD5=s._createHmacHelper(n)}(Math),S.MD5})},function(U,w,P){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},w.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},w.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(U,w,P){"use strict";function S(n){return n&&n.__esModule?n:{default:n}}function C(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function n(t,u){for(var y=0;y<u.length;y++){var g=u[y];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(t,g.key,g)}}return function(t,u,y){return u&&n(t.prototype,u),y&&n(t,y),t}}(),l=P(5),p=S(l),h=P(25),d=S(h),o=P(6),c=S(o),s=P(7),f=S(s),i=function(){function n(t){C(this,n);var u=f.default.os.name,y=f.default.os.version||"",g=f.default.browser.name,_=f.default.browser.version||"",b=window.location.href,v="";b&&(v=f.default.getHost(b));var m="pc";f.default.os.ipad?m="pad":(f.default.os.iphone||f.default.os.android)&&(m="phone"),this._ri=p.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:c.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:n.getUuid(),os:u,ov:y,et:g,ev:_,uat:navigator.userAgent,app_n:v,tt:m,dm:"h5",ut:""}}return T(n,[{key:"log",value:function(t,u){u&&u.ri?(this._ri=u.ri,delete u.ri):this._ri=p.default.create(),u&&u.ut&&(this.initParam.ut=u.ut,delete u.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=t=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=t;var y=[];if(u)for(var g in u)y.push(g+"="+u[g]);var _=y.join("&");this.initParam.args=encodeURIComponent(_==""?"0":_);var b=[];for(var g in this.initParam)b.push(g+"="+this.initParam[g]);var v=b.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(v):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+v}}],[{key:"getUuid",value:function(){var t=d.default.get("p_h5_upload_u");return t||(t=p.default.create(),d.default.set("p_h5_upload_u",t,730)),t}},{key:"getClientId",value:function(){return d.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(t){return t||(t=p.default.create()),d.default.set("p_h5_upload_clientId",t,730),t}}]),n}();w.default=i},function(U,w,P){"use strict";function S(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function l(p,h){for(var d=0;d<h.length;d++){var o=h[d];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(p,o.key,o)}}return function(p,h,d){return h&&l(p.prototype,h),d&&l(p,d),p}}(),T=function(){function l(){S(this,l)}return C(l,null,[{key:"create",value:function(p,h){var d,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),c=[];if(h=h||o.length,p)for(d=0;d<p;d++)c[d]=o[0|Math.random()*h];else{var s;for(c[8]=c[13]=c[18]=c[23]="-",c[14]="4",d=0;d<36;d++)c[d]||(s=0|16*Math.random(),c[d]=o[d==19?3&s|8:s])}return c.join("")}}]),l}();w.default=T},function(U,w,P){"use strict";Object.defineProperty(w,"__esModule",{value:!0});var S={version:"1.5.0"};w.default=S},function(U,w,P){"use strict";function S(o,c){if(!(o instanceof c))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function o(c,s){for(var f=0;f<s.length;f++){var i=s[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}return function(c,s,f){return s&&o(c.prototype,s),f&&o(c,f),c}}(),T=function(o){var c=navigator.userAgent,s="other";if(o.ios)return"iOS";if(o.android)return"android";if(c.indexOf("Baiduspider")>-1)return"Baiduspider";if(c.indexOf("PlayStation")>-1)return"PS4";var f=navigator.platform=="Win32"||navigator.platform=="Windows"||c.indexOf("Windows")>-1,i=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";return i&&(s="macOS"),navigator.platform=="X11"&&!f&&!i&&(s="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(s="Linux"),f?"windows":s},l=function(){var o=navigator.userAgent,c="";return(o.indexOf("Windows NT 5.0")>-1||o.indexOf("Windows 2000")>-1)&&(c="2000"),(o.indexOf("Windows NT 5.1")>-1||o.indexOf("Windows XP")>-1)&&(c="XP"),(o.indexOf("Windows NT 5.2")>-1||o.indexOf("Windows 2003")>-1)&&(c="2003"),(o.indexOf("Windows NT 6.0")>-1||o.indexOf("Windows Vista")>-1)&&(c="Vista"),(o.indexOf("Windows NT 6.1")>-1||o.indexOf("Windows 7")>-1)&&(c="7"),(o.indexOf("Windows NT 6.2")>-1||o.indexOf("Windows 8")>-1)&&(c="8"),(o.indexOf("Windows NT 6.3")>-1||o.indexOf("Windows 8.1")>-1)&&(c="8.1"),(o.indexOf("Windows NT 10")>-1||o.indexOf("Windows 10")>-1)&&(c="10"),c},p=function(o){var c=navigator.userAgent.toLowerCase();return o.chrome?"Chrome":o.firefox?"Firefox":o.safari?"Safari":o.webview?"webview":o.ie?/edge/.test(c)?"Edge":"IE":/baiduspider/.test(c)?"Baiduspider":/ucweb/.test(c)||/UCBrowser/.test(c)?"UC":/opera/.test(c)?"Opera":/ucweb/.test(c)?"UC":/360se/.test(c)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(c)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(c)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(c)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(c)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(c)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(c)?"PS4\u6D4F\u89C8\u5668":void 0},h=function(){var o={},c={},s=navigator.userAgent,f=navigator.platform,i=s.match(/Web[kK]it[\/]{0,1}([\d.]+)/),n=s.match(/(Android);?[\s\/]+([\d.]+)?/),t=!!s.match(/\(Macintosh\; Intel /),u=s.match(/(iPad).*OS\s([\d_]+)/),y=s.match(/(iPod)(.*OS\s([\d_]+))?/),g=!u&&s.match(/(iPhone\sOS)\s([\d_]+)/),_=s.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),b=/Win\d{2}|Windows/.test(f),v=s.match(/Windows Phone ([\d.]+)/),m=_&&s.match(/TouchPad/),E=s.match(/Kindle\/([\d.]+)/),a=s.match(/Silk\/([\d._]+)/),x=s.match(/(BlackBerry).*Version\/([\d.]+)/),O=s.match(/(BB10).*Version\/([\d.]+)/),A=s.match(/(RIM\sTablet\sOS)\s([\d.]+)/),D=s.match(/PlayBook/),I=s.match(/Chrome\/([\d.]+)/)||s.match(/CriOS\/([\d.]+)/),F=s.match(/Firefox\/([\d.]+)/),K=s.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),ne=s.match(/MSIE\s([\d.]+)/)||s.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),j=!I&&s.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),G=j||s.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((c.webkit=!!i)&&(c.version=i[1]),n&&(o.android=!0,o.version=n[2]),g&&!y&&(o.ios=o.iphone=!0,o.version=g[2].replace(/_/g,".")),u&&(o.ios=o.ipad=!0,o.version=u[2].replace(/_/g,".")),y&&(o.ios=o.ipod=!0,o.version=y[3]?y[3].replace(/_/g,"."):null),v&&(o.wp=!0,o.version=v[1]),_&&(o.webos=!0,o.version=_[2]),m&&(o.touchpad=!0),x&&(o.blackberry=!0,o.version=x[2]),O&&(o.bb10=!0,o.version=O[2]),A&&(o.rimtabletos=!0,o.version=A[2]),D&&(c.playbook=!0),E&&(o.kindle=!0,o.version=E[1]),a&&(c.silk=!0,c.version=a[1]),!a&&o.android&&s.match(/Kindle Fire/)&&(c.silk=!0),I&&(c.chrome=!0,c.version=I[1]),F&&(c.firefox=!0,c.version=F[1]),K&&(o.firefoxos=!0,o.version=K[1]),ne&&(c.ie=!0,c.version=ne[1]),G&&(t||o.ios||b||n)&&(c.safari=!0,o.ios||(c.version=G[1])),j&&(c.webview=!0),t){var X=s.match(/[\d]*_[\d]*_[\d]*/);X&&X.length>0&&X[0]&&(o.version=X[0].replace(/_/g,"."))}return o.tablet=!!(u||D||n&&!s.match(/Mobile/)||F&&s.match(/Tablet/)||ne&&!s.match(/Phone/)&&s.match(/Touch/)),o.phone=!(o.tablet||o.ipod||!(n||g||_||x||O||I&&s.match(/Android/)||I&&s.match(/CriOS\/([\d.]+)/)||F&&s.match(/Mobile/)||ne&&s.match(/Touch/))),o.pc=!o.tablet&&!o.phone,t?o.name="macOS":b?(o.name="windows",o.version=l()):o.name=T(o),c.name=p(c),{os:o,browser:c}}(),d=function(){function o(){S(this,o)}return C(o,null,[{key:"getHost",value:function(c){var s="";if(c===void 0||c==null||c=="")return"";var f=c.indexOf("//"),i=c;f>-1&&(i=c.substring(f+2));var s=i,n=i.split("/");return n&&n.length>0&&(s=n[0]),n=s.split(":"),n&&n.length>0&&(s=n[0]),s}},{key:"os",get:function(){return h.os}},{key:"browser",get:function(){var c=h.browser;return c.name||(c.name=p()),c}}]),o}();w.default=d},function(U,w,P){"use strict";function S(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function l(p,h){for(var d=0;d<h.length;d++){var o=h[d];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(p,o.key,o)}}return function(p,h,d){return h&&l(p.prototype,h),d&&l(p,d),p}}(),T=function(){function l(){S(this,l)}return C(l,null,[{key:"get",value:function(p,h,d,o,c){var s;d=d||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(f){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(f){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(f){}throw new Error("This browser does not support XMLHttpRequest.")}),s=new XMLHttpRequest,s.onreadystatechange=function(){s.readyState===4&&(s.status===200?h(s.responseText):d(s.responseText))};try{o===void 0&&(o=!0),s.open("GET",p,o),c&&(s.withCredentials=!0)}catch(f){return void d(f)}try{s.send()}catch(f){d(f)}}}]),l}();w.default=T},function(U,w,P){"use strict";function S(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function h(d,o){for(var c=0;c<o.length;c++){var s=o[c];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,s.key,s)}}return function(d,o,c){return o&&h(d.prototype,o),c&&h(d,c),d}}(),T=P(27),l=P(30),p=(P(10),function(){function h(){S(this,h)}return C(h,null,[{key:"randomUUID",value:function(){for(var d=[],o="0123456789abcdef",c=0;c<36;c++)d[c]=o.substr(Math.floor(16*Math.random()),1);return d[14]="4",d[19]=o.substr(3&d[19]|8,1),d[8]=d[13]=d[18]=d[23]="-",d.join("")}},{key:"aliyunEncodeURI",value:function(d){var o=encodeURIComponent(d);return o=o.replace(/\+/g,"%20").replace(/\*/g,"%2A").replace(/%7E/g,"~").replace(/!/g,"%21").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}},{key:"makeUTF8sort",value:function(d,o,c){if(!d)throw new Error("PrismPlayer Error: vid should not be null!");var s=[];for(var f in d)s.push(f);for(var i=s.sort(),n="",t=i.length,f=0;f<t;f++){var u=h.aliyunEncodeURI(i[f]),y=h.aliyunEncodeURI(d[i[f]]);n==""?n=u+o+y:n+=c+u+o+y}return n}},{key:"makeChangeSiga",value:function(d,o){if(!d)throw new Error("PrismPlayer Error: vid should not be null!");return l.stringify(T("GET&"+h.aliyunEncodeURI("/")+"&"+h.aliyunEncodeURI(h.makeUTF8sort(d,"=","&")),o+"&"))}}]),h}());w.default=p},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){return S.enc.Utf8})},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){return S.enc.Hex})},function(U,w,P){U.exports=P(13)},function(U,w,P){"use strict";var S,C,T=(typeof Symbol=="function"&&Symbol.iterator,P(14)),l=function(h){return h&&h.__esModule?h:{default:h}}(T),p={Vod:l.default};S=[],(C=function(){return p}.apply(w,S))!==void 0&&(U.exports=C),window.AliyunUpload=p,$e.exports=AliyunUpload},function(U,w,P){"use strict";function S(O){return O&&O.__esModule?O:{default:O}}function C(O,A){if(!(O instanceof A))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function O(A,D){for(var I=0;I<D.length;I++){var F=D[I];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(A,F.key,F)}}return function(A,D,I){return D&&O(A.prototype,D),I&&O(A,I),A}}(),l=P(15),p=P(3),h=P(16),d=S(h),o=P(18),c=S(o),s=P(24),f=S(s),i=P(4),n=S(i),t=P(1),u=S(t),y=P(5),g=S(y),_=P(26),b=S(_),v=P(31),m=S(v),E=P(32),a=S(E),x=(P(2),function(){function O(A){C(this,O),this.options=A,this.options.partSize=this.options.partSize||p.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||p.UPLOADDEFAULT.PARALLEL,this.options.region=this.options.region||"cn-shanghai",this.options.cname=this.options.cname||!1,this.options.localCheckpoint=this.options.localCheckpoint||!1,this.options.enableUploadProgress===void 0&&(this.options.enableUploadProgress=!0),this._ossCreditor=new Object,this._state=l.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new n.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=l.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return T(O,[{key:"init",value:function(A,D,I,F){return this._retryCount=0,!(I&&!F||!I&&F)&&!(A&&!D||!A&&D)&&(this._ossCreditor.accessKeyId=A,this._ossCreditor.accessKeySecret=D,this._ossCreditor.securityToken=I,this._ossCreditor.expireTime=F,!0)}},{key:"addFile",value:function(A,D,I,F,K,ne){if(!A)return!1;if(A.size==0)try{this.options.onUploadFailed({file:A},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch(J){console.log(J)}for(var j=(this.options,0);j<this._uploadList.length;j++)if(this._uploadList[j].file==A)return!1;var G=new Object;if(G.file=A,G._endpoint=D,G._bucket=I,G._object=F,G.state=l.UPLOADSTATE.INIT,G.isImage=u.default.isImage(A.name),!G.isImage&&this.options.enableUploadProgress){var X=this;a.default.getMd5(A,function(J){G.fileHash=J;var B=X._getCheckoutpoint(G);X.options.localCheckpoint||B||X._getCheckoutpointFromCloud(G,function(Q){if(Q.UploadPoint){var ie=JSON.parse(Q.UploadPoint);ie.loaded!=1&&(G.checkpoint=ie.checkpoint,G.loaded=ie.loaded,G.videoId=Q.VideoId,X._saveCheckoutpoint(G,ie.checkpoint))}},function(Q){try{if((Q=JSON.parse(Q))&&Q.Code=="InvalidParameter"&&Q.Message.indexOf("UserId")>0){X._invalidUserId=!0;var ie=Q.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(ie)}}catch(oe){console.log(oe)}})})}K&&(G.videoInfo=K?JSON.parse(K).Vod:{},G.userData=c.default.encode(K)),G.ri=g.default.create(),this._uploadList.push(G),this._reportLog("20001",G,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(G)}catch(J){console.log(J)}return!0}},{key:"deleteFile",value:function(A){return!!this.cancelFile(A)&&(this._uploadList.splice(A,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(A){if(this.options,A<0||A>=this._uploadList.length)return!1;var D=this._uploadList[A];if(A==this._curIndex&&D.state==l.UPLOADSTATE.UPLOADING){D.state=l.UPLOADSTATE.CANCELED;var I=this._getCheckoutpoint(D);I&&I.checkpoint&&(I=I.checkpoint),I&&this._ossUpload.abort(D),this._removeCheckoutpoint(D),this.nextUpload()}else D.state!=l.UPLOADSTATE.SUCCESS&&(D.state=l.UPLOADSTATE.CANCELED);return this._reportLog("20008",D),!0}},{key:"resumeFile",value:function(A){if(this.options,A<0||A>=this._uploadList.length)return!1;var D=this._uploadList[A];return D.state==l.UPLOADSTATE.CANCELED&&(D.state=l.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(A){return this._getCheckoutpoint({file:A})}},{key:"startUpload",value:function(A){if(this._retryCount=0,this.options,this._state==l.VODSTATE.START||this._state==l.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=l.VODSTATE.END);var D=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(D),this._state=l.VODSTATE.START}},{key:"nextUpload",value:function(){var A=this.options;if(this._state==l.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var D=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(D)}else{this._state=l.VODSTATE.END;try{A.onUploadEnd&&A.onUploadEnd(D)}catch(I){console.log(I)}}}},{key:"clear",value:function(A){for(var D=this.options,I=0,F=0;F<this._uploadList.length;F++)D.uploadList[F].state==l.UPLOADSTATE.SUCCESS&&I++,this._uploadList[F].state==A&&(D.uploadList.splice(F,1),F--);D.onClear&&D.onClear(D.uploadList.length,I)}},{key:"stopUpload",value:function(){if((this._state==l.VODSTATE.START||this._state==l.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var A=this._uploadList[this._curIndex];this._state=l.VODSTATE.STOP,A.state=l.UPLOADSTATE.STOPED,this._changeState(A,l.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(A){var D=this;if(!A)return!1;var I=JSON.parse(c.default.decode(A));return!!(I.AccessKeyId&&I.AccessKeySecret&&I.SecurityToken&&I.Expiration)&&D.resumeUploadWithToken(I.AccessKeyId,I.AccessKeySecret,I.SecurityToken,I.Expiration)}},{key:"resumeUploadWithToken",value:function(A,D,I,F){if(this.options,!(A&&D&&I&&F))return!1;if(this._state!=l.VODSTATE.EXPIRE)return!1;if(this._curIndex==-1)return!1;var K="";return this._uploadList.length>this._curIndex&&(K=this._uploadList[this._curIndex]),K&&(this.init(A,D,I,F),this._state=l.VODSTATE.START,this._ossUpload=null,this._uploadCore(K,K.retry),K.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(A,D,I){if(this._curIndex==-1)return!1;if(this._state!=l.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var F=this._uploadList[this._curIndex];F.object?this._refreshSTSTokenUpload(F,A,D,I):this.setSTSToken(F,A,D,I)}}},{key:"setSTSTokenDirectlyUpload",value:function(A,D,I,F,K){if(!(D&&I&&F&&K))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var ne=A;this.init(D,I,F,K),ne.endpoint=ne._endpoint,ne.bucket=ne._bucket,ne.object=ne._object,this._ossUpload=null,this._uploadCore(ne,A.retry),A.retry=!1}},{key:"setSTSToken",value:function(A,D,I,F){if(!D||!I||!F)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var K=A.videoInfo,ne={accessKeyId:D,securityToken:F,accessKeySecret:I,fileName:A.file.name,title:K.Title,requestId:A.ri,region:this.options.region};K.ImageType&&(ne.imageType=K.ImageType),K.ImageExt&&(ne.imageExt=K.ImageExt),K.FileSize&&(ne.fileSize=K.FileSize),K.Description&&(ne.description=K.Description),K.CateId&&(ne.cateId=K.CateId),K.Tags&&(ne.tags=K.Tags),K.TemplateGroupId&&(ne.templateGroupId=K.TemplateGroupId),K.StorageLocation&&(ne.storageLocation=K.StorageLocation),K.CoverURL&&(ne.coverUrl=K.CoverURL),K.TransCodeMode&&(ne.transCodeMode=K.TransCodeMode),K.UserData&&(ne.userData=K.UserData);var j=this,G="getUploadAuth";A.videoId?(ne.videoId=A.videoId,G="refreshUploadAuth"):A.isImage&&(G="getImageUploadAuth"),b.default[G](ne,function(X){A.videoId=X.VideoId?X.VideoId:A.videoId,j.setUploadAuthAndAddress(A,X.UploadAuth,X.UploadAddress),j._state=l.VODSTATE.START},function(X){j._error(A,{name:X.Code,code:X.Code,message:X.Message,requestId:X.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(A,D,I,F){if(!A||!D||!I)return!1;var K=JSON.parse(c.default.decode(D));if(!(K.AccessKeyId&&K.AccessKeySecret&&K.SecurityToken&&K.Expiration))return console.error("uploadauth is invalid"),!1;var ne={},j=A;if(I){if(ne=JSON.parse(c.default.decode(I)),!ne.Endpoint||!ne.Bucket||!ne.FileName)return console.error("uploadAddress is invalid"),!1}else ne.Endpoint=j.endpoint,ne.Bucket=j.bucket,ne.FileName=j.object;this._ut="vod",this._uploadWay="vod",this.options.region=K.Region||this.options.region,this.init(K.AccessKeyId,K.AccessKeySecret,K.SecurityToken,K.Expiration),j.endpoint=j._endpoint?j._endpoint:ne.Endpoint,j.bucket=j._bucket?j._bucket:ne.Bucket,j.object=j._object?j._object:ne.FileName,j.region=this.options.region,F&&(j.videoId=F),this._ossUpload=null,this._uploadCore(j,A.retry),A.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(A,D,I,F){if(!D||!I||!F)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var K={accessKeyId:D,securityToken:F,accessKeySecret:I,videoId:A.object,requestId:A.ri,region:this.options.region},ne=this,j="refreshUploadAuth";A.isImage&&(j="getImageUploadAuth"),b.default[j](K,function(G){ne.setUploadAuthAndAddress(A,G.UploadAuth,UploadAddress),ne._state=l.VODSTATE.START},function(G){ne._error(A,{name:G.Code,code:G.Code,message:G.Message,requestId:G.RequestId})})}},{key:"_upload",value:function(A){var D=arguments.length>1&&arguments[1]!==void 0&&arguments[1],I=this.options;if(A.retry=D,I.onUploadstarted&&!D)try{var F=this._getCheckoutpoint(A);F&&F.state!=l.UPLOADSTATE.UPLOADING&&(A.checkpoint=F,A.videoId=F.videoId),I.onUploadstarted(A)}catch(K){console.log(K)}}},{key:"_uploadCore",value:function(A){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1],!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId\u3001AccessKeySecret\u3001securityToken should not be null");if(A.state=l.UPLOADSTATE.UPLOADING,!this._ossUpload){A.endpoint=A.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var D=this;this._ossUpload=new d.default({bucket:A.bucket,endpoint:A.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(X,J){D._error.call(D,X,J)},oncomplete:function(X,J){D._complete.call(D,X,J)},onprogress:function(X,J,B){D._progress.call(D,X,J,B)}})}var I=u.default.getFileType(A.file.name),F=this._getCheckoutpoint(A),K="",ne="";F&&F.checkpoint&&(ne=F.state,K=F.videoId,F=F.checkpoint),F&&K==A.videoId&&ne!=l.UPLOADSTATE.UPLOADING&&(F.file=A.file,A.checkpoint=F,F.uploadId);var j=this._adjustPartSize(A);this._reportLog("20002",A,{ft:I,fs:A.file.size,bu:A.bucket,ok:A.object,vid:A.videoId||"",fn:A.file.name,fw:null,fh:null,ps:j});var G={headers:{"x-oss-notification":A.userData?A.userData:""},partSize:j,parallel:this.options.parallel};this._ossUpload.upload(A,G)}},{key:"_findUploadIndex",value:function(){for(var A=-1,D=0;D<this._uploadList.length;D++)if(this._uploadList[D].state==l.UPLOADSTATE.INIT){A=D;break}return A}},{key:"_error",value:function(A,D){if(D.name=="cancel")try{this.options.onUploadCanceled(A,D)}catch(F){console.log(F)}else{if(D.message.indexOf("InvalidAccessKeyIdError")>0||D.name=="SignatureDoesNotMatchError"||D.code=="SecurityTokenExpired"||D.code=="InvalidSecurityToken.Expired"||D.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=l.VODSTATE.EXPIRE,A.state=l.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(A,D)}catch(F){console.log(F)}}return}if((D.name=="RequestTimeoutError"||D.name=="ConnectionTimeout"||D.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var I=this;return setTimeout(function(){I._uploadCore(A,!0)},1e3*I._retryDuration),void this._retryCount++}D.name=="NoSuchUploadError"&&this._removeCheckoutpoint(A),this._handleError(A,D)}}},{key:"_handleError",value:function(A,D){var I=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],F=l.UPLOADSTATE.FAIlURE;if(A.state!=l.UPLOADSTATE.CANCELED&&(A.state=l.UPLOADSTATE.FAIlURE,this._state=l.VODSTATE.FAILURE,this.options.onUploadFailed&&D&&D.code&&D.message))try{this.options.onUploadFailed(A,D.code,D.message)}catch(ne){console.log(ne)}if(I&&this._changeState(A,F),this._reportLog("20006",A,{code:D.name,message:D.message,requestId:D.requestId,fs:A.file.size,bu:A.bucket,ok:A.object,fn:A.file.name}),this._reportLog("20004",A,{requestId:D.requestId,fs:A.file.size,bu:A.bucket,ok:A.object,fn:A.file.name}),A.ri=g.default.create(),this._findUploadIndex()!=-1){var K=this;this._state=l.VODSTATE.START,setTimeout(function(){K.nextUpload()},100)}}},{key:"_complete",value:function(A,D){if(A.state=l.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(A)}catch(K){console.log(K)}var I=0;D&&D.res&&D.res.headers&&(I=D.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(A);var F=this;setTimeout(function(){F.nextUpload()},100),this._retryCount=0,this._reportLog("20003",A,{requestId:I})}},{key:"_progress",value:function(A,D,I){if(this.options.onUploadProgress)try{A.loaded=D.loaded,this.options.onUploadProgress(A,D.total,D.loaded)}catch(J){console.log(J)}var F=D.checkpoint,K=0;F&&(A.checkpoint=F,this._saveCheckoutpoint(A,F,l.UPLOADSTATE.UPLOADING),K=F.uploadId),this._retryCount=0;var ne=this._getPortNumber(F),j=0;if(I&&I.headers&&(j=I.headers["x-oss-request-id"]),D.loaded!=0&&this._reportLog("20007",A,{pn:ne,requestId:j}),D.loaded!=1&&this._reportLog("20005",A,{UploadId:K,pn:ne+1,pr:A.retry?1:0,fs:A.file.size,bu:A.bucket,ok:A.object,fn:A.file.name}),!this._invalidUserId&&!A.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var G={file:A.file,checkpoint:D,userId:this.options.userId,videoId:A.videoId,region:this.options.region,fileHash:A.fileHash};try{var X=this;m.default.upload(G,function(){},function(J){if((J=JSON.parse(J))&&J.Code=="InvalidParameter"&&J.Message.indexOf("UserId")>0){X._invalidUserId=!0;var B=J.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(B)}})}catch(J){console.log(J)}}}},{key:"_getPortNumber",value:function(A){if(A){var D=A.doneParts;if(D&&D.length>0)return D[D.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(A){var D=this._getCheckoutpointKey(A);f.default.remove(D)}},{key:"_getCheckoutpoint",value:function(A){var D=this._getCheckoutpointKey(A),I=f.default.get(D);if(I)try{return JSON.parse(I)}catch(F){}return""}},{key:"_saveCheckoutpoint",value:function(A,D,I){if(D){var F=this._getCheckoutpointKey(A),K=A.file,ne={fileName:K.name,lastModified:K.lastModified,size:K.size,object:A.object,videoId:A.videoId,bucket:A.bucket,endpoint:A.endpoint,checkpoint:D,loaded:A.loaded,state:I};f.default.set(F,JSON.stringify(ne))}}},{key:"_changeState",value:function(A,D){var I=this._getCheckoutpoint(A);I&&((this._onbeforeunload=!0)&&(D=l.UPLOADSTATE.STOPED),this._saveCheckoutpoint(A,I.checkpoint,D))}},{key:"_getCheckoutpointKey",value:function(A){return"upload_"+A.file.lastModified+"_"+A.file.name+"_"+A.file.size}},{key:"_getCheckoutpointFromCloud",value:function(A,D,I){var F={userId:this.options.userId,uploadInfoList:[{FileName:A.file.name,FileSize:A.file.size,FileCreateTime:A.file.lastModified,FileHash:A.fileHash}],region:this.options.region};m.default.get(F,function(K){D(K)},I)}},{key:"_reportLog",value:function(A,D,I){I||(I={}),I.ri=D.ri,this._ut&&(I.ut=this._ut),this._log.log(A,I)}},{key:"_initEvent",value:function(){var A=this;window&&(window.onbeforeunload=function(D){if(A._onbeforeunload=!0,A._curIndex!=-1&&A._uploadList.length>A._curIndex){var I=A._uploadList[A._curIndex];A._changeState(I,l.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var A=0;A<this._uploadList.length;A++){var D=this._uploadList[A];D.state!=l.UPLOADSTATE.FAIlURE&&D.state!=l.UPLOADSTATE.STOPED||(D.state=l.UPLOADSTATE.INIT)}this._state=l.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(A){return A.file.size/this.options.partSize>1e4?A.file.size/9999:this.options.partSize}}]),O}());w.default=x},function(U,w,P){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},w.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(U,w,P){"use strict";function S(o){return o&&o.__esModule?o:{default:o}}function C(o,c){if(!(o instanceof c))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function o(c,s){for(var f=0;f<s.length;f++){var i=s[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}return function(c,s,f){return s&&o(c.prototype,s),f&&o(c,f),c}}(),l=P(3),p=P(17),h=(S(p),P(1)),d=(S(h),function(){function o(c,s){if(C(this,o),c){this._config=c,this.create(this._config),this._uploadInfo=null,this._callback={};var f=function(){};this._callback.onerror=s.onerror||f,this._callback.oncomplete=s.oncomplete||f,this._callback.onprogress=s.onprogress||f}}return T(o,[{key:"create",value:function(c){if(c.endpoint=c.endpoint||this._config.endpoint,c.bucket=c.bucket||this._config.bucket,!(c.AccessKeyId&&c.AccessKeySecret&&c.endpoint&&c.SecurityToken))throw new Error("AccessKeyId\u3001AccessKeySecret\u3001endpoint should not be null");var s={accessKeyId:c.AccessKeyId,accessKeySecret:c.AccessKeySecret,stsToken:c.SecurityToken,endpoint:c.endpoint||this._config.endpoint,bucket:c.bucket||this._config.bucket,secure:!0,cname:c.cname};c.timeout&&(s.timeout=c.timeout),this.oss=new OSS.Wrapper(s)}},{key:"abort",value:function(c){if(c.checkpoint){var s=c.checkpoint.uploadId;this.oss.abortMultipartUpload(c.object,s)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(c,s){this._uploadInfo=c;var f=this,i=function(t,u,y){return function(g){f._progress(t,u,y),g()}},n={parallel:s.parallel||this._config.parallel||l.UPLOADDEFAULT.PARALLEL,partSize:s.partSize||this._config.partSize||l.UPLOADDEFAULT.PARTSIZE,progress:i};s.headers&&(n.headers=s.headers),c.checkpoint&&(n.checkpoint=c.checkpoint),c.bucket||(this.oss.options.bucket=c.bucket),c.endpoint||(this.oss.options.endpoint=c.endpoint),this.oss.multipartUpload(c.object,c.file,n).then(function(t,u){f._complete(t)}).catch(function(t){f.oss.cancel&&(f.oss&&f.oss.isCancel()?console.log("oss is cancel as error"):f.oss.cancel()),f._error(t)})}},{key:"header",value:function(c,s,f){this.oss.get(c.object).then(function(i){s(i)}).catch(function(i){f(i)})}},{key:"_progress",value:function(c,s,f){this._callback.onprogress(this._uploadInfo,{loaded:c,total:this._uploadInfo.file.size,checkpoint:s},f)}},{key:"_error",value:function(c){this._callback.onerror(this._uploadInfo,c)}},{key:"_complete",value:function(c){this._callback.oncomplete(this._uploadInfo,c)}}]),o}());w.default=d},function(U,w,P){"use strict";function S(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function l(p,h){for(var d=0;d<h.length;d++){var o=h[d];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(p,o.key,o)}}return function(p,h,d){return h&&l(p.prototype,h),d&&l(p,d),p}}(),T=function(){function l(){S(this,l)}return C(l,null,[{key:"format",value:function(p){if(arguments.length<2)return null;for(var h=arguments[1],d=1;d<arguments.length;d++){var o=new RegExp("\\{"+(d-1)+"\\}","gm");h=h.replace(o,arguments[d+1])}return{code:p,message:h}}},{key:"CODE",get:function(){return{SUCCESS:"Successful",EmptyValue:"InvalidParameter.EmptyValue",STSInvalid:"InvalidParameter.TokenInvalid",ReadFileError:"ReadFileError",FILEDUPLICATION:"FileDuplication",UploadALEADRYSTARTED:"UploadAlearyStarted"}}},{key:"MESSAGE",get:function(){return{SUCCESS:"Successful",EmptyValue:"\u53C2\u6570 {0} \u4E0D\u80FD\u4E3A\u7A7A\u3002",STSInvalid:"STS\u53C2\u6570\u975E\u6CD5\uFF0C accessKeyId\u3001accessKeySecret\u3001secretToken\u3001expireTime\u90FD\u4E0D\u80FD\u4E3A\u7A7A\u3002",ReadFileError:"\u8BFB\u53D6\u6587\u4EF6{0}{1}\u5931\u8D25.",FILEDUPLICATION:"\u6587\u4EF6\u91CD\u590D\u6DFB\u52A0 {0}",UploadALEADRYSTARTED:"\u91CD\u590D\u5F00\u59CB."}}}]),l}();w.default=T},function(U,w,P){"use strict";(function(S){function C(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function p(h,d){for(var o=0;o<d.length;o++){var c=d[o];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,d,o){return d&&p(h.prototype,d),o&&p(h,o),h}}(),l=function(){function p(){C(this,p)}return T(p,null,[{key:"encode",value:function(h){return new S(h).toString("base64")}},{key:"decode",value:function(h){return new S(h,"base64").toString()}}]),p}();w.default=l}).call(w,P(19).Buffer)},function(U,w,P){"use strict";(function(S){function C(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function T(ee,M){if(C()<M)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(ee=new Uint8Array(M),ee.__proto__=l.prototype):(ee===null&&(ee=new l(M)),ee.length=M),ee}function l(ee,M,N){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(ee,M,N);if(typeof ee=="number"){if(typeof M=="string")throw new Error("If encoding is specified then the first argument must be a string");return o(this,ee)}return p(this,ee,M,N)}function p(ee,M,N,$){if(typeof M=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&M instanceof ArrayBuffer?f(ee,M,N,$):typeof M=="string"?c(ee,M,N):i(ee,M)}function h(ee){if(typeof ee!="number")throw new TypeError('"size" argument must be a number');if(ee<0)throw new RangeError('"size" argument must not be negative')}function d(ee,M,N,$){return h(M),M<=0?T(ee,M):N!==void 0?typeof $=="string"?T(ee,M).fill(N,$):T(ee,M).fill(N):T(ee,M)}function o(ee,M){if(h(M),ee=T(ee,M<0?0:0|n(M)),!l.TYPED_ARRAY_SUPPORT)for(var N=0;N<M;++N)ee[N]=0;return ee}function c(ee,M,N){if(typeof N=="string"&&N!==""||(N="utf8"),!l.isEncoding(N))throw new TypeError('"encoding" must be a valid string encoding');var $=0|u(M,N);ee=T(ee,$);var V=ee.write(M,N);return V!==$&&(ee=ee.slice(0,V)),ee}function s(ee,M){var N=M.length<0?0:0|n(M.length);ee=T(ee,N);for(var $=0;$<N;$+=1)ee[$]=255&M[$];return ee}function f(ee,M,N,$){if(M.byteLength,N<0||M.byteLength<N)throw new RangeError("'offset' is out of bounds");if(M.byteLength<N+($||0))throw new RangeError("'length' is out of bounds");return M=N===void 0&&$===void 0?new Uint8Array(M):$===void 0?new Uint8Array(M,N):new Uint8Array(M,N,$),l.TYPED_ARRAY_SUPPORT?(ee=M,ee.__proto__=l.prototype):ee=s(ee,M),ee}function i(ee,M){if(l.isBuffer(M)){var N=0|n(M.length);return ee=T(ee,N),ee.length===0||M.copy(ee,0,0,N),ee}if(M){if(typeof ArrayBuffer!="undefined"&&M.buffer instanceof ArrayBuffer||"length"in M)return typeof M.length!="number"||Le(M.length)?T(ee,0):s(ee,M);if(M.type==="Buffer"&&ke(M.data))return s(ee,M.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function n(ee){if(ee>=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return 0|ee}function t(ee){return+ee!=ee&&(ee=0),l.alloc(+ee)}function u(ee,M){if(l.isBuffer(ee))return ee.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ee)||ee instanceof ArrayBuffer))return ee.byteLength;typeof ee!="string"&&(ee=""+ee);var N=ee.length;if(N===0)return 0;for(var $=!1;;)switch(M){case"ascii":case"latin1":case"binary":return N;case"utf8":case"utf-8":case void 0:return pe(ee).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*N;case"hex":return N>>>1;case"base64":return Me(ee).length;default:if($)return pe(ee).length;M=(""+M).toLowerCase(),$=!0}}function y(ee,M,N){var $=!1;if((M===void 0||M<0)&&(M=0),M>this.length)return"";if((N===void 0||N>this.length)&&(N=this.length),N<=0)return"";if(N>>>=0,M>>>=0,N<=M)return"";for(ee||(ee="utf8");;)switch(ee){case"hex":return ne(this,M,N);case"utf8":case"utf-8":return D(this,M,N);case"ascii":return F(this,M,N);case"latin1":case"binary":return K(this,M,N);case"base64":return A(this,M,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,M,N);default:if($)throw new TypeError("Unknown encoding: "+ee);ee=(ee+"").toLowerCase(),$=!0}}function g(ee,M,N){var $=ee[M];ee[M]=ee[N],ee[N]=$}function _(ee,M,N,$,V){if(ee.length===0)return-1;if(typeof N=="string"?($=N,N=0):N>2147483647?N=2147483647:N<-2147483648&&(N=-2147483648),N=+N,isNaN(N)&&(N=V?0:ee.length-1),N<0&&(N=ee.length+N),N>=ee.length){if(V)return-1;N=ee.length-1}else if(N<0){if(!V)return-1;N=0}if(typeof M=="string"&&(M=l.from(M,$)),l.isBuffer(M))return M.length===0?-1:b(ee,M,N,$,V);if(typeof M=="number")return M&=255,l.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?V?Uint8Array.prototype.indexOf.call(ee,M,N):Uint8Array.prototype.lastIndexOf.call(ee,M,N):b(ee,[M],N,$,V);throw new TypeError("val must be string, number or Buffer")}function b(ee,M,N,$,V){function Y(Ve,Ke){return me===1?Ve[Ke]:Ve.readUInt16BE(Ke*me)}var me=1,Re=ee.length,rt=M.length;if($!==void 0&&(($=String($).toLowerCase())==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(ee.length<2||M.length<2)return-1;me=2,Re/=2,rt/=2,N/=2}var Pe;if(V){var Ie=-1;for(Pe=N;Pe<Re;Pe++)if(Y(ee,Pe)===Y(M,Ie===-1?0:Pe-Ie)){if(Ie===-1&&(Ie=Pe),Pe-Ie+1===rt)return Ie*me}else Ie!==-1&&(Pe-=Pe-Ie),Ie=-1}else for(N+rt>Re&&(N=Re-rt),Pe=N;Pe>=0;Pe--){for(var Xe=!0,tt=0;tt<rt;tt++)if(Y(ee,Pe+tt)!==Y(M,tt)){Xe=!1;break}if(Xe)return Pe}return-1}function v(ee,M,N,$){N=Number(N)||0;var V=ee.length-N;$?($=Number($))>V&&($=V):$=V;var Y=M.length;if(Y%2!=0)throw new TypeError("Invalid hex string");$>Y/2&&($=Y/2);for(var me=0;me<$;++me){var Re=parseInt(M.substr(2*me,2),16);if(isNaN(Re))return me;ee[N+me]=Re}return me}function m(ee,M,N,$){return Ce(pe(M,ee.length-N),ee,N,$)}function E(ee,M,N,$){return Ce(Oe(M),ee,N,$)}function a(ee,M,N,$){return E(ee,M,N,$)}function x(ee,M,N,$){return Ce(Me(M),ee,N,$)}function O(ee,M,N,$){return Ce(Fe(M,ee.length-N),ee,N,$)}function A(ee,M,N){return M===0&&N===ee.length?de.fromByteArray(ee):de.fromByteArray(ee.slice(M,N))}function D(ee,M,N){N=Math.min(ee.length,N);for(var $=[],V=M;V<N;){var Y=ee[V],me=null,Re=Y>239?4:Y>223?3:Y>191?2:1;if(V+Re<=N){var rt,Pe,Ie,Xe;switch(Re){case 1:Y<128&&(me=Y);break;case 2:rt=ee[V+1],(192&rt)==128&&(Xe=(31&Y)<<6|63&rt)>127&&(me=Xe);break;case 3:rt=ee[V+1],Pe=ee[V+2],(192&rt)==128&&(192&Pe)==128&&(Xe=(15&Y)<<12|(63&rt)<<6|63&Pe)>2047&&(Xe<55296||Xe>57343)&&(me=Xe);break;case 4:rt=ee[V+1],Pe=ee[V+2],Ie=ee[V+3],(192&rt)==128&&(192&Pe)==128&&(192&Ie)==128&&(Xe=(15&Y)<<18|(63&rt)<<12|(63&Pe)<<6|63&Ie)>65535&&Xe<1114112&&(me=Xe)}}me===null?(me=65533,Re=1):me>65535&&(me-=65536,$.push(me>>>10&1023|55296),me=56320|1023&me),$.push(me),V+=Re}return I($)}function I(ee){var M=ee.length;if(M<=Ue)return String.fromCharCode.apply(String,ee);for(var N="",$=0;$<M;)N+=String.fromCharCode.apply(String,ee.slice($,$+=Ue));return N}function F(ee,M,N){var $="";N=Math.min(ee.length,N);for(var V=M;V<N;++V)$+=String.fromCharCode(127&ee[V]);return $}function K(ee,M,N){var $="";N=Math.min(ee.length,N);for(var V=M;V<N;++V)$+=String.fromCharCode(ee[V]);return $}function ne(ee,M,N){var $=ee.length;(!M||M<0)&&(M=0),(!N||N<0||N>$)&&(N=$);for(var V="",Y=M;Y<N;++Y)V+=Ae(ee[Y]);return V}function j(ee,M,N){for(var $=ee.slice(M,N),V="",Y=0;Y<$.length;Y+=2)V+=String.fromCharCode($[Y]+256*$[Y+1]);return V}function G(ee,M,N){if(ee%1!=0||ee<0)throw new RangeError("offset is not uint");if(ee+M>N)throw new RangeError("Trying to access beyond buffer length")}function X(ee,M,N,$,V,Y){if(!l.isBuffer(ee))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>V||M<Y)throw new RangeError('"value" argument is out of bounds');if(N+$>ee.length)throw new RangeError("Index out of range")}function J(ee,M,N,$){M<0&&(M=65535+M+1);for(var V=0,Y=Math.min(ee.length-N,2);V<Y;++V)ee[N+V]=(M&255<<8*($?V:1-V))>>>8*($?V:1-V)}function B(ee,M,N,$){M<0&&(M=4294967295+M+1);for(var V=0,Y=Math.min(ee.length-N,4);V<Y;++V)ee[N+V]=M>>>8*($?V:3-V)&255}function Q(ee,M,N,$,V,Y){if(N+$>ee.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("Index out of range")}function ie(ee,M,N,$,V){return V||Q(ee,M,N,4,34028234663852886e22,-34028234663852886e22),ue.write(ee,M,N,$,23,4),N+4}function oe(ee,M,N,$,V){return V||Q(ee,M,N,8,17976931348623157e292,-17976931348623157e292),ue.write(ee,M,N,$,52,8),N+8}function xe(ee){if(ee=ye(ee).replace(Ye,""),ee.length<2)return"";for(;ee.length%4!=0;)ee+="=";return ee}function ye(ee){return ee.trim?ee.trim():ee.replace(/^\s+|\s+$/g,"")}function Ae(ee){return ee<16?"0"+ee.toString(16):ee.toString(16)}function pe(ee,M){M=M||1/0;for(var N,$=ee.length,V=null,Y=[],me=0;me<$;++me){if((N=ee.charCodeAt(me))>55295&&N<57344){if(!V){if(N>56319){(M-=3)>-1&&Y.push(239,191,189);continue}if(me+1===$){(M-=3)>-1&&Y.push(239,191,189);continue}V=N;continue}if(N<56320){(M-=3)>-1&&Y.push(239,191,189),V=N;continue}N=65536+(V-55296<<10|N-56320)}else V&&(M-=3)>-1&&Y.push(239,191,189);if(V=null,N<128){if((M-=1)<0)break;Y.push(N)}else if(N<2048){if((M-=2)<0)break;Y.push(N>>6|192,63&N|128)}else if(N<65536){if((M-=3)<0)break;Y.push(N>>12|224,N>>6&63|128,63&N|128)}else{if(!(N<1114112))throw new Error("Invalid code point");if((M-=4)<0)break;Y.push(N>>18|240,N>>12&63|128,N>>6&63|128,63&N|128)}}return Y}function Oe(ee){for(var M=[],N=0;N<ee.length;++N)M.push(255&ee.charCodeAt(N));return M}function Fe(ee,M){for(var N,$,V,Y=[],me=0;me<ee.length&&!((M-=2)<0);++me)N=ee.charCodeAt(me),$=N>>8,V=N%256,Y.push(V),Y.push($);return Y}function Me(ee){return de.toByteArray(xe(ee))}function Ce(ee,M,N,$){for(var V=0;V<$&&!(V+N>=M.length||V>=ee.length);++V)M[V+N]=ee[V];return V}function Le(ee){return ee!==ee}/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/var de=P(21),ue=P(22),ke=P(23);w.Buffer=l,w.SlowBuffer=t,w.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=S.TYPED_ARRAY_SUPPORT!==void 0?S.TYPED_ARRAY_SUPPORT:function(){try{var ee=new Uint8Array(1);return ee.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ee.foo()===42&&typeof ee.subarray=="function"&&ee.subarray(1,1).byteLength===0}catch(M){return!1}}(),w.kMaxLength=C(),l.poolSize=8192,l._augment=function(ee){return ee.__proto__=l.prototype,ee},l.from=function(ee,M,N){return p(null,ee,M,N)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(ee,M,N){return d(null,ee,M,N)},l.allocUnsafe=function(ee){return o(null,ee)},l.allocUnsafeSlow=function(ee){return o(null,ee)},l.isBuffer=function(ee){return!(ee==null||!ee._isBuffer)},l.compare=function(ee,M){if(!l.isBuffer(ee)||!l.isBuffer(M))throw new TypeError("Arguments must be Buffers");if(ee===M)return 0;for(var N=ee.length,$=M.length,V=0,Y=Math.min(N,$);V<Y;++V)if(ee[V]!==M[V]){N=ee[V],$=M[V];break}return N<$?-1:$<N?1:0},l.isEncoding=function(ee){switch(String(ee).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(ee,M){if(!ke(ee))throw new TypeError('"list" argument must be an Array of Buffers');if(ee.length===0)return l.alloc(0);var N;if(M===void 0)for(M=0,N=0;N<ee.length;++N)M+=ee[N].length;var $=l.allocUnsafe(M),V=0;for(N=0;N<ee.length;++N){var Y=ee[N];if(!l.isBuffer(Y))throw new TypeError('"list" argument must be an Array of Buffers');Y.copy($,V),V+=Y.length}return $},l.byteLength=u,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var ee=this.length;if(ee%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var M=0;M<ee;M+=2)g(this,M,M+1);return this},l.prototype.swap32=function(){var ee=this.length;if(ee%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var M=0;M<ee;M+=4)g(this,M,M+3),g(this,M+1,M+2);return this},l.prototype.swap64=function(){var ee=this.length;if(ee%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var M=0;M<ee;M+=8)g(this,M,M+7),g(this,M+1,M+6),g(this,M+2,M+5),g(this,M+3,M+4);return this},l.prototype.toString=function(){var ee=0|this.length;return ee===0?"":arguments.length===0?D(this,0,ee):y.apply(this,arguments)},l.prototype.equals=function(ee){if(!l.isBuffer(ee))throw new TypeError("Argument must be a Buffer");return this===ee||l.compare(this,ee)===0},l.prototype.inspect=function(){var ee="",M=w.INSPECT_MAX_BYTES;return this.length>0&&(ee=this.toString("hex",0,M).match(/.{2}/g).join(" "),this.length>M&&(ee+=" ... ")),"<Buffer "+ee+">"},l.prototype.compare=function(ee,M,N,$,V){if(!l.isBuffer(ee))throw new TypeError("Argument must be a Buffer");if(M===void 0&&(M=0),N===void 0&&(N=ee?ee.length:0),$===void 0&&($=0),V===void 0&&(V=this.length),M<0||N>ee.length||$<0||V>this.length)throw new RangeError("out of range index");if($>=V&&M>=N)return 0;if($>=V)return-1;if(M>=N)return 1;if(M>>>=0,N>>>=0,$>>>=0,V>>>=0,this===ee)return 0;for(var Y=V-$,me=N-M,Re=Math.min(Y,me),rt=this.slice($,V),Pe=ee.slice(M,N),Ie=0;Ie<Re;++Ie)if(rt[Ie]!==Pe[Ie]){Y=rt[Ie],me=Pe[Ie];break}return Y<me?-1:me<Y?1:0},l.prototype.includes=function(ee,M,N){return this.indexOf(ee,M,N)!==-1},l.prototype.indexOf=function(ee,M,N){return _(this,ee,M,N,!0)},l.prototype.lastIndexOf=function(ee,M,N){return _(this,ee,M,N,!1)},l.prototype.write=function(ee,M,N,$){if(M===void 0)$="utf8",N=this.length,M=0;else if(N===void 0&&typeof M=="string")$=M,N=this.length,M=0;else{if(!isFinite(M))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");M|=0,isFinite(N)?(N|=0,$===void 0&&($="utf8")):($=N,N=void 0)}var V=this.length-M;if((N===void 0||N>V)&&(N=V),ee.length>0&&(N<0||M<0)||M>this.length)throw new RangeError("Attempt to write outside buffer bounds");$||($="utf8");for(var Y=!1;;)switch($){case"hex":return v(this,ee,M,N);case"utf8":case"utf-8":return m(this,ee,M,N);case"ascii":return E(this,ee,M,N);case"latin1":case"binary":return a(this,ee,M,N);case"base64":return x(this,ee,M,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,ee,M,N);default:if(Y)throw new TypeError("Unknown encoding: "+$);$=(""+$).toLowerCase(),Y=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ue=4096;l.prototype.slice=function(ee,M){var N=this.length;ee=~~ee,M=M===void 0?N:~~M,ee<0?(ee+=N)<0&&(ee=0):ee>N&&(ee=N),M<0?(M+=N)<0&&(M=0):M>N&&(M=N),M<ee&&(M=ee);var $;if(l.TYPED_ARRAY_SUPPORT)$=this.subarray(ee,M),$.__proto__=l.prototype;else{var V=M-ee;$=new l(V,void 0);for(var Y=0;Y<V;++Y)$[Y]=this[Y+ee]}return $},l.prototype.readUIntLE=function(ee,M,N){ee|=0,M|=0,N||G(ee,M,this.length);for(var $=this[ee],V=1,Y=0;++Y<M&&(V*=256);)$+=this[ee+Y]*V;return $},l.prototype.readUIntBE=function(ee,M,N){ee|=0,M|=0,N||G(ee,M,this.length);for(var $=this[ee+--M],V=1;M>0&&(V*=256);)$+=this[ee+--M]*V;return $},l.prototype.readUInt8=function(ee,M){return M||G(ee,1,this.length),this[ee]},l.prototype.readUInt16LE=function(ee,M){return M||G(ee,2,this.length),this[ee]|this[ee+1]<<8},l.prototype.readUInt16BE=function(ee,M){return M||G(ee,2,this.length),this[ee]<<8|this[ee+1]},l.prototype.readUInt32LE=function(ee,M){return M||G(ee,4,this.length),(this[ee]|this[ee+1]<<8|this[ee+2]<<16)+16777216*this[ee+3]},l.prototype.readUInt32BE=function(ee,M){return M||G(ee,4,this.length),16777216*this[ee]+(this[ee+1]<<16|this[ee+2]<<8|this[ee+3])},l.prototype.readIntLE=function(ee,M,N){ee|=0,M|=0,N||G(ee,M,this.length);for(var $=this[ee],V=1,Y=0;++Y<M&&(V*=256);)$+=this[ee+Y]*V;return V*=128,$>=V&&($-=Math.pow(2,8*M)),$},l.prototype.readIntBE=function(ee,M,N){ee|=0,M|=0,N||G(ee,M,this.length);for(var $=M,V=1,Y=this[ee+--$];$>0&&(V*=256);)Y+=this[ee+--$]*V;return V*=128,Y>=V&&(Y-=Math.pow(2,8*M)),Y},l.prototype.readInt8=function(ee,M){return M||G(ee,1,this.length),128&this[ee]?-1*(255-this[ee]+1):this[ee]},l.prototype.readInt16LE=function(ee,M){M||G(ee,2,this.length);var N=this[ee]|this[ee+1]<<8;return 32768&N?4294901760|N:N},l.prototype.readInt16BE=function(ee,M){M||G(ee,2,this.length);var N=this[ee+1]|this[ee]<<8;return 32768&N?4294901760|N:N},l.prototype.readInt32LE=function(ee,M){return M||G(ee,4,this.length),this[ee]|this[ee+1]<<8|this[ee+2]<<16|this[ee+3]<<24},l.prototype.readInt32BE=function(ee,M){return M||G(ee,4,this.length),this[ee]<<24|this[ee+1]<<16|this[ee+2]<<8|this[ee+3]},l.prototype.readFloatLE=function(ee,M){return M||G(ee,4,this.length),ue.read(this,ee,!0,23,4)},l.prototype.readFloatBE=function(ee,M){return M||G(ee,4,this.length),ue.read(this,ee,!1,23,4)},l.prototype.readDoubleLE=function(ee,M){return M||G(ee,8,this.length),ue.read(this,ee,!0,52,8)},l.prototype.readDoubleBE=function(ee,M){return M||G(ee,8,this.length),ue.read(this,ee,!1,52,8)},l.prototype.writeUIntLE=function(ee,M,N,$){(ee=+ee,M|=0,N|=0,!$)&&X(this,ee,M,N,Math.pow(2,8*N)-1,0);var V=1,Y=0;for(this[M]=255&ee;++Y<N&&(V*=256);)this[M+Y]=ee/V&255;return M+N},l.prototype.writeUIntBE=function(ee,M,N,$){(ee=+ee,M|=0,N|=0,!$)&&X(this,ee,M,N,Math.pow(2,8*N)-1,0);var V=N-1,Y=1;for(this[M+V]=255&ee;--V>=0&&(Y*=256);)this[M+V]=ee/Y&255;return M+N},l.prototype.writeUInt8=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,1,255,0),l.TYPED_ARRAY_SUPPORT||(ee=Math.floor(ee)),this[M]=255&ee,M+1},l.prototype.writeUInt16LE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[M]=255&ee,this[M+1]=ee>>>8):J(this,ee,M,!0),M+2},l.prototype.writeUInt16BE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[M]=ee>>>8,this[M+1]=255&ee):J(this,ee,M,!1),M+2},l.prototype.writeUInt32LE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[M+3]=ee>>>24,this[M+2]=ee>>>16,this[M+1]=ee>>>8,this[M]=255&ee):B(this,ee,M,!0),M+4},l.prototype.writeUInt32BE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[M]=ee>>>24,this[M+1]=ee>>>16,this[M+2]=ee>>>8,this[M+3]=255&ee):B(this,ee,M,!1),M+4},l.prototype.writeIntLE=function(ee,M,N,$){if(ee=+ee,M|=0,!$){var V=Math.pow(2,8*N-1);X(this,ee,M,N,V-1,-V)}var Y=0,me=1,Re=0;for(this[M]=255&ee;++Y<N&&(me*=256);)ee<0&&Re===0&&this[M+Y-1]!==0&&(Re=1),this[M+Y]=(ee/me>>0)-Re&255;return M+N},l.prototype.writeIntBE=function(ee,M,N,$){if(ee=+ee,M|=0,!$){var V=Math.pow(2,8*N-1);X(this,ee,M,N,V-1,-V)}var Y=N-1,me=1,Re=0;for(this[M+Y]=255&ee;--Y>=0&&(me*=256);)ee<0&&Re===0&&this[M+Y+1]!==0&&(Re=1),this[M+Y]=(ee/me>>0)-Re&255;return M+N},l.prototype.writeInt8=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,1,127,-128),l.TYPED_ARRAY_SUPPORT||(ee=Math.floor(ee)),ee<0&&(ee=255+ee+1),this[M]=255&ee,M+1},l.prototype.writeInt16LE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[M]=255&ee,this[M+1]=ee>>>8):J(this,ee,M,!0),M+2},l.prototype.writeInt16BE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[M]=ee>>>8,this[M+1]=255&ee):J(this,ee,M,!1),M+2},l.prototype.writeInt32LE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[M]=255&ee,this[M+1]=ee>>>8,this[M+2]=ee>>>16,this[M+3]=ee>>>24):B(this,ee,M,!0),M+4},l.prototype.writeInt32BE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,4,2147483647,-2147483648),ee<0&&(ee=4294967295+ee+1),l.TYPED_ARRAY_SUPPORT?(this[M]=ee>>>24,this[M+1]=ee>>>16,this[M+2]=ee>>>8,this[M+3]=255&ee):B(this,ee,M,!1),M+4},l.prototype.writeFloatLE=function(ee,M,N){return ie(this,ee,M,!0,N)},l.prototype.writeFloatBE=function(ee,M,N){return ie(this,ee,M,!1,N)},l.prototype.writeDoubleLE=function(ee,M,N){return oe(this,ee,M,!0,N)},l.prototype.writeDoubleBE=function(ee,M,N){return oe(this,ee,M,!1,N)},l.prototype.copy=function(ee,M,N,$){if(N||(N=0),$||$===0||($=this.length),M>=ee.length&&(M=ee.length),M||(M=0),$>0&&$<N&&($=N),$===N)return 0;if(ee.length===0||this.length===0)return 0;if(M<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("sourceStart out of bounds");if($<0)throw new RangeError("sourceEnd out of bounds");$>this.length&&($=this.length),ee.length-M<$-N&&($=ee.length-M+N);var V,Y=$-N;if(this===ee&&N<M&&M<$)for(V=Y-1;V>=0;--V)ee[V+M]=this[V+N];else if(Y<1e3||!l.TYPED_ARRAY_SUPPORT)for(V=0;V<Y;++V)ee[V+M]=this[V+N];else Uint8Array.prototype.set.call(ee,this.subarray(N,N+Y),M);return Y},l.prototype.fill=function(ee,M,N,$){if(typeof ee=="string"){if(typeof M=="string"?($=M,M=0,N=this.length):typeof N=="string"&&($=N,N=this.length),ee.length===1){var V=ee.charCodeAt(0);V<256&&(ee=V)}if($!==void 0&&typeof $!="string")throw new TypeError("encoding must be a string");if(typeof $=="string"&&!l.isEncoding($))throw new TypeError("Unknown encoding: "+$)}else typeof ee=="number"&&(ee&=255);if(M<0||this.length<M||this.length<N)throw new RangeError("Out of range index");if(N<=M)return this;M>>>=0,N=N===void 0?this.length:N>>>0,ee||(ee=0);var Y;if(typeof ee=="number")for(Y=M;Y<N;++Y)this[Y]=ee;else{var me=l.isBuffer(ee)?ee:pe(new l(ee,$).toString()),Re=me.length;for(Y=0;Y<N-M;++Y)this[Y+M]=me[Y%Re]}return this};var Ye=/[^+\/0-9A-Za-z-_]/g}).call(w,P(20))},function(U,w){var P;P=function(){return this}();try{P=P||Function("return this")()||(0,eval)("this")}catch(S){typeof window=="object"&&(P=window)}U.exports=P},function(U,w,P){"use strict";function S(n){var t=n.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return n[t-2]==="="?2:n[t-1]==="="?1:0}function C(n){return 3*n.length/4-S(n)}function T(n){var t,u,y,g,_,b=n.length;g=S(n),_=new c(3*b/4-g),u=g>0?b-4:b;var v=0;for(t=0;t<u;t+=4)y=o[n.charCodeAt(t)]<<18|o[n.charCodeAt(t+1)]<<12|o[n.charCodeAt(t+2)]<<6|o[n.charCodeAt(t+3)],_[v++]=y>>16&255,_[v++]=y>>8&255,_[v++]=255&y;return g===2?(y=o[n.charCodeAt(t)]<<2|o[n.charCodeAt(t+1)]>>4,_[v++]=255&y):g===1&&(y=o[n.charCodeAt(t)]<<10|o[n.charCodeAt(t+1)]<<4|o[n.charCodeAt(t+2)]>>2,_[v++]=y>>8&255,_[v++]=255&y),_}function l(n){return d[n>>18&63]+d[n>>12&63]+d[n>>6&63]+d[63&n]}function p(n,t,u){for(var y,g=[],_=t;_<u;_+=3)y=(n[_]<<16)+(n[_+1]<<8)+n[_+2],g.push(l(y));return g.join("")}function h(n){for(var t,u=n.length,y=u%3,g="",_=[],b=0,v=u-y;b<v;b+=16383)_.push(p(n,b,b+16383>v?v:b+16383));return y===1?(t=n[u-1],g+=d[t>>2],g+=d[t<<4&63],g+="=="):y===2&&(t=(n[u-2]<<8)+n[u-1],g+=d[t>>10],g+=d[t>>4&63],g+=d[t<<2&63],g+="="),_.push(g),_.join("")}w.byteLength=C,w.toByteArray=T,w.fromByteArray=h;for(var d=[],o=[],c=typeof Uint8Array!="undefined"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,i=s.length;f<i;++f)d[f]=s[f],o[s.charCodeAt(f)]=f;o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(U,w){w.read=function(P,S,C,T,l){var p,h,d=8*l-T-1,o=(1<<d)-1,c=o>>1,s=-7,f=C?l-1:0,i=C?-1:1,n=P[S+f];for(f+=i,p=n&(1<<-s)-1,n>>=-s,s+=d;s>0;p=256*p+P[S+f],f+=i,s-=8);for(h=p&(1<<-s)-1,p>>=-s,s+=T;s>0;h=256*h+P[S+f],f+=i,s-=8);if(p===0)p=1-c;else{if(p===o)return h?NaN:1/0*(n?-1:1);h+=Math.pow(2,T),p-=c}return(n?-1:1)*h*Math.pow(2,p-T)},w.write=function(P,S,C,T,l,p){var h,d,o,c=8*p-l-1,s=(1<<c)-1,f=s>>1,i=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,n=T?0:p-1,t=T?1:-1,u=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(d=isNaN(S)?1:0,h=s):(h=Math.floor(Math.log(S)/Math.LN2),S*(o=Math.pow(2,-h))<1&&(h--,o*=2),S+=h+f>=1?i/o:i*Math.pow(2,1-f),S*o>=2&&(h++,o/=2),h+f>=s?(d=0,h=s):h+f>=1?(d=(S*o-1)*Math.pow(2,l),h+=f):(d=S*Math.pow(2,f-1)*Math.pow(2,l),h=0));l>=8;P[C+n]=255&d,n+=t,d/=256,l-=8);for(h=h<<l|d,c+=l;c>0;P[C+n]=255&h,n+=t,h/=256,c-=8);P[C+n-t]|=128*u}},function(U,w){var P={}.toString;U.exports=Array.isArray||function(S){return P.call(S)=="[object Array]"}},function(U,w,P){"use strict";function S(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function l(p,h){for(var d=0;d<h.length;d++){var o=h[d];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(p,o.key,o)}}return function(p,h,d){return h&&l(p.prototype,h),d&&l(p,d),p}}(),T=function(){function l(){S(this,l)}return C(l,null,[{key:"set",value:function(p,h){try{window.localStorage&&localStorage.setItem(p,h)}catch(d){window[p+"_localStorage"]=h}}},{key:"get",value:function(p){try{if(window.localStorage)return localStorage.getItem(p)}catch(h){return window[p+"_localStorage"]}return""}},{key:"remove",value:function(p){try{window.localStorage&&localStorage.removeItem(p)}catch(h){delete window[p+"_localStorage"]}}}]),l}();w.default=T},function(U,w,P){"use strict";function S(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function l(p,h){for(var d=0;d<h.length;d++){var o=h[d];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(p,o.key,o)}}return function(p,h,d){return h&&l(p.prototype,h),d&&l(p,d),p}}(),T=function(){function l(){S(this,l)}return C(l,null,[{key:"get",value:function(p){for(var h=p+"",d=document.cookie.split(";"),o=0;o<d.length;o++){var c=d[o].trim();if(c.indexOf(h)==0)return unescape(c.substring(h.length+1,c.length))}return""}},{key:"set",value:function(p,h,d){var o=new Date;o.setTime(o.getTime()+24*d*60*60*1e3);var c="expires="+o.toGMTString();document.cookie=p+"="+escape(h)+"; "+c}}]),l}();w.default=T},function(U,w,P){"use strict";function S(c){return c&&c.__esModule?c:{default:c}}function C(c,s){if(!(c instanceof s))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function c(s,f){for(var i=0;i<f.length;i++){var n=f[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}return function(s,f,i){return f&&c(s.prototype,f),i&&c(s,i),s}}(),l=P(8),p=S(l),h=P(9),d=S(h),o=function(){function c(){C(this,c)}return T(c,null,[{key:"refreshUploadAuth",value:function(s,f,i){var n=(d.default.randomUUID(),d.default.randomUUID()),t={AccessKeyId:s.accessKeyId,SecurityToken:s.securityToken,Action:"RefreshUploadVideo",VideoId:s.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:n,RequestId:s.requestId},u=d.default.makeUTF8sort(t,"=","&")+"&Signature="+d.default.aliyunEncodeURI(d.default.makeChangeSiga(t,s.accessKeySecret)),y="https://vod."+s.region+".aliyuncs.com/?"+u;p.default.get(y,function(g){var g=JSON.parse(g);f&&f(g)},function(g){if(i){var _=JSON.parse(g);i(_)}})}},{key:"getUploadAuth",value:function(s,f,i){var n=(d.default.randomUUID(),d.default.randomUUID()),t={AccessKeyId:s.accessKeyId,SecurityToken:s.securityToken,Action:"CreateUploadVideo",Title:s.title,FileName:s.fileName,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:n,RequestId:s.requestId};s.fileSize&&(t.FileSize=s.fileSize),s.description&&(t.Description=s.description),s.cateId&&(t.CateId=s.cateId),s.tags&&(t.Tags=s.tags),s.templateGroupId&&(t.TemplateGroupId=s.templateGroupId),s.storageLocation&&(t.StorageLocation=s.storageLocation),s.coverUrl&&(t.CoverURL=s.coverUrl),s.transCodeMode&&(t.TransCodeMode=s.transCodeMode),s.userData&&(t.UserData=JSON.stringify(s.userData));var u=d.default.makeUTF8sort(t,"=","&")+"&Signature="+d.default.aliyunEncodeURI(d.default.makeChangeSiga(t,s.accessKeySecret)),y="https://vod."+s.region+".aliyuncs.com/?"+u;p.default.get(y,function(g){try{g=JSON.parse(g)}catch(_){if(i)return void i({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}f&&f(g)},function(g){if(i){var _={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{_=JSON.parse(g)}catch(b){}i(_)}})}},{key:"getImageUploadAuth",value:function(s,f,i){var n=(d.default.randomUUID(),d.default.randomUUID()),t={AccessKeyId:s.accessKeyId,SecurityToken:s.securityToken,Action:"CreateUploadImage",ImageType:s.imageType?s.imageType:"default",Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:n,RequestId:s.requestId};s.title&&(t.Title=s.title),s.imageExt&&(t.ImageExt=s.imageExt),s.tags&&(t.Tags=s.tags),s.storageLocation&&(t.StorageLocation=s.storageLocation);var u=d.default.makeUTF8sort(t,"=","&")+"&Signature="+d.default.aliyunEncodeURI(d.default.makeChangeSiga(t,s.accessKeySecret)),y="https://vod."+s.region+".aliyuncs.com/?"+u;p.default.get(y,function(g){g=JSON.parse(g),f&&f(g)},function(g){if(i){var _=JSON.parse(g);i(_)}})}}]),c}();w.default=o},function(U,w,P){!function(S,C,T){U.exports=w=C(P(0),P(28),P(29))}(0,function(S){return S.HmacSHA1})},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){return function(){var C=S,T=C.lib,l=T.WordArray,p=T.Hasher,h=C.algo,d=[],o=h.SHA1=p.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,s){for(var f=this._hash.words,i=f[0],n=f[1],t=f[2],u=f[3],y=f[4],g=0;g<80;g++){if(g<16)d[g]=0|c[s+g];else{var _=d[g-3]^d[g-8]^d[g-14]^d[g-16];d[g]=_<<1|_>>>31}var b=(i<<5|i>>>27)+y+d[g];b+=g<20?1518500249+(n&t|~n&u):g<40?1859775393+(n^t^u):g<60?(n&t|n&u|t&u)-1894007588:(n^t^u)-899497514,y=u,u=t,t=n<<30|n>>>2,n=i,i=b}f[0]=f[0]+i|0,f[1]=f[1]+n|0,f[2]=f[2]+t|0,f[3]=f[3]+u|0,f[4]=f[4]+y|0},_doFinalize:function(){var c=this._data,s=c.words,f=8*this._nDataBytes,i=8*c.sigBytes;return s[i>>>5]|=128<<24-i%32,s[14+(i+64>>>9<<4)]=Math.floor(f/4294967296),s[15+(i+64>>>9<<4)]=f,c.sigBytes=4*s.length,this._process(),this._hash},clone:function(){var c=p.clone.call(this);return c._hash=this._hash.clone(),c}});C.SHA1=p._createHelper(o),C.HmacSHA1=p._createHmacHelper(o)}(),S.SHA1})},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){!function(){var C=S,T=C.lib,l=T.Base,p=C.enc,h=p.Utf8,d=C.algo;d.HMAC=l.extend({init:function(o,c){o=this._hasher=new o.init,typeof c=="string"&&(c=h.parse(c));var s=o.blockSize,f=4*s;c.sigBytes>f&&(c=o.finalize(c)),c.clamp();for(var i=this._oKey=c.clone(),n=this._iKey=c.clone(),t=i.words,u=n.words,y=0;y<s;y++)t[y]^=1549556828,u[y]^=909522486;i.sigBytes=n.sigBytes=f,this.reset()},reset:function(){var o=this._hasher;o.reset(),o.update(this._iKey)},update:function(o){return this._hasher.update(o),this},finalize:function(o){var c=this._hasher,s=c.finalize(o);return c.reset(),c.finalize(this._oKey.clone().concat(s))}})}()})},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){return function(){function C(d,o,c){for(var s=[],f=0,i=0;i<o;i++)if(i%4){var n=c[d.charCodeAt(i-1)]<<i%4*2,t=c[d.charCodeAt(i)]>>>6-i%4*2;s[f>>>2]|=(n|t)<<24-f%4*8,f++}return p.create(s,f)}var T=S,l=T.lib,p=l.WordArray,h=T.enc;h.Base64={stringify:function(d){var o=d.words,c=d.sigBytes,s=this._map;d.clamp();for(var f=[],i=0;i<c;i+=3)for(var n=o[i>>>2]>>>24-i%4*8&255,t=o[i+1>>>2]>>>24-(i+1)%4*8&255,u=o[i+2>>>2]>>>24-(i+2)%4*8&255,y=n<<16|t<<8|u,g=0;g<4&&i+.75*g<c;g++)f.push(s.charAt(y>>>6*(3-g)&63));var _=s.charAt(64);if(_)for(;f.length%4;)f.push(_);return f.join("")},parse:function(d){var o=d.length,c=this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var f=0;f<c.length;f++)s[c.charCodeAt(f)]=f}var i=c.charAt(64);if(i){var n=d.indexOf(i);n!==-1&&(o=n)}return C(d,o,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),S.enc.Base64})},function(U,w,P){"use strict";function S(v){return v&&v.__esModule?v:{default:v}}function C(v,m){if(!(v instanceof m))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function v(m,E){for(var a=0;a<E.length;a++){var x=E[a];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,E,a){return E&&v(m.prototype,E),a&&v(m,a),m}}(),l=P(8),p=S(l),h=P(7),d=S(h),o=P(4),c=S(o),s=P(6),f=S(s),i=P(1),n=S(i),t=P(9),u=S(t),y=P(2),g=P(11),_=P(10),b=function(){function v(){C(this,v)}return T(v,null,[{key:"getAuthInfo",value:function(m,E,a){var x=m+"|f#Ylm&^1TppeRhLg|"+a;return E&&(x=m+"|"+E+"|f#Ylm&^1TppeRhLg|"+a),y(_.parse(x)).toString(g)}},{key:"upload",value:function(m,E,a){var x=n.default.ISODateString(new Date),O=Math.floor(new Date().valueOf()/1e3),A=c.default.getClientId();A=c.default.setClientId(A);var D=v.getAuthInfo(m.userId,A,O),I=u.default.randomUUID(),F={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:d.default.browser.name+(d.default.browser.version||""),AppVersion:f.default.version,AuthTimestamp:O,Timestamp:x,AuthInfo:D,FileName:m.file.name,FileSize:m.file.size,FileCreateTime:m.file.lastModified,FileHash:m.fileHash,UploadId:m.checkpoint.checkpoint.uploadId,PartSize:m.checkpoint.checkpoint.partSize,DonePartsCount:m.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(m.checkpoint),UploadRatio:m.checkpoint.loaded,UserId:m.userId,VideoId:m.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:I};A&&(F.ClientId=A);var K=u.default.makeUTF8sort(F,"=","&")+"&Signature="+u.default.aliyunEncodeURI(u.default.makeChangeSiga(F,m.accessKeySecret)),ne="https://vod."+m.region+".aliyuncs.com/?"+K;p.default.get(ne,function(j){E&&E()},function(j){j&&(a(j),console.log(j))})}},{key:"get",value:function(m,E,a){var x=n.default.ISODateString(new Date),O=Math.floor(new Date().valueOf()/1e3),A=c.default.getClientId(),D=v.getAuthInfo(m.userId,A,O),I=u.default.randomUUID(),F={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:d.default.browser.name+(d.default.browser.version||""),AppVersion:f.default.version,AuthTimestamp:O,Timestamp:x,AuthInfo:D,UserId:m.userId,UploadInfoList:JSON.stringify(m.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:I};A&&(F.ClientId=A);var K=u.default.makeUTF8sort(F,"=","&")+"&Signature="+u.default.aliyunEncodeURI(u.default.makeChangeSiga(F,m.accessKeySecret)),ne="https://vod."+m.region+".aliyuncs.com/?"+K;p.default.get(ne,function(j){var G={},X=A;j=j?JSON.parse(j):{},j.UploadProgress&&j.UploadProgress.UploadProgressList&&j.UploadProgress.UploadProgressList.length>0&&(G=j.UploadProgress.UploadProgressList[0],X=G.ClientId),c.default.setClientId(X),E&&E(G)},function(j){j&&(a(j),console.log(j))})}}]),v}();w.default=b},function(U,w,P){"use strict";function S(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function h(d,o){for(var c=0;c<o.length;c++){var s=o[c];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,s.key,s)}}return function(d,o,c){return o&&h(d.prototype,o),c&&h(d,c),d}}(),T=P(2),l=P(33),p=(P(11),function(){function h(){S(this,h)}return C(h,null,[{key:"getMd5",value:function(d,o,c){var s=new FileReader;s.onload=function(n){try{if(n&&n.target){var t=T(l.parse(n.target.result)),u=t.toString();o(u)}}catch(y){console.log(y)}},s.onerror=function(n){console.log(n),errorCallback(n)};var f=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,i=f.call(d,0,1024);s.readAsBinaryString(i)}}]),h}());w.default=p},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){return S.enc.Latin1})}])}).call(this,z("IyRk"))},ps8w:function($e,We,z){$e.exports=z.p+"static/show.6268a056.svg"},"rAM+":function($e,We,z){"use strict";z.d(We,"a",function(){return Z});var ae=z("Qw5x");function Z(U,w){var P;if(typeof Symbol=="undefined"||U[Symbol.iterator]==null){if(Array.isArray(U)||(P=Object(ae.a)(U))||w&&U&&typeof U.length=="number"){P&&(U=P);var S=0,C=function(){};return{s:C,n:function(){return S>=U.length?{done:!0}:{done:!1,value:U[S++]}},e:function(d){throw d},f:C}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var T=!0,l=!1,p;return{s:function(){P=U[Symbol.iterator]()},n:function(){var d=P.next();return T=d.done,d},e:function(d){l=!0,p=d},f:function(){try{!T&&P.return!=null&&P.return()}finally{if(l)throw p}}}}},rHrb:function($e,We,z){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.CopyToClipboard=void 0;var ae=U(z("q1tI")),Z=U(z("+QRC"));function U(t){return t&&t.__esModule?t:{default:t}}function w(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?w=function(y){return typeof y}:w=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},w(t)}function P(t,u){var y=Object.keys(t);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(t);u&&(g=g.filter(function(_){return Object.getOwnPropertyDescriptor(t,_).enumerable})),y.push.apply(y,g)}return y}function S(t){for(var u=1;u<arguments.length;u++){var y=arguments[u]!=null?arguments[u]:{};u%2?P(y,!0).forEach(function(g){i(t,g,y[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(y)):P(y).forEach(function(g){Object.defineProperty(t,g,Object.getOwnPropertyDescriptor(y,g))})}return t}function C(t,u){if(t==null)return{};var y=T(t,u),g,_;if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(t);for(_=0;_<b.length;_++){if(g=b[_],u.indexOf(g)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(t,g))continue;y[g]=t[g]}}return y}function T(t,u){if(t==null)return{};var y={},g=Object.keys(t),_,b;for(b=0;b<g.length;b++){if(_=g[b],u.indexOf(_)>=0)continue;y[_]=t[_]}return y}function l(t,u){if(!(t instanceof u))throw new TypeError("Cannot call a class as a function")}function p(t,u){for(var y=0;y<u.length;y++){var g=u[y];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(t,g.key,g)}}function h(t,u,y){return u&&p(t.prototype,u),y&&p(t,y),t}function d(t,u){return u&&(w(u)==="object"||typeof u=="function")?u:c(t)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},o(t)}function c(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(u&&u.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),u&&f(t,u)}function f(t,u){return f=Object.setPrototypeOf||function(g,_){return g.__proto__=_,g},f(t,u)}function i(t,u,y){return u in t?Object.defineProperty(t,u,{value:y,enumerable:!0,configurable:!0,writable:!0}):t[u]=y,t}var n=function(t){s(u,t);function u(){var y,g;l(this,u);for(var _=arguments.length,b=new Array(_),v=0;v<_;v++)b[v]=arguments[v];return g=d(this,(y=o(u)).call.apply(y,[this].concat(b))),i(c(g),"onClick",function(m){var E=g.props,a=E.text,x=E.onCopy,O=E.children,A=E.options,D=ae.default.Children.only(O),I=(0,Z.default)(a,A);x&&x(a,I),D&&D.props&&typeof D.props.onClick=="function"&&D.props.onClick(m)}),g}return h(u,[{key:"render",value:function(){var g=this.props,_=g.text,b=g.onCopy,v=g.options,m=g.children,E=C(g,["text","onCopy","options","children"]),a=ae.default.Children.only(m);return ae.default.cloneElement(a,S({},E,{onClick:this.onClick}))}}]),u}(ae.default.PureComponent);We.CopyToClipboard=n,i(n,"defaultProps",{onCopy:void 0,options:void 0})},rUJ1:function($e,We){const z=/[&<>"']/,ae=/[&<>"']/g,Z=/[<>"']|&(?!#?\w+;)/,U=/[<>"']|&(?!#?\w+;)/g,w={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},P=v=>w[v];function S(v,m){if(m){if(z.test(v))return v.replace(ae,P)}else if(Z.test(v))return v.replace(U,P);return v}const C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function T(v){return v.replace(C,(m,E)=>(E=E.toLowerCase(),E==="colon"?":":E.charAt(0)==="#"?E.charAt(1)==="x"?String.fromCharCode(parseInt(E.substring(2),16)):String.fromCharCode(+E.substring(1)):""))}const l=/(^|[^\[])\^/g;function p(v,m){v=v.source||v,m=m||"";const E={replace:(a,x)=>(x=x.source||x,x=x.replace(l,"$1"),v=v.replace(a,x),E),getRegex:()=>new RegExp(v,m)};return E}const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function o(v,m,E){if(v){let a;try{a=decodeURIComponent(T(E)).replace(h,"").toLowerCase()}catch(x){return null}if(a.indexOf("javascript:")===0||a.indexOf("vbscript:")===0||a.indexOf("data:")===0)return null}m&&!d.test(E)&&(E=n(m,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(a){return null}return E}const c={},s=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,i=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(v,m){c[" "+v]||(s.test(v)?c[" "+v]=v+"/":c[" "+v]=g(v,"/",!0)),v=c[" "+v];const E=v.indexOf(":")===-1;return m.substring(0,2)==="//"?E?m:v.replace(f,"$1")+m:m.charAt(0)==="/"?E?m:v.replace(i,"$1")+m:v+m}const t={exec:function(){}};function u(v){let m=1,E,a;for(;m<arguments.length;m++){E=arguments[m];for(a in E)Object.prototype.hasOwnProperty.call(E,a)&&(v[a]=E[a])}return v}function y(v,m){const E=v.replace(/\|/g,(O,A,D)=>{let I=!1,F=A;for(;--F>=0&&D[F]==="\\";)I=!I;return I?"|":" |"}),a=E.split(/ \|/);let x=0;if(a.length>m)a.splice(m);else for(;a.length<m;)a.push("");for(;x<a.length;x++)a[x]=a[x].trim().replace(/\\\|/g,"|");return a}function g(v,m,E){const a=v.length;if(a===0)return"";let x=0;for(;x<a;){const O=v.charAt(a-x-1);if(O===m&&!E)x++;else if(O!==m&&E)x++;else break}return v.substr(0,a-x)}function _(v,m){if(v.indexOf(m[1])===-1)return-1;const E=v.length;let a=0,x=0;for(;x<E;x++)if(v[x]==="\\")x++;else if(v[x]===m[0])a++;else if(v[x]===m[1]&&(a--,a<0))return x;return-1}function b(v){v&&v.sanitize&&!v.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}$e.exports={escape:S,unescape:T,edit:p,cleanUrl:o,resolveUrl:n,noopTest:t,merge:u,splitCells:y,rtrim:g,findClosingBracket:_,checkSanitizeDeprecation:b}},rdUC:function($e,We,z){var ae=z("MFOe"),Z=ae.Global;$e.exports={name:"localStorage",read:w,write:P,each:S,remove:C,clearAll:T};function U(){return Z.localStorage}function w(l){return U().getItem(l)}function P(l,p){return U().setItem(l,p)}function S(l){for(var p=U().length-1;p>=0;p--){var h=U().key(p);l(w(h),h)}}function C(l){return U().removeItem(l)}function T(){return U().clear()}},"s8/Y":function($e,We,z){$e.exports=z.p+"static/jx.6713fc81.svg"},"sB/4":function($e,We,z){$e.exports=z.p+"static/b.7405990c.svg"},sNtx:function($e,We,z){},sR1s:function($e,We,z){"use strict";z.d(We,"b",function(){return w}),z.d(We,"a",function(){return P}),z.d(We,"c",function(){return S}),z.d(We,"d",function(){return C});var ae=z("U8pU"),Z="RC_TABLE_KEY";function U(T){return T==null?[]:Array.isArray(T)?T:[T]}function w(T,l){if(!l&&typeof l!="number")return T;for(var p=U(l),h=T,d=0;d<p.length;d+=1){if(!h)return null;var o=p[d];h=h[o]}return h}function P(T){var l=[],p={};return T.forEach(function(h){for(var d=h||{},o=d.key,c=d.dataIndex,s=o||U(c).join("-")||Z;p[s];)s="".concat(s,"_next");p[s]=!0,l.push(s)}),l}function S(){var T={};function l(o,c){c&&Object.keys(c).forEach(function(s){var f=c[s];f&&Object(ae.a)(f)==="object"?(o[s]=o[s]||{},l(o[s],f)):o[s]=f})}for(var p=arguments.length,h=new Array(p),d=0;d<p;d++)h[d]=arguments[d];return h.forEach(function(o){l(T,o)}),T}function C(T){return T!=null}},sboe:function($e,We,z){"use strict";z.d(We,"a",function(){return U});var ae=z("q1tI"),Z=z.n(ae),U=ae.createContext(null)},"t/PP":function($e,We,z){$e.exports=z.p+"static/title.dd3b799f.svg"},t23M:function($e,We,z){"use strict";var ae=z("VTBJ"),Z=z("1OyB"),U=z("vuIU"),w=z("Ji7U"),P=z("LK+K"),S=z("q1tI"),C=z.n(S),T=z("m+aA"),l=z("Zm9Q"),p=z("Kwbf"),h=z("c+Xe"),d=z("bdgK"),o="rc-observer-key",c=function(s){Object(w.a)(i,s);var f=Object(P.a)(i);function i(){var n;return Object(Z.a)(this,i),n=f.apply(this,arguments),n.resizeObserver=null,n.childNode=null,n.currentElement=null,n.state={width:0,height:0,offsetHeight:0,offsetWidth:0},n.onResize=function(t){var u=n.props.onResize,y=t[0].target,g=y.getBoundingClientRect(),_=g.width,b=g.height,v=y.offsetWidth,m=y.offsetHeight,E=Math.floor(_),a=Math.floor(b);if(n.state.width!==E||n.state.height!==a||n.state.offsetWidth!==v||n.state.offsetHeight!==m){var x={width:E,height:a,offsetWidth:v,offsetHeight:m};n.setState(x),u&&Promise.resolve().then(function(){u(Object(ae.a)(Object(ae.a)({},x),{},{offsetWidth:v,offsetHeight:m}))})}},n.setChildNode=function(t){n.childNode=t},n}return Object(U.a)(i,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var t=this.props.disabled;if(t){this.destroyObserver();return}var u=Object(T.a)(this.childNode||this),y=u!==this.currentElement;y&&(this.destroyObserver(),this.currentElement=u),!this.resizeObserver&&u&&(this.resizeObserver=new d.default(this.onResize),this.resizeObserver.observe(u))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var t=this.props.children,u=Object(l.a)(t);if(u.length>1)Object(p.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(u.length===0)return Object(p.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var y=u[0];if(S.isValidElement(y)&&Object(h.c)(y)){var g=y.ref;u[0]=S.cloneElement(y,{ref:Object(h.a)(g,this.setChildNode)})}return u.length===1?u[0]:u.map(function(_,b){return!S.isValidElement(_)||"key"in _&&_.key!==null?_:S.cloneElement(_,{key:"".concat(o,"-").concat(b)})})}}]),i}(S.Component);c.displayName="ResizeObserver",We.a=c},twBr:function($e,We,z){$e.exports=z.p+"static/s.1f286590.svg"},uMZB:function($e,We,z){$e.exports={header:"header___3a50V",checkboxs:"checkboxs___3TnBC",field:"field___SHW6f","oj-form-container":"oj-form-container___36KBv","oj-left-panel":"oj-left-panel___3Fdj5","oj-form-info":"oj-form-info___dilPb",footer:"footer___1Ie9U","test-case-name":"test-case-name___356US","btn-remove-case":"btn-remove-case___1Z5cd","icon-tag":"icon-tag___3zUaP",btn_back:"btn_back___2UBbR",testJi:"testJi___1dyLk",upBtn:"upBtn___1I0SJ"}},uQRt:function($e,We,z){$e.exports=ae;function ae(){return z("gaXo"),{}}},ulZh:function($e,We,z){typeof window!="undefined"&&function(Z,U){$e.exports=U()}(this,function(){return function(ae){var Z={};function U(w){if(Z[w])return Z[w].exports;var P=Z[w]={i:w,l:!1,exports:{}};return ae[w].call(P.exports,P,P.exports,U),P.l=!0,P.exports}return U.m=ae,U.c=Z,U.d=function(w,P,S){U.o(w,P)||Object.defineProperty(w,P,{enumerable:!0,get:S})},U.r=function(w){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})},U.t=function(w,P){if(P&1&&(w=U(w)),P&8)return w;if(P&4&&typeof w=="object"&&w&&w.__esModule)return w;var S=Object.create(null);if(U.r(S),Object.defineProperty(S,"default",{enumerable:!0,value:w}),P&2&&typeof w!="string")for(var C in w)U.d(S,C,function(T){return w[T]}.bind(null,C));return S},U.n=function(w){var P=w&&w.__esModule?function(){return w.default}:function(){return w};return U.d(P,"a",P),P},U.o=function(w,P){return Object.prototype.hasOwnProperty.call(w,P)},U.p="/dist/",U(U.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ae,Z,U){"use strict";var w=Object.prototype.hasOwnProperty,P="~";function S(){}Object.create&&(S.prototype=Object.create(null),new S().__proto__||(P=!1));function C(h,d,o){this.fn=h,this.context=d,this.once=o||!1}function T(h,d,o,c,s){if(typeof o!="function")throw new TypeError("The listener must be a function");var f=new C(o,c||h,s),i=P?P+d:d;return h._events[i]?h._events[i].fn?h._events[i]=[h._events[i],f]:h._events[i].push(f):(h._events[i]=f,h._eventsCount++),h}function l(h,d){--h._eventsCount===0?h._events=new S:delete h._events[d]}function p(){this._events=new S,this._eventsCount=0}p.prototype.eventNames=function(){var d=[],o,c;if(this._eventsCount===0)return d;for(c in o=this._events)w.call(o,c)&&d.push(P?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(o)):d},p.prototype.listeners=function(d){var o=P?P+d:d,c=this._events[o];if(!c)return[];if(c.fn)return[c.fn];for(var s=0,f=c.length,i=new Array(f);s<f;s++)i[s]=c[s].fn;return i},p.prototype.listenerCount=function(d){var o=P?P+d:d,c=this._events[o];return c?c.fn?1:c.length:0},p.prototype.emit=function(d,o,c,s,f,i){var n=P?P+d:d;if(!this._events[n])return!1;var t=this._events[n],u=arguments.length,y,g;if(t.fn){t.once&&this.removeListener(d,t.fn,void 0,!0);switch(u){case 1:return t.fn.call(t.context),!0;case 2:return t.fn.call(t.context,o),!0;case 3:return t.fn.call(t.context,o,c),!0;case 4:return t.fn.call(t.context,o,c,s),!0;case 5:return t.fn.call(t.context,o,c,s,f),!0;case 6:return t.fn.call(t.context,o,c,s,f,i),!0}for(g=1,y=new Array(u-1);g<u;g++)y[g-1]=arguments[g];t.fn.apply(t.context,y)}else{var _=t.length,b;for(g=0;g<_;g++){t[g].once&&this.removeListener(d,t[g].fn,void 0,!0);switch(u){case 1:t[g].fn.call(t[g].context);break;case 2:t[g].fn.call(t[g].context,o);break;case 3:t[g].fn.call(t[g].context,o,c);break;case 4:t[g].fn.call(t[g].context,o,c,s);break;default:if(!y)for(b=1,y=new Array(u-1);b<u;b++)y[b-1]=arguments[b];t[g].fn.apply(t[g].context,y)}}}return!0},p.prototype.on=function(d,o,c){return T(this,d,o,c,!1)},p.prototype.once=function(d,o,c){return T(this,d,o,c,!0)},p.prototype.removeListener=function(d,o,c,s){var f=P?P+d:d;if(!this._events[f])return this;if(!o)return l(this,f),this;var i=this._events[f];if(i.fn)i.fn===o&&(!s||i.once)&&(!c||i.context===c)&&l(this,f);else{for(var n=0,t=[],u=i.length;n<u;n++)(i[n].fn!==o||s&&!i[n].once||c&&i[n].context!==c)&&t.push(i[n]);t.length?this._events[f]=t.length===1?t[0]:t:l(this,f)}return this},p.prototype.removeAllListeners=function(d){var o;return d?(o=P?P+d:d,this._events[o]&&l(this,o)):(this._events=new S,this._eventsCount=0),this},p.prototype.off=p.prototype.removeListener,p.prototype.addListener=p.prototype.on,p.prefixed=P,p.EventEmitter=p,ae.exports=p},"./node_modules/url-toolkit/src/url-toolkit.js":function(ae,Z,U){(function(w){var P=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,S=/^([^\/?#]*)([^]*)$/,C=/(?:\/|^)\.(?=\/)/g,T=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(p,h,d){if(d=d||{},p=p.trim(),h=h.trim(),!h){if(!d.alwaysNormalize)return p;var o=l.parseURL(p);if(!o)throw new Error("Error trying to parse base URL.");return o.path=l.normalizePath(o.path),l.buildURLFromParts(o)}var c=l.parseURL(h);if(!c)throw new Error("Error trying to parse relative URL.");if(c.scheme)return d.alwaysNormalize?(c.path=l.normalizePath(c.path),l.buildURLFromParts(c)):h;var s=l.parseURL(p);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&s.path[0]!=="/"){var f=S.exec(s.path);s.netLoc=f[1],s.path=f[2]}s.netLoc&&!s.path&&(s.path="/");var i={scheme:s.scheme,netLoc:c.netLoc,path:null,params:c.params,query:c.query,fragment:c.fragment};if(!c.netLoc&&(i.netLoc=s.netLoc,c.path[0]!=="/"))if(!c.path)i.path=s.path,c.params||(i.params=s.params,c.query||(i.query=s.query));else{var n=s.path,t=n.substring(0,n.lastIndexOf("/")+1)+c.path;i.path=l.normalizePath(t)}return i.path===null&&(i.path=d.alwaysNormalize?l.normalizePath(c.path):c.path),l.buildURLFromParts(i)},parseURL:function(p){var h=P.exec(p);return h?{scheme:h[1]||"",netLoc:h[2]||"",path:h[3]||"",params:h[4]||"",query:h[5]||"",fragment:h[6]||""}:null},normalizePath:function(p){for(p=p.split("").reverse().join("").replace(C,"");p.length!==(p=p.replace(T,"")).length;);return p.split("").reverse().join("")},buildURLFromParts:function(p){return p.scheme+p.netLoc+p.path+p.params+p.query+p.fragment}};ae.exports=l})(this)},"./node_modules/webworkify-webpack/index.js":function(ae,Z,U){function w(d){var o={};function c(f){if(o[f])return o[f].exports;var i=o[f]={i:f,l:!1,exports:{}};return d[f].call(i.exports,i,i.exports,c),i.l=!0,i.exports}c.m=d,c.c=o,c.i=function(f){return f},c.d=function(f,i,n){c.o(f,i)||Object.defineProperty(f,i,{configurable:!1,enumerable:!0,get:n})},c.r=function(f){Object.defineProperty(f,"__esModule",{value:!0})},c.n=function(f){var i=f&&f.__esModule?function(){return f.default}:function(){return f};return c.d(i,"a",i),i},c.o=function(f,i){return Object.prototype.hasOwnProperty.call(f,i)},c.p="/",c.oe=function(f){throw console.error(f),f};var s=c(c.s=ENTRY_MODULE);return s.default||s}var P="[\\.|\\-|\\+|\\w|/|@]+",S="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+P+").*?\\)";function C(d){return(d+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function T(d){return!isNaN(1*d)}function l(d,o,c){var s={};s[c]=[];var f=o.toString(),i=f.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!i)return s;for(var n=i[1],t=new RegExp("(\\\\n|\\W)"+C(n)+S,"g"),u;u=t.exec(f);){if(u[3]==="dll-reference")continue;s[c].push(u[3])}for(t=new RegExp("\\("+C(n)+'\\("(dll-reference\\s('+P+'))"\\)\\)'+S,"g");u=t.exec(f);)d[u[2]]||(s[c].push(u[1]),d[u[2]]=U(u[1]).m),s[u[2]]=s[u[2]]||[],s[u[2]].push(u[4]);for(var y=Object.keys(s),g=0;g<y.length;g++)for(var _=0;_<s[y[g]].length;_++)T(s[y[g]][_])&&(s[y[g]][_]=1*s[y[g]][_]);return s}function p(d){var o=Object.keys(d);return o.reduce(function(c,s){return c||d[s].length>0},!1)}function h(d,o){for(var c={main:[o]},s={main:[]},f={main:{}};p(c);)for(var i=Object.keys(c),n=0;n<i.length;n++){var t=i[n],u=c[t],y=u.pop();if(f[t]=f[t]||{},f[t][y]||!d[t][y])continue;f[t][y]=!0,s[t]=s[t]||[],s[t].push(y);for(var g=l(d,d[t][y],t),_=Object.keys(g),b=0;b<_.length;b++)c[_[b]]=c[_[b]]||[],c[_[b]]=c[_[b]].concat(g[_[b]])}return s}ae.exports=function(d,o){o=o||{};var c={main:U.m},s=o.all?{main:Object.keys(c.main)}:h(c,d),f="";Object.keys(s).filter(function(y){return y!=="main"}).forEach(function(y){for(var g=0;s[y][g];)g++;s[y].push(g),c[y][g]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",f=f+"var "+y+" = ("+w.toString().replace("ENTRY_MODULE",JSON.stringify(g))+")({"+s[y].map(function(_){return""+JSON.stringify(_)+": "+c[y][_].toString()}).join(",")+`});
`}),f=f+"new (("+w.toString().replace("ENTRY_MODULE",JSON.stringify(d))+")({"+s.main.map(function(y){return""+JSON.stringify(y)+": "+c.main[y].toString()}).join(",")+"}))(self);";var i=new window.Blob([f],{type:"text/javascript"});if(o.bare)return i;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,t=n.createObjectURL(i),u=new window.Worker(t);return u.objectURL=t,u}},"./src/config.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"hlsDefaultConfig",function(){return b}),U.d(Z,"mergeConfig",function(){return m}),U.d(Z,"enableStreamingMode",function(){return E});var w=U("./src/controller/abr-controller.ts"),P=U("./src/controller/audio-stream-controller.ts"),S=U("./src/controller/audio-track-controller.ts"),C=U("./src/controller/subtitle-stream-controller.ts"),T=U("./src/controller/subtitle-track-controller.ts"),l=U("./src/controller/buffer-controller.ts"),p=U("./src/controller/timeline-controller.ts"),h=U("./src/controller/cap-level-controller.ts"),d=U("./src/controller/fps-controller.ts"),o=U("./src/controller/eme-controller.ts"),c=U("./src/controller/cmcd-controller.ts"),s=U("./src/utils/xhr-loader.ts"),f=U("./src/utils/fetch-loader.ts"),i=U("./src/utils/cues.ts"),n=U("./src/utils/mediakeys-helper.ts"),t=U("./src/utils/logger.ts");function u(){return u=Object.assign||function(a){for(var x=1;x<arguments.length;x++){var O=arguments[x];for(var A in O)Object.prototype.hasOwnProperty.call(O,A)&&(a[A]=O[A])}return a},u.apply(this,arguments)}function y(a,x){var O=Object.keys(a);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(a);x&&(A=A.filter(function(D){return Object.getOwnPropertyDescriptor(a,D).enumerable})),O.push.apply(O,A)}return O}function g(a){for(var x=1;x<arguments.length;x++){var O=arguments[x]!=null?arguments[x]:{};x%2?y(Object(O),!0).forEach(function(A){_(a,A,O[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(O)):y(Object(O)).forEach(function(A){Object.defineProperty(a,A,Object.getOwnPropertyDescriptor(O,A))})}return a}function _(a,x,O){return x in a?Object.defineProperty(a,x,{value:O,enumerable:!0,configurable:!0,writable:!0}):a[x]=O,a}var b=g(g({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:s.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:w.default,bufferController:l.default,capLevelController:h.default,fpsController:d.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:n.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},v()),{},{subtitleStreamController:C.SubtitleStreamController,subtitleTrackController:T.default,timelineController:p.TimelineController,audioStreamController:P.default,audioTrackController:S.default,emeController:o.default,cmcdController:c.default});function v(){return{cueHandler:i.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function m(a,x){if((x.liveSyncDurationCount||x.liveMaxLatencyDurationCount)&&(x.liveSyncDuration||x.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(x.liveMaxLatencyDurationCount!==void 0&&(x.liveSyncDurationCount===void 0||x.liveMaxLatencyDurationCount<=x.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(x.liveMaxLatencyDuration!==void 0&&(x.liveSyncDuration===void 0||x.liveMaxLatencyDuration<=x.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return u({},a,x)}function E(a){var x=a.loader;if(x!==f.default&&x!==s.default)t.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1;else{var O=Object(f.fetchSupported)();O&&(a.loader=f.default,a.progressive=!0,a.enableSoftwareAES=!0,t.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/polyfills/number.ts"),P=U("./src/utils/ewma-bandwidth-estimator.ts"),S=U("./src/events.ts"),C=U("./src/utils/buffer-helper.ts"),T=U("./src/errors.ts"),l=U("./src/types/loader.ts"),p=U("./src/utils/logger.ts");function h(c,s){for(var f=0;f<s.length;f++){var i=s[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}function d(c,s,f){return s&&h(c.prototype,s),f&&h(c,f),c}var o=function(){function c(f){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=f;var i=f.config;this.bwEstimator=new P.default(i.abrEwmaSlowVoD,i.abrEwmaFastVoD,i.abrEwmaDefaultEstimate),this.registerListeners()}var s=c.prototype;return s.registerListeners=function(){var i=this.hls;i.on(S.Events.FRAG_LOADING,this.onFragLoading,this),i.on(S.Events.FRAG_LOADED,this.onFragLoaded,this),i.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),i.on(S.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var i=this.hls;i.off(S.Events.FRAG_LOADING,this.onFragLoading,this),i.off(S.Events.FRAG_LOADED,this.onFragLoaded,this),i.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),i.off(S.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},s.onFragLoading=function(i,n){var t=n.frag;if(t.type===l.PlaylistLevelType.MAIN&&!this.timer){var u;this.fragCurrent=t,this.partCurrent=(u=n.part)!=null?u:null,this.timer=self.setInterval(this.onCheck,100)}},s.onLevelLoaded=function(i,n){var t=this.hls.config;n.details.live?this.bwEstimator.update(t.abrEwmaSlowLive,t.abrEwmaFastLive):this.bwEstimator.update(t.abrEwmaSlowVoD,t.abrEwmaFastVoD)},s._abandonRulesCheck=function(){var i=this.fragCurrent,n=this.partCurrent,t=this.hls,u=t.autoLevelEnabled,y=t.config,g=t.media;if(!i||!g)return;var _=n?n.stats:i.stats,b=n?n.duration:i.duration;if(_.aborted){p.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!u||g.paused||!g.playbackRate||!g.readyState)return;var v=performance.now()-_.loading.start,m=Math.abs(g.playbackRate);if(v<=500*b/m)return;var E=t.levels,a=t.minAutoLevel,x=E[i.level],O=_.total||Math.max(_.loaded,Math.round(b*x.maxBitrate/8)),A=Math.max(1,_.bwEstimate?_.bwEstimate/8:_.loaded*1e3/v),D=(O-_.loaded)/A,I=g.currentTime,F=(C.BufferHelper.bufferInfo(g,I,y.maxBufferHole).end-I)/m;if(F>=2*b/m||D<=F)return;var K=Number.POSITIVE_INFINITY,ne;for(ne=i.level-1;ne>a;ne--){var j=E[ne].maxBitrate;if(K=b*j/(8*.8*A),K<F)break}if(K>=D)return;var G=this.bwEstimator.getEstimate();p.logger.warn("Fragment "+i.sn+(n?" part "+n.index:"")+" of level "+i.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+ne+`
Current BW estimate: `+(Object(w.isFiniteNumber)(G)?(G/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+D.toFixed(3)+` s
Estimated load time for the next fragment: `+K.toFixed(3)+` s
Time to underbuffer: `+F.toFixed(3)+" s"),t.nextLoadLevel=ne,this.bwEstimator.sample(v,_.loaded),this.clearTimer(),i.loader&&(this.fragCurrent=this.partCurrent=null,i.loader.abort()),t.trigger(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,part:n,stats:_})},s.onFragLoaded=function(i,n){var t=n.frag,u=n.part;if(t.type===l.PlaylistLevelType.MAIN&&Object(w.isFiniteNumber)(t.sn)){var y=u?u.stats:t.stats,g=u?u.duration:t.duration;if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var _=this.hls.levels[t.level],b=(_.loaded?_.loaded.bytes:0)+y.loaded,v=(_.loaded?_.loaded.duration:0)+g;_.loaded={bytes:b,duration:v},_.realBitrate=Math.round(8*b/v)}if(t.bitrateTest){var m={stats:y,frag:t,part:u,id:t.type};this.onFragBuffered(S.Events.FRAG_BUFFERED,m),t.bitrateTest=!1}}},s.onFragBuffered=function(i,n){var t=n.frag,u=n.part,y=u?u.stats:t.stats;if(y.aborted)return;if(t.type!==l.PlaylistLevelType.MAIN||t.sn==="initSegment")return;var g=y.parsing.end-y.loading.start;this.bwEstimator.sample(g,y.loaded),y.bwEstimate=this.bwEstimator.getEstimate(),t.bitrateTest?this.bitrateTestDelay=g/1e3:this.bitrateTestDelay=0},s.onError=function(i,n){switch(n.details){case T.ErrorDetails.FRAG_LOAD_ERROR:case T.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},s.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},s.getNextABRAutoLevel=function(){var i=this.fragCurrent,n=this.partCurrent,t=this.hls,u=t.maxAutoLevel,y=t.config,g=t.minAutoLevel,_=t.media,b=n?n.duration:i?i.duration:0,v=_?_.currentTime:0,m=_&&_.playbackRate!==0?Math.abs(_.playbackRate):1,E=this.bwEstimator?this.bwEstimator.getEstimate():y.abrEwmaDefaultEstimate,a=(C.BufferHelper.bufferInfo(_,v,y.maxBufferHole).end-v)/m,x=this.findBestLevel(E,g,u,a,y.abrBandWidthFactor,y.abrBandWidthUpFactor);if(x>=0)return x;p.logger.trace((a?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var O=b?Math.min(b,y.maxStarvationDelay):y.maxStarvationDelay,A=y.abrBandWidthFactor,D=y.abrBandWidthUpFactor;if(!a){var I=this.bitrateTestDelay;if(I){var F=b?Math.min(b,y.maxLoadingDelay):y.maxLoadingDelay;O=F-I,p.logger.trace("bitrate test took "+Math.round(1e3*I)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*O)+" ms"),A=D=1}}return x=this.findBestLevel(E,g,u,a+O,A,D),Math.max(x,0)},s.findBestLevel=function(i,n,t,u,y,g){for(var _,b=this.fragCurrent,v=this.partCurrent,m=this.lastLoadedFragLevel,E=this.hls.levels,a=E[m],x=!!(a!=null&&(_=a.details)!==null&&_!==void 0&&_.live),O=a==null?void 0:a.codecSet,A=v?v.duration:b?b.duration:0,D=t;D>=n;D--){var I=E[D];if(!I||O&&I.codecSet!==O)continue;var F=I.details,K=(v?F==null?void 0:F.partTarget:F==null?void 0:F.averagetargetduration)||A,ne=void 0;D<=m?ne=y*i:ne=g*i;var j=E[D].maxBitrate,G=j*K/ne;if(p.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+D+"/"+Math.round(ne)+"/"+j+"/"+K+"/"+u+"/"+G),ne>j&&(!G||x&&!this.bitrateTestDelay||G<u))return D}return-1},d(c,[{key:"nextAutoLevel",get:function(){var i=this._nextAutoLevel,n=this.bwEstimator;if(i!==-1&&(!n||!n.canEstimate()))return i;var t=this.getNextABRAutoLevel();return i!==-1&&(t=Math.min(i,t)),t},set:function(i){this._nextAutoLevel=i}}]),c}();Z.default=o},"./src/controller/audio-stream-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/polyfills/number.ts"),P=U("./src/controller/base-stream-controller.ts"),S=U("./src/events.ts"),C=U("./src/utils/buffer-helper.ts"),T=U("./src/controller/fragment-tracker.ts"),l=U("./src/types/level.ts"),p=U("./src/types/loader.ts"),h=U("./src/loader/fragment.ts"),d=U("./src/demux/chunk-cache.ts"),o=U("./src/demux/transmuxer-interface.ts"),c=U("./src/types/transmuxer.ts"),s=U("./src/controller/fragment-finders.ts"),f=U("./src/utils/discontinuities.ts"),i=U("./src/errors.ts"),n=U("./src/utils/logger.ts");function t(){return t=Object.assign||function(b){for(var v=1;v<arguments.length;v++){var m=arguments[v];for(var E in m)Object.prototype.hasOwnProperty.call(m,E)&&(b[E]=m[E])}return b},t.apply(this,arguments)}function u(b,v){b.prototype=Object.create(v.prototype),b.prototype.constructor=b,y(b,v)}function y(b,v){return y=Object.setPrototypeOf||function(E,a){return E.__proto__=a,E},y(b,v)}var g=100,_=function(b){u(v,b);function v(E,a){var x;return x=b.call(this,E,a,"[audio-stream-controller]")||this,x.videoBuffer=null,x.videoTrackCC=-1,x.waitingVideoCC=-1,x.audioSwitch=!1,x.trackId=-1,x.waitingData=null,x.mainDetails=null,x.bufferFlushed=!1,x._registerListeners(),x}var m=v.prototype;return m.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},m._registerListeners=function(){var a=this.hls;a.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),a.on(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),a.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),a.on(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),a.on(S.Events.ERROR,this.onError,this),a.on(S.Events.BUFFER_RESET,this.onBufferReset,this),a.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),a.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),a.on(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},m._unregisterListeners=function(){var a=this.hls;a.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),a.off(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),a.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),a.off(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),a.off(S.Events.ERROR,this.onError,this),a.off(S.Events.BUFFER_RESET,this.onBufferReset,this),a.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),a.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),a.off(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},m.onInitPtsFound=function(a,x){var O=x.frag,A=x.id,D=x.initPTS;if(A==="main"){var I=O.cc;this.initPTS[O.cc]=D,this.log("InitPTS for cc: "+I+" found from main: "+D),this.videoTrackCC=I,this.state===P.State.WAITING_INIT_PTS&&this.tick()}},m.startLoad=function(a){if(!this.levels){this.startPosition=a,this.state=P.State.STOPPED;return}var x=this.lastCurrentTime;this.stopLoad(),this.setInterval(g),this.fragLoadError=0,x>0&&a===-1?(this.log("Override startPosition with lastCurrentTime @"+x.toFixed(3)),this.state=P.State.IDLE):(this.loadedmetadata=!1,this.state=P.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=a,this.tick()},m.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_TRACK:{var a,x=this.levels,O=this.trackId,A=x==null||((a=x[O])===null||a===void 0)?void 0:a.details;if(A){if(this.waitForCdnTuneIn(A))break;this.state=P.State.WAITING_INIT_PTS}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var D,I=performance.now(),F=this.retryDate;(!F||I>=F||(D=this.media)!==null&&D!==void 0&&D.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=P.State.IDLE);break}case P.State.WAITING_INIT_PTS:{var K=this.waitingData;if(K){var ne=K.frag,j=K.part,G=K.cache,X=K.complete;if(this.initPTS[ne.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.FRAG_LOADING;var J=G.flush(),B={frag:ne,part:j,payload:J,networkDetails:null};this._handleFragmentLoadProgress(B),X&&b.prototype._handleFragmentLoadComplete.call(this,B)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+ne.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var Q=this.getLoadPosition(),ie=C.BufferHelper.bufferInfo(this.mediaBuffer,Q,this.config.maxBufferHole),oe=Object(s.fragmentWithinToleranceTest)(ie.end,this.config.maxFragLookUpTolerance,ne);oe<0&&(n.logger.log("Waiting fragment cc ("+ne.cc+") @ "+ne.start+" cancelled because another fragment at "+ie.end+" is needed"),this.clearWaitingFragment())}}else this.state=P.State.IDLE}}this.onTickEnd()},m.clearWaitingFragment=function(){var a=this.waitingData;a&&(this.fragmentTracker.removeFragment(a.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.IDLE)},m.onTickEnd=function(){var a=this.media;if(!a||!a.readyState)return;var x=this.mediaBuffer?this.mediaBuffer:a,O=x.buffered;!this.loadedmetadata&&O.length&&(this.loadedmetadata=!0),this.lastCurrentTime=a.currentTime},m.doTickIdle=function(){var a,x,O=this.hls,A=this.levels,D=this.media,I=this.trackId,F=O.config;if(!A||!A[I])return;if(!D&&(this.startFragRequested||!F.startFragPrefetch))return;var K=A[I],ne=K.details;if(!ne||ne.live&&this.levelLastLoaded!==I||this.waitForCdnTuneIn(ne)){this.state=P.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,h.ElementaryStreamTypes.AUDIO,p.PlaylistLevelType.AUDIO));var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,p.PlaylistLevelType.AUDIO);if(j===null)return;var G=j.len,X=this.getMaxBufferLength(),J=this.audioSwitch;if(G>=X&&!J)return;if(!J&&this._streamEnded(j,ne)){O.trigger(S.Events.BUFFER_EOS,{type:"audio"}),this.state=P.State.ENDED;return}var B=ne.fragments,Q=B[0].start,ie=j.end;if(J){var oe=this.getLoadPosition();ie=oe,ne.PTSKnown&&oe<Q&&((j.end>Q||j.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),D.currentTime=Q+.05))}var xe=this.getNextFragment(ie,ne);if(!xe){this.bufferFlushed=!0;return}((a=xe.decryptdata)===null||a===void 0?void 0:a.keyFormat)==="identity"&&!((x=xe.decryptdata)!==null&&x!==void 0&&x.key)?this.loadKey(xe,ne):this.loadFragment(xe,ne,ie)},m.getMaxBufferLength=function(){var a=b.prototype.getMaxBufferLength.call(this),x=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,p.PlaylistLevelType.MAIN);return x===null?a:Math.max(a,x.len)},m.onMediaDetaching=function(){this.videoBuffer=null,b.prototype.onMediaDetaching.call(this)},m.onAudioTracksUpdated=function(a,x){var O=x.audioTracks;this.resetTransmuxer(),this.levels=O.map(function(A){return new l.Level(A)})},m.onAudioTrackSwitching=function(a,x){var O=!!x.url;this.trackId=x.id;var A=this.fragCurrent;A!=null&&A.loader&&A.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),O?this.setInterval(g):this.resetTransmuxer(),O?(this.audioSwitch=!0,this.state=P.State.IDLE):this.state=P.State.STOPPED,this.tick()},m.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},m.onLevelLoaded=function(a,x){this.mainDetails=x.details},m.onAudioTrackLoaded=function(a,x){var O,A=this.levels,D=x.details,I=x.id;if(!A){this.warn("Audio tracks were reset while loading level "+I);return}this.log("Track "+I+" loaded ["+D.startSN+","+D.endSN+"],duration:"+D.totalduration);var F=A[I],K=0;if(D.live||(O=F.details)!==null&&O!==void 0&&O.live){var ne=this.mainDetails;if(D.fragments[0]||(D.deltaUpdateFailed=!0),D.deltaUpdateFailed||!ne)return;!F.details&&D.hasProgramDateTime&&ne.hasProgramDateTime?(Object(f.alignMediaPlaylistByPDT)(D,ne),K=D.fragments[0].start):K=this.alignPlaylists(D,F.details)}F.details=D,this.levelLastLoaded=I,!this.startFragRequested&&(this.mainDetails||!D.live)&&this.setStartPosition(F.details,K),this.state===P.State.WAITING_TRACK&&!this.waitForCdnTuneIn(D)&&(this.state=P.State.IDLE),this.tick()},m._handleFragmentLoadProgress=function(a){var x,O=a.frag,A=a.part,D=a.payload,I=this.config,F=this.trackId,K=this.levels;if(!K){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+O.sn+" of level "+O.level+" will not be buffered");return}var ne=K[F];console.assert(ne,"Audio track is defined on fragment load progress");var j=ne.details;console.assert(j,"Audio track details are defined on fragment load progress");var G=I.defaultAudioCodec||ne.audioCodec||"mp4a.40.2",X=this.transmuxer;X||(X=this.transmuxer=new o.default(this.hls,p.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var J=this.initPTS[O.cc],B=(x=O.initSegment)===null||x===void 0?void 0:x.data;if(J!==void 0){var Q=!1,ie=A?A.index:-1,oe=ie!==-1,xe=new c.ChunkMetadata(O.level,O.sn,O.stats.chunkCount,D.byteLength,ie,oe);X.push(D,B,G,"",O,A,j.totalduration,Q,xe,J)}else{n.logger.log("Unknown video PTS for cc "+O.cc+", waiting for video PTS before demuxing audio frag "+O.sn+" of ["+j.startSN+" ,"+j.endSN+"],track "+F);var ye=this.waitingData=this.waitingData||{frag:O,part:A,cache:new d.default,complete:!1},Ae=ye.cache;Ae.push(new Uint8Array(D)),this.waitingVideoCC=this.videoTrackCC,this.state=P.State.WAITING_INIT_PTS}},m._handleFragmentLoadComplete=function(a){if(this.waitingData){this.waitingData.complete=!0;return}b.prototype._handleFragmentLoadComplete.call(this,a)},m.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},m.onBufferCreated=function(a,x){var O=x.tracks.audio;O&&(this.mediaBuffer=O.buffer),x.tracks.video&&(this.videoBuffer=x.tracks.video.buffer)},m.onFragBuffered=function(a,x){var O=x.frag,A=x.part;if(O.type!==p.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(O)){this.warn("Fragment "+O.sn+(A?" p: "+A.index:"")+" of level "+O.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}O.sn!=="initSegment"&&(this.fragPrevious=O,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(O,A)},m.onError=function(a,x){switch(x.details){case i.ErrorDetails.FRAG_LOAD_ERROR:case i.ErrorDetails.FRAG_LOAD_TIMEOUT:case i.ErrorDetails.KEY_LOAD_ERROR:case i.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(p.PlaylistLevelType.AUDIO,x);break;case i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case i.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==P.State.ERROR&&this.state!==P.State.STOPPED&&(this.state=x.fatal?P.State.ERROR:P.State.IDLE,this.warn(x.details+" while loading frag, switching to "+this.state+" state"));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(x.parent==="audio"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var O=!0,A=this.getFwdBufferInfo(this.mediaBuffer,p.PlaylistLevelType.AUDIO);A&&A.len>.5&&(O=!this.reduceMaxBufferLength(A.len)),O&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,b.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},m.onBufferFlushed=function(a,x){var O=x.type;O===h.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},m._handleTransmuxComplete=function(a){var x,O="audio",A=this.hls,D=a.remuxResult,I=a.chunkMeta,F=this.getCurrentContext(I);if(!F){this.warn("The loading context changed while buffering fragment "+I.sn+" of level "+I.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(I.level);return}var K=F.frag,ne=F.part,j=D.audio,G=D.text,X=D.id3,J=D.initSegment;if(this.fragContextChanged(K))return;if(this.state=P.State.PARSING,this.audioSwitch&&j&&this.completeAudioSwitch(),J!=null&&J.tracks&&(this._bufferInitSegment(J.tracks,K,I),A.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:K,id:O,tracks:J.tracks})),j){var B=j.startPTS,Q=j.endPTS,ie=j.startDTS,oe=j.endDTS;ne&&(ne.elementaryStreams[h.ElementaryStreamTypes.AUDIO]={startPTS:B,endPTS:Q,startDTS:ie,endDTS:oe}),K.setElementaryStreamInfo(h.ElementaryStreamTypes.AUDIO,B,Q,ie,oe),this.bufferFragmentData(j,K,ne,I)}if(X!=null&&(x=X.samples)!==null&&x!==void 0&&x.length){var xe=t({frag:K,id:O},X);A.trigger(S.Events.FRAG_PARSING_METADATA,xe)}if(G){var ye=t({frag:K,id:O},G);A.trigger(S.Events.FRAG_PARSING_USERDATA,ye)}},m._bufferInitSegment=function(a,x,O){if(this.state!==P.State.PARSING)return;a.video&&delete a.video;var A=a.audio;if(!A)return;A.levelCodec=A.codec,A.id="audio",this.log("Init audio buffer, container:"+A.container+", codecs[parsed]=["+A.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,a);var D=A.initSegment;if(D!=null&&D.byteLength){var I={type:"audio",frag:x,part:null,chunkMeta:O,parent:x.type,data:D};this.hls.trigger(S.Events.BUFFER_APPENDING,I)}this.tick()},m.loadFragment=function(a,x,O){var A=this.fragmentTracker.getState(a);this.fragCurrent=a,(this.audioSwitch||A===T.FragmentState.NOT_LOADED||A===T.FragmentState.PARTIAL)&&(a.sn==="initSegment"?this._loadInitSegment(a):x.live&&!Object(w.isFiniteNumber)(this.initPTS[a.cc])?(this.log("Waiting for video PTS in continuity counter "+a.cc+" of live stream before loading audio fragment "+a.sn+" of level "+this.trackId),this.state=P.State.WAITING_INIT_PTS):(this.startFragRequested=!0,b.prototype.loadFragment.call(this,a,x,O)))},m.completeAudioSwitch=function(){var a=this.hls,x=this.media,O=this.trackId;x&&(this.log("Switching audio track : flushing all audio"),b.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,a.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:O})},v}(P.default);Z.default=_},"./src/controller/audio-track-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/controller/base-playlist-controller.ts"),C=U("./src/types/loader.ts");function T(o,c){for(var s=0;s<c.length;s++){var f=c[s];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(o,f.key,f)}}function l(o,c,s){return c&&T(o.prototype,c),s&&T(o,s),o}function p(o,c){o.prototype=Object.create(c.prototype),o.prototype.constructor=o,h(o,c)}function h(o,c){return h=Object.setPrototypeOf||function(f,i){return f.__proto__=i,f},h(o,c)}var d=function(o){p(c,o);function c(f){var i;return i=o.call(this,f,"[audio-track-controller]")||this,i.tracks=[],i.groupId=null,i.tracksInGroup=[],i.trackId=-1,i.trackName="",i.selectDefaultTrack=!0,i.registerListeners(),i}var s=c.prototype;return s.registerListeners=function(){var i=this.hls;i.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(w.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(w.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.on(w.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),i.on(w.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var i=this.hls;i.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(w.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(w.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.off(w.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),i.off(w.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,o.prototype.destroy.call(this)},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},s.onManifestParsed=function(i,n){this.tracks=n.audioTracks||[]},s.onAudioTrackLoaded=function(i,n){var t=n.id,u=n.details,y=this.tracksInGroup[t];if(!y){this.warn("Invalid audio track id "+t);return}var g=y.details;y.details=n.details,this.log("audioTrack "+t+" loaded ["+u.startSN+"-"+u.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,n,g))},s.onLevelLoading=function(i,n){this.switchLevel(n.level)},s.onLevelSwitching=function(i,n){this.switchLevel(n.level)},s.switchLevel=function(i){var n=this.hls.levels[i];if(!(n!=null&&n.audioGroupIds))return;var t=n.audioGroupIds[n.urlId];if(this.groupId!==t){this.groupId=t;var u=this.tracks.filter(function(g){return!t||g.groupId===t});this.selectDefaultTrack&&!u.some(function(g){return g.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=u;var y={audioTracks:u};this.log("Updating audio tracks, "+u.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(w.Events.AUDIO_TRACKS_UPDATED,y),this.selectInitialTrack()}},s.onError=function(i,n){if(o.prototype.onError.call(this,i,n),n.fatal||!n.context)return;n.context.type===C.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},s.setAudioTrack=function(i){var n=this.tracksInGroup;if(i<0||i>=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var t=n[this.trackId];this.log("Now switching to audio-track index "+i);var u=n[i],y=u.id,g=u.groupId,_=g===void 0?"":g,b=u.name,v=u.type,m=u.url;if(this.trackId=i,this.trackName=b,this.selectDefaultTrack=!1,this.hls.trigger(w.Events.AUDIO_TRACK_SWITCHING,{id:y,groupId:_,name:b,type:v,url:m}),u.details&&!u.details.live)return;var E=this.switchParams(u.url,t==null?void 0:t.details);this.loadPlaylist(E)},s.selectInitialTrack=function(){var i=this.tracksInGroup;console.assert(i.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,t=this.findTrackId(n)||this.findTrackId();t!==-1?this.setAudioTrack(t):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},s.findTrackId=function(i){for(var n=this.tracksInGroup,t=0;t<n.length;t++){var u=n[t];if((!this.selectDefaultTrack||u.default)&&(!i||i===u.name))return u.id}return-1},s.loadPlaylist=function(i){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var t=n.id,u=n.groupId,y=n.url;if(i)try{y=i.addDirectives(y)}catch(g){this.warn("Could not construct new URL with HLS Delivery Directives: "+g)}this.log("loading audio-track playlist for id: "+t),this.clearTimer(),this.hls.trigger(w.Events.AUDIO_TRACK_LOADING,{url:y,id:t,groupId:u,deliveryDirectives:i||null})}},l(c,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(i){this.selectDefaultTrack=!1,this.setAudioTrack(i)}}]),c}(S.default);Z.default=d},"./src/controller/base-playlist-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return l});var w=U("./src/polyfills/number.ts"),P=U("./src/types/level.ts"),S=U("./src/controller/level-helper.ts"),C=U("./src/utils/logger.ts"),T=U("./src/errors.ts"),l=function(){function p(d,o){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=C.logger.log.bind(C.logger,o+":"),this.warn=C.logger.warn.bind(C.logger,o+":"),this.hls=d}var h=p.prototype;return h.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},h.onError=function(o,c){c.fatal&&c.type===T.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},h.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},h.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},h.stopLoad=function(){this.canLoad=!1,this.clearTimer()},h.switchParams=function(o,c){var s=c==null?void 0:c.renditionReports;if(s)for(var f=0;f<s.length;f++){var i=s[f],n=""+i.URI;if(n===o.substr(-n.length)){var t=parseInt(i["LAST-MSN"]),u=parseInt(i["LAST-PART"]);if(c&&this.hls.config.lowLatencyMode){var y=Math.min(c.age-c.partTarget,c.targetduration);u!==void 0&&y>c.partTarget&&(u+=1)}if(Object(w.isFiniteNumber)(t))return new P.HlsUrlParameters(t,Object(w.isFiniteNumber)(u)?u:void 0,P.HlsSkip.No)}}},h.loadPlaylist=function(o){},h.shouldLoadTrack=function(o){return this.canLoad&&o&&!!o.url&&(!o.details||o.details.live)},h.playlistLoaded=function(o,c,s){var f=this,i=c.details,n=c.stats,t=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(i.advancedDateTime=Date.now()-t,i.live||s!=null&&s.live){if(i.reloaded(s),s&&this.log("live playlist "+o+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),s&&i.fragments.length>0&&Object(S.mergeDetails)(s,i),!this.canLoad||!i.live)return;var u,y=void 0,g=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var _=this.hls.config.lowLatencyMode,b=i.lastPartSn,v=i.endSN,m=i.lastPartIndex,E=m!==-1,a=b===v,x=_?0:m;E?(y=a?v+1:b,g=a?x:m+1):y=v+1;var O=i.age,A=O+i.ageHeader,D=Math.min(A-i.partTarget,i.targetduration*1.5);if(D>0){if(s&&D>s.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+s.tuneInGoal+" to: "+D+" with playlist age: "+i.age),D=0;else{var I=Math.floor(D/i.targetduration);if(y+=I,g!==void 0){var F=Math.round(D%i.targetduration/i.partTarget);g+=F}this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+O.toFixed(2)+"s goal: "+D+" skip sn "+I+" to part "+g)}i.tuneInGoal=D}if(u=this.getDeliveryDirectives(i,c.deliveryDirectives,y,g),_||!a){this.loadPlaylist(u);return}}else u=this.getDeliveryDirectives(i,c.deliveryDirectives,y,g);var K=Object(S.computeReloadInterval)(i,n);y!==void 0&&i.canBlockReload&&(K-=i.partTarget||1),this.log("reload live playlist "+o+" in "+Math.round(K)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(u)},K)}else this.clearTimer()},h.getDeliveryDirectives=function(o,c,s,f){var i=Object(P.getSkipValue)(o,s);return c!=null&&c.skip&&o.deltaUpdateFailed&&(s=c.msn,f=c.part,i=P.HlsSkip.No),new P.HlsUrlParameters(s,f,i)},h.retryLoadingOrFail=function(o){var c=this,s=this.hls.config,f=this.retryCount<s.levelLoadingMaxRetry;if(f){var i;if(this.retryCount++,o.details.indexOf("LoadTimeOut")>-1&&(i=o.context)!==null&&i!==void 0&&i.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+o.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*s.levelLoadingRetryDelay,s.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+o.details+'"')}}else this.warn('cannot recover from error "'+o.details+'"'),this.clearTimer(),o.fatal=!0;return f},p}()},"./src/controller/base-stream-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"State",function(){return v}),U.d(Z,"default",function(){return m});var w=U("./src/polyfills/number.ts"),P=U("./src/task-loop.ts"),S=U("./src/controller/fragment-tracker.ts"),C=U("./src/utils/buffer-helper.ts"),T=U("./src/utils/logger.ts"),l=U("./src/events.ts"),p=U("./src/errors.ts"),h=U("./src/types/transmuxer.ts"),d=U("./src/utils/mp4-tools.ts"),o=U("./src/utils/discontinuities.ts"),c=U("./src/controller/fragment-finders.ts"),s=U("./src/controller/level-helper.ts"),f=U("./src/loader/fragment-loader.ts"),i=U("./src/crypt/decrypter.ts"),n=U("./src/utils/time-ranges.ts"),t=U("./src/types/loader.ts");function u(E,a){for(var x=0;x<a.length;x++){var O=a[x];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(E,O.key,O)}}function y(E,a,x){return a&&u(E.prototype,a),x&&u(E,x),E}function g(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function _(E,a){E.prototype=Object.create(a.prototype),E.prototype.constructor=E,b(E,a)}function b(E,a){return b=Object.setPrototypeOf||function(O,A){return O.__proto__=A,O},b(E,a)}var v={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},m=function(E){_(a,E);function a(O,A,D){var I;return I=E.call(this)||this,I.hls=void 0,I.fragPrevious=null,I.fragCurrent=null,I.fragmentTracker=void 0,I.transmuxer=null,I._state=v.STOPPED,I.media=void 0,I.mediaBuffer=void 0,I.config=void 0,I.bitrateTest=!1,I.lastCurrentTime=0,I.nextLoadPosition=0,I.startPosition=0,I.loadedmetadata=!1,I.fragLoadError=0,I.retryDate=0,I.levels=null,I.fragmentLoader=void 0,I.levelLastLoaded=null,I.startFragRequested=!1,I.decrypter=void 0,I.initPTS=[],I.onvseeking=null,I.onvended=null,I.logPrefix="",I.log=void 0,I.warn=void 0,I.logPrefix=D,I.log=T.logger.log.bind(T.logger,D+":"),I.warn=T.logger.warn.bind(T.logger,D+":"),I.hls=O,I.fragmentLoader=new f.default(O.config),I.fragmentTracker=A,I.config=O.config,I.decrypter=new i.default(O,O.config),O.on(l.Events.KEY_LOADED,I.onKeyLoaded,g(I)),I}var x=a.prototype;return x.doTick=function(){this.onTickEnd()},x.onTickEnd=function(){},x.startLoad=function(A){},x.stopLoad=function(){this.fragmentLoader.abort();var A=this.fragCurrent;A&&this.fragmentTracker.removeFragment(A),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=v.STOPPED},x._streamEnded=function(A,D){var I=this.fragCurrent,F=this.fragmentTracker;if(!D.live&&I&&I.sn===D.endSN&&!A.nextStart){var K=F.getState(I);return K===S.FragmentState.PARTIAL||K===S.FragmentState.OK}return!1},x.onMediaAttached=function(A,D){var I=this.media=this.mediaBuffer=D.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),I.addEventListener("seeking",this.onvseeking),I.addEventListener("ended",this.onvended);var F=this.config;this.levels&&F.autoStartLoad&&this.state===v.STOPPED&&this.startLoad(F.startPosition)},x.onMediaDetaching=function(){var A=this.media;A!=null&&A.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),A&&(A.removeEventListener("seeking",this.onvseeking),A.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},x.onMediaSeeking=function(){var A=this.config,D=this.fragCurrent,I=this.media,F=this.mediaBuffer,K=this.state,ne=I?I.currentTime:0,j=C.BufferHelper.bufferInfo(F||I,ne,A.maxBufferHole);if(this.log("media seeking to "+(Object(w.isFiniteNumber)(ne)?ne.toFixed(3):ne)+", state: "+K),K===v.ENDED)this.resetLoadingState();else if(D&&!j.len){var G=A.maxFragLookUpTolerance,X=D.start-G,J=D.start+D.duration+G,B=ne>J;(ne<X||B)&&(B&&D.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),D.loader.abort()),this.resetLoadingState())}I&&(this.lastCurrentTime=ne),!this.loadedmetadata&&!j.len&&(this.nextLoadPosition=this.startPosition=ne),this.tickImmediate()},x.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},x.onKeyLoaded=function(A,D){if(this.state!==v.KEY_LOADING||D.frag!==this.fragCurrent||!this.levels)return;this.state=v.IDLE;var I=this.levels[D.frag.level].details;I&&this.loadFragment(D.frag,I,D.frag.start)},x.onHandlerDestroying=function(){this.stopLoad(),E.prototype.onHandlerDestroying.call(this)},x.onHandlerDestroyed=function(){this.state=v.STOPPED,this.hls.off(l.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,E.prototype.onHandlerDestroyed.call(this)},x.loadKey=function(A,D){this.log("Loading key for "+A.sn+" of ["+D.startSN+"-"+D.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+A.level),this.state=v.KEY_LOADING,this.fragCurrent=A,this.hls.trigger(l.Events.KEY_LOADING,{frag:A})},x.loadFragment=function(A,D,I){this._loadFragForPlayback(A,D,I)},x._loadFragForPlayback=function(A,D,I){var F=this,K=function(j){if(F.fragContextChanged(A)){F.warn("Fragment "+A.sn+(j.part?" p: "+j.part.index:"")+" of level "+A.level+" was dropped during download."),F.fragmentTracker.removeFragment(A);return}A.stats.chunkCount++,F._handleFragmentLoadProgress(j)};this._doFragLoad(A,D,I,K).then(function(ne){if(!ne)return;F.fragLoadError=0;var j=F.state;if(F.fragContextChanged(A)){(j===v.FRAG_LOADING||j===v.BACKTRACKING||!F.fragCurrent&&j===v.PARSING)&&(F.fragmentTracker.removeFragment(A),F.state=v.IDLE);return}if("payload"in ne&&(F.log("Loaded fragment "+A.sn+" of level "+A.level),F.hls.trigger(l.Events.FRAG_LOADED,ne),F.state===v.BACKTRACKING)){F.fragmentTracker.backtrack(A,ne),F.resetFragmentLoading(A);return}F._handleFragmentLoadComplete(ne)}).catch(function(ne){F.warn(ne),F.resetFragmentLoading(A)})},x.flushMainBuffer=function(A,D,I){if(I===void 0&&(I=null),!(A-D))return;var F={startOffset:A,endOffset:D,type:I};this.fragLoadError=0,this.hls.trigger(l.Events.BUFFER_FLUSHING,F)},x._loadInitSegment=function(A){var D=this;this._doFragLoad(A).then(function(I){if(!I||D.fragContextChanged(A)||!D.levels)throw new Error("init load aborted");return I}).then(function(I){var F=D.hls,K=I.payload,ne=A.decryptdata;if(K&&K.byteLength>0&&ne&&ne.key&&ne.iv&&ne.method==="AES-128"){var j=self.performance.now();return D.decrypter.webCryptoDecrypt(new Uint8Array(K),ne.key.buffer,ne.iv.buffer).then(function(G){var X=self.performance.now();return F.trigger(l.Events.FRAG_DECRYPTED,{frag:A,payload:G,stats:{tstart:j,tdecrypt:X}}),I.payload=G,I})}return I}).then(function(I){var F=D.fragCurrent,K=D.hls,ne=D.levels;if(!ne)throw new Error("init load aborted, missing levels");var j=ne[A.level].details;console.assert(j,"Level details are defined when init segment is loaded");var G=A.stats;D.state=v.IDLE,D.fragLoadError=0,A.data=new Uint8Array(I.payload),G.parsing.start=G.buffering.start=self.performance.now(),G.parsing.end=G.buffering.end=self.performance.now(),I.frag===F&&K.trigger(l.Events.FRAG_BUFFERED,{stats:G,frag:F,part:null,id:A.type}),D.tick()}).catch(function(I){D.warn(I),D.resetFragmentLoading(A)})},x.fragContextChanged=function(A){var D=this.fragCurrent;return!A||!D||A.level!==D.level||A.sn!==D.sn||A.urlId!==D.urlId},x.fragBufferedComplete=function(A,D){var I=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+A.type+" sn: "+A.sn+(D?" part: "+D.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+A.level+" "+n.default.toString(C.BufferHelper.getBuffered(I))),this.state=v.IDLE,this.tick()},x._handleFragmentLoadComplete=function(A){var D=this.transmuxer;if(!D)return;var I=A.frag,F=A.part,K=A.partsLoaded,ne=!K||K.length===0||K.some(function(G){return!G}),j=new h.ChunkMetadata(I.level,I.sn,I.stats.chunkCount+1,0,F?F.index:-1,!ne);D.flush(j)},x._handleFragmentLoadProgress=function(A){},x._doFragLoad=function(A,D,I,F){var K=this;if(I===void 0&&(I=null),!this.levels)throw new Error("frag load aborted, missing levels");if(I=Math.max(A.start,I||0),this.config.lowLatencyMode&&D){var ne=D.partList;if(ne&&F){I>A.end&&D.fragmentHint&&(A=D.fragmentHint);var j=this.getNextPart(ne,A,I);if(j>-1){var G=ne[j];return this.log("Loading part sn: "+A.sn+" p: "+G.index+" cc: "+A.cc+" of playlist ["+D.startSN+"-"+D.endSN+"] parts [0-"+j+"-"+(ne.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+A.level+", target: "+parseFloat(I.toFixed(3))),this.nextLoadPosition=G.start+G.duration,this.state=v.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:A,part:ne[j],targetBufferTime:I}),this.doFragPartsLoad(A,ne,j,F).catch(function(X){return K.handleFragLoadError(X)})}else if(!A.url||this.loadedEndOfParts(ne,I))return Promise.resolve(null)}}return this.log("Loading fragment "+A.sn+" cc: "+A.cc+" "+(D?"of ["+D.startSN+"-"+D.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+A.level+", target: "+parseFloat(I.toFixed(3))),Object(w.isFiniteNumber)(A.sn)&&!this.bitrateTest&&(this.nextLoadPosition=A.start+A.duration),this.state=v.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:A,targetBufferTime:I}),this.fragmentLoader.load(A,F).catch(function(X){return K.handleFragLoadError(X)})},x.doFragPartsLoad=function(A,D,I,F){var K=this;return new Promise(function(ne,j){var G=[],X=function J(B){var Q=D[B];K.fragmentLoader.loadPart(A,Q,F).then(function(ie){G[Q.index]=ie;var oe=ie.part;K.hls.trigger(l.Events.FRAG_LOADED,ie);var xe=D[B+1];if(xe&&xe.fragment===A)J(B+1);else return ne({frag:A,part:oe,partsLoaded:G})}).catch(j)};X(I)})},x.handleFragLoadError=function(A){var D=A.data;return D&&D.details===p.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(D.frag,D.part):this.hls.trigger(l.Events.ERROR,D),null},x._handleTransmuxerFlush=function(A){var D=this.getCurrentContext(A);if(!D||this.state!==v.PARSING){this.fragCurrent||(this.state=v.IDLE);return}var I=D.frag,F=D.part,K=D.level,ne=self.performance.now();I.stats.parsing.end=ne,F&&(F.stats.parsing.end=ne),this.updateLevelTiming(I,F,K,A.partial)},x.getCurrentContext=function(A){var D=this.levels,I=A.level,F=A.sn,K=A.part;if(!D||!D[I])return this.warn("Levels object was unset while buffering fragment "+F+" of level "+I+". The current chunk will not be buffered."),null;var ne=D[I],j=K>-1?Object(s.getPartWith)(ne,F,K):null,G=j?j.fragment:Object(s.getFragmentWithSN)(ne,F,this.fragCurrent);return G?{frag:G,part:j,level:ne}:null},x.bufferFragmentData=function(A,D,I,F){if(!A||this.state!==v.PARSING)return;var K=A.data1,ne=A.data2,j=K;if(K&&ne&&(j=Object(d.appendUint8Array)(K,ne)),!j||!j.length)return;var G={type:A.type,frag:D,part:I,chunkMeta:F,parent:D.type,data:j};this.hls.trigger(l.Events.BUFFER_APPENDING,G),A.dropped&&A.independent&&!I&&this.flushBufferGap(D)},x.flushBufferGap=function(A){var D=this.media;if(!D)return;if(!C.BufferHelper.isBuffered(D,D.currentTime)){this.flushMainBuffer(0,A.start);return}var I=D.currentTime,F=C.BufferHelper.bufferInfo(D,I,0),K=A.duration,ne=Math.min(this.config.maxFragLookUpTolerance*2,K*.25),j=Math.max(Math.min(A.start-ne,F.end-ne),I+ne);A.start-j>ne&&this.flushMainBuffer(j,A.start)},x.getFwdBufferInfo=function(A,D){var I=this.config,F=this.getLoadPosition();if(!Object(w.isFiniteNumber)(F))return null;var K=C.BufferHelper.bufferInfo(A,F,I.maxBufferHole);if(K.len===0&&K.nextStart!==void 0){var ne=this.fragmentTracker.getBufferedFrag(F,D);if(ne&&K.nextStart<ne.end)return C.BufferHelper.bufferInfo(A,F,Math.max(K.nextStart,I.maxBufferHole))}return K},x.getMaxBufferLength=function(A){var D=this.config,I;return A?I=Math.max(8*D.maxBufferSize/A,D.maxBufferLength):I=D.maxBufferLength,Math.min(I,D.maxMaxBufferLength)},x.reduceMaxBufferLength=function(A){var D=this.config,I=A||D.maxBufferLength;return D.maxMaxBufferLength>=I?(D.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+D.maxMaxBufferLength+"s"),!0):!1},x.getNextFragment=function(A,D){var I,F,K=D.fragments,ne=K.length;if(!ne)return null;var j=this.config,G=K[0].start,X;if(D.live){var J=j.initialLiveManifestSize;if(ne<J)return this.warn("Not enough fragments to start playback (have: "+ne+", need: "+J+")"),null;!D.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(X=this.getInitialLiveFragment(D,K),this.startPosition=X?this.hls.liveSyncPosition||X.start:A)}else A<=G&&(X=K[0]);if(!X){var B=j.lowLatencyMode?D.partEnd:D.fragmentEnd;X=this.getFragmentAtPosition(A,B,D)}return(I=X)!==null&&I!==void 0&&I.initSegment&&!((F=X)!==null&&F!==void 0&&F.initSegment.data)&&!this.bitrateTest&&(X=X.initSegment),X},x.getNextPart=function(A,D,I){for(var F=-1,K=!1,ne=!0,j=0,G=A.length;j<G;j++){var X=A[j];if(ne=ne&&!X.independent,F>-1&&I<X.start)break;var J=X.loaded;!J&&(K||X.independent||ne)&&X.fragment===D&&(F=j),K=J}return F},x.loadedEndOfParts=function(A,D){var I=A[A.length-1];return I&&D>I.start&&I.loaded},x.getInitialLiveFragment=function(A,D){var I=this.fragPrevious,F=null;if(I){if(A.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+I.programDateTime),F=Object(c.findFragmentByPDT)(D,I.endProgramDateTime,this.config.maxFragLookUpTolerance)),!F){var K=I.sn+1;if(K>=A.startSN&&K<=A.endSN){var ne=D[K-A.startSN];I.cc===ne.cc&&(F=ne,this.log("Live playlist, switching playlist, load frag with next SN: "+F.sn))}F||(F=Object(c.findFragWithCC)(D,I.cc),F&&this.log("Live playlist, switching playlist, load frag with same CC: "+F.sn))}}else{var j=this.hls.liveSyncPosition;j!==null&&(F=this.getFragmentAtPosition(j,this.bitrateTest?A.fragmentEnd:A.edge,A))}return F},x.getFragmentAtPosition=function(A,D,I){var F=this.config,K=this.fragPrevious,ne=I.fragments,j=I.endSN,G=I.fragmentHint,X=F.maxFragLookUpTolerance,J=!!(F.lowLatencyMode&&I.partList&&G);J&&G&&!this.bitrateTest&&(ne=ne.concat(G),j=G.sn);var B;if(A<D){var Q=A>D-X?0:X;B=Object(c.findFragmentByPTS)(K,ne,A,Q)}else B=ne[ne.length-1];if(B){var ie=B.sn-I.startSN,oe=K&&B.level===K.level,xe=ne[ie+1],ye=this.fragmentTracker.getState(B);if(ye===S.FragmentState.BACKTRACKED){B=null;for(var Ae=ie;ne[Ae]&&this.fragmentTracker.getState(ne[Ae])===S.FragmentState.BACKTRACKED;)K?B=ne[Ae--]:B=ne[--Ae];B||(B=xe)}else K&&B.sn===K.sn&&!J&&(oe&&(B.sn<j&&this.fragmentTracker.getState(xe)!==S.FragmentState.OK?(this.log("SN "+B.sn+" just loaded, load next one: "+xe.sn),B=xe):B=null))}return B},x.synchronizeToLiveEdge=function(A){var D=this.config,I=this.media;if(!I)return;var F=this.hls.liveSyncPosition,K=I.currentTime,ne=A.fragments[0].start,j=A.edge,G=K>=ne-D.maxFragLookUpTolerance&&K<=j;if(F!==null&&I.duration>F&&(K<F||!G)){var X=D.liveMaxLatencyDuration!==void 0?D.liveMaxLatencyDuration:D.liveMaxLatencyDurationCount*A.targetduration;(!G&&I.readyState<4||K<j-X)&&(this.loadedmetadata||(this.nextLoadPosition=F),I.readyState&&(this.warn("Playback: "+K.toFixed(3)+" is located too far from the end of live sliding playlist: "+j+", reset currentTime to : "+F.toFixed(3)),I.currentTime=F))}},x.alignPlaylists=function(A,D){var I=this.levels,F=this.levelLastLoaded,K=this.fragPrevious,ne=F!==null?I[F]:null,j=A.fragments.length;if(!j)return this.warn("No fragments in live playlist"),0;var G=A.fragments[0].start,X=!D,J=A.alignedSliding&&Object(w.isFiniteNumber)(G);if(X||!J&&!G){Object(o.alignStream)(K,ne,A);var B=A.fragments[0].start;return this.log("Live playlist sliding: "+B.toFixed(2)+" start-sn: "+(D?D.startSN:"na")+"->"+A.startSN+" prev-sn: "+(K?K.sn:"na")+" fragments: "+j),B}return G},x.waitForCdnTuneIn=function(A){var D=3;return A.live&&A.canBlockReload&&A.tuneInGoal>Math.max(A.partHoldBack,A.partTarget*D)},x.setStartPosition=function(A,D){var I=this.startPosition;if(I<D&&(I=-1),I===-1||this.lastCurrentTime===-1){var F=A.startTimeOffset;Object(w.isFiniteNumber)(F)?(I=D+F,F<0&&(I+=A.totalduration),I=Math.min(Math.max(D,I),D+A.totalduration),this.log("Start time offset "+F+" found in playlist, adjust startPosition to "+I),this.startPosition=I):A.live?I=this.hls.liveSyncPosition||D:this.startPosition=I=0,this.lastCurrentTime=I}this.nextLoadPosition=I},x.getLoadPosition=function(){var A=this.media,D=0;return this.loadedmetadata&&A?D=A.currentTime:this.nextLoadPosition&&(D=this.nextLoadPosition),D},x.handleFragLoadAborted=function(A,D){this.transmuxer&&A.sn!=="initSegment"&&A.stats.aborted&&(this.warn("Fragment "+A.sn+(D?" part"+D.index:"")+" of level "+A.level+" was aborted"),this.resetFragmentLoading(A))},x.resetFragmentLoading=function(A){(!this.fragCurrent||!this.fragContextChanged(A))&&(this.state=v.IDLE)},x.onFragmentOrKeyLoadError=function(A,D){if(D.fatal)return;var I=D.frag;if(!I||I.type!==A)return;var F=this.fragCurrent;console.assert(F&&I.sn===F.sn&&I.level===F.level&&I.urlId===F.urlId,"Frag load error must match current frag to retry");var K=this.config;if(this.fragLoadError+1<=K.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(I.level))return;var ne=Math.min(Math.pow(2,this.fragLoadError)*K.fragLoadingRetryDelay,K.fragLoadingMaxRetryTimeout);this.warn("Fragment "+I.sn+" of "+A+" "+I.level+" failed to load, retrying in "+ne+"ms"),this.retryDate=self.performance.now()+ne,this.fragLoadError++,this.state=v.FRAG_LOADING_WAITING_RETRY}else D.levelRetry?(A===t.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=v.IDLE):(T.logger.error(D.details+" reaches max retry, redispatch as fatal ..."),D.fatal=!0,this.hls.stopLoad(),this.state=v.ERROR)},x.afterBufferFlushed=function(A,D,I){if(!A)return;var F=C.BufferHelper.getBuffered(A);this.fragmentTracker.detectEvictedFragments(D,F,I),this.state===v.ENDED&&this.resetLoadingState()},x.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=v.IDLE},x.resetLiveStartWhenNotLoaded=function(A){if(!this.loadedmetadata){this.startFragRequested=!1;var D=this.levels?this.levels[A].details:null;if(D!=null&&D.live)return this.startPosition=-1,this.setStartPosition(D,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},x.updateLevelTiming=function(A,D,I,F){var K=this,ne=I.details;console.assert(!!ne,"level.details must be defined");var j=Object.keys(A.elementaryStreams).reduce(function(G,X){var J=A.elementaryStreams[X];if(J){var B=J.endPTS-J.startPTS;if(B<=0)return K.warn("Could not parse fragment "+A.sn+" "+X+" duration reliably ("+B+") resetting transmuxer to fallback to playlist timing"),K.resetTransmuxer(),G||!1;var Q=F?0:Object(s.updateFragPTSDTS)(ne,A,J.startPTS,J.endPTS,J.startDTS,J.endDTS);return K.hls.trigger(l.Events.LEVEL_PTS_UPDATED,{details:ne,level:I,drift:Q,type:X,frag:A,start:J.startPTS,end:J.endPTS}),!0}return G},!1);j?(this.state=v.PARSED,this.hls.trigger(l.Events.FRAG_PARSED,{frag:A,part:D})):this.resetLoadingState()},x.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},y(a,[{key:"state",get:function(){return this._state},set:function(A){var D=this._state;D!==A&&(this._state=A,this.log(D+"->"+A))}}]),a}(P.default)},"./src/controller/buffer-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return c});var w=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),S=U("./src/utils/logger.ts"),C=U("./src/errors.ts"),T=U("./src/utils/buffer-helper.ts"),l=U("./src/utils/mediasource-helper.ts"),p=U("./src/loader/fragment.ts"),h=U("./src/controller/buffer-operation-queue.ts"),d=Object(l.getMediaSource)(),o=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function s(i){var n=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var t=n.hls,u=n.media,y=n.mediaSource;S.logger.log("[buffer-controller]: Media source opened"),u&&(n.updateMediaElementDuration(),t.trigger(P.Events.MEDIA_ATTACHED,{media:u})),y&&y.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){S.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){S.logger.log("[buffer-controller]: Media source ended")},this.hls=i,this._initSourceBuffer(),this.registerListeners()}var f=s.prototype;return f.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},f.destroy=function(){this.unregisterListeners(),this.details=null},f.registerListeners=function(){var n=this.hls;n.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(P.Events.BUFFER_RESET,this.onBufferReset,this),n.on(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(P.Events.BUFFER_EOS,this.onBufferEos,this),n.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(P.Events.FRAG_PARSED,this.onFragParsed,this),n.on(P.Events.FRAG_CHANGED,this.onFragChanged,this)},f.unregisterListeners=function(){var n=this.hls;n.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(P.Events.BUFFER_RESET,this.onBufferReset,this),n.off(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(P.Events.BUFFER_EOS,this.onBufferEos,this),n.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(P.Events.FRAG_PARSED,this.onFragParsed,this),n.off(P.Events.FRAG_CHANGED,this.onFragChanged,this)},f._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new h.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},f.onManifestParsed=function(n,t){var u=2;(t.audio&&!t.video||!t.altAudio)&&(u=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=u,this.details=null,S.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(n,t){var u=this.media=t.media;if(u&&d){var y=this.mediaSource=new d;y.addEventListener("sourceopen",this._onMediaSourceOpen),y.addEventListener("sourceended",this._onMediaSourceEnded),y.addEventListener("sourceclose",this._onMediaSourceClose),u.src=self.URL.createObjectURL(y),this._objectUrl=u.src}},f.onMediaDetaching=function(){var n=this.media,t=this.mediaSource,u=this._objectUrl;if(t){if(S.logger.log("[buffer-controller]: media source detaching"),t.readyState==="open")try{t.endOfStream()}catch(y){S.logger.warn("[buffer-controller]: onMediaDetaching: "+y.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(u&&self.URL.revokeObjectURL(u),n.src===u?(n.removeAttribute("src"),n.load()):S.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(P.Events.MEDIA_DETACHED,void 0)},f.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(t){var u=n.sourceBuffer[t];try{u&&(n.removeBufferListeners(t),n.mediaSource&&n.mediaSource.removeSourceBuffer(u),n.sourceBuffer[t]=void 0)}catch(y){S.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",y)}}),this._initSourceBuffer()},f.onBufferCodecs=function(n,t){var u=this,y=this.getSourceBufferTypes().length;if(Object.keys(t).forEach(function(g){if(y){var _=u.tracks[g];if(_&&typeof _.buffer.changeType=="function"){var b=t[g],v=b.codec,m=b.levelCodec,E=b.container,a=(_.levelCodec||_.codec).replace(o,"$1"),x=(m||v).replace(o,"$1");if(a!==x){var O=E+";codecs="+(m||v);u.appendChangeType(g,O)}}}else u.pendingTracks[g]=t[g]}),y)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},f.appendChangeType=function(n,t){var u=this,y=this.operationQueue,g={execute:function(){var b=u.sourceBuffer[n];b&&(S.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+t),b.changeType(t)),y.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(b){S.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",b)}};y.append(g,n)},f.onBufferAppending=function(n,t){var u=this,y=this.hls,g=this.operationQueue,_=this.tracks,b=t.data,v=t.type,m=t.frag,E=t.part,a=t.chunkMeta,x=a.buffering[v],O=self.performance.now();x.start=O;var A=m.stats.buffering,D=E?E.stats.buffering:null;A.start===0&&(A.start=O),D&&D.start===0&&(D.start=O);var I=_.audio,F=v==="audio"&&a.id===1&&(I==null?void 0:I.container)==="audio/mpeg",K={execute:function(){if(x.executeStart=self.performance.now(),F){var j=u.sourceBuffer[v];if(j){var G=m.start-j.timestampOffset;Math.abs(G)>=.1&&(S.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+m.start+" (delta: "+G+") sn: "+m.sn+")"),j.timestampOffset=m.start)}}u.appendExecutor(b,v)},onStart:function(){},onComplete:function(){var j=self.performance.now();x.executeEnd=x.end=j,A.first===0&&(A.first=j),D&&D.first===0&&(D.first=j);var G=u.sourceBuffer,X={};for(var J in G)X[J]=T.BufferHelper.getBuffered(G[J]);u.appendError=0,u.hls.trigger(P.Events.BUFFER_APPENDED,{type:v,frag:m,part:E,chunkMeta:a,parent:m.type,timeRanges:X})},onError:function(j){S.logger.error("[buffer-controller]: Error encountered while trying to append to the "+v+" SourceBuffer",j);var G={type:C.ErrorTypes.MEDIA_ERROR,parent:m.type,details:C.ErrorDetails.BUFFER_APPEND_ERROR,err:j,fatal:!1};j.code===DOMException.QUOTA_EXCEEDED_ERR?G.details=C.ErrorDetails.BUFFER_FULL_ERROR:(u.appendError++,G.details=C.ErrorDetails.BUFFER_APPEND_ERROR,u.appendError>y.config.appendErrorMaxRetry&&(S.logger.error("[buffer-controller]: Failed "+y.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),G.fatal=!0)),y.trigger(P.Events.ERROR,G)}};g.append(K,v)},f.onBufferFlushing=function(n,t){var u=this,y=this.operationQueue,g=function(b){return{execute:u.removeExecutor.bind(u,b,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){u.hls.trigger(P.Events.BUFFER_FLUSHED,{type:b})},onError:function(m){S.logger.warn("[buffer-controller]: Failed to remove from "+b+" SourceBuffer",m)}}};t.type?y.append(g(t.type),t.type):this.getSourceBufferTypes().forEach(function(_){y.append(g(_),_)})},f.onFragParsed=function(n,t){var u=this,y=t.frag,g=t.part,_=[],b=g?g.elementaryStreams:y.elementaryStreams;b[p.ElementaryStreamTypes.AUDIOVIDEO]?_.push("audiovideo"):(b[p.ElementaryStreamTypes.AUDIO]&&_.push("audio"),b[p.ElementaryStreamTypes.VIDEO]&&_.push("video"));var v=function(){var E=self.performance.now();y.stats.buffering.end=E,g&&(g.stats.buffering.end=E);var a=g?g.stats:y.stats;u.hls.trigger(P.Events.FRAG_BUFFERED,{frag:y,part:g,stats:a,id:y.type})};_.length===0&&S.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+y.type+" level: "+y.level+" sn: "+y.sn),this.blockBuffers(v,_)},f.onFragChanged=function(n,t){this.flushBackBuffer()},f.onBufferEos=function(n,t){var u=this,y=this.getSourceBufferTypes().reduce(function(g,_){var b=u.sourceBuffer[_];return(!t.type||t.type===_)&&(b&&!b.ended&&(b.ended=!0,S.logger.log("[buffer-controller]: "+_+" sourceBuffer now EOS"))),g&&!!(!b||b.ended)},!0);y&&this.blockBuffers(function(){var g=u.mediaSource;if(!g||g.readyState!=="open")return;g.endOfStream()})},f.onLevelUpdated=function(n,t){var u=t.details;if(!u.fragments.length)return;this.details=u,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},f.flushBackBuffer=function(){var n=this.hls,t=this.details,u=this.media,y=this.sourceBuffer;if(!u||t===null)return;var g=this.getSourceBufferTypes();if(!g.length)return;var _=t.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(w.isFiniteNumber)(_)||_<0)return;var b=u.currentTime,v=t.levelTargetDuration,m=Math.max(_,v),E=Math.floor(b/v)*v-m;g.forEach(function(a){var x=y[a];if(x){var O=T.BufferHelper.getBuffered(x);O.length>0&&E>O.start(0)&&(n.trigger(P.Events.BACK_BUFFER_REACHED,{bufferEnd:E}),t.live&&n.trigger(P.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:E}),n.trigger(P.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:E,type:a}))}})},f.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,t=this.hls,u=this.media,y=this.mediaSource,g=n.fragments[0].start+n.totalduration,_=u.duration,b=Object(w.isFiniteNumber)(y.duration)?y.duration:0;n.live&&t.config.liveDurationInfinity?(S.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),y.duration=Infinity,this.updateSeekableRange(n)):(g>b&&g>_||!Object(w.isFiniteNumber)(_))&&(S.logger.log("[buffer-controller]: Updating Media Source duration to "+g.toFixed(3)),y.duration=g)},f.updateSeekableRange=function(n){var t=this.mediaSource,u=n.fragments,y=u.length;if(y&&n.live&&t!==null&&t!==void 0&&t.setLiveSeekableRange){var g=Math.max(0,u[0].start),_=Math.max(g,g+n.totalduration);t.setLiveSeekableRange(g,_)}},f.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,t=this.operationQueue,u=this.pendingTracks,y=Object.keys(u).length;if(y&&!n||y===2){this.createSourceBuffers(u),this.pendingTracks={};var g=this.getSourceBufferTypes();if(g.length===0){this.hls.trigger(P.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}g.forEach(function(_){t.executeNext(_)})}},f.createSourceBuffers=function(n){var t=this.sourceBuffer,u=this.mediaSource;if(!u)throw Error("createSourceBuffers called when mediaSource was null");var y=0;for(var g in n)if(!t[g]){var _=n[g];if(!_)throw Error("source buffer exists for track "+g+", however track does not");var b=_.levelCodec||_.codec,v=_.container+";codecs="+b;S.logger.log("[buffer-controller]: creating sourceBuffer("+v+")");try{var m=t[g]=u.addSourceBuffer(v),E=g;this.addBufferListener(E,"updatestart",this._onSBUpdateStart),this.addBufferListener(E,"updateend",this._onSBUpdateEnd),this.addBufferListener(E,"error",this._onSBUpdateError),this.tracks[g]={buffer:m,codec:b,container:_.container,levelCodec:_.levelCodec,id:_.id},y++}catch(a){S.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+a.message),this.hls.trigger(P.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:a,mimeType:v})}}y&&this.hls.trigger(P.Events.BUFFER_CREATED,{tracks:this.tracks})},f._onSBUpdateStart=function(n){var t=this.operationQueue,u=t.current(n);u.onStart()},f._onSBUpdateEnd=function(n){var t=this.operationQueue,u=t.current(n);u.onComplete(),t.shiftAndExecuteNext(n)},f._onSBUpdateError=function(n,t){S.logger.error("[buffer-controller]: "+n+" SourceBuffer error",t),this.hls.trigger(P.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var u=this.operationQueue.current(n);u&&u.onError(t)},f.removeExecutor=function(n,t,u){var y=this.media,g=this.mediaSource,_=this.operationQueue,b=this.sourceBuffer,v=b[n];if(!y||!g||!v){S.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),_.shiftAndExecuteNext(n);return}var m=Object(w.isFiniteNumber)(y.duration)?y.duration:Infinity,E=Object(w.isFiniteNumber)(g.duration)?g.duration:Infinity,a=Math.max(0,t),x=Math.min(u,m,E);x>a?(S.logger.log("[buffer-controller]: Removing ["+a+","+x+"] from the "+n+" SourceBuffer"),console.assert(!v.updating,n+" sourceBuffer must not be updating"),v.remove(a,x)):_.shiftAndExecuteNext(n)},f.appendExecutor=function(n,t){var u=this.operationQueue,y=this.sourceBuffer,g=y[t];if(!g){S.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),u.shiftAndExecuteNext(t);return}g.ended=!1,console.assert(!g.updating,t+" sourceBuffer must not be updating"),g.appendBuffer(n)},f.blockBuffers=function(n,t){var u=this;if(t===void 0&&(t=this.getSourceBufferTypes()),!t.length){S.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var y=this.operationQueue,g=t.map(function(_){return y.appendBlocker(_)});Promise.all(g).then(function(){n(),t.forEach(function(_){var b=u.sourceBuffer[_];(!b||!b.updating)&&y.shiftAndExecuteNext(_)})})},f.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},f.addBufferListener=function(n,t,u){var y=this.sourceBuffer[n];if(!y)return;var g=u.bind(this,n);this.listeners[n].push({event:t,listener:g}),y.addEventListener(t,g)},f.removeBufferListeners=function(n){var t=this.sourceBuffer[n];if(!t)return;this.listeners[n].forEach(function(u){t.removeEventListener(u.event,u.listener)})},s}()},"./src/controller/buffer-operation-queue.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return P});var w=U("./src/utils/logger.ts"),P=function(){function S(T){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=T}var C=S.prototype;return C.append=function(l,p){var h=this.queues[p];h.push(l),h.length===1&&this.buffers[p]&&this.executeNext(p)},C.insertAbort=function(l,p){var h=this.queues[p];h.unshift(l),this.executeNext(p)},C.appendBlocker=function(l){var p,h=new Promise(function(o){p=o}),d={execute:p,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(d,l),h},C.executeNext=function(l){var p=this.buffers,h=this.queues,d=p[l],o=h[l];if(o.length){var c=o[0];try{c.execute()}catch(s){w.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(s),(!d||!d.updating)&&(o.shift(),this.executeNext(l))}}},C.shiftAndExecuteNext=function(l){this.queues[l].shift(),this.executeNext(l)},C.current=function(l){return this.queues[l][0]},S}()},"./src/controller/cap-level-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/events.ts");function P(T,l){for(var p=0;p<l.length;p++){var h=l[p];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(T,h.key,h)}}function S(T,l,p){return l&&P(T.prototype,l),p&&P(T,p),T}var C=function(){function T(p){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=p,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var l=T.prototype;return l.setStreamController=function(h){this.streamController=h},l.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},l.registerListeners=function(){var h=this.hls;h.on(w.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),h.on(w.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),h.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),h.on(w.Events.BUFFER_CODECS,this.onBufferCodecs,this),h.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},l.unregisterListener=function(){var h=this.hls;h.off(w.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),h.off(w.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),h.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),h.off(w.Events.BUFFER_CODECS,this.onBufferCodecs,this),h.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},l.onFpsDropLevelCapping=function(h,d){T.isLevelAllowed(d.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(d.droppedLevel)},l.onMediaAttaching=function(h,d){this.media=d.media instanceof HTMLVideoElement?d.media:null},l.onManifestParsed=function(h,d){var o=this.hls;this.restrictedLevels=[],this.firstLevel=d.firstLevel,o.config.capLevelToPlayerSize&&d.video&&this.startCapping()},l.onBufferCodecs=function(h,d){var o=this.hls;o.config.capLevelToPlayerSize&&d.video&&this.startCapping()},l.onMediaDetaching=function(){this.stopCapping()},l.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var h=this.hls.levels;if(h.length){var d=this.hls;d.autoLevelCapping=this.getMaxLevel(h.length-1),d.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=d.autoLevelCapping}}},l.getMaxLevel=function(h){var d=this,o=this.hls.levels;if(!o.length)return-1;var c=o.filter(function(s,f){return T.isLevelAllowed(f,d.restrictedLevels)&&f<=h});return this.clientRect=null,T.getMaxLevelByMediaSize(c,this.mediaWidth,this.mediaHeight)},l.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},l.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},l.getDimensions=function(){if(this.clientRect)return this.clientRect;var h=this.media,d={width:0,height:0};if(h){var o=h.getBoundingClientRect();d.width=o.width,d.height=o.height,!d.width&&!d.height&&(d.width=o.right-o.left||h.width||0,d.height=o.bottom-o.top||h.height||0)}return this.clientRect=d,d},T.isLevelAllowed=function(h,d){return d===void 0&&(d=[]),d.indexOf(h)===-1},T.getMaxLevelByMediaSize=function(h,d,o){if(!h||!h.length)return-1;for(var c=function(t,u){return u?t.width!==u.width||t.height!==u.height:!0},s=h.length-1,f=0;f<h.length;f+=1){var i=h[f];if((i.width>=d||i.height>=o)&&c(i,h[f+1])){s=f;break}}return s},S(T,[{key:"mediaWidth",get:function(){return this.getDimensions().width*T.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*T.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var h=1;try{h=self.devicePixelRatio}catch(d){}return h}}]),T}();Z.default=C},"./src/controller/cmcd-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return c});var w=U("./src/events.ts"),P=U("./src/types/cmcd.ts"),S=U("./src/utils/buffer-helper.ts"),C=U("./src/utils/logger.ts");function T(s,f){for(var i=0;i<f.length;i++){var n=f[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}function l(s,f,i){return f&&T(s.prototype,f),i&&T(s,i),s}function p(s,f){var i=typeof Symbol!="undefined"&&s[Symbol.iterator]||s["@@iterator"];if(i)return(i=i.call(s)).next.bind(i);if(Array.isArray(s)||(i=h(s))||f&&s&&typeof s.length=="number"){i&&(s=i);var n=0;return function(){return n>=s.length?{done:!0}:{done:!1,value:s[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h(s,f){if(!s)return;if(typeof s=="string")return d(s,f);var i=Object.prototype.toString.call(s).slice(8,-1);if(i==="Object"&&s.constructor&&(i=s.constructor.name),i==="Map"||i==="Set")return Array.from(s);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return d(s,f)}function d(s,f){(f==null||f>s.length)&&(f=s.length);for(var i=0,n=new Array(f);i<f;i++)n[i]=s[i];return n}function o(){return o=Object.assign||function(s){for(var f=1;f<arguments.length;f++){var i=arguments[f];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(s[n]=i[n])}return s},o.apply(this,arguments)}var c=function(){function s(i){var n=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(y){try{n.apply(y,{ot:P.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(g){C.logger.warn("Could not generate manifest CMCD data.",g)}},this.applyFragmentData=function(y){try{var g=y.frag,_=n.hls.levels[g.level],b=n.getObjectType(g),v={d:g.duration*1e3,ot:b};(b===P.CMCDObjectType.VIDEO||b===P.CMCDObjectType.AUDIO||b==P.CMCDObjectType.MUXED)&&(v.br=_.bitrate/1e3,v.tb=n.getTopBandwidth(b),v.bl=n.getBufferLength(b)),n.apply(y,v)}catch(m){C.logger.warn("Could not generate segment CMCD data.",m)}},this.hls=i;var t=this.config=i.config,u=t.cmcd;u!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=u.sessionId||s.uuid(),this.cid=u.contentId,this.useHeaders=u.useHeaders===!0,this.registerListeners())}var f=s.prototype;return f.registerListeners=function(){var n=this.hls;n.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(w.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.on(w.Events.BUFFER_CREATED,this.onBufferCreated,this)},f.unregisterListeners=function(){var n=this.hls;n.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(w.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.off(w.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},f.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},f.onMediaAttached=function(n,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},f.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},f.onBufferCreated=function(n,t){var u,y;this.audioBuffer=(u=t.tracks.audio)===null||u===void 0?void 0:u.buffer,this.videoBuffer=(y=t.tracks.video)===null||y===void 0?void 0:y.buffer},f.createData=function(){var n;return{v:P.CMCDVersion,sf:P.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(n=this.media)===null||n===void 0?void 0:n.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},f.apply=function(n,t){t===void 0&&(t={}),o(t,this.createData());var u=t.ot===P.CMCDObjectType.INIT||t.ot===P.CMCDObjectType.VIDEO||t.ot===P.CMCDObjectType.MUXED;if(this.starved&&u&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering),this.useHeaders){var y=s.toHeaders(t);if(!Object.keys(y).length)return;n.headers||(n.headers={}),o(n.headers,y)}else{var g=s.toQuery(t);if(!g)return;n.url=s.appendQueryToUri(n.url,g)}},f.getObjectType=function(n){var t=n.type;return t==="subtitle"?P.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?P.CMCDObjectType.INIT:t==="audio"?P.CMCDObjectType.AUDIO:t==="main"?this.hls.audioTracks.length?P.CMCDObjectType.VIDEO:P.CMCDObjectType.MUXED:void 0},f.getTopBandwidth=function(n){for(var t=0,u=n===P.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,y=p(u),g;!(g=y()).done;){var _=g.value;_.bitrate>t&&(t=_.bitrate)}return t>0?t:NaN},f.getBufferLength=function(n){var t=this.hls.media,u=n===P.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!u||!t)return NaN;var y=S.BufferHelper.bufferInfo(u,t.currentTime,this.config.maxBufferHole);return y.len*1e3},f.createPlaylistLoader=function(){var n=this.config.pLoader,t=this.applyPlaylistData,u=n||this.config.loader;return function(){function y(_){this.loader=void 0,this.loader=new u(_)}var g=y.prototype;return g.destroy=function(){this.loader.destroy()},g.abort=function(){this.loader.abort()},g.load=function(b,v,m){t(b),this.loader.load(b,v,m)},l(y,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),y}()},f.createFragmentLoader=function(){var n=this.config.fLoader,t=this.applyFragmentData,u=n||this.config.loader;return function(){function y(_){this.loader=void 0,this.loader=new u(_)}var g=y.prototype;return g.destroy=function(){this.loader.destroy()},g.abort=function(){this.loader.abort()},g.load=function(b,v,m){t(b),this.loader.load(b,v,m)},l(y,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),y}()},s.uuid=function(){var n=URL.createObjectURL(new Blob),t=n.toString();return URL.revokeObjectURL(n),t.substr(t.lastIndexOf("/")+1)},s.serialize=function(n){for(var t=[],u=function(F){return!Number.isNaN(F)&&F!=null&&F!==""&&F!==!1},y=function(F){return Math.round(F)},g=function(F){return y(F/100)*100},_=function(F){return encodeURIComponent(F)},b={br:y,d:y,bl:g,dl:g,mtp:g,nor:_,rtp:g,tb:y},v=Object.keys(n||{}).sort(),m=p(v),E;!(E=m()).done;){var a=E.value,x=n[a];if(!u(x))continue;if(a==="v"&&x===1)continue;if(a=="pr"&&x===1)continue;var O=b[a];O&&(x=O(x));var A=typeof x,D=void 0;a==="ot"||a==="sf"||a==="st"?D=a+"="+x:A==="boolean"?D=a:A==="number"?D=a+"="+x:D=a+"="+JSON.stringify(x),t.push(D)}return t.join(",")},s.toHeaders=function(n){for(var t=Object.keys(n),u={},y=["Object","Request","Session","Status"],g=[{},{},{},{}],_={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},b=0,v=t;b<v.length;b++){var m=v[b],E=_[m]!=null?_[m]:1;g[E][m]=n[m]}for(var a=0;a<g.length;a++){var x=s.serialize(g[a]);x&&(u["CMCD-"+y[a]]=x)}return u},s.toQuery=function(n){return"CMCD="+encodeURIComponent(s.serialize(n))},s.appendQueryToUri=function(n,t){if(!t)return n;var u=n.includes("?")?"&":"?";return""+n+u+t},s}()},"./src/controller/eme-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/utils/logger.ts"),C=U("./src/utils/mediakeys-helper.ts");function T(c,s){for(var f=0;f<s.length;f++){var i=s[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}function l(c,s,f){return s&&T(c.prototype,s),f&&T(c,f),c}var p=3,h=function(s,f,i){var n={audioCapabilities:[],videoCapabilities:[]};return s.forEach(function(t){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+t+'"',robustness:i.audioRobustness||""})}),f.forEach(function(t){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+t+'"',robustness:i.videoRobustness||""})}),[n]},d=function(s,f,i,n){switch(s){case C.KeySystems.WIDEVINE:return h(f,i,n);default:throw new Error("Unknown key-system: "+s)}},o=function(){function c(f){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=f,this._config=f.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var s=c.prototype;return s.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},s._registerListeners=function(){this.hls.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(w.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s._unregisterListeners=function(){this.hls.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(w.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s.getLicenseServerUrl=function(i){switch(i){case C.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+i+'"')},s._attemptKeySystemAccess=function(i,n,t){var u=this,y=d(i,n,t,this._drmSystemOptions);S.logger.log("Requesting encrypted media key-system access");var g=this.requestMediaKeySystemAccess(i,y);this.mediaKeysPromise=g.then(function(_){return u._onMediaKeySystemAccessObtained(i,_)}),g.catch(function(_){S.logger.error('Failed to obtain key-system "'+i+'" access:',_)})},s._onMediaKeySystemAccessObtained=function(i,n){var t=this;S.logger.log('Access for key-system "'+i+'" obtained');var u={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:i};this._mediaKeysList.push(u);var y=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(g){return u.mediaKeys=g,S.logger.log('Media-keys created for key-system "'+i+'"'),t._onMediaKeysCreated(),g});return y.catch(function(g){S.logger.error("Failed to create media-keys:",g)}),y},s._onMediaKeysCreated=function(){var i=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),i._onNewMediaKeySession(n.mediaKeysSession))})},s._onNewMediaKeySession=function(i){var n=this;S.logger.log("New key-system session "+i.sessionId),i.addEventListener("message",function(t){n._onKeySessionMessage(i,t.message)},!1)},s._onKeySessionMessage=function(i,n){S.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(t){S.logger.log("Received license data (length: "+(t&&t.byteLength)+"), updating key-session"),i.update(t)})},s.onMediaEncrypted=function(i){var n=this;if(S.logger.log('Media is encrypted using "'+i.initDataType+'" init data type'),!this.mediaKeysPromise){S.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var t=function(y){if(!n._media)return;n._attemptSetMediaKeys(y),n._generateRequestWithPreferredKeySession(i.initDataType,i.initData)};this.mediaKeysPromise.then(t).catch(t)},s._attemptSetMediaKeys=function(i){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var n=this._mediaKeysList[0];if(!n||!n.mediaKeys){S.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}S.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},s._generateRequestWithPreferredKeySession=function(i,n){var t=this,u=this._mediaKeysList[0];if(!u){S.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(u.mediaKeysSessionInitialized){S.logger.warn("Key-Session already initialized but requested again");return}var y=u.mediaKeysSession;if(!y){S.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!n){S.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}S.logger.log('Generating key-session request for "'+i+'" init data type'),u.mediaKeysSessionInitialized=!0,y.generateRequest(i,n).then(function(){S.logger.debug("Key-session generation succeeded")}).catch(function(g){S.logger.error("Error generating key-session request:",g),t.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},s._createLicenseXhr=function(i,n,t){var u=new XMLHttpRequest;u.responseType="arraybuffer",u.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,u,i,n,t);var y=this._licenseXhrSetup;if(y)try{y.call(this.hls,u,i),y=void 0}catch(g){S.logger.error(g)}try{u.readyState||u.open("POST",i,!0),y&&y.call(this.hls,u,i)}catch(g){throw new Error("issue setting up KeySystem license XHR "+g)}return u},s._onLicenseRequestReadyStageChange=function(i,n,t,u){switch(i.readyState){case 4:if(i.status===200){this._requestLicenseFailureCount=0,S.logger.log("License request succeeded");var y=i.response,g=this._licenseResponseCallback;if(g)try{y=g.call(this.hls,i,n)}catch(b){S.logger.error(b)}u(y)}else{if(S.logger.error("License Request XHR failed ("+n+"). Status: "+i.status+" ("+i.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>p){this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var _=p-this._requestLicenseFailureCount+1;S.logger.warn("Retrying license request, "+_+" attempts left"),this._requestLicense(t,u)}break}},s._generateLicenseRequestChallenge=function(i,n){switch(i.mediaKeySystemDomain){case C.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+i.mediaKeySystemDomain)},s._requestLicense=function(i,n){S.logger.log("Requesting content license for key-system");var t=this._mediaKeysList[0];if(!t){S.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var u=this.getLicenseServerUrl(t.mediaKeySystemDomain),y=this._createLicenseXhr(u,i,n);S.logger.log("Sending license request to URL: "+u);var g=this._generateLicenseRequestChallenge(t,i);y.send(g)}catch(_){S.logger.error("Failure requesting DRM license: "+_),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},s.onMediaAttached=function(i,n){if(!this._emeEnabled)return;var t=n.media;this._media=t,t.addEventListener("encrypted",this._onMediaEncrypted)},s.onMediaDetached=function(){var i=this._media,n=this._mediaKeysList;if(!i)return;i.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch(function(){})})).then(function(){return i.setMediaKeys(null)}).catch(function(){})},s.onManifestParsed=function(i,n){if(!this._emeEnabled)return;var t=n.levels.map(function(y){return y.audioCodec}).filter(function(y){return!!y}),u=n.levels.map(function(y){return y.videoCodec}).filter(function(y){return!!y});this._attemptKeySystemAccess(C.KeySystems.WIDEVINE,t,u)},l(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();Z.default=o},"./src/controller/fps-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/events.ts"),P=U("./src/utils/logger.ts"),S=function(){function C(l){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=l,this.registerListeners()}var T=C.prototype;return T.setStreamController=function(p){this.streamController=p},T.registerListeners=function(){this.hls.on(w.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},T.unregisterListeners=function(){this.hls.off(w.Events.MEDIA_ATTACHING,this.onMediaAttaching)},T.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},T.onMediaAttaching=function(p,h){var d=this.hls.config;if(d.capLevelOnFPSDrop){var o=h.media instanceof self.HTMLVideoElement?h.media:null;this.media=o,o&&typeof o.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),d.fpsDroppedMonitoringPeriod)}},T.checkFPS=function(p,h,d){var o=performance.now();if(h){if(this.lastTime){var c=o-this.lastTime,s=d-this.lastDroppedFrames,f=h-this.lastDecodedFrames,i=1e3*s/c,n=this.hls;if(n.trigger(w.Events.FPS_DROP,{currentDropped:s,currentDecoded:f,totalDroppedFrames:d}),i>0&&s>n.config.fpsDroppedMonitoringThreshold*f){var t=n.currentLevel;P.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+t),t>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=t)&&(t=t-1,n.trigger(w.Events.FPS_DROP_LEVEL_CAPPING,{level:t,droppedLevel:n.currentLevel}),n.autoLevelCapping=t,this.streamController.nextLevelSwitch())}}this.lastTime=o,this.lastDroppedFrames=d,this.lastDecodedFrames=h}},T.checkFPSInterval=function(){var p=this.media;if(p)if(this.isVideoPlaybackQualityAvailable){var h=p.getVideoPlaybackQuality();this.checkFPS(p,h.totalVideoFrames,h.droppedVideoFrames)}else this.checkFPS(p,p.webkitDecodedFrameCount,p.webkitDroppedFrameCount)},C}();Z.default=S},"./src/controller/fragment-finders.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"findFragmentByPDT",function(){return S}),U.d(Z,"findFragmentByPTS",function(){return C}),U.d(Z,"fragmentWithinToleranceTest",function(){return T}),U.d(Z,"pdtWithinToleranceTest",function(){return l}),U.d(Z,"findFragWithCC",function(){return p});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/binary-search.ts");function S(h,d,o){if(d===null||!Array.isArray(h)||!h.length||!Object(w.isFiniteNumber)(d))return null;var c=h[0].programDateTime;if(d<(c||0))return null;var s=h[h.length-1].endProgramDateTime;if(d>=(s||0))return null;o=o||0;for(var f=0;f<h.length;++f){var i=h[f];if(l(d,o,i))return i}return null}function C(h,d,o,c){o===void 0&&(o=0),c===void 0&&(c=0);var s=null;if(h?s=d[h.sn-d[0].sn+1]||null:o===0&&d[0].start===0&&(s=d[0]),s&&T(o,c,s)===0)return s;var f=P.default.search(d,T.bind(null,o,c));return f||s}function T(h,d,o){h===void 0&&(h=0),d===void 0&&(d=0);var c=Math.min(d,o.duration+(o.deltaPTS?o.deltaPTS:0));return o.start+o.duration-c<=h?1:o.start-c>h&&o.start?-1:0}function l(h,d,o){var c=Math.min(d,o.duration+(o.deltaPTS?o.deltaPTS:0))*1e3,s=o.endProgramDateTime||0;return s-c>h}function p(h,d){return P.default.search(h,function(o){return o.cc<d?1:o.cc>d?-1:0})}},"./src/controller/fragment-tracker.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"FragmentState",function(){return S}),U.d(Z,"FragmentTracker",function(){return C});var w=U("./src/events.ts"),P=U("./src/types/loader.ts"),S;(function(p){p.NOT_LOADED="NOT_LOADED",p.BACKTRACKED="BACKTRACKED",p.APPENDING="APPENDING",p.PARTIAL="PARTIAL",p.OK="OK"})(S||(S={}));var C=function(){function p(d){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=d,this._registerListeners()}var h=p.prototype;return h._registerListeners=function(){var o=this.hls;o.on(w.Events.BUFFER_APPENDED,this.onBufferAppended,this),o.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.on(w.Events.FRAG_LOADED,this.onFragLoaded,this)},h._unregisterListeners=function(){var o=this.hls;o.off(w.Events.BUFFER_APPENDED,this.onBufferAppended,this),o.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.off(w.Events.FRAG_LOADED,this.onFragLoaded,this)},h.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},h.getAppendedFrag=function(o,c){if(c===P.PlaylistLevelType.MAIN){var s=this.activeFragment,f=this.activeParts;if(!s)return null;if(f)for(var i=f.length;i--;){var n=f[i],t=n?n.end:s.appendedPTS;if(n.start<=o&&t!==void 0&&o<=t)return i>9&&(this.activeParts=f.slice(i-9)),n}else if(s.start<=o&&s.appendedPTS!==void 0&&o<=s.appendedPTS)return s}return this.getBufferedFrag(o,c)},h.getBufferedFrag=function(o,c){for(var s=this.fragments,f=Object.keys(s),i=f.length;i--;){var n=s[f[i]];if((n==null?void 0:n.body.type)===c&&n.buffered){var t=n.body;if(t.start<=o&&o<=t.end)return t}}return null},h.detectEvictedFragments=function(o,c,s){var f=this;Object.keys(this.fragments).forEach(function(i){var n=f.fragments[i];if(!n)return;if(!n.buffered){n.body.type===s&&f.removeFragment(n.body);return}var t=n.range[o];if(!t)return;t.time.some(function(u){var y=!f.isTimeBuffered(u.startPTS,u.endPTS,c);return y&&f.removeFragment(n.body),y})})},h.detectPartialFragments=function(o){var c=this,s=this.timeRanges,f=o.frag,i=o.part;if(!s||f.sn==="initSegment")return;var n=l(f),t=this.fragments[n];if(!t)return;Object.keys(s).forEach(function(u){var y=f.elementaryStreams[u];if(!y)return;var g=s[u],_=i!==null||y.partial===!0;t.range[u]=c.getBufferedTimes(f,i,_,g)}),t.backtrack=t.loaded=null,Object.keys(t.range).length?t.buffered=!0:this.removeFragment(t.body)},h.fragBuffered=function(o){var c=l(o),s=this.fragments[c];s&&(s.backtrack=s.loaded=null,s.buffered=!0)},h.getBufferedTimes=function(o,c,s,f){for(var i={time:[],partial:s},n=c?c.start:o.start,t=c?c.end:o.end,u=o.minEndPTS||t,y=o.maxStartPTS||n,g=0;g<f.length;g++){var _=f.start(g)-this.bufferPadding,b=f.end(g)+this.bufferPadding;if(y>=_&&u<=b){i.time.push({startPTS:Math.max(n,f.start(g)),endPTS:Math.min(t,f.end(g))});break}else if(n<b&&t>_)i.partial=!0,i.time.push({startPTS:Math.max(n,f.start(g)),endPTS:Math.min(t,f.end(g))});else if(t<=_)break}return i},h.getPartialFragment=function(o){var c=null,s,f,i,n=0,t=this.bufferPadding,u=this.fragments;return Object.keys(u).forEach(function(y){var g=u[y];if(!g)return;T(g)&&(f=g.body.start-t,i=g.body.end+t,o>=f&&o<=i&&(s=Math.min(o-f,i-o),n<=s&&(c=g.body,n=s)))}),c},h.getState=function(o){var c=l(o),s=this.fragments[c];return s?s.buffered?T(s)?S.PARTIAL:S.OK:s.backtrack?S.BACKTRACKED:S.APPENDING:S.NOT_LOADED},h.backtrack=function(o,c){var s=l(o),f=this.fragments[s];if(!f||f.backtrack)return null;var i=f.backtrack=c||f.loaded;return f.loaded=null,i},h.getBacktrackData=function(o){var c=l(o),s=this.fragments[c];if(s){var f,i=s.backtrack;if(i!=null&&(f=i.payload)!==null&&f!==void 0&&f.byteLength)return i;this.removeFragment(o)}return null},h.isTimeBuffered=function(o,c,s){for(var f,i,n=0;n<s.length;n++){if(f=s.start(n)-this.bufferPadding,i=s.end(n)+this.bufferPadding,o>=f&&c<=i)return!0;if(c<=f)return!1}return!1},h.onFragLoaded=function(o,c){var s=c.frag,f=c.part;if(s.sn==="initSegment"||s.bitrateTest||f)return;var i=l(s);this.fragments[i]={body:s,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},h.onBufferAppended=function(o,c){var s=this,f=c.frag,i=c.part,n=c.timeRanges;if(f.type===P.PlaylistLevelType.MAIN)if(this.activeFragment=f,i){var t=this.activeParts;t||(this.activeParts=t=[]),t.push(i)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(u){var y=n[u];if(s.detectEvictedFragments(u,y),!i)for(var g=0;g<y.length;g++)f.appendedPTS=Math.max(y.end(g),f.appendedPTS||0)})},h.onFragBuffered=function(o,c){this.detectPartialFragments(c)},h.hasFragment=function(o){var c=l(o);return!!this.fragments[c]},h.removeFragmentsInRange=function(o,c,s){var f=this;Object.keys(this.fragments).forEach(function(i){var n=f.fragments[i];if(!n)return;if(n.buffered){var t=n.body;t.type===s&&t.start<c&&t.end>o&&f.removeFragment(t)}})},h.removeFragment=function(o){var c=l(o);o.stats.loaded=0,o.clearElementaryStreamInfo(),delete this.fragments[c]},h.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},p}();function T(p){var h,d;return p.buffered&&(((h=p.range.video)===null||h===void 0?void 0:h.partial)||((d=p.range.audio)===null||d===void 0?void 0:d.partial))}function l(p){return p.type+"_"+p.level+"_"+p.urlId+"_"+p.sn}},"./src/controller/gap-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"STALL_MINIMUM_DURATION_MS",function(){return T}),U.d(Z,"MAX_START_GAP_JUMP",function(){return l}),U.d(Z,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return p}),U.d(Z,"SKIP_BUFFER_RANGE_START",function(){return h}),U.d(Z,"default",function(){return d});var w=U("./src/utils/buffer-helper.ts"),P=U("./src/errors.ts"),S=U("./src/events.ts"),C=U("./src/utils/logger.ts"),T=250,l=2,p=.1,h=.05,d=function(){function o(s,f,i,n){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=s,this.media=f,this.fragmentTracker=i,this.hls=n}var c=o.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(f){var i=this.config,n=this.media,t=this.stalled,u=n.currentTime,y=n.seeking,g=this.seeking&&!y,_=!this.seeking&&y;if(this.seeking=y,u!==f){if(this.moved=!0,t!==null){if(this.stallReported){var b=self.performance.now()-t;C.logger.warn("playback not stuck anymore @"+u+", after "+Math.round(b)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((_||g)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!w.BufferHelper.getBuffered(n).length)return;var v=w.BufferHelper.bufferInfo(n,u,0),m=v.len>0,E=v.nextStart||0;if(!m&&!E)return;if(y){var a=v.len>l,x=!E||E-u>l&&!this.fragmentTracker.getPartialFragment(u);if(a||x)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var O,A=Math.max(E,v.start||0)-u,D=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,I=D==null||((O=D.details)===null||O===void 0)?void 0:O.live,F=I?D.details.targetduration*2:l;if(A>0&&A<=F){this._trySkipBufferHole(null);return}}var K=self.performance.now();if(t===null){this.stalled=K;return}var ne=K-t;!y&&ne>=T&&this._reportStall(v.len);var j=w.BufferHelper.bufferInfo(n,u,i.maxBufferHole);this._tryFixBufferStall(j,ne)},c._tryFixBufferStall=function(f,i){var n=this.config,t=this.fragmentTracker,u=this.media,y=u.currentTime,g=t.getPartialFragment(y);if(g){var _=this._trySkipBufferHole(g);if(_)return}f.len>n.maxBufferHole&&i>n.highBufferWatchdogPeriod*1e3&&(C.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(f){var i=this.hls,n=this.media,t=this.stallReported;t||(this.stallReported=!0,C.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+f+")"),i.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:f}))},c._trySkipBufferHole=function(f){for(var i=this.config,n=this.hls,t=this.media,u=t.currentTime,y=0,g=w.BufferHelper.getBuffered(t),_=0;_<g.length;_++){var b=g.start(_);if(u+i.maxBufferHole>=y&&u<b){var v=Math.max(b+h,t.currentTime+p);return C.logger.warn("skipping hole, adjusting currentTime from "+u+" to "+v),this.moved=!0,this.stalled=null,t.currentTime=v,f&&n.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+u+" to "+v,frag:f}),v}y=g.end(_)}return 0},c._tryNudgeBuffer=function(){var f=this.config,i=this.hls,n=this.media,t=n.currentTime,u=(this.nudgeRetry||0)+1;if(this.nudgeRetry=u,u<f.nudgeMaxRetry){var y=t+u*f.nudgeOffset;C.logger.warn("Nudging 'currentTime' from "+t+" to "+y),n.currentTime=y,i.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else C.logger.error("Playhead still not moving while enough data buffered @"+t+" after "+f.nudgeMaxRetry+" nudges"),i.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},o}()},"./src/controller/id3-track-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/events.ts"),P=U("./src/utils/texttrack-utils.ts"),S=U("./src/demux/id3.ts"),C=.25,T=function(){function l(h){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=h,this._registerListeners()}var p=l.prototype;return p.destroy=function(){this._unregisterListeners()},p._registerListeners=function(){var d=this.hls;d.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.on(w.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),d.on(w.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},p._unregisterListeners=function(){var d=this.hls;d.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off(w.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),d.off(w.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},p.onMediaAttached=function(d,o){this.media=o.media},p.onMediaDetaching=function(){if(!this.id3Track)return;Object(P.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},p.getID3Track=function(d){if(!this.media)return;for(var o=0;o<d.length;o++){var c=d[o];if(c.kind==="metadata"&&c.label==="id3")return Object(P.sendAddTrackEvent)(c,this.media),c}return this.media.addTextTrack("metadata","id3")},p.onFragParsingMetadata=function(d,o){if(!this.media)return;var c=o.frag,s=o.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var f=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,i=0;i<s.length;i++){var n=S.getID3Frames(s[i].data);if(n){var t=s[i].pts,u=i<s.length-1?s[i+1].pts:c.end,y=u-t;y<=0&&(u=t+C);for(var g=0;g<n.length;g++){var _=n[g];if(!S.isTimeStampFrame(_)){var b=new f(t,u,"");b.value=_,this.id3Track.addCue(b)}}}}},p.onBufferFlushing=function(d,o){var c=o.startOffset,s=o.endOffset,f=o.type;if(!f||f==="audio"){var i=this.id3Track;i&&Object(P.removeCuesInRange)(i,c,s)}},l}();Z.default=T},"./src/controller/latency-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return l});var w=U("./src/errors.ts"),P=U("./src/events.ts"),S=U("./src/utils/logger.ts");function C(p,h){for(var d=0;d<h.length;d++){var o=h[d];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(p,o.key,o)}}function T(p,h,d){return h&&C(p.prototype,h),d&&C(p,d),p}var l=function(){function p(d){var o=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return o.timeupdate()},this.hls=d,this.config=d.config,this.registerListeners()}var h=p.prototype;return h.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},h.registerListeners=function(){this.hls.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(P.Events.ERROR,this.onError,this)},h.unregisterListeners=function(){this.hls.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(P.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(P.Events.ERROR,this.onError)},h.onMediaAttached=function(o,c){this.media=c.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},h.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},h.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},h.onLevelUpdated=function(o,c){var s=c.details;this.levelDetails=s,s.advanced&&this.timeupdate(),!s.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},h.onError=function(o,c){if(c.details!==w.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,S.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},h.timeupdate=function(){var o=this.media,c=this.levelDetails;if(!o||!c)return;this.currentTime=o.currentTime;var s=this.computeLatency();if(s===null)return;this._latency=s;var f=this.config,i=f.lowLatencyMode,n=f.maxLiveSyncPlaybackRate;if(!i||n===1)return;var t=this.targetLatency;if(t===null)return;var u=s-t,y=Math.min(this.maxLatency,t+c.targetduration),g=u<y;if(c.live&&g&&u>.05&&this.forwardBufferLength>1){var _=Math.min(2,Math.max(1,n)),b=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20;o.playbackRate=Math.min(_,Math.max(1,b))}else o.playbackRate!==1&&o.playbackRate!==0&&(o.playbackRate=1)},h.estimateLiveEdge=function(){var o=this.levelDetails;return o===null?null:o.edge+o.age},h.computeLatency=function(){var o=this.estimateLiveEdge();return o===null?null:o-this.currentTime},T(p,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var o=this.config,c=this.levelDetails;return o.liveMaxLatencyDuration!==void 0?o.liveMaxLatencyDuration:c?o.liveMaxLatencyDurationCount*c.targetduration:0}},{key:"targetLatency",get:function(){var o=this.levelDetails;if(o===null)return null;var c=o.holdBack,s=o.partHoldBack,f=o.targetduration,i=this.config,n=i.liveSyncDuration,t=i.liveSyncDurationCount,u=i.lowLatencyMode,y=this.hls.userConfig,g=u&&s||c;(y.liveSyncDuration||y.liveSyncDurationCount||g===0)&&(g=n!==void 0?n:t*f);var _=f,b=1;return g+Math.min(this.stallCount*b,_)}},{key:"liveSyncPosition",get:function(){var o=this.estimateLiveEdge(),c=this.targetLatency,s=this.levelDetails;if(o===null||c===null||s===null)return null;var f=s.edge,i=o-c-this.edgeStalled,n=f-s.totalduration,t=f-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(n,i),t)}},{key:"drift",get:function(){var o=this.levelDetails;return o===null?1:o.drift}},{key:"edgeStalled",get:function(){var o=this.levelDetails;if(o===null)return 0;var c=(this.config.lowLatencyMode&&o.partTarget||o.targetduration)*3;return Math.max(o.age-c,0)}},{key:"forwardBufferLength",get:function(){var o=this.media,c=this.levelDetails;if(!o||!c)return 0;var s=o.buffered.length;return s?o.buffered.end(s-1):c.edge-this.currentTime}}]),p}()},"./src/controller/level-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return i});var w=U("./src/types/level.ts"),P=U("./src/events.ts"),S=U("./src/errors.ts"),C=U("./src/utils/codecs.ts"),T=U("./src/controller/level-helper.ts"),l=U("./src/controller/base-playlist-controller.ts"),p=U("./src/types/loader.ts");function h(){return h=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var u=arguments[t];for(var y in u)Object.prototype.hasOwnProperty.call(u,y)&&(n[y]=u[y])}return n},h.apply(this,arguments)}function d(n,t){for(var u=0;u<t.length;u++){var y=t[u];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(n,y.key,y)}}function o(n,t,u){return t&&d(n.prototype,t),u&&d(n,u),n}function c(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n,s(n,t)}function s(n,t){return s=Object.setPrototypeOf||function(y,g){return y.__proto__=g,y},s(n,t)}var f=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),i=function(n){c(t,n);function t(y){var g;return g=n.call(this,y,"[level-controller]")||this,g._levels=[],g._firstLevel=-1,g._startLevel=void 0,g.currentLevelIndex=-1,g.manualLevelIndex=-1,g.onParsedComplete=void 0,g._registerListeners(),g}var u=t.prototype;return u._registerListeners=function(){var g=this.hls;g.on(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),g.on(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),g.on(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),g.on(P.Events.FRAG_LOADED,this.onFragLoaded,this),g.on(P.Events.ERROR,this.onError,this)},u._unregisterListeners=function(){var g=this.hls;g.off(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),g.off(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),g.off(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),g.off(P.Events.FRAG_LOADED,this.onFragLoaded,this),g.off(P.Events.ERROR,this.onError,this)},u.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},u.startLoad=function(){var g=this._levels;g.forEach(function(_){_.loadError=0}),n.prototype.startLoad.call(this)},u.onManifestLoaded=function(g,_){var b=[],v=[],m=[],E,a={},x,O=!1,A=!1,D=!1;if(_.levels.forEach(function(ne){var j=ne.attrs;O=O||!!(ne.width&&ne.height),A=A||!!ne.videoCodec,D=D||!!ne.audioCodec,f&&ne.audioCodec&&ne.audioCodec.indexOf("mp4a.40.34")!==-1&&(ne.audioCodec=void 0);var G=ne.bitrate+"-"+ne.attrs.RESOLUTION+"-"+ne.attrs.CODECS;x=a[G],x?x.url.push(ne.url):(x=new w.Level(ne),a[G]=x,b.push(x)),j&&(j.AUDIO&&Object(T.addGroupId)(x,"audio",j.AUDIO),j.SUBTITLES&&Object(T.addGroupId)(x,"text",j.SUBTITLES))}),(O||A)&&D&&(b=b.filter(function(ne){var j=ne.videoCodec,G=ne.width,X=ne.height;return!!j||!!(G&&X)})),b=b.filter(function(ne){var j=ne.audioCodec,G=ne.videoCodec;return(!j||Object(C.isCodecSupportedInMp4)(j,"audio"))&&(!G||Object(C.isCodecSupportedInMp4)(G,"video"))}),_.audioTracks&&(v=_.audioTracks.filter(function(ne){return!ne.audioCodec||Object(C.isCodecSupportedInMp4)(ne.audioCodec,"audio")}),Object(T.assignTrackIdsByGroup)(v)),_.subtitles&&(m=_.subtitles,Object(T.assignTrackIdsByGroup)(m)),b.length>0){E=b[0].bitrate,b.sort(function(ne,j){return ne.bitrate-j.bitrate}),this._levels=b;for(var I=0;I<b.length;I++)if(b[I].bitrate===E){this._firstLevel=I,this.log("manifest loaded, "+b.length+" level(s) found, first bitrate: "+E);break}var F=D&&!A,K={levels:b,audioTracks:v,subtitleTracks:m,firstLevel:this._firstLevel,stats:_.stats,audio:D,video:A,altAudio:!F&&v.some(function(ne){return!!ne.url})};this.hls.trigger(P.Events.MANIFEST_PARSED,K),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(P.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:_.url,reason:"no level with compatible codecs found in manifest"})},u.onError=function(g,_){if(n.prototype.onError.call(this,g,_),_.fatal)return;var b=_.context,v=this._levels[this.currentLevelIndex];if(b&&(b.type===p.PlaylistContextType.AUDIO_TRACK&&v.audioGroupIds&&b.groupId===v.audioGroupIds[v.urlId]||b.type===p.PlaylistContextType.SUBTITLE_TRACK&&v.textGroupIds&&b.groupId===v.textGroupIds[v.urlId])){this.redundantFailover(this.currentLevelIndex);return}var m=!1,E=!0,a;switch(_.details){case S.ErrorDetails.FRAG_LOAD_ERROR:case S.ErrorDetails.FRAG_LOAD_TIMEOUT:case S.ErrorDetails.KEY_LOAD_ERROR:case S.ErrorDetails.KEY_LOAD_TIMEOUT:if(_.frag){var x=this._levels[_.frag.level];x?(x.fragmentError++,x.fragmentError>this.hls.config.fragLoadingMaxRetry&&(a=_.frag.level)):a=_.frag.level}break;case S.ErrorDetails.LEVEL_LOAD_ERROR:case S.ErrorDetails.LEVEL_LOAD_TIMEOUT:b&&(b.deliveryDirectives&&(E=!1),a=b.level),m=!0;break;case S.ErrorDetails.REMUX_ALLOC_ERROR:a=_.level,m=!0;break}a!==void 0&&this.recoverLevel(_,a,m,E)},u.recoverLevel=function(g,_,b,v){var m=g.details,E=this._levels[_];if(E.loadError++,b){var a=this.retryLoadingOrFail(g);if(a)g.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(v){var x=E.url.length;if(x>1&&E.loadError<x)g.levelRetry=!0,this.redundantFailover(_);else if(this.manualLevelIndex===-1){var O=_===0?this._levels.length-1:_-1;this.currentLevelIndex!==O&&this._levels[O].loadError===0&&(this.warn(m+": switch to "+O),g.levelRetry=!0,this.hls.nextAutoLevel=O)}}},u.redundantFailover=function(g){var _=this._levels[g],b=_.url.length;if(b>1){var v=(_.urlId+1)%b;this.warn("Switching to redundant URL-id "+v),this._levels.forEach(function(m){m.urlId=v}),this.level=g}},u.onFragLoaded=function(g,_){var b=_.frag;if(b!==void 0&&b.type===p.PlaylistLevelType.MAIN){var v=this._levels[b.level];v!==void 0&&(v.fragmentError=0,v.loadError=0)}},u.onLevelLoaded=function(g,_){var b,v=_.level,m=_.details,E=this._levels[v];if(!E){var a;this.warn("Invalid level index "+v),(a=_.deliveryDirectives)!==null&&a!==void 0&&a.skip&&(m.deltaUpdateFailed=!0);return}v===this.currentLevelIndex?(E.fragmentError===0&&(E.loadError=0,this.retryCount=0),this.playlistLoaded(v,_,E.details)):(b=_.deliveryDirectives)!==null&&b!==void 0&&b.skip&&(m.deltaUpdateFailed=!0)},u.onAudioTrackSwitched=function(g,_){var b=this.hls.levels[this.currentLevelIndex];if(!b)return;if(b.audioGroupIds){for(var v=-1,m=this.hls.audioTracks[_.id].groupId,E=0;E<b.audioGroupIds.length;E++)if(b.audioGroupIds[E]===m){v=E;break}v!==b.urlId&&(b.urlId=v,this.startLoad())}},u.loadPlaylist=function(g){var _=this.currentLevelIndex,b=this._levels[_];if(this.canLoad&&b&&b.url.length>0){var v=b.urlId,m=b.url[v];if(g)try{m=g.addDirectives(m)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Attempt loading level index "+_+(g?" at sn "+g.msn+" part "+g.part:"")+" with URL-id "+v+" "+m),this.clearTimer(),this.hls.trigger(P.Events.LEVEL_LOADING,{url:m,level:_,id:v,deliveryDirectives:g||null})}},u.removeLevel=function(g,_){var b=function(E,a){return a!==_},v=this._levels.filter(function(m,E){return E!==g?!0:m.url.length>1&&_!==void 0?(m.url=m.url.filter(b),m.audioGroupIds&&(m.audioGroupIds=m.audioGroupIds.filter(b)),m.textGroupIds&&(m.textGroupIds=m.textGroupIds.filter(b)),m.urlId=0,!0):!1}).map(function(m,E){var a=m.details;return a!=null&&a.fragments&&a.fragments.forEach(function(x){x.level=E}),m});this._levels=v,this.hls.trigger(P.Events.LEVELS_UPDATED,{levels:v})},o(t,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(g){var _,b=this._levels;if(b.length===0)return;if(this.currentLevelIndex===g&&(_=b[g])!==null&&_!==void 0&&_.details)return;if(g<0||g>=b.length){var v=g<0;if(this.hls.trigger(P.Events.ERROR,{type:S.ErrorTypes.OTHER_ERROR,details:S.ErrorDetails.LEVEL_SWITCH_ERROR,level:g,fatal:v,reason:"invalid level idx"}),v)return;g=Math.min(g,b.length-1)}this.clearTimer();var m=this.currentLevelIndex,E=b[m],a=b[g];this.log("switching to level "+g+" from "+m),this.currentLevelIndex=g;var x=h({},a,{level:g,maxBitrate:a.maxBitrate,uri:a.uri,urlId:a.urlId});delete x._urlId,this.hls.trigger(P.Events.LEVEL_SWITCHING,x);var O=a.details;if(!O||O.live){var A=this.switchParams(a.uri,E==null?void 0:E.details);this.loadPlaylist(A)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(g){this.manualLevelIndex=g,this._startLevel===void 0&&(this._startLevel=g),g!==-1&&(this.level=g)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(g){this._firstLevel=g}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var g=this.hls.config.startLevel;return g!==void 0?g:this._firstLevel}else return this._startLevel},set:function(g){this._startLevel=g}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(g){this.level=g,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=g)}}]),t}(l.default)},"./src/controller/level-helper.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"addGroupId",function(){return S}),U.d(Z,"assignTrackIdsByGroup",function(){return C}),U.d(Z,"updatePTS",function(){return T}),U.d(Z,"updateFragPTSDTS",function(){return p}),U.d(Z,"mergeDetails",function(){return h}),U.d(Z,"mapPartIntersection",function(){return d}),U.d(Z,"mapFragmentIntersection",function(){return o}),U.d(Z,"adjustSliding",function(){return c}),U.d(Z,"addSliding",function(){return s}),U.d(Z,"computeReloadInterval",function(){return f}),U.d(Z,"getFragmentWithSN",function(){return i}),U.d(Z,"getPartWith",function(){return n});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/logger.ts");function S(t,u,y){switch(u){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(y);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(y);break}}function C(t){var u={};t.forEach(function(y){var g=y.groupId||"";y.id=u[g]=u[g]||0,u[g]++})}function T(t,u,y){var g=t[u],_=t[y];l(g,_)}function l(t,u){var y=u.startPTS;if(Object(w.isFiniteNumber)(y)){var g=0,_;u.sn>t.sn?(g=y-t.start,_=t):(g=t.start-y,_=u),_.duration!==g&&(_.duration=g)}else if(u.sn>t.sn){var b=t.cc===u.cc;b&&t.minEndPTS?u.start=t.start+(t.minEndPTS-t.start):u.start=t.start+t.duration}else u.start=Math.max(t.start-u.duration,0)}function p(t,u,y,g,_,b){var v=g-y;v<=0&&(P.logger.warn("Fragment should have a positive duration",u),g=y+u.duration,b=_+u.duration);var m=y,E=g,a=u.startPTS,x=u.endPTS;if(Object(w.isFiniteNumber)(a)){var O=Math.abs(a-y);Object(w.isFiniteNumber)(u.deltaPTS)?u.deltaPTS=Math.max(O,u.deltaPTS):u.deltaPTS=O,m=Math.max(y,a),y=Math.min(y,a),_=Math.min(_,u.startDTS),E=Math.min(g,x),g=Math.max(g,x),b=Math.max(b,u.endDTS)}u.duration=g-y;var A=y-u.start;u.appendedPTS=g,u.start=u.startPTS=y,u.maxStartPTS=m,u.startDTS=_,u.endPTS=g,u.minEndPTS=E,u.endDTS=b;var D=u.sn;if(!t||D<t.startSN||D>t.endSN)return 0;var I,F=D-t.startSN,K=t.fragments;for(K[F]=u,I=F;I>0;I--)l(K[I],K[I-1]);for(I=F;I<K.length-1;I++)l(K[I],K[I+1]);return t.fragmentHint&&l(K[K.length-1],t.fragmentHint),t.PTSKnown=t.alignedSliding=!0,A}function h(t,u){for(var y=null,g=t.fragments,_=g.length-1;_>=0;_--){var b=g[_].initSegment;if(b){y=b;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var v=0,m;if(o(t,u,function(I,F){I.relurl&&(v=I.cc-F.cc),Object(w.isFiniteNumber)(I.startPTS)&&Object(w.isFiniteNumber)(I.endPTS)&&(F.start=F.startPTS=I.startPTS,F.startDTS=I.startDTS,F.appendedPTS=I.appendedPTS,F.maxStartPTS=I.maxStartPTS,F.endPTS=I.endPTS,F.endDTS=I.endDTS,F.minEndPTS=I.minEndPTS,F.duration=I.endPTS-I.startPTS,F.duration&&(m=F),u.PTSKnown=u.alignedSliding=!0),F.elementaryStreams=I.elementaryStreams,F.loader=I.loader,F.stats=I.stats,F.urlId=I.urlId,I.initSegment&&(F.initSegment=I.initSegment,y=I.initSegment)}),y){var E=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments;E.forEach(function(I){var F;(!I.initSegment||I.initSegment.relurl===((F=y)===null||F===void 0?void 0:F.relurl))&&(I.initSegment=y)})}if(u.skippedSegments&&(u.deltaUpdateFailed=u.fragments.some(function(I){return!I}),u.deltaUpdateFailed)){P.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var a=u.skippedSegments;a--;)u.fragments.shift();u.startSN=u.fragments[0].sn,u.startCC=u.fragments[0].cc}var x=u.fragments;if(v){P.logger.warn("discontinuity sliding from playlist, take drift into account");for(var O=0;O<x.length;O++)x[O].cc+=v}u.skippedSegments&&(u.startCC=u.fragments[0].cc),d(t.partList,u.partList,function(I,F){F.elementaryStreams=I.elementaryStreams,F.stats=I.stats}),m?p(u,m,m.startPTS,m.endPTS,m.startDTS,m.endDTS):c(t,u),x.length&&(u.totalduration=u.edge-x[0].start),u.driftStartTime=t.driftStartTime,u.driftStart=t.driftStart;var A=u.advancedDateTime;if(u.advanced&&A){var D=u.edge;u.driftStart||(u.driftStartTime=A,u.driftStart=D),u.driftEndTime=A,u.driftEnd=D}else u.driftEndTime=t.driftEndTime,u.driftEnd=t.driftEnd,u.advancedDateTime=t.advancedDateTime}function d(t,u,y){if(t&&u)for(var g=0,_=0,b=t.length;_<=b;_++){var v=t[_],m=u[_+g];v&&m&&v.index===m.index&&v.fragment.sn===m.fragment.sn?y(v,m):g--}}function o(t,u,y){for(var g=u.skippedSegments,_=Math.max(t.startSN,u.startSN)-u.startSN,b=(t.fragmentHint?1:0)+(g?u.endSN:Math.min(t.endSN,u.endSN))-u.startSN,v=u.startSN-t.startSN,m=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments,E=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,a=_;a<=b;a++){var x=E[v+a],O=m[a];g&&!O&&a<g&&(O=u.fragments[a]=x),x&&O&&y(x,O)}}function c(t,u){var y=u.startSN+u.skippedSegments-t.startSN,g=t.fragments;if(y<0||y>=g.length)return;s(u,g[y].start)}function s(t,u){if(u){for(var y=t.fragments,g=t.skippedSegments;g<y.length;g++)y[g].start+=u;t.fragmentHint&&(t.fragmentHint.start+=u)}}function f(t,u){var y=1e3*t.levelTargetDuration,g=y/2,_=t.age,b=_>0&&_<y*3,v=u.loading.end-u.loading.start,m,E=t.availabilityDelay;if(t.updated===!1)if(b){var a=333*t.misses;m=Math.max(Math.min(g,v*2),a),t.availabilityDelay=(t.availabilityDelay||0)+m}else m=g;else b?(E=Math.min(E||y/2,_),t.availabilityDelay=E,m=E+y-_):m=y-v;return Math.round(m)}function i(t,u,y){if(!t||!t.details)return null;var g=t.details,_=g.fragments[u-g.startSN];return _||(_=g.fragmentHint,_&&_.sn===u?_:u<g.startSN&&y&&y.sn===u?y:null)}function n(t,u,y){if(!t||!t.details)return null;var g=t.details.partList;if(g)for(var _=g.length;_--;){var b=g[_];if(b.index===y&&b.fragment.sn===u)return b}return null}},"./src/controller/stream-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return g});var w=U("./src/polyfills/number.ts"),P=U("./src/controller/base-stream-controller.ts"),S=U("./src/is-supported.ts"),C=U("./src/events.ts"),T=U("./src/utils/buffer-helper.ts"),l=U("./src/controller/fragment-tracker.ts"),p=U("./src/types/loader.ts"),h=U("./src/loader/fragment.ts"),d=U("./src/demux/transmuxer-interface.ts"),o=U("./src/types/transmuxer.ts"),c=U("./src/controller/gap-controller.ts"),s=U("./src/errors.ts"),f=U("./src/utils/logger.ts");function i(_,b){for(var v=0;v<b.length;v++){var m=b[v];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(_,m.key,m)}}function n(_,b,v){return b&&i(_.prototype,b),v&&i(_,v),_}function t(_,b){_.prototype=Object.create(b.prototype),_.prototype.constructor=_,u(_,b)}function u(_,b){return u=Object.setPrototypeOf||function(m,E){return m.__proto__=E,m},u(_,b)}var y=100,g=function(_){t(b,_);function b(m,E){var a;return a=_.call(this,m,E,"[stream-controller]")||this,a.audioCodecSwap=!1,a.gapController=null,a.level=-1,a._forceStartLoad=!1,a.altAudio=!1,a.audioOnly=!1,a.fragPlaying=null,a.onvplaying=null,a.onvseeked=null,a.fragLastKbps=0,a.stalled=!1,a.couldBacktrack=!1,a.audioCodecSwitch=!1,a.videoBuffer=null,a._registerListeners(),a}var v=b.prototype;return v._registerListeners=function(){var E=this.hls;E.on(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.on(C.Events.LEVEL_LOADING,this.onLevelLoading,this),E.on(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(C.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.on(C.Events.ERROR,this.onError,this),E.on(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.on(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.on(C.Events.BUFFER_CREATED,this.onBufferCreated,this),E.on(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.on(C.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.on(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},v._unregisterListeners=function(){var E=this.hls;E.off(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.off(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(C.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.off(C.Events.ERROR,this.onError,this),E.off(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.off(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.off(C.Events.BUFFER_CREATED,this.onBufferCreated,this),E.off(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.off(C.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.off(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},v.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},v.startLoad=function(E){if(this.levels){var a=this.lastCurrentTime,x=this.hls;if(this.stopLoad(),this.setInterval(y),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var O=x.startLevel;O===-1&&(x.config.testBandwidth?(O=0,this.bitrateTest=!0):O=x.nextAutoLevel),this.level=x.nextLoadLevel=O,this.loadedmetadata=!1}a>0&&E===-1&&(this.log("Override startPosition with lastCurrentTime @"+a.toFixed(3)),E=a),this.state=P.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()}else this._forceStartLoad=!0,this.state=P.State.STOPPED},v.stopLoad=function(){this._forceStartLoad=!1,_.prototype.stopLoad.call(this)},v.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_LEVEL:{var E,a=this.levels,x=this.level,O=a==null||((E=a[x])===null||E===void 0)?void 0:E.details;if(O&&(!O.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(O))break;this.state=P.State.IDLE;break}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var A,D=self.performance.now(),I=this.retryDate;(!I||D>=I||(A=this.media)!==null&&A!==void 0&&A.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=P.State.IDLE)}break;default:break}this.onTickEnd()},v.onTickEnd=function(){_.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},v.doTickIdle=function(){var E,a,x=this.hls,O=this.levelLastLoaded,A=this.levels,D=this.media,I=x.config,F=x.nextLoadLevel;if(O===null||!D&&(this.startFragRequested||!I.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!A||!A[F])return;var K=A[F];this.level=x.nextLoadLevel=F;var ne=K.details;if(!ne||this.state===P.State.WAITING_LEVEL||ne.live&&this.levelLastLoaded!==F){this.state=P.State.WAITING_LEVEL;return}var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:D,p.PlaylistLevelType.MAIN);if(j===null)return;var G=j.len,X=this.getMaxBufferLength(K.maxBitrate);if(G>=X)return;if(this._streamEnded(j,ne)){var J={};this.altAudio&&(J.type="video"),this.hls.trigger(C.Events.BUFFER_EOS,J),this.state=P.State.ENDED;return}var B=j.end,Q=this.getNextFragment(B,ne);if(this.couldBacktrack&&!this.fragPrevious&&Q&&Q.sn!=="initSegment"){var ie=Q.sn-ne.startSN;ie>1&&(Q=ne.fragments[ie-1],this.fragmentTracker.removeFragment(Q))}if(Q&&this.fragmentTracker.getState(Q)===l.FragmentState.OK&&this.nextLoadPosition>B){var oe=this.audioOnly&&!this.altAudio?h.ElementaryStreamTypes.AUDIO:h.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(D,oe,p.PlaylistLevelType.MAIN),Q=this.getNextFragment(this.nextLoadPosition,ne)}if(!Q)return;Q.initSegment&&!Q.initSegment.data&&!this.bitrateTest&&(Q=Q.initSegment),((E=Q.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((a=Q.decryptdata)!==null&&a!==void 0&&a.key)?this.loadKey(Q,ne):this.loadFragment(Q,ne,B)},v.loadFragment=function(E,a,x){var O,A=this.fragmentTracker.getState(E);if(this.fragCurrent=E,A===l.FragmentState.BACKTRACKED){var D=this.fragmentTracker.getBacktrackData(E);if(D){this._handleFragmentLoadProgress(D),this._handleFragmentLoadComplete(D);return}else A=l.FragmentState.NOT_LOADED}A===l.FragmentState.NOT_LOADED||A===l.FragmentState.PARTIAL?E.sn==="initSegment"?this._loadInitSegment(E):this.bitrateTest?(E.bitrateTest=!0,this.log("Fragment "+E.sn+" of level "+E.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(E)):(this.startFragRequested=!0,_.prototype.loadFragment.call(this,E,a,x)):A===l.FragmentState.APPENDING?this.reduceMaxBufferLength(E.duration)&&this.fragmentTracker.removeFragment(E):((O=this.media)===null||O===void 0?void 0:O.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},v.getAppendedFrag=function(E){var a=this.fragmentTracker.getAppendedFrag(E,p.PlaylistLevelType.MAIN);return a&&"fragment"in a?a.fragment:a},v.getBufferedFrag=function(E){return this.fragmentTracker.getBufferedFrag(E,p.PlaylistLevelType.MAIN)},v.followingBufferedFrag=function(E){return E?this.getBufferedFrag(E.end+.5):null},v.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},v.nextLevelSwitch=function(){var E=this.levels,a=this.media;if(a!=null&&a.readyState){var x,O=this.getAppendedFrag(a.currentTime);if(O&&O.start>1&&this.flushMainBuffer(0,O.start-1),!a.paused&&E){var A=this.hls.nextLoadLevel,D=E[A],I=this.fragLastKbps;I&&this.fragCurrent?x=this.fragCurrent.duration*D.maxBitrate/(1e3*I)+1:x=0}else x=0;var F=this.getBufferedFrag(a.currentTime+x);if(F){var K=this.followingBufferedFrag(F);if(K){this.abortCurrentFrag();var ne=K.maxStartPTS?K.maxStartPTS:K.start,j=K.duration,G=Math.max(F.end,ne+Math.min(Math.max(j-this.config.maxFragLookUpTolerance,j*.5),j*.75));this.flushMainBuffer(G,Number.POSITIVE_INFINITY)}}}},v.abortCurrentFrag=function(){var E=this.fragCurrent;this.fragCurrent=null,E!=null&&E.loader&&E.loader.abort(),this.state===P.State.KEY_LOADING&&(this.state=P.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},v.flushMainBuffer=function(E,a){_.prototype.flushMainBuffer.call(this,E,a,this.altAudio?"video":null)},v.onMediaAttached=function(E,a){_.prototype.onMediaAttached.call(this,E,a);var x=a.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),x.addEventListener("playing",this.onvplaying),x.addEventListener("seeked",this.onvseeked),this.gapController=new c.default(this.config,x,this.fragmentTracker,this.hls)},v.onMediaDetaching=function(){var E=this.media;E&&(E.removeEventListener("playing",this.onvplaying),E.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),_.prototype.onMediaDetaching.call(this)},v.onMediaPlaying=function(){this.tick()},v.onMediaSeeked=function(){var E=this.media,a=E?E.currentTime:null;Object(w.isFiniteNumber)(a)&&this.log("Media seeked to "+a.toFixed(3)),this.tick()},v.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(C.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},v.onManifestParsed=function(E,a){var x=!1,O=!1,A;a.levels.forEach(function(D){A=D.audioCodec,A&&(A.indexOf("mp4a.40.2")!==-1&&(x=!0),A.indexOf("mp4a.40.5")!==-1&&(O=!0))}),this.audioCodecSwitch=x&&O&&!Object(S.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=a.levels,this.startFragRequested=!1},v.onLevelLoading=function(E,a){var x=this.levels;if(!x||this.state!==P.State.IDLE)return;var O=x[a.level];(!O.details||O.details.live&&this.levelLastLoaded!==a.level||this.waitForCdnTuneIn(O.details))&&(this.state=P.State.WAITING_LEVEL)},v.onLevelLoaded=function(E,a){var x,O=this.levels,A=a.level,D=a.details,I=D.totalduration;if(!O){this.warn("Levels were reset while loading level "+A);return}this.log("Level "+A+" loaded ["+D.startSN+","+D.endSN+"], cc ["+D.startCC+", "+D.endCC+"] duration:"+I);var F=this.fragCurrent;F&&(this.state===P.State.FRAG_LOADING||this.state===P.State.FRAG_LOADING_WAITING_RETRY)&&(F.level!==a.level&&F.loader&&(this.state=P.State.IDLE,F.loader.abort()));var K=O[A],ne=0;if(D.live||(x=K.details)!==null&&x!==void 0&&x.live){if(D.fragments[0]||(D.deltaUpdateFailed=!0),D.deltaUpdateFailed)return;ne=this.alignPlaylists(D,K.details)}if(K.details=D,this.levelLastLoaded=A,this.hls.trigger(C.Events.LEVEL_UPDATED,{details:D,level:A}),this.state===P.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(D))return;this.state=P.State.IDLE}this.startFragRequested?D.live&&this.synchronizeToLiveEdge(D):this.setStartPosition(D,ne),this.tick()},v._handleFragmentLoadProgress=function(E){var a,x=E.frag,O=E.part,A=E.payload,D=this.levels;if(!D){this.warn("Levels were reset while fragment load was in progress. Fragment "+x.sn+" of level "+x.level+" will not be buffered");return}var I=D[x.level],F=I.details;if(!F){this.warn("Dropping fragment "+x.sn+" of level "+x.level+" after level details were reset");return}var K=I.videoCodec,ne=F.PTSKnown||!F.live,j=(a=x.initSegment)===null||a===void 0?void 0:a.data,G=this._getAudioCodec(I),X=this.transmuxer=this.transmuxer||new d.default(this.hls,p.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),J=O?O.index:-1,B=J!==-1,Q=new o.ChunkMetadata(x.level,x.sn,x.stats.chunkCount,A.byteLength,J,B),ie=this.initPTS[x.cc];X.push(A,j,G,K,x,O,F.totalduration,ne,Q,ie)},v.onAudioTrackSwitching=function(E,a){var x=this.altAudio,O=!!a.url,A=a.id;if(!O){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var D=this.fragCurrent;D!=null&&D.loader&&(this.log("Switching to main audio track, cancel main fragment load"),D.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var I=this.hls;x&&I.trigger(C.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),I.trigger(C.Events.AUDIO_TRACK_SWITCHED,{id:A})}},v.onAudioTrackSwitched=function(E,a){var x=a.id,O=!!this.hls.audioTracks[x].url;if(O){var A=this.videoBuffer;A&&this.mediaBuffer!==A&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=A)}this.altAudio=O,this.tick()},v.onBufferCreated=function(E,a){var x=a.tracks,O,A,D=!1;for(var I in x){var F=x[I];if(F.id==="main"){if(A=I,O=F,I==="video"){var K=x[I];K&&(this.videoBuffer=K.buffer)}}else D=!0}D&&O?(this.log("Alternate track found, use "+A+".buffered to schedule main fragment loading"),this.mediaBuffer=O.buffer):this.mediaBuffer=this.media},v.onFragBuffered=function(E,a){var x=a.frag,O=a.part;if(x&&x.type!==p.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(x)){this.warn("Fragment "+x.sn+(O?" p: "+O.index:"")+" of level "+x.level+" finished buffering, but was aborted. state: "+this.state),this.state===P.State.PARSED&&(this.state=P.State.IDLE);return}var A=O?O.stats:x.stats;this.fragLastKbps=Math.round(8*A.total/(A.buffering.end-A.loading.first)),x.sn!=="initSegment"&&(this.fragPrevious=x),this.fragBufferedComplete(x,O)},v.onError=function(E,a){switch(a.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(p.PlaylistLevelType.MAIN,a);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==P.State.ERROR&&(a.fatal?(this.warn(""+a.details),this.state=P.State.ERROR):!a.levelRetry&&this.state===P.State.WAITING_LEVEL&&(this.state=P.State.IDLE));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(a.parent==="main"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var x=!0,O=this.getFwdBufferInfo(this.media,p.PlaylistLevelType.MAIN);O&&O.len>.5&&(x=!this.reduceMaxBufferLength(O.len)),x&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},v.checkBuffer=function(){var E=this.media,a=this.gapController;if(!E||!a||!E.readyState)return;var x=T.BufferHelper.getBuffered(E);!this.loadedmetadata&&x.length?(this.loadedmetadata=!0,this.seekToStartPos()):a.poll(this.lastCurrentTime),this.lastCurrentTime=E.currentTime},v.onFragLoadEmergencyAborted=function(){this.state=P.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},v.onBufferFlushed=function(E,a){var x=a.type;if(x!==h.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var O=(x===h.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(O,x,p.PlaylistLevelType.MAIN)}},v.onLevelsUpdated=function(E,a){this.levels=a.levels},v.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},v.seekToStartPos=function(){var E=this.media,a=E.currentTime,x=this.startPosition;if(x>=0&&a<x){if(E.seeking){f.logger.log("could not seek to "+x+", already seeking at "+a);return}var O=T.BufferHelper.getBuffered(E),A=O.length?O.start(0):0,D=A-x;D>0&&(D<this.config.maxBufferHole||D<this.config.maxFragLookUpTolerance)&&(f.logger.log("adjusting start position by "+D+" to match buffer start"),x+=D,this.startPosition=x),this.log("seek to target start position "+x+" from current time "+a),E.currentTime=x}},v._getAudioCodec=function(E){var a=this.config.defaultAudioCodec||E.audioCodec;return this.audioCodecSwap&&a&&(this.log("Swapping audio codec"),a.indexOf("mp4a.40.5")!==-1?a="mp4a.40.2":a="mp4a.40.5"),a},v._loadBitrateTestFrag=function(E){var a=this;this._doFragLoad(E).then(function(x){var O=a.hls;if(!x||O.nextLoadLevel||a.fragContextChanged(E))return;a.fragLoadError=0,a.state=P.State.IDLE,a.startFragRequested=!1,a.bitrateTest=!1;var A=E.stats;A.parsing.start=A.parsing.end=A.buffering.start=A.buffering.end=self.performance.now(),O.trigger(C.Events.FRAG_LOADED,x)})},v._handleTransmuxComplete=function(E){var a,x="main",O=this.hls,A=E.remuxResult,D=E.chunkMeta,I=this.getCurrentContext(D);if(!I){this.warn("The loading context changed while buffering fragment "+D.sn+" of level "+D.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(D.level);return}var F=I.frag,K=I.part,ne=I.level,j=A.video,G=A.text,X=A.id3,J=A.initSegment,B=this.altAudio?void 0:A.audio;if(this.fragContextChanged(F))return;if(this.state=P.State.PARSING,J){J.tracks&&(this._bufferInitSegment(ne,J.tracks,F,D),O.trigger(C.Events.FRAG_PARSING_INIT_SEGMENT,{frag:F,id:x,tracks:J.tracks}));var Q=J.initPTS,ie=J.timescale;Object(w.isFiniteNumber)(Q)&&(this.initPTS[F.cc]=Q,O.trigger(C.Events.INIT_PTS_FOUND,{frag:F,id:x,initPTS:Q,timescale:ie}))}if(j&&A.independent!==!1){if(ne.details){var oe=j.startPTS,xe=j.endPTS,ye=j.startDTS,Ae=j.endDTS;if(K)K.elementaryStreams[j.type]={startPTS:oe,endPTS:xe,startDTS:ye,endDTS:Ae};else if(j.firstKeyFrame&&j.independent&&(this.couldBacktrack=!0),j.dropped&&j.independent){var pe=this.getLoadPosition()+this.config.maxBufferHole;if(pe<oe){this.backtrack(F);return}F.setElementaryStreamInfo(j.type,F.start,xe,F.start,Ae,!0)}F.setElementaryStreamInfo(j.type,oe,xe,ye,Ae),this.bufferFragmentData(j,F,K,D)}}else if(A.independent===!1){this.backtrack(F);return}if(B){var Oe=B.startPTS,Fe=B.endPTS,Me=B.startDTS,Ce=B.endDTS;K&&(K.elementaryStreams[h.ElementaryStreamTypes.AUDIO]={startPTS:Oe,endPTS:Fe,startDTS:Me,endDTS:Ce}),F.setElementaryStreamInfo(h.ElementaryStreamTypes.AUDIO,Oe,Fe,Me,Ce),this.bufferFragmentData(B,F,K,D)}if(X!=null&&(a=X.samples)!==null&&a!==void 0&&a.length){var Le={frag:F,id:x,samples:X.samples};O.trigger(C.Events.FRAG_PARSING_METADATA,Le)}if(G){var de={frag:F,id:x,samples:G.samples};O.trigger(C.Events.FRAG_PARSING_USERDATA,de)}},v._bufferInitSegment=function(E,a,x,O){var A=this;if(this.state!==P.State.PARSING)return;this.audioOnly=!!a.audio&&!a.video,this.altAudio&&!this.audioOnly&&delete a.audio;var D=a.audio,I=a.video,F=a.audiovideo;if(D){var K=E.audioCodec,ne=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(K&&(K.indexOf("mp4a.40.5")!==-1?K="mp4a.40.2":K="mp4a.40.5"),D.metadata.channelCount!==1&&ne.indexOf("firefox")===-1&&(K="mp4a.40.5")),ne.indexOf("android")!==-1&&D.container!=="audio/mpeg"&&(K="mp4a.40.2",this.log("Android: force audio codec to "+K)),E.audioCodec&&E.audioCodec!==K&&this.log('Swapping manifest audio codec "'+E.audioCodec+'" for "'+K+'"'),D.levelCodec=K,D.id="main",this.log("Init audio buffer, container:"+D.container+", codecs[selected/level/parsed]=["+(K||"")+"/"+(E.audioCodec||"")+"/"+D.codec+"]")}I&&(I.levelCodec=E.videoCodec,I.id="main",this.log("Init video buffer, container:"+I.container+", codecs[level/parsed]=["+(E.videoCodec||"")+"/"+I.codec+"]")),F&&this.log("Init audiovideo buffer, container:"+F.container+", codecs[level/parsed]=["+(E.attrs.CODECS||"")+"/"+F.codec+"]"),this.hls.trigger(C.Events.BUFFER_CODECS,a),Object.keys(a).forEach(function(j){var G=a[j],X=G.initSegment;X!=null&&X.byteLength&&A.hls.trigger(C.Events.BUFFER_APPENDING,{type:j,data:X,frag:x,part:null,chunkMeta:O,parent:x.type})}),this.tick()},v.backtrack=function(E){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(E);var a=this.fragmentTracker.backtrack(E);this.fragPrevious=null,this.nextLoadPosition=E.start,a?this.resetFragmentLoading(E):this.state=P.State.BACKTRACKING},v.checkFragmentChanged=function(){var E=this.media,a=null;if(E&&E.readyState>1&&E.seeking===!1){var x=E.currentTime;if(T.BufferHelper.isBuffered(E,x)?a=this.getAppendedFrag(x):T.BufferHelper.isBuffered(E,x+.1)&&(a=this.getAppendedFrag(x+.1)),a){var O=this.fragPlaying,A=a.level;(!O||a.sn!==O.sn||O.level!==A||a.urlId!==O.urlId)&&(this.hls.trigger(C.Events.FRAG_CHANGED,{frag:a}),(!O||O.level!==A)&&this.hls.trigger(C.Events.LEVEL_SWITCHED,{level:A}),this.fragPlaying=a)}}},n(b,[{key:"nextLevel",get:function(){var E=this.nextBufferedFrag;return E?E.level:-1}},{key:"currentLevel",get:function(){var E=this.media;if(E){var a=this.getAppendedFrag(E.currentTime);if(a)return a.level}return-1}},{key:"nextBufferedFrag",get:function(){var E=this.media;if(E){var a=this.getAppendedFrag(E.currentTime);return this.followingBufferedFrag(a)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),b}(P.default)},"./src/controller/subtitle-stream-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"SubtitleStreamController",function(){return t});var w=U("./src/events.ts"),P=U("./src/utils/logger.ts"),S=U("./src/utils/buffer-helper.ts"),C=U("./src/controller/fragment-finders.ts"),T=U("./src/utils/discontinuities.ts"),l=U("./src/controller/level-helper.ts"),p=U("./src/controller/fragment-tracker.ts"),h=U("./src/controller/base-stream-controller.ts"),d=U("./src/types/loader.ts"),o=U("./src/types/level.ts");function c(u,y){for(var g=0;g<y.length;g++){var _=y[g];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(u,_.key,_)}}function s(u,y,g){return y&&c(u.prototype,y),g&&c(u,g),u}function f(u,y){u.prototype=Object.create(y.prototype),u.prototype.constructor=u,i(u,y)}function i(u,y){return i=Object.setPrototypeOf||function(_,b){return _.__proto__=b,_},i(u,y)}var n=500,t=function(u){f(y,u);function y(_,b){var v;return v=u.call(this,_,b,"[subtitle-stream-controller]")||this,v.levels=[],v.currentTrackId=-1,v.tracksBuffered=[],v.mainDetails=null,v._registerListeners(),v}var g=y.prototype;return g.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},g._registerListeners=function(){var b=this.hls;b.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.on(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(w.Events.ERROR,this.onError,this),b.on(w.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),b.on(w.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),b.on(w.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),b.on(w.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),b.on(w.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},g._unregisterListeners=function(){var b=this.hls;b.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.off(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(w.Events.ERROR,this.onError,this),b.off(w.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),b.off(w.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),b.off(w.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),b.off(w.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),b.off(w.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},g.startLoad=function(){this.stopLoad(),this.state=h.State.IDLE,this.setInterval(n),this.tick()},g.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},g.onLevelLoaded=function(b,v){this.mainDetails=v.details},g.onSubtitleFragProcessed=function(b,v){var m=v.frag,E=v.success;if(this.fragPrevious=m,this.state=h.State.IDLE,!E)return;var a=this.tracksBuffered[this.currentTrackId];if(!a)return;for(var x,O=m.start,A=0;A<a.length;A++)if(O>=a[A].start&&O<=a[A].end){x=a[A];break}var D=m.start+m.duration;x?x.end=D:(x={start:O,end:D},a.push(x)),this.fragmentTracker.fragBuffered(m)},g.onBufferFlushing=function(b,v){var m=v.startOffset,E=v.endOffset;if(m===0&&E!==Number.POSITIVE_INFINITY){var a=this.currentTrackId,x=this.levels;if(!x.length||!x[a]||!x[a].details)return;var O=x[a].details,A=O.targetduration,D=E-A;if(D<=0)return;v.endOffsetSubtitles=Math.max(0,D),this.tracksBuffered.forEach(function(I){for(var F=0;F<I.length;){if(I[F].end<=D){I.shift();continue}else if(I[F].start<D)I[F].start=D;else break;F++}}),this.fragmentTracker.removeFragmentsInRange(m,D,d.PlaylistLevelType.SUBTITLE)}},g.onError=function(b,v){var m,E=v.frag;if(!E||E.type!==d.PlaylistLevelType.SUBTITLE)return;(m=this.fragCurrent)!==null&&m!==void 0&&m.loader&&this.fragCurrent.loader.abort(),this.state=h.State.IDLE},g.onSubtitleTracksUpdated=function(b,v){var m=this,E=v.subtitleTracks;this.tracksBuffered=[],this.levels=E.map(function(a){return new o.Level(a)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(a){m.tracksBuffered[a.id]=[]}),this.mediaBuffer=null},g.onSubtitleTrackSwitch=function(b,v){if(this.currentTrackId=v.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var m=this.levels[this.currentTrackId];m!=null&&m.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,m&&this.setInterval(n)},g.onSubtitleTrackLoaded=function(b,v){var m,E=v.details,a=v.id,x=this.currentTrackId,O=this.levels;if(!O.length)return;var A=O[x];if(a>=O.length||a!==x||!A)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,E.live||(m=A.details)!==null&&m!==void 0&&m.live){var D=this.mainDetails;if(E.deltaUpdateFailed||!D)return;var I=D.fragments[0];if(!A.details)E.hasProgramDateTime&&D.hasProgramDateTime?Object(T.alignMediaPlaylistByPDT)(E,D):I&&Object(l.addSliding)(E,I.start);else{var F=this.alignPlaylists(E,A.details);F===0&&I&&Object(l.addSliding)(E,I.start)}}if(A.details=E,this.levelLastLoaded=a,this.tick(),E.live&&!this.fragCurrent&&this.media&&this.state===h.State.IDLE){var K=Object(C.findFragmentByPTS)(null,E.fragments,this.media.currentTime,0);K||(this.warn("Subtitle playlist not aligned with playback"),A.details=void 0)}},g._handleFragmentLoadComplete=function(b){var v=b.frag,m=b.payload,E=v.decryptdata,a=this.hls;if(this.fragContextChanged(v))return;if(m&&m.byteLength>0&&E&&E.key&&E.iv&&E.method==="AES-128"){var x=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(m),E.key.buffer,E.iv.buffer).then(function(O){var A=performance.now();a.trigger(w.Events.FRAG_DECRYPTED,{frag:v,payload:O,stats:{tstart:x,tdecrypt:A}})})}},g.doTick=function(){if(!this.media){this.state=h.State.IDLE;return}if(this.state===h.State.IDLE){var b,v=this.currentTrackId,m=this.levels;if(!m.length||!m[v]||!m[v].details)return;var E=m[v].details,a=E.targetduration,x=this.config,O=this.media,A=S.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,O.currentTime-a,x.maxBufferHole),D=A.end,I=A.len,F=this.getMaxBufferLength()+a;if(I>F)return;console.assert(E,"Subtitle track details are defined on idle subtitle stream controller tick");var K=E.fragments,ne=K.length,j=E.edge,G,X=this.fragPrevious;if(D<j){var J=x.maxFragLookUpTolerance;X&&E.hasProgramDateTime&&(G=Object(C.findFragmentByPDT)(K,X.endProgramDateTime,J)),G||(G=Object(C.findFragmentByPTS)(X,K,D,J),!G&&X&&X.start<K[0].start&&(G=K[0]))}else G=K[ne-1];(b=G)!==null&&b!==void 0&&b.encrypted?(P.logger.log("Loading key for "+G.sn),this.state=h.State.KEY_LOADING,this.hls.trigger(w.Events.KEY_LOADING,{frag:G})):G&&this.fragmentTracker.getState(G)===p.FragmentState.NOT_LOADED&&this.loadFragment(G,E,D)}},g.loadFragment=function(b,v,m){this.fragCurrent=b,u.prototype.loadFragment.call(this,b,v,m)},s(y,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),y}(h.default)},"./src/controller/subtitle-track-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/events.ts"),P=U("./src/utils/texttrack-utils.ts"),S=U("./src/controller/base-playlist-controller.ts"),C=U("./src/types/loader.ts");function T(c,s){for(var f=0;f<s.length;f++){var i=s[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}function l(c,s,f){return s&&T(c.prototype,s),f&&T(c,f),c}function p(c,s){c.prototype=Object.create(s.prototype),c.prototype.constructor=c,h(c,s)}function h(c,s){return h=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},h(c,s)}var d=function(c){p(s,c);function s(i){var n;return n=c.call(this,i,"[subtitle-track-controller]")||this,n.media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n.subtitleDisplay=!0,n.registerListeners(),n}var f=s.prototype;return f.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,c.prototype.destroy.call(this)},f.registerListeners=function(){var n=this.hls;n.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(w.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(w.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.on(w.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.on(w.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){var n=this.hls;n.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(w.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(w.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.off(w.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.off(w.Events.ERROR,this.onError,this)},f.onMediaAttached=function(n,t){if(this.media=t.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},f.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},f.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var n=o(this.media.textTracks);n.forEach(function(t){Object(P.clearCurrentCues)(t)}),this.subtitleTrack=-1,this.media=null},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(n,t){this.tracks=t.subtitleTracks},f.onSubtitleTrackLoaded=function(n,t){var u=t.id,y=t.details,g=this.trackId,_=this.tracksInGroup[g];if(!_){this.warn("Invalid subtitle track id "+u);return}var b=_.details;_.details=t.details,this.log("subtitle track "+u+" loaded ["+y.startSN+"-"+y.endSN+"]"),u===this.trackId&&(this.retryCount=0,this.playlistLoaded(u,t,b))},f.onLevelLoading=function(n,t){this.switchLevel(t.level)},f.onLevelSwitching=function(n,t){this.switchLevel(t.level)},f.switchLevel=function(n){var t=this.hls.levels[n];if(!(t!=null&&t.textGroupIds))return;var u=t.textGroupIds[t.urlId];if(this.groupId!==u){var y=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,g=this.tracks.filter(function(v){return!u||v.groupId===u});this.tracksInGroup=g;var _=this.findTrackId(y==null?void 0:y.name)||this.findTrackId();this.groupId=u;var b={subtitleTracks:g};this.log("Updating subtitle tracks, "+g.length+' track(s) found in "'+u+'" group-id'),this.hls.trigger(w.Events.SUBTITLE_TRACKS_UPDATED,b),_!==-1&&this.setSubtitleTrack(_,y)}},f.findTrackId=function(n){for(var t=this.tracksInGroup,u=0;u<t.length;u++){var y=t[u];if((!this.selectDefaultTrack||y.default)&&(!n||n===y.name))return y.id}return-1},f.onError=function(n,t){if(c.prototype.onError.call(this,n,t),t.fatal||!t.context)return;t.context.type===C.PlaylistContextType.SUBTITLE_TRACK&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&this.retryLoadingOrFail(t)},f.loadPlaylist=function(n){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var u=t.id,y=t.groupId,g=t.url;if(n)try{g=n.addDirectives(g)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("Loading subtitle playlist for id "+u),this.hls.trigger(w.Events.SUBTITLE_TRACK_LOADING,{url:g,id:u,groupId:y,deliveryDirectives:n||null})}},f.toggleTrackModes=function(n){var t=this,u=this.media,y=this.subtitleDisplay,g=this.trackId;if(!u)return;var _=o(u.textTracks),b=_.filter(function(E){return E.groupId===t.groupId});if(n===-1)[].slice.call(_).forEach(function(E){E.mode="disabled"});else{var v=b[g];v&&(v.mode="disabled")}var m=b[n];m&&(m.mode=y?"showing":"hidden")},f.setSubtitleTrack=function(n,t){var u,y=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(u=y[n])!==null&&u!==void 0&&u.details)||n<-1||n>=y.length)return;this.clearTimer();var g=y[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,g){var _=g.id,b=g.groupId,v=b===void 0?"":b,m=g.name,E=g.type,a=g.url;this.hls.trigger(w.Events.SUBTITLE_TRACK_SWITCH,{id:_,groupId:v,name:m,type:E,url:a});var x=this.switchParams(g.url,t==null?void 0:t.details);this.loadPlaylist(x)}else this.hls.trigger(w.Events.SUBTITLE_TRACK_SWITCH,{id:n})},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,t=o(this.media.textTracks),u=0;u<t.length;u++)if(t[u].mode==="hidden")n=u;else if(t[u].mode==="showing"){n=u;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},l(s,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var t=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,t)}}]),s}(S.default);function o(c){for(var s=[],f=0;f<c.length;f++){var i=c[f];i.kind==="subtitles"&&i.label&&s.push(c[f])}return s}Z.default=d},"./src/controller/timeline-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"TimelineController",function(){return o});var w=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),S=U("./src/utils/cea-608-parser.ts"),C=U("./src/utils/output-filter.ts"),T=U("./src/utils/webvtt-parser.ts"),l=U("./src/utils/texttrack-utils.ts"),p=U("./src/utils/imsc1-ttml-parser.ts"),h=U("./src/types/loader.ts"),d=U("./src/utils/logger.ts"),o=function(){function i(t){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=f(),this.captionsProperties=void 0,this.hls=t,this.config=t.config,this.Cues=t.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var u=new C.default(this,"textTrack1"),y=new C.default(this,"textTrack2"),g=new C.default(this,"textTrack3"),_=new C.default(this,"textTrack4");this.cea608Parser1=new S.default(1,u,y),this.cea608Parser2=new S.default(3,g,_)}t.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(P.Events.FRAG_LOADING,this.onFragLoading,this),t.on(P.Events.FRAG_LOADED,this.onFragLoaded,this),t.on(P.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.on(P.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.on(P.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(P.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=i.prototype;return n.destroy=function(){var u=this.hls;u.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),u.off(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),u.off(P.Events.FRAG_LOADING,this.onFragLoading,this),u.off(P.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(P.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),u.off(P.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),u.off(P.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.off(P.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),u.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(u,y,g,_,b){for(var v=!1,m=b.length;m--;){var E=b[m],a=s(E[0],E[1],y,g);if(a>=0&&(E[0]=Math.min(E[0],y),E[1]=Math.max(E[1],g),v=!0,a/(g-y)>.5))return}if(v||b.push([y,g]),this.config.renderTextTracksNatively){var x=this.captionsTracks[u];this.Cues.newCue(x,y,g,_)}else{var O=this.Cues.newCue(null,y,g,_);this.hls.trigger(P.Events.CUES_PARSED,{type:"captions",cues:O,track:u})}},n.onInitPtsFound=function(u,y){var g=this,_=y.frag,b=y.id,v=y.initPTS,m=y.timescale,E=this.unparsedVttFrags;b==="main"&&(this.initPTS[_.cc]=v,this.timescale[_.cc]=m),E.length&&(this.unparsedVttFrags=[],E.forEach(function(a){g.onFragLoaded(P.Events.FRAG_LOADED,a)}))},n.getExistingTrack=function(u){var y=this.media;if(y)for(var g=0;g<y.textTracks.length;g++){var _=y.textTracks[g];if(_[u])return _}return null},n.createCaptionsTrack=function(u){this.config.renderTextTracksNatively?this.createNativeTrack(u):this.createNonNativeTrack(u)},n.createNativeTrack=function(u){if(this.captionsTracks[u])return;var y=this.captionsProperties,g=this.captionsTracks,_=this.media,b=y[u],v=b.label,m=b.languageCode,E=this.getExistingTrack(u);if(E)g[u]=E,Object(l.clearCurrentCues)(g[u]),Object(l.sendAddTrackEvent)(g[u],_);else{var a=this.createTextTrack("captions",v,m);a&&(a[u]=!0,g[u]=a)}},n.createNonNativeTrack=function(u){if(this.nonNativeCaptionsTracks[u])return;var y=this.captionsProperties[u];if(!y)return;var g=y.label,_={_id:u,label:g,kind:"captions",default:y.media?!!y.media.default:!1,closedCaptions:y.media};this.nonNativeCaptionsTracks[u]=_,this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[_]})},n.createTextTrack=function(u,y,g){var _=this.media;return _?_.addTextTrack(u,y,g):void 0},n.onMediaAttaching=function(u,y){this.media=y.media,this._cleanTracks()},n.onMediaDetaching=function(){var u=this.captionsTracks;Object.keys(u).forEach(function(y){Object(l.clearCurrentCues)(u[y]),delete u[y]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=f(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},n._cleanTracks=function(){var u=this.media;if(!u)return;var y=u.textTracks;if(y)for(var g=0;g<y.length;g++)Object(l.clearCurrentCues)(y[g])},n.onSubtitleTracksUpdated=function(u,y){var g=this;this.textTracks=[];var _=y.subtitleTracks||[],b=_.some(function(a){return a.textCodec===p.IMSC1_CODEC});if(this.config.enableWebVTT||b&&this.config.enableIMSC1){var v=this.tracks&&_&&this.tracks.length===_.length;if(this.tracks=_||[],this.config.renderTextTracksNatively){var m=this.media?this.media.textTracks:[];this.tracks.forEach(function(a,x){var O;if(x<m.length){for(var A=null,D=0;D<m.length;D++)if(c(m[D],a)){A=m[D];break}A&&(O=A)}O?Object(l.clearCurrentCues)(O):(O=g.createTextTrack("subtitles",a.name,a.lang),O&&(O.mode="disabled")),O&&(O.groupId=a.groupId,g.textTracks.push(O))})}else if(!v&&this.tracks&&this.tracks.length){var E=this.tracks.map(function(a){return{label:a.name,kind:a.type.toLowerCase(),default:a.default,subtitleTrack:a}});this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:E})}}},n.onManifestLoaded=function(u,y){var g=this;this.config.enableCEA708Captions&&y.captions&&y.captions.forEach(function(_){var b=/(?:CC|SERVICE)([1-4])/.exec(_.instreamId);if(!b)return;var v="textTrack"+b[1],m=g.captionsProperties[v];if(!m)return;m.label=_.name,_.lang&&(m.languageCode=_.lang),m.media=_})},n.onFragLoading=function(u,y){var g=this.cea608Parser1,_=this.cea608Parser2,b=this.lastSn,v=this.lastPartIndex;if(!this.enabled||!(g&&_))return;if(y.frag.type===h.PlaylistLevelType.MAIN){var m,E,a=y.frag.sn,x=(m=y==null||((E=y.part)===null||E===void 0)?void 0:E.index)!=null?m:-1;a===b+1||a===b&&x===v+1||(g.reset(),_.reset()),this.lastSn=a,this.lastPartIndex=x}},n.onFragLoaded=function(u,y){var g=y.frag,_=y.payload,b=this.initPTS,v=this.unparsedVttFrags;if(g.type===h.PlaylistLevelType.SUBTITLE)if(_.byteLength){if(!Object(w.isFiniteNumber)(b[g.cc])){v.push(y),b.length&&this.hls.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:g,error:new Error("Missing initial subtitle PTS")});return}var m=g.decryptdata;if(m==null||m.key==null||m.method!=="AES-128"){var E=this.tracks[g.level],a=this.vttCCs;a[g.cc]||(a[g.cc]={start:g.start,prevCC:this.prevCC,new:!0},this.prevCC=g.cc),E&&E.textCodec===p.IMSC1_CODEC?this._parseIMSC1(g,_):this._parseVTTs(g,_,a)}}else this.hls.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:g,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(u,y){var g=this,_=this.hls;Object(p.parseIMSC1)(y,this.initPTS[u.cc],this.timescale[u.cc],function(b){g._appendCues(b,u.level),_.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(b){d.logger.log("Failed to parse IMSC1: "+b),_.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:b})})},n._parseVTTs=function(u,y,g){var _=this,b=this.hls;Object(T.parseWebVTT)(y,this.initPTS[u.cc],this.timescale[u.cc],g,u.cc,u.start,function(v){_._appendCues(v,u.level),b.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(v){_._fallbackToIMSC1(u,y),d.logger.log("Failed to parse VTT cue: "+v),b.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:v})})},n._fallbackToIMSC1=function(u,y){var g=this,_=this.tracks[u.level];_.textCodec||Object(p.parseIMSC1)(y,this.initPTS[u.cc],this.timescale[u.cc],function(){_.textCodec=p.IMSC1_CODEC,g._parseIMSC1(u,y)},function(){_.textCodec="wvtt"})},n._appendCues=function(u,y){var g=this.hls;if(this.config.renderTextTracksNatively){var _=this.textTracks[y];if(_.mode==="disabled")return;u.forEach(function(m){return Object(l.addCueToTrack)(_,m)})}else{var b=this.tracks[y],v=b.default?"default":"subtitles"+y;g.trigger(P.Events.CUES_PARSED,{type:"subtitles",cues:u,track:v})}},n.onFragDecrypted=function(u,y){var g=y.frag;if(g.type===h.PlaylistLevelType.SUBTITLE){if(!Object(w.isFiniteNumber)(this.initPTS[g.cc])){this.unparsedVttFrags.push(y);return}this.onFragLoaded(P.Events.FRAG_LOADED,y)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(u,y){var g=this.cea608Parser1,_=this.cea608Parser2;if(!this.enabled||!(g&&_))return;for(var b=0;b<y.samples.length;b++){var v=y.samples[b].bytes;if(v){var m=this.extractCea608Data(v);g.addData(y.samples[b].pts,m[0]),_.addData(y.samples[b].pts,m[1])}}},n.onBufferFlushing=function(u,y){var g=y.startOffset,_=y.endOffset,b=y.endOffsetSubtitles,v=y.type,m=this.media;if(!m||m.currentTime<_)return;if(!v||v==="video"){var E=this.captionsTracks;Object.keys(E).forEach(function(x){return Object(l.removeCuesInRange)(E[x],g,_)})}if(this.config.renderTextTracksNatively&&(g===0&&b!==void 0)){var a=this.textTracks;Object.keys(a).forEach(function(x){return Object(l.removeCuesInRange)(a[x],g,b)})}},n.extractCea608Data=function(u){for(var y=u[0]&31,g=2,_=[[],[]],b=0;b<y;b++){var v=u[g++],m=127&u[g++],E=127&u[g++],a=(4&v)!==0,x=3&v;if(m===0&&E===0)continue;a&&((x===0||x===1)&&(_[x].push(m),_[x].push(E)))}return _},i}();function c(i,n){return i&&i.label===n.name&&!(i.textTrack1||i.textTrack2)}function s(i,n,t,u){return Math.min(n,u)-Math.max(i,t)}function f(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return w});var w=function(){function P(C,T){this.subtle=void 0,this.aesIV=void 0,this.subtle=C,this.aesIV=T}var S=P.prototype;return S.decrypt=function(T,l){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},l,T)},P}()},"./src/crypt/aes-decryptor.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"removePadding",function(){return P}),U.d(Z,"default",function(){return S});var w=U("./src/utils/typed-array.ts");function P(C){var T=C.byteLength,l=T&&new DataView(C.buffer).getUint8(T-1);return l?Object(w.sliceUint8)(C,0,T-l):C}var S=function(){function C(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var T=C.prototype;return T.uint8ArrayToUint32Array_=function(p){for(var h=new DataView(p),d=new Uint32Array(4),o=0;o<4;o++)d[o]=h.getUint32(o*4);return d},T.initTable=function(){var p=this.sBox,h=this.invSBox,d=this.subMix,o=d[0],c=d[1],s=d[2],f=d[3],i=this.invSubMix,n=i[0],t=i[1],u=i[2],y=i[3],g=new Uint32Array(256),_=0,b=0,v=0;for(v=0;v<256;v++)v<128?g[v]=v<<1:g[v]=v<<1^283;for(v=0;v<256;v++){var m=b^b<<1^b<<2^b<<3^b<<4;m=m>>>8^m&255^99,p[_]=m,h[m]=_;var E=g[_],a=g[E],x=g[a],O=g[m]*257^m*16843008;o[_]=O<<24|O>>>8,c[_]=O<<16|O>>>16,s[_]=O<<8|O>>>24,f[_]=O,O=x*16843009^a*65537^E*257^_*16843008,n[m]=O<<24|O>>>8,t[m]=O<<16|O>>>16,u[m]=O<<8|O>>>24,y[m]=O,_?(_=E^g[g[g[x^E]]],b^=g[g[b]]):_=b=1}},T.expandKey=function(p){for(var h=this.uint8ArrayToUint32Array_(p),d=!0,o=0;o<h.length&&d;)d=h[o]===this.key[o],o++;if(d)return;this.key=h;var c=this.keySize=h.length;if(c!==4&&c!==6&&c!==8)throw new Error("Invalid aes key size="+c);var s=this.ksRows=(c+6+1)*4,f,i,n=this.keySchedule=new Uint32Array(s),t=this.invKeySchedule=new Uint32Array(s),u=this.sBox,y=this.rcon,g=this.invSubMix,_=g[0],b=g[1],v=g[2],m=g[3],E,a;for(f=0;f<s;f++){if(f<c){E=n[f]=h[f];continue}a=E,f%c===0?(a=a<<8|a>>>24,a=u[a>>>24]<<24|u[a>>>16&255]<<16|u[a>>>8&255]<<8|u[a&255],a^=y[f/c|0]<<24):c>6&&f%c===4&&(a=u[a>>>24]<<24|u[a>>>16&255]<<16|u[a>>>8&255]<<8|u[a&255]),n[f]=E=(n[f-c]^a)>>>0}for(i=0;i<s;i++)f=s-i,i&3?a=n[f]:a=n[f-4],i<4||f<=4?t[i]=a:t[i]=_[u[a>>>24]]^b[u[a>>>16&255]]^v[u[a>>>8&255]]^m[u[a&255]],t[i]=t[i]>>>0},T.networkToHostOrderSwap=function(p){return p<<24|(p&65280)<<8|(p&16711680)>>8|p>>>24},T.decrypt=function(p,h,d){for(var o=this.keySize+6,c=this.invKeySchedule,s=this.invSBox,f=this.invSubMix,i=f[0],n=f[1],t=f[2],u=f[3],y=this.uint8ArrayToUint32Array_(d),g=y[0],_=y[1],b=y[2],v=y[3],m=new Int32Array(p),E=new Int32Array(m.length),a,x,O,A,D,I,F,K,ne,j,G,X,J,B,Q=this.networkToHostOrderSwap;h<m.length;){for(ne=Q(m[h]),j=Q(m[h+1]),G=Q(m[h+2]),X=Q(m[h+3]),D=ne^c[0],I=X^c[1],F=G^c[2],K=j^c[3],J=4,B=1;B<o;B++)a=i[D>>>24]^n[I>>16&255]^t[F>>8&255]^u[K&255]^c[J],x=i[I>>>24]^n[F>>16&255]^t[K>>8&255]^u[D&255]^c[J+1],O=i[F>>>24]^n[K>>16&255]^t[D>>8&255]^u[I&255]^c[J+2],A=i[K>>>24]^n[D>>16&255]^t[I>>8&255]^u[F&255]^c[J+3],D=a,I=x,F=O,K=A,J=J+4;a=s[D>>>24]<<24^s[I>>16&255]<<16^s[F>>8&255]<<8^s[K&255]^c[J],x=s[I>>>24]<<24^s[F>>16&255]<<16^s[K>>8&255]<<8^s[D&255]^c[J+1],O=s[F>>>24]<<24^s[K>>16&255]<<16^s[D>>8&255]<<8^s[I&255]^c[J+2],A=s[K>>>24]<<24^s[D>>16&255]<<16^s[I>>8&255]<<8^s[F&255]^c[J+3],E[h]=Q(a^g),E[h+1]=Q(A^_),E[h+2]=Q(O^b),E[h+3]=Q(x^v),g=ne,_=j,b=G,v=X,h=h+4}return E.buffer},C}()},"./src/crypt/decrypter.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return h});var w=U("./src/crypt/aes-crypto.ts"),P=U("./src/crypt/fast-aes-key.ts"),S=U("./src/crypt/aes-decryptor.ts"),C=U("./src/utils/logger.ts"),T=U("./src/utils/mp4-tools.ts"),l=U("./src/utils/typed-array.ts"),p=16,h=function(){function d(c,s,f){var i=f===void 0?{}:f,n=i.removePKCS7Padding,t=n===void 0?!0:n;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=c,this.config=s,this.removePKCS7Padding=t,t)try{var u=self.crypto;u&&(this.subtle=u.subtle||u.webkitSubtle)}catch(y){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var o=d.prototype;return o.destroy=function(){this.observer=null},o.isSync=function(){return this.config.enableSoftwareAES},o.flush=function(){var s=this.currentResult;if(!s){this.reset();return}var f=new Uint8Array(s);return this.reset(),this.removePKCS7Padding?Object(S.removePadding)(f):f},o.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},o.decrypt=function(s,f,i,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(s),f,i);var t=this.flush();t&&n(t.buffer)}else this.webCryptoDecrypt(new Uint8Array(s),f,i).then(n)},o.softwareDecrypt=function(s,f,i){var n=this.currentIV,t=this.currentResult,u=this.remainderData;this.logOnce("JS AES decrypt"),u&&(s=Object(T.appendUint8Array)(u,s),this.remainderData=null);var y=this.getValidChunk(s);if(!y.length)return null;n&&(i=n);var g=this.softwareDecrypter;g||(g=this.softwareDecrypter=new S.default),g.expandKey(f);var _=t;return this.currentResult=g.decrypt(y.buffer,0,i),this.currentIV=Object(l.sliceUint8)(y,-16).buffer,_||null},o.webCryptoDecrypt=function(s,f,i){var n=this,t=this.subtle;return(this.key!==f||!this.fastAesKey)&&(this.key=f,this.fastAesKey=new P.default(t,f)),this.fastAesKey.expandKey().then(function(u){if(!t)return Promise.reject(new Error("web crypto not initialized"));var y=new w.default(t,i);return y.decrypt(s.buffer,u)}).catch(function(u){return n.onWebCryptoError(u,s,f,i)})},o.onWebCryptoError=function(s,f,i,n){return C.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",s),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(f,i,n)},o.getValidChunk=function(s){var f=s,i=s.length-s.length%p;return i!==s.length&&(f=Object(l.sliceUint8)(s,0,i),this.remainderData=Object(l.sliceUint8)(s,i)),f},o.logOnce=function(s){if(!this.logEnabled)return;C.logger.log("[decrypter.ts]: "+s),this.logEnabled=!1},d}()},"./src/crypt/fast-aes-key.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return w});var w=function(){function P(C,T){this.subtle=void 0,this.key=void 0,this.subtle=C,this.key=T}var S=P.prototype;return S.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},P}()},"./src/demux/aacdemuxer.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/demux/base-audio-demuxer.ts"),P=U("./src/demux/adts.ts"),S=U("./src/utils/logger.ts"),C=U("./src/demux/id3.ts");function T(h,d){h.prototype=Object.create(d.prototype),h.prototype.constructor=h,l(h,d)}function l(h,d){return l=Object.setPrototypeOf||function(c,s){return c.__proto__=s,c},l(h,d)}var p=function(h){T(d,h);function d(c,s){var f;return f=h.call(this)||this,f.observer=void 0,f.config=void 0,f.observer=c,f.config=s,f}var o=d.prototype;return o.resetInitSegment=function(s,f,i){h.prototype.resetInitSegment.call(this,s,f,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:s,duration:i,inputTimeScale:9e4,dropped:0}},d.probe=function(s){if(!s)return!1;for(var f=C.getID3Data(s,0)||[],i=f.length,n=s.length;i<n;i++)if(P.probe(s,i))return S.logger.log("ADTS sync word found !"),!0;return!1},o.canParse=function(s,f){return P.canParse(s,f)},o.appendFrame=function(s,f,i){P.initTrackConfig(s,this.observer,f,i,s.manifestCodec);var n=P.appendFrame(s,f,i,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},d}(w.default);p.minProbeByteLength=9,Z.default=p},"./src/demux/adts.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"getAudioConfig",function(){return C}),U.d(Z,"isHeaderPattern",function(){return T}),U.d(Z,"getHeaderLength",function(){return l}),U.d(Z,"getFullFrameLength",function(){return p}),U.d(Z,"canGetFrameLength",function(){return h}),U.d(Z,"isHeader",function(){return d}),U.d(Z,"canParse",function(){return o}),U.d(Z,"probe",function(){return c}),U.d(Z,"initTrackConfig",function(){return s}),U.d(Z,"getFrameDuration",function(){return f}),U.d(Z,"parseFrameHeader",function(){return i}),U.d(Z,"appendFrame",function(){return n});var w=U("./src/utils/logger.ts"),P=U("./src/errors.ts"),S=U("./src/events.ts");function C(t,u,y,g){var _,b,v,m,E=navigator.userAgent.toLowerCase(),a=g,x=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];_=((u[y+2]&192)>>>6)+1;var O=(u[y+2]&60)>>>2;if(O>x.length-1){t.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+O});return}return v=(u[y+2]&1)<<2,v|=(u[y+3]&192)>>>6,w.logger.log("manifest codec:"+g+", ADTS type:"+_+", samplingIndex:"+O),/firefox/i.test(E)?O>=6?(_=5,m=new Array(4),b=O-3):(_=2,m=new Array(2),b=O):E.indexOf("android")!==-1?(_=2,m=new Array(2),b=O):(_=5,m=new Array(4),g&&(g.indexOf("mp4a.40.29")!==-1||g.indexOf("mp4a.40.5")!==-1)||!g&&O>=6?b=O-3:((g&&g.indexOf("mp4a.40.2")!==-1&&(O>=6&&v===1||/vivaldi/i.test(E))||!g&&v===1)&&(_=2,m=new Array(2)),b=O)),m[0]=_<<3,m[0]|=(O&14)>>1,m[1]|=(O&1)<<7,m[1]|=v<<3,_===5&&(m[1]|=(b&14)>>1,m[2]=(b&1)<<7,m[2]|=2<<2,m[3]=0),{config:m,samplerate:x[O],channelCount:v,codec:"mp4a.40."+_,manifestCodec:a}}function T(t,u){return t[u]===255&&(t[u+1]&246)===240}function l(t,u){return t[u+1]&1?7:9}function p(t,u){return(t[u+3]&3)<<11|t[u+4]<<3|(t[u+5]&224)>>>5}function h(t,u){return u+5<t.length}function d(t,u){return u+1<t.length&&T(t,u)}function o(t,u){return h(t,u)&&T(t,u)&&p(t,u)<=t.length-u}function c(t,u){if(d(t,u)){var y=l(t,u);if(u+y>=t.length)return!1;var g=p(t,u);if(g<=y)return!1;var _=u+g;return _===t.length||d(t,_)}return!1}function s(t,u,y,g,_){if(!t.samplerate){var b=C(u,y,g,_);if(!b)return;t.config=b.config,t.samplerate=b.samplerate,t.channelCount=b.channelCount,t.codec=b.codec,t.manifestCodec=b.manifestCodec,w.logger.log("parsed codec:"+t.codec+", rate:"+b.samplerate+", channels:"+b.channelCount)}}function f(t){return 1024*9e4/t}function i(t,u,y,g,_){var b=l(t,u),v=p(t,u);if(v-=b,v>0){var m=y+g*_;return{headerLength:b,frameLength:v,stamp:m}}}function n(t,u,y,g,_){var b=f(t.samplerate),v=i(u,y,g,_,b);if(v){var m=v.frameLength,E=v.headerLength,a=v.stamp,x=E+m,O=Math.max(0,y+x-u.length),A;O?(A=new Uint8Array(x-E),A.set(u.subarray(y+E,u.length),0)):A=u.subarray(y+E,y+x);var D={unit:A,pts:a};return O||t.samples.push(D),{sample:D,length:x,missing:O}}}},"./src/demux/base-audio-demuxer.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"initPTSFn",function(){return p});var w=U("./src/polyfills/number.ts"),P=U("./src/demux/id3.ts"),S=U("./src/demux/dummy-demuxed-track.ts"),C=U("./src/utils/mp4-tools.ts"),T=U("./src/utils/typed-array.ts"),l=function(){function h(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var d=h.prototype;return d.resetInitSegment=function(c,s,f){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},d.resetTimeStamp=function(){},d.resetContiguity=function(){},d.canParse=function(c,s){return!1},d.appendFrame=function(c,s,f){},d.demux=function(c,s){this.cachedData&&(c=Object(C.appendUint8Array)(this.cachedData,c),this.cachedData=null);var f=P.getID3Data(c,0),i=f?f.length:0,n,t,u=this._audioTrack,y=this._id3Track,g=f?P.getTimeStamp(f):void 0,_=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=p(g,s)),f&&f.length>0&&y.samples.push({pts:this.initPTS,dts:this.initPTS,data:f}),t=this.initPTS;i<_;){if(this.canParse(c,i)){var b=this.appendFrame(u,c,i);b?(this.frameIndex++,t=b.sample.pts,i+=b.length,n=i):i=_}else P.canParse(c,i)?(f=P.getID3Data(c,i),y.samples.push({pts:t,dts:t,data:f}),i+=f.length,n=i):i++;if(i===_&&n!==_){var v=Object(T.sliceUint8)(c,n);this.cachedData?this.cachedData=Object(C.appendUint8Array)(this.cachedData,v):this.cachedData=v}}return{audioTrack:u,avcTrack:Object(S.dummyTrack)(),id3Track:y,textTrack:Object(S.dummyTrack)()}},d.demuxSampleAes=function(c,s,f){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},d.flush=function(c){var s=this.cachedData;return s&&(this.cachedData=null,this.demux(s,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(S.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(S.dummyTrack)()}},d.destroy=function(){},h}(),p=function(d,o){return Object(w.isFiniteNumber)(d)?d*90:o*9e4};Z.default=l},"./src/demux/chunk-cache.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return w});var w=function(){function S(){this.chunks=[],this.dataLength=0}var C=S.prototype;return C.push=function(l){this.chunks.push(l),this.dataLength+=l.length},C.flush=function(){var l=this.chunks,p=this.dataLength,h;if(l.length)l.length===1?h=l[0]:h=P(l,p);else return new Uint8Array(0);return this.reset(),h},C.reset=function(){this.chunks.length=0,this.dataLength=0},S}();function P(S,C){for(var T=new Uint8Array(C),l=0,p=0;p<S.length;p++){var h=S[p];T.set(h,l),l+=h.length}return T}},"./src/demux/dummy-demuxed-track.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"dummyTrack",function(){return w});function w(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/utils/logger.ts"),P=function(){function S(T){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=T,this.bytesAvailable=T.byteLength,this.word=0,this.bitsAvailable=0}var C=S.prototype;return C.loadWord=function(){var l=this.data,p=this.bytesAvailable,h=l.byteLength-p,d=new Uint8Array(4),o=Math.min(4,p);if(o===0)throw new Error("no bytes available");d.set(l.subarray(h,h+o)),this.word=new DataView(d.buffer).getUint32(0),this.bitsAvailable=o*8,this.bytesAvailable-=o},C.skipBits=function(l){var p;this.bitsAvailable>l?(this.word<<=l,this.bitsAvailable-=l):(l-=this.bitsAvailable,p=l>>3,l-=p>>3,this.bytesAvailable-=p,this.loadWord(),this.word<<=l,this.bitsAvailable-=l)},C.readBits=function(l){var p=Math.min(this.bitsAvailable,l),h=this.word>>>32-p;return l>32&&w.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=p,this.bitsAvailable>0?this.word<<=p:this.bytesAvailable>0&&this.loadWord(),p=l-p,p>0&&this.bitsAvailable?h<<p|this.readBits(p):h},C.skipLZ=function(){var l;for(l=0;l<this.bitsAvailable;++l)if((this.word&2147483648>>>l)!==0)return this.word<<=l,this.bitsAvailable-=l,l;return this.loadWord(),l+this.skipLZ()},C.skipUEG=function(){this.skipBits(1+this.skipLZ())},C.skipEG=function(){this.skipBits(1+this.skipLZ())},C.readUEG=function(){var l=this.skipLZ();return this.readBits(l+1)-1},C.readEG=function(){var l=this.readUEG();return 1&l?1+l>>>1:-1*(l>>>1)},C.readBoolean=function(){return this.readBits(1)===1},C.readUByte=function(){return this.readBits(8)},C.readUShort=function(){return this.readBits(16)},C.readUInt=function(){return this.readBits(32)},C.skipScalingList=function(l){for(var p=8,h=8,d,o=0;o<l;o++)h!==0&&(d=this.readEG(),h=(p+d+256)%256),p=h===0?p:h},C.readSPS=function(){var l=0,p=0,h=0,d=0,o,c,s,f=this.readUByte.bind(this),i=this.readBits.bind(this),n=this.readUEG.bind(this),t=this.readBoolean.bind(this),u=this.skipBits.bind(this),y=this.skipEG.bind(this),g=this.skipUEG.bind(this),_=this.skipScalingList.bind(this);f();var b=f();if(i(5),u(3),f(),g(),b===100||b===110||b===122||b===244||b===44||b===83||b===86||b===118||b===128){var v=n();if(v===3&&u(1),g(),g(),u(1),t())for(c=v!==3?8:12,s=0;s<c;s++)t()&&(s<6?_(16):_(64))}g();var m=n();if(m===0)n();else if(m===1)for(u(1),y(),y(),o=n(),s=0;s<o;s++)y();g(),u(1);var E=n(),a=n(),x=i(1);x===0&&u(1),u(1),t()&&(l=n(),p=n(),h=n(),d=n());var O=[1,1];if(t()&&t()){var A=f();switch(A){case 1:O=[1,1];break;case 2:O=[12,11];break;case 3:O=[10,11];break;case 4:O=[16,11];break;case 5:O=[40,33];break;case 6:O=[24,11];break;case 7:O=[20,11];break;case 8:O=[32,11];break;case 9:O=[80,33];break;case 10:O=[18,11];break;case 11:O=[15,11];break;case 12:O=[64,33];break;case 13:O=[160,99];break;case 14:O=[4,3];break;case 15:O=[3,2];break;case 16:O=[2,1];break;case 255:{O=[f()<<8|f(),f()<<8|f()];break}}}return{width:Math.ceil((E+1)*16-l*2-p*2),height:(2-x)*(a+1)*16-(x?2:4)*(h+d),pixelRatio:O}},C.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},S}();Z.default=P},"./src/demux/id3.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"isHeader",function(){return w}),U.d(Z,"isFooter",function(){return P}),U.d(Z,"getID3Data",function(){return S}),U.d(Z,"canParse",function(){return T}),U.d(Z,"getTimeStamp",function(){return l}),U.d(Z,"isTimeStampFrame",function(){return p}),U.d(Z,"getID3Frames",function(){return d}),U.d(Z,"decodeFrame",function(){return o}),U.d(Z,"utf8ArrayToStr",function(){return n}),U.d(Z,"testables",function(){return t});var w=function(_,b){return b+10<=_.length&&(_[b]===73&&_[b+1]===68&&_[b+2]===51&&(_[b+3]<255&&_[b+4]<255&&(_[b+6]<128&&_[b+7]<128&&_[b+8]<128&&_[b+9]<128)))},P=function(_,b){return b+10<=_.length&&(_[b]===51&&_[b+1]===68&&_[b+2]===73&&(_[b+3]<255&&_[b+4]<255&&(_[b+6]<128&&_[b+7]<128&&_[b+8]<128&&_[b+9]<128)))},S=function(_,b){for(var v=b,m=0;w(_,b);){m+=10;var E=C(_,b+6);m+=E,P(_,b+10)&&(m+=10),b+=m}return m>0?_.subarray(v,v+m):void 0},C=function(_,b){var v=0;return v=(_[b]&127)<<21,v|=(_[b+1]&127)<<14,v|=(_[b+2]&127)<<7,v|=_[b+3]&127,v},T=function(_,b){return w(_,b)&&C(_,b+6)+10<=_.length-b},l=function(_){for(var b=d(_),v=0;v<b.length;v++){var m=b[v];if(p(m))return i(m)}return},p=function(_){return _&&_.key==="PRIV"&&_.info==="com.apple.streaming.transportStreamTimestamp"},h=function(_){var b=String.fromCharCode(_[0],_[1],_[2],_[3]),v=C(_,4),m=10;return{type:b,size:v,data:_.subarray(m,m+v)}},d=function(_){for(var b=0,v=[];w(_,b);){var m=C(_,b+6);b+=10;for(var E=b+m;b+8<E;){var a=h(_.subarray(b)),x=o(a);x&&v.push(x),b+=a.size+10}P(_,b)&&(b+=10)}return v},o=function(_){return _.type==="PRIV"?c(_):_.type[0]==="W"?f(_):s(_)},c=function(_){if(_.size<2)return;var b=n(_.data,!0),v=new Uint8Array(_.data.subarray(b.length+1));return{key:_.type,info:b,data:v.buffer}},s=function(_){if(_.size<2)return;if(_.type==="TXXX"){var b=1,v=n(_.data.subarray(b),!0);b+=v.length+1;var m=n(_.data.subarray(b));return{key:_.type,info:v,data:m}}var E=n(_.data.subarray(1));return{key:_.type,data:E}},f=function(_){if(_.type==="WXXX"){if(_.size<2)return;var b=1,v=n(_.data.subarray(b),!0);b+=v.length+1;var m=n(_.data.subarray(b));return{key:_.type,info:v,data:m}}var E=n(_.data);return{key:_.type,data:E}},i=function(_){if(_.data.byteLength===8){var b=new Uint8Array(_.data),v=b[3]&1,m=(b[4]<<23)+(b[5]<<15)+(b[6]<<7)+b[7];return m/=45,v&&(m+=4772185884e-2),Math.round(m)}return},n=function(_,b){b===void 0&&(b=!1);var v=y();if(v){var m=v.decode(_);if(b){var E=m.indexOf("\0");return E!==-1?m.substring(0,E):m}return m.replace(/\0/g,"")}for(var a=_.length,x,O,A,D="",I=0;I<a;){if(x=_[I++],x===0&&b)return D;if(x===0||x===3)continue;switch(x>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:D+=String.fromCharCode(x);break;case 12:case 13:O=_[I++],D+=String.fromCharCode((x&31)<<6|O&63);break;case 14:O=_[I++],A=_[I++],D+=String.fromCharCode((x&15)<<12|(O&63)<<6|(A&63)<<0);break;default:}}return D},t={decodeTextFrame:s},u;function y(){return!u&&typeof self.TextDecoder!="undefined"&&(u=new self.TextDecoder("utf-8")),u}},"./src/demux/mp3demuxer.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/demux/base-audio-demuxer.ts"),P=U("./src/demux/id3.ts"),S=U("./src/utils/logger.ts"),C=U("./src/demux/mpegaudio.ts");function T(h,d){h.prototype=Object.create(d.prototype),h.prototype.constructor=h,l(h,d)}function l(h,d){return l=Object.setPrototypeOf||function(c,s){return c.__proto__=s,c},l(h,d)}var p=function(h){T(d,h);function d(){return h.apply(this,arguments)||this}var o=d.prototype;return o.resetInitSegment=function(s,f,i){h.prototype.resetInitSegment.call(this,s,f,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:s,duration:i,inputTimeScale:9e4,dropped:0}},d.probe=function(s){if(!s)return!1;for(var f=P.getID3Data(s,0)||[],i=f.length,n=s.length;i<n;i++)if(C.probe(s,i))return S.logger.log("MPEG Audio sync word found !"),!0;return!1},o.canParse=function(s,f){return C.canParse(s,f)},o.appendFrame=function(s,f,i){return this.initPTS===null?void 0:C.appendFrame(s,f,i,this.initPTS,this.frameIndex)},d}(w.default);p.minProbeByteLength=4,Z.default=p},"./src/demux/mp4demuxer.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/utils/mp4-tools.ts"),P=U("./src/demux/dummy-demuxed-track.ts"),S=function(){function C(l,p){this.remainderData=null,this.config=void 0,this.config=p}var T=C.prototype;return T.resetTimeStamp=function(){},T.resetInitSegment=function(){},T.resetContiguity=function(){},C.probe=function(p){return Object(w.findBox)({data:p,start:0,end:Math.min(p.length,16384)},["moof"]).length>0},T.demux=function(p){var h=p,d=Object(P.dummyTrack)();if(this.config.progressive){this.remainderData&&(h=Object(w.appendUint8Array)(this.remainderData,p));var o=Object(w.segmentValidRange)(h);this.remainderData=o.remainder,d.samples=o.valid||new Uint8Array}else d.samples=h;return{audioTrack:Object(P.dummyTrack)(),avcTrack:d,id3Track:Object(P.dummyTrack)(),textTrack:Object(P.dummyTrack)()}},T.flush=function(){var p=Object(P.dummyTrack)();return p.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(P.dummyTrack)(),avcTrack:p,id3Track:Object(P.dummyTrack)(),textTrack:Object(P.dummyTrack)()}},T.demuxSampleAes=function(p,h,d){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},T.destroy=function(){},C}();S.minProbeByteLength=1024,Z.default=S},"./src/demux/mpegaudio.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"appendFrame",function(){return l}),U.d(Z,"parseHeader",function(){return p}),U.d(Z,"isHeaderPattern",function(){return h}),U.d(Z,"isHeader",function(){return d}),U.d(Z,"canParse",function(){return o}),U.d(Z,"probe",function(){return c});var w=null,P=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],S=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],C=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],T=[0,1,1,4];function l(s,f,i,n,t){if(i+24>f.length)return;var u=p(f,i);if(u&&i+u.frameLength<=f.length){var y=u.samplesPerFrame*9e4/u.sampleRate,g=n+t*y,_={unit:f.subarray(i,i+u.frameLength),pts:g,dts:g};return s.config=[],s.channelCount=u.channelCount,s.samplerate=u.sampleRate,s.samples.push(_),{sample:_,length:u.frameLength,missing:0}}}function p(s,f){var i=s[f+1]>>3&3,n=s[f+1]>>1&3,t=s[f+2]>>4&15,u=s[f+2]>>2&3;if(i!==1&&t!==0&&t!==15&&u!==3){var y=s[f+2]>>1&1,g=s[f+3]>>6,_=i===3?3-n:n===3?3:4,b=P[_*14+t-1]*1e3,v=i===3?0:i===2?1:2,m=S[v*3+u],E=g===3?1:2,a=C[i][n],x=T[n],O=a*8*x,A=Math.floor(a*b/m+y)*x;if(w===null){var D=navigator.userAgent||"",I=D.match(/Chrome\/(\d+)/i);w=I?parseInt(I[1]):0}var F=!!w&&w<=87;return F&&n===2&&b>=224e3&&g===0&&(s[f+3]=s[f+3]|128),{sampleRate:m,channelCount:E,frameLength:A,samplesPerFrame:O}}}function h(s,f){return s[f]===255&&(s[f+1]&224)===224&&(s[f+1]&6)!==0}function d(s,f){return f+1<s.length&&h(s,f)}function o(s,f){var i=4;return h(s,f)&&i<=s.length-f}function c(s,f){if(f+1<s.length&&h(s,f)){var i=4,n=p(s,f),t=i;n!=null&&n.frameLength&&(t=n.frameLength);var u=f+t;return u===s.length||d(s,u)}return!1}},"./src/demux/sample-aes.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/crypt/decrypter.ts"),P=U("./src/demux/tsdemuxer.ts"),S=function(){function C(l,p,h){this.keyData=void 0,this.decrypter=void 0,this.keyData=h,this.decrypter=new w.default(l,p,{removePKCS7Padding:!1})}var T=C.prototype;return T.decryptBuffer=function(p,h){this.decrypter.decrypt(p,this.keyData.key.buffer,this.keyData.iv.buffer,h)},T.decryptAacSample=function(p,h,d,o){var c=p[h].unit,s=c.subarray(16,c.length-c.length%16),f=s.buffer.slice(s.byteOffset,s.byteOffset+s.length),i=this;this.decryptBuffer(f,function(n){var t=new Uint8Array(n);c.set(t,16),o||i.decryptAacSamples(p,h+1,d)})},T.decryptAacSamples=function(p,h,d){for(;;h++){if(h>=p.length){d();return}if(p[h].unit.length<32)continue;var o=this.decrypter.isSync();if(this.decryptAacSample(p,h,d,o),!o)return}},T.getAvcEncryptedData=function(p){for(var h=Math.floor((p.length-48)/160)*16+16,d=new Int8Array(h),o=0,c=32;c<=p.length-16;c+=160,o+=16)d.set(p.subarray(c,c+16),o);return d},T.getAvcDecryptedUnit=function(p,h){for(var d=new Uint8Array(h),o=0,c=32;c<=p.length-16;c+=160,o+=16)p.set(d.subarray(o,o+16),c);return p},T.decryptAvcSample=function(p,h,d,o,c,s){var f=Object(P.discardEPB)(c.data),i=this.getAvcEncryptedData(f),n=this;this.decryptBuffer(i.buffer,function(t){c.data=n.getAvcDecryptedUnit(f,t),s||n.decryptAvcSamples(p,h,d+1,o)})},T.decryptAvcSamples=function(p,h,d,o){if(p instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;h++,d=0){if(h>=p.length){o();return}for(var c=p[h].units;!(d>=c.length);d++){var s=c[d];if(s.data.length<=48||s.type!==1&&s.type!==5)continue;var f=this.decrypter.isSync();if(this.decryptAvcSample(p,h,d,o,s,f),!f)return}}},C}();Z.default=S},"./src/demux/transmuxer-interface.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return c});var w=U("./node_modules/webworkify-webpack/index.js"),P=U.n(w),S=U("./src/events.ts"),C=U("./src/demux/transmuxer.ts"),T=U("./src/utils/logger.ts"),l=U("./src/errors.ts"),p=U("./src/utils/mediasource-helper.ts"),h=U("./node_modules/eventemitter3/index.js"),d=U.n(h),o=Object(p.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function s(i,n,t,u){var y=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=i,this.id=n,this.onTransmuxComplete=t,this.onFlush=u;var g=i.config,_=function(a,x){x=x||{},x.frag=y.frag,x.id=y.id,i.trigger(a,x)};this.observer=new h.EventEmitter,this.observer.on(S.Events.FRAG_DECRYPTED,_),this.observer.on(S.Events.ERROR,_);var b={mp4:o.isTypeSupported("video/mp4"),mpeg:o.isTypeSupported("audio/mpeg"),mp3:o.isTypeSupported('audio/mp4; codecs="mp3"')},v=navigator.vendor;if(g.enableWorker&&typeof Worker!="undefined"){T.logger.log("demuxing in webworker");var m;try{m=this.worker=w("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),m.addEventListener("message",this.onwmsg),m.onerror=function(E){i.trigger(S.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(E.message+" ("+E.filename+":"+E.lineno+")")})},m.postMessage({cmd:"init",typeSupported:b,vendor:v,id:n,config:JSON.stringify(g)})}catch(E){T.logger.warn("Error in worker:",E),T.logger.error("Error while initializing DemuxerWorker, fallback to inline"),m&&self.URL.revokeObjectURL(m.objectURL),this.transmuxer=new C.default(this.observer,b,g,v,n),this.worker=null}}else this.transmuxer=new C.default(this.observer,b,g,v,n)}var f=s.prototype;return f.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var u=this.observer;u&&u.removeAllListeners(),this.observer=null},f.push=function(n,t,u,y,g,_,b,v,m,E){var a=this;m.transmuxing.start=self.performance.now();var x=this.transmuxer,O=this.worker,A=_?_.start:g.start,D=g.decryptdata,I=this.frag,F=!(I&&g.cc===I.cc),K=!(I&&m.level===I.level),ne=I?m.sn-I.sn:-1,j=this.part?m.part-this.part.index:1,G=!K&&(ne===1||ne===0&&j===1),X=self.performance.now();(K||ne||g.stats.parsing.start===0)&&(g.stats.parsing.start=X),_&&(j||!G)&&(_.stats.parsing.start=X);var J=new C.TransmuxState(F,G,v,K,A);if(!G||F){T.logger.log("[transmuxer-interface, "+g.type+"]: Starting new transmux session for sn: "+m.sn+" p: "+m.part+" level: "+m.level+" id: "+m.id+`
discontinuity: `+F+`
trackSwitch: `+K+`
contiguous: `+G+`
accurateTimeOffset: `+v+`
timeOffset: `+A);var B=new C.TransmuxConfig(u,y,t,b,E);this.configureTransmuxer(B)}if(this.frag=g,this.part=_,O)O.postMessage({cmd:"demux",data:n,decryptdata:D,chunkMeta:m,state:J},n instanceof ArrayBuffer?[n]:[]);else if(x){var Q=x.push(n,D,m,J);Object(C.isPromise)(Q)?Q.then(function(ie){a.handleTransmuxComplete(ie)}):this.handleTransmuxComplete(Q)}},f.flush=function(n){var t=this;n.transmuxing.start=self.performance.now();var u=this.transmuxer,y=this.worker;if(y)y.postMessage({cmd:"flush",chunkMeta:n});else if(u){var g=u.flush(n);Object(C.isPromise)(g)?g.then(function(_){t.handleFlushResult(_,n)}):this.handleFlushResult(g,n)}},f.handleFlushResult=function(n,t){var u=this;n.forEach(function(y){u.handleTransmuxComplete(y)}),this.onFlush(t)},f.onWorkerMessage=function(n){var t=n.data,u=this.hls;switch(t.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,u.trigger(t.event,t.data);break}}},f.configureTransmuxer=function(n){var t=this.worker,u=this.transmuxer;t?t.postMessage({cmd:"configure",config:n}):u&&u.configure(n)},f.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},s}()},"./src/demux/transmuxer-worker.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return l});var w=U("./src/demux/transmuxer.ts"),P=U("./src/events.ts"),S=U("./src/utils/logger.ts"),C=U("./node_modules/eventemitter3/index.js"),T=U.n(C);function l(c){var s=new C.EventEmitter,f=function(n,t){c.postMessage({event:n,data:t})};s.on(P.Events.FRAG_DECRYPTED,f),s.on(P.Events.ERROR,f),c.addEventListener("message",function(i){var n=i.data;switch(n.cmd){case"init":{var t=JSON.parse(n.config);c.transmuxer=new w.default(s,n.typeSupported,t,n.vendor,n.id),Object(S.enableLogs)(t.debug),f("init",null);break}case"configure":{c.transmuxer.configure(n.config);break}case"demux":{var u=c.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(w.isPromise)(u)?u.then(function(_){p(c,_)}):p(c,u);break}case"flush":{var y=n.chunkMeta,g=c.transmuxer.flush(y);Object(w.isPromise)(g)?g.then(function(_){d(c,_,y)}):d(c,g,y);break}default:break}})}function p(c,s){if(o(s.remuxResult))return;var f=[],i=s.remuxResult,n=i.audio,t=i.video;n&&h(f,n),t&&h(f,t),c.postMessage({event:"transmuxComplete",data:s},f)}function h(c,s){s.data1&&c.push(s.data1.buffer),s.data2&&c.push(s.data2.buffer)}function d(c,s,f){s.forEach(function(i){p(c,i)}),c.postMessage({event:"flush",data:f})}function o(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return t}),U.d(Z,"isPromise",function(){return g}),U.d(Z,"TransmuxConfig",function(){return _}),U.d(Z,"TransmuxState",function(){return b});var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/crypt/decrypter.ts"),C=U("./src/demux/aacdemuxer.ts"),T=U("./src/demux/mp4demuxer.ts"),l=U("./src/demux/tsdemuxer.ts"),p=U("./src/demux/mp3demuxer.ts"),h=U("./src/remux/mp4-remuxer.ts"),d=U("./src/remux/passthrough-remuxer.ts"),o=U("./src/demux/chunk-cache.ts"),c=U("./src/utils/mp4-tools.ts"),s=U("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(v){s.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var i=[{demux:l.default,remux:h.default},{demux:T.default,remux:d.default},{demux:C.default,remux:h.default},{demux:p.default,remux:h.default}],n=1024;i.forEach(function(v){var m=v.demux;n=Math.max(n,m.minProbeByteLength)});var t=function(){function v(E,a,x,O,A){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new o.default,this.observer=E,this.typeSupported=a,this.config=x,this.vendor=O,this.id=A}var m=v.prototype;return m.configure=function(a){this.transmuxConfig=a,this.decrypter&&this.decrypter.reset()},m.push=function(a,x,O,A){var D=this,I=O.transmuxing;I.executeStart=f();var F=new Uint8Array(a),K=this.cache,ne=this.config,j=this.currentTransmuxState,G=this.transmuxConfig;A&&(this.currentTransmuxState=A);var X=u(F,x);if(X&&X.method==="AES-128"){var J=this.getDecrypter();if(ne.enableSoftwareAES){var B=J.softwareDecrypt(F,X.key.buffer,X.iv.buffer);if(!B)return I.executeEnd=f(),y(O);F=new Uint8Array(B)}else return this.decryptionPromise=J.webCryptoDecrypt(F,X.key.buffer,X.iv.buffer).then(function(ke){var Ue=D.push(ke,null,O);return D.decryptionPromise=null,Ue}),this.decryptionPromise}var Q=A||j,ie=Q.contiguous,oe=Q.discontinuity,xe=Q.trackSwitch,ye=Q.accurateTimeOffset,Ae=Q.timeOffset,pe=G.audioCodec,Oe=G.videoCodec,Fe=G.defaultInitPts,Me=G.duration,Ce=G.initSegmentData;if((oe||xe)&&this.resetInitSegment(Ce,pe,Oe,Me),oe&&this.resetInitialTimestamp(Fe),ie||this.resetContiguity(),this.needsProbing(F,oe,xe)){if(K.dataLength){var Le=K.flush();F=Object(c.appendUint8Array)(Le,F)}this.configureTransmuxer(F,G)}var de=this.transmux(F,X,Ae,ye,O),ue=this.currentTransmuxState;return ue.contiguous=!0,ue.discontinuity=!1,ue.trackSwitch=!1,I.executeEnd=f(),de},m.flush=function(a){var x=this,O=a.transmuxing;O.executeStart=f();var A=this.decrypter,D=this.cache,I=this.currentTransmuxState,F=this.decryptionPromise;if(F)return F.then(function(){return x.flush(a)});var K=[],ne=I.timeOffset;if(A){var j=A.flush();j&&K.push(this.push(j,null,a))}var G=D.dataLength;D.reset();var X=this.demuxer,J=this.remuxer;if(!X||!J)return G>=n&&this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),O.executeEnd=f(),[y(a)];var B=X.flush(ne);return g(B)?B.then(function(Q){return x.flushRemux(K,Q,a),K}):(this.flushRemux(K,B,a),K)},m.flushRemux=function(a,x,O){var A=x.audioTrack,D=x.avcTrack,I=x.id3Track,F=x.textTrack,K=this.currentTransmuxState,ne=K.accurateTimeOffset,j=K.timeOffset;s.logger.log("[transmuxer.ts]: Flushed fragment "+O.sn+(O.part>-1?" p: "+O.part:"")+" of level "+O.level);var G=this.remuxer.remux(A,D,I,F,j,ne,!0,this.id);a.push({remuxResult:G,chunkMeta:O}),O.transmuxing.executeEnd=f()},m.resetInitialTimestamp=function(a){var x=this.demuxer,O=this.remuxer;if(!x||!O)return;x.resetTimeStamp(a),O.resetTimeStamp(a)},m.resetContiguity=function(){var a=this.demuxer,x=this.remuxer;if(!a||!x)return;a.resetContiguity(),x.resetNextTimestamp()},m.resetInitSegment=function(a,x,O,A){var D=this.demuxer,I=this.remuxer;if(!D||!I)return;D.resetInitSegment(x,O,A),I.resetInitSegment(a,x,O)},m.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},m.transmux=function(a,x,O,A,D){var I;return x&&x.method==="SAMPLE-AES"?I=this.transmuxSampleAes(a,x,O,A,D):I=this.transmuxUnencrypted(a,O,A,D),I},m.transmuxUnencrypted=function(a,x,O,A){var D=this.demuxer.demux(a,x,!1,!this.config.progressive),I=D.audioTrack,F=D.avcTrack,K=D.id3Track,ne=D.textTrack,j=this.remuxer.remux(I,F,K,ne,x,O,!1,this.id);return{remuxResult:j,chunkMeta:A}},m.transmuxSampleAes=function(a,x,O,A,D){var I=this;return this.demuxer.demuxSampleAes(a,x,O).then(function(F){var K=I.remuxer.remux(F.audioTrack,F.avcTrack,F.id3Track,F.textTrack,O,A,!1,I.id);return{remuxResult:K,chunkMeta:D}})},m.configureTransmuxer=function(a,x){for(var O=this.config,A=this.observer,D=this.typeSupported,I=this.vendor,F=x.audioCodec,K=x.defaultInitPts,ne=x.duration,j=x.initSegmentData,G=x.videoCodec,X,J=0,B=i.length;J<B;J++)if(i[J].demux.probe(a)){X=i[J];break}X||(s.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),X={demux:T.default,remux:d.default});var Q=this.demuxer,ie=this.remuxer,oe=X.remux,xe=X.demux;(!ie||!(ie instanceof oe))&&(this.remuxer=new oe(A,O,D,I)),(!Q||!(Q instanceof xe))&&(this.demuxer=new xe(A,O,D),this.probe=xe.probe),this.resetInitSegment(j,F,G,ne),this.resetInitialTimestamp(K)},m.needsProbing=function(a,x,O){return!this.demuxer||!this.remuxer||x||O},m.getDecrypter=function(){var a=this.decrypter;return a||(a=this.decrypter=new S.default(this.observer,this.config)),a},v}();function u(v,m){var E=null;return v.byteLength>0&&m!=null&&m.key!=null&&m.iv!==null&&m.method!=null&&(E=m),E}var y=function(m){return{remuxResult:{},chunkMeta:m}};function g(v){return"then"in v&&v.then instanceof Function}var _=function(m,E,a,x,O){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=m,this.videoCodec=E,this.initSegmentData=a,this.duration=x,this.defaultInitPts=O},b=function(m,E,a,x,O){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=m,this.contiguous=E,this.accurateTimeOffset=a,this.trackSwitch=x,this.timeOffset=O}},"./src/demux/tsdemuxer.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"discardEPB",function(){return y});var w=U("./src/demux/adts.ts"),P=U("./src/demux/mpegaudio.ts"),S=U("./src/demux/exp-golomb.ts"),C=U("./src/demux/id3.ts"),T=U("./src/demux/sample-aes.ts"),l=U("./src/events.ts"),p=U("./src/utils/mp4-tools.ts"),h=U("./src/utils/logger.ts"),d=U("./src/errors.ts"),o={video:1,audio:2,id3:3,text:4},c=function(){function g(b,v,m){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=b,this.config=v,this.typeSupported=m}g.probe=function(v){var m=g.syncOffset(v);return m<0?!1:(m&&h.logger.warn("MPEG2-TS detected but first sync word found @ offset "+m+", junk ahead ?"),!0)},g.syncOffset=function(v){for(var m=Math.min(1e3,v.length-3*188),E=0;E<m;){if(v[E]===71&&v[E+188]===71&&v[E+2*188]===71)return E;E++}return-1},g.createTrack=function(v,m){return{container:v==="video"||v==="audio"?"video/mp2t":void 0,type:v,id:o[v],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:v==="audio"?m:void 0}};var _=g.prototype;return _.resetInitSegment=function(v,m,E){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=g.createTrack("video",E),this._audioTrack=g.createTrack("audio",E),this._id3Track=g.createTrack("id3",E),this._txtTrack=g.createTrack("text",E),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=v,this.videoCodec=m,this._duration=E},_.resetTimeStamp=function(){},_.resetContiguity=function(){var v=this._audioTrack,m=this._avcTrack,E=this._id3Track;v&&(v.pesData=null),m&&(m.pesData=null),E&&(E.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},_.demux=function(v,m,E,a){E===void 0&&(E=!1),a===void 0&&(a=!1),E||(this.sampleAes=null);var x,O=this._avcTrack,A=this._audioTrack,D=this._id3Track,I=O.pid,F=O.pesData,K=A.pid,ne=D.pid,j=A.pesData,G=D.pesData,X=!1,J=this.pmtParsed,B=this._pmtId,Q=v.length;if(this.remainderData&&(v=Object(p.appendUint8Array)(this.remainderData,v),Q=v.length,this.remainderData=null),Q<188&&!a)return this.remainderData=v,{audioTrack:A,avcTrack:O,id3Track:D,textTrack:this._txtTrack};var ie=Math.max(0,g.syncOffset(v));Q-=(Q+ie)%188,Q<v.byteLength&&!a&&(this.remainderData=new Uint8Array(v.buffer,Q,v.buffer.byteLength-Q));for(var oe=ie;oe<Q;oe+=188)if(v[oe]===71){var xe=!!(v[oe+1]&64),ye=((v[oe+1]&31)<<8)+v[oe+2],Ae=(v[oe+3]&48)>>4,pe=void 0;if(Ae>1){if(pe=oe+5+v[oe+4],pe===oe+188)continue}else pe=oe+4;switch(ye){case I:xe&&(F&&(x=n(F))&&this.parseAVCPES(x,!1),F={data:[],size:0}),F&&(F.data.push(v.subarray(pe,oe+188)),F.size+=oe+188-pe);break;case K:xe&&(j&&(x=n(j))&&(A.isAAC?this.parseAACPES(x):this.parseMPEGPES(x)),j={data:[],size:0}),j&&(j.data.push(v.subarray(pe,oe+188)),j.size+=oe+188-pe);break;case ne:xe&&(G&&(x=n(G))&&this.parseID3PES(x),G={data:[],size:0}),G&&(G.data.push(v.subarray(pe,oe+188)),G.size+=oe+188-pe);break;case 0:xe&&(pe+=v[pe]+1),B=this._pmtId=f(v,pe);break;case B:{xe&&(pe+=v[pe]+1);var Oe=i(v,pe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,E);I=Oe.avc,I>0&&(O.pid=I),K=Oe.audio,K>0&&(A.pid=K,A.isAAC=Oe.isAAC),ne=Oe.id3,ne>0&&(D.pid=ne),X&&!J&&(h.logger.log("reparse from beginning"),X=!1,oe=ie-188),J=this.pmtParsed=!0;break}case 17:case 8191:break;default:X=!0;break}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});O.pesData=F,A.pesData=j,D.pesData=G;var Fe={audioTrack:A,avcTrack:O,id3Track:D,textTrack:this._txtTrack};return a&&this.extractRemainingSamples(Fe),Fe},_.flush=function(){var v=this.remainderData;this.remainderData=null;var m;return v?m=this.demux(v,-1,!1,!0):m={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(m),this.sampleAes?this.decrypt(m,this.sampleAes):m},_.extractRemainingSamples=function(v){var m=v.audioTrack,E=v.avcTrack,a=v.id3Track,x=E.pesData,O=m.pesData,A=a.pesData,D;x&&(D=n(x))?(this.parseAVCPES(D,!0),E.pesData=null):E.pesData=x,O&&(D=n(O))?(m.isAAC?this.parseAACPES(D):this.parseMPEGPES(D),m.pesData=null):(O!=null&&O.size&&h.logger.log("last AAC PES packet truncated,might overlap between fragments"),m.pesData=O),A&&(D=n(A))?(this.parseID3PES(D),a.pesData=null):a.pesData=A},_.demuxSampleAes=function(v,m,E){var a=this.demux(v,E,!0,!this.config.progressive),x=this.sampleAes=new T.default(this.observer,this.config,m);return this.decrypt(a,x)},_.decrypt=function(v,m){return new Promise(function(E){var a=v.audioTrack,x=v.avcTrack;a.samples&&a.isAAC?m.decryptAacSamples(a.samples,0,function(){x.samples?m.decryptAvcSamples(x.samples,0,0,function(){E(v)}):E(v)}):x.samples&&m.decryptAvcSamples(x.samples,0,0,function(){E(v)})})},_.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},_.parseAVCPES=function(v,m){var E=this,a=this._avcTrack,x=this.parseAVCNALu(v.data),O=!1,A=this.avcSample,D,I=!1;v.data=null,A&&x.length&&!a.audFound&&(t(A,a),A=this.avcSample=s(!1,v.pts,v.dts,"")),x.forEach(function(F){switch(F.type){case 1:{D=!0,A||(A=E.avcSample=s(!0,v.pts,v.dts,"")),O&&(A.debug+="NDR "),A.frame=!0;var K=F.data;if(I&&K.length>4){var ne=new S.default(K).readSliceType();(ne===2||ne===4||ne===7||ne===9)&&(A.key=!0)}break}case 5:D=!0,A||(A=E.avcSample=s(!0,v.pts,v.dts,"")),O&&(A.debug+="IDR "),A.key=!0,A.frame=!0;break;case 6:{D=!0,O&&A&&(A.debug+="SEI ");var j=new S.default(y(F.data));j.readUByte();for(var G=0,X=0,J=!1,B=0;!J&&j.bytesAvailable>1;){G=0;do B=j.readUByte(),G+=B;while(B===255);X=0;do B=j.readUByte(),X+=B;while(B===255);if(G===4&&j.bytesAvailable!==0){J=!0;var Q=j.readUByte();if(Q===181){var ie=j.readUShort();if(ie===49){var oe=j.readUInt();if(oe===1195456820){var xe=j.readUByte();if(xe===3){for(var ye=j.readUByte(),Ae=j.readUByte(),pe=31&ye,Oe=[ye,Ae],Fe=0;Fe<pe;Fe++)Oe.push(j.readUByte()),Oe.push(j.readUByte()),Oe.push(j.readUByte());u(E._txtTrack.samples,{type:3,pts:v.pts,bytes:Oe})}}}}}else if(G===5&&j.bytesAvailable!==0){if(J=!0,X>16){for(var Me=[],Ce=0;Ce<16;Ce++)Me.push(j.readUByte().toString(16)),(Ce===3||Ce===5||Ce===7||Ce===9)&&Me.push("-");for(var Le=X-16,de=new Uint8Array(Le),ue=0;ue<Le;ue++)de[ue]=j.readUByte();u(E._txtTrack.samples,{pts:v.pts,payloadType:G,uuid:Me.join(""),userData:Object(C.utf8ArrayToStr)(de),userDataBytes:de})}}else if(X<j.bytesAvailable)for(var ke=0;ke<X;ke++)j.readUByte()}break}case 7:if(D=!0,I=!0,O&&A&&(A.debug+="SPS "),!a.sps){var Ue=new S.default(F.data),Ye=Ue.readSPS();a.width=Ye.width,a.height=Ye.height,a.pixelRatio=Ye.pixelRatio,a.sps=[F.data],a.duration=E._duration;for(var ee=F.data.subarray(1,4),M="avc1.",N=0;N<3;N++){var $=ee[N].toString(16);$.length<2&&($="0"+$),M+=$}a.codec=M}break;case 8:D=!0,O&&A&&(A.debug+="PPS "),a.pps||(a.pps=[F.data]);break;case 9:D=!1,a.audFound=!0,A&&t(A,a),A=E.avcSample=s(!1,v.pts,v.dts,O?"AUD ":"");break;case 12:D=!1;break;default:D=!1,A&&(A.debug+="unknown NAL "+F.type+" ");break}if(A&&D){var V=A.units;V.push(F)}}),m&&A&&(t(A,a),this.avcSample=null)},_.getLastNalUnit=function(){var v,m=this.avcSample,E;if(!m||m.units.length===0){var a=this._avcTrack.samples;m=a[a.length-1]}if((v=m)!==null&&v!==void 0&&v.units){var x=m.units;E=x[x.length-1]}return E},_.parseAVCNALu=function(v){var m=v.byteLength,E=this._avcTrack,a=E.naluState||0,x=a,O=[],A=0,D,I,F,K=-1,ne=0;for(a===-1&&(K=0,ne=v[0]&31,a=0,A=1);A<m;){if(D=v[A++],!a){a=D?0:1;continue}if(a===1){a=D?0:2;continue}if(!D)a=3;else if(D===1){if(K>=0){var j={data:v.subarray(K,A-a-1),type:ne};O.push(j)}else{var G=this.getLastNalUnit();if(G&&(x&&A<=4-x&&(G.state&&(G.data=G.data.subarray(0,G.data.byteLength-x))),I=A-a-1,I>0)){var X=new Uint8Array(G.data.byteLength+I);X.set(G.data,0),X.set(v.subarray(0,I),G.data.byteLength),G.data=X,G.state=0}}A<m?(F=v[A]&31,K=A,ne=F,a=0):a=-1}else a=0}if(K>=0&&a>=0){var J={data:v.subarray(K,m),type:ne,state:a};O.push(J)}if(O.length===0){var B=this.getLastNalUnit();if(B){var Q=new Uint8Array(B.data.byteLength+v.byteLength);Q.set(B.data,0),Q.set(v,B.data.byteLength),B.data=Q}}return E.naluState=a,O},_.parseAACPES=function(v){var m=0,E=this._audioTrack,a=this.aacOverFlow,x=v.data;if(a){this.aacOverFlow=null;var O=a.sample.unit.byteLength,A=Math.min(a.missing,O),D=O-A;a.sample.unit.set(x.subarray(0,A),D),E.samples.push(a.sample),m=a.missing}var I,F;for(I=m,F=x.length;I<F-1&&!w.isHeader(x,I);I++);if(I!==m){var K,ne;if(I<F-1?(K="AAC PES did not start with ADTS header,offset:"+I,ne=!1):(K="no ADTS header found in AAC PES",ne=!0),h.logger.warn("parsing error:"+K),this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:ne,reason:K}),ne)return}w.initTrackConfig(E,this.observer,x,I,this.audioCodec);var j;if(v.pts!==void 0)j=v.pts;else if(a){var G=w.getFrameDuration(E.samplerate);j=a.sample.pts+G}else{h.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var X=0;I<F;)if(w.isHeader(x,I)){if(I+5<F){var J=w.appendFrame(E,x,I,j,X);if(J)if(J.missing)this.aacOverFlow=J;else{I+=J.length,X++;continue}}break}else I++},_.parseMPEGPES=function(v){var m=v.data,E=m.length,a=0,x=0,O=v.pts;if(O===void 0){h.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;x<E;)if(P.isHeader(m,x)){var A=P.appendFrame(this._audioTrack,m,x,O,a);if(A)x+=A.length,a++;else break}else x++},_.parseID3PES=function(v){if(v.pts===void 0){h.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(v)},g}();c.minProbeByteLength=188;function s(g,_,b,v){return{key:g,frame:!1,pts:_,dts:b,units:[],debug:v,length:0}}function f(g,_){return(g[_+10]&31)<<8|g[_+11]}function i(g,_,b,v){var m={audio:-1,avc:-1,id3:-1,isAAC:!0},E=(g[_+1]&15)<<8|g[_+2],a=_+3+E-4,x=(g[_+10]&15)<<8|g[_+11];for(_+=12+x;_<a;){var O=(g[_+1]&31)<<8|g[_+2];switch(g[_]){case 207:if(!v){h.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:m.audio===-1&&(m.audio=O);break;case 21:m.id3===-1&&(m.id3=O);break;case 219:if(!v){h.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:m.avc===-1&&(m.avc=O);break;case 3:case 4:b?m.audio===-1&&(m.audio=O,m.isAAC=!1):h.logger.log("MPEG audio found, not supported in this browser");break;case 36:h.logger.warn("Unsupported HEVC stream type found");break;default:break}_+=((g[_+3]&15)<<8|g[_+4])+5}return m}function n(g){var _=0,b,v,m,E,a,x=g.data;if(!g||g.size===0)return null;for(;x[0].length<19&&x.length>1;){var O=new Uint8Array(x[0].length+x[1].length);O.set(x[0]),O.set(x[1],x[0].length),x[0]=O,x.splice(1,1)}b=x[0];var A=(b[0]<<16)+(b[1]<<8)+b[2];if(A===1){if(v=(b[4]<<8)+b[5],v&&v>g.size-6)return null;var D=b[7];D&192&&(E=(b[9]&14)*536870912+(b[10]&255)*4194304+(b[11]&254)*16384+(b[12]&255)*128+(b[13]&254)/2,D&64?(a=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,E-a>60*9e4&&(h.logger.warn(Math.round((E-a)/9e4)+"s delta between PTS and DTS, align them"),E=a)):a=E),m=b[8];var I=m+9;if(g.size<=I)return null;g.size-=I;for(var F=new Uint8Array(g.size),K=0,ne=x.length;K<ne;K++){b=x[K];var j=b.byteLength;if(I)if(I>j){I-=j;continue}else b=b.subarray(I),j-=I,I=0;F.set(b,_),_+=j}return v&&(v-=m+3),{data:F,pts:E,dts:a,len:v}}return null}function t(g,_){if(g.units.length&&g.frame){if(g.pts===void 0){var b=_.samples,v=b.length;if(v){var m=b[v-1];g.pts=m.pts,g.dts=m.dts}else{_.dropped++;return}}_.samples.push(g)}g.debug.length&&h.logger.log(g.pts+"/"+g.dts+":"+g.debug)}function u(g,_){var b=g.length;if(b>0){if(_.pts>=g[b-1].pts)g.push(_);else for(var v=b-1;v>=0;v--)if(_.pts<g[v].pts){g.splice(v,0,_);break}}else g.push(_)}function y(g){for(var _=g.byteLength,b=[],v=1;v<_-2;)g[v]===0&&g[v+1]===0&&g[v+2]===3?(b.push(v+2),v+=2):v++;if(b.length===0)return g;var m=_-b.length,E=new Uint8Array(m),a=0;for(v=0;v<m;a++,v++)a===b[0]&&(a++,b.shift()),E[v]=g[a];return E}Z.default=c},"./src/errors.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"ErrorTypes",function(){return w}),U.d(Z,"ErrorDetails",function(){return P});var w;(function(S){S.NETWORK_ERROR="networkError",S.MEDIA_ERROR="mediaError",S.KEY_SYSTEM_ERROR="keySystemError",S.MUX_ERROR="muxError",S.OTHER_ERROR="otherError"})(w||(w={}));var P;(function(S){S.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",S.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",S.KEY_SYSTEM_NO_SESSION="keySystemNoSession",S.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",S.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",S.MANIFEST_LOAD_ERROR="manifestLoadError",S.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",S.MANIFEST_PARSING_ERROR="manifestParsingError",S.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",S.LEVEL_EMPTY_ERROR="levelEmptyError",S.LEVEL_LOAD_ERROR="levelLoadError",S.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",S.LEVEL_SWITCH_ERROR="levelSwitchError",S.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",S.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",S.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",S.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",S.FRAG_LOAD_ERROR="fragLoadError",S.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",S.FRAG_DECRYPT_ERROR="fragDecryptError",S.FRAG_PARSING_ERROR="fragParsingError",S.REMUX_ALLOC_ERROR="remuxAllocError",S.KEY_LOAD_ERROR="keyLoadError",S.KEY_LOAD_TIMEOUT="keyLoadTimeOut",S.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",S.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",S.BUFFER_APPEND_ERROR="bufferAppendError",S.BUFFER_APPENDING_ERROR="bufferAppendingError",S.BUFFER_STALLED_ERROR="bufferStalledError",S.BUFFER_FULL_ERROR="bufferFullError",S.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",S.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",S.INTERNAL_EXCEPTION="internalException",S.INTERNAL_ABORTED="aborted",S.UNKNOWN="unknown"})(P||(P={}))},"./src/events.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"Events",function(){return w});var w;(function(P){P.MEDIA_ATTACHING="hlsMediaAttaching",P.MEDIA_ATTACHED="hlsMediaAttached",P.MEDIA_DETACHING="hlsMediaDetaching",P.MEDIA_DETACHED="hlsMediaDetached",P.BUFFER_RESET="hlsBufferReset",P.BUFFER_CODECS="hlsBufferCodecs",P.BUFFER_CREATED="hlsBufferCreated",P.BUFFER_APPENDING="hlsBufferAppending",P.BUFFER_APPENDED="hlsBufferAppended",P.BUFFER_EOS="hlsBufferEos",P.BUFFER_FLUSHING="hlsBufferFlushing",P.BUFFER_FLUSHED="hlsBufferFlushed",P.MANIFEST_LOADING="hlsManifestLoading",P.MANIFEST_LOADED="hlsManifestLoaded",P.MANIFEST_PARSED="hlsManifestParsed",P.LEVEL_SWITCHING="hlsLevelSwitching",P.LEVEL_SWITCHED="hlsLevelSwitched",P.LEVEL_LOADING="hlsLevelLoading",P.LEVEL_LOADED="hlsLevelLoaded",P.LEVEL_UPDATED="hlsLevelUpdated",P.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",P.LEVELS_UPDATED="hlsLevelsUpdated",P.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",P.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",P.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",P.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",P.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",P.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",P.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",P.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",P.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",P.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",P.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",P.CUES_PARSED="hlsCuesParsed",P.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",P.INIT_PTS_FOUND="hlsInitPtsFound",P.FRAG_LOADING="hlsFragLoading",P.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",P.FRAG_LOADED="hlsFragLoaded",P.FRAG_DECRYPTED="hlsFragDecrypted",P.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",P.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",P.FRAG_PARSING_METADATA="hlsFragParsingMetadata",P.FRAG_PARSED="hlsFragParsed",P.FRAG_BUFFERED="hlsFragBuffered",P.FRAG_CHANGED="hlsFragChanged",P.FPS_DROP="hlsFpsDrop",P.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",P.ERROR="hlsError",P.DESTROYING="hlsDestroying",P.KEY_LOADING="hlsKeyLoading",P.KEY_LOADED="hlsKeyLoaded",P.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",P.BACK_BUFFER_REACHED="hlsBackBufferReached"})(w||(w={}))},"./src/hls.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return g});var w=U("./node_modules/url-toolkit/src/url-toolkit.js"),P=U.n(w),S=U("./src/loader/playlist-loader.ts"),C=U("./src/loader/key-loader.ts"),T=U("./src/controller/id3-track-controller.ts"),l=U("./src/controller/latency-controller.ts"),p=U("./src/controller/level-controller.ts"),h=U("./src/controller/fragment-tracker.ts"),d=U("./src/controller/stream-controller.ts"),o=U("./src/is-supported.ts"),c=U("./src/utils/logger.ts"),s=U("./src/config.ts"),f=U("./node_modules/eventemitter3/index.js"),i=U.n(f),n=U("./src/events.ts"),t=U("./src/errors.ts");function u(_,b){for(var v=0;v<b.length;v++){var m=b[v];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(_,m.key,m)}}function y(_,b,v){return b&&u(_.prototype,b),v&&u(_,v),_}var g=function(){_.isSupported=function(){return Object(o.isSupported)()};function _(v){v===void 0&&(v={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new f.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var m=this.config=Object(s.mergeConfig)(_.DefaultConfig,v);this.userConfig=v,Object(c.enableLogs)(m.debug),this._autoLevelCapping=-1,m.progressive&&Object(s.enableStreamingMode)(m);var E=m.abrController,a=m.bufferController,x=m.capLevelController,O=m.fpsController,A=this.abrController=new E(this),D=this.bufferController=new a(this),I=this.capLevelController=new x(this),F=new O(this),K=new S.default(this),ne=new C.default(this),j=new T.default(this),G=this.levelController=new p.default(this),X=new h.FragmentTracker(this),J=this.streamController=new d.default(this,X);I.setStreamController(J),F.setStreamController(J);var B=[G,J];this.networkControllers=B;var Q=[K,ne,A,D,I,F,j,X];this.audioTrackController=this.createController(m.audioTrackController,null,B),this.createController(m.audioStreamController,X,B),this.subtitleTrackController=this.createController(m.subtitleTrackController,null,B),this.createController(m.subtitleStreamController,X,B),this.createController(m.timelineController,null,Q),this.emeController=this.createController(m.emeController,null,Q),this.cmcdController=this.createController(m.cmcdController,null,Q),this.latencyController=this.createController(l.default,null,Q),this.coreComponents=Q}var b=_.prototype;return b.createController=function(m,E,a){if(m){var x=E?new m(this,E):new m(this);return a&&a.push(x),x}return null},b.on=function(m,E,a){a===void 0&&(a=this),this._emitter.on(m,E,a)},b.once=function(m,E,a){a===void 0&&(a=this),this._emitter.once(m,E,a)},b.removeAllListeners=function(m){this._emitter.removeAllListeners(m)},b.off=function(m,E,a,x){a===void 0&&(a=this),this._emitter.off(m,E,a,x)},b.listeners=function(m){return this._emitter.listeners(m)},b.emit=function(m,E,a){return this._emitter.emit(m,E,a)},b.trigger=function(m,E){if(this.config.debug)return this.emit(m,m,E);try{return this.emit(m,m,E)}catch(a){c.logger.error("An internal error happened while handling event "+m+'. Error message: "'+a.message+'". Here is a stacktrace:',a),this.trigger(n.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:m,error:a})}return!1},b.listenerCount=function(m){return this._emitter.listenerCount(m)},b.destroy=function(){c.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(m){return m.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(m){return m.destroy()}),this.coreComponents.length=0},b.attachMedia=function(m){c.logger.log("attachMedia"),this._media=m,this.trigger(n.Events.MEDIA_ATTACHING,{media:m})},b.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},b.loadSource=function(m){this.stopLoad();var E=this.media,a=this.url,x=this.url=w.buildAbsoluteURL(self.location.href,m,{alwaysNormalize:!0});c.logger.log("loadSource:"+x),E&&a&&a!==x&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(E)),this.trigger(n.Events.MANIFEST_LOADING,{url:m})},b.startLoad=function(m){m===void 0&&(m=-1),c.logger.log("startLoad("+m+")"),this.networkControllers.forEach(function(E){E.startLoad(m)})},b.stopLoad=function(){c.logger.log("stopLoad"),this.networkControllers.forEach(function(m){m.stopLoad()})},b.swapAudioCodec=function(){c.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},b.recoverMediaError=function(){c.logger.log("recoverMediaError");var m=this._media;this.detachMedia(),m&&this.attachMedia(m)},b.removeLevel=function(m,E){E===void 0&&(E=0),this.levelController.removeLevel(m,E)},y(_,[{key:"levels",get:function(){var m=this.levelController.levels;return m||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(m){c.logger.log("set currentLevel:"+m),this.loadLevel=m,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(m){c.logger.log("set nextLevel:"+m),this.levelController.manualLevel=m,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(m){c.logger.log("set loadLevel:"+m),this.levelController.manualLevel=m}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(m){this.levelController.nextLoadLevel=m}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(m){c.logger.log("set firstLevel:"+m),this.levelController.firstLevel=m}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(m){c.logger.log("set startLevel:"+m),m!==-1&&(m=Math.max(m,this.minAutoLevel)),this.levelController.startLevel=m}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(m){var E=!!m;E!==this.config.capLevelToPlayerSize&&(E?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=E)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(m){this._autoLevelCapping!==m&&(c.logger.log("set autoLevelCapping:"+m),this._autoLevelCapping=m)}},{key:"bandwidthEstimate",get:function(){var m=this.abrController.bwEstimator;return m?m.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var m=this.levels,E=this.config.minAutoBitrate;if(!m)return 0;for(var a=m.length,x=0;x<a;x++)if(m[x].maxBitrate>E)return x;return 0}},{key:"maxAutoLevel",get:function(){var m=this.levels,E=this.autoLevelCapping,a;return E===-1&&m&&m.length?a=m.length-1:a=E,a}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(m){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,m)}},{key:"audioTracks",get:function(){var m=this.audioTrackController;return m?m.audioTracks:[]}},{key:"audioTrack",get:function(){var m=this.audioTrackController;return m?m.audioTrack:-1},set:function(m){var E=this.audioTrackController;E&&(E.audioTrack=m)}},{key:"subtitleTracks",get:function(){var m=this.subtitleTrackController;return m?m.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var m=this.subtitleTrackController;return m?m.subtitleTrack:-1},set:function(m){var E=this.subtitleTrackController;E&&(E.subtitleTrack=m)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var m=this.subtitleTrackController;return m?m.subtitleDisplay:!1},set:function(m){var E=this.subtitleTrackController;E&&(E.subtitleDisplay=m)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(m){this.config.lowLatencyMode=m}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return n.Events}},{key:"ErrorTypes",get:function(){return t.ErrorTypes}},{key:"ErrorDetails",get:function(){return t.ErrorDetails}},{key:"DefaultConfig",get:function(){return _.defaultConfig?_.defaultConfig:s.hlsDefaultConfig},set:function(m){_.defaultConfig=m}}]),_}();g.defaultConfig=void 0},"./src/is-supported.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"isSupported",function(){return S}),U.d(Z,"changeTypeSupported",function(){return C});var w=U("./src/utils/mediasource-helper.ts");function P(){return self.SourceBuffer||self.WebKitSourceBuffer}function S(){var T=Object(w.getMediaSource)();if(!T)return!1;var l=P(),p=T&&typeof T.isTypeSupported=="function"&&T.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),h=!l||l.prototype&&typeof l.prototype.appendBuffer=="function"&&typeof l.prototype.remove=="function";return!!p&&!!h}function C(){var T,l=P();return typeof(l==null||((T=l.prototype)===null||T===void 0)?void 0:T.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return c}),U.d(Z,"LoadError",function(){return f});var w=U("./src/polyfills/number.ts"),P=U("./src/errors.ts");function S(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,h(i,n)}function C(i){var n=typeof Map=="function"?new Map:void 0;return C=function(u){if(u===null||!p(u))return u;if(typeof u!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(u))return n.get(u);n.set(u,y)}function y(){return T(u,arguments,d(this).constructor)}return y.prototype=Object.create(u.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),h(y,u)},C(i)}function T(i,n,t){return l()?T=Reflect.construct:T=function(y,g,_){var b=[null];b.push.apply(b,g);var v=Function.bind.apply(y,b),m=new v;return _&&h(m,_.prototype),m},T.apply(null,arguments)}function l(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(i){return!1}}function p(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function h(i,n){return h=Object.setPrototypeOf||function(u,y){return u.__proto__=y,u},h(i,n)}function d(i){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(i)}var o=Math.pow(2,17),c=function(){function i(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}var n=i.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(u,y){var g=this,_=u.url;if(!_)return Promise.reject(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,networkDetails:null},"Fragment does not have a "+(_?"part list":"url")));this.abort();var b=this.config,v=b.fLoader,m=b.loader;return new Promise(function(E,a){g.loader&&g.loader.destroy();var x=g.loader=u.loader=v?new v(b):new m(b),O=s(u),A={timeout:b.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:b.fragLoadingMaxRetryTimeout,highWaterMark:o};u.stats=x.stats,x.load(O,A,{onSuccess:function(I,F,K,ne){g.resetLoader(u,x),E({frag:u,part:null,payload:I.data,networkDetails:ne})},onError:function(I,F,K){g.resetLoader(u,x),a(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,response:I,networkDetails:K}))},onAbort:function(I,F,K){g.resetLoader(u,x),a(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,networkDetails:K}))},onTimeout:function(I,F,K){g.resetLoader(u,x),a(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,networkDetails:K}))},onProgress:function(I,F,K,ne){y&&y({frag:u,part:null,payload:K,networkDetails:ne})}})})},n.loadPart=function(u,y,g){var _=this;this.abort();var b=this.config,v=b.fLoader,m=b.loader;return new Promise(function(E,a){_.loader&&_.loader.destroy();var x=_.loader=u.loader=v?new v(b):new m(b),O=s(u,y),A={timeout:b.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:b.fragLoadingMaxRetryTimeout,highWaterMark:o};y.stats=x.stats,x.load(O,A,{onSuccess:function(I,F,K,ne){_.resetLoader(u,x),_.updateStatsFromPart(u,y);var j={frag:u,part:y,payload:I.data,networkDetails:ne};g(j),E(j)},onError:function(I,F,K){_.resetLoader(u,x),a(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,part:y,response:I,networkDetails:K}))},onAbort:function(I,F,K){u.stats.aborted=y.stats.aborted,_.resetLoader(u,x),a(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,part:y,networkDetails:K}))},onTimeout:function(I,F,K){_.resetLoader(u,x),a(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,part:y,networkDetails:K}))}})})},n.updateStatsFromPart=function(u,y){var g=u.stats,_=y.stats,b=_.total;if(g.loaded+=_.loaded,b){var v=Math.round(u.duration/y.duration),m=Math.min(Math.round(g.loaded/b),v),E=v-m,a=E*Math.round(g.loaded/m);g.total=g.loaded+a}else g.total=Math.max(g.loaded,g.total);var x=g.loading,O=_.loading;x.start?x.first+=O.first-O.start:(x.start=O.start,x.first=O.first),x.end=O.end},n.resetLoader=function(u,y){u.loader=null,this.loader===y&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),y.destroy()},i}();function s(i,n){n===void 0&&(n=null);var t=n||i,u={frag:i,part:n,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},y=t.byteRangeStartOffset,g=t.byteRangeEndOffset;return Object(w.isFiniteNumber)(y)&&Object(w.isFiniteNumber)(g)&&(u.rangeStart=y,u.rangeEnd=g),u}var f=function(i){S(n,i);function n(t){for(var u,y=arguments.length,g=new Array(y>1?y-1:0),_=1;_<y;_++)g[_-1]=arguments[_];return u=i.call.apply(i,[this].concat(g))||this,u.data=void 0,u.data=t,u}return n}(C(Error))},"./src/loader/fragment.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"ElementaryStreamTypes",function(){return c}),U.d(Z,"BaseSegment",function(){return s}),U.d(Z,"Fragment",function(){return f}),U.d(Z,"Part",function(){return i});var w=U("./src/polyfills/number.ts"),P=U("./node_modules/url-toolkit/src/url-toolkit.js"),S=U.n(P),C=U("./src/utils/logger.ts"),T=U("./src/loader/level-key.ts"),l=U("./src/loader/load-stats.ts");function p(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n,h(n,t)}function h(n,t){return h=Object.setPrototypeOf||function(y,g){return y.__proto__=g,y},h(n,t)}function d(n,t){for(var u=0;u<t.length;u++){var y=t[u];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(n,y.key,y)}}function o(n,t,u){return t&&d(n.prototype,t),u&&d(n,u),n}var c;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(c||(c={}));var s=function(){function n(u){var y;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(y={},y[c.AUDIO]=null,y[c.VIDEO]=null,y[c.AUDIOVIDEO]=null,y),this.baseurl=u}var t=n.prototype;return t.setByteRange=function(y,g){var _=y.split("@",2),b=[];_.length===1?b[0]=g?g.byteRangeEndOffset:0:b[0]=parseInt(_[1]),b[1]=parseInt(_[0])+b[0],this._byteRange=b},o(n,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(P.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(y){this._url=y}}]),n}(),f=function(n){p(t,n);function t(y,g){var _;return _=n.call(this,g)||this,_._decryptdata=null,_.rawProgramDateTime=null,_.programDateTime=null,_.tagList=[],_.duration=0,_.sn=0,_.levelkey=void 0,_.type=void 0,_.loader=null,_.level=-1,_.cc=0,_.startPTS=void 0,_.endPTS=void 0,_.appendedPTS=void 0,_.startDTS=void 0,_.endDTS=void 0,_.start=0,_.deltaPTS=void 0,_.maxStartPTS=void 0,_.minEndPTS=void 0,_.stats=new l.LoadStats,_.urlId=0,_.data=void 0,_.bitrateTest=!1,_.title=null,_.initSegment=null,_.type=y,_}var u=t.prototype;return u.createInitializationVector=function(g){for(var _=new Uint8Array(16),b=12;b<16;b++)_[b]=g>>8*(15-b)&255;return _},u.setDecryptDataFromLevelKey=function(g,_){var b=g;return(g==null?void 0:g.method)==="AES-128"&&g.uri&&!g.iv&&(b=T.LevelKey.fromURI(g.uri),b.method=g.method,b.iv=this.createInitializationVector(_),b.keyFormat="identity"),b},u.setElementaryStreamInfo=function(g,_,b,v,m,E){E===void 0&&(E=!1);var a=this.elementaryStreams,x=a[g];if(!x){a[g]={startPTS:_,endPTS:b,startDTS:v,endDTS:m,partial:E};return}x.startPTS=Math.min(x.startPTS,_),x.endPTS=Math.max(x.endPTS,b),x.startDTS=Math.min(x.startDTS,v),x.endDTS=Math.max(x.endDTS,m)},u.clearElementaryStreamInfo=function(){var g=this.elementaryStreams;g[c.AUDIO]=null,g[c.VIDEO]=null,g[c.AUDIOVIDEO]=null},o(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var g=this.sn;typeof g!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&C.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),g=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,g)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(w.isFiniteNumber)(this.programDateTime))return null;var g=Object(w.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+g*1e3}},{key:"encrypted",get:function(){var g;return!!((g=this.decryptdata)!==null&&g!==void 0&&g.keyFormat&&this.decryptdata.uri)}}]),t}(s),i=function(n){p(t,n);function t(u,y,g,_,b){var v;v=n.call(this,g)||this,v.fragOffset=0,v.duration=0,v.gap=!1,v.independent=!1,v.relurl=void 0,v.fragment=void 0,v.index=void 0,v.stats=new l.LoadStats,v.duration=u.decimalFloatingPoint("DURATION"),v.gap=u.bool("GAP"),v.independent=u.bool("INDEPENDENT"),v.relurl=u.enumeratedString("URI"),v.fragment=y,v.index=_;var m=u.enumeratedString("BYTERANGE");return m&&v.setByteRange(m,b),b&&(v.fragOffset=b.fragOffset+b.duration),v}return o(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var y=this.elementaryStreams;return!!(y.audio||y.video||y.audiovideo)}}]),t}(s)},"./src/loader/key-loader.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return C});var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/utils/logger.ts"),C=function(){function T(p){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=p,this._registerListeners()}var l=T.prototype;return l._registerListeners=function(){this.hls.on(w.Events.KEY_LOADING,this.onKeyLoading,this)},l._unregisterListeners=function(){this.hls.off(w.Events.KEY_LOADING,this.onKeyLoading)},l.destroy=function(){this._unregisterListeners();for(var h in this.loaders){var d=this.loaders[h];d&&d.destroy()}this.loaders={}},l.onKeyLoading=function(h,d){var o=d.frag,c=o.type,s=this.loaders[c];if(!o.decryptdata){S.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=o.decryptdata.uri;if(f!==this.decrypturl||this.decryptkey===null){var i=this.hls.config;if(s&&(S.logger.warn("abort previous key loader for type:"+c),s.abort()),!f){S.logger.warn("key uri is falsy");return}var n=i.loader,t=o.loader=this.loaders[c]=new n(i);this.decrypturl=f,this.decryptkey=null;var u={url:f,frag:o,responseType:"arraybuffer"},y={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:i.fragLoadingRetryDelay,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};t.load(u,y,g)}else this.decryptkey&&(o.decryptdata.key=this.decryptkey,this.hls.trigger(w.Events.KEY_LOADED,{frag:o}))},l.loadsuccess=function(h,d,o){var c=o.frag;if(!c.decryptdata){S.logger.error("after key load, decryptdata unset");return}this.decryptkey=c.decryptdata.key=new Uint8Array(h.data),c.loader=null,delete this.loaders[c.type],this.hls.trigger(w.Events.KEY_LOADED,{frag:c})},l.loaderror=function(h,d){var o=d.frag,c=o.loader;c&&c.abort(),delete this.loaders[o.type],this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:o,response:h})},l.loadtimeout=function(h,d){var o=d.frag,c=o.loader;c&&c.abort(),delete this.loaders[o.type],this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:o})},T}()},"./src/loader/level-details.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"LevelDetails",function(){return T});var w=U("./src/polyfills/number.ts");function P(l,p){for(var h=0;h<p.length;h++){var d=p[h];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}function S(l,p,h){return p&&P(l.prototype,p),h&&P(l,h),l}var C=10,T=function(){function l(h){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=h}var p=l.prototype;return p.reloaded=function(d){if(!d){this.advanced=!0,this.updated=!0;return}var o=this.lastPartSn-d.lastPartSn,c=this.lastPartIndex-d.lastPartIndex;this.updated=this.endSN!==d.endSN||!!c||!!o,this.advanced=this.endSN>d.endSN||o>0||o===0&&c>0,this.updated||this.advanced?this.misses=Math.floor(d.misses*.6):this.misses=d.misses+1,this.availabilityDelay=d.availabilityDelay},S(l,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(w.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||C}},{key:"drift",get:function(){var d=this.driftEndTime-this.driftStartTime;if(d>0){var o=this.driftEnd-this.driftStart;return o*1e3/d}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var d;return(d=this.fragments)!==null&&d!==void 0&&d.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),l}()},"./src/loader/level-key.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"LevelKey",function(){return T});var w=U("./node_modules/url-toolkit/src/url-toolkit.js"),P=U.n(w);function S(l,p){for(var h=0;h<p.length;h++){var d=p[h];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}function C(l,p,h){return p&&S(l.prototype,p),h&&S(l,h),l}var T=function(){l.fromURL=function(h,d){return new l(h,d)},l.fromURI=function(h){return new l(h)};function l(p,h){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,h?this._uri=Object(w.buildAbsoluteURL)(p,h,{alwaysNormalize:!0}):this._uri=p}return C(l,[{key:"uri",get:function(){return this._uri}}]),l}()},"./src/loader/load-stats.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"LoadStats",function(){return w});var w=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return t});var w=U("./src/polyfills/number.ts"),P=U("./node_modules/url-toolkit/src/url-toolkit.js"),S=U.n(P),C=U("./src/loader/fragment.ts"),T=U("./src/loader/level-details.ts"),l=U("./src/loader/level-key.ts"),p=U("./src/utils/attr-list.ts"),h=U("./src/utils/logger.ts"),d=U("./src/utils/codecs.ts"),o=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,c=/#EXT-X-MEDIA:(.*)/g,s=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),f=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),i=/\.(mp4|m4s|m4v|m4a)$/i;function n(b){var v,m;return i.test((v=(m=P.parseURL(b))===null||m===void 0?void 0:m.path)!=null?v:"")}var t=function(){function b(){}return b.findGroup=function(m,E){for(var a=0;a<m.length;a++){var x=m[a];if(x.id===E)return x}},b.convertAVC1ToAVCOTI=function(m){var E=m.split(".");if(E.length>2){var a=E.shift()+".";return a+=parseInt(E.shift()).toString(16),a+=("000"+parseInt(E.shift()).toString(16)).substr(-4),a}return m},b.resolve=function(m,E){return P.buildAbsoluteURL(E,m,{alwaysNormalize:!0})},b.parseMasterPlaylist=function(m,E){var a=[],x={},O=!1;o.lastIndex=0;for(var A;(A=o.exec(m))!=null;)if(A[1]){var D=new p.AttrList(A[1]),I={attrs:D,bitrate:D.decimalInteger("AVERAGE-BANDWIDTH")||D.decimalInteger("BANDWIDTH"),name:D.NAME,url:b.resolve(A[2],E)},F=D.decimalResolution("RESOLUTION");F&&(I.width=F.width,I.height=F.height),u((D.CODECS||"").split(/[ ,]+/).filter(function(ne){return ne}),I),I.videoCodec&&I.videoCodec.indexOf("avc1")!==-1&&(I.videoCodec=b.convertAVC1ToAVCOTI(I.videoCodec)),a.push(I)}else if(A[3]){var K=new p.AttrList(A[3]);K["DATA-ID"]&&(O=!0,x[K["DATA-ID"]]=K)}return{levels:a,sessionData:O?x:null}},b.parseMasterPlaylistMedia=function(m,E,a,x){x===void 0&&(x=[]);var O,A=[],D=0;for(c.lastIndex=0;(O=c.exec(m))!==null;){var I=new p.AttrList(O[1]);if(I.TYPE===a){var F={attrs:I,bitrate:0,id:D++,groupId:I["GROUP-ID"],instreamId:I["INSTREAM-ID"],name:I.NAME||I.LANGUAGE||"",type:a,default:I.bool("DEFAULT"),autoselect:I.bool("AUTOSELECT"),forced:I.bool("FORCED"),lang:I.LANGUAGE,url:I.URI?b.resolve(I.URI,E):""};if(x.length){var K=b.findGroup(x,F.groupId)||x[0];y(F,K,"audioCodec"),y(F,K,"textCodec")}A.push(F)}}return A},b.parseLevelPlaylist=function(m,E,a,x,O){var A=new T.LevelDetails(E),D=A.fragments,I=null,F=0,K=0,ne=0,j=0,G=null,X=new C.Fragment(x,E),J,B,Q,ie=-1,oe=!1;for(s.lastIndex=0,A.m3u8=m;(J=s.exec(m))!==null;){oe&&(oe=!1,X=new C.Fragment(x,E),X.start=ne,X.sn=F,X.cc=j,X.level=a,I&&(X.initSegment=I,X.rawProgramDateTime=I.rawProgramDateTime));var xe=J[1];if(xe){X.duration=parseFloat(xe);var ye=(" "+J[2]).slice(1);X.title=ye||null,X.tagList.push(ye?["INF",xe,ye]:["INF",xe])}else if(J[3])Object(w.isFiniteNumber)(X.duration)&&(X.start=ne,Q&&(X.levelkey=Q),X.sn=F,X.level=a,X.cc=j,X.urlId=O,D.push(X),X.relurl=(" "+J[3]).slice(1),_(X,G),G=X,ne+=X.duration,F++,K=0,oe=!0);else if(J[4]){var Ae=(" "+J[4]).slice(1);G?X.setByteRange(Ae,G):X.setByteRange(Ae)}else if(J[5])X.rawProgramDateTime=(" "+J[5]).slice(1),X.tagList.push(["PROGRAM-DATE-TIME",X.rawProgramDateTime]),ie===-1&&(ie=D.length);else{if(J=J[0].match(f),!J){h.logger.warn("No matches on slow regex match for level playlist!");continue}for(B=1;B<J.length&&!(typeof J[B]!="undefined");B++);var pe=(" "+J[B]).slice(1),Oe=(" "+J[B+1]).slice(1),Fe=J[B+2]?(" "+J[B+2]).slice(1):"";switch(pe){case"PLAYLIST-TYPE":A.type=Oe.toUpperCase();break;case"MEDIA-SEQUENCE":F=A.startSN=parseInt(Oe);break;case"SKIP":{var Me=new p.AttrList(Oe),Ce=Me.decimalInteger("SKIPPED-SEGMENTS");if(Object(w.isFiniteNumber)(Ce)){A.skippedSegments=Ce;for(var Le=Ce;Le--;)D.unshift(null);F+=Ce}var de=Me.enumeratedString("RECENTLY-REMOVED-DATERANGES");de&&(A.recentlyRemovedDateranges=de.split(" "));break}case"TARGETDURATION":A.targetduration=parseFloat(Oe);break;case"VERSION":A.version=parseInt(Oe);break;case"EXTM3U":break;case"ENDLIST":A.live=!1;break;case"#":(Oe||Fe)&&X.tagList.push(Fe?[Oe,Fe]:[Oe]);break;case"DIS":j++;case"GAP":X.tagList.push([pe]);break;case"BITRATE":X.tagList.push([pe,Oe]);break;case"DISCONTINUITY-SEQ":j=parseInt(Oe);break;case"KEY":{var ue,ke=new p.AttrList(Oe),Ue=ke.enumeratedString("METHOD"),Ye=ke.URI,ee=ke.hexadecimalInteger("IV"),M=ke.enumeratedString("KEYFORMATVERSIONS"),N=ke.enumeratedString("KEYID"),$=(ue=ke.enumeratedString("KEYFORMAT"))!=null?ue:"identity",V=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(V.indexOf($)>-1){h.logger.warn("Keyformat "+$+" is not supported from the manifest");continue}else if($!=="identity")continue;Ue&&(Q=l.LevelKey.fromURL(E,Ye),Ye&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ue)>=0&&(Q.method=Ue,Q.keyFormat=$,N&&(Q.keyID=N),M&&(Q.keyFormatVersions=M),Q.iv=ee));break}case"START":{var Y=new p.AttrList(Oe),me=Y.decimalFloatingPoint("TIME-OFFSET");Object(w.isFiniteNumber)(me)&&(A.startTimeOffset=me);break}case"MAP":{var Re=new p.AttrList(Oe);X.relurl=Re.URI,Re.BYTERANGE&&X.setByteRange(Re.BYTERANGE),X.level=a,X.sn="initSegment",Q&&(X.levelkey=Q),X.initSegment=null,I=X,oe=!0;break}case"SERVER-CONTROL":{var rt=new p.AttrList(Oe);A.canBlockReload=rt.bool("CAN-BLOCK-RELOAD"),A.canSkipUntil=rt.optionalFloat("CAN-SKIP-UNTIL",0),A.canSkipDateRanges=A.canSkipUntil>0&&rt.bool("CAN-SKIP-DATERANGES"),A.partHoldBack=rt.optionalFloat("PART-HOLD-BACK",0),A.holdBack=rt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Pe=new p.AttrList(Oe);A.partTarget=Pe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=A.partList;Ie||(Ie=A.partList=[]);var Xe=K>0?Ie[Ie.length-1]:void 0,tt=K++,Ve=new C.Part(new p.AttrList(Oe),X,E,tt,Xe);Ie.push(Ve),X.duration+=Ve.duration;break}case"PRELOAD-HINT":{var Ke=new p.AttrList(Oe);A.preloadHint=Ke;break}case"RENDITION-REPORT":{var Ne=new p.AttrList(Oe);A.renditionReports=A.renditionReports||[],A.renditionReports.push(Ne);break}default:h.logger.warn("line parsed but not handled: "+J);break}}}G&&!G.relurl?(D.pop(),ne-=G.duration,A.partList&&(A.fragmentHint=G)):A.partList&&(_(X,G),X.cc=j,A.fragmentHint=X);var De=D.length,_e=D[0],he=D[De-1];if(ne+=A.skippedSegments*A.targetduration,ne>0&&De&&he){A.averagetargetduration=ne/De;var ve=he.sn;A.endSN=ve!=="initSegment"?ve:0,_e&&(A.startCC=_e.cc,_e.initSegment||A.fragments.every(function(Ee){return Ee.relurl&&n(Ee.relurl)})&&(h.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),X=new C.Fragment(x,E),X.relurl=he.relurl,X.level=a,X.sn="initSegment",_e.initSegment=X,A.needSidxRanges=!0))}else A.endSN=0,A.startCC=0;return A.fragmentHint&&(ne+=A.fragmentHint.duration),A.totalduration=ne,A.endCC=j,ie>0&&g(D,ie),A},b}();function u(b,v){["video","audio","text"].forEach(function(m){var E=b.filter(function(x){return Object(d.isCodecType)(x,m)});if(E.length){var a=E.filter(function(x){return x.lastIndexOf("avc1",0)===0||x.lastIndexOf("mp4a",0)===0});v[m+"Codec"]=a.length>0?a[0]:E[0],b=b.filter(function(x){return E.indexOf(x)===-1})}}),v.unknownCodecs=b}function y(b,v,m){var E=v[m];E&&(b[m]=E)}function g(b,v){for(var m=b[v],E=v;E--;){var a=b[E];if(!a)return;a.programDateTime=m.programDateTime-a.duration*1e3,m=a}}function _(b,v){b.rawProgramDateTime?b.programDateTime=Date.parse(b.rawProgramDateTime):v!=null&&v.programDateTime&&(b.programDateTime=v.endProgramDateTime),Object(w.isFiniteNumber)(b.programDateTime)||(b.programDateTime=null,b.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),S=U("./src/errors.ts"),C=U("./src/utils/logger.ts"),T=U("./src/utils/mp4-tools.ts"),l=U("./src/loader/m3u8-parser.ts"),p=U("./src/types/loader.ts"),h=U("./src/utils/attr-list.ts");function d(s){var f=s.type;switch(f){case p.PlaylistContextType.AUDIO_TRACK:return p.PlaylistLevelType.AUDIO;case p.PlaylistContextType.SUBTITLE_TRACK:return p.PlaylistLevelType.SUBTITLE;default:return p.PlaylistLevelType.MAIN}}function o(s,f){var i=s.url;return(i===void 0||i.indexOf("data:")===0)&&(i=f.url),i}var c=function(){function s(i){this.hls=void 0,this.loaders=Object.create(null),this.hls=i,this.registerListeners()}var f=s.prototype;return f.registerListeners=function(){var n=this.hls;n.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.unregisterListeners=function(){var n=this.hls;n.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.createInternalLoader=function(n){var t=this.hls.config,u=t.pLoader,y=t.loader,g=u||y,_=new g(t);return n.loader=_,this.loaders[n.type]=_,_},f.getInternalLoader=function(n){return this.loaders[n.type]},f.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},f.destroyInternalLoaders=function(){for(var n in this.loaders){var t=this.loaders[n];t&&t.destroy(),this.resetInternalLoader(n)}},f.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},f.onManifestLoading=function(n,t){var u=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:p.PlaylistContextType.MANIFEST,url:u,deliveryDirectives:null})},f.onLevelLoading=function(n,t){var u=t.id,y=t.level,g=t.url,_=t.deliveryDirectives;this.load({id:u,groupId:null,level:y,responseType:"text",type:p.PlaylistContextType.LEVEL,url:g,deliveryDirectives:_})},f.onAudioTrackLoading=function(n,t){var u=t.id,y=t.groupId,g=t.url,_=t.deliveryDirectives;this.load({id:u,groupId:y,level:null,responseType:"text",type:p.PlaylistContextType.AUDIO_TRACK,url:g,deliveryDirectives:_})},f.onSubtitleTrackLoading=function(n,t){var u=t.id,y=t.groupId,g=t.url,_=t.deliveryDirectives;this.load({id:u,groupId:y,level:null,responseType:"text",type:p.PlaylistContextType.SUBTITLE_TRACK,url:g,deliveryDirectives:_})},f.load=function(n){var t,u=this.hls.config,y=this.getInternalLoader(n);if(y){var g=y.context;if(g&&g.url===n.url){C.logger.trace("[playlist-loader]: playlist request ongoing");return}C.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),y.abort()}var _,b,v,m;switch(n.type){case p.PlaylistContextType.MANIFEST:_=u.manifestLoadingMaxRetry,b=u.manifestLoadingTimeOut,v=u.manifestLoadingRetryDelay,m=u.manifestLoadingMaxRetryTimeout;break;case p.PlaylistContextType.LEVEL:case p.PlaylistContextType.AUDIO_TRACK:case p.PlaylistContextType.SUBTITLE_TRACK:_=0,b=u.levelLoadingTimeOut;break;default:_=u.levelLoadingMaxRetry,b=u.levelLoadingTimeOut,v=u.levelLoadingRetryDelay,m=u.levelLoadingMaxRetryTimeout;break}if(y=this.createInternalLoader(n),(t=n.deliveryDirectives)!==null&&t!==void 0&&t.part){var E;if(n.type===p.PlaylistContextType.LEVEL&&n.level!==null?E=this.hls.levels[n.level].details:n.type===p.PlaylistContextType.AUDIO_TRACK&&n.id!==null?E=this.hls.audioTracks[n.id].details:n.type===p.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(E=this.hls.subtitleTracks[n.id].details),E){var a=E.partTarget,x=E.targetduration;a&&x&&(b=Math.min(Math.max(a*3,x*.8)*1e3,b))}}var O={timeout:b,maxRetry:_,retryDelay:v,maxRetryDelay:m,highWaterMark:0},A={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};y.load(n,O,A)},f.loadsuccess=function(n,t,u,y){if(y===void 0&&(y=null),u.isSidxRequest){this.handleSidxRequest(n,u),this.handlePlaylistLoaded(n,t,u,y);return}this.resetInternalLoader(u.type);var g=n.data;if(g.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,u,"no EXTM3U delimiter",y);return}t.parsing.start=performance.now(),g.indexOf("#EXTINF:")>0||g.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,t,u,y):this.handleMasterPlaylist(n,t,u,y)},f.loaderror=function(n,t,u){u===void 0&&(u=null),this.handleNetworkError(t,u,!1,n)},f.loadtimeout=function(n,t,u){u===void 0&&(u=null),this.handleNetworkError(t,u,!0)},f.handleMasterPlaylist=function(n,t,u,y){var g=this.hls,_=n.data,b=o(n,u),v=l.default.parseMasterPlaylist(_,b),m=v.levels,E=v.sessionData;if(!m.length){this.handleManifestParsingError(n,u,"no level found in manifest",y);return}var a=m.map(function(F){return{id:F.attrs.AUDIO,audioCodec:F.audioCodec}}),x=m.map(function(F){return{id:F.attrs.SUBTITLES,textCodec:F.textCodec}}),O=l.default.parseMasterPlaylistMedia(_,b,"AUDIO",a),A=l.default.parseMasterPlaylistMedia(_,b,"SUBTITLES",x),D=l.default.parseMasterPlaylistMedia(_,b,"CLOSED-CAPTIONS");if(O.length){var I=O.some(function(F){return!F.url});!I&&m[0].audioCodec&&!m[0].attrs.AUDIO&&(C.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),O.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new h.AttrList({}),bitrate:0,url:""}))}g.trigger(P.Events.MANIFEST_LOADED,{levels:m,audioTracks:O,subtitles:A,captions:D,url:b,stats:t,networkDetails:y,sessionData:E})},f.handleTrackOrLevelPlaylist=function(n,t,u,y){var g=this.hls,_=u.id,b=u.level,v=u.type,m=o(n,u),E=Object(w.isFiniteNumber)(_)?_:0,a=Object(w.isFiniteNumber)(b)?b:E,x=d(u),O=l.default.parseLevelPlaylist(n.data,m,a,x,E);if(!O.fragments.length){g.trigger(P.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:m,reason:"no fragments found in level",level:typeof u.level=="number"?u.level:void 0});return}if(v===p.PlaylistContextType.MANIFEST){var A={attrs:new h.AttrList({}),bitrate:0,details:O,name:"",url:m};g.trigger(P.Events.MANIFEST_LOADED,{levels:[A],audioTracks:[],url:m,stats:t,networkDetails:y,sessionData:null})}if(t.parsing.end=performance.now(),O.needSidxRanges){var D,I=(D=O.fragments[0].initSegment)===null||D===void 0?void 0:D.url;this.load({url:I,isSidxRequest:!0,type:v,level:b,levelDetails:O,id:_,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}u.levelDetails=O,this.handlePlaylistLoaded(n,t,u,y)},f.handleSidxRequest=function(n,t){var u=Object(T.parseSegmentIndex)(new Uint8Array(n.data));if(!u)return;var y=u.references,g=t.levelDetails;y.forEach(function(_,b){var v=_.info,m=g.fragments[b];m.byteRange.length===0&&m.setByteRange(String(1+v.end-v.start)+"@"+String(v.start)),m.initSegment&&m.initSegment.setByteRange(String(u.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(n,t,u,y){this.hls.trigger(P.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===p.PlaylistContextType.MANIFEST,url:n.url,reason:u,response:n,context:t,networkDetails:y})},f.handleNetworkError=function(n,t,u,y){u===void 0&&(u=!1),C.logger.warn("[playlist-loader]: A network "+(u?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var g=S.ErrorDetails.UNKNOWN,_=!1,b=this.getInternalLoader(n);switch(n.type){case p.PlaylistContextType.MANIFEST:g=u?S.ErrorDetails.MANIFEST_LOAD_TIMEOUT:S.ErrorDetails.MANIFEST_LOAD_ERROR,_=!0;break;case p.PlaylistContextType.LEVEL:g=u?S.ErrorDetails.LEVEL_LOAD_TIMEOUT:S.ErrorDetails.LEVEL_LOAD_ERROR,_=!1;break;case p.PlaylistContextType.AUDIO_TRACK:g=u?S.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:S.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,_=!1;break;case p.PlaylistContextType.SUBTITLE_TRACK:g=u?S.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:S.ErrorDetails.SUBTITLE_LOAD_ERROR,_=!1;break}b&&this.resetInternalLoader(n.type);var v={type:S.ErrorTypes.NETWORK_ERROR,details:g,fatal:_,url:n.url,loader:b,context:n,networkDetails:t};y&&(v.response=y),this.hls.trigger(P.Events.ERROR,v)},f.handlePlaylistLoaded=function(n,t,u,y){var g=u.type,_=u.level,b=u.id,v=u.groupId,m=u.loader,E=u.levelDetails,a=u.deliveryDirectives;if(!(E!=null&&E.targetduration)){this.handleManifestParsingError(n,u,"invalid target duration",y);return}if(!m)return;E.live&&(m.getCacheAge&&(E.ageHeader=m.getCacheAge()||0),(!m.getCacheAge||isNaN(E.ageHeader))&&(E.ageHeader=0));switch(g){case p.PlaylistContextType.MANIFEST:case p.PlaylistContextType.LEVEL:this.hls.trigger(P.Events.LEVEL_LOADED,{details:E,level:_||0,id:b||0,stats:t,networkDetails:y,deliveryDirectives:a});break;case p.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(P.Events.AUDIO_TRACK_LOADED,{details:E,id:b||0,groupId:v||"",stats:t,networkDetails:y,deliveryDirectives:a});break;case p.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(P.Events.SUBTITLE_TRACK_LOADED,{details:E,id:b||0,groupId:v||"",stats:t,networkDetails:y,deliveryDirectives:a});break}},s}();Z.default=c},"./src/polyfills/number.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"isFiniteNumber",function(){return w}),U.d(Z,"MAX_SAFE_INTEGER",function(){return P});var w=Number.isFinite||function(S){return typeof S=="number"&&isFinite(S)},P=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ae,Z,U){"use strict";U.r(Z);var w=function(){function P(){}return P.getSilentFrame=function(C,T){switch(C){case"mp4a.40.2":if(T===1)return new Uint8Array([0,200,0,128,35,128]);if(T===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(T===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(T===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(T===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(T===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(T===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(T===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(T===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},P}();Z.default=w},"./src/remux/mp4-generator.ts":function(ae,Z,U){"use strict";U.r(Z);var w=Math.pow(2,32)-1,P=function(){function S(){}return S.init=function(){S.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var T;for(T in S.types)S.types.hasOwnProperty(T)&&(S.types[T]=[T.charCodeAt(0),T.charCodeAt(1),T.charCodeAt(2),T.charCodeAt(3)]);var l=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]),p=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]);S.HDLR_TYPES={video:l,audio:p};var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),d=new Uint8Array([0,0,0,0,0,0,0,0]);S.STTS=S.STSC=S.STCO=d,S.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),S.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),S.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),S.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);S.FTYP=S.box(S.types.ftyp,o,s,o,c),S.DINF=S.box(S.types.dinf,S.box(S.types.dref,h))},S.box=function(T){for(var l=8,p=arguments.length,h=new Array(p>1?p-1:0),d=1;d<p;d++)h[d-1]=arguments[d];for(var o=h.length,c=o;o--;)l+=h[o].byteLength;var s=new Uint8Array(l);for(s[0]=l>>24&255,s[1]=l>>16&255,s[2]=l>>8&255,s[3]=l&255,s.set(T,4),o=0,l=8;o<c;o++)s.set(h[o],l),l+=h[o].byteLength;return s},S.hdlr=function(T){return S.box(S.types.hdlr,S.HDLR_TYPES[T])},S.mdat=function(T){return S.box(S.types.mdat,T)},S.mdhd=function(T,l){l*=T;var p=Math.floor(l/(w+1)),h=Math.floor(l%(w+1));return S.box(S.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,T>>24&255,T>>16&255,T>>8&255,T&255,p>>24,p>>16&255,p>>8&255,p&255,h>>24,h>>16&255,h>>8&255,h&255,85,196,0,0]))},S.mdia=function(T){return S.box(S.types.mdia,S.mdhd(T.timescale,T.duration),S.hdlr(T.type),S.minf(T))},S.mfhd=function(T){return S.box(S.types.mfhd,new Uint8Array([0,0,0,0,T>>24,T>>16&255,T>>8&255,T&255]))},S.minf=function(T){return T.type==="audio"?S.box(S.types.minf,S.box(S.types.smhd,S.SMHD),S.DINF,S.stbl(T)):S.box(S.types.minf,S.box(S.types.vmhd,S.VMHD),S.DINF,S.stbl(T))},S.moof=function(T,l,p){return S.box(S.types.moof,S.mfhd(T),S.traf(p,l))},S.moov=function(T){for(var l=T.length,p=[];l--;)p[l]=S.trak(T[l]);return S.box.apply(null,[S.types.moov,S.mvhd(T[0].timescale,T[0].duration)].concat(p).concat(S.mvex(T)))},S.mvex=function(T){for(var l=T.length,p=[];l--;)p[l]=S.trex(T[l]);return S.box.apply(null,[S.types.mvex].concat(p))},S.mvhd=function(T,l){l*=T;var p=Math.floor(l/(w+1)),h=Math.floor(l%(w+1)),d=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,T>>24&255,T>>16&255,T>>8&255,T&255,p>>24,p>>16&255,p>>8&255,p&255,h>>24,h>>16&255,h>>8&255,h&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return S.box(S.types.mvhd,d)},S.sdtp=function(T){var l=T.samples||[],p=new Uint8Array(4+l.length),h,d;for(h=0;h<l.length;h++)d=l[h].flags,p[h+4]=d.dependsOn<<4|d.isDependedOn<<2|d.hasRedundancy;return S.box(S.types.sdtp,p)},S.stbl=function(T){return S.box(S.types.stbl,S.stsd(T),S.box(S.types.stts,S.STTS),S.box(S.types.stsc,S.STSC),S.box(S.types.stsz,S.STSZ),S.box(S.types.stco,S.STCO))},S.avc1=function(T){var l=[],p=[],h,d,o;for(h=0;h<T.sps.length;h++)d=T.sps[h],o=d.byteLength,l.push(o>>>8&255),l.push(o&255),l=l.concat(Array.prototype.slice.call(d));for(h=0;h<T.pps.length;h++)d=T.pps[h],o=d.byteLength,p.push(o>>>8&255),p.push(o&255),p=p.concat(Array.prototype.slice.call(d));var c=S.box(S.types.avcC,new Uint8Array([1,l[3],l[4],l[5],252|3,224|T.sps.length].concat(l).concat([T.pps.length]).concat(p))),s=T.width,f=T.height,i=T.pixelRatio[0],n=T.pixelRatio[1];return S.box(S.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,s>>8&255,s&255,f>>8&255,f&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,S.box(S.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),S.box(S.types.pasp,new Uint8Array([i>>24,i>>16&255,i>>8&255,i&255,n>>24,n>>16&255,n>>8&255,n&255])))},S.esds=function(T){var l=T.config.length;return new Uint8Array([0,0,0,0,3,23+l,0,1,0,4,15+l,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([l]).concat(T.config).concat([6,1,2]))},S.mp4a=function(T){var l=T.samplerate;return S.box(S.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,T.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]),S.box(S.types.esds,S.esds(T)))},S.mp3=function(T){var l=T.samplerate;return S.box(S.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,T.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]))},S.stsd=function(T){return T.type==="audio"?!T.isAAC&&T.codec==="mp3"?S.box(S.types.stsd,S.STSD,S.mp3(T)):S.box(S.types.stsd,S.STSD,S.mp4a(T)):S.box(S.types.stsd,S.STSD,S.avc1(T))},S.tkhd=function(T){var l=T.id,p=T.duration*T.timescale,h=T.width,d=T.height,o=Math.floor(p/(w+1)),c=Math.floor(p%(w+1));return S.box(S.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,l>>24&255,l>>16&255,l>>8&255,l&255,0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,c>>24,c>>16&255,c>>8&255,c&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,h>>8&255,h&255,0,0,d>>8&255,d&255,0,0]))},S.traf=function(T,l){var p=S.sdtp(T),h=T.id,d=Math.floor(l/(w+1)),o=Math.floor(l%(w+1));return S.box(S.types.traf,S.box(S.types.tfhd,new Uint8Array([0,0,0,0,h>>24,h>>16&255,h>>8&255,h&255])),S.box(S.types.tfdt,new Uint8Array([1,0,0,0,d>>24,d>>16&255,d>>8&255,d&255,o>>24,o>>16&255,o>>8&255,o&255])),S.trun(T,p.length+16+20+8+16+8+8),p)},S.trak=function(T){return T.duration=T.duration||4294967295,S.box(S.types.trak,S.tkhd(T),S.mdia(T))},S.trex=function(T){var l=T.id;return S.box(S.types.trex,new Uint8Array([0,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},S.trun=function(T,l){var p=T.samples||[],h=p.length,d=12+16*h,o=new Uint8Array(d),c,s,f,i,n,t;for(l+=8+d,o.set([0,0,15,1,h>>>24&255,h>>>16&255,h>>>8&255,h&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255],0),c=0;c<h;c++)s=p[c],f=s.duration,i=s.size,n=s.flags,t=s.cts,o.set([f>>>24&255,f>>>16&255,f>>>8&255,f&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,t>>>24&255,t>>>16&255,t>>>8&255,t&255],12+16*c);return S.box(S.types.trun,o)},S.initSegment=function(T){S.types||S.init();var l=S.moov(T),p=new Uint8Array(S.FTYP.byteLength+l.byteLength);return p.set(S.FTYP),p.set(l,S.FTYP.byteLength),p},S}();P.types=void 0,P.HDLR_TYPES=void 0,P.STTS=void 0,P.STSC=void 0,P.STCO=void 0,P.STSZ=void 0,P.VMHD=void 0,P.SMHD=void 0,P.STSD=void 0,P.FTYP=void 0,P.DINF=void 0,Z.default=P},"./src/remux/mp4-remuxer.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return t}),U.d(Z,"normalizePts",function(){return u});var w=U("./src/polyfills/number.ts"),P=U("./src/remux/aac-helper.ts"),S=U("./src/remux/mp4-generator.ts"),C=U("./src/events.ts"),T=U("./src/errors.ts"),l=U("./src/utils/logger.ts"),p=U("./src/types/loader.ts"),h=U("./src/utils/timescale-conversion.ts");function d(){return d=Object.assign||function(b){for(var v=1;v<arguments.length;v++){var m=arguments[v];for(var E in m)Object.prototype.hasOwnProperty.call(m,E)&&(b[E]=m[E])}return b},d.apply(this,arguments)}var o=10*1e3,c=1024,s=1152,f=null,i=null,n=!1,t=function(){function b(m,E,a,x){if(x===void 0&&(x=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=m,this.config=E,this.typeSupported=a,this.ISGenerated=!1,f===null){var O=navigator.userAgent||"",A=O.match(/Chrome\/(\d+)/i);f=A?parseInt(A[1]):0}if(i===null){var D=navigator.userAgent.match(/Safari\/(\d+)/i);i=D?parseInt(D[1]):0}n=!!f&&f<75||!!i&&i<600}var v=b.prototype;return v.destroy=function(){},v.resetTimeStamp=function(E){l.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=E},v.resetNextTimestamp=function(){l.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},v.resetInitSegment=function(){l.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},v.getVideoStartPts=function(E){var a=!1,x=E.reduce(function(O,A){var D=A.pts-O;return D<-4294967296?(a=!0,u(O,A.pts)):D>0?O:A.pts},E[0].pts);return a&&l.logger.debug("PTS rollover detected"),x},v.remux=function(E,a,x,O,A,D,I,F){var K,ne,j,G,X,J,B=A,Q=A,ie=E.pid>-1,oe=a.pid>-1,xe=a.samples.length,ye=E.samples.length>0,Ae=xe>1,pe=(!ie||ye)&&(!oe||Ae)||this.ISGenerated||I;if(pe){this.ISGenerated||(j=this.generateIS(E,a,A));var Oe=this.isVideoContiguous,Fe=-1;if(Ae&&(Fe=y(a.samples),!Oe&&this.config.forceKeyFrameOnDiscontinuity))if(J=!0,Fe>0){l.logger.warn("[mp4-remuxer]: Dropped "+Fe+" out of "+xe+" video samples due to a missing keyframe");var Me=this.getVideoStartPts(a.samples);a.samples=a.samples.slice(Fe),a.dropped+=Fe,Q+=(a.samples[0].pts-Me)/(a.timescale||9e4)}else Fe===-1&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+xe+" video samples"),J=!1);if(this.ISGenerated){if(ye&&Ae){var Ce=this.getVideoStartPts(a.samples),Le=u(E.samples[0].pts,Ce)-Ce,de=Le/a.inputTimeScale;B+=Math.max(0,de),Q+=Math.max(0,-de)}if(ye){if(E.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),j=this.generateIS(E,a,A)),ne=this.remuxAudio(E,B,this.isAudioContiguous,D,oe||Ae||F===p.PlaylistLevelType.AUDIO?Q:void 0),Ae){var ue=ne?ne.endPTS-ne.startPTS:0;a.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),j=this.generateIS(E,a,A)),K=this.remuxVideo(a,Q,Oe,ue)}}else Ae&&(K=this.remuxVideo(a,Q,Oe,0));K&&(K.firstKeyFrame=Fe,K.independent=Fe!==-1)}}return this.ISGenerated&&(x.samples.length&&(X=this.remuxID3(x,A)),O.samples.length&&(G=this.remuxText(O,A))),{audio:ne,video:K,initSegment:j,independent:J,text:G,id3:X}},v.generateIS=function(E,a,x){var O=E.samples,A=a.samples,D=this.typeSupported,I={},F=!Object(w.isFiniteNumber)(this._initPTS),K="audio/mp4",ne,j,G;if(F&&(ne=j=Infinity),E.config&&O.length&&(E.timescale=E.samplerate,E.isAAC||(D.mpeg?(K="audio/mpeg",E.codec=""):D.mp3&&(E.codec="mp3")),I.audio={id:"audio",container:K,codec:E.codec,initSegment:!E.isAAC&&D.mpeg?new Uint8Array(0):S.default.initSegment([E]),metadata:{channelCount:E.channelCount}},F&&(G=E.inputTimeScale,ne=j=O[0].pts-Math.round(G*x))),a.sps&&a.pps&&A.length&&(a.timescale=a.inputTimeScale,I.video={id:"main",container:"video/mp4",codec:a.codec,initSegment:S.default.initSegment([a]),metadata:{width:a.width,height:a.height}},F)){G=a.inputTimeScale;var X=this.getVideoStartPts(A),J=Math.round(G*x);j=Math.min(j,u(A[0].dts,X)-J),ne=Math.min(ne,X-J)}if(Object.keys(I).length)return this.ISGenerated=!0,F&&(this._initPTS=ne,this._initDTS=j),{tracks:I,initPTS:ne,timescale:G}},v.remuxVideo=function(E,a,x,O){var A=E.inputTimeScale,D=E.samples,I=[],F=D.length,K=this._initPTS,ne=this.nextAvcDts,j=8,G,X,J,B=Number.POSITIVE_INFINITY,Q=Number.NEGATIVE_INFINITY,ie=0,oe=!1;if(!x||ne===null){var xe=a*A,ye=D[0].pts-u(D[0].dts,D[0].pts);ne=xe-ye}for(var Ae=0;Ae<F;Ae++){var pe=D[Ae];if(pe.pts=u(pe.pts-K,ne),pe.dts=u(pe.dts-K,ne),pe.dts>pe.pts){var Oe=9e4*.2;ie=Math.max(Math.min(ie,pe.pts-pe.dts),-1*Oe)}pe.dts<D[Ae>0?Ae-1:Ae].dts&&(oe=!0)}oe&&D.sort(function(wt,lt){var ft=wt.dts-lt.dts,Qe=wt.pts-lt.pts;return ft||Qe}),X=D[0].dts,J=D[D.length-1].dts;var Fe=Math.round((J-X)/(F-1));if(ie<0){if(ie<Fe*-2){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(h.toMsFromMpegTsClock)(-Fe,!0)+" ms");for(var Me=ie,Ce=0;Ce<F;Ce++)D[Ce].dts=Me=Math.max(Me,D[Ce].pts-Fe),D[Ce].pts=Math.max(Me,D[Ce].pts)}else{l.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(h.toMsFromMpegTsClock)(ie,!0)+" ms to overcome this issue");for(var Le=0;Le<F;Le++)D[Le].dts=D[Le].dts+ie}X=D[0].dts}if(x){var de=X-ne,ue=de>Fe,ke=de<-1;if(ue||ke){ue?l.logger.warn("AVC: "+Object(h.toMsFromMpegTsClock)(de,!0)+" ms ("+de+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(h.toMsFromMpegTsClock)(-de,!0)+" ms ("+de+"dts) overlapping between fragments detected"),X=ne;var Ue=D[0].pts-de;D[0].dts=X,D[0].pts=Ue,l.logger.log("Video: First PTS/DTS adjusted: "+Object(h.toMsFromMpegTsClock)(Ue,!0)+"/"+Object(h.toMsFromMpegTsClock)(X,!0)+", delta: "+Object(h.toMsFromMpegTsClock)(de,!0)+" ms")}}n&&(X=Math.max(0,X));for(var Ye=0,ee=0,M=0;M<F;M++){for(var N=D[M],$=N.units,V=$.length,Y=0,me=0;me<V;me++)Y+=$[me].data.length;ee+=Y,Ye+=V,N.length=Y,N.dts=Math.max(N.dts,X),N.pts=Math.max(N.pts,N.dts,0),B=Math.min(N.pts,B),Q=Math.max(N.pts,Q)}J=D[F-1].dts;var Re=ee+4*Ye+8,rt;try{rt=new Uint8Array(Re)}catch(wt){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:T.ErrorTypes.MUX_ERROR,details:T.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Re,reason:"fail allocating video mdat "+Re});return}var Pe=new DataView(rt.buffer);Pe.setUint32(0,Re),rt.set(S.default.types.mdat,4);for(var Ie=0;Ie<F;Ie++){for(var Xe=D[Ie],tt=Xe.units,Ve=0,Ke=0,Ne=tt.length;Ke<Ne;Ke++){var De=tt[Ke],_e=De.data,he=De.data.byteLength;Pe.setUint32(j,he),j+=4,rt.set(_e,j),j+=he,Ve+=4+he}if(Ie<F-1)G=D[Ie+1].dts-Xe.dts;else{var ve=this.config,Ee=Xe.dts-D[Ie>0?Ie-1:Ie].dts;if(ve.stretchShortVideoTrack&&this.nextAudioPts!==null){var be=Math.floor(ve.maxBufferHole*A),Ge=(O?B+O*A:this.nextAudioPts)-Xe.pts;Ge>be?(G=Ge-Ee,G<0&&(G=Ee),l.logger.log("[mp4-remuxer]: It is approximately "+Ge/90+" ms to the next segment; using duration "+G/90+" ms for the last video frame.")):G=Ee}else G=Ee}var qe=Math.round(Xe.pts-Xe.dts);I.push(new g(Xe.key,G,Ve,qe))}if(I.length&&f&&f<70){var pt=I[0].flags;pt.dependsOn=2,pt.isNonSync=0}console.assert(G!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=ne=J+G,this.isVideoContiguous=!0;var Pt=S.default.moof(E.sequenceNumber++,X,d({},E,{samples:I})),Rt="video",Mt={data1:Pt,data2:rt,startPTS:B/A,endPTS:(Q+G)/A,startDTS:X/A,endDTS:ne/A,type:Rt,hasAudio:!1,hasVideo:!0,nb:I.length,dropped:E.dropped};return E.samples=[],E.dropped=0,console.assert(rt.length,"MDAT length must not be zero"),Mt},v.remuxAudio=function(E,a,x,O,A){var D=E.inputTimeScale,I=E.samplerate?E.samplerate:D,F=D/I,K=E.isAAC?c:s,ne=K*F,j=this._initPTS,G=!E.isAAC&&this.typeSupported.mpeg,X=[],J=E.samples,B=G?0:8,Q=this.nextAudioPts||-1,ie=a*D;if(this.isAudioContiguous=x=x||J.length&&Q>0&&(O&&Math.abs(ie-Q)<9e3||Math.abs(u(J[0].pts-j,ie)-Q)<20*ne),J.forEach(function(_e){_e.pts=u(_e.pts-j,ie)}),!x||Q<0){if(J=J.filter(function(_e){return _e.pts>=0}),!J.length)return;A===0?Q=0:O?Q=Math.max(0,ie):Q=J[0].pts}if(E.isAAC)for(var oe=A!==void 0,xe=this.config.maxAudioFramesDrift,ye=0,Ae=Q;ye<J.length;ye++){var pe=J[ye],Oe=pe.pts,Fe=Oe-Ae,Me=Math.abs(1e3*Fe/D);if(Fe<=-xe*ne&&oe)ye===0&&(l.logger.warn("Audio frame @ "+(Oe/D).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Fe/D)+" ms."),this.nextAudioPts=Q=Ae=Oe);else if(Fe>=xe*ne&&Me<o&&oe){var Ce=Math.round(Fe/ne);Ae=Oe-Ce*ne,Ae<0&&(Ce--,Ae+=ne),ye===0&&(this.nextAudioPts=Q=Ae),l.logger.warn("[mp4-remuxer]: Injecting "+Ce+" audio frame @ "+(Ae/D).toFixed(3)+"s due to "+Math.round(1e3*Fe/D)+" ms gap.");for(var Le=0;Le<Ce;Le++){var de=Math.max(Ae,0),ue=P.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);ue||(l.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ue=pe.unit.subarray()),J.splice(ye,0,{unit:ue,pts:de}),Ae+=ne,ye++}}pe.pts=Ae,Ae+=ne}for(var ke=null,Ue=null,Ye,ee=0,M=J.length;M--;)ee+=J[M].unit.byteLength;for(var N=0,$=J.length;N<$;N++){var V=J[N],Y=V.unit,me=V.pts;if(Ue!==null){var Re=X[N-1];Re.duration=Math.round((me-Ue)/F)}else if(x&&E.isAAC&&(me=Q),ke=me,ee>0){ee+=B;try{Ye=new Uint8Array(ee)}catch(_e){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:T.ErrorTypes.MUX_ERROR,details:T.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ee,reason:"fail allocating audio mdat "+ee});return}if(!G){var rt=new DataView(Ye.buffer);rt.setUint32(0,ee),Ye.set(S.default.types.mdat,4)}}else return;Ye.set(Y,B);var Pe=Y.byteLength;B+=Pe,X.push(new g(!0,K,Pe,0)),Ue=me}var Ie=X.length;if(!Ie)return;var Xe=X[X.length-1];this.nextAudioPts=Q=Ue+F*Xe.duration;var tt=G?new Uint8Array(0):S.default.moof(E.sequenceNumber++,ke/F,d({},E,{samples:X}));E.samples=[];var Ve=ke/D,Ke=Q/D,Ne="audio",De={data1:tt,data2:Ye,startPTS:Ve,endPTS:Ke,startDTS:Ve,endDTS:Ke,type:Ne,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert(Ye.length,"MDAT length must not be zero"),De},v.remuxEmptyAudio=function(E,a,x,O){var A=E.inputTimeScale,D=E.samplerate?E.samplerate:A,I=A/D,F=this.nextAudioPts,K=(F!==null?F:O.startDTS*A)+this._initDTS,ne=O.endDTS*A+this._initDTS,j=I*c,G=Math.ceil((ne-K)/j),X=P.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),!X){l.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var J=[],B=0;B<G;B++){var Q=K+B*j;J.push({unit:X,pts:Q,dts:Q})}return E.samples=J,this.remuxAudio(E,a,x,!1)},v.remuxID3=function(E,a){var x=E.samples.length;if(!x)return;for(var O=E.inputTimeScale,A=this._initPTS,D=this._initDTS,I=0;I<x;I++){var F=E.samples[I];F.pts=u(F.pts-A,a*O)/O,F.dts=u(F.dts-D,a*O)/O}var K=E.samples;return E.samples=[],{samples:K}},v.remuxText=function(E,a){var x=E.samples.length;if(!x)return;for(var O=E.inputTimeScale,A=this._initPTS,D=0;D<x;D++){var I=E.samples[D];I.pts=u(I.pts-A,a*O)/O}E.samples.sort(function(K,ne){return K.pts-ne.pts});var F=E.samples;return E.samples=[],{samples:F}},b}();function u(b,v){var m;if(v===null)return b;for(v<b?m=-8589934592:m=8589934592;Math.abs(b-v)>4294967296;)b+=m;return b}function y(b){for(var v=0;v<b.length;v++)if(b[v].key)return v;return-1}var g=function(v,m,E,a){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=m,this.size=E,this.cts=a,this.flags=new _(v)},_=function(v){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=v?2:1,this.isNonSync=v?0:1}},"./src/remux/passthrough-remuxer.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/polyfills/number.ts"),P=U("./src/utils/mp4-tools.ts"),S=U("./src/loader/fragment.ts"),C=U("./src/utils/logger.ts"),T=function(){function h(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var d=h.prototype;return d.destroy=function(){},d.resetTimeStamp=function(c){this.initPTS=c,this.lastEndDTS=null},d.resetNextTimestamp=function(){this.lastEndDTS=null},d.resetInitSegment=function(c,s,f){this.audioCodec=s,this.videoCodec=f,this.generateInitSegment(c),this.emitInitSegment=!0},d.generateInitSegment=function(c){var s=this.audioCodec,f=this.videoCodec;if(!c||!c.byteLength){this.initTracks=void 0,this.initData=void 0;return}var i=this.initData=Object(P.parseInitSegment)(c);s||(s=p(i.audio,S.ElementaryStreamTypes.AUDIO)),f||(f=p(i.video,S.ElementaryStreamTypes.VIDEO));var n={};i.audio&&i.video?n.audiovideo={container:"video/mp4",codec:s+","+f,initSegment:c,id:"main"}:i.audio?n.audio={container:"audio/mp4",codec:s,initSegment:c,id:"audio"}:i.video?n.video={container:"video/mp4",codec:f,initSegment:c,id:"main"}:C.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},d.remux=function(c,s,f,i,n){var t=this.initPTS,u=this.lastEndDTS,y={audio:void 0,video:void 0,text:i,id3:f,initSegment:void 0};Object(w.isFiniteNumber)(u)||(u=this.lastEndDTS=n||0);var g=s.samples;if(!g||!g.length)return y;var _={initPTS:void 0,timescale:1},b=this.initData;if((!b||!b.length)&&(this.generateInitSegment(g),b=this.initData),!b||!b.length)return C.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),y;this.emitInitSegment&&(_.tracks=this.initTracks,this.emitInitSegment=!1),Object(w.isFiniteNumber)(t)||(this.initPTS=_.initPTS=t=l(b,g,u));var v=Object(P.getDuration)(g,b),m=u,E=v+m;Object(P.offsetStartDTS)(b,g,t),v>0?this.lastEndDTS=E:(C.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var a=!!b.audio,x=!!b.video,O="";a&&(O+="audio"),x&&(O+="video");var A={data1:g,startPTS:m,startDTS:m,endPTS:E,endDTS:E,type:O,hasAudio:a,hasVideo:x,nb:1,dropped:0};return y.audio=A.type==="audio"?A:void 0,y.video=A.type!=="audio"?A:void 0,y.text=i,y.id3=f,y.initSegment=_,y},h}(),l=function(d,o,c){return Object(P.getStartDTS)(d,o)-c};function p(h,d){var o=h==null?void 0:h.codec;return o&&o.length>4?o:o==="hvc1"?"hvc1.1.c.L120.90":o==="av01"?"av01.0.04M.08":o==="avc1"||d===S.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}Z.default=T},"./src/task-loop.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return w});var w=function(){function P(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var S=P.prototype;return S.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},S.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},S.onHandlerDestroyed=function(){},S.hasInterval=function(){return!!this._tickInterval},S.hasNextTick=function(){return!!this._tickTimer},S.setInterval=function(T){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,T),!0)},S.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},S.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},S.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},S.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},S.doTick=function(){},P}()},"./src/types/cmcd.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"CMCDVersion",function(){return w}),U.d(Z,"CMCDObjectType",function(){return P}),U.d(Z,"CMCDStreamingFormat",function(){return S}),U.d(Z,"CMCDStreamType",function(){return C});var w=1,P;(function(T){T.MANIFEST="m",T.AUDIO="a",T.VIDEO="v",T.MUXED="av",T.INIT="i",T.CAPTION="c",T.TIMED_TEXT="tt",T.KEY="k",T.OTHER="o"})(P||(P={}));var S;(function(T){T.DASH="d",T.HLS="h",T.SMOOTH="s",T.OTHER="o"})(S||(S={}));var C;(function(T){T.VOD="v",T.LIVE="l"})(C||(C={}))},"./src/types/level.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"HlsSkip",function(){return S}),U.d(Z,"getSkipValue",function(){return C}),U.d(Z,"HlsUrlParameters",function(){return T}),U.d(Z,"Level",function(){return l});function w(p,h){for(var d=0;d<h.length;d++){var o=h[d];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(p,o.key,o)}}function P(p,h,d){return h&&w(p.prototype,h),d&&w(p,d),p}var S;(function(p){p.No="",p.Yes="YES",p.v2="v2"})(S||(S={}));function C(p,h){var d=p.canSkipUntil,o=p.canSkipDateRanges,c=p.endSN,s=h!==void 0?h-c:0;return d&&s<d?o?S.v2:S.Yes:S.No}var T=function(){function p(d,o,c){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=d,this.part=o,this.skip=c}var h=p.prototype;return h.addDirectives=function(o){var c=new self.URL(o);return this.msn!==void 0&&c.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&c.searchParams.set("_HLS_part",this.part.toString()),this.skip&&c.searchParams.set("_HLS_skip",this.skip),c.toString()},p}(),l=function(){function p(h){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[h.url],this.attrs=h.attrs,this.bitrate=h.bitrate,h.details&&(this.details=h.details),this.id=h.id||0,this.name=h.name,this.width=h.width||0,this.height=h.height||0,this.audioCodec=h.audioCodec,this.videoCodec=h.videoCodec,this.unknownCodecs=h.unknownCodecs,this.codecSet=[h.videoCodec,h.audioCodec].filter(function(d){return d}).join(",").replace(/\.[^.,]+/g,"")}return P(p,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(d){var o=d%this.url.length;this._urlId!==o&&(this.details=void 0,this._urlId=o)}}]),p}()},"./src/types/loader.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"PlaylistContextType",function(){return w}),U.d(Z,"PlaylistLevelType",function(){return P});var w;(function(S){S.MANIFEST="manifest",S.LEVEL="level",S.AUDIO_TRACK="audioTrack",S.SUBTITLE_TRACK="subtitleTrack"})(w||(w={}));var P;(function(S){S.MAIN="main",S.AUDIO="audio",S.SUBTITLE="subtitle"})(P||(P={}))},"./src/types/transmuxer.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"ChunkMetadata",function(){return w});var w=function(C,T,l,p,h,d){p===void 0&&(p=0),h===void 0&&(h=-1),d===void 0&&(d=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=P(),this.buffering={audio:P(),video:P(),audiovideo:P()},this.level=C,this.sn=T,this.id=l,this.size=p,this.part=h,this.partial=d};function P(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"AttrList",function(){return S});var w=/^(\d+)x(\d+)$/,P=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,S=function(){function C(l){typeof l=="string"&&(l=C.parseAttrList(l));for(var p in l)l.hasOwnProperty(p)&&(this[p]=l[p])}var T=C.prototype;return T.decimalInteger=function(p){var h=parseInt(this[p],10);return h>Number.MAX_SAFE_INTEGER?Infinity:h},T.hexadecimalInteger=function(p){if(this[p]){var h=(this[p]||"0x").slice(2);h=(h.length&1?"0":"")+h;for(var d=new Uint8Array(h.length/2),o=0;o<h.length/2;o++)d[o]=parseInt(h.slice(o*2,o*2+2),16);return d}else return null},T.hexadecimalIntegerAsNumber=function(p){var h=parseInt(this[p],16);return h>Number.MAX_SAFE_INTEGER?Infinity:h},T.decimalFloatingPoint=function(p){return parseFloat(this[p])},T.optionalFloat=function(p,h){var d=this[p];return d?parseFloat(d):h},T.enumeratedString=function(p){return this[p]},T.bool=function(p){return this[p]==="YES"},T.decimalResolution=function(p){var h=w.exec(this[p]);return h===null?void 0:{width:parseInt(h[1],10),height:parseInt(h[2],10)}},C.parseAttrList=function(p){var h,d={},o='"';for(P.lastIndex=0;(h=P.exec(p))!==null;){var c=h[2];c.indexOf(o)===0&&c.lastIndexOf(o)===c.length-1&&(c=c.slice(1,-1)),d[h[1]]=c}return d},C}()},"./src/utils/binary-search.ts":function(ae,Z,U){"use strict";U.r(Z);var w={search:function(S,C){for(var T=0,l=S.length-1,p=null,h=null;T<=l;){p=(T+l)/2|0,h=S[p];var d=C(h);if(d>0)T=p+1;else if(d<0)l=p-1;else return h}return null}};Z.default=w},"./src/utils/buffer-helper.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"BufferHelper",function(){return S});var w=U("./src/utils/logger.ts"),P={length:0,start:function(){return 0},end:function(){return 0}},S=function(){function C(){}return C.isBuffered=function(l,p){try{if(l){for(var h=C.getBuffered(l),d=0;d<h.length;d++)if(p>=h.start(d)&&p<=h.end(d))return!0}}catch(o){}return!1},C.bufferInfo=function(l,p,h){try{if(l){var d=C.getBuffered(l),o=[],c;for(c=0;c<d.length;c++)o.push({start:d.start(c),end:d.end(c)});return this.bufferedInfo(o,p,h)}}catch(s){}return{len:0,start:p,end:p,nextStart:void 0}},C.bufferedInfo=function(l,p,h){p=Math.max(0,p),l.sort(function(_,b){var v=_.start-b.start;return v||b.end-_.end});var d=[];if(h)for(var o=0;o<l.length;o++){var c=d.length;if(c){var s=d[c-1].end;l[o].start-s<h?l[o].end>s&&(d[c-1].end=l[o].end):d.push(l[o])}else d.push(l[o])}else d=l;for(var f=0,i,n=p,t=p,u=0;u<d.length;u++){var y=d[u].start,g=d[u].end;if(p+h>=y&&p<g)n=y,t=g,f=t-p;else if(p+h<y){i=y;break}}return{len:f,start:n||0,end:t||0,nextStart:i}},C.getBuffered=function(l){try{return l.buffered}catch(p){return w.logger.log("failed to get media.buffered",p),P}},C}()},"./src/utils/cea-608-parser.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"Row",function(){return t}),U.d(Z,"CaptionScreen",function(){return u});var w=U("./src/utils/logger.ts"),P={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},S=function(E){var a=E;return P.hasOwnProperty(E)&&(a=P[E]),String.fromCharCode(a)},C=15,T=100,l={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},p={17:2,18:4,21:6,22:8,23:10,19:13,20:15},h={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},d={25:2,26:4,29:6,30:8,31:10,27:13,28:15},o=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c;(function(m){m[m.ERROR=0]="ERROR",m[m.TEXT=1]="TEXT",m[m.WARNING=2]="WARNING",m[m.INFO=2]="INFO",m[m.DEBUG=3]="DEBUG",m[m.DATA=3]="DATA"})(c||(c={}));var s=function(){function m(){this.time=null,this.verboseLevel=c.ERROR}var E=m.prototype;return E.log=function(x,O){this.verboseLevel>=x&&w.logger.log(this.time+" ["+x+"] "+O)},m}(),f=function(E){for(var a=[],x=0;x<E.length;x++)a.push(E[x].toString(16));return a},i=function(){function m(a,x,O,A,D){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=a||"white",this.underline=x||!1,this.italics=O||!1,this.background=A||"black",this.flash=D||!1}var E=m.prototype;return E.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},E.setStyles=function(x){for(var O=["foreground","underline","italics","background","flash"],A=0;A<O.length;A++){var D=O[A];x.hasOwnProperty(D)&&(this[D]=x[D])}},E.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},E.equals=function(x){return this.foreground===x.foreground&&this.underline===x.underline&&this.italics===x.italics&&this.background===x.background&&this.flash===x.flash},E.copy=function(x){this.foreground=x.foreground,this.underline=x.underline,this.italics=x.italics,this.background=x.background,this.flash=x.flash},E.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},m}(),n=function(){function m(a,x,O,A,D,I){this.uchar=void 0,this.penState=void 0,this.uchar=a||" ",this.penState=new i(x,O,A,D,I)}var E=m.prototype;return E.reset=function(){this.uchar=" ",this.penState.reset()},E.setChar=function(x,O){this.uchar=x,this.penState.copy(O)},E.setPenState=function(x){this.penState.copy(x)},E.equals=function(x){return this.uchar===x.uchar&&this.penState.equals(x.penState)},E.copy=function(x){this.uchar=x.uchar,this.penState.copy(x.penState)},E.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},m}(),t=function(){function m(a){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var x=0;x<T;x++)this.chars.push(new n);this.logger=a,this.pos=0,this.currPenState=new i}var E=m.prototype;return E.equals=function(x){for(var O=!0,A=0;A<T;A++)if(!this.chars[A].equals(x.chars[A])){O=!1;break}return O},E.copy=function(x){for(var O=0;O<T;O++)this.chars[O].copy(x.chars[O])},E.isEmpty=function(){for(var x=!0,O=0;O<T;O++)if(!this.chars[O].isEmpty()){x=!1;break}return x},E.setCursor=function(x){this.pos!==x&&(this.pos=x),this.pos<0?(this.logger.log(c.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>T&&(this.logger.log(c.DEBUG,"Too large cursor position "+this.pos),this.pos=T)},E.moveCursor=function(x){var O=this.pos+x;if(x>1)for(var A=this.pos+1;A<O+1;A++)this.chars[A].setPenState(this.currPenState);this.setCursor(O)},E.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},E.insertChar=function(x){x>=144&&this.backSpace();var O=S(x);if(this.pos>=T){this.logger.log(c.ERROR,"Cannot insert "+x.toString(16)+" ("+O+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(O,this.currPenState),this.moveCursor(1)},E.clearFromPos=function(x){var O;for(O=x;O<T;O++)this.chars[O].reset()},E.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},E.clearToEndOfRow=function(){this.clearFromPos(this.pos)},E.getTextString=function(){for(var x=[],O=!0,A=0;A<T;A++){var D=this.chars[A].uchar;D!==" "&&(O=!1),x.push(D)}return O?"":x.join("")},E.setPenStyles=function(x){this.currPenState.setStyles(x);var O=this.chars[this.pos];O.setPenState(this.currPenState)},m}(),u=function(){function m(a){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var x=0;x<C;x++)this.rows.push(new t(a));this.logger=a,this.currRow=C-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var E=m.prototype;return E.reset=function(){for(var x=0;x<C;x++)this.rows[x].clear();this.currRow=C-1},E.equals=function(x){for(var O=!0,A=0;A<C;A++)if(!this.rows[A].equals(x.rows[A])){O=!1;break}return O},E.copy=function(x){for(var O=0;O<C;O++)this.rows[O].copy(x.rows[O])},E.isEmpty=function(){for(var x=!0,O=0;O<C;O++)if(!this.rows[O].isEmpty()){x=!1;break}return x},E.backSpace=function(){var x=this.rows[this.currRow];x.backSpace()},E.clearToEndOfRow=function(){var x=this.rows[this.currRow];x.clearToEndOfRow()},E.insertChar=function(x){var O=this.rows[this.currRow];O.insertChar(x)},E.setPen=function(x){var O=this.rows[this.currRow];O.setPenStyles(x)},E.moveCursor=function(x){var O=this.rows[this.currRow];O.moveCursor(x)},E.setCursor=function(x){this.logger.log(c.INFO,"setCursor: "+x);var O=this.rows[this.currRow];O.setCursor(x)},E.setPAC=function(x){this.logger.log(c.INFO,"pacData = "+JSON.stringify(x));var O=x.row-1;if(this.nrRollUpRows&&O<this.nrRollUpRows-1&&(O=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==O){for(var A=0;A<C;A++)this.rows[A].clear();var D=this.currRow+1-this.nrRollUpRows,I=this.lastOutputScreen;if(I){var F=I.rows[D].cueStartTime,K=this.logger.time;if(F&&K!==null&&F<K)for(var ne=0;ne<this.nrRollUpRows;ne++)this.rows[O-this.nrRollUpRows+ne+1].copy(I.rows[D+ne])}}this.currRow=O;var j=this.rows[this.currRow];if(x.indent!==null){var G=x.indent,X=Math.max(G-1,0);j.setCursor(x.indent),x.color=j.chars[X].penState.foreground}var J={foreground:x.color,underline:x.underline,italics:x.italics,background:"black",flash:!1};this.setPen(J)},E.setBkgData=function(x){this.logger.log(c.INFO,"bkgData = "+JSON.stringify(x)),this.backSpace(),this.setPen(x),this.insertChar(32)},E.setRollUpRows=function(x){this.nrRollUpRows=x},E.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(c.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(c.TEXT,this.getDisplayText());var x=this.currRow+1-this.nrRollUpRows,O=this.rows.splice(x,1)[0];O.clear(),this.rows.splice(this.currRow,0,O),this.logger.log(c.INFO,"Rolling up")},E.getDisplayText=function(x){x=x||!1;for(var O=[],A="",D=-1,I=0;I<C;I++){var F=this.rows[I].getTextString();F&&(D=I+1,x?O.push("Row "+D+": '"+F+"'"):O.push(F.trim()))}return O.length>0&&(x?A="["+O.join(" | ")+"]":A=O.join(`
`)),A},E.getTextAndFormat=function(){return this.rows},m}(),y=function(){function m(a,x,O){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=a,this.outputFilter=x,this.mode=null,this.verbose=0,this.displayedMemory=new u(O),this.nonDisplayedMemory=new u(O),this.lastOutputScreen=new u(O),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=O}var E=m.prototype;return E.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},E.getHandler=function(){return this.outputFilter},E.setHandler=function(x){this.outputFilter=x},E.setPAC=function(x){this.writeScreen.setPAC(x)},E.setBkgData=function(x){this.writeScreen.setBkgData(x)},E.setMode=function(x){if(x===this.mode)return;this.mode=x,this.logger.log(c.INFO,"MODE="+x),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=x},E.insertChars=function(x){for(var O=0;O<x.length;O++)this.writeScreen.insertChar(x[O]);var A=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(c.INFO,A+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(c.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},E.ccRCL=function(){this.logger.log(c.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},E.ccBS=function(){if(this.logger.log(c.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},E.ccAOF=function(){},E.ccAON=function(){},E.ccDER=function(){this.logger.log(c.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},E.ccRU=function(x){this.logger.log(c.INFO,"RU("+x+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(x)},E.ccFON=function(){this.logger.log(c.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},E.ccRDC=function(){this.logger.log(c.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},E.ccTR=function(){this.logger.log(c.INFO,"TR"),this.setMode("MODE_TEXT")},E.ccRTD=function(){this.logger.log(c.INFO,"RTD"),this.setMode("MODE_TEXT")},E.ccEDM=function(){this.logger.log(c.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},E.ccCR=function(){this.logger.log(c.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},E.ccENM=function(){this.logger.log(c.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},E.ccEOC=function(){if(this.logger.log(c.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var x=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=x,this.writeScreen=this.nonDisplayedMemory,this.logger.log(c.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},E.ccTO=function(x){this.logger.log(c.INFO,"TO("+x+") - Tab Offset"),this.writeScreen.moveCursor(x)},E.ccMIDROW=function(x){var O={flash:!1};if(O.underline=x%2===1,O.italics=x>=46,O.italics)O.foreground="white";else{var A=Math.floor(x/2)-16,D=["white","green","blue","cyan","red","yellow","magenta"];O.foreground=D[A]}this.logger.log(c.INFO,"MIDROW: "+JSON.stringify(O)),this.writeScreen.setPen(O)},E.outputDataUpdate=function(x){x===void 0&&(x=!1);var O=this.logger.time;if(O===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=O:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,O,this.lastOutputScreen),x&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:O),this.lastOutputScreen.copy(this.displayedMemory))},E.cueSplitAtTime=function(x){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,x,this.displayedMemory),this.cueStartTime=x))},m}(),g=function(){function m(a,x,O){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var A=new s;this.channels=[null,new y(a,x,A),new y(a+1,O,A)],this.cmdHistory=v(),this.logger=A}var E=m.prototype;return E.getHandler=function(x){return this.channels[x].getHandler()},E.setHandler=function(x,O){this.channels[x].setHandler(O)},E.addData=function(x,O){var A,D,I,F=!1;this.logger.time=x;for(var K=0;K<O.length;K+=2){if(D=O[K]&127,I=O[K+1]&127,D===0&&I===0)continue;if(this.logger.log(c.DATA,"["+f([O[K],O[K+1]])+"] -> ("+f([D,I])+")"),A=this.parseCmd(D,I),A||(A=this.parseMidrow(D,I)),A||(A=this.parsePAC(D,I)),A||(A=this.parseBackgroundAttributes(D,I)),!A&&(F=this.parseChars(D,I),F)){var ne=this.currentChannel;if(ne&&ne>0){var j=this.channels[ne];j.insertChars(F)}else this.logger.log(c.WARNING,"No channel found yet. TEXT-MODE?")}!A&&!F&&this.logger.log(c.WARNING,"Couldn't parse cleaned data "+f([D,I])+" orig: "+f([O[K],O[K+1]]))}},E.parseCmd=function(x,O){var A=this.cmdHistory,D=(x===20||x===28||x===21||x===29)&&O>=32&&O<=47,I=(x===23||x===31)&&O>=33&&O<=35;if(!(D||I))return!1;if(b(x,O,A))return _(null,null,A),this.logger.log(c.DEBUG,"Repeated command ("+f([x,O])+") is dropped"),!0;var F=x===20||x===21||x===23?1:2,K=this.channels[F];return x===20||x===21||x===28||x===29?O===32?K.ccRCL():O===33?K.ccBS():O===34?K.ccAOF():O===35?K.ccAON():O===36?K.ccDER():O===37?K.ccRU(2):O===38?K.ccRU(3):O===39?K.ccRU(4):O===40?K.ccFON():O===41?K.ccRDC():O===42?K.ccTR():O===43?K.ccRTD():O===44?K.ccEDM():O===45?K.ccCR():O===46?K.ccENM():O===47&&K.ccEOC():K.ccTO(O-32),_(x,O,A),this.currentChannel=F,!0},E.parseMidrow=function(x,O){var A=0;if((x===17||x===25)&&O>=32&&O<=47){if(x===17?A=1:A=2,A!==this.currentChannel)return this.logger.log(c.ERROR,"Mismatch channel in midrow parsing"),!1;var D=this.channels[A];return D?(D.ccMIDROW(O),this.logger.log(c.DEBUG,"MIDROW ("+f([x,O])+")"),!0):!1}return!1},E.parsePAC=function(x,O){var A,D=this.cmdHistory,I=(x>=17&&x<=23||x>=25&&x<=31)&&O>=64&&O<=127,F=(x===16||x===24)&&O>=64&&O<=95;if(!(I||F))return!1;if(b(x,O,D))return _(null,null,D),!0;var K=x<=23?1:2;O>=64&&O<=95?A=K===1?l[x]:h[x]:A=K===1?p[x]:d[x];var ne=this.channels[K];return ne?(ne.setPAC(this.interpretPAC(A,O)),_(x,O,D),this.currentChannel=K,!0):!1},E.interpretPAC=function(x,O){var A,D={color:null,italics:!1,indent:null,underline:!1,row:x};return O>95?A=O-96:A=O-64,D.underline=(A&1)===1,A<=13?D.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(A/2)]:A<=15?(D.italics=!0,D.color="white"):D.indent=Math.floor((A-16)/2)*4,D},E.parseChars=function(x,O){var A,D=null,I=null;if(x>=25?(A=2,I=x-8):(A=1,I=x),I>=17&&I<=19){var F;I===17?F=O+80:I===18?F=O+112:F=O+144,this.logger.log(c.INFO,"Special char '"+S(F)+"' in channel "+A),D=[F]}else x>=32&&x<=127&&(D=O===0?[x]:[x,O]);if(D){var K=f(D);this.logger.log(c.DEBUG,"Char codes = "+K.join(",")),_(x,O,this.cmdHistory)}return D},E.parseBackgroundAttributes=function(x,O){var A=(x===16||x===24)&&O>=32&&O<=47,D=(x===23||x===31)&&O>=45&&O<=47;if(!(A||D))return!1;var I,F={};x===16||x===24?(I=Math.floor((O-32)/2),F.background=o[I],O%2===1&&(F.background=F.background+"_semi")):O===45?F.background="transparent":(F.foreground="black",O===47&&(F.underline=!0));var K=x<=23?1:2,ne=this.channels[K];return ne.setBkgData(F),_(x,O,this.cmdHistory),!0},E.reset=function(){for(var x=0;x<Object.keys(this.channels).length;x++){var O=this.channels[x];O&&O.reset()}this.cmdHistory=v()},E.cueSplitAtTime=function(x){for(var O=0;O<this.channels.length;O++){var A=this.channels[O];A&&A.cueSplitAtTime(x)}},m}();function _(m,E,a){a.a=m,a.b=E}function b(m,E,a){return a.a===m&&a.b===E}function v(){return{a:null,b:null}}Z.default=g},"./src/utils/codecs.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"isCodecType",function(){return P}),U.d(Z,"isCodecSupportedInMp4",function(){return S});var w={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function P(C,T){var l=w[T];return!!l&&l[C.slice(0,4)]===!0}function S(C,T){return MediaSource.isTypeSupported((T||"video")+'/mp4;codecs="'+C+'"')}},"./src/utils/cues.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/utils/vttparser.ts"),P=U("./src/utils/webvtt-parser.ts"),S=U("./src/utils/texttrack-utils.ts"),C=/\s/,T={newCue:function(p,h,d,o){for(var c=[],s,f,i,n,t,u=self.VTTCue||self.TextTrackCue,y=0;y<o.rows.length;y++)if(s=o.rows[y],i=!0,n=0,t="",!s.isEmpty()){for(var g=0;g<s.chars.length;g++)C.test(s.chars[g].uchar)&&i?n++:(t+=s.chars[g].uchar,i=!1);s.cueStartTime=h,h===d&&(d+=1e-4),n>=16?n--:n++;var _=Object(w.fixLineBreaks)(t.trim()),b=Object(P.generateCueId)(h,d,_);(!p||!p.cues||!p.cues.getCueById(b))&&(f=new u(h,d,_),f.id=b,f.line=y+1,f.align="left",f.position=10+Math.min(80,Math.floor(n*8/32)*10),c.push(f))}return p&&c.length&&(c.sort(function(v,m){return v.line==="auto"||m.line==="auto"?0:v.line>8&&m.line>8?m.line-v.line:v.line-m.line}),c.forEach(function(v){return Object(S.addCueToTrack)(p,v)})),c}};Z.default=T},"./src/utils/discontinuities.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"findFirstFragWithCC",function(){return C}),U.d(Z,"shouldAlignOnDiscontinuities",function(){return T}),U.d(Z,"findDiscontinuousReferenceFrag",function(){return l}),U.d(Z,"adjustSlidingStart",function(){return h}),U.d(Z,"alignStream",function(){return d}),U.d(Z,"alignPDT",function(){return c}),U.d(Z,"alignFragmentByPDTDelta",function(){return s}),U.d(Z,"alignMediaPlaylistByPDT",function(){return f});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/logger.ts"),S=U("./src/controller/level-helper.ts");function C(i,n){for(var t=null,u=0,y=i.length;u<y;u++){var g=i[u];if(g&&g.cc===n){t=g;break}}return t}function T(i,n,t){return!!(n.details&&(t.endCC>t.startCC||i&&i.cc<t.startCC))}function l(i,n){var t=i.fragments,u=n.fragments;if(!u.length||!t.length){P.logger.log("No fragments to align");return}var y=C(t,u[0].cc);if(!y||y&&!y.startPTS){P.logger.log("No frag in previous level to align on");return}return y}function p(i,n){if(i){var t=i.start+n;i.start=i.startPTS=t,i.endPTS=t+i.duration}}function h(i,n){for(var t=n.fragments,u=0,y=t.length;u<y;u++)p(t[u],i);n.fragmentHint&&p(n.fragmentHint,i),n.alignedSliding=!0}function d(i,n,t){if(!n)return;o(i,t,n),!t.alignedSliding&&n.details&&c(t,n.details),!t.alignedSliding&&n.details&&!t.skippedSegments&&Object(S.adjustSliding)(n.details,t)}function o(i,n,t){if(T(i,t,n)){var u=l(t.details,n);u&&Object(w.isFiniteNumber)(u.start)&&(P.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),h(u.start,n))}}function c(i,n){if(!n.fragments.length||!i.hasProgramDateTime||!n.hasProgramDateTime)return;var t=n.fragments[0].programDateTime,u=i.fragments[0].programDateTime,y=(u-t)/1e3+n.fragments[0].start;y&&Object(w.isFiniteNumber)(y)&&(P.logger.log("Adjusting PTS using programDateTime delta "+(u-t)+"ms, sliding:"+y.toFixed(3)+" "+i.url+" "),h(y,i))}function s(i,n){var t=i.programDateTime;if(!t)return;var u=(t-n)/1e3;i.start=i.startPTS=u,i.endPTS=u+i.duration}function f(i,n){if(!n.fragments.length||!i.hasProgramDateTime||!n.hasProgramDateTime)return;var t=n.fragments[0].programDateTime,u=n.fragments[0].start,y=t-u*1e3;i.fragments.forEach(function(g){s(g,y)}),i.fragmentHint&&s(i.fragmentHint,y),i.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/utils/ewma.ts"),P=function(){function S(T,l,p){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=p,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new w.default(T),this.fast_=new w.default(l)}var C=S.prototype;return C.update=function(l,p){var h=this.slow_,d=this.fast_;this.slow_.halfLife!==l&&(this.slow_=new w.default(l,h.getEstimate(),h.getTotalWeight())),this.fast_.halfLife!==p&&(this.fast_=new w.default(p,d.getEstimate(),d.getTotalWeight()))},C.sample=function(l,p){l=Math.max(l,this.minDelayMs_);var h=8*p,d=l/1e3,o=h/d;this.fast_.sample(d,o),this.slow_.sample(d,o)},C.canEstimate=function(){var l=this.fast_;return l&&l.getTotalWeight()>=this.minWeight_},C.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},C.destroy=function(){},S}();Z.default=P},"./src/utils/ewma.ts":function(ae,Z,U){"use strict";U.r(Z);var w=function(){function P(C,T,l){T===void 0&&(T=0),l===void 0&&(l=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=C,this.alpha_=C?Math.exp(Math.log(.5)/C):0,this.estimate_=T,this.totalWeight_=l}var S=P.prototype;return S.sample=function(T,l){var p=Math.pow(this.alpha_,T);this.estimate_=l*(1-p)+p*this.estimate_,this.totalWeight_+=T},S.getTotalWeight=function(){return this.totalWeight_},S.getEstimate=function(){if(this.alpha_){var T=1-Math.pow(this.alpha_,this.totalWeight_);if(T)return this.estimate_/T}return this.estimate_},P}();Z.default=w},"./src/utils/fetch-loader.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"fetchSupported",function(){return s});var w=U("./src/polyfills/number.ts"),P=U("./src/loader/load-stats.ts"),S=U("./src/demux/chunk-cache.ts");function C(u,y){u.prototype=Object.create(y.prototype),u.prototype.constructor=u,d(u,y)}function T(u){var y=typeof Map=="function"?new Map:void 0;return T=function(_){if(_===null||!h(_))return _;if(typeof _!="function")throw new TypeError("Super expression must either be null or a function");if(typeof y!="undefined"){if(y.has(_))return y.get(_);y.set(_,b)}function b(){return l(_,arguments,o(this).constructor)}return b.prototype=Object.create(_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),d(b,_)},T(u)}function l(u,y,g){return p()?l=Reflect.construct:l=function(b,v,m){var E=[null];E.push.apply(E,v);var a=Function.bind.apply(b,E),x=new a;return m&&d(x,m.prototype),x},l.apply(null,arguments)}function p(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(u){return!1}}function h(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function d(u,y){return d=Object.setPrototypeOf||function(_,b){return _.__proto__=b,_},d(u,y)}function o(u){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(g){return g.__proto__||Object.getPrototypeOf(g)},o(u)}function c(){return c=Object.assign||function(u){for(var y=1;y<arguments.length;y++){var g=arguments[y];for(var _ in g)Object.prototype.hasOwnProperty.call(g,_)&&(u[_]=g[_])}return u},c.apply(this,arguments)}function s(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(u){}return!1}var f=function(){function u(g){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=g.fetchSetup||n,this.controller=new self.AbortController,this.stats=new P.LoadStats}var y=u.prototype;return y.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},y.abortInternal=function(){var _=this.response;(!_||!_.ok)&&(this.stats.aborted=!0,this.controller.abort())},y.abort=function(){var _;this.abortInternal(),(_=this.callbacks)!==null&&_!==void 0&&_.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},y.load=function(_,b,v){var m=this,E=this.stats;if(E.loading.start)throw new Error("Loader can only be used once.");E.loading.start=self.performance.now();var a=i(_,this.controller.signal),x=v.onProgress,O=_.responseType==="arraybuffer",A=O?"byteLength":"length";this.context=_,this.config=b,this.callbacks=v,this.request=this.fetchSetup(_,a),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){m.abortInternal(),v.onTimeout(E,_,m.response)},b.timeout),self.fetch(this.request).then(function(D){if(m.response=m.loader=D,!D.ok){var I=D.status,F=D.statusText;throw new t(F||"fetch, bad network response",I,D)}return E.loading.first=Math.max(self.performance.now(),E.loading.start),E.total=parseInt(D.headers.get("Content-Length")||"0"),x&&Object(w.isFiniteNumber)(b.highWaterMark)?m.loadProgressively(D,E,_,b.highWaterMark,x):O?D.arrayBuffer():D.text()}).then(function(D){var I=m.response;self.clearTimeout(m.requestTimeout),E.loading.end=Math.max(self.performance.now(),E.loading.first),E.loaded=E.total=D[A];var F={url:I.url,data:D};x&&!Object(w.isFiniteNumber)(b.highWaterMark)&&x(E,_,D,I),v.onSuccess(F,E,_,I)}).catch(function(D){if(self.clearTimeout(m.requestTimeout),E.aborted)return;var I=D.code||0;v.onError({code:I,text:D.message},_,D.details)})},y.getCacheAge=function(){var _=null;if(this.response){var b=this.response.headers.get("age");_=b?parseFloat(b):null}return _},y.loadProgressively=function(_,b,v,m,E){m===void 0&&(m=0);var a=new S.default,x=_.body.getReader(),O=function A(){return x.read().then(function(D){if(D.done)return a.dataLength&&E(b,v,a.flush(),_),Promise.resolve(new ArrayBuffer(0));var I=D.value,F=I.length;return b.loaded+=F,F<m||a.dataLength?(a.push(I),a.dataLength>=m&&E(b,v,a.flush(),_)):E(b,v,I,_),A()}).catch(function(){return Promise.reject()})};return O()},u}();function i(u,y){var g={method:"GET",mode:"cors",credentials:"same-origin",signal:y,headers:new self.Headers(c({},u.headers))};return u.rangeEnd&&g.headers.set("Range","bytes="+u.rangeStart+"-"+String(u.rangeEnd-1)),g}function n(u,y){return new self.Request(u.url,y)}var t=function(u){C(y,u);function y(g,_,b){var v;return v=u.call(this,g)||this,v.code=void 0,v.details=void 0,v.code=_,v.details=b,v}return y}(T(Error));Z.default=f},"./src/utils/imsc1-ttml-parser.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"IMSC1_CODEC",function(){return h}),U.d(Z,"parseIMSC1",function(){return s});var w=U("./src/utils/mp4-tools.ts"),P=U("./src/utils/vttparser.ts"),S=U("./src/utils/vttcue.ts"),C=U("./src/demux/id3.ts"),T=U("./src/utils/timescale-conversion.ts"),l=U("./src/utils/webvtt-parser.ts");function p(){return p=Object.assign||function(m){for(var E=1;E<arguments.length;E++){var a=arguments[E];for(var x in a)Object.prototype.hasOwnProperty.call(a,x)&&(m[x]=a[x])}return m},p.apply(this,arguments)}var h="stpp.ttml.im1t",d=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,o=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,c={left:"start",center:"center",right:"end",start:"start",end:"end"};function s(m,E,a,x,O){var A=Object(w.findBox)(new Uint8Array(m),["mdat"]);if(A.length===0){O(new Error("Could not parse IMSC1 mdat"));return}var D=A[0],I=Object(C.utf8ArrayToStr)(new Uint8Array(m,D.start,D.end-D.start)),F=Object(T.toTimescaleFromScale)(E,1,a);try{x(f(I,F))}catch(K){O(K)}}function f(m,E){var a=new DOMParser,x=a.parseFromString(m,"text/xml"),O=x.getElementsByTagName("tt")[0];if(!O)throw new Error("Invalid ttml");var A={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},D=Object.keys(A).reduce(function(j,G){return j[G]=O.getAttribute("ttp:"+G)||A[G],j},{}),I=O.getAttribute("xml:space")!=="preserve",F=n(i(O,"styling","style")),K=n(i(O,"layout","region")),ne=i(O,"body","[begin]");return[].map.call(ne,function(j){var G=t(j,I);if(!G||!j.hasAttribute("begin"))return null;var X=_(j.getAttribute("begin"),D),J=_(j.getAttribute("dur"),D),B=_(j.getAttribute("end"),D);if(X===null)throw g(j);if(B===null){if(J===null)throw g(j);B=X+J}var Q=new S.default(X-E,B-E,G);Q.id=Object(l.generateCueId)(Q.startTime,Q.endTime,Q.text);var ie=K[j.getAttribute("region")],oe=F[j.getAttribute("style")];Q.position=10,Q.size=80;var xe=u(ie,oe),ye=xe.textAlign;if(ye){var Ae=c[ye];Ae&&(Q.lineAlign=Ae),Q.align=ye}return p(Q,xe),Q}).filter(function(j){return j!==null})}function i(m,E,a){var x=m.getElementsByTagName(E)[0];return x?[].slice.call(x.querySelectorAll(a)):[]}function n(m){return m.reduce(function(E,a){var x=a.getAttribute("xml:id");return x&&(E[x]=a),E},{})}function t(m,E){return[].slice.call(m.childNodes).reduce(function(a,x,O){var A;return x.nodeName==="br"&&O?a+`
`:(A=x.childNodes)!==null&&A!==void 0&&A.length?t(x,E):E?a+x.textContent.trim().replace(/\s+/g," "):a+x.textContent},"")}function u(m,E){var a="http://www.w3.org/ns/ttml#styling",x=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return x.reduce(function(O,A){var D=y(E,a,A)||y(m,a,A);return D&&(O[A]=D),O},{})}function y(m,E,a){return m.hasAttributeNS(E,a)?m.getAttributeNS(E,a):null}function g(m){return new Error("Could not parse ttml timestamp "+m)}function _(m,E){if(!m)return null;var a=Object(P.parseTimeStamp)(m);return a===null&&(d.test(m)?a=b(m,E):o.test(m)&&(a=v(m,E))),a}function b(m,E){var a=d.exec(m),x=(a[4]|0)+(a[5]|0)/E.subFrameRate;return(a[1]|0)*3600+(a[2]|0)*60+(a[3]|0)+x/E.frameRate}function v(m,E){var a=o.exec(m),x=Number(a[1]),O=a[2];switch(O){case"h":return x*3600;case"m":return x*60;case"ms":return x*1e3;case"f":return x/E.frameRate;case"t":return x/E.tickRate}return x}},"./src/utils/logger.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"enableLogs",function(){return l}),U.d(Z,"logger",function(){return p});var w=function(){},P={trace:w,debug:w,log:w,warn:w,info:w,error:w},S=P;function C(h){var d=self.console[h];return d?d.bind(self.console,"["+h+"] >"):w}function T(h){for(var d=arguments.length,o=new Array(d>1?d-1:0),c=1;c<d;c++)o[c-1]=arguments[c];o.forEach(function(s){S[s]=h[s]?h[s].bind(h):C(s)})}function l(h){if(self.console&&h===!0||typeof h=="object"){T(h,"debug","log","info","warn","error");try{S.log()}catch(d){S=P}}else S=P}var p=S},"./src/utils/mediakeys-helper.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"KeySystems",function(){return w}),U.d(Z,"requestMediaKeySystemAccess",function(){return P});var w;(function(S){S.WIDEVINE="com.widevine.alpha",S.PLAYREADY="com.microsoft.playready"})(w||(w={}));var P=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"getMediaSource",function(){return w});function w(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"bin2str",function(){return T}),U.d(Z,"readUint16",function(){return l}),U.d(Z,"readUint32",function(){return p}),U.d(Z,"writeUint32",function(){return h}),U.d(Z,"findBox",function(){return d}),U.d(Z,"parseSegmentIndex",function(){return o}),U.d(Z,"parseInitSegment",function(){return c}),U.d(Z,"getStartDTS",function(){return s}),U.d(Z,"getDuration",function(){return f}),U.d(Z,"computeRawDurationFromSamples",function(){return i}),U.d(Z,"offsetStartDTS",function(){return n}),U.d(Z,"segmentValidRange",function(){return t}),U.d(Z,"appendUint8Array",function(){return u});var w=U("./src/utils/typed-array.ts"),P=U("./src/loader/fragment.ts"),S=Math.pow(2,32)-1,C=[].push;function T(y){return String.fromCharCode.apply(null,y)}function l(y,g){"data"in y&&(g+=y.start,y=y.data);var _=y[g]<<8|y[g+1];return _<0?65536+_:_}function p(y,g){"data"in y&&(g+=y.start,y=y.data);var _=y[g]<<24|y[g+1]<<16|y[g+2]<<8|y[g+3];return _<0?4294967296+_:_}function h(y,g,_){"data"in y&&(g+=y.start,y=y.data),y[g]=_>>24,y[g+1]=_>>16&255,y[g+2]=_>>8&255,y[g+3]=_&255}function d(y,g){var _=[];if(!g.length)return _;var b,v,m;"data"in y?(b=y.data,v=y.start,m=y.end):(b=y,v=0,m=b.byteLength);for(var E=v;E<m;){var a=p(b,E),x=T(b.subarray(E+4,E+8)),O=a>1?E+a:m;if(x===g[0])if(g.length===1)_.push({data:b,start:E+8,end:O});else{var A=d({data:b,start:E+8,end:O},g.slice(1));A.length&&C.apply(_,A)}E=O}return _}function o(y){var g=d(y,["moov"]),_=g[0],b=_?_.end:null,v=d(y,["sidx"]);if(!v||!v[0])return null;var m=[],E=v[0],a=E.data[0],x=a===0?8:16,O=p(E,x);x+=4;var A=0,D=0;a===0?x+=8:x+=16,x+=2;var I=E.end+D,F=l(E,x);x+=2;for(var K=0;K<F;K++){var ne=x,j=p(E,ne);ne+=4;var G=j&2147483647,X=(j&2147483648)>>>31;if(X===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var J=p(E,ne);ne+=4,m.push({referenceSize:G,subsegmentDuration:J,info:{duration:J/O,start:I,end:I+G-1}}),I+=G,ne+=4,x=ne}return{earliestPresentationTime:A,timescale:O,version:a,referencesCount:F,references:m,moovEndOffset:b}}function c(y){for(var g=[],_=d(y,["moov","trak"]),b=0;b<_.length;b++){var v=_[b],m=d(v,["tkhd"])[0];if(m){var E=m.data[m.start],a=E===0?12:20,x=p(m,a),O=d(v,["mdia","mdhd"])[0];if(O){E=O.data[O.start],a=E===0?12:20;var A=p(O,a),D=d(v,["mdia","hdlr"])[0];if(D){var I=T(D.data.subarray(D.start+8,D.start+12)),F={soun:P.ElementaryStreamTypes.AUDIO,vide:P.ElementaryStreamTypes.VIDEO}[I];if(F){var K=d(v,["mdia","minf","stbl","stsd"])[0],ne=void 0;K&&(ne=T(K.data.subarray(K.start+12,K.start+16))),g[x]={timescale:A,type:F},g[F]={timescale:A,id:x,codec:ne}}}}}}var j=d(y,["moov","mvex","trex"]);return j.forEach(function(G){var X=p(G,4),J=g[X];J&&(J.default={duration:p(G,12),flags:p(G,20)})}),g}function s(y,g){return d(g,["moof","traf"]).reduce(function(_,b){var v=d(b,["tfdt"])[0],m=v.data[v.start],E=d(b,["tfhd"]).reduce(function(a,x){var O=p(x,4),A=y[O];if(A){var D=p(v,4);m===1&&(D*=Math.pow(2,32),D+=p(v,8));var I=A.timescale||9e4,F=D/I;if(isFinite(F)&&(a===null||F<a))return F}return a},null);return E!==null&&isFinite(E)&&(_===null||E<_)?E:_},null)||0}function f(y,g){for(var _=0,b=0,v=0,m=d(y,["moof","traf"]),E=0;E<m.length;E++){var a=m[E],x=d(a,["tfhd"])[0],O=p(x,4),A=g[O];if(!A)continue;var D=A.default,I=p(x,0)|(D==null?void 0:D.flags),F=D==null?void 0:D.duration;I&8&&(I&2?F=p(x,12):F=p(x,8));for(var K=A.timescale||9e4,ne=d(a,["trun"]),j=0;j<ne.length;j++){if(F){var G=p(ne[j],4);_=F*G}else _=i(ne[j]);A.type===P.ElementaryStreamTypes.VIDEO?b+=_/K:A.type===P.ElementaryStreamTypes.AUDIO&&(v+=_/K)}}if(b===0&&v===0){var X=o(y);if(X!=null&&X.references)return X.references.reduce(function(J,B){return J+B.info.duration||0},0)}return b||v}function i(y){var g=p(y,0),_=8;g&1&&(_+=4),g&4&&(_+=4);for(var b=0,v=p(y,4),m=0;m<v;m++){if(g&256){var E=p(y,_);b+=E,_+=4}g&512&&(_+=4),g&1024&&(_+=4),g&2048&&(_+=4)}return b}function n(y,g,_){d(g,["moof","traf"]).forEach(function(b){d(b,["tfhd"]).forEach(function(v){var m=p(v,4),E=y[m];if(!E)return;var a=E.timescale||9e4;d(b,["tfdt"]).forEach(function(x){var O=x.data[x.start],A=p(x,4);if(O===0)h(x,4,A-_*a);else{A*=Math.pow(2,32),A+=p(x,8),A-=_*a,A=Math.max(A,0);var D=Math.floor(A/(S+1)),I=Math.floor(A%(S+1));h(x,4,D),h(x,8,I)}})})})}function t(y){var g={valid:null,remainder:null},_=d(y,["moof"]);if(_){if(_.length<2)return g.remainder=y,g}else return g;var b=_[_.length-1];return g.valid=Object(w.sliceUint8)(y,0,b.start-8),g.remainder=Object(w.sliceUint8)(y,b.start-8),g}function u(y,g){var _=new Uint8Array(y.length+g.length);return _.set(y),_.set(g,y.length),_}},"./src/utils/output-filter.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return w});var w=function(){function P(C,T){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=C,this.trackName=T}var S=P.prototype;return S.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},S.newCue=function(T,l,p){(this.startTime===null||this.startTime>T)&&(this.startTime=T),this.endTime=l,this.screen=p,this.timelineController.createCaptionsTrack(this.trackName)},S.reset=function(){this.cueRanges=[]},P}()},"./src/utils/texttrack-utils.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"sendAddTrackEvent",function(){return P}),U.d(Z,"addCueToTrack",function(){return S}),U.d(Z,"clearCurrentCues",function(){return C}),U.d(Z,"removeCuesInRange",function(){return T}),U.d(Z,"getCuesInRange",function(){return p});var w=U("./src/utils/logger.ts");function P(h,d){var o;try{o=new Event("addtrack")}catch(c){o=document.createEvent("Event"),o.initEvent("addtrack",!1,!1)}o.track=h,d.dispatchEvent(o)}function S(h,d){var o=h.mode;if(o==="disabled"&&(h.mode="hidden"),h.cues&&!h.cues.getCueById(d.id))try{if(h.addCue(d),!h.cues.getCueById(d.id))throw new Error("addCue is failed for: "+d)}catch(s){w.logger.debug("[texttrack-utils]: "+s);var c=new self.TextTrackCue(d.startTime,d.endTime,d.text);c.id=d.id,h.addCue(c)}o==="disabled"&&(h.mode=o)}function C(h){var d=h.mode;if(d==="disabled"&&(h.mode="hidden"),h.cues)for(var o=h.cues.length;o--;)h.removeCue(h.cues[o]);d==="disabled"&&(h.mode=d)}function T(h,d,o){var c=h.mode;if(c==="disabled"&&(h.mode="hidden"),h.cues&&h.cues.length>0)for(var s=p(h.cues,d,o),f=0;f<s.length;f++)h.removeCue(s[f]);c==="disabled"&&(h.mode=c)}function l(h,d){if(d<h[0].startTime)return 0;var o=h.length-1;if(d>h[o].endTime)return-1;for(var c=0,s=o;c<=s;){var f=Math.floor((s+c)/2);if(d<h[f].startTime)s=f-1;else if(d>h[f].startTime&&c<o)c=f+1;else return f}return h[c].startTime-d<d-h[s].startTime?c:s}function p(h,d,o){var c=[],s=l(h,d);if(s>-1)for(var f=s,i=h.length;f<i;f++){var n=h[f];if(n.startTime>=d&&n.endTime<=o)c.push(n);else if(n.startTime>o)return c}return c}},"./src/utils/time-ranges.ts":function(ae,Z,U){"use strict";U.r(Z);var w={toString:function(S){for(var C="",T=S.length,l=0;l<T;l++)C+="["+S.start(l).toFixed(3)+","+S.end(l).toFixed(3)+"]";return C}};Z.default=w},"./src/utils/timescale-conversion.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"toTimescaleFromBase",function(){return P}),U.d(Z,"toTimescaleFromScale",function(){return S}),U.d(Z,"toMsFromMpegTsClock",function(){return C}),U.d(Z,"toMpegTsClockFromTimescale",function(){return T});var w=9e4;function P(l,p,h,d){h===void 0&&(h=1),d===void 0&&(d=!1);var o=l*p*h;return d?Math.round(o):o}function S(l,p,h,d){return h===void 0&&(h=1),d===void 0&&(d=!1),P(l,p,1/h,d)}function C(l,p){return p===void 0&&(p=!1),P(l,1e3,1/w,p)}function T(l,p){return p===void 0&&(p=1),P(l,w,1/p)}},"./src/utils/typed-array.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"sliceUint8",function(){return w});function w(P,S,C){return Uint8Array.prototype.slice?P.slice(S,C):new Uint8Array(Array.prototype.slice.call(P,S,C))}},"./src/utils/vttcue.ts":function(ae,Z,U){"use strict";U.r(Z),Z.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var w=["","lr","rl"],P=["start","middle","end","left","right"];function S(h,d){if(typeof d!="string")return!1;if(!Array.isArray(h))return!1;var o=d.toLowerCase();return~h.indexOf(o)?o:!1}function C(h){return S(w,h)}function T(h){return S(P,h)}function l(h){for(var d=arguments.length,o=new Array(d>1?d-1:0),c=1;c<d;c++)o[c-1]=arguments[c];for(var s=1;s<arguments.length;s++){var f=arguments[s];for(var i in f)h[i]=f[i]}return h}function p(h,d,o){var c=this,s={enumerable:!0};c.hasBeenReset=!1;var f="",i=!1,n=h,t=d,u=o,y=null,g="",_=!0,b="auto",v="start",m=50,E="middle",a=50,x="middle";Object.defineProperty(c,"id",l({},s,{get:function(){return f},set:function(A){f=""+A}})),Object.defineProperty(c,"pauseOnExit",l({},s,{get:function(){return i},set:function(A){i=!!A}})),Object.defineProperty(c,"startTime",l({},s,{get:function(){return n},set:function(A){if(typeof A!="number")throw new TypeError("Start time must be set to a number.");n=A,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",l({},s,{get:function(){return t},set:function(A){if(typeof A!="number")throw new TypeError("End time must be set to a number.");t=A,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",l({},s,{get:function(){return u},set:function(A){u=""+A,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",l({},s,{get:function(){return y},set:function(A){y=A,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",l({},s,{get:function(){return g},set:function(A){var D=C(A);if(D===!1)throw new SyntaxError("An invalid or illegal string was specified.");g=D,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",l({},s,{get:function(){return _},set:function(A){_=!!A,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",l({},s,{get:function(){return b},set:function(A){if(typeof A!="number"&&A!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");b=A,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",l({},s,{get:function(){return v},set:function(A){var D=T(A);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");v=D,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",l({},s,{get:function(){return m},set:function(A){if(A<0||A>100)throw new Error("Position must be between 0 and 100.");m=A,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",l({},s,{get:function(){return E},set:function(A){var D=T(A);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");E=D,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",l({},s,{get:function(){return a},set:function(A){if(A<0||A>100)throw new Error("Size must be between 0 and 100.");a=A,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",l({},s,{get:function(){return x},set:function(A){var D=T(A);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");x=D,this.hasBeenReset=!0}})),c.displayState=void 0}return p.prototype.getCueAsHTML=function(){var h=self.WebVTT;return h.convertCueToDOMTree(self,this.text)},p}()},"./src/utils/vttparser.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"parseTimeStamp",function(){return S}),U.d(Z,"fixLineBreaks",function(){return d}),U.d(Z,"VTTParser",function(){return o});var w=U("./src/utils/vttcue.ts"),P=function(){function c(){}var s=c.prototype;return s.decode=function(i,n){if(!i)return"";if(typeof i!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(i))},c}();function S(c){function s(i,n,t,u){return(i|0)*3600+(n|0)*60+(t|0)+parseFloat(u||0)}var f=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return f?parseFloat(f[2])>59?s(f[2],f[3],0,f[4]):s(f[1],f[2],f[3],f[4]):null}var C=function(){function c(){this.values=Object.create(null)}var s=c.prototype;return s.set=function(i,n){!this.get(i)&&n!==""&&(this.values[i]=n)},s.get=function(i,n,t){return t?this.has(i)?this.values[i]:n[t]:this.has(i)?this.values[i]:n},s.has=function(i){return i in this.values},s.alt=function(i,n,t){for(var u=0;u<t.length;++u)if(n===t[u]){this.set(i,n);break}},s.integer=function(i,n){/^-?\d+$/.test(n)&&this.set(i,parseInt(n,10))},s.percent=function(i,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var t=parseFloat(n);if(t>=0&&t<=100)return this.set(i,t),!0}return!1},c}();function T(c,s,f,i){var n=i?c.split(i):[c];for(var t in n){if(typeof n[t]!="string")continue;var u=n[t].split(f);if(u.length!==2)continue;var y=u[0],g=u[1];s(y,g)}}var l=new w.default(0,0,""),p=l.align==="middle"?"middle":"center";function h(c,s,f){var i=c;function n(){var y=S(c);if(y===null)throw new Error("Malformed timestamp: "+i);return c=c.replace(/^[^\sa-zA-Z-]+/,""),y}function t(y,g){var _=new C;T(y,function(m,E){var a;switch(m){case"region":for(var x=f.length-1;x>=0;x--)if(f[x].id===E){_.set(m,f[x].region);break}break;case"vertical":_.alt(m,E,["rl","lr"]);break;case"line":a=E.split(","),_.integer(m,a[0]),_.percent(m,a[0])&&_.set("snapToLines",!1),_.alt(m,a[0],["auto"]),a.length===2&&_.alt("lineAlign",a[1],["start",p,"end"]);break;case"position":a=E.split(","),_.percent(m,a[0]),a.length===2&&_.alt("positionAlign",a[1],["start",p,"end","line-left","line-right","auto"]);break;case"size":_.percent(m,E);break;case"align":_.alt(m,E,["start",p,"end","left","right"]);break}},/:/,/\s/),g.region=_.get("region",null),g.vertical=_.get("vertical","");var b=_.get("line","auto");b==="auto"&&l.line===-1&&(b=-1),g.line=b,g.lineAlign=_.get("lineAlign","start"),g.snapToLines=_.get("snapToLines",!0),g.size=_.get("size",100),g.align=_.get("align",p);var v=_.get("position","auto");v==="auto"&&l.position===50&&(v=g.align==="start"||g.align==="left"?0:g.align==="end"||g.align==="right"?100:50),g.position=v}function u(){c=c.replace(/^\s+/,"")}if(u(),s.startTime=n(),u(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+i);c=c.substr(3),u(),s.endTime=n(),u(),t(c,s)}function d(c){return c.replace(/<br(?: \/)?>/gi,`
`)}var o=function(){function c(){this.state="INITIAL",this.buffer="",this.decoder=new P,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var s=c.prototype;return s.parse=function(i){var n=this;i&&(n.buffer+=n.decoder.decode(i,{stream:!0}));function t(){var v=n.buffer,m=0;for(v=d(v);m<v.length&&v[m]!=="\r"&&v[m]!==`
`;)++m;var E=v.substr(0,m);return v[m]==="\r"&&++m,v[m]===`
`&&++m,n.buffer=v.substr(m),E}function u(v){T(v,function(m,E){},/:/)}try{var y="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;y=t();var g=y.match(/^()?WEBVTT([ \t].*)?$/);if(!g||!g[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var _=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;_?_=!1:y=t();switch(n.state){case"HEADER":/:/.test(y)?u(y):y||(n.state="ID");continue;case"NOTE":y||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(y)){n.state="NOTE";break}if(!y)continue;if(n.cue=new w.default(0,0,""),n.state="CUE",y.indexOf("-->")===-1){n.cue.id=y;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{h(y,n.cue,n.regionList)}catch(v){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var b=y.indexOf("-->")!==-1;if(!y||b&&(_=!0)){n.oncue&&n.cue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}if(n.cue===null)continue;n.cue.text&&(n.cue.text+=`
`),n.cue.text+=y}continue;case"BADCUE":y||(n.state="ID")}}}catch(v){n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},s.flush=function(){var i=this;try{if((i.cue||i.state==="HEADER")&&(i.buffer+=`
`,i.parse()),i.state==="INITIAL"||i.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){i.onparsingerror&&i.onparsingerror(n)}return i.onflush&&i.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"generateCueId",function(){return o}),U.d(Z,"parseWebVTT",function(){return s});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/vttparser.ts"),S=U("./src/demux/id3.ts"),C=U("./src/utils/timescale-conversion.ts"),T=U("./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,p=function(i,n,t){return t===void 0&&(t=0),i.substr(t,n.length)===n},h=function(i){var n=parseInt(i.substr(-3)),t=parseInt(i.substr(-6,2)),u=parseInt(i.substr(-9,2)),y=i.length>9?parseInt(i.substr(0,i.indexOf(":"))):0;if(!Object(w.isFiniteNumber)(n)||!Object(w.isFiniteNumber)(t)||!Object(w.isFiniteNumber)(u)||!Object(w.isFiniteNumber)(y))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+i);return n+=1e3*t,n+=60*1e3*u,n+=60*60*1e3*y,n},d=function(i){for(var n=5381,t=i.length;t;)n=n*33^i.charCodeAt(--t);return(n>>>0).toString()};function o(f,i,n){return d(f.toString())+d(i.toString())+d(n)}var c=function(i,n,t){var u=i[n],y=i[u.prevCC];if(!y||!y.new&&u.new){i.ccOffset=i.presentationOffset=u.start,u.new=!1;return}for(;(g=y)!==null&&g!==void 0&&g.new;){var g;i.ccOffset+=u.start-y.start,u.new=!1,u=y,y=i[u.prevCC]}i.presentationOffset=t};function s(f,i,n,t,u,y,g,_){var b=new P.VTTParser,v=Object(S.utf8ArrayToStr)(new Uint8Array(f)).trim().replace(l,`
`).split(`
`),m=[],E=Object(C.toMpegTsClockFromTimescale)(i,n),a="00:00.000",x=0,O=0,A,D=!0,I=!1;b.oncue=function(F){var K=t[u],ne=t.ccOffset,j=(x-E)/9e4;if(K!=null&&K.new&&(O!==void 0?ne=t.ccOffset=K.start:c(t,u,j)),j&&(ne=j-t.presentationOffset),I){var G=F.endTime-F.startTime,X=Object(T.normalizePts)((F.startTime+ne-O)*9e4,y*9e4)/9e4;F.startTime=X,F.endTime=X+G}var J=F.text.trim();F.text=decodeURIComponent(encodeURIComponent(J)),F.id||(F.id=o(F.startTime,F.endTime,J)),F.endTime>0&&m.push(F)},b.onparsingerror=function(F){A=F},b.onflush=function(){if(A){_(A);return}g(m)},v.forEach(function(F){if(D)if(p(F,"X-TIMESTAMP-MAP=")){D=!1,I=!0,F.substr(16).split(",").forEach(function(K){p(K,"LOCAL:")?a=K.substr(6):p(K,"MPEGTS:")&&(x=parseInt(K.substr(7)))});try{O=h(a)/1e3}catch(K){I=!1,A=K}return}else F===""&&(D=!1);b.parse(F+`
`)}),b.flush()}},"./src/utils/xhr-loader.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/utils/logger.ts"),P=U("./src/loader/load-stats.ts"),S=/^age:\s*[\d.]+\s*$/m,C=function(){function T(p){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=p?p.xhrSetup:null,this.stats=new P.LoadStats,this.retryDelay=0}var l=T.prototype;return l.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},l.abortInternal=function(){var h=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),h&&(h.onreadystatechange=null,h.onprogress=null,h.readyState!==4&&(this.stats.aborted=!0,h.abort()))},l.abort=function(){var h;this.abortInternal(),(h=this.callbacks)!==null&&h!==void 0&&h.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},l.load=function(h,d,o){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=h,this.config=d,this.callbacks=o,this.retryDelay=d.retryDelay,this.loadInternal()},l.loadInternal=function(){var h=this.config,d=this.context;if(!h)return;var o=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var s=this.xhrSetup;try{if(s)try{s(o,d.url)}catch(n){o.open("GET",d.url,!0),s(o,d.url)}o.readyState||o.open("GET",d.url,!0);var f=this.context.headers;if(f)for(var i in f)o.setRequestHeader(i,f[i])}catch(n){this.callbacks.onError({code:o.status,text:n.message},d,o);return}d.rangeEnd&&o.setRequestHeader("Range","bytes="+d.rangeStart+"-"+(d.rangeEnd-1)),o.onreadystatechange=this.readystatechange.bind(this),o.onprogress=this.loadprogress.bind(this),o.responseType=d.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.timeout),o.send()},l.readystatechange=function(){var h=this.context,d=this.loader,o=this.stats;if(!h||!d)return;var c=d.readyState,s=this.config;if(o.aborted)return;if(c>=2)if(self.clearTimeout(this.requestTimeout),o.loading.first===0&&(o.loading.first=Math.max(self.performance.now(),o.loading.start)),c===4){d.onreadystatechange=null,d.onprogress=null;var f=d.status;if(f>=200&&f<300){o.loading.end=Math.max(self.performance.now(),o.loading.first);var i,n;if(h.responseType==="arraybuffer"?(i=d.response,n=i.byteLength):(i=d.responseText,n=i.length),o.loaded=o.total=n,!this.callbacks)return;var t=this.callbacks.onProgress;if(t&&t(o,h,i,d),!this.callbacks)return;var u={url:d.responseURL,data:i};this.callbacks.onSuccess(u,o,h,d)}else o.retry>=s.maxRetry||f>=400&&f<499?(w.logger.error(f+" while loading "+h.url),this.callbacks.onError({code:f,text:d.statusText},h,d)):(w.logger.warn(f+" while loading "+h.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),o.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)},l.loadtimeout=function(){w.logger.warn("timeout while loading "+this.context.url);var h=this.callbacks;h&&(this.abortInternal(),h.onTimeout(this.stats,this.context,this.loader))},l.loadprogress=function(h){var d=this.stats;d.loaded=h.loaded,h.lengthComputable&&(d.total=h.total)},l.getCacheAge=function(){var h=null;if(this.loader&&S.test(this.loader.getAllResponseHeaders())){var d=this.loader.getResponseHeader("age");h=d?parseFloat(d):null}return h},T}();Z.default=C}}).default})},vHTk:function($e,We,z){$e.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function($e,We,z){"use strict";z.d(We,"a",function(){return Y});var ae=z("rePB"),Z=z("VTBJ"),U=z("KQm4"),w=z("U8pU"),P=z("ODXe"),S=z("q1tI"),C=z("TSYQ"),T=z.n(C),l=z("Gytx"),p=z.n(l),h=z("Kwbf"),d=z("t23M"),o=z("qx4F"),c=z("6eGT"),s=z("IBYe"),f=z("Ff2n"),i=z("c+Xe"),n=z("fyJ8"),t=z("biw7");function u(Pe,Ie,Xe,tt,Ve){var Ke=Xe[Pe]||{},Ne=Xe[Ie]||{},De,_e;Ke.fixed==="left"?De=tt.left[Pe]:Ne.fixed==="right"&&(_e=tt.right[Ie]);var he=!1,ve=!1,Ee=!1,be=!1,Ge=Xe[Ie+1],qe=Xe[Pe-1];if(Ve==="rtl"){if(De!==void 0){var pt=qe&&qe.fixed==="left";be=!pt}else if(_e!==void 0){var Pt=Ge&&Ge.fixed==="right";Ee=!Pt}}else if(De!==void 0){var Rt=Ge&&Ge.fixed==="left";he=!Rt}else if(_e!==void 0){var Mt=qe&&qe.fixed==="right";ve=!Mt}return{fixLeft:De,fixRight:_e,lastFixLeft:he,firstFixRight:ve,lastFixRight:Ee,firstFixLeft:be,isSticky:tt.isSticky}}var y=z("sR1s");function g(Pe){var Ie=Pe.cells,Xe=Pe.stickyOffsets,tt=Pe.flattenColumns,Ve=Pe.rowComponent,Ke=Pe.cellComponent,Ne=Pe.onHeaderRow,De=Pe.index,_e=S.useContext(t.a),he=_e.prefixCls,ve=_e.direction,Ee;Ne&&(Ee=Ne(Ie.map(function(Ge){return Ge.column}),De));var be=Object(y.a)(Ie.map(function(Ge){return Ge.column}));return S.createElement(Ve,Object.assign({},Ee),Ie.map(function(Ge,qe){var pt=Ge.column,Pt=u(Ge.colStart,Ge.colEnd,tt,Xe,ve),Rt;return pt&&pt.onHeaderCell&&(Rt=Ge.column.onHeaderCell(pt)),S.createElement(n.a,Object.assign({},Ge,{ellipsis:pt.ellipsis,align:pt.align,component:Ke,prefixCls:he,key:be[qe]},Pt,{additionalProps:Rt,rowType:"header"}))}))}g.displayName="HeaderRow";var _=g;function b(Pe){var Ie=[];function Xe(Ne,De){var _e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[_e]=Ie[_e]||[];var he=De,ve=Ne.filter(Boolean).map(function(Ee){var be={key:Ee.key,className:Ee.className||"",children:Ee.title,column:Ee,colStart:he},Ge=1,qe=Ee.children;return qe&&qe.length>0&&(Ge=Xe(qe,he,_e+1).reduce(function(pt,Pt){return pt+Pt},0),be.hasSubColumns=!0),"colSpan"in Ee&&(Ge=Ee.colSpan),"rowSpan"in Ee&&(be.rowSpan=Ee.rowSpan),be.colSpan=Ge,be.colEnd=be.colStart+Ge-1,Ie[_e].push(be),he+=Ge,Ge});return ve}Xe(Pe,0);for(var tt=Ie.length,Ve=function(De){Ie[De].forEach(function(_e){!("rowSpan"in _e)&&!_e.hasSubColumns&&(_e.rowSpan=tt-De)})},Ke=0;Ke<tt;Ke+=1)Ve(Ke);return Ie}function v(Pe){var Ie=Pe.stickyOffsets,Xe=Pe.columns,tt=Pe.flattenColumns,Ve=Pe.onHeaderRow,Ke=S.useContext(t.a),Ne=Ke.prefixCls,De=Ke.getComponent,_e=S.useMemo(function(){return b(Xe)},[Xe]),he=De(["header","wrapper"],"thead"),ve=De(["header","row"],"tr"),Ee=De(["header","cell"],"th");return S.createElement(he,{className:"".concat(Ne,"-thead")},_e.map(function(be,Ge){var qe=S.createElement(_,{key:Ge,flattenColumns:tt,cells:be,stickyOffsets:Ie,rowComponent:ve,cellComponent:Ee,onHeaderRow:Ve,index:Ge});return qe}))}var m=v,E=z("hW8S");function a(Pe){for(var Ie=Pe.colWidths,Xe=Pe.columns,tt=Pe.columCount,Ve=[],Ke=tt||Xe.length,Ne=!1,De=Ke-1;De>=0;De-=1){var _e=Ie[De],he=Xe&&Xe[De],ve=he&&he[E.a];(_e||ve||Ne)&&(Ve.unshift(S.createElement("col",Object.assign({key:De,style:{width:_e,minWidth:_e}},ve))),Ne=!0)}return S.createElement("colgroup",null,Ve)}var x=a;function O(Pe,Ie){return Object(S.useMemo)(function(){for(var Xe=[],tt=0;tt<Ie;tt+=1){var Ve=Pe[tt];if(Ve!==void 0)Xe[tt]=Ve;else return null}return Xe},[Pe.join("_"),Ie])}var A=S.forwardRef(function(Pe,Ie){var Xe=Pe.noData,tt=Pe.columns,Ve=Pe.flattenColumns,Ke=Pe.colWidths,Ne=Pe.columCount,De=Pe.stickyOffsets,_e=Pe.direction,he=Pe.fixHeader,ve=Pe.offsetHeader,Ee=Pe.stickyClassName,be=Pe.onScroll,Ge=Object(f.a)(Pe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),qe=S.useContext(t.a),pt=qe.prefixCls,Pt=qe.scrollbarSize,Rt=qe.isSticky,Mt=Rt&&!he?0:Pt,wt=S.useRef(null),lt=S.useCallback(function(Tt){Object(i.b)(Ie,Tt),Object(i.b)(wt,Tt)},[]);S.useEffect(function(){var Tt;function Ot(st){var gt=st.currentTarget,kt=st.deltaX;kt&&(be({currentTarget:gt,scrollLeft:gt.scrollLeft+kt}),st.preventDefault())}return(Tt=wt.current)===null||Tt===void 0||Tt.addEventListener("wheel",Ot),function(){var st;(st=wt.current)===null||st===void 0||st.removeEventListener("wheel",Ot)}},[]);var ft=Ve[Ve.length-1],Qe={fixed:ft?ft.fixed:null,onHeaderCell:function(){return{className:"".concat(pt,"-cell-scrollbar")}}},Te=Object(S.useMemo)(function(){return Mt?[].concat(Object(U.a)(tt),[Qe]):tt},[Mt,tt]),je=Object(S.useMemo)(function(){return Mt?[].concat(Object(U.a)(Ve),[Qe]):Ve},[Mt,Ve]),ct=Object(S.useMemo)(function(){var Tt=De.right,Ot=De.left;return Object(Z.a)(Object(Z.a)({},De),{},{left:_e==="rtl"?[].concat(Object(U.a)(Ot.map(function(st){return st+Mt})),[0]):Ot,right:_e==="rtl"?Tt:[].concat(Object(U.a)(Tt.map(function(st){return st+Mt})),[0]),isSticky:Rt})},[Mt,De,Rt]),Ze=O(Ke,Ne);return S.createElement("div",{style:Object(Z.a)({overflow:"hidden"},Rt?{top:ve}:{}),ref:lt,className:T()("".concat(pt,"-header"),Object(ae.a)({},Ee,!!Ee))},S.createElement("table",{style:{tableLayout:"fixed",visibility:Xe||Ze?null:"hidden"}},S.createElement(x,{colWidths:Ze?[].concat(Object(U.a)(Ze),[Mt]):[],columCount:Ne+1,columns:je}),S.createElement(m,Object.assign({},Ge,{stickyOffsets:ct,columns:Te,flattenColumns:je}))))});A.displayName="FixedHeader";var D=A,I=S.createContext(null),F=I;function K(Pe){var Ie=Pe.prefixCls,Xe=Pe.children,tt=Pe.component,Ve=Pe.cellComponent,Ke=Pe.fixHeader,Ne=Pe.fixColumn,De=Pe.horizonScroll,_e=Pe.className,he=Pe.expanded,ve=Pe.componentWidth,Ee=Pe.colSpan,be=S.useContext(t.a),Ge=be.scrollbarSize;return S.useMemo(function(){var qe=Xe;return Ne&&(qe=S.createElement("div",{style:{width:ve-(Ke?Ge:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ie,"-expanded-row-fixed")},qe)),S.createElement(tt,{className:_e,style:{display:he?null:"none"}},S.createElement(n.a,{component:Ve,prefixCls:Ie,colSpan:Ee},qe))},[Xe,tt,Ke,De,_e,he,ve,Ee,Ge])}var ne=K;function j(Pe){var Ie=Pe.className,Xe=Pe.style,tt=Pe.record,Ve=Pe.index,Ke=Pe.rowKey,Ne=Pe.getRowKey,De=Pe.rowExpandable,_e=Pe.expandedKeys,he=Pe.onRow,ve=Pe.indent,Ee=ve===void 0?0:ve,be=Pe.rowComponent,Ge=Pe.cellComponent,qe=Pe.childrenColumnName,pt=S.useContext(t.a),Pt=pt.prefixCls,Rt=pt.fixedInfoList,Mt=S.useContext(F),wt=Mt.fixHeader,lt=Mt.fixColumn,ft=Mt.horizonScroll,Qe=Mt.componentWidth,Te=Mt.flattenColumns,je=Mt.expandableType,ct=Mt.expandRowByClick,Ze=Mt.onTriggerExpand,Tt=Mt.rowClassName,Ot=Mt.expandedRowClassName,st=Mt.indentSize,gt=Mt.expandIcon,kt=Mt.expandedRowRender,Wt=Mt.expandIconColumnIndex,Qt=S.useState(!1),we=Object(P.a)(Qt,2),fe=we[0],W=we[1],q=_e&&_e.has(Pe.recordKey);S.useEffect(function(){q&&W(!0)},[q]);var te=je==="row"&&(!De||De(tt)),se=je==="nest",Se=qe&&tt&&tt[qe],He=te||se,Je;he&&(Je=he(tt,Ve));var xt=function(mt){if(ct&&He&&Ze(tt,mt),Je&&Je.onClick){for(var cn,bn=arguments.length,sn=new Array(bn>1?bn-1:0),dn=1;dn<bn;dn++)sn[dn-1]=arguments[dn];(cn=Je).onClick.apply(cn,[mt].concat(sn))}},Ct;typeof Tt=="string"?Ct=Tt:typeof Tt=="function"&&(Ct=Tt(tt,Ve,Ee));var it=Object(y.a)(Te),St=S.createElement(be,Object.assign({},Je,{"data-row-key":Ke,className:T()(Ie,"".concat(Pt,"-row"),"".concat(Pt,"-row-level-").concat(Ee),Ct,Je&&Je.className),style:Object(Z.a)(Object(Z.a)({},Xe),Je?Je.style:null),onClick:xt}),Te.map(function(Nt,mt){var cn=Nt.render,bn=Nt.dataIndex,sn=Nt.className,dn=it[mt],Nn=Rt[mt],Kt;mt===(Wt||0)&&se&&(Kt=S.createElement(S.Fragment,null,S.createElement("span",{style:{paddingLeft:"".concat(st*Ee,"px")},className:"".concat(Pt,"-row-indent indent-level-").concat(Ee)}),gt({prefixCls:Pt,expanded:q,expandable:Se,record:tt,onExpand:Ze})));var et;return Nt.onCell&&(et=Nt.onCell(tt,Ve)),S.createElement(n.a,Object.assign({className:sn,ellipsis:Nt.ellipsis,align:Nt.align,component:Ge,prefixCls:Pt,key:dn,record:tt,index:Ve,dataIndex:bn,render:cn,shouldCellUpdate:Nt.shouldCellUpdate},Nn,{appendNode:Kt,additionalProps:et}))})),Xt;if(te&&(fe||q)){var bt=kt(tt,Ve,Ee+1,q),ht=Ot&&Ot(tt,Ve,Ee);Xt=S.createElement(ne,{expanded:q,className:T()("".concat(Pt,"-expanded-row"),"".concat(Pt,"-expanded-row-level-").concat(Ee+1),ht),prefixCls:Pt,fixHeader:wt,fixColumn:lt,horizonScroll:ft,component:be,componentWidth:Qe,cellComponent:Ge,colSpan:Te.length},bt)}var Jt;return Se&&q&&(Jt=(tt[qe]||[]).map(function(Nt,mt){var cn=Ne(Nt,mt);return S.createElement(j,Object.assign({},Pe,{key:cn,rowKey:cn,record:Nt,recordKey:cn,index:mt,indent:Ee+1}))})),S.createElement(S.Fragment,null,St,Xt,Jt)}j.displayName="BodyRow";var G=j,X=S.createContext(null),J=X;function B(Pe){var Ie=Pe.columnKey,Xe=Pe.onColumnResize,tt=S.useRef();return S.useEffect(function(){tt.current&&Xe(Ie,tt.current.offsetWidth)},[]),S.createElement(d.a,{onResize:function(Ke){var Ne=Ke.offsetWidth;Xe(Ie,Ne)}},S.createElement("td",{ref:tt,style:{padding:0,border:0,height:0}},S.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Q(Pe){var Ie=Pe.data,Xe=Pe.getRowKey,tt=Pe.measureColumnWidth,Ve=Pe.expandedKeys,Ke=Pe.onRow,Ne=Pe.rowExpandable,De=Pe.emptyNode,_e=Pe.childrenColumnName,he=S.useContext(J),ve=he.onColumnResize,Ee=S.useContext(t.a),be=Ee.prefixCls,Ge=Ee.getComponent,qe=S.useContext(F),pt=qe.fixHeader,Pt=qe.horizonScroll,Rt=qe.flattenColumns,Mt=qe.componentWidth;return S.useMemo(function(){var wt=Ge(["body","wrapper"],"tbody"),lt=Ge(["body","row"],"tr"),ft=Ge(["body","cell"],"td"),Qe;Ie.length?Qe=Ie.map(function(je,ct){var Ze=Xe(je,ct);return S.createElement(G,{key:Ze,rowKey:Ze,record:je,recordKey:Ze,index:ct,rowComponent:lt,cellComponent:ft,expandedKeys:Ve,onRow:Ke,getRowKey:Xe,rowExpandable:Ne,childrenColumnName:_e})}):Qe=S.createElement(ne,{expanded:!0,className:"".concat(be,"-placeholder"),prefixCls:be,fixHeader:pt,fixColumn:Pt,horizonScroll:Pt,component:lt,componentWidth:Mt,cellComponent:ft,colSpan:Rt.length},De);var Te=Object(y.a)(Rt);return S.createElement(wt,{className:"".concat(be,"-tbody")},tt&&S.createElement("tr",{"aria-hidden":"true",className:"".concat(be,"-measure-row"),style:{height:0}},Te.map(function(je){return S.createElement(B,{key:je,columnKey:je,onColumnResize:ve})})),Qe)},[Ie,be,Ke,tt,Ve,Xe,Ge,Mt,De,Rt])}var ie=S.memo(Q);ie.displayName="Body";var oe=ie,xe=z("wRmb"),ye=z("xEkU"),Ae=z.n(ye);function pe(Pe){var Ie=Object(S.useRef)(Pe),Xe=Object(S.useState)({}),tt=Object(P.a)(Xe,2),Ve=tt[1],Ke=Object(S.useRef)(null),Ne=Object(S.useRef)([]);function De(_e){Ke.current===null&&(Ne.current=[],Ke.current=Ae()(function(){Ne.current.forEach(function(he){Ie.current=he(Ie.current)}),Ke.current=null,Ve({})})),Ne.current.push(_e)}return Object(S.useEffect)(function(){return function(){Ae.a.cancel(Ke.current)}},[]),[Ie.current,De]}function Oe(Pe){var Ie=Object(S.useRef)(Pe),Xe=Object(S.useRef)(null);function tt(){window.clearTimeout(Xe.current)}function Ve(Ne){Ie.current=Ne,tt(),Xe.current=window.setTimeout(function(){Ie.current=null,Xe.current=null},100)}function Ke(){return Ie.current}return Object(S.useEffect)(function(){return tt},[]),[Ve,Ke]}function Fe(Pe,Ie,Xe){var tt=Object(S.useMemo)(function(){for(var Ve=[],Ke=[],Ne=0,De=0,_e=0;_e<Ie;_e+=1)if(Xe==="rtl"){Ke[_e]=De,De+=Pe[_e]||0;var he=Ie-_e-1;Ve[he]=Ne,Ne+=Pe[he]||0}else{Ve[_e]=Ne,Ne+=Pe[_e]||0;var ve=Ie-_e-1;Ke[ve]=De,De+=Pe[ve]||0}return{left:Ve,right:Ke}},[Pe,Ie,Xe]);return tt}var Me=Fe;function Ce(Pe){var Ie=Pe.className,Xe=Pe.children;return S.createElement("div",{className:Ie},Xe)}var Le=Ce,de=z("n6Qo");function ue(Pe){var Ie,Xe=Pe.prefixCls,tt=Pe.record,Ve=Pe.onExpand,Ke=Pe.expanded,Ne=Pe.expandable,De="".concat(Xe,"-row-expand-icon");if(!Ne)return S.createElement("span",{className:T()(De,"".concat(Xe,"-row-spaced"))});var _e=function(ve){Ve(tt,ve),ve.stopPropagation()};return S.createElement("span",{className:T()(De,(Ie={},Object(ae.a)(Ie,"".concat(Xe,"-row-expanded"),Ke),Object(ae.a)(Ie,"".concat(Xe,"-row-collapsed"),!Ke),Ie)),onClick:_e})}function ke(Pe,Ie,Xe){var tt=[];function Ve(Ke){(Ke||[]).forEach(function(Ne,De){tt.push(Ie(Ne,De)),Ve(Ne[Xe])})}return Ve(Pe),tt}var Ue=z("zT1h"),Ye=z("y0+3"),ee=function(Ie,Xe){var tt,Ve,Ke=Ie.scrollBodyRef,Ne=Ie.onScroll,De=Ie.offsetScroll,_e=S.useContext(t.a),he=_e.prefixCls,ve=((tt=Ke.current)===null||tt===void 0?void 0:tt.scrollWidth)||0,Ee=((Ve=Ke.current)===null||Ve===void 0?void 0:Ve.clientWidth)||0,be=ve&&Ee*(Ee/ve),Ge=S.useRef(),qe=pe({scrollLeft:0,isHiddenScrollBar:!1}),pt=Object(P.a)(qe,2),Pt=pt[0],Rt=pt[1],Mt=S.useRef({delta:0,x:0}),wt=S.useState(!1),lt=Object(P.a)(wt,2),ft=lt[0],Qe=lt[1],Te=function(){Qe(!1)},je=function(st){st.persist(),Mt.current.delta=st.pageX-Pt.scrollLeft,Mt.current.x=0,Qe(!0),st.preventDefault()},ct=function(st){var gt,kt=st||((gt=window)===null||gt===void 0?void 0:gt.event),Wt=kt.buttons;if(!ft||Wt===0){ft&&Qe(!1);return}var Qt=Mt.current.x+st.pageX-Mt.current.x-Mt.current.delta;Qt<=0&&(Qt=0),Qt+be>=Ee&&(Qt=Ee-be),Ne({scrollLeft:Qt/Ee*(ve+2)}),Mt.current.x=st.pageX},Ze=function(){var st=Object(Ye.b)(Ke.current).top,gt=st+Ke.current.offsetHeight,kt=document.documentElement.scrollTop+window.innerHeight;gt-Object(o.a)()<=kt||st>=kt-De?Rt(function(Wt){return Object(Z.a)(Object(Z.a)({},Wt),{},{isHiddenScrollBar:!0})}):Rt(function(Wt){return Object(Z.a)(Object(Z.a)({},Wt),{},{isHiddenScrollBar:!1})})},Tt=function(st){Rt(function(gt){return Object(Z.a)(Object(Z.a)({},gt),{},{scrollLeft:st/ve*Ee||0})})};return S.useImperativeHandle(Xe,function(){return{setScrollLeft:Tt}}),S.useEffect(function(){var Ot=Object(Ue.a)(document.body,"mouseup",Te,!1),st=Object(Ue.a)(document.body,"mousemove",ct,!1);return Ze(),function(){Ot.remove(),st.remove()}},[be,ft]),S.useEffect(function(){var Ot=Object(Ue.a)(window,"scroll",Ze,!1),st=Object(Ue.a)(window,"resize",Ze,!1);return function(){Ot.remove(),st.remove()}},[]),S.useEffect(function(){Pt.isHiddenScrollBar||Rt(function(Ot){var st,gt;return Object(Z.a)(Object(Z.a)({},Ot),{},{scrollLeft:Ke.current.scrollLeft/((st=Ke.current)===null||st===void 0?void 0:st.scrollWidth)*((gt=Ke.current)===null||gt===void 0?void 0:gt.clientWidth)})})},[Pt.isHiddenScrollBar]),ve<=Ee||!be||Pt.isHiddenScrollBar?null:S.createElement("div",{style:{height:Object(o.a)(),width:Ee,bottom:De},className:"".concat(he,"-sticky-scroll")},S.createElement("div",{onMouseDown:je,ref:Ge,className:T()("".concat(he,"-sticky-scroll-bar"),Object(ae.a)({},"".concat(he,"-sticky-scroll-bar-active"),ft)),style:{width:"".concat(be,"px"),transform:"translate3d(".concat(Pt.scrollLeft,"px, 0, 0)")}}))},M=S.forwardRef(ee);function N(Pe,Ie){return S.useMemo(function(){var Xe=!!Pe;return{isSticky:Xe,stickyClassName:Xe?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(w.a)(Pe)==="object"&&Pe.offsetHeader||0,offsetScroll:Object(w.a)(Pe)==="object"&&Pe.offsetScroll||0}},[Pe,Ie])}var $=[],V={},Y="rc-table-internal-hook",me=S.memo(function(Pe){var Ie=Pe.children;return Ie},function(Pe,Ie){return p()(Pe.props,Ie.props)?Pe.pingLeft!==Ie.pingLeft||Pe.pingRight!==Ie.pingRight:!1});function Re(Pe){var Ie,Xe=Pe.prefixCls,tt=Pe.className,Ve=Pe.rowClassName,Ke=Pe.style,Ne=Pe.data,De=Pe.rowKey,_e=Pe.scroll,he=Pe.tableLayout,ve=Pe.direction,Ee=Pe.title,be=Pe.footer,Ge=Pe.summary,qe=Pe.id,pt=Pe.showHeader,Pt=Pe.components,Rt=Pe.emptyText,Mt=Pe.onRow,wt=Pe.onHeaderRow,lt=Pe.internalHooks,ft=Pe.transformColumns,Qe=Pe.internalRefs,Te=Pe.sticky,je=Ne||$,ct=!!je.length,Ze=S.useState(0),Tt=Object(P.a)(Ze,2),Ot=Tt[0],st=Tt[1];S.useEffect(function(){st(Object(o.a)())});var gt=S.useMemo(function(){return Object(y.c)(Pt,{})},[Pt]),kt=S.useCallback(function(ut,Et){return Object(y.b)(gt,ut)||Et},[gt]),Wt=S.useMemo(function(){return typeof De=="function"?De:function(ut){var Et=ut&&ut[De];return Et}},[De]),Qt=Object(E.c)(Pe),we=Qt.expandIcon,fe=Qt.expandedRowKeys,W=Qt.defaultExpandedRowKeys,q=Qt.defaultExpandAllRows,te=Qt.expandedRowRender,se=Qt.onExpand,Se=Qt.onExpandedRowsChange,He=Qt.expandRowByClick,Je=Qt.rowExpandable,xt=Qt.expandIconColumnIndex,Ct=Qt.expandedRowClassName,it=Qt.childrenColumnName,St=Qt.indentSize,Xt=we||ue,bt=it||"children",ht=S.useMemo(function(){return te?"row":Pe.expandable&&lt===Y&&Pe.expandable.__PARENT_RENDER_ICON__||je.some(function(ut){return ut&&Object(w.a)(ut)==="object"&&ut[bt]})?"nest":!1},[!!te,je]),Jt=S.useState(function(){return W||(q?ke(je,Wt,bt):[])}),Nt=Object(P.a)(Jt,2),mt=Nt[0],cn=Nt[1],bn=S.useMemo(function(){return new Set(fe||mt||[])},[fe,mt]),sn=S.useCallback(function(ut){var Et=Wt(ut,je.indexOf(ut)),Dt,on=bn.has(Et);on?(bn.delete(Et),Dt=Object(U.a)(bn)):Dt=[].concat(Object(U.a)(bn),[Et]),cn(Dt),se&&se(!on,ut),Se&&Se(Dt)},[Wt,bn,je,se,Se]),dn=S.useState(0),Nn=Object(P.a)(dn,2),Kt=Nn[0],et=Nn[1],Ut=Object(xe.b)(Object(Z.a)(Object(Z.a)(Object(Z.a)({},Pe),Qt),{},{expandable:!!te,expandedKeys:bn,getRowKey:Wt,onTriggerExpand:sn,expandIcon:Xt,expandIconColumnIndex:xt,direction:ve}),lt===Y?ft:null),Yt=Object(P.a)(Ut,2),Vt=Yt[0],En=Yt[1],sr=S.useMemo(function(){return{columns:Vt,flattenColumns:En}},[Vt,En]),nr=S.useRef(),jn=S.useRef(),cr=S.useRef(),qn=S.useState(!1),Wr=Object(P.a)(qn,2),_r=Wr[0],Rr=Wr[1],Tr=S.useState(!1),Vr=Object(P.a)(Tr,2),Ur=Vr[0],xi=Vr[1],kr=pe(new Map),Oi=Object(P.a)(kr,2),ri=Oi[0],Xr=Oi[1],di=Object(y.a)(En),Si=di.map(function(ut){return ri.get(ut)}),si=S.useMemo(function(){return Si},[Si.join("_")]),fi=Me(si,En.length,ve),gr=_e&&Object(y.d)(_e.y),dr=_e&&Object(y.d)(_e.x),ii=dr&&En.some(function(ut){var Et=ut.fixed;return Et}),li=S.useRef(),Ni=N(Te,Xe),wi=Ni.isSticky,ua=Ni.offsetHeader,ca=Ni.offsetScroll,hi=Ni.stickyClassName,Zi,ln,Tn;gr&&(ln={overflowY:"scroll",maxHeight:_e.y}),dr&&(Zi={overflowX:"auto"},gr||(ln={overflowY:"hidden"}),Tn={width:_e.x===!0?"auto":_e.x,minWidth:"100%"});var On=S.useCallback(function(ut,Et){Xr(function(Dt){var on=new Map(Dt);return on.set(ut,Et),on})},[]),rr=Oe(null),ar=Object(P.a)(rr,2),pr=ar[0],Er=ar[1];function Cr(ut,Et){if(!Et)return;typeof Et=="function"?Et(ut):Et.scrollLeft!==ut&&(Et.scrollLeft=ut)}var xr=function(Et){var Dt=Et.currentTarget,on=Et.scrollLeft,an=typeof on=="number"?on:Dt.scrollLeft,vt=Dt||V;if(!Er()||Er()===vt){var dt;pr(vt),Cr(an,jn.current),Cr(an,cr.current),Cr(an,(dt=li.current)===null||dt===void 0?void 0:dt.setScrollLeft)}if(Dt){var Ht=Dt.scrollWidth,yt=Dt.clientWidth;Rr(an>0),xi(an<Ht-yt)}},pi=function(){cr.current&&xr({currentTarget:cr.current})},Or=function(Et){var Dt=Et.width;pi(),et(nr.current?nr.current.offsetWidth:Dt)};S.useEffect(function(){return pi},[]),S.useEffect(function(){dr&&pi()},[dr]),S.useEffect(function(){lt===Y&&Qe&&(Qe.body.current=cr.current)});var Ai=kt(["table"],"table"),Dr=S.useMemo(function(){return he||(ii?_e.x==="max-content"?"auto":"fixed":gr||En.some(function(ut){var Et=ut.ellipsis;return Et})?"fixed":"auto")},[gr,ii,En,he]),mi,vi={colWidths:si,columCount:En.length,stickyOffsets:fi,onHeaderRow:wt,fixHeader:gr},Yi=S.useMemo(function(){return ct?null:typeof Rt=="function"?Rt():Rt},[ct,Rt]),Ma=S.createElement(oe,{data:je,measureColumnWidth:gr||dr||wi,expandedKeys:bn,rowExpandable:Je,getRowKey:Wt,onRow:Mt,emptyNode:Yi,childrenColumnName:bt}),ba=S.createElement(x,{colWidths:En.map(function(ut){var Et=ut.width;return Et}),columns:En}),Mn=Ge&&S.createElement(de.b,null,Ge(je)),zi=kt(["body"]);if(gr||wi){var da;typeof zi=="function"?(da=zi(je,{scrollbarSize:Ot,ref:cr,onScroll:xr}),vi.colWidths=En.map(function(ut,Et){var Dt=ut.width,on=Et===Vt.length-1?Dt-Ot:Dt;return typeof on=="number"&&!Number.isNaN(on)?on:(Object(h.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):da=S.createElement("div",{style:Object(Z.a)(Object(Z.a)({},Zi),ln),onScroll:xr,ref:cr,className:T()("".concat(Xe,"-body"))},S.createElement(Ai,{style:Object(Z.a)(Object(Z.a)({},Tn),{},{tableLayout:Dr})},ba,Ma,Mn),wi&&S.createElement(M,{ref:li,offsetScroll:ca,scrollBodyRef:cr,onScroll:xr})),mi=S.createElement(S.Fragment,null,pt!==!1&&S.createElement(D,Object.assign({noData:!je.length},vi,sr,{direction:ve,offsetHeader:ua,stickyClassName:hi,ref:jn,onScroll:xr})),da)}else mi=S.createElement("div",{style:Object(Z.a)(Object(Z.a)({},Zi),ln),className:T()("".concat(Xe,"-content")),onScroll:xr,ref:cr},S.createElement(Ai,{style:Object(Z.a)(Object(Z.a)({},Tn),{},{tableLayout:Dr})},ba,pt!==!1&&S.createElement(m,Object.assign({},vi,sr)),Ma,Mn));var _a=Object(E.b)(Pe),$i=S.createElement("div",Object.assign({className:T()(Xe,tt,(Ie={},Object(ae.a)(Ie,"".concat(Xe,"-rtl"),ve==="rtl"),Object(ae.a)(Ie,"".concat(Xe,"-ping-left"),_r),Object(ae.a)(Ie,"".concat(Xe,"-ping-right"),Ur),Object(ae.a)(Ie,"".concat(Xe,"-layout-fixed"),he==="fixed"),Object(ae.a)(Ie,"".concat(Xe,"-fixed-header"),gr),Object(ae.a)(Ie,"".concat(Xe,"-fixed-column"),ii),Object(ae.a)(Ie,"".concat(Xe,"-scroll-horizontal"),dr),Object(ae.a)(Ie,"".concat(Xe,"-has-fix-left"),En[0]&&En[0].fixed),Object(ae.a)(Ie,"".concat(Xe,"-has-fix-right"),En[En.length-1]&&En[En.length-1].fixed==="right"),Ie)),style:Ke,id:qe,ref:nr},_a),S.createElement(me,{pingLeft:_r,pingRight:Ur,props:Object(Z.a)(Object(Z.a)({},Pe),{},{stickyOffsets:fi,mergedExpandedKeys:bn})},Ee&&S.createElement(Le,{className:"".concat(Xe,"-title")},Ee(je)),S.createElement("div",{className:"".concat(Xe,"-container")},mi),be&&S.createElement(Le,{className:"".concat(Xe,"-footer")},be(je))));dr&&($i=S.createElement(d.a,{onResize:Or},$i));var Gi=S.useMemo(function(){return{prefixCls:Xe,getComponent:kt,scrollbarSize:Ot,direction:ve,fixedInfoList:En.map(function(ut,Et){return u(Et,Et,En,fi,ve)}),isSticky:wi}},[Xe,kt,Ot,ve,En,fi,ve,wi]),ka=S.useMemo(function(){return Object(Z.a)(Object(Z.a)({},sr),{},{tableLayout:Dr,rowClassName:Ve,expandedRowClassName:Ct,componentWidth:Kt,fixHeader:gr,fixColumn:ii,horizonScroll:dr,expandIcon:Xt,expandableType:ht,expandRowByClick:He,expandedRowRender:te,onTriggerExpand:sn,expandIconColumnIndex:xt,indentSize:St})},[sr,Dr,Ve,Ct,Kt,gr,ii,dr,Xt,ht,He,te,sn,xt,St]),ot=S.useMemo(function(){return{onColumnResize:On}},[On]);return S.createElement(t.a.Provider,{value:Gi},S.createElement(F.Provider,{value:ka},S.createElement(J.Provider,{value:ot},$i)))}Re.Column=s.a,Re.ColumnGroup=c.a,Re.Summary=de.a,Re.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var rt=We.b=Re},wMS7:function($e,We,z){/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.0.8/LICENSE */(function(ae,Z){$e.exports=Z()})(this,function(){"use strict";function ae(Ce){if(Array.isArray(Ce)){for(var Le=0,de=Array(Ce.length);Le<Ce.length;Le++)de[Le]=Ce[Le];return de}else return Array.from(Ce)}var Z=Object.hasOwnProperty,U=Object.setPrototypeOf,w=Object.isFrozen,P=Object.keys,S=Object.freeze,C=Object.seal,T=Object.create,l=typeof Reflect!="undefined"&&Reflect,p=l.apply,h=l.construct;p||(p=function(Le,de,ue){return Le.apply(de,ue)}),S||(S=function(Le){return Le}),C||(C=function(Le){return Le}),h||(h=function(Le,de){return new(Function.prototype.bind.apply(Le,[null].concat(ae(de))))});var d=m(Array.prototype.forEach),o=m(Array.prototype.indexOf),c=m(Array.prototype.join),s=m(Array.prototype.pop),f=m(Array.prototype.push),i=m(Array.prototype.slice),n=m(String.prototype.toLowerCase),t=m(String.prototype.match),u=m(String.prototype.replace),y=m(String.prototype.indexOf),g=m(String.prototype.trim),_=m(RegExp.prototype.test),b=E(RegExp),v=E(TypeError);function m(Ce){return function(Le){for(var de=arguments.length,ue=Array(de>1?de-1:0),ke=1;ke<de;ke++)ue[ke-1]=arguments[ke];return p(Ce,Le,ue)}}function E(Ce){return function(){for(var Le=arguments.length,de=Array(Le),ue=0;ue<Le;ue++)de[ue]=arguments[ue];return h(Ce,de)}}function a(Ce,Le){U&&U(Ce,null);for(var de=Le.length;de--;){var ue=Le[de];if(typeof ue=="string"){var ke=n(ue);ke!==ue&&(w(Le)||(Le[de]=ke),ue=ke)}Ce[ue]=!0}return Ce}function x(Ce){var Le=T(null),de=void 0;for(de in Ce)p(Z,Ce,[de])&&(Le[de]=Ce[de]);return Le}var O=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),A=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),D=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),F=S(["#text"]),K=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns"]),ne=S(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),j=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),G=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),X=C(/\{\{[\s\S]*|[\s\S]*\}\}/gm),J=C(/<%[\s\S]*|[\s\S]*%>/gm),B=C(/^data-[\-\w.\u00B7-\uFFFF]/),Q=C(/^aria-[\-\w]+$/),ie=C(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),oe=C(/^(?:\w+script|data):/i),xe=C(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ce){return typeof Ce}:function(Ce){return Ce&&typeof Symbol=="function"&&Ce.constructor===Symbol&&Ce!==Symbol.prototype?"symbol":typeof Ce};function Ae(Ce){if(Array.isArray(Ce)){for(var Le=0,de=Array(Ce.length);Le<Ce.length;Le++)de[Le]=Ce[Le];return de}else return Array.from(Ce)}var pe=function(){return typeof window=="undefined"?null:window},Oe=function(Le,de){if((typeof Le=="undefined"?"undefined":ye(Le))!=="object"||typeof Le.createPolicy!="function")return null;var ue=null,ke="data-tt-policy-suffix";de.currentScript&&de.currentScript.hasAttribute(ke)&&(ue=de.currentScript.getAttribute(ke));var Ue="dompurify"+(ue?"#"+ue:"");try{return Le.createPolicy(Ue,{createHTML:function(ee){return ee}})}catch(Ye){return console.warn("TrustedTypes policy "+Ue+" could not be created."),null}};function Fe(){var Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pe(),Le=function(et){return Fe(et)};if(Le.version="2.0.15",Le.removed=[],!Ce||!Ce.document||Ce.document.nodeType!==9)return Le.isSupported=!1,Le;var de=Ce.document,ue=!1,ke=Ce.document,Ue=Ce.DocumentFragment,Ye=Ce.HTMLTemplateElement,ee=Ce.Node,M=Ce.NodeFilter,N=Ce.NamedNodeMap,$=N===void 0?Ce.NamedNodeMap||Ce.MozNamedAttrMap:N,V=Ce.Text,Y=Ce.Comment,me=Ce.DOMParser,Re=Ce.trustedTypes;if(typeof Ye=="function"){var rt=ke.createElement("template");rt.content&&rt.content.ownerDocument&&(ke=rt.content.ownerDocument)}var Pe=Oe(Re,de),Ie=Pe&&we?Pe.createHTML(""):"",Xe=ke,tt=Xe.implementation,Ve=Xe.createNodeIterator,Ke=Xe.getElementsByTagName,Ne=Xe.createDocumentFragment,De=de.importNode,_e=x(ke).documentMode?ke.documentMode:{},he={};Le.isSupported=tt&&typeof tt.createHTMLDocument!="undefined"&&_e!==9;var ve=X,Ee=J,be=B,Ge=Q,qe=oe,pt=xe,Pt=ie,Rt=null,Mt=a({},[].concat(Ae(O),Ae(A),Ae(D),Ae(I),Ae(F))),wt=null,lt=a({},[].concat(Ae(K),Ae(ne),Ae(j),Ae(G))),ft=null,Qe=null,Te=!0,je=!0,ct=!1,Ze=!1,Tt=!1,Ot=!1,st=!1,gt=!1,kt=!1,Wt=!1,Qt=!1,we=!1,fe=!0,W=!0,q=!1,te={},se=a({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),Se=null,He=a({},["audio","video","img","source","image","track"]),Je=null,xt=a({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ct=null,it=ke.createElement("form"),St=function(et){if(Ct&&Ct===et)return;(!et||(typeof et=="undefined"?"undefined":ye(et))!=="object")&&(et={}),et=x(et),Rt="ALLOWED_TAGS"in et?a({},et.ALLOWED_TAGS):Mt,wt="ALLOWED_ATTR"in et?a({},et.ALLOWED_ATTR):lt,Je="ADD_URI_SAFE_ATTR"in et?a(x(xt),et.ADD_URI_SAFE_ATTR):xt,Se="ADD_DATA_URI_TAGS"in et?a(x(He),et.ADD_DATA_URI_TAGS):He,ft="FORBID_TAGS"in et?a({},et.FORBID_TAGS):{},Qe="FORBID_ATTR"in et?a({},et.FORBID_ATTR):{},te="USE_PROFILES"in et?et.USE_PROFILES:!1,Te=et.ALLOW_ARIA_ATTR!==!1,je=et.ALLOW_DATA_ATTR!==!1,ct=et.ALLOW_UNKNOWN_PROTOCOLS||!1,Ze=et.SAFE_FOR_JQUERY||!1,Tt=et.SAFE_FOR_TEMPLATES||!1,Ot=et.WHOLE_DOCUMENT||!1,kt=et.RETURN_DOM||!1,Wt=et.RETURN_DOM_FRAGMENT||!1,Qt=et.RETURN_DOM_IMPORT||!1,we=et.RETURN_TRUSTED_TYPE||!1,gt=et.FORCE_BODY||!1,fe=et.SANITIZE_DOM!==!1,W=et.KEEP_CONTENT!==!1,q=et.IN_PLACE||!1,Pt=et.ALLOWED_URI_REGEXP||Pt,Tt&&(je=!1),Wt&&(kt=!0),te&&(Rt=a({},[].concat(Ae(F))),wt=[],te.html===!0&&(a(Rt,O),a(wt,K)),te.svg===!0&&(a(Rt,A),a(wt,ne),a(wt,G)),te.svgFilters===!0&&(a(Rt,D),a(wt,ne),a(wt,G)),te.mathMl===!0&&(a(Rt,I),a(wt,j),a(wt,G))),et.ADD_TAGS&&(Rt===Mt&&(Rt=x(Rt)),a(Rt,et.ADD_TAGS)),et.ADD_ATTR&&(wt===lt&&(wt=x(wt)),a(wt,et.ADD_ATTR)),et.ADD_URI_SAFE_ATTR&&a(Je,et.ADD_URI_SAFE_ATTR),W&&(Rt["#text"]=!0),Ot&&a(Rt,["html","head","body"]),Rt.table&&(a(Rt,["tbody"]),delete ft.tbody),S&&S(et),Ct=et},Xt=function(et){f(Le.removed,{element:et});try{et.parentNode.removeChild(et)}catch(Ut){et.outerHTML=Ie}},bt=function(et,Ut){try{f(Le.removed,{attribute:Ut.getAttributeNode(et),from:Ut})}catch(Yt){f(Le.removed,{attribute:null,from:Ut})}Ut.removeAttribute(et)},ht=function(et){var Ut=void 0,Yt=void 0;if(gt)et="<remove></remove>"+et;else{var Vt=t(et,/^[\r\n\t ]+/);Yt=Vt&&Vt[0]}var En=Pe?Pe.createHTML(et):et;try{Ut=new me().parseFromString(En,"text/html")}catch(jn){}if(ue&&a(ft,["title"]),!Ut||!Ut.documentElement){Ut=tt.createHTMLDocument("");var sr=Ut,nr=sr.body;nr.parentNode.removeChild(nr.parentNode.firstElementChild),nr.outerHTML=En}return et&&Yt&&Ut.body.insertBefore(ke.createTextNode(Yt),Ut.body.childNodes[0]||null),Ke.call(Ut,Ot?"html":"body")[0]};Le.isSupported&&function(){try{var Kt=ht("<x/><title>&lt;/title&gt;&lt;img&gt;");_(/<\/title/,Kt.querySelector("title").innerHTML)&&(ue=!0)}catch(et){}}();var Jt=function(et){return Ve.call(et.ownerDocument||et,et,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT,function(){return M.FILTER_ACCEPT},!1)},Nt=function(et){return et instanceof V||et instanceof Y?!1:typeof et.nodeName!="string"||typeof et.textContent!="string"||typeof et.removeChild!="function"||!(et.attributes instanceof $)||typeof et.removeAttribute!="function"||typeof et.setAttribute!="function"||typeof et.namespaceURI!="string"},mt=function(et){return(typeof ee=="undefined"?"undefined":ye(ee))==="object"?et instanceof ee:et&&(typeof et=="undefined"?"undefined":ye(et))==="object"&&typeof et.nodeType=="number"&&typeof et.nodeName=="string"},cn=function(et,Ut,Yt){if(!he[et])return;d(he[et],function(Vt){Vt.call(Le,Ut,Yt,Ct)})},bn=function(et){var Ut=void 0;if(cn("beforeSanitizeElements",et,null),Nt(et))return Xt(et),!0;if(t(et.nodeName,/[\u0080-\uFFFF]/))return Xt(et),!0;var Yt=n(et.nodeName);if(cn("uponSanitizeElement",et,{tagName:Yt,allowedTags:Rt}),(Yt==="svg"||Yt==="math")&&et.querySelectorAll("p, br").length!==0)return Xt(et),!0;if(!Rt[Yt]||ft[Yt]){if(W&&!se[Yt]&&typeof et.insertAdjacentHTML=="function")try{var Vt=et.innerHTML;et.insertAdjacentHTML("AfterEnd",Pe?Pe.createHTML(Vt):Vt)}catch(En){}return Xt(et),!0}return Yt==="noscript"&&_(/<\/noscript/i,et.innerHTML)||Yt==="noembed"&&_(/<\/noembed/i,et.innerHTML)?(Xt(et),!0):(Ze&&!mt(et.firstElementChild)&&(!mt(et.content)||!mt(et.content.firstElementChild))&&_(/</g,et.textContent)&&(f(Le.removed,{element:et.cloneNode()}),et.innerHTML?et.innerHTML=u(et.innerHTML,/</g,"&lt;"):et.innerHTML=u(et.textContent,/</g,"&lt;")),Tt&&et.nodeType===3&&(Ut=et.textContent,Ut=u(Ut,ve," "),Ut=u(Ut,Ee," "),et.textContent!==Ut&&(f(Le.removed,{element:et.cloneNode()}),et.textContent=Ut)),cn("afterSanitizeElements",et,null),!1)},sn=function(et,Ut,Yt){if(fe&&(Ut==="id"||Ut==="name")&&(Yt in ke||Yt in it))return!1;if(!(je&&_(be,Ut))){if(!(Te&&_(Ge,Ut))){if(!wt[Ut]||Qe[Ut])return!1;if(!Je[Ut]){if(!_(Pt,u(Yt,pt,""))){if(!((Ut==="src"||Ut==="xlink:href"||Ut==="href")&&et!=="script"&&y(Yt,"data:")===0&&Se[et])){if(!(ct&&!_(qe,u(Yt,pt,"")))){if(Yt)return!1}}}}}}return!0},dn=function(et){var Ut=void 0,Yt=void 0,Vt=void 0,En=void 0,sr=void 0;cn("beforeSanitizeAttributes",et,null);var nr=et.attributes;if(!nr)return;var jn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:wt};for(sr=nr.length;sr--;){Ut=nr[sr];var cr=Ut,qn=cr.name,Wr=cr.namespaceURI;if(Yt=g(Ut.value),Vt=n(qn),jn.attrName=Vt,jn.attrValue=Yt,jn.keepAttr=!0,jn.forceKeepAttr=void 0,cn("uponSanitizeAttribute",et,jn),Yt=jn.attrValue,jn.forceKeepAttr)continue;if(Vt==="name"&&et.nodeName==="IMG"&&nr.id)En=nr.id,nr=i(nr,[]),bt("id",et),bt(qn,et),o(nr,En)>sr&&et.setAttribute("id",En.value);else{if(et.nodeName==="INPUT"&&Vt==="type"&&Yt==="file"&&jn.keepAttr&&(wt[Vt]||!Qe[Vt]))continue;qn==="id"&&et.setAttribute(qn,""),bt(qn,et)}if(!jn.keepAttr)continue;if(Ze&&_(/\/>/i,Yt)){bt(qn,et);continue}if(_(/svg|math/i,et.namespaceURI)&&_(b("</("+c(P(se),"|")+")","i"),Yt)){bt(qn,et);continue}Tt&&(Yt=u(Yt,ve," "),Yt=u(Yt,Ee," "));var _r=et.nodeName.toLowerCase();if(!sn(_r,Vt,Yt))continue;try{Wr?et.setAttributeNS(Wr,qn,Yt):et.setAttribute(qn,Yt),s(Le.removed)}catch(Rr){}}cn("afterSanitizeAttributes",et,null)},Nn=function Kt(et){var Ut=void 0,Yt=Jt(et);for(cn("beforeSanitizeShadowDOM",et,null);Ut=Yt.nextNode();){if(cn("uponSanitizeShadowNode",Ut,null),bn(Ut))continue;Ut.content instanceof Ue&&Kt(Ut.content),dn(Ut)}cn("afterSanitizeShadowDOM",et,null)};return Le.sanitize=function(Kt,et){var Ut=void 0,Yt=void 0,Vt=void 0,En=void 0,sr=void 0;if(Kt||(Kt="<!-->"),typeof Kt!="string"&&!mt(Kt)){if(typeof Kt.toString!="function")throw v("toString is not a function");if(Kt=Kt.toString(),typeof Kt!="string")throw v("dirty is not a string, aborting")}if(!Le.isSupported){if(ye(Ce.toStaticHTML)==="object"||typeof Ce.toStaticHTML=="function"){if(typeof Kt=="string")return Ce.toStaticHTML(Kt);if(mt(Kt))return Ce.toStaticHTML(Kt.outerHTML)}return Kt}if(st||St(et),Le.removed=[],typeof Kt=="string"&&(q=!1),!q)if(Kt instanceof ee)Ut=ht("<!-->"),Yt=Ut.ownerDocument.importNode(Kt,!0),Yt.nodeType===1&&Yt.nodeName==="BODY"||Yt.nodeName==="HTML"?Ut=Yt:Ut.appendChild(Yt);else{if(!kt&&!Tt&&!Ot&&Kt.indexOf("<")===-1)return Pe&&we?Pe.createHTML(Kt):Kt;if(Ut=ht(Kt),!Ut)return kt?null:Ie}Ut&&gt&&Xt(Ut.firstChild);for(var nr=Jt(q?Kt:Ut);Vt=nr.nextNode();){if(Vt.nodeType===3&&Vt===En)continue;if(bn(Vt))continue;Vt.content instanceof Ue&&Nn(Vt.content),dn(Vt),En=Vt}if(En=null,q)return Kt;if(kt){if(Wt)for(sr=Ne.call(Ut.ownerDocument);Ut.firstChild;)sr.appendChild(Ut.firstChild);else sr=Ut;return Qt&&(sr=De.call(de,sr,!0)),sr}var jn=Ot?Ut.outerHTML:Ut.innerHTML;return Tt&&(jn=u(jn,ve," "),jn=u(jn,Ee," ")),Pe&&we?Pe.createHTML(jn):jn},Le.setConfig=function(Kt){St(Kt),st=!0},Le.clearConfig=function(){Ct=null,st=!1},Le.isValidAttribute=function(Kt,et,Ut){Ct||St({});var Yt=n(Kt),Vt=n(et);return sn(Yt,Vt,Ut)},Le.addHook=function(Kt,et){if(typeof et!="function")return;he[Kt]=he[Kt]||[],f(he[Kt],et)},Le.removeHook=function(Kt){he[Kt]&&s(he[Kt])},Le.removeHooks=function(Kt){he[Kt]&&(he[Kt]=[])},Le.removeAllHooks=function(){he={}},Le}var Me=Fe();return Me})},wRmb:function($e,We,z){"use strict";z.d(We,"a",function(){return p});var ae=z("rePB"),Z=z("KQm4"),U=z("VTBJ"),w=z("Ff2n"),P=z("q1tI"),S=z.n(P),C=z("Kwbf"),T=z("Zm9Q"),l=z("hW8S");function p(s){return Object(T.a)(s).filter(function(f){return P.isValidElement(f)}).map(function(f){var i=f.key,n=f.props,t=n.children,u=Object(w.a)(n,["children"]),y=Object(U.a)({key:i},u);return t&&(y.children=p(t)),y})}function h(s){return s.reduce(function(f,i){var n=i.fixed,t=n===!0?"left":n,u=i.children;return u&&u.length>0?[].concat(Object(Z.a)(f),Object(Z.a)(h(u).map(function(y){return Object(U.a)({fixed:t},y)}))):[].concat(Object(Z.a)(f),[Object(U.a)(Object(U.a)({},i),{},{fixed:t})])},[])}function d(s){for(var f=!0,i=0;i<s.length;i+=1){var n=s[i];if(f&&n.fixed!=="left")f=!1;else if(!f&&n.fixed==="left"){Object(C.a)(!1,"Index ".concat(i-1," of `columns` missing `fixed='left'` prop."));break}}for(var t=!0,u=s.length-1;u>=0;u-=1){var y=s[u];if(t&&y.fixed!=="right")t=!1;else if(!t&&y.fixed==="right"){Object(C.a)(!1,"Index ".concat(u+1," of `columns` missing `fixed='right'` prop."));break}}}function o(s){return s.map(function(f){var i=f.fixed,n=Object(w.a)(f,["fixed"]),t=i;return i==="left"?t="right":i==="right"&&(t="left"),Object(U.a)({fixed:t},n)})}function c(s,f){var i=s.prefixCls,n=s.columns,t=s.children,u=s.expandable,y=s.expandedKeys,g=s.getRowKey,_=s.onTriggerExpand,b=s.expandIcon,v=s.rowExpandable,m=s.expandIconColumnIndex,E=s.direction,a=s.expandRowByClick,x=P.useMemo(function(){return n||p(t)},[n,t]),O=P.useMemo(function(){if(u){var I,F=m||0,K=x[F],ne=(I={},Object(ae.a)(I,l.a,{className:"".concat(i,"-expand-icon-col")}),Object(ae.a)(I,"title",""),Object(ae.a)(I,"fixed",K?K.fixed:null),Object(ae.a)(I,"className","".concat(i,"-row-expand-icon-cell")),Object(ae.a)(I,"render",function(X,J,B){var Q=g(J,B),ie=y.has(Q),oe=v?v(J):!0,xe=b({prefixCls:i,expanded:ie,expandable:oe,record:J,onExpand:_});return a?P.createElement("span",{onClick:function(Ae){return Ae.stopPropagation()}},xe):xe}),I),j=x.slice();return F>=0&&j.splice(F,0,ne),j}return x},[u,x,g,y,b,E]),A=P.useMemo(function(){var I=O;return f&&(I=f(I)),I.length||(I=[{render:function(){return null}}]),I},[f,O,E]),D=P.useMemo(function(){return E==="rtl"?o(h(A)):h(A)},[A,E]);return[A,D]}We.b=c},wW8i:function($e,We,z){$e.exports={flex_box_center:"flex_box_center___3xqQI",flex_space_between:"flex_space_between___1fvHN",flex_box_vertical_center:"flex_box_vertical_center___1Gb4J",flex_box_center_end:"flex_box_center_end___8RbQi",flex_box_column:"flex_box_column___3xL78",discuss:"discuss___ybobd",reply:"reply___3EgHc",pagination:"pagination___2EiMG"}},"y0+3":function($e,We,z){"use strict";z.d(We,"a",function(){return h}),z.d(We,"b",function(){return o});var ae=/margin|padding|width|height|max|min|offset/,Z={left:!0,top:!0},U={cssFloat:1,styleFloat:1,float:1};function w(c){return c.nodeType===1?c.ownerDocument.defaultView.getComputedStyle(c,null):{}}function P(c,s,f){if(s=s.toLowerCase(),f==="auto"){if(s==="height")return c.offsetHeight;if(s==="width")return c.offsetWidth}return s in Z||(Z[s]=ae.test(s)),Z[s]?parseFloat(f)||0:f}function S(c,s){var f=arguments.length,i=w(c);return s=U[s]?"cssFloat"in c.style?"cssFloat":"styleFloat":s,f===1?i:P(c,s,i[s]||c.style[s])}function C(c,s,f){var i=arguments.length;if(s=U[s]?"cssFloat"in c.style?"cssFloat":"styleFloat":s,i===3)return typeof f=="number"&&ae.test(s)&&(f="".concat(f,"px")),c.style[s]=f,f;for(var n in s)s.hasOwnProperty(n)&&C(c,n,s[n]);return w(c)}function T(c){return c===document.body?document.documentElement.clientWidth:c.offsetWidth}function l(c){return c===document.body?window.innerHeight||document.documentElement.clientHeight:c.offsetHeight}function p(){var c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),s=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:c,height:s}}function h(){var c=document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return{width:c,height:s}}function d(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function o(c){var s=c.getBoundingClientRect(),f=document.documentElement;return{left:s.left+(window.pageXOffset||f.scrollLeft)-(f.clientLeft||document.body.clientLeft||0),top:s.top+(window.pageYOffset||f.scrollTop)-(f.clientTop||document.body.clientTop||0)}}},ynwM:function($e,We,z){var ae=z("MFOe"),Z=ae.Global;$e.exports={name:"oldFF-globalStorage",read:w,write:P,each:S,remove:C,clearAll:T};var U=Z.globalStorage;function w(l){return U[l]}function P(l,p){U[l]=p}function S(l){for(var p=U.length-1;p>=0;p--){var h=U.key(p);l(U[h],h)}}function C(l){return U.removeItem(l)}function T(){S(function(l,p){delete U[l]})}}}]);