|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[187,3,5,7,8,20],{"++UQ":function($e,We,z){},"+NIl":function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";ae.defineMode("stex",function(Z,U){"use strict";function w(u,s){u.cmdState.push(s)}function P(u){return u.cmdState.length>0?u.cmdState[u.cmdState.length-1]:null}function S(u){var s=u.cmdState.pop();s&&s.closeBracket()}function O(u){for(var s=u.cmdState,f=s.length-1;f>=0;f--){var i=s[f];if(i.name=="DEFAULT")continue;return i}return{styleIdentifier:function(){return null}}}function T(u,s,f){return function(){this.name=u,this.bracketNo=0,this.style=s,this.styles=f,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var l={};l.importmodule=T("importmodule","tag",["string","builtin"]),l.documentclass=T("documentclass","tag",["","atom"]),l.usepackage=T("usepackage","tag",["atom"]),l.begin=T("begin","tag",["atom"]),l.end=T("end","tag",["atom"]),l.label=T("label","tag",["atom"]),l.ref=T("ref","tag",["atom"]),l.eqref=T("eqref","tag",["atom"]),l.cite=T("cite","tag",["atom"]),l.bibitem=T("bibitem","tag",["atom"]),l.Bibitem=T("Bibitem","tag",["atom"]),l.RBibitem=T("RBibitem","tag",["atom"]),l.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function p(u,s){u.f=s}function h(u,s){var f;if(u.match(/^\\[a-zA-Z@]+/)){var i=u.current().slice(1);return f=l.hasOwnProperty(i)?l[i]:l.DEFAULT,f=new f,w(s,f),p(s,a),f.style}if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/\\]/))return"tag";if(u.match("\\["))return p(s,function(t,c){return d(t,c,"\\]")}),"keyword";if(u.match("\\("))return p(s,function(t,c){return d(t,c,"\\)")}),"keyword";if(u.match("$$"))return p(s,function(t,c){return d(t,c,"$$")}),"keyword";if(u.match("$"))return p(s,function(t,c){return d(t,c,"$")}),"keyword";var n=u.next();if(n=="%")return u.skipToEnd(),"comment";if(n=="}"||n=="]"){if(f=P(s),f)f.closeBracket(n),p(s,a);else return"error";return"bracket"}else return n=="{"||n=="["?(f=l.DEFAULT,f=new f,w(s,f),"bracket"):/\d/.test(n)?(u.eatWhile(/[\w.%]/),"atom"):(u.eatWhile(/[\w\-_]/),f=O(s),f.name=="begin"&&(f.argument=u.current()),f.styleIdentifier())}function d(u,s,f){if(u.eatSpace())return null;if(f&&u.match(f))return p(s,h),"keyword";if(u.match(/^\\[a-zA-Z@]+/))return"tag";if(u.match(/^[a-zA-Z]+/))return"variable-2";if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/]/))return"tag";if(u.match(/^[\^_&]/))return"tag";if(u.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(u.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=u.next();return i=="{"||i=="}"||i=="["||i=="]"||i=="("||i==")"?"bracket":i=="%"?(u.skipToEnd(),"comment"):"error"}function a(u,s){var f=u.peek(),i;return f=="{"||f=="["?(i=P(s),i.openBracket(f),u.eat(f),p(s,h),"bracket"):/[ \t\r]/.test(f)?(u.eat(f),null):(p(s,h),S(s),h(u,s))}return{startState:function(){var u=U.inMathMode?function(s,f){return d(s,f)}:h;return{cmdState:[],f:u}},copyState:function(u){return{cmdState:u.cmdState.slice(),f:u.f}},token:function(u,s){return s.f(u,s)},blankLine:function(u){u.f=h,u.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},"+QRC":function($e,We,z){"use strict";var ae=z("E9nw"),Z={"text/plain":"Text","text/html":"Url",default:"Text"},U="Copy to clipboard: #{key}, Enter";function w(S){var O=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return S.replace(/#{\s*key\s*}/g,O)}function P(S,O){var T,l,p,h,d,a,u=!1;O||(O={}),T=O.debug||!1;try{p=ae(),h=document.createRange(),d=document.getSelection(),a=document.createElement("span"),a.textContent=S,a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(f){if(f.stopPropagation(),O.format)if(f.preventDefault(),typeof f.clipboardData=="undefined"){T&&console.warn("unable to use e.clipboardData"),T&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=Z[O.format]||Z.default;window.clipboardData.setData(i,S)}else f.clipboardData.clearData(),f.clipboardData.setData(O.format,S);O.onCopy&&(f.preventDefault(),O.onCopy(f.clipboardData))}),document.body.appendChild(a),h.selectNodeContents(a),d.addRange(h);var s=document.execCommand("copy");if(!s)throw new Error("copy command was unsuccessful");u=!0}catch(f){T&&console.error("unable to copy using execCommand: ",f),T&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(O.format||"text",S),O.onCopy&&O.onCopy(window.clipboardData),u=!0}catch(i){T&&console.error("unable to copy using clipboardData: ",i),T&&console.error("falling back to prompt"),l=w("message"in O?O.message:U),window.prompt(l,S)}}finally{d&&(typeof d.removeRange=="function"?d.removeRange(h):d.removeAllRanges()),a&&document.body.removeChild(a),p()}return u}$e.exports=P},"07cG":function($e,We,z){$e.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0r65":function($e,We){var z=arguments[3],ae=arguments[4],Z=arguments[5],U=JSON.stringify;$e.exports=function(w,P){for(var S,O=Object.keys(Z),T=0,l=O.length;T<l;T++){var p=O[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=O.length;T<l;T++){var p=O[T];d[p]=p}ae[S]=["function(require,module,exports){"+w+"(self); }",d]}var a=Math.floor(Math.pow(16,8)*Math.random()).toString(16),u={};u[S]=S,ae[a]=["function(require,module,exports){var f = require("+U(S)+");(f.default ? f.default : f)(self);}",u];var s={};f(a);function f(v){s[v]=!0;for(var _ in ae[v][1]){var b=ae[v][1][_];s[b]||f(b)}}var i="("+z+")({"+Object.keys(s).map(function(v){return U(v)+":["+ae[v][0]+","+U(ae[v][1])+"]"}).join(",")+"},{},["+U(a)+"])",n=window.URL||window.webkitURL||window.mozURL||window.msURL,t=new Blob([i],{type:"text/javascript"});if(P&&P.bare)return t;var c=n.createObjectURL(t),y=new Worker(c);return y.objectURL=c,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){O(T)&&U(T)}function S(T){var l=T.getWrapperElement(),p=O(T);l.className=l.className.replace(" CodeMirror-empty","")+(p?" CodeMirror-empty":""),p?U(T):Z(T)}function O(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,O={},T=P.htmlMode?Z:U;for(var l in T)O[l]=T[l];for(var l in P)O[l]=P[l];var p,h;function d(x,C){function A(F){return C.tokenize=F,F(x,C)}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\._\-]/),C.tokenize=s("meta","?>"),"meta"):(p=x.eat("/")?"closeTag":"openTag",C.tokenize=a,"tag bracket");if(D=="&"){var I;return x.eat("#")?x.eat("x")?I=x.eatWhile(/[a-fA-F\d]/)&&x.eat(";"):I=x.eatWhile(/[\d]/)&&x.eat(";"):I=x.eatWhile(/[\w\.\-:]/)&&x.eat(";"),I?"atom":"error"}else return x.eatWhile(/[^&<]/),null}d.isInText=!0;function a(x,C){var A=x.next();if(A==">"||A=="/"&&x.eat(">"))return C.tokenize=d,p=A==">"?"endTag":"selfcloseTag","tag bracket";if(A=="=")return p="equals",null;if(A=="<"){C.tokenize=d,C.state=c,C.tagName=C.tagStart=null;var D=C.tokenize(x,C);return D?D+" tag error":"tag error"}else return/[\'\"]/.test(A)?(C.tokenize=u(A),C.stringStartCol=x.column(),C.tokenize(x,C)):(x.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function u(x){var C=function(A,D){for(;!A.eol();)if(A.next()==x){D.tokenize=a;break}return"string"};return C.isInAttribute=!0,C}function s(x,C){return function(A,D){for(;!A.eol();){if(A.match(C)){D.tokenize=d;break}A.next()}return x}}function f(x){return function(C,A){for(var D;(D=C.next())!=null;){if(D=="<")return A.tokenize=f(x+1),A.tokenize(C,A);if(D==">")if(x==1){A.tokenize=d;break}else return A.tokenize=f(x-1),A.tokenize(C,A)}return"meta"}}function i(x,C,A){this.prev=x.context,this.tagName=C,this.indent=x.indented,this.startOfLine=A,(O.doNotIndent.hasOwnProperty(C)||x.context&&x.context.noIndent)&&(this.noIndent=!0)}function n(x){x.context&&(x.context=x.context.prev)}function t(x,C){for(var A;;){if(!x.context)return;if(A=x.context.tagName,!O.contextGrabbers.hasOwnProperty(A)||!O.contextGrabbers[A].hasOwnProperty(C))return;n(x)}}function c(x,C,A){return x=="openTag"?(A.tagStart=C.column(),y):x=="closeTag"?v:c}function y(x,C,A){return x=="word"?(A.tagName=C.current(),h="tag",m):O.allowMissingTagName&&x=="endTag"?(h="tag bracket",m(x,C,A)):(h="error",y)}function v(x,C,A){if(x=="word"){var D=C.current();return A.context&&A.context.tagName!=D&&O.implicitlyClosed.hasOwnProperty(A.context.tagName)&&n(A),A.context&&A.context.tagName==D||O.matchClosing===!1?(h="tag",_):(h="tag error",b)}else return O.allowMissingTagName&&x=="endTag"?(h="tag bracket",_(x,C,A)):(h="error",b)}function _(x,C,A){return x!="endTag"?(h="error",_):(n(A),c)}function b(x,C,A){return h="error",_(x,C,A)}function m(x,C,A){if(x=="word")return h="attribute",g;if(x=="endTag"||x=="selfcloseTag"){var D=A.tagName,I=A.tagStart;return A.tagName=A.tagStart=null,x=="selfcloseTag"||O.autoSelfClosers.hasOwnProperty(D)?t(A,D):(t(A,D),A.context=new i(A,D,I==A.indented)),c}return h="error",m}function g(x,C,A){return x=="equals"?E:(O.allowMissing||(h="error"),m(x,C,A))}function E(x,C,A){return x=="string"?o:x=="word"&&O.allowUnquoted?(h="string",m):(h="error",m(x,C,A))}function o(x,C,A){return x=="string"?o:m(x,C,A)}return{startState:function(x){var C={tokenize:d,state:c,indented:x||0,tagName:null,tagStart:null,context:null};return x!=null&&(C.baseIndent=x),C},token:function(x,C){if(!C.tagName&&x.sol()&&(C.indented=x.indentation()),x.eatSpace())return null;p=null;var A=C.tokenize(x,C);return(A||p)&&A!="comment"&&(h=null,C.state=C.state(p||A,x,C),h&&(A=h=="error"?A+" error":h)),A},indent:function(x,C,A){var D=x.context;if(x.tokenize.isInAttribute)return x.tagStart==x.indented?x.stringStartCol+1:x.indented+S;if(D&&D.noIndent)return ae.Pass;if(x.tokenize!=a&&x.tokenize!=d)return A?A.match(/^(\s*)/)[0].length:0;if(x.tagName)return O.multilineTagIndentPastTag!==!1?x.tagStart+x.tagName.length+2:x.tagStart+S*(O.multilineTagIndentFactor||1);if(O.alignCDATA&&/<!\[CDATA\[/.test(C))return 0;var I=C&&/^<(\/)?([\w_:\.-]*)/.exec(C);if(I&&I[1])for(;D;)if(D.tagName==I[2]){D=D.prev;break}else if(O.implicitlyClosed.hasOwnProperty(D.tagName))D=D.prev;else break;else if(I)for(;D;){var F=O.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:O.htmlMode?"html":"xml",helperType:O.htmlMode?"html":"xml",skipAttribute:function(x){x.state==E&&(x.state=m)},xmlCurrentTag:function(x){return x.tagName?{name:x.tagName,close:x.type=="closeTag"}:null},xmlCurrentContext:function(x){for(var C=[],A=x.context;A;A=A.prev)A.tagName&&C.push(A.tagName);return C.reverse()}}}),ae.defineMIME("text/xml","xml"),ae.defineMIME("application/xml","xml"),ae.mimeModes.hasOwnProperty("text/html")||ae.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function($e,We,z){"use strict";z.d(We,"d",function(){return $}),z.d(We,"b",function(){return Ge}),z.d(We,"c",function(){return pt}),z.d(We,"a",function(){return jt});var ae=z("VTBJ"),Z=z("1OyB"),U=z("vuIU"),w=z("JX7q"),P=z("Ji7U"),S=z("LK+K"),O=z("q1tI"),T=z("I8Z2"),l=z("BGR+"),p=z("wx14"),h=z("rePB"),d=z("4IlW"),a=z("2GS6"),u=z("Gytx"),s=z.n(u),f=z("TSYQ"),i=z.n(f),n=z("U8pU"),t=z("ODXe"),c=/iPhone/i,y=/iPod/i,v=/iPad/i,_=/\bAndroid(?:.+)Mobile\b/i,b=/Android/i,m=/\bAndroid(?:.+)SD4930UR\b/i,g=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,E=/Windows Phone/i,o=/\bWindows(?:.+)ARM\b/i,x=/BlackBerry/i,C=/BB10/i,A=/Opera Mini/i,D=/\b(CriOS|Chrome)(?:.+)Mobile/i,I=/Mobile(?:.+)Firefox\b/i;function F(Lt,lt){return Lt.test(lt)}function H(Lt){var lt=Lt||(typeof navigator!="undefined"?navigator.userAgent:""),ft=lt.split("[FBAN");if(typeof ft[1]!="undefined"){var Qe=ft,Te=Object(t.a)(Qe,1);lt=Te[0]}if(ft=lt.split("Twitter"),typeof ft[1]!="undefined"){var je=ft,dt=Object(t.a)(je,1);lt=dt[0]}var Ze={apple:{phone:F(c,lt)&&!F(E,lt),ipod:F(y,lt),tablet:!F(c,lt)&&F(v,lt)&&!F(E,lt),device:(F(c,lt)||F(y,lt)||F(v,lt))&&!F(E,lt)},amazon:{phone:F(m,lt),tablet:!F(m,lt)&&F(g,lt),device:F(m,lt)||F(g,lt)},android:{phone:!F(E,lt)&&F(m,lt)||!F(E,lt)&&F(_,lt),tablet:!F(E,lt)&&!F(m,lt)&&!F(_,lt)&&(F(g,lt)||F(b,lt)),device:!F(E,lt)&&(F(m,lt)||F(g,lt)||F(_,lt)||F(b,lt))||F(/\bokhttp\b/i,lt)},windows:{phone:F(E,lt),tablet:F(o,lt),device:F(E,lt)||F(o,lt)},other:{blackberry:F(x,lt),blackberry10:F(C,lt),opera:F(A,lt),firefox:F(I,lt),chrome:F(D,lt),device:F(x,lt)||F(C,lt)||F(A,lt)||F(I,lt)||F(D,lt)},any:null,phone:null,tablet:null};return Ze.any=Ze.apple.device||Ze.android.device||Ze.windows.device||Ze.other.device,Ze.phone=Ze.apple.phone||Ze.android.phone||Ze.windows.phone,Ze.tablet=Ze.apple.tablet||Ze.android.tablet||Ze.windows.tablet,Ze}var te=Object(ae.a)(Object(ae.a)({},H()),{},{isMobile:H}),j=te;function G(){}function X(Lt,lt,ft){var Qe=lt||"";return Lt.key||"".concat(Qe,"item_").concat(ft)}function J(Lt){return"".concat(Lt,"-menu-")}function B(Lt,lt){var ft=-1;O.Children.forEach(Lt,function(Qe){ft+=1,Qe&&Qe.type&&Qe.type.isMenuItemGroup?O.Children.forEach(Qe.props.children,function(Te){ft+=1,lt(Te,ft)}):lt(Qe,ft)})}function Q(Lt,lt,ft){if(!Lt||ft.find)return;O.Children.forEach(Lt,function(Qe){if(Qe){var Te=Qe.type;if(!Te||!(Te.isSubMenu||Te.isMenuItem||Te.isMenuItemGroup))return;lt.indexOf(Qe.key)!==-1?ft.find=!0:Qe.props.children&&Q(Qe.props.children,lt,ft)}})}var ie=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],oe=function(lt){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Qe=lt&&typeof lt.getBoundingClientRect=="function"&<.getBoundingClientRect().width;if(Qe){if(ft){var Te=getComputedStyle(lt),je=Te.marginLeft,dt=Te.marginRight;Qe+=+je.replace("px","")+ +dt.replace("px","")}Qe=+Qe.toFixed(6)}return Qe||0},Ee=function(lt,ft,Qe){lt&&Object(n.a)(lt.style)==="object"&&(lt.style[ft]=Qe)},ye=function(){return j.any},Le=z("KQm4"),pe=z("Ff2n"),Ce=z("i8i4"),Be=z("bdgK"),Pe=z("uciX"),ke=z("8XRh"),Ne={adjustX:1,adjustY:1},he={topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Ne,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Ne,offset:[4,0]}},ue={topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Ne,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Ne,offset:[4,0]}},Ie=he,Ue=0,Ye={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ee=function(lt,ft,Qe){var Te=J(ft),je=lt.getState();lt.setState({defaultActiveFirst:Object(ae.a)(Object(ae.a)({},je.defaultActiveFirst),{},Object(h.a)({},Te,Qe))})},M=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(Qe){var Te;Object(Z.a)(this,ft),Te=lt.call(this,Qe),Te.onDestroy=function(ot){Te.props.onDestroy(ot)},Te.onKeyDown=function(ot){var gt=ot.keyCode,kt=Te.menuInstance,Kt=Te.props,Gt=Kt.isOpen,Se=Kt.store;if(gt===d.a.ENTER)return Te.onTitleClick(ot),ee(Se,Te.props.eventKey,!0),!0;if(gt===d.a.RIGHT)return Gt?kt.onKeyDown(ot):(Te.triggerOpenChange(!0),ee(Se,Te.props.eventKey,!0)),!0;if(gt===d.a.LEFT){var de;if(Gt)de=kt.onKeyDown(ot);else return;return de||(Te.triggerOpenChange(!1),de=!0),de}return Gt&&(gt===d.a.UP||gt===d.a.DOWN)?kt.onKeyDown(ot):void 0},Te.onOpenChange=function(ot){Te.props.onOpenChange(ot)},Te.onPopupVisibleChange=function(ot){Te.triggerOpenChange(ot,ot?"mouseenter":"mouseleave")},Te.onMouseEnter=function(ot){var gt=Te.props,kt=gt.eventKey,Kt=gt.onMouseEnter,Gt=gt.store;ee(Gt,Te.props.eventKey,!1),Kt({key:kt,domEvent:ot})},Te.onMouseLeave=function(ot){var gt=Te.props,kt=gt.parentMenu,Kt=gt.eventKey,Gt=gt.onMouseLeave;kt.subMenuInstance=Object(w.a)(Te),Gt({key:Kt,domEvent:ot})},Te.onTitleMouseEnter=function(ot){var gt=Te.props,kt=gt.eventKey,Kt=gt.onItemHover,Gt=gt.onTitleMouseEnter;Kt({key:kt,hover:!0}),Gt({key:kt,domEvent:ot})},Te.onTitleMouseLeave=function(ot){var gt=Te.props,kt=gt.parentMenu,Kt=gt.eventKey,Gt=gt.onItemHover,Se=gt.onTitleMouseLeave;kt.subMenuInstance=Object(w.a)(Te),Gt({key:Kt,hover:!1}),Se({key:Kt,domEvent:ot})},Te.onTitleClick=function(ot){var gt=Object(w.a)(Te),kt=gt.props;if(kt.onTitleClick({key:kt.eventKey,domEvent:ot}),kt.triggerSubMenuAction==="hover")return;Te.triggerOpenChange(!kt.isOpen,"click"),ee(kt.store,Te.props.eventKey,!1)},Te.onSubMenuClick=function(ot){typeof Te.props.onClick=="function"&&Te.props.onClick(Te.addKeyPath(ot))},Te.onSelect=function(ot){Te.props.onSelect(ot)},Te.onDeselect=function(ot){Te.props.onDeselect(ot)},Te.getPrefixCls=function(){return"".concat(Te.props.rootPrefixCls,"-submenu")},Te.getActiveClassName=function(){return"".concat(Te.getPrefixCls(),"-active")},Te.getDisabledClassName=function(){return"".concat(Te.getPrefixCls(),"-disabled")},Te.getSelectedClassName=function(){return"".concat(Te.getPrefixCls(),"-selected")},Te.getOpenClassName=function(){return"".concat(Te.props.rootPrefixCls,"-submenu-open")},Te.saveMenuInstance=function(ot){Te.menuInstance=ot},Te.addKeyPath=function(ot){return Object(ae.a)(Object(ae.a)({},ot),{},{keyPath:(ot.keyPath||[]).concat(Te.props.eventKey)})},Te.triggerOpenChange=function(ot,gt){var kt=Te.props.eventKey,Kt=function(){Te.onOpenChange({key:kt,item:Object(w.a)(Te),trigger:gt,open:ot})};gt==="mouseenter"?Te.mouseenterTimeout=setTimeout(function(){Kt()},0):Kt()},Te.isChildrenSelected=function(){var ot={find:!1};return Q(Te.props.children,Te.props.selectedKeys,ot),ot.find},Te.isOpen=function(){return Te.props.openKeys.indexOf(Te.props.eventKey)!==-1},Te.adjustWidth=function(){if(!Te.subMenuTitle||!Te.menuInstance)return;var ot=Ce.findDOMNode(Te.menuInstance);if(ot.offsetWidth>=Te.subMenuTitle.offsetWidth)return;ot.style.minWidth="".concat(Te.subMenuTitle.offsetWidth,"px")},Te.saveSubMenuTitle=function(ot){Te.subMenuTitle=ot},Te.getBaseProps=function(){var ot=Object(w.a)(Te),gt=ot.props;return{mode:gt.mode==="horizontal"?"vertical":gt.mode,visible:Te.props.isOpen,level:gt.level+1,inlineIndent:gt.inlineIndent,focusable:!1,onClick:Te.onSubMenuClick,onSelect:Te.onSelect,onDeselect:Te.onDeselect,onDestroy:Te.onDestroy,selectedKeys:gt.selectedKeys,eventKey:"".concat(gt.eventKey,"-menu-"),openKeys:gt.openKeys,motion:gt.motion,onOpenChange:Te.onOpenChange,subMenuOpenDelay:gt.subMenuOpenDelay,parentMenu:Object(w.a)(Te),subMenuCloseDelay:gt.subMenuCloseDelay,forceSubMenuRender:gt.forceSubMenuRender,triggerSubMenuAction:gt.triggerSubMenuAction,builtinPlacements:gt.builtinPlacements,defaultActiveFirst:gt.store.getState().defaultActiveFirst[J(gt.eventKey)],multiple:gt.multiple,prefixCls:gt.rootPrefixCls,id:Te.internalMenuId,manualRef:Te.saveMenuInstance,itemIcon:gt.itemIcon,expandIcon:gt.expandIcon,direction:gt.direction}},Te.getMotion=function(ot,gt){var kt=Object(w.a)(Te),Kt=kt.haveRendered,Gt=Te.props,Se=Gt.motion,de=Gt.rootPrefixCls,W=Object(ae.a)(Object(ae.a)({},Se),{},{leavedClassName:"".concat(de,"-hidden"),removeOnLeave:!1,motionAppear:Kt||!gt||ot!=="inline"});return W};var je=Qe.store,dt=Qe.eventKey,Ze=je.getState(),Tt=Ze.defaultActiveFirst;Te.isRootMenu=!1;var Ct=!1;return Tt&&(Ct=Tt[dt]),ee(je,dt,Ct),Te}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Te=this,je=this.props,dt=je.mode,Ze=je.parentMenu,Tt=je.manualRef;if(Tt&&Tt(this),dt!=="horizontal"||!Ze.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Te.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Te=this.props,je=Te.onDestroy,dt=Te.eventKey;je&&je(dt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Te){var je=this,dt=this.getBaseProps(),Ze=this.getMotion(dt.mode,dt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||dt.visible||dt.forceSubMenuRender,!this.haveOpened)return O.createElement("div",null);var Tt=dt.direction;return O.createElement(ke.default,Object.assign({visible:dt.visible},Ze),function(Ct){var ot=Ct.className,gt=Ct.style,kt=i()("".concat(dt.prefixCls,"-sub"),ot,Object(h.a)({},"".concat(dt.prefixCls,"-rtl"),Tt==="rtl"));return O.createElement(we,Object.assign({},dt,{id:je.internalMenuId,className:kt,style:gt}),Te)})}},{key:"render",value:function(){var Te,je=Object(ae.a)({},this.props),dt=je.isOpen,Ze=this.getPrefixCls(),Tt=je.mode==="inline",Ct=i()(Ze,"".concat(Ze,"-").concat(je.mode),(Te={},Object(h.a)(Te,je.className,!!je.className),Object(h.a)(Te,this.getOpenClassName(),dt),Object(h.a)(Te,this.getActiveClassName(),je.active||dt&&!Tt),Object(h.a)(Te,this.getDisabledClassName(),je.disabled),Object(h.a)(Te,this.getSelectedClassName(),this.isChildrenSelected()),Te));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(Ue+=1,this.internalMenuId="$__$".concat(Ue,"$Menu")));var ot={},gt={},kt={};je.disabled||(ot={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},gt={onClick:this.onTitleClick},kt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Kt={},Gt=je.direction;Tt&&(Gt==="rtl"?Kt.paddingRight=je.inlineIndent*je.level:Kt.paddingLeft=je.inlineIndent*je.level);var Se={};this.props.isOpen&&(Se={"aria-owns":this.internalMenuId});var de=null;je.mode!=="horizontal"&&(de=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(de=O.createElement(this.props.expandIcon,Object(ae.a)({},this.props))));var W=O.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Kt,className:"".concat(Ze,"-title"),role:"button"},kt,gt,{"aria-expanded":dt},Se,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,de||O.createElement("i",{className:"".concat(Ze,"-arrow")})),q=this.renderChildren(je.children),ne=je.parentMenu.isRootMenu?je.parentMenu.props.getPopupContainer:function(Qt){return Qt.parentNode},se=Ye[je.mode],xe=je.popupOffset?{offset:je.popupOffset}:{},He=je.mode==="inline"?"":je.popupClassName;He+=Gt==="rtl"?" ".concat(Ze,"-rtl"):"";var Je=je.disabled,Et=je.triggerSubMenuAction,St=je.subMenuOpenDelay,nt=je.forceSubMenuRender,xt=je.subMenuCloseDelay,ut=je.builtinPlacements;ie.forEach(function(Qt){return delete je[Qt]}),delete je.onClick;var _t=Gt==="rtl"?Object.assign({},ue,ut):Object.assign({},he,ut);return delete je.direction,O.createElement("li",Object.assign({},je,ot,{className:Ct,role:"menuitem"}),Tt&&W,Tt&&q,!Tt&&O.createElement(Pe.a,{prefixCls:Ze,popupClassName:i()("".concat(Ze,"-popup"),He),getPopupContainer:ne,builtinPlacements:_t,popupPlacement:se,popupVisible:dt,popupAlign:xe,popup:q,action:Je?[]:[Et],mouseEnterDelay:St,mouseLeaveDelay:xt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:nt},W))}}]),ft}(O.Component);M.defaultProps={onMouseEnter:G,onMouseLeave:G,onTitleMouseEnter:G,onTitleMouseLeave:G,onTitleClick:G,manualRef:G,mode:"vertical",title:""};var N=Object(T.b)(function(Lt,lt){var ft=Lt.openKeys,Qe=Lt.activeKey,Te=Lt.selectedKeys,je=lt.eventKey,dt=lt.subMenuKey;return{isOpen:ft.indexOf(je)>-1,active:Qe[dt]===je,selectedKeys:Te}})(M);N.isSubMenu=!0;var $=N,V="menuitem-overflowed",Y=.5,me=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(){var Qe;return Object(Z.a)(this,ft),Qe=lt.apply(this,arguments),Qe.resizeObserver=null,Qe.mutationObserver=null,Qe.originalTotalWidth=0,Qe.overflowedItems=[],Qe.menuItemSizes=[],Qe.cancelFrameId=null,Qe.state={lastVisibleIndex:void 0},Qe.getMenuItemNodes=function(){var Te=Qe.props.prefixCls,je=Ce.findDOMNode(Object(w.a)(Qe));return je?[].slice.call(je.children).filter(function(dt){return dt.className.split(" ").indexOf("".concat(Te,"-overflowed-submenu"))<0}):[]},Qe.getOverflowedSubMenuItem=function(Te,je,dt){var Ze=Qe.props,Tt=Ze.overflowedIndicator,Ct=Ze.level,ot=Ze.mode,gt=Ze.prefixCls,kt=Ze.theme;if(Ct!==1||ot!=="horizontal")return null;var Kt=Qe.props.children[0],Gt=Kt.props,Se=Gt.children,de=Gt.title,W=Gt.style,q=Object(pe.a)(Gt,["children","title","style"]),ne=Object(ae.a)({},W),se="".concat(Te,"-overflowed-indicator"),xe="".concat(Te,"-overflowed-indicator");je.length===0&&dt!==!0?ne=Object(ae.a)(Object(ae.a)({},ne),{},{display:"none"}):dt&&(ne=Object(ae.a)(Object(ae.a)({},ne),{},{visibility:"hidden",position:"absolute"}),se="".concat(se,"-placeholder"),xe="".concat(xe,"-placeholder"));var He=kt?"".concat(gt,"-").concat(kt):"",Je={};return ie.forEach(function(Et){q[Et]!==void 0&&(Je[Et]=q[Et])}),O.createElement($,Object.assign({title:Tt,className:"".concat(gt,"-overflowed-submenu"),popupClassName:He},Je,{key:se,eventKey:xe,disabled:!1,style:ne}),je)},Qe.setChildrenWidthAndResize=function(){if(Qe.props.mode!=="horizontal")return;var Te=Ce.findDOMNode(Object(w.a)(Qe));if(!Te)return;var je=Te.children;if(!je||je.length===0)return;var dt=Te.children[je.length-1];Ee(dt,"display","inline-block");var Ze=Qe.getMenuItemNodes(),Tt=Ze.filter(function(Ct){return Ct.className.split(" ").indexOf(V)>=0});Tt.forEach(function(Ct){Ee(Ct,"display","inline-block")}),Qe.menuItemSizes=Ze.map(function(Ct){return oe(Ct,!0)}),Tt.forEach(function(Ct){Ee(Ct,"display","none")}),Qe.overflowedIndicatorWidth=oe(Te.children[Te.children.length-1],!0),Qe.originalTotalWidth=Qe.menuItemSizes.reduce(function(Ct,ot){return Ct+ot},0),Qe.handleResize(),Ee(dt,"display","none")},Qe.handleResize=function(){if(Qe.props.mode!=="horizontal")return;var Te=Ce.findDOMNode(Object(w.a)(Qe));if(!Te)return;var je=oe(Te);Qe.overflowedItems=[];var dt=0,Ze;Qe.originalTotalWidth>je+Y&&(Ze=-1,Qe.menuItemSizes.forEach(function(Tt){dt+=Tt,dt+Qe.overflowedIndicatorWidth<=je&&(Ze+=1)})),Qe.setState({lastVisibleIndex:Ze})},Qe}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){var Te=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var je=Ce.findDOMNode(this);if(!je)return;this.resizeObserver=new Be.default(function(dt){dt.forEach(function(){var Ze=Te.cancelFrameId;cancelAnimationFrame(Ze),Te.cancelFrameId=requestAnimationFrame(Te.setChildrenWidthAndResize)})}),[].slice.call(je.children).concat(je).forEach(function(dt){Te.resizeObserver.observe(dt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Te.resizeObserver.disconnect(),[].slice.call(je.children).concat(je).forEach(function(dt){Te.resizeObserver.observe(dt)}),Te.setChildrenWidthAndResize()}),this.mutationObserver.observe(je,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(Te){var je=this,dt=this.state.lastVisibleIndex;return(Te||[]).reduce(function(Ze,Tt,Ct){var ot=Tt;if(je.props.mode==="horizontal"){var gt=je.getOverflowedSubMenuItem(Tt.props.eventKey,[]);dt!==void 0&&je.props.className.indexOf("".concat(je.props.prefixCls,"-root"))!==-1&&(Ct>dt&&(ot=O.cloneElement(Tt,{style:{display:"none"},eventKey:"".concat(Tt.props.eventKey,"-hidden"),className:"".concat(V)})),Ct===dt+1&&(je.overflowedItems=Te.slice(dt+1).map(function(Kt){return O.cloneElement(Kt,{key:Kt.props.eventKey,mode:"vertical-left"})}),gt=je.getOverflowedSubMenuItem(Tt.props.eventKey,je.overflowedItems)));var kt=[].concat(Object(Le.a)(Ze),[gt,ot]);return Ct===Te.length-1&&kt.push(je.getOverflowedSubMenuItem(Tt.props.eventKey,[],!0)),kt}return[].concat(Object(Le.a)(Ze),[ot])},[])}},{key:"render",value:function(){var Te=this.props,je=Te.visible,dt=Te.prefixCls,Ze=Te.overflowedIndicator,Tt=Te.mode,Ct=Te.level,ot=Te.tag,gt=Te.children,kt=Te.theme,Kt=Object(pe.a)(Te,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Gt=ot;return O.createElement(Gt,Object.assign({},Kt),this.renderChildren(gt))}}]),ft}(O.Component);me.defaultProps={tag:"div",className:""};var Re=me;function rt(Lt){return Lt.length?Lt.every(function(lt){return!!lt.props.disabled}):!0}function De(Lt,lt,ft){var Qe=Lt.getState();Lt.setState({activeKey:Object(ae.a)(Object(ae.a)({},Qe.activeKey),{},Object(h.a)({},lt,ft))})}function Me(Lt){return Lt.eventKey||"0-menu-"}function Xe(Lt,lt){var ft=lt,Qe=Lt.children,Te=Lt.eventKey;if(ft){var je;if(B(Qe,function(dt,Ze){dt&&dt.props&&!dt.props.disabled&&ft===X(dt,Te,Ze)&&(je=!0)}),je)return ft}return ft=null,Lt.defaultActiveFirst&&B(Qe,function(dt,Ze){!ft&&dt&&!dt.props.disabled&&(ft=X(dt,Te,Ze))}),ft}function tt(Lt){if(Lt){var lt=this.instanceArray.indexOf(Lt);lt!==-1?this.instanceArray[lt]=Lt:this.instanceArray.push(Lt)}}var Ve=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(Qe){var Te;return Object(Z.a)(this,ft),Te=lt.call(this,Qe),Te.onKeyDown=function(je,dt){var Ze=je.keyCode,Tt;if(Te.getFlatInstanceArray().forEach(function(ot){ot&&ot.props.active&&ot.onKeyDown&&(Tt=ot.onKeyDown(je))}),Tt)return 1;var Ct=null;return(Ze===d.a.UP||Ze===d.a.DOWN)&&(Ct=Te.step(Ze===d.a.UP?-1:1)),Ct?(je.preventDefault(),De(Te.props.store,Me(Te.props),Ct.props.eventKey),typeof dt=="function"&&dt(Ct),1):void 0},Te.onItemHover=function(je){var dt=je.key,Ze=je.hover;De(Te.props.store,Me(Te.props),Ze?dt:null)},Te.onDeselect=function(je){Te.props.onDeselect(je)},Te.onSelect=function(je){Te.props.onSelect(je)},Te.onClick=function(je){Te.props.onClick(je)},Te.onOpenChange=function(je){Te.props.onOpenChange(je)},Te.onDestroy=function(je){Te.props.onDestroy(je)},Te.getFlatInstanceArray=function(){return Te.instanceArray},Te.step=function(je){var dt=Te.getFlatInstanceArray(),Ze=Te.props.store.getState().activeKey[Me(Te.props)],Tt=dt.length;if(!Tt)return null;je<0&&(dt=dt.concat().reverse());var Ct=-1;if(dt.every(function(Kt,Gt){return Kt&&Kt.props.eventKey===Ze?(Ct=Gt,!1):!0}),!Te.props.defaultActiveFirst&&Ct!==-1&&rt(dt.slice(Ct,Tt-1)))return;var ot=(Ct+1)%Tt,gt=ot;do{var kt=dt[gt];if(!kt||kt.props.disabled)gt=(gt+1)%Tt;else return kt}while(gt!==ot);return null},Te.renderCommonMenuItem=function(je,dt,Ze){var Tt=Te.props.store.getState(),Ct=Object(w.a)(Te),ot=Ct.props,gt=X(je,ot.eventKey,dt),kt=je.props;if(!kt||typeof je.type=="string")return je;var Kt=gt===Tt.activeKey,Gt=Object(ae.a)(Object(ae.a)({mode:kt.mode||ot.mode,level:ot.level,inlineIndent:ot.inlineIndent,renderMenuItem:Te.renderMenuItem,rootPrefixCls:ot.prefixCls,index:dt,parentMenu:ot.parentMenu,manualRef:kt.disabled?void 0:Object(a.a)(je.ref,tt.bind(Object(w.a)(Te))),eventKey:gt,active:!kt.disabled&&Kt,multiple:ot.multiple,onClick:function(de){(kt.onClick||G)(de),Te.onClick(de)},onItemHover:Te.onItemHover,motion:ot.motion,subMenuOpenDelay:ot.subMenuOpenDelay,subMenuCloseDelay:ot.subMenuCloseDelay,forceSubMenuRender:ot.forceSubMenuRender,onOpenChange:Te.onOpenChange,onDeselect:Te.onDeselect,onSelect:Te.onSelect,builtinPlacements:ot.builtinPlacements,itemIcon:kt.itemIcon||Te.props.itemIcon,expandIcon:kt.expandIcon||Te.props.expandIcon},Ze),{},{direction:ot.direction});return(ot.mode==="inline"||ye())&&(Gt.triggerSubMenuAction="click"),O.cloneElement(je,Gt)},Te.renderMenuItem=function(je,dt,Ze){if(!je)return null;var Tt=Te.props.store.getState(),Ct={openKeys:Tt.openKeys,selectedKeys:Tt.selectedKeys,triggerSubMenuAction:Te.props.triggerSubMenuAction,subMenuKey:Ze};return Te.renderCommonMenuItem(je,dt,Ct)},Qe.store.setState({activeKey:Object(ae.a)(Object(ae.a)({},Qe.store.getState().activeKey),{},Object(h.a)({},Qe.eventKey,Xe(Qe,Qe.activeKey)))}),Te.instanceArray=[],Te}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Te){return this.props.visible||Te.visible||this.props.className!==Te.className||!s()(this.props.style,Te.style)}},{key:"componentDidUpdate",value:function(Te){var je=this.props,dt="activeKey"in je?je.activeKey:je.store.getState().activeKey[Me(je)],Ze=Xe(je,dt);if(Ze!==dt)De(je.store,Me(je),Ze);else if("activeKey"in Te){var Tt=Xe(Te,Te.activeKey);Ze!==Tt&&De(je.store,Me(je),Ze)}}},{key:"render",value:function(){var Te=this,je=Object(p.a)({},this.props);this.instanceArray=[];var dt=i()(je.prefixCls,je.className,"".concat(je.prefixCls,"-").concat(je.mode)),Ze={className:dt,role:je.role||"menu"};je.id&&(Ze.id=je.id),je.focusable&&(Ze.tabIndex=0,Ze.onKeyDown=this.onKeyDown);var Tt=je.prefixCls,Ct=je.eventKey,ot=je.visible,gt=je.level,kt=je.mode,Kt=je.overflowedIndicator,Gt=je.theme;return ie.forEach(function(Se){return delete je[Se]}),delete je.onClick,O.createElement(Re,Object.assign({},je,{prefixCls:Tt,mode:kt,tag:"ul",level:gt,theme:Gt,visible:ot,overflowedIndicator:Kt},Ze),O.Children.map(je.children,function(Se,de){return Te.renderMenuItem(Se,de,Ct||"0-menu-")}))}}]),ft}(O.Component);Ve.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:G};var Ke=Object(T.b)()(Ve),we=Ke,Ae=z("Kwbf");function Oe(Lt,lt,ft){var Qe=Lt.prefixCls,Te=Lt.motion,je=Lt.defaultMotions,dt=je===void 0?{}:je,Ze=Lt.openAnimation,Tt=Lt.openTransitionName,Ct=lt.switchingModeFromInline;if(Te)return Te;if(Object(n.a)(Ze)==="object"&&Ze)Object(Ae.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Ze=="string")return{motionName:"".concat(Qe,"-open-").concat(Ze)};if(Tt)return{motionName:Tt};var ot=dt[ft];return ot||(Ct?null:dt.other)}var fe=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(Qe){var Te;Object(Z.a)(this,ft),Te=lt.call(this,Qe),Te.inlineOpenKeys=[],Te.onSelect=function(Ze){var Tt=Object(w.a)(Te),Ct=Tt.props;if(Ct.selectable){var ot=Te.store.getState(),gt=ot.selectedKeys,kt=Ze.key;Ct.multiple?gt=gt.concat([kt]):gt=[kt],"selectedKeys"in Ct||Te.store.setState({selectedKeys:gt}),Ct.onSelect(Object(ae.a)(Object(ae.a)({},Ze),{},{selectedKeys:gt}))}},Te.onClick=function(Ze){var Tt=Te.getRealMenuMode(),Ct=Object(w.a)(Te),ot=Ct.store,gt=Ct.props.onOpenChange;Tt!=="inline"&&!("openKeys"in Te.props)&&(ot.setState({openKeys:[]}),gt([])),Te.props.onClick(Ze)},Te.onKeyDown=function(Ze,Tt){Te.innerMenu.getWrappedInstance().onKeyDown(Ze,Tt)},Te.onOpenChange=function(Ze){var Tt=Object(w.a)(Te),Ct=Tt.props,ot=Te.store.getState().openKeys.concat(),gt=!1,kt=function(Gt){var Se=!1;if(Gt.open)Se=ot.indexOf(Gt.key)===-1,Se&&ot.push(Gt.key);else{var de=ot.indexOf(Gt.key);Se=de!==-1,Se&&ot.splice(de,1)}gt=gt||Se};Array.isArray(Ze)?Ze.forEach(kt):kt(Ze),gt&&("openKeys"in Te.props||Te.store.setState({openKeys:ot}),Ct.onOpenChange(ot))},Te.onDeselect=function(Ze){var Tt=Object(w.a)(Te),Ct=Tt.props;if(Ct.selectable){var ot=Te.store.getState().selectedKeys.concat(),gt=Ze.key,kt=ot.indexOf(gt);kt!==-1&&ot.splice(kt,1),"selectedKeys"in Ct||Te.store.setState({selectedKeys:ot}),Ct.onDeselect(Object(ae.a)(Object(ae.a)({},Ze),{},{selectedKeys:ot}))}},Te.onMouseEnter=function(Ze){Te.restoreModeVerticalFromInline();var Tt=Te.props.onMouseEnter;Tt&&Tt(Ze)},Te.onTransitionEnd=function(Ze){var Tt=Ze.propertyName==="width"&&Ze.target===Ze.currentTarget,Ct=Ze.target.className,ot=Object.prototype.toString.call(Ct)==="[object SVGAnimatedString]"?Ct.animVal:Ct,gt=Ze.propertyName==="font-size"&&ot.indexOf("anticon")>=0;(Tt||gt)&&Te.restoreModeVerticalFromInline()},Te.setInnerMenu=function(Ze){Te.innerMenu=Ze},Te.isRootMenu=!0;var je=Qe.defaultSelectedKeys,dt=Qe.defaultOpenKeys;return"selectedKeys"in Qe&&(je=Qe.selectedKeys||[]),"openKeys"in Qe&&(dt=Qe.openKeys||[]),Te.store=Object(T.c)({selectedKeys:je,openKeys:dt,activeKey:{"0-menu-":Xe(Qe,Qe.activeKey)}}),Te.state={switchingModeFromInline:!1},Te}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Te){this.updateOpentKeysWhenSwitchMode(Te),this.updateMiniStore();var je=this.props,dt=je.siderCollapsed,Ze=je.inlineCollapsed,Tt=je.onOpenChange;(!Te.inlineCollapsed&&Ze||!Te.siderCollapsed&&dt)&&Tt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Te){var je=this.props,dt=this.store,Ze=this.inlineOpenKeys,Tt=dt.getState(),Ct={};Te.mode==="inline"&&je.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in je||((je.inlineCollapsed&&!Te.inlineCollapsed||je.siderCollapsed&&!Te.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Tt.openKeys.concat(),Ct.openKeys=[]),(!je.inlineCollapsed&&Te.inlineCollapsed||!je.siderCollapsed&&Te.siderCollapsed)&&(Ct.openKeys=Ze,this.inlineOpenKeys=[])),Object.keys(Ct).length&&dt.setState(Ct)}},{key:"updateMenuDisplay",value:function(){var Te=this.props.collapsedWidth,je=this.store,dt=this.prevOpenKeys,Ze=this.getInlineCollapsed()&&(Te===0||Te==="0"||Te==="0px");Ze?(this.prevOpenKeys=je.getState().openKeys.concat(),this.store.setState({openKeys:[]})):dt&&(this.store.setState({openKeys:dt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Te=this.props.mode,je=this.state.switchingModeFromInline,dt=this.getInlineCollapsed();return je&&dt?"inline":dt?"vertical":Te}},{key:"getInlineCollapsed",value:function(){var Te=this.props,je=Te.inlineCollapsed,dt=Te.siderCollapsed;return dt!==void 0?dt:je}},{key:"restoreModeVerticalFromInline",value:function(){var Te=this.state.switchingModeFromInline;Te&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var Te=Object(ae.a)({},Object(l.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),je=this.getRealMenuMode();return Te.className+=" ".concat(Te.prefixCls,"-root"),Te.direction==="rtl"&&(Te.className+=" ".concat(Te.prefixCls,"-rtl")),Te=Object(ae.a)(Object(ae.a)({},Te),{},{mode:je,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Oe(this.props,this.state,je)}),delete Te.openAnimation,delete Te.openTransitionName,O.createElement(T.a,{store:this.store},O.createElement(we,Object.assign({},Te,{ref:this.setInnerMenu}),this.props.children))}}]),ft}(O.Component);fe.defaultProps={selectable:!0,onClick:G,onSelect:G,onOpenChange:G,onDeselect:G,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:O.createElement("span",null,"\xB7\xB7\xB7")};var ge=fe,_e=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(){var Qe;return Object(Z.a)(this,ft),Qe=lt.apply(this,arguments),Qe.onKeyDown=function(Te){var je=Te.keyCode;return je===d.a.ENTER?(Qe.onClick(Te),!0):void 0},Qe.onMouseLeave=function(Te){var je=Qe.props,dt=je.eventKey,Ze=je.onItemHover,Tt=je.onMouseLeave;Ze({key:dt,hover:!1}),Tt({key:dt,domEvent:Te})},Qe.onMouseEnter=function(Te){var je=Qe.props,dt=je.eventKey,Ze=je.onItemHover,Tt=je.onMouseEnter;Ze({key:dt,hover:!0}),Tt({key:dt,domEvent:Te})},Qe.onClick=function(Te){var je=Qe.props,dt=je.eventKey,Ze=je.multiple,Tt=je.onClick,Ct=je.onSelect,ot=je.onDeselect,gt=je.isSelected,kt={key:dt,keyPath:[dt],item:Object(w.a)(Qe),domEvent:Te};Tt(kt),Ze?gt?ot(kt):Ct(kt):gt||Ct(kt)},Qe.saveNode=function(Te){Qe.node=Te},Qe}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Te=this.props;Te.onDestroy&&Te.onDestroy(Te.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var Te,je=Object(ae.a)({},this.props),dt=i()(this.getPrefixCls(),je.className,(Te={},Object(h.a)(Te,this.getActiveClassName(),!je.disabled&&je.active),Object(h.a)(Te,this.getSelectedClassName(),je.isSelected),Object(h.a)(Te,this.getDisabledClassName(),je.disabled),Te)),Ze=Object(ae.a)(Object(ae.a)({},je.attribute),{},{title:typeof je.title=="string"?je.title:void 0,className:dt,role:je.role||"menuitem","aria-disabled":je.disabled});je.role==="option"?Ze=Object(ae.a)(Object(ae.a)({},Ze),{},{role:"option","aria-selected":je.isSelected}):(je.role===null||je.role==="none")&&(Ze.role="none");var Tt={onClick:je.disabled?null:this.onClick,onMouseLeave:je.disabled?null:this.onMouseLeave,onMouseEnter:je.disabled?null:this.onMouseEnter},Ct=Object(ae.a)({},je.style);je.mode==="inline"&&(je.direction==="rtl"?Ct.paddingRight=je.inlineIndent*je.level:Ct.paddingLeft=je.inlineIndent*je.level),ie.forEach(function(gt){return delete je[gt]}),delete je.direction;var ot=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(ot=O.createElement(this.props.itemIcon,this.props)),O.createElement("li",Object.assign({},Object(l.default)(je,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Ze,Tt,{style:Ct,ref:this.saveNode}),je.children,ot)}}]),ft}(O.Component);_e.isMenuItem=!0,_e.defaultProps={onSelect:G,onMouseEnter:G,onMouseLeave:G,manualRef:G};var be=Object(T.b)(function(Lt,lt){var ft=Lt.activeKey,Qe=Lt.selectedKeys,Te=lt.eventKey,je=lt.subMenuKey;return{active:ft[je]===Te,isSelected:Qe.indexOf(Te)!==-1}})(_e),Ge=be,qe=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(){var Qe;return Object(Z.a)(this,ft),Qe=lt.apply(this,arguments),Qe.renderInnerMenuItem=function(Te){var je=Qe.props,dt=je.renderMenuItem,Ze=je.index;return dt(Te,Ze,Qe.props.subMenuKey)},Qe}return Object(U.a)(ft,[{key:"render",value:function(){var Te=Object(p.a)({},this.props),je=Te.className,dt=je===void 0?"":je,Ze=Te.rootPrefixCls,Tt="".concat(Ze,"-item-group-title"),Ct="".concat(Ze,"-item-group-list"),ot=Te.title,gt=Te.children;return ie.forEach(function(kt){return delete Te[kt]}),delete Te.onClick,delete Te.direction,O.createElement("li",Object.assign({},Te,{className:"".concat(dt," ").concat(Ze,"-item-group")}),O.createElement("div",{className:Tt,title:typeof ot=="string"?ot:void 0},ot),O.createElement("ul",{className:Ct},O.Children.map(gt,this.renderInnerMenuItem)))}}]),ft}(O.Component);qe.isMenuItemGroup=!0,qe.defaultProps={disabled:!0};var pt=qe,Dt=function(lt){var ft=lt.className,Qe=lt.rootPrefixCls,Te=lt.style;return O.createElement("li",{className:"".concat(ft," ").concat(Qe,"-item-divider"),style:Te})};Dt.defaultProps={disabled:!0,className:"",style:{}};var jt=Dt,Rt=We.e=ge},"3tLw":function($e,We,z){$e.exports=z.p+"static/a.39070d50.svg"},"4xil":function($e,We,z){$e.exports={watermark:"watermark___2DVjg",videovideo:"videovideo___3jScv",animate__loop:"animate__loop___36IZ1",upDown:"upDown___3FGkz",container:"container___GV_Ds","video-container":"video-container___35tqx","video-controls":"video-controls___u99fM",hide:"hide___2GDit","video-progress":"video-progress___2LKQJ",seek:"seek___3b-US","seek-tooltip":"seek-tooltip___bZ9sZ","bottom-controls":"bottom-controls___74sQw","left-controls":"left-controls___2kBb3","volume-controls":"volume-controls___QLaWH","fullscreen-button":"fullscreen-button___2nHzc","pip-button":"pip-button___18qQG","playback-animation":"playback-animation___gCL6X",volume:"volume___10eUe",hidden:"hidden___2JBJW"}},"55Ip":function($e,We,z){"use strict";z.d(We,"a",function(){return t});var ae=z("Ty5D"),Z=z("dI71"),U=z("q1tI"),w=z.n(U),P=z("YS25"),S=z("17x9"),O=z.n(S),T=z("wx14"),l=z("zLVn"),p=z("9R94"),h=function(E){Object(Z.a)(o,E);function o(){for(var C,A=arguments.length,D=new Array(A),I=0;I<A;I++)D[I]=arguments[I];return C=E.call.apply(E,[this].concat(D))||this,C.history=Object(P.a)(C.props),C}var x=o.prototype;return x.render=function(){return w.a.createElement(ae.c,{history:this.history,children:this.props.children})},o}(w.a.Component),d=function(E){Object(Z.a)(o,E);function o(){for(var C,A=arguments.length,D=new Array(A),I=0;I<A;I++)D[I]=arguments[I];return C=E.call.apply(E,[this].concat(D))||this,C.history=Object(P.b)(C.props),C}var x=o.prototype;return x.render=function(){return w.a.createElement(ae.c,{history:this.history,children:this.props.children})},o}(w.a.Component),a=function(o,x){return typeof o=="function"?o(x):o},u=function(o,x){return typeof o=="string"?Object(P.c)(o,null,null,x):o},s=function(o){return o},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,o){var x=E.innerRef,C=E.navigate,A=E.onClick,D=Object(l.a)(E,["innerRef","navigate","onClick"]),I=D.target,F=Object(T.a)({},D,{onClick:function(te){try{A&&A(te)}catch(j){throw te.preventDefault(),j}!te.defaultPrevented&&te.button===0&&(!I||I==="_self")&&!i(te)&&(te.preventDefault(),C())}});return s!==f?F.ref=o||x:F.ref=x,w.a.createElement("a",F)}),t=f(function(E,o){var x=E.component,C=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(H){H||Object(p.a)(!1);var te=H.history,j=u(a(D,H.location),H.location),G=j?te.createHref(j):"",X=Object(T.a)({},F,{href:G,navigate:function(){var B=a(D,H.location),Q=A?te.replace:te.push;Q(B)}});return s!==f?X.ref=o||I:X.innerRef=I,w.a.createElement(C,X)})});if(!1)var c,y;var v=function(o){return o},_=w.a.forwardRef;typeof _=="undefined"&&(_=v);function b(){for(var E=arguments.length,o=new Array(E),x=0;x<E;x++)o[x]=arguments[x];return o.filter(function(C){return C}).join(" ")}var m=_(function(E,o){var x=E["aria-current"],C=x===void 0?"page":x,A=E.activeClassName,D=A===void 0?"active":A,I=E.activeStyle,F=E.className,H=E.exact,te=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 Ee=j||oe.location,ye=u(a(B,Ee),Ee),Le=ye.pathname,pe=Le&&Le.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),Ce=pe?Object(ae.f)(Ee.pathname,{path:pe,exact:H,sensitive:G,strict:X}):null,Be=!!(te?te(Ce,Ee):Ce),Pe=Be?b(F,D):F,ke=Be?Object(T.a)({},J,{},I):J,Ne=Object(T.a)({"aria-current":Be&&C||null,className:Pe,style:ke,to:ye},ie);return v!==_?Ne.ref=o||Q:Ne.innerRef=Q,w.a.createElement(t,Ne)})});if(!1)var g},"5nXd":function($e,We,z){var ae=z("MFOe"),Z=ae.slice,U=ae.pluck,w=ae.each,P=ae.bind,S=ae.create,O=ae.isList,T=ae.isFunction,l=ae.isObject;$e.exports={createStore:d};var p={version:"2.0.12",enabled:!1,get:function(a,u){var s=this.storage.read(this._namespacePrefix+a);return this._deserialize(s,u)},set:function(a,u){return u===void 0?this.remove(a):(this.storage.write(this._namespacePrefix+a,this._serialize(u)),u)},remove:function(a){this.storage.remove(this._namespacePrefix+a)},each:function(a){var u=this;this.storage.each(function(s,f){a.call(u,u._deserialize(s),(f||"").replace(u._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(a){return this._namespacePrefix=="__storejs_"+a+"_"},createStore:function(){return d.apply(this,arguments)},addPlugin:function(a){this._addPlugin(a)},namespace:function(a){return d(this.storage,this.plugins,a)}};function h(){var a=typeof console=="undefined"?null:console;if(!a)return;var u=a.warn?a.warn:a.log;u.apply(a,arguments)}function d(a,u,s){s||(s=""),a&&!O(a)&&(a=[a]),u&&!O(u)&&(u=[u]);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 v="__storejs__test__";y.write(v,v);var _=y.read(v)===v;return y.remove(v),_}catch(b){return!1}},_assignPluginFnProp:function(y,v){var _=this[v];this[v]=function(){var m=Z(arguments,0),g=this;function E(){return _?(w(arguments,function(x,C){m[C]=x}),_.apply(g,m)):void 0}var o=[E].concat(m);return y.apply(g,o)}},_serialize:function(y){return JSON.stringify(y)},_deserialize:function(y,v){if(!y)return v;var _="";try{_=JSON.parse(y)}catch(b){_=y}return _!==void 0?_:v},_addStorage:function(y){if(this.enabled)return;this._testStorage(y)&&(this.storage=y,this.enabled=!0)},_addPlugin:function(y){var v=this;if(O(y)){w(y,function(m){v._addPlugin(m)});return}var _=U(this.plugins,function(m){return y===m});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(m,g){if(!T(m))throw new Error("Bad plugin property: "+g+" from plugin "+y.name+". Plugins should only return functions.");v._assignPluginFnProp(m,g)})},addStorage:function(y){h("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(y)}},c=S(t,p,{plugins:[]});return c.raw={},w(c,function(y,v){T(y)&&(c.raw[v]=P(c,y))}),w(a,function(y){c._addStorage(y)}),w(u,function(y){c._addPlugin(y)}),c}},"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"),O=z("LK+K"),T=z("q1tI"),l=z.n(T),p=z("TSYQ"),h=z.n(p),d=function(m){var g,E="".concat(m.rootPrefixCls,"-item"),o=h()(E,"".concat(E,"-").concat(m.page),(g={},Object(Z.a)(g,"".concat(E,"-active"),m.active),Object(Z.a)(g,m.className,!!m.className),Object(Z.a)(g,"".concat(E,"-disabled"),!m.page),g)),x=function(){m.onClick(m.page)},C=function(D){m.onKeyPress(D,m.onClick,m.page)};return l.a.createElement("li",{title:m.showTitle?m.page:null,className:o,onClick:x,onKeyPress:C,tabIndex:"0"},m.itemRender(m.page,"page",l.a.createElement("a",{rel:"nofollow"},m.page)))},a=d,u={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)(g,b);var m=Object(O.a)(g);function g(){var E;Object(w.a)(this,g);for(var o=arguments.length,x=new Array(o),C=0;C<o;C++)x[C]=arguments[C];return E=m.call.apply(m,[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,H=D.rootPrefixCls,te=E.state.goInputText;if(I||te==="")return;if(A.relatedTarget&&(A.relatedTarget.className.indexOf("".concat(H,"-prev"))>=0||A.relatedTarget.className.indexOf("".concat(H,"-next"))>=0))return;E.setState({goInputText:""}),F(E.getValidValue())},E.go=function(A){var D=E.state.goInputText;if(D==="")return;(A.keyCode===u.ENTER||A.type==="click")&&(E.setState({goInputText:""}),E.props.quickGo(E.getValidValue()))},E}return Object(P.a)(g,[{key:"getValidValue",value:function(){var o=this.state,x=o.goInputText,C=o.current;return!x||isNaN(x)?C:Number(x)}},{key:"getPageSizeOptions",value:function(){var o=this.props,x=o.pageSize,C=o.pageSizeOptions;return C.some(function(A){return A.toString()===x.toString()})?C:C.concat([x.toString()]).sort(function(A,D){var I=isNaN(Number(A))?0:Number(A),F=isNaN(Number(D))?0:Number(D);return I-F})}},{key:"render",value:function(){var o=this,x=this.props,C=x.pageSize,A=x.locale,D=x.rootPrefixCls,I=x.changeSize,F=x.quickGo,H=x.goButton,te=x.selectComponentClass,j=x.buildOptionText,G=x.selectPrefixCls,X=x.disabled,J=this.state.goInputText,B="".concat(D,"-options"),Q=te,ie=null,oe=null,Ee=null;if(!I&&!F)return null;var ye=this.getPageSizeOptions();if(I&&Q){var Le=ye.map(function(pe,Ce){return l.a.createElement(Q.Option,{key:Ce,value:pe.toString()},(j||o.buildOptionText)(pe))});ie=l.a.createElement(Q,{disabled:X,prefixCls:G,showSearch:!1,className:"".concat(B,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(C||ye[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Ce){return Ce.parentNode}},Le)}return F&&(H&&(Ee=typeof H=="boolean"?l.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:X,className:"".concat(B,"-quick-jumper-button")},A.jump_to_confirm):l.a.createElement("span",{onClick:this.go,onKeyUp:this.go},H)),oe=l.a.createElement("div",{className:"".concat(B,"-quick-jumper")},A.jump_to,l.a.createElement("input",{disabled:X,type:"text",value:J,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),A.page,Ee)),l.a.createElement("li",{className:"".concat(B)},ie,oe)}}]),g}(l.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var f=s,i=z("N2Kk");function n(){}function t(b){return typeof b=="number"&&isFinite(b)&&Math.floor(b)===b}function c(b,m,g){return g}function y(b,m,g){var E=typeof b=="undefined"?m.pageSize:b;return Math.floor((g.total-1)/E)+1}var v=function(b){Object(S.a)(g,b);var m=Object(O.a)(g);function g(E){var o;Object(w.a)(this,g),o=m.call(this,E),o.getJumpPrevPage=function(){return Math.max(1,o.state.current-(o.props.showLessItems?3:5))},o.getJumpNextPage=function(){return Math.min(y(void 0,o.state,o.props),o.state.current+(o.props.showLessItems?3:5))},o.getItemIcon=function(I,F){var H=o.props.prefixCls,te=I||l.a.createElement("button",{type:"button","aria-label":F,className:"".concat(H,"-item-link")});return typeof I=="function"&&(te=l.a.createElement(I,Object(U.a)({},o.props))),te},o.savePaginationNode=function(I){o.paginationNode=I},o.isValid=function(I){return t(I)&&I!==o.state.current},o.shouldDisplayQuickJumper=function(){var I=o.props,F=I.showQuickJumper,H=I.pageSize,te=I.total;return te<=H?!1:F},o.handleKeyDown=function(I){(I.keyCode===u.ARROW_UP||I.keyCode===u.ARROW_DOWN)&&I.preventDefault()},o.handleKeyUp=function(I){var F=o.getValidValue(I),H=o.state.currentInputValue;F!==H&&o.setState({currentInputValue:F}),I.keyCode===u.ENTER?o.handleChange(F):I.keyCode===u.ARROW_UP?o.handleChange(F-1):I.keyCode===u.ARROW_DOWN&&o.handleChange(F+1)},o.changePageSize=function(I){var F=o.state.current,H=y(I,o.state,o.props);F=F>H?H:F,H===0&&(F=o.state.current),typeof I=="number"&&("pageSize"in o.props||o.setState({pageSize:I}),"current"in o.props||o.setState({current:F,currentInputValue:F})),o.props.onShowSizeChange(F,I),"onChange"in o.props&&o.props.onChange&&o.props.onChange(F,I)},o.handleChange=function(I){var F=o.props.disabled,H=I;if(o.isValid(H)&&!F){var te=y(void 0,o.state,o.props);H>te?H=te:H<1&&(H=1),"current"in o.props||o.setState({current:H,currentInputValue:H});var j=o.state.pageSize;return o.props.onChange(H,j),H}return o.state.current},o.prev=function(){o.hasPrev()&&o.handleChange(o.state.current-1)},o.next=function(){o.hasNext()&&o.handleChange(o.state.current+1)},o.jumpPrev=function(){o.handleChange(o.getJumpPrevPage())},o.jumpNext=function(){o.handleChange(o.getJumpNextPage())},o.hasPrev=function(){return o.state.current>1},o.hasNext=function(){return o.state.current<y(void 0,o.state,o.props)},o.runIfEnter=function(I,F){if(I.key==="Enter"||I.charCode===13){for(var H=arguments.length,te=new Array(H>2?H-2:0),j=2;j<H;j++)te[j-2]=arguments[j];F.apply(void 0,te)}},o.runIfEnterPrev=function(I){o.runIfEnter(I,o.prev)},o.runIfEnterNext=function(I){o.runIfEnter(I,o.next)},o.runIfEnterJumpPrev=function(I){o.runIfEnter(I,o.jumpPrev)},o.runIfEnterJumpNext=function(I){o.runIfEnter(I,o.jumpNext)},o.handleGoTO=function(I){(I.keyCode===u.ENTER||I.type==="click")&&o.handleChange(o.state.currentInputValue)};var x=E.onChange!==n,C="current"in E;C&&!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)),o.state={current:A,currentInputValue:A,pageSize:D},o}return Object(P.a)(g,[{key:"componentDidUpdate",value:function(o,x){var C=this.props.prefixCls;if(x.current!==this.state.current&&this.paginationNode){var A=this.paginationNode.querySelector(".".concat(C,"-item-").concat(x.current));A&&document.activeElement===A&&A.blur()}}},{key:"getValidValue",value:function(o){var x=o.target.value,C=y(void 0,this.state,this.props),A=this.state.currentInputValue,D;return x===""?D=x:isNaN(Number(x))?D=A:x>=C?D=C:D=Number(x),D}},{key:"getShowSizeChanger",value:function(){var o=this.props,x=o.showSizeChanger,C=o.total,A=o.totalBoundaryShowSizeChanger;return typeof x!="undefined"?x:C>A}},{key:"renderPrev",value:function(o){var x=this.props,C=x.prevIcon,A=x.itemRender,D=A(o,"prev",this.getItemIcon(C,"prev page")),I=!this.hasPrev();return Object(T.isValidElement)(D)?Object(T.cloneElement)(D,{disabled:I}):D}},{key:"renderNext",value:function(o){var x=this.props,C=x.nextIcon,A=x.itemRender,D=A(o,"next",this.getItemIcon(C,"next page")),I=!this.hasNext();return Object(T.isValidElement)(D)?Object(T.cloneElement)(D,{disabled:I}):D}},{key:"render",value:function(){var o=this,x=this.props,C=x.prefixCls,A=x.className,D=x.style,I=x.disabled,F=x.hideOnSinglePage,H=x.total,te=x.locale,j=x.showQuickJumper,G=x.showLessItems,X=x.showTitle,J=x.showTotal,B=x.simple,Q=x.itemRender,ie=x.showPrevNextJumpers,oe=x.jumpPrevIcon,Ee=x.jumpNextIcon,ye=x.selectComponentClass,Le=x.selectPrefixCls,pe=x.pageSizeOptions,Ce=this.state,Be=Ce.current,Pe=Ce.pageSize,ke=Ce.currentInputValue;if(F===!0&&H<=Pe)return null;var Ne=y(void 0,this.state,this.props),he=[],ue=null,Ie=null,Ue=null,Ye=null,ee=null,M=j&&j.goButton,N=G?1:2,$=Be-1>0?Be-1:0,V=Be+1<Ne?Be+1:Ne,Y=Object.keys(this.props).reduce(function(fe,ge){return(ge.substr(0,5)==="data-"||ge.substr(0,5)==="aria-"||ge==="role")&&(fe[ge]=o.props[ge]),fe},{});if(B)return M&&(typeof M=="boolean"?ee=l.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},te.jump_to_confirm):ee=l.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},M),ee=l.a.createElement("li",{title:X?"".concat(te.jump_to).concat(Be,"/").concat(Ne):null,className:"".concat(C,"-simple-pager")},ee)),l.a.createElement("ul",Object(ae.a)({className:h()(C,"".concat(C,"-simple"),Object(Z.a)({},"".concat(C,"-disabled"),I),A),style:D,ref:this.savePaginationNode},Y),l.a.createElement("li",{title:X?te.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:h()("".concat(C,"-prev"),Object(Z.a)({},"".concat(C,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev($)),l.a.createElement("li",{title:X?"".concat(Be,"/").concat(Ne):null,className:"".concat(C,"-simple-pager")},l.a.createElement("input",{type:"text",value:ke,disabled:I,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),l.a.createElement("span",{className:"".concat(C,"-slash")},"/"),Ne),l.a.createElement("li",{title:X?te.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:h()("".concat(C,"-next"),Object(Z.a)({},"".concat(C,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(V)),ee);if(Ne<=3+N*2){var me={locale:te,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:X,itemRender:Q};Ne||he.push(l.a.createElement(a,Object(ae.a)({},me,{key:"noPager",page:Ne,className:"".concat(C,"-disabled")})));for(var Re=1;Re<=Ne;Re+=1){var rt=Be===Re;he.push(l.a.createElement(a,Object(ae.a)({},me,{key:Re,page:Re,active:rt})))}}else{var De=G?te.prev_3:te.prev_5,Me=G?te.next_3:te.next_5;ie&&(ue=l.a.createElement("li",{title:X?De:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:h()("".concat(C,"-jump-prev"),Object(Z.a)({},"".concat(C,"-jump-prev-custom-icon"),!!oe))},Q(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(oe,"prev page"))),Ie=l.a.createElement("li",{title:X?Me:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:h()("".concat(C,"-jump-next"),Object(Z.a)({},"".concat(C,"-jump-next-custom-icon"),!!Ee))},Q(this.getJumpNextPage(),"jump-next",this.getItemIcon(Ee,"next page")))),Ye=l.a.createElement(a,{locale:te,last:!0,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ne,page:Ne,active:!1,showTitle:X,itemRender:Q}),Ue=l.a.createElement(a,{locale:te,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:X,itemRender:Q});var Xe=Math.max(1,Be-N),tt=Math.min(Be+N,Ne);Be-1<=N&&(tt=1+N*2),Ne-Be<=N&&(Xe=Ne-N*2);for(var Ve=Xe;Ve<=tt;Ve+=1){var Ke=Be===Ve;he.push(l.a.createElement(a,{locale:te,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ve,page:Ve,active:Ke,showTitle:X,itemRender:Q}))}Be-1>=N*2&&Be!==1+2&&(he[0]=Object(T.cloneElement)(he[0],{className:"".concat(C,"-item-after-jump-prev")}),he.unshift(ue)),Ne-Be>=N*2&&Be!==Ne-2&&(he[he.length-1]=Object(T.cloneElement)(he[he.length-1],{className:"".concat(C,"-item-before-jump-next")}),he.push(Ie)),Xe!==1&&he.unshift(Ue),tt!==Ne&&he.push(Ye)}var we=null;J&&(we=l.a.createElement("li",{className:"".concat(C,"-total-text")},J(H,[H===0?0:(Be-1)*Pe+1,Be*Pe>H?H:Be*Pe])));var Ae=!this.hasPrev()||!Ne,Oe=!this.hasNext()||!Ne;return l.a.createElement("ul",Object(ae.a)({className:h()(C,A,Object(Z.a)({},"".concat(C,"-disabled"),I)),style:D,unselectable:"unselectable",ref:this.savePaginationNode},Y),we,l.a.createElement("li",{title:X?te.prev_page:null,onClick:this.prev,tabIndex:Ae?null:0,onKeyPress:this.runIfEnterPrev,className:h()("".concat(C,"-prev"),Object(Z.a)({},"".concat(C,"-disabled"),Ae)),"aria-disabled":Ae},this.renderPrev($)),he,l.a.createElement("li",{title:X?te.next_page:null,onClick:this.next,tabIndex:Oe?null:0,onKeyPress:this.runIfEnterNext,className:h()("".concat(C,"-next"),Object(Z.a)({},"".concat(C,"-disabled"),Oe)),"aria-disabled":Oe},this.renderNext(V)),l.a.createElement(f,{disabled:I,locale:te,rootPrefixCls:C,selectComponentClass:ye,selectPrefixCls:Le,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Be,pageSize:Pe,pageSizeOptions:pe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:M}))}}],[{key:"getDerivedStateFromProps",value:function(o,x){var C={};if("current"in o&&(C.current=o.current,o.current!==x.current&&(C.currentInputValue=C.current)),"pageSize"in o&&o.pageSize!==x.pageSize){var A=x.current,D=y(o.pageSize,x,o);A=A>D?D:A,"current"in o||(C.current=A,C.currentInputValue=A),C.pageSize=o.pageSize}return C}}]),g}(l.a.Component);v.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:i.a,style:{},itemRender:c,totalBoundaryShowSizeChanger:50};var _=v},"6RRn":function($e,We,z){"use strict";var ae=z("wCXF"),Z=z("n6Qo");z.d(We,"b",function(){return Z.a});var U=z("IBYe"),w=z("6eGT"),P=z("hW8S");z.d(We,"a",function(){return P.a}),We.c=ae.b},"6eGT":function($e,We,z){"use strict";function ae(Z){return null}We.a=ae},"7+5b":function($e,We,z){$e.exports=z.p+"static/v.e7f297d6.svg"},"7ahc":function($e,We,z){"use strict";z.d(We,"a",function(){return y});var ae=z("k1fw"),Z=z("0Owb"),U=z("+L6B"),w=z("2/Rp"),P=z("y8nQ"),S=z("Vl3Y"),O=z("tJVT"),T=z("OaEy"),l=z("2fM7"),p=z("q1tI"),h=z.n(p),d=z("VrN/"),a=z.n(d),u=z("p77/"),s=z.n(u),f=z("c5Ni"),i=z.n(f),n=l.a.Option,t={labelCol:{span:4},wrapperCol:{span:20}},c={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};We.b=function(v){var _=v.callback,b=v.onCancel,m=Object(p.useState)("python"),g=Object(O.a)(m,2),E=g[0],o=g[1];function x(A){o(c[A][1])}function C(A){_(A)}return h.a.createElement(S.a,Object(Z.a)({},t,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:C}),h.a.createElement(S.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},h.a.createElement(l.a,{onChange:x},Object.keys(c).map(function(A){return h.a.createElement(n,{key:A,value:A},c[A][0])}))),h.a.createElement(S.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},h.a.createElement(y,{mode:E})),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(w.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(w.a,{type:"ghost",onClick:b},"\u53D6\u6D88")))};function y(v){var _=v.value,b=v.onChange,m=v.mode,g=v.options,E=g===void 0?{}:g,o=Object(p.useRef)(),x=Object(p.useState)(),C=Object(O.a)(x,2),A=C[0],D=C[1];return Object(p.useEffect)(function(){if(A){function I(F){var H=F.getValue();b&&b(H)}return A.on("change",I),function(){A.off("change",I)}}},[A,b]),Object(p.useEffect)(function(){A&&A.setOption("mode",m)},[A,m]),Object(p.useEffect)(function(){A&&((_!==A.getValue()||_==="")&&setTimeout(function(){A.setValue(_||" ")},300))},[A,_]),Object(p.useEffect)(function(){if(o.current&&!A){var I=a.a.fromTextArea(o.current,Object(ae.a)({mode:m,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},E));D(I)}},[o.current,A]),h.a.createElement("div",{className:"my-codemirror-container"},h.a.createElement("textarea",{ref:o}))}},"7ixt":function($e,We,z){"use strict";z.d(We,"a",function(){return U});var ae={adjustX:1,adjustY:1},Z=[0,0],U={left:{points:["cr","cl"],overflow:ae,offset:[-4,0],targetOffset:Z},right:{points:["cl","cr"],overflow:ae,offset:[4,0],targetOffset:Z},top:{points:["bc","tc"],overflow:ae,offset:[0,-4],targetOffset:Z},bottom:{points:["tc","bc"],overflow:ae,offset:[0,4],targetOffset:Z},topLeft:{points:["bl","tl"],overflow:ae,offset:[0,-4],targetOffset:Z},leftTop:{points:["tr","tl"],overflow:ae,offset:[-4,0],targetOffset:Z},topRight:{points:["br","tr"],overflow:ae,offset:[0,-4],targetOffset:Z},rightTop:{points:["tl","tr"],overflow:ae,offset:[4,0],targetOffset:Z},bottomRight:{points:["tr","br"],overflow:ae,offset:[0,4],targetOffset:Z},rightBottom:{points:["bl","br"],overflow:ae,offset:[4,0],targetOffset:Z},bottomLeft:{points:["tl","bl"],overflow:ae,offset:[0,4],targetOffset:Z},leftBottom:{points:["br","bl"],overflow:ae,offset:[-4,0],targetOffset:Z}},w=U},"7qur":function($e,We,z){"use strict";z.d(We,"m",function(){return Z}),z.d(We,"s",function(){return U}),z.d(We,"h",function(){return w}),z.d(We,"o",function(){return P}),z.d(We,"n",function(){return S}),z.d(We,"l",function(){return O}),z.d(We,"b",function(){return T}),z.d(We,"q",function(){return l}),z.d(We,"t",function(){return p}),z.d(We,"v",function(){return h}),z.d(We,"w",function(){return d}),z.d(We,"u",function(){return a}),z.d(We,"p",function(){return u}),z.d(We,"f",function(){return s}),z.d(We,"a",function(){return f}),z.d(We,"j",function(){return i}),z.d(We,"k",function(){return n}),z.d(We,"d",function(){return t}),z.d(We,"g",function(){return c}),z.d(We,"c",function(){return y}),z.d(We,"e",function(){return v}),z.d(We,"i",function(){return _}),z.d(We,"r",function(){return b});var ae=z("ErOA");function Z(m){return Object(ae.c)("mypractices/".concat(m,".json"),{hidePopLogin:!0})}function U(m,g){return Object(ae.f)("mypractices/".concat(m,"/code_submit.json"),g)}function w(m,g){return Object(ae.c)("mypractices/".concat(m,"/code_debug.json"),g)}function P(m,g){return Object(ae.c)("mypractices/".concat(m,"/submit_records.json"),g)}function S(m){return Object(ae.c)("mypractices/record_detail.json",{id:m})}function O(m,g){return Object(ae.c)("mypractices/".concat(m,"/result.json"),{mode:g})}function T(m,g){return Object(ae.f)("mypractices/".concat(m,"/add_notes.json"),g)}function l(m,g){return Object(ae.f)("mypractices/".concat(m,"/restore_initial_code.json"),g)}function p(m,g){return Object(ae.f)("mypractices/".concat(m,"/sync_code.json"),g)}function h(m,g){return Object(ae.f)("mypractices/".concat(m,"/update_code.json"),g)}function d(m){return Object(ae.f)("mypractices/".concat(m,"/initial_codes.json"))}function a(m,g){return Object(ae.f)("discusses/".concat(m,"/plus.json"),g)}function u(m){return Object(ae.c)("practices/practices_list.json",m)}function s(m,g){return Object(ae.c)("practices/".concat(m,"/question_solution_articles"),g)}function f(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles"),g)}function i(m,g){return Object(ae.g)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function n(m,g){return Object(ae.c)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/edit"),g)}function t(m,g){return Object(ae.c)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function c(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/set_authority_or_excellent"),g)}function y(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/praise_or_treads"),g)}function v(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/hide"))}function _(m,g){return Object(ae.b)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function b(m,g){return Object(ae.f)("mypractices/".concat(m,"/update_practice_time_sum"),g)}},"815F":function($e,We,z){"use strict";z.d(We,"e",function(){return O}),z.d(We,"c",function(){return l}),z.d(We,"d",function(){return p}),z.d(We,"a",function(){return d}),z.d(We,"f",function(){return a}),z.d(We,"b",function(){return u});var ae=z("KQm4"),Z=z("VTBJ"),U=z("Ff2n"),w=z("Zm9Q"),P=z("Kwbf"),S=z("OZM5");function O(s,f){return s!=null?s:f}function T(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=new Map;function i(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(c){var y=c.key,v=c.children;Object(P.a)(y!=null,"Tree node must have a certain key: [".concat(t).concat(y,"]"));var _=String(y);Object(P.a)(!f.has(_)||y===null||y===void 0,"Same 'key' exist in the Tree: ".concat(_)),f.set(_,!0),i(v,"".concat(t).concat(_," > "))})}i(s)}function l(s){function f(i){var n=Object(w.a)(i);return n.map(function(t){if(!Object(S.i)(t))return Object(P.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var c=t.key,y=t.props,v=y.children,_=Object(U.a)(y,["children"]),b=Object(Z.a)({key:c},_),m=f(v);return m.length&&(b.children=m),b}).filter(function(t){return t})}return f(s)}function p(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=new Set(f===!0?[]:f),n=[];function t(c){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map(function(v,_){var b=Object(S.h)(y?y.pos:"0",_),m=O(v.key,b),g=Object(Z.a)(Object(Z.a)({},v),{},{parent:y,pos:b,children:null,data:v,isStart:[].concat(Object(ae.a)(y?y.isStart:[]),[_===0]),isEnd:[].concat(Object(ae.a)(y?y.isEnd:[]),[_===c.length-1])});return n.push(g),f===!0||i.has(m)?g.children=t(v.children||[],g):g.children=[],g})}return t(s),n}function h(s,f,i){var n;i?typeof i=="string"?n=function(y){return y[i]}:typeof i=="function"&&(n=function(y){return i(y)}):n=function(y,v){return O(y.key,v)};function t(c,y,v){var _=c?c.children:s,b=c?Object(S.h)(v.pos,y):"0";if(c){var m=n(c,b),g={node:c,index:y,pos:b,key:m,parentPos:v.node?v.pos:null,level:v.level+1};f(g)}_&&_.forEach(function(E,o){t(E,o,{node:c,pos:b,level:v?v.level+1:-1})})}t(null)}function d(s){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=f.initWrapper,n=f.processEntity,t=f.onProcessFinished,c=arguments.length>2?arguments[2]:void 0,y={},v={},_={posEntities:y,keyEntities:v};return i&&(_=i(_)||_),h(s,function(b){var m=b.node,g=b.index,E=b.pos,o=b.key,x=b.parentPos,C=b.level,A={node:m,index:g,key:o,pos:E,level:C},D=O(o,E);y[E]=A,v[D]=A,A.parent=y[x],A.parent&&(A.parent.children=A.parent.children||[],A.parent.children.push(A)),n&&n(A,_)},c),t&&t(_),_}function a(s,f){var i=f.expandedKeys,n=f.selectedKeys,t=f.loadedKeys,c=f.loadingKeys,y=f.checkedKeys,v=f.halfCheckedKeys,_=f.dragOverNodeKey,b=f.dropPosition,m=f.keyEntities,g=m[s],E={eventKey:s,expanded:i.indexOf(s)!==-1,selected:n.indexOf(s)!==-1,loaded:t.indexOf(s)!==-1,loading:c.indexOf(s)!==-1,checked:y.indexOf(s)!==-1,halfChecked:v.indexOf(s)!==-1,pos:String(g?g.pos:""),dragOver:_===s&&b===0,dragOverGapTop:_===s&&b===-1,dragOverGapBottom:_===s&&b===1};return E}function u(s){var f=s.data,i=s.expanded,n=s.selected,t=s.checked,c=s.loaded,y=s.loading,v=s.halfChecked,_=s.dragOver,b=s.dragOverGapTop,m=s.dragOverGapBottom,g=s.pos,E=s.active,o=Object(Z.a)(Object(Z.a)({},f),{},{expanded:i,selected:n,checked:t,loaded:c,loading:y,halfChecked:v,dragOver:_,dragOverGapTop:b,dragOverGapBottom:m,pos:g,active:E});return"props"in o||Object.defineProperty(o,"props",{get:function(){return Object(P.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),s}}),o}},"8EBN":function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";ae.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Z=0;Z<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 O=0;O<S.mimes.length;O++)if(S.mimes[O]==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 O=0;O<S.ext.length;O++)if(S.ext[O]==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 O=w.lastIndexOf("."),T=O>-1&&w.substring(O+1,w.length);if(T)return ae.findModeByExtension(T)},ae.findModeByName=function(w){w=w.toLowerCase();for(var P=0;P<ae.modeInfo.length;P++){var S=ae.modeInfo[P];if(S.name.toLowerCase()==w)return S;if(S.alias){for(var O=0;O<S.alias.length;O++)if(S.alias[O].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"),O=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 Ee=Object(Z.a)(oe,1),ye=Ee[0];return ye.length>=Q.length?ie.slice(Q.length):ie}).join(`
|
|
|
`)}var p=[],h=["<ul>"],d=new O.a.Renderer,a=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function u(){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(Ee){Q.push(Ee)}),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=a.exec(J);if(B)return{type:"heading",raw:B[0],depth:B[1].length,text:B[2]}},fences:function(J){var B=this.rules.block.fences.exec(J);if(B){var Q=B[0],ie=l(Q,B[3]||""),oe=B[2]?B[2].trim():B[2];if(["latex","katex","math"].indexOf(oe)>=0){var Ee=y(),ye=ie;ie=Ee,v[Ee]={type:"block",expression:ye}}return{type:"code",raw:Q,lang:oe,text:ie}}}},t=/(?:\${2})([^\n`]+?)(?:\${2})/gi,c=0,y=function(){return"__special_katext_id_".concat(c++,"__")},v={};function _(){return v}function b(){c=0,v={}}function m(X){return X=X.replace(t,function(J,B){var Q=y();return v[Q]={type:"inline",expression:B},Q}),X}var g=d.listitem;d.listitem=function(X){return g(m(X))};var E=d.paragraph;d.paragraph=function(X){return E(m(X))};var o=d.tablecell;d.tablecell=function(X,J){return o(m(X),J)},d.code=function(X,J,B){var Q=(J||"").match(/\S*/)[0];return Q?["latex","katex","math"].indexOf(Q)>=0?"<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+">"},O.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),O.a.use({tokenizer:n,renderer:d});var x=O.a,C=z("SJMd"),A=z("ulZh"),D=z.n(A),I=z("m3rI"),F=z("Oy/b"),H=z("p5ED"),te=/<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=X.value,B=J===void 0?"":J,Q=X.className,ie=X.showTextOnly,oe=X.showLines,Ee=X.style,ye=Ee===void 0?{}:Ee,Le=X.stylesPrev,pe=Le===void 0?{}:Le,Ce=String(B),Be=Object(U.useState)(""),Pe=Object(Z.a)(Be,2),ke=Pe[0],Ne=Pe[1],he=Object(U.useMemo)(function(){try{var Ye=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ee=/\"\/api\/attachments\/|\"\/attachments\/download\//g,M=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ce=Ce.replace(Ye,"("+I.a.API_SERVER+"/api/attachments/").replace(ee,'"'+I.a.API_SERVER+"/api/attachments/").replace(M,'"'+I.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
|
|
|
`),Ce=Ce.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
|
`)}catch(Y){}var N=x(Ce),$=_();if(Ce.match(/\[TOC\]/)&&(N=N.replace("<p>[TOC]</p>",i()),u()),N=N.replace(/(__special_katext_id_\d+__)/g,function(Y,me){var Re=$[me],rt=Re.type,De=Re.expression;return Object(F.renderToString)(j(De)||"",{displayMode:rt==="block",throwOnError:!1,output:"html"})}),N=N.replace(/▁/g,"\u2581\u2581\u2581"),b(),ie){var V=document.createElement("div");return V.innerHTML=N,V.innerText}return setTimeout(function(){return Ue()},500),N},[Ce]),ue=Object(U.useRef)();s.WebkitLineClamp=oe,oe&&(ye=Object(ae.a)(Object(ae.a)({},ye),s));function Ie(Ye){var ee=Ye.target;if(ee.tagName.toUpperCase()==="A"){var M=ee.getAttribute("href");if(M.indexOf("office")>-1)Ye.preventDefault(),Ne(M);else if(M.startsWith("#")){Ye.preventDefault();var N=document.getElementById(M.replace("#",""));N&&N.scrollIntoView(!0)}}}var Ue=function(){var ee,M=(ee=ue.current)===null||ee===void 0?void 0:ee.querySelectorAll("video");M==null||M.forEach(function(N){if(N.oncontextmenu=function(){return!1},N.src.indexOf(".m3u8")>-1&&!N.canPlayType("application/vnd.apple.mpegurl")){if(D.a.isSupported()){var $=new D.a;$.loadSource(N.src),$.attachMedia(N)}}})};return Object(U.useEffect)(function(){if(ue.current&&he&&(he.match(te)&&window.PR.prettyPrint()),ue.current)return ue.current.addEventListener("click",Ie),function(){ue.current.removeEventListener("click",Ie),b(),u()}},[he,ue.current,Ie]),w.a.createElement(w.a.Fragment,null,w.a.createElement("div",{ref:ue,style:Object(ae.a)({},ye),className:"".concat(Q||""," markdown-body "),dangerouslySetInnerHTML:{__html:he}}),w.a.createElement(H.a,{close:!0,data:ke,type:ke!=null&&ke.length?"office":"",style:Object(ae.a)({},pe),onClose:function(){return Ne("")}}))}},"9VGf":function($e,We,z){"use strict";z.d(We,"a",function(){return U});var ae=z("q1tI"),Z=z.n(ae);function U(w,P){var S=Object(ae.useRef)();Object(ae.useEffect)(function(){S.current=w}),Object(ae.useEffect)(function(){function O(){S.current()}if(P!==null){var T=setInterval(O,P);return function(){return clearInterval(T)}}},[P])}},AMnG:function($e,We,z){"use strict";var ae=z("miYZ"),Z=z("tsqr"),U=z("tJVT"),w=z("q1tI"),P=z.n(w),S=z("nWbc"),O=z.n(S),T=z("Ot1p");We.a=function(l){var p=l.id,h=l.activeDiscussIndex,d=l.onReplyDiscuss,a=Object(w.useState)(""),u=Object(U.a)(a,2),s=u[0],f=u[1];function i(t){f(t)}function n(){if(!s){Z.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}d(p,s),f("")}return P.a.createElement("div",{key:p,className:"discuss-item-editor",style:{display:h===p?"block":"none",width:"100%"}},P.a.createElement(T.a,{miniToolbar:!0,startInit:h===p,defaultValue:s,id:p,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:i}),P.a.createElement("a",{onClick:n,className:"btn-send"},"\u53D1\u9001"))}},Aky1:function($e,We,z){"use strict";z.d(We,"a",function(){return l});var ae=z("ErOA"),Z=z("ppsT"),U=z.n(Z),w="",P,S="";function O(p){T(p)}function T(p){P=new U.a.Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:1829848226361863,enableUploadProgress:!1,addFileSuccess:function(d){console.log("addFileSuccess: "+d.file.name),p.addFileSuccess&&p.addFileSuccess(d),P.startUpload()},onUploadstarted:function(d){var a=d.file.name;if(d.videoId){var f="/api/users/".concat(w,"/video_auths.json");Object(ae.a)(f,{method:"put",body:{video_id:d.videoId,title:a,file_name:a,virtual_classroom_id:S}}).then(function(i){if(i.status==-1){p.onUploadError&&p.onUploadError(d);return}var n=i.data,t=n.UploadAuth,c=n.UploadAddress,y=n.VideoId;P.setUploadAuthAndAddress(d,t,c)}).catch(function(i){P.deleteFile(P._curIndex),P.nextUpload(),console.log(i)})}else{var u="/api/users/".concat(w,"/video_auths.json"),s="";Object(ae.a)(u,{method:"Post",body:{title:s+a,file_name:s+a,virtual_classroom_id:S}}).then(function(i){if(i){var n=i.data,t=n.UploadAuth,c=n.UploadAddress,y=n.VideoId;P.setUploadAuthAndAddress(d,t,c,y)}}).catch(function(i){P.deleteFile(P._curIndex),P.nextUpload(),console.log(i)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(d){p.onUploadSucceed&&p.onUploadSucceed(d),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(d,a,u){p.onUploadFailed&&p.onUploadFailed(d),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(d,a,u){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(d,a,u){p.onUploadProgress&&p.onUploadProgress(d,a,u);var s=Math.ceil(u*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(d){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var a="/api/users/".concat(w,"/video_auths.json");Object(ae.a)(a,{method:"put",body:{video_id:d.videoId}}).then(function(u){var s=u.data,f=s.UploadAuth;P.resumeUploadWithAuth(f)}).catch(function(u){console.log(u)})},onUploadEnd:function(d){p.onUploadEnd&&p.onUploadEnd(d),console.log("onUploadEnd: uploaded all the files")}}),p.gotUploader&&p.gotUploader(P)}function l(p,h,d){p&&(w=p),h&&(S=h),O(d)}},BU3w:function($e,We,z){"use strict";z.d(We,"a",function(){return S});var ae=z("MNnm"),Z="rc-util-key";function U(O){if(O.attachTo)return O.attachTo;var T=document.querySelector("head");return T||document.body}function w(O){var T,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ae.a)())return null;var p=document.createElement("style");if((T=l.csp)===null||T===void 0?void 0:T.nonce){var h;p.nonce=(h=l.csp)===null||h===void 0?void 0:h.nonce}p.innerHTML=O;var d=U(l),a=d.firstChild;return l.prepend&&d.prepend?d.prepend(p):l.prepend&&a?d.insertBefore(p,a):d.appendChild(p),p}var P=new Map;function S(O,T){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=U(l);if(!P.has(p)){var h=w("",l),d=h.parentNode;P.set(p,d),d.removeChild(h)}var a=Array.from(P.get(p).children).find(function(n){return n.tagName==="STYLE"&&n[Z]===T});if(a){var u,s;if(((u=l.csp)===null||u===void 0?void 0:u.nonce)&&a.nonce!==((s=l.csp)===null||s===void 0?void 0:s.nonce)){var f;a.nonce=(f=l.csp)===null||f===void 0?void 0:f.nonce}return a.innerHTML!==O&&(a.innerHTML=O),a}var i=w(O,l);return i[Z]=T,i}},Bd2K:function($e,We,z){(function(ae){ae(z("VrN/"),z("osHv"))})(function(ae){ae.defineOption("autoCloseTags",!1,function(l,p,h){if(h!=ae.Init&&h&&l.removeKeyMap("autoCloseTags"),!p)return;var d={name:"autoCloseTags"};(typeof p!="object"||p.whenClosing!==!1)&&(d["'/'"]=function(a){return S(a)}),(typeof p!="object"||p.whenOpening!==!1)&&(d["'>'"]=function(a){return w(a)}),l.addKeyMap(d)});var Z=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],U=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function w(l){if(l.getOption("disableInput"))return ae.Pass;for(var p=l.listSelections(),h=[],d=l.getOption("autoCloseTags"),a=0;a<p.length;a++){if(!p[a].empty())return ae.Pass;var u=p[a].head,s=l.getTokenAt(u),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 c=f.mode.configuration=="html",y=typeof d=="object"&&d.dontCloseTags||c&&Z,v=typeof d=="object"&&d.indentTags||c&&U;s.end>u.ch&&(t=t.slice(0,t.length-s.end+u.ch));var _=t.toLowerCase();if(!t||s.type=="string"&&(s.end!=u.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&n.close||s.string.indexOf("/")==u.ch-s.start-1||y&&O(y,_)>-1||T(l,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(i)||[],t,u,!0))return ae.Pass;var b=typeof d=="object"&&d.emptyTags;if(b&&O(b,t)>-1){h[a]={text:"/>",newPos:ae.Pos(u.line,u.ch+2)};continue}var m=v&&O(v,_)>-1;h[a]={indent:m,text:">"+(m?`
|
|
|
|
|
|
`:"")+"</"+t+">",newPos:m?ae.Pos(u.line+1,0):ae.Pos(u.line,u.ch+1)}}for(var g=typeof d=="object"&&d.dontIndentOnAutoClose,a=p.length-1;a>=0;a--){var E=h[a];l.replaceRange(E.text,p[a].head,p[a].anchor,"+insert");var o=l.listSelections().slice(0);o[a]={head:E.newPos,anchor:E.newPos},l.setSelections(o),!g&&E.indent&&(l.indentLine(E.newPos.line,null,!0),l.indentLine(E.newPos.line+1,null,!0))}}function P(l,p){for(var h=l.listSelections(),d=[],a=p?"/":"</",u=l.getOption("autoCloseTags"),s=typeof u=="object"&&u.dontIndentOnSlash,f=0;f<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),c=t.state;if(p&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=i.ch-1))return ae.Pass;var y,v=t.mode.name!="xml"&&l.getMode().name=="htmlmixed";if(v&&t.mode.name=="javascript")y=a+"script";else if(v&&t.mode.name=="css")y=a+"style";else{var _=t.mode.xmlCurrentContext&&t.mode.xmlCurrentContext(c);if(!_||_.length&&T(l,_,_[_.length-1],i))return ae.Pass;y=a+_[_.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 O(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,a){if(!ae.scanForClosingTag)return!1;var u=Math.min(l.lastLine()+1,d.line+500),s=ae.scanForClosingTag(l,d,null,u);if(!s||s.tag!=h)return!1;for(var f=a?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,u);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"),O=z.n(S),T=function(p){var h=p.buttonProps,d=h===void 0?{}:h,a=p.styles,u=a===void 0?{}:a,s=p.customText,f=p.ButtonText,i=p.ButtonClick,n=p.Buttonclass,t=p.ButtonTwo;return U.a.createElement("div",{className:O.a.none_panels,style:Object(ae.a)({},u)},U.a.createElement("div",null,U.a.createElement("img",{src:P.a,alt:""}),U.a.createElement("p",{className:O.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 O});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],a=l?"".concat(l,"/").concat(d.name):"".concat(d.name);p.push({title:d.name,isLeaf:!(d.type==="tree"),key:a})}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,a=arguments,u=function(){h=null,p||T.apply(d,a)},s=p&&!h;clearTimeout(h),h=setTimeout(u,l),s&&T.apply(d,a)}}var S=!0,O=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:O,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 O(l){return U().removeItem(l)}function T(){return U().clear()}},DlQD:function($e,We,z){(function(ae,Z){$e.exports=Z()})(this,function(){"use strict";function ae(we,Ae){for(var Oe=0;Oe<Ae.length;Oe++){var fe=Ae[Oe];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(we,fe.key,fe)}}function Z(we,Ae,Oe){return Ae&&ae(we.prototype,Ae),Oe&&ae(we,Oe),we}function U(we,Ae){if(!we)return;if(typeof we=="string")return w(we,Ae);var Oe=Object.prototype.toString.call(we).slice(8,-1);if(Oe==="Object"&&we.constructor&&(Oe=we.constructor.name),Oe==="Map"||Oe==="Set")return Array.from(we);if(Oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return w(we,Ae)}function w(we,Ae){(Ae==null||Ae>we.length)&&(Ae=we.length);for(var Oe=0,fe=new Array(Ae);Oe<Ae;Oe++)fe[Oe]=we[Oe];return fe}function P(we,Ae){var Oe;if(typeof Symbol=="undefined"||we[Symbol.iterator]==null){if(Array.isArray(we)||(Oe=U(we))||Ae&&we&&typeof we.length=="number"){Oe&&(we=Oe);var fe=0;return function(){return fe>=we.length?{done:!0}:{done:!1,value:we[fe++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Oe=we[Symbol.iterator](),Oe.next.bind(Oe)}function S(we,Ae){return Ae={exports:{}},we(Ae,Ae.exports),Ae.exports}var O=S(function(we){function Ae(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Oe(fe){we.exports.defaults=fe}we.exports={defaults:Ae(),getDefaults:Ae,changeDefaults:Oe}}),T=O.defaults,l=O.getDefaults,p=O.changeDefaults,h=/[&<>"']/,d=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,u=/[<>"']|&(?!#?\w+;)/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(Ae){return s[Ae]};function i(we,Ae){if(Ae){if(h.test(we))return we.replace(d,f)}else if(a.test(we))return we.replace(u,f);return we}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function t(we){return we.replace(n,function(Ae,Oe){return Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""})}var c=/(^|[^\[])\^/g;function y(we,Ae){we=we.source||we,Ae=Ae||"";var Oe={replace:function(ge,_e){return _e=_e.source||_e,_e=_e.replace(c,"$1"),we=we.replace(ge,_e),Oe},getRegex:function(){return new RegExp(we,Ae)}};return Oe}var v=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(we,Ae,Oe){if(we){var fe;try{fe=decodeURIComponent(t(Oe)).replace(v,"").toLowerCase()}catch(ge){return null}if(fe.indexOf("javascript:")===0||fe.indexOf("vbscript:")===0||fe.indexOf("data:")===0)return null}Ae&&!_.test(Oe)&&(Oe=x(Ae,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(ge){return null}return Oe}var m={},g=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function x(we,Ae){m[" "+we]||(g.test(we)?m[" "+we]=we+"/":m[" "+we]=I(we,"/",!0)),we=m[" "+we];var Oe=we.indexOf(":")===-1;return Ae.substring(0,2)==="//"?Oe?Ae:we.replace(E,"$1")+Ae:Ae.charAt(0)==="/"?Oe?Ae:we.replace(o,"$1")+Ae:we+Ae}var C={exec:function(){}};function A(we){for(var Ae=1,Oe,fe;Ae<arguments.length;Ae++){Oe=arguments[Ae];for(fe in Oe)Object.prototype.hasOwnProperty.call(Oe,fe)&&(we[fe]=Oe[fe])}return we}function D(we,Ae){var Oe=we.replace(/\|/g,function(_e,be,Ge){for(var qe=!1,pt=be;--pt>=0&&Ge[pt]==="\\";)qe=!qe;return qe?"|":" |"}),fe=Oe.split(/ \|/),ge=0;if(fe.length>Ae)fe.splice(Ae);else for(;fe.length<Ae;)fe.push("");for(;ge<fe.length;ge++)fe[ge]=fe[ge].trim().replace(/\\\|/g,"|");return fe}function I(we,Ae,Oe){var fe=we.length;if(fe===0)return"";for(var ge=0;ge<fe;){var _e=we.charAt(fe-ge-1);if(_e===Ae&&!Oe)ge++;else if(_e!==Ae&&Oe)ge++;else break}return we.substr(0,fe-ge)}function F(we,Ae){if(we.indexOf(Ae[1])===-1)return-1;for(var Oe=we.length,fe=0,ge=0;ge<Oe;ge++)if(we[ge]==="\\")ge++;else if(we[ge]===Ae[0])fe++;else if(we[ge]===Ae[1]&&(fe--,fe<0))return ge;return-1}function H(we){we&&we.sanitize&&!we.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 te={escape:i,unescape:t,edit:y,cleanUrl:b,resolveUrl:x,noopTest:C,merge:A,splitCells:D,rtrim:I,findClosingBracket:F,checkSanitizeDeprecation:H},j=O.defaults,G=te.rtrim,X=te.splitCells,J=te.escape,B=te.findClosingBracket;function Q(we,Ae,Oe){var fe=Ae.href,ge=Ae.title?J(Ae.title):null,_e=we[1].replace(/\\([\[\]])/g,"$1");return we[0].charAt(0)!=="!"?{type:"link",raw:Oe,href:fe,title:ge,text:_e}:{type:"image",raw:Oe,href:fe,title:ge,text:J(_e)}}function ie(we,Ae){var Oe=we.match(/^(\s+)(?:```)/);if(Oe===null)return Ae;var fe=Oe[1];return Ae.split(`
|
|
|
`).map(function(ge){var _e=ge.match(/^\s+/);if(_e===null)return ge;var be=_e[0];return be.length>=fe.length?ge.slice(fe.length):ge}).join(`
|
|
|
`)}var oe=function(){function we(Oe){this.options=Oe||j}var Ae=we.prototype;return Ae.space=function(fe){var ge=this.rules.block.newline.exec(fe);if(ge)return ge[0].length>1?{type:"space",raw:ge[0]}:{raw:`
|
|
|
`}},Ae.code=function(fe,ge){var _e=this.rules.block.code.exec(fe);if(_e){var be=ge[ge.length-1];if(be&&be.type==="paragraph")return{raw:_e[0],text:_e[0].trimRight()};var Ge=_e[0].replace(/^ {4}/gm,"");return{type:"code",raw:_e[0],codeBlockStyle:"indented",text:this.options.pedantic?Ge:G(Ge,`
|
|
|
`)}}},Ae.fences=function(fe){var ge=this.rules.block.fences.exec(fe);if(ge){var _e=ge[0],be=ie(_e,ge[3]||"");return{type:"code",raw:_e,lang:ge[2]?ge[2].trim():ge[2],text:be}}},Ae.heading=function(fe){var ge=this.rules.block.heading.exec(fe);if(ge)return{type:"heading",raw:ge[0],depth:ge[1].length,text:ge[2]}},Ae.nptable=function(fe){var ge=this.rules.block.nptable.exec(fe);if(ge){var _e={type:"table",header:X(ge[1].replace(/^ *| *\| *$/g,"")),align:ge[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ge[3]?ge[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:ge[0]};if(_e.header.length===_e.align.length){var be=_e.align.length,Ge;for(Ge=0;Ge<be;Ge++)/^ *-+: *$/.test(_e.align[Ge])?_e.align[Ge]="right":/^ *:-+: *$/.test(_e.align[Ge])?_e.align[Ge]="center":/^ *:-+ *$/.test(_e.align[Ge])?_e.align[Ge]="left":_e.align[Ge]=null;for(be=_e.cells.length,Ge=0;Ge<be;Ge++)_e.cells[Ge]=X(_e.cells[Ge],_e.header.length);return _e}}},Ae.hr=function(fe){var ge=this.rules.block.hr.exec(fe);if(ge)return{type:"hr",raw:ge[0]}},Ae.blockquote=function(fe){var ge=this.rules.block.blockquote.exec(fe);if(ge){var _e=ge[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ge[0],text:_e}}},Ae.list=function(fe){var ge=this.rules.block.list.exec(fe);if(ge){for(var _e=ge[0],be=ge[2],Ge=be.length>1,qe=be[be.length-1]===")",pt={type:"list",raw:_e,ordered:Ge,start:Ge?+be.slice(0,-1):"",loose:!1,items:[]},Dt=ge[0].match(this.rules.block.item),jt=!1,Rt,Lt,lt,ft,Qe,Te,je,dt=Dt.length,Ze=0;Ze<dt;Ze++)Rt=Dt[Ze],_e=Rt,Lt=Rt.length,Rt=Rt.replace(/^ *([*+-]|\d+[.)]) */,""),~Rt.indexOf(`
|
|
|
`)&&(Lt-=Rt.length,Rt=this.options.pedantic?Rt.replace(/^ {1,4}/gm,""):Rt.replace(new RegExp("^ {1,"+Lt+"}","gm"),"")),Ze!==dt-1&&(lt=this.rules.block.bullet.exec(Dt[Ze+1])[0],(Ge?lt.length===1||!qe&<[lt.length-1]===")":lt.length>1||this.options.smartLists&<!==be)&&(ft=Dt.slice(Ze+1).join(`
|
|
|
`),pt.raw=pt.raw.substring(0,pt.raw.length-ft.length),Ze=dt-1)),Qe=jt||/\n\n(?!\s*$)/.test(Rt),Ze!==dt-1&&(jt=Rt.charAt(Rt.length-1)===`
|
|
|
`,Qe||(Qe=jt)),Qe&&(pt.loose=!0),Te=/^\[[ xX]\] /.test(Rt),je=void 0,Te&&(je=Rt[1]!==" ",Rt=Rt.replace(/^\[[ xX]\] +/,"")),pt.items.push({type:"list_item",raw:_e,task:Te,checked:je,loose:Qe,text:Rt});return pt}},Ae.html=function(fe){var ge=this.rules.block.html.exec(fe);if(ge)return{type:this.options.sanitize?"paragraph":"html",raw:ge[0],pre:!this.options.sanitizer&&(ge[1]==="pre"||ge[1]==="script"||ge[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ge[0]):J(ge[0]):ge[0]}},Ae.def=function(fe){var ge=this.rules.block.def.exec(fe);if(ge){ge[3]&&(ge[3]=ge[3].substring(1,ge[3].length-1));var _e=ge[1].toLowerCase().replace(/\s+/g," ");return{tag:_e,raw:ge[0],href:ge[2],title:ge[3]}}},Ae.table=function(fe){var ge=this.rules.block.table.exec(fe);if(ge){var _e={type:"table",header:X(ge[1].replace(/^ *| *\| *$/g,"")),align:ge[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ge[3]?ge[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(_e.header.length===_e.align.length){_e.raw=ge[0];var be=_e.align.length,Ge;for(Ge=0;Ge<be;Ge++)/^ *-+: *$/.test(_e.align[Ge])?_e.align[Ge]="right":/^ *:-+: *$/.test(_e.align[Ge])?_e.align[Ge]="center":/^ *:-+ *$/.test(_e.align[Ge])?_e.align[Ge]="left":_e.align[Ge]=null;for(be=_e.cells.length,Ge=0;Ge<be;Ge++)_e.cells[Ge]=X(_e.cells[Ge].replace(/^ *\| *| *\| *$/g,""),_e.header.length);return _e}}},Ae.lheading=function(fe){var ge=this.rules.block.lheading.exec(fe);if(ge)return{type:"heading",raw:ge[0],depth:ge[2].charAt(0)==="="?1:2,text:ge[1]}},Ae.paragraph=function(fe){var ge=this.rules.block.paragraph.exec(fe);if(ge)return{type:"paragraph",raw:ge[0],text:ge[1].charAt(ge[1].length-1)===`
|
|
|
`?ge[1].slice(0,-1):ge[1]}},Ae.text=function(fe,ge){var _e=this.rules.block.text.exec(fe);if(_e){var be=ge[ge.length-1];return be&&be.type==="text"?{raw:_e[0],text:_e[0]}:{type:"text",raw:_e[0],text:_e[0]}}},Ae.escape=function(fe){var ge=this.rules.inline.escape.exec(fe);if(ge)return{type:"escape",raw:ge[0],text:J(ge[1])}},Ae.tag=function(fe,ge,_e){var be=this.rules.inline.tag.exec(fe);if(be)return!ge&&/^<a /i.test(be[0])?ge=!0:ge&&/^<\/a>/i.test(be[0])&&(ge=!1),!_e&&/^<(pre|code|kbd|script)(\s|>)/i.test(be[0])?_e=!0:_e&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(be[0])&&(_e=!1),{type:this.options.sanitize?"text":"html",raw:be[0],inLink:ge,inRawBlock:_e,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):J(be[0]):be[0]}},Ae.link=function(fe){var ge=this.rules.inline.link.exec(fe);if(ge){var _e=B(ge[2],"()");if(_e>-1){var be=ge[0].indexOf("!")===0?5:4,Ge=be+ge[1].length+_e;ge[2]=ge[2].substring(0,_e),ge[0]=ge[0].substring(0,Ge).trim(),ge[3]=""}var qe=ge[2],pt="";if(this.options.pedantic){var Dt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(qe);Dt?(qe=Dt[1],pt=Dt[3]):pt=""}else pt=ge[3]?ge[3].slice(1,-1):"";qe=qe.trim().replace(/^<([\s\S]*)>$/,"$1");var jt=Q(ge,{href:qe&&qe.replace(this.rules.inline._escapes,"$1"),title:pt&&pt.replace(this.rules.inline._escapes,"$1")},ge[0]);return jt}},Ae.reflink=function(fe,ge){var _e;if((_e=this.rules.inline.reflink.exec(fe))||(_e=this.rules.inline.nolink.exec(fe))){var be=(_e[2]||_e[1]).replace(/\s+/g," ");if(be=ge[be.toLowerCase()],!be||!be.href){var Ge=_e[0].charAt(0);return{type:"text",raw:Ge,text:Ge}}var qe=Q(_e,be,_e[0]);return qe}},Ae.strong=function(fe,ge,_e){_e===void 0&&(_e="");var be=this.rules.inline.strong.start.exec(fe);if(be&&(!be[1]||be[1]&&(_e===""||this.rules.inline.punctuation.exec(_e)))){ge=ge.slice(-1*fe.length);var Ge=be[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ge.lastIndex=0;for(var qe;(be=Ge.exec(ge))!=null;)if(qe=this.rules.inline.strong.middle.exec(ge.slice(0,be.index+3)),qe)return{type:"strong",raw:fe.slice(0,qe[0].length),text:fe.slice(2,qe[0].length-2)}}},Ae.em=function(fe,ge,_e){_e===void 0&&(_e="");var be=this.rules.inline.em.start.exec(fe);if(be&&(!be[1]||be[1]&&(_e===""||this.rules.inline.punctuation.exec(_e)))){ge=ge.slice(-1*fe.length);var Ge=be[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ge.lastIndex=0;for(var qe;(be=Ge.exec(ge))!=null;)if(qe=this.rules.inline.em.middle.exec(ge.slice(0,be.index+2)),qe)return{type:"em",raw:fe.slice(0,qe[0].length),text:fe.slice(1,qe[0].length-1)}}},Ae.codespan=function(fe){var ge=this.rules.inline.code.exec(fe);if(ge){var _e=ge[2].replace(/\n/g," "),be=/[^ ]/.test(_e),Ge=_e.startsWith(" ")&&_e.endsWith(" ");return be&&Ge&&(_e=_e.substring(1,_e.length-1)),_e=J(_e,!0),{type:"codespan",raw:ge[0],text:_e}}},Ae.br=function(fe){var ge=this.rules.inline.br.exec(fe);if(ge)return{type:"br",raw:ge[0]}},Ae.del=function(fe){var ge=this.rules.inline.del.exec(fe);if(ge)return{type:"del",raw:ge[0],text:ge[1]}},Ae.autolink=function(fe,ge){var _e=this.rules.inline.autolink.exec(fe);if(_e){var be,Ge;return _e[2]==="@"?(be=J(this.options.mangle?ge(_e[1]):_e[1]),Ge="mailto:"+be):(be=J(_e[1]),Ge=be),{type:"link",raw:_e[0],text:be,href:Ge,tokens:[{type:"text",raw:be,text:be}]}}},Ae.url=function(fe,ge){var _e;if(_e=this.rules.inline.url.exec(fe)){var be,Ge;if(_e[2]==="@")be=J(this.options.mangle?ge(_e[0]):_e[0]),Ge="mailto:"+be;else{var qe;do qe=_e[0],_e[0]=this.rules.inline._backpedal.exec(_e[0])[0];while(qe!==_e[0]);be=J(_e[0]),_e[1]==="www."?Ge="http://"+be:Ge=be}return{type:"link",raw:_e[0],text:be,href:Ge,tokens:[{type:"text",raw:be,text:be}]}}},Ae.inlineText=function(fe,ge,_e){var be=this.rules.inline.text.exec(fe);if(be){var Ge;return ge?Ge=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):J(be[0]):be[0]:Ge=J(this.options.smartypants?_e(be[0]):be[0]),{type:"text",raw:be[0],text:Ge}}},we}(),Ee=te.noopTest,ye=te.edit,Le=te.merge,pe={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![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:Ee,table:Ee,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};pe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,pe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,pe.def=ye(pe.def).replace("label",pe._label).replace("title",pe._title).getRegex(),pe.bullet=/(?:[*+-]|\d{1,9}[.)])/,pe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,pe.item=ye(pe.item,"gm").replace(/bull/g,pe.bullet).getRegex(),pe.list=ye(pe.list).replace(/bull/g,pe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+pe.def.source+")").getRegex(),pe._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",pe._comment=/<!--(?!-?>)[\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=Le({},pe),pe.gfm=Le({},pe.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),pe.gfm.nptable=ye(pe.gfm.nptable).replace("hr",pe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.gfm.table=ye(pe.gfm.table).replace("hr",pe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.pedantic=Le({},pe.normal,{html:ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<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:Ee,paragraph:ye(pe.normal._paragraph).replace("hr",pe.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",pe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Ce={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ee,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![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:Ee,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Ce._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Ce.punctuation=ye(Ce.punctuation).replace(/punctuation/g,Ce._punctuation).getRegex(),Ce._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Ce._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Ce.em.start=ye(Ce.em.start).replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.em.middle=ye(Ce.em.middle).replace(/punctuation/g,Ce._punctuation).replace(/overlapSkip/g,Ce._overlapSkip).getRegex(),Ce.em.endAst=ye(Ce.em.endAst,"g").replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.em.endUnd=ye(Ce.em.endUnd,"g").replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.strong.start=ye(Ce.strong.start).replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.strong.middle=ye(Ce.strong.middle).replace(/punctuation/g,Ce._punctuation).replace(/blockSkip/g,Ce._blockSkip).getRegex(),Ce.strong.endAst=ye(Ce.strong.endAst,"g").replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.strong.endUnd=ye(Ce.strong.endUnd,"g").replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.blockSkip=ye(Ce._blockSkip,"g").getRegex(),Ce.overlapSkip=ye(Ce._overlapSkip,"g").getRegex(),Ce._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ce._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ce._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Ce.autolink=ye(Ce.autolink).replace("scheme",Ce._scheme).replace("email",Ce._email).getRegex(),Ce._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ce.tag=ye(Ce.tag).replace("comment",pe._comment).replace("attribute",Ce._attribute).getRegex(),Ce._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ce._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Ce._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ce.link=ye(Ce.link).replace("label",Ce._label).replace("href",Ce._href).replace("title",Ce._title).getRegex(),Ce.reflink=ye(Ce.reflink).replace("label",Ce._label).getRegex(),Ce.reflinkSearch=ye(Ce.reflinkSearch,"g").replace("reflink",Ce.reflink).replace("nolink",Ce.nolink).getRegex(),Ce.normal=Le({},Ce),Ce.pedantic=Le({},Ce.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ye(/^!?\[(label)\]\((.*?)\)/).replace("label",Ce._label).getRegex(),reflink:ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ce._label).getRegex()}),Ce.gfm=Le({},Ce.normal,{escape:ye(Ce.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),Ce.gfm.url=ye(Ce.gfm.url,"i").replace("email",Ce.gfm._extended_email).getRegex(),Ce.breaks=Le({},Ce.gfm,{br:ye(Ce.br).replace("{2,}","*").getRegex(),text:ye(Ce.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Be={block:pe,inline:Ce},Pe=O.defaults,ke=Be.block,Ne=Be.inline;function he(we){return we.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(we){var Ae="",Oe,fe,ge=we.length;for(Oe=0;Oe<ge;Oe++)fe=we.charCodeAt(Oe),Math.random()>.5&&(fe="x"+fe.toString(16)),Ae+="&#"+fe+";";return Ae}var Ie=function(){function we(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||Pe,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var fe={block:ke.normal,inline:Ne.normal};this.options.pedantic?(fe.block=ke.pedantic,fe.inline=Ne.pedantic):this.options.gfm&&(fe.block=ke.gfm,this.options.breaks?fe.inline=Ne.breaks:fe.inline=Ne.gfm),this.tokenizer.rules=fe}we.lex=function(fe,ge){var _e=new we(ge);return _e.lex(fe)};var Ae=we.prototype;return Ae.lex=function(fe){return fe=fe.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(fe,this.tokens,!0),this.inline(this.tokens),this.tokens},Ae.blockTokens=function(fe,ge,_e){ge===void 0&&(ge=[]),_e===void 0&&(_e=!0),fe=fe.replace(/^ +$/gm,"");for(var be,Ge,qe,pt;fe;){if(be=this.tokenizer.space(fe)){fe=fe.substring(be.raw.length),be.type&&ge.push(be);continue}if(be=this.tokenizer.code(fe,ge)){fe=fe.substring(be.raw.length),be.type?ge.push(be):(pt=ge[ge.length-1],pt.raw+=`
|
|
|
`+be.raw,pt.text+=`
|
|
|
`+be.text);continue}if(be=this.tokenizer.fences(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.heading(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.nptable(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.hr(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.blockquote(fe)){fe=fe.substring(be.raw.length),be.tokens=this.blockTokens(be.text,[],_e),ge.push(be);continue}if(be=this.tokenizer.list(fe)){for(fe=fe.substring(be.raw.length),qe=be.items.length,Ge=0;Ge<qe;Ge++)be.items[Ge].tokens=this.blockTokens(be.items[Ge].text,[],!1);ge.push(be);continue}if(be=this.tokenizer.html(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(_e&&(be=this.tokenizer.def(fe))){fe=fe.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(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.lheading(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(_e&&(be=this.tokenizer.paragraph(fe))){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.text(fe,ge)){fe=fe.substring(be.raw.length),be.type?ge.push(be):(pt=ge[ge.length-1],pt.raw+=`
|
|
|
`+be.raw,pt.text+=`
|
|
|
`+be.text);continue}if(fe){var Dt="Infinite loop on byte: "+fe.charCodeAt(0);if(this.options.silent){console.error(Dt);break}else throw new Error(Dt)}}return ge},Ae.inline=function(fe){var ge,_e,be,Ge,qe,pt,Dt=fe.length;for(ge=0;ge<Dt;ge++){pt=fe[ge];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,_e=0;_e<Ge;_e++)pt.tokens.header[_e]=[],this.inlineTokens(pt.header[_e],pt.tokens.header[_e]);for(Ge=pt.cells.length,_e=0;_e<Ge;_e++)for(qe=pt.cells[_e],pt.tokens.cells[_e]=[],be=0;be<qe.length;be++)pt.tokens.cells[_e][be]=[],this.inlineTokens(qe[be],pt.tokens.cells[_e][be]);break}case"blockquote":{this.inline(pt.tokens);break}case"list":{for(Ge=pt.items.length,_e=0;_e<Ge;_e++)this.inline(pt.items[_e].tokens);break}}}return fe},Ae.inlineTokens=function(fe,ge,_e,be,Ge){ge===void 0&&(ge=[]),_e===void 0&&(_e=!1),be===void 0&&(be=!1),Ge===void 0&&(Ge="");var qe,pt=fe,Dt;if(this.tokens.links){var jt=Object.keys(this.tokens.links);if(jt.length>0)for(;(Dt=this.tokenizer.rules.inline.reflinkSearch.exec(pt))!=null;)jt.includes(Dt[0].slice(Dt[0].lastIndexOf("[")+1,-1))&&(pt=pt.slice(0,Dt.index)+"["+"a".repeat(Dt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Dt=this.tokenizer.rules.inline.blockSkip.exec(pt))!=null;)pt=pt.slice(0,Dt.index)+"["+"a".repeat(Dt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;fe;){if(qe=this.tokenizer.escape(fe)){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(qe=this.tokenizer.tag(fe,_e,be)){fe=fe.substring(qe.raw.length),_e=qe.inLink,be=qe.inRawBlock,ge.push(qe);continue}if(qe=this.tokenizer.link(fe)){fe=fe.substring(qe.raw.length),qe.type==="link"&&(qe.tokens=this.inlineTokens(qe.text,[],!0,be)),ge.push(qe);continue}if(qe=this.tokenizer.reflink(fe,this.tokens.links)){fe=fe.substring(qe.raw.length),qe.type==="link"&&(qe.tokens=this.inlineTokens(qe.text,[],!0,be)),ge.push(qe);continue}if(qe=this.tokenizer.strong(fe,pt,Ge)){fe=fe.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],_e,be),ge.push(qe);continue}if(qe=this.tokenizer.em(fe,pt,Ge)){fe=fe.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],_e,be),ge.push(qe);continue}if(qe=this.tokenizer.codespan(fe)){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(qe=this.tokenizer.br(fe)){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(qe=this.tokenizer.del(fe)){fe=fe.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],_e,be),ge.push(qe);continue}if(qe=this.tokenizer.autolink(fe,ue)){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(!_e&&(qe=this.tokenizer.url(fe,ue))){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(qe=this.tokenizer.inlineText(fe,be,he)){fe=fe.substring(qe.raw.length),Ge=qe.raw.slice(-1),ge.push(qe);continue}if(fe){var Rt="Infinite loop on byte: "+fe.charCodeAt(0);if(this.options.silent){console.error(Rt);break}else throw new Error(Rt)}}return ge},Z(we,null,[{key:"rules",get:function(){return{block:ke,inline:Ne}}}]),we}(),Ue=O.defaults,Ye=te.cleanUrl,ee=te.escape,M=function(){function we(Oe){this.options=Oe||Ue}var Ae=we.prototype;return Ae.code=function(fe,ge,_e){var be=(ge||"").match(/\S*/)[0];if(this.options.highlight){var Ge=this.options.highlight(fe,be);Ge!=null&&Ge!==fe&&(_e=!0,fe=Ge)}return be?'<pre><code class="'+this.options.langPrefix+ee(be,!0)+'">'+(_e?fe:ee(fe,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(_e?fe:ee(fe,!0))+`</code></pre>
|
|
|
`},Ae.blockquote=function(fe){return`<blockquote>
|
|
|
`+fe+`</blockquote>
|
|
|
`},Ae.html=function(fe){return fe},Ae.heading=function(fe,ge,_e,be){return this.options.headerIds?"<h"+ge+' id="'+this.options.headerPrefix+be.slug(_e)+'">'+fe+"</h"+ge+`>
|
|
|
`:"<h"+ge+">"+fe+"</h"+ge+`>
|
|
|
`},Ae.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Ae.list=function(fe,ge,_e){var be=ge?"ol":"ul",Ge=ge&&_e!==1?' start="'+_e+'"':"";return"<"+be+Ge+`>
|
|
|
`+fe+"</"+be+`>
|
|
|
`},Ae.listitem=function(fe){return"<li>"+fe+`</li>
|
|
|
`},Ae.checkbox=function(fe){return"<input "+(fe?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ae.paragraph=function(fe){return"<p>"+fe+`</p>
|
|
|
`},Ae.table=function(fe,ge){return ge&&(ge="<tbody>"+ge+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+fe+`</thead>
|
|
|
`+ge+`</table>
|
|
|
`},Ae.tablerow=function(fe){return`<tr>
|
|
|
`+fe+`</tr>
|
|
|
`},Ae.tablecell=function(fe,ge){var _e=ge.header?"th":"td",be=ge.align?"<"+_e+' align="'+ge.align+'">':"<"+_e+">";return be+fe+"</"+_e+`>
|
|
|
`},Ae.strong=function(fe){return"<strong>"+fe+"</strong>"},Ae.em=function(fe){return"<em>"+fe+"</em>"},Ae.codespan=function(fe){return"<code>"+fe+"</code>"},Ae.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ae.del=function(fe){return"<del>"+fe+"</del>"},Ae.link=function(fe,ge,_e){if(fe=Ye(this.options.sanitize,this.options.baseUrl,fe),fe===null)return _e;var be='<a href="'+ee(fe)+'"';return ge&&(be+=' title="'+ge+'"'),be+=">"+_e+"</a>",be},Ae.image=function(fe,ge,_e){if(fe=Ye(this.options.sanitize,this.options.baseUrl,fe),fe===null)return _e;var be='<img src="'+fe+'" alt="'+_e+'"';return ge&&(be+=' title="'+ge+'"'),be+=this.options.xhtml?"/>":">",be},Ae.text=function(fe){return fe},we}(),N=function(){function we(){}var Ae=we.prototype;return Ae.strong=function(fe){return fe},Ae.em=function(fe){return fe},Ae.codespan=function(fe){return fe},Ae.del=function(fe){return fe},Ae.html=function(fe){return fe},Ae.text=function(fe){return fe},Ae.link=function(fe,ge,_e){return""+_e},Ae.image=function(fe,ge,_e){return""+_e},Ae.br=function(){return""},we}(),$=function(){function we(){this.seen={}}var Ae=we.prototype;return Ae.slug=function(fe){var ge=fe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ge)){var _e=ge;do this.seen[_e]++,ge=_e+"-"+this.seen[_e];while(this.seen.hasOwnProperty(ge))}return this.seen[ge]=0,ge},we}(),V=O.defaults,Y=te.unescape,me=function(){function we(Oe){this.options=Oe||V,this.options.renderer=this.options.renderer||new M,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new N,this.slugger=new $}we.parse=function(fe,ge){var _e=new we(ge);return _e.parse(fe)};var Ae=we.prototype;return Ae.parse=function(fe,ge){ge===void 0&&(ge=!0);var _e="",be,Ge,qe,pt,Dt,jt,Rt,Lt,lt,ft,Qe,Te,je,dt,Ze,Tt,Ct,ot,gt=fe.length;for(be=0;be<gt;be++){ft=fe[be];switch(ft.type){case"space":continue;case"hr":{_e+=this.renderer.hr();continue}case"heading":{_e+=this.renderer.heading(this.parseInline(ft.tokens),ft.depth,Y(this.parseInline(ft.tokens,this.textRenderer)),this.slugger);continue}case"code":{_e+=this.renderer.code(ft.text,ft.lang,ft.escaped);continue}case"table":{for(Lt="",Rt="",pt=ft.header.length,Ge=0;Ge<pt;Ge++)Rt+=this.renderer.tablecell(this.parseInline(ft.tokens.header[Ge]),{header:!0,align:ft.align[Ge]});for(Lt+=this.renderer.tablerow(Rt),lt="",pt=ft.cells.length,Ge=0;Ge<pt;Ge++){for(jt=ft.tokens.cells[Ge],Rt="",Dt=jt.length,qe=0;qe<Dt;qe++)Rt+=this.renderer.tablecell(this.parseInline(jt[qe]),{header:!1,align:ft.align[qe]});lt+=this.renderer.tablerow(Rt)}_e+=this.renderer.table(Lt,lt);continue}case"blockquote":{lt=this.parse(ft.tokens),_e+=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,Ct=Ze.task,dt="",Ze.task&&(ot=this.renderer.checkbox(Tt),je?Ze.tokens.length>0&&Ze.tokens[0].type==="text"?(Ze.tokens[0].text=ot+" "+Ze.tokens[0].text,Ze.tokens[0].tokens&&Ze.tokens[0].tokens.length>0&&Ze.tokens[0].tokens[0].type==="text"&&(Ze.tokens[0].tokens[0].text=ot+" "+Ze.tokens[0].tokens[0].text)):Ze.tokens.unshift({type:"text",text:ot}):dt+=ot),dt+=this.parse(Ze.tokens,je),lt+=this.renderer.listitem(dt,Ct,Tt);_e+=this.renderer.list(lt,Qe,Te);continue}case"html":{_e+=this.renderer.html(ft.text);continue}case"paragraph":{_e+=this.renderer.paragraph(this.parseInline(ft.tokens));continue}case"text":{for(lt=ft.tokens?this.parseInline(ft.tokens):ft.text;be+1<gt&&fe[be+1].type==="text";)ft=fe[++be],lt+=`
|
|
|
`+(ft.tokens?this.parseInline(ft.tokens):ft.text);_e+=ge?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 _e},Ae.parseInline=function(fe,ge){ge=ge||this.renderer;var _e="",be,Ge,qe=fe.length;for(be=0;be<qe;be++){Ge=fe[be];switch(Ge.type){case"escape":{_e+=ge.text(Ge.text);break}case"html":{_e+=ge.html(Ge.text);break}case"link":{_e+=ge.link(Ge.href,Ge.title,this.parseInline(Ge.tokens,ge));break}case"image":{_e+=ge.image(Ge.href,Ge.title,Ge.text);break}case"strong":{_e+=ge.strong(this.parseInline(Ge.tokens,ge));break}case"em":{_e+=ge.em(this.parseInline(Ge.tokens,ge));break}case"codespan":{_e+=ge.codespan(Ge.text);break}case"br":{_e+=ge.br();break}case"del":{_e+=ge.del(this.parseInline(Ge.tokens,ge));break}case"text":{_e+=ge.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 _e},we}(),Re=te.merge,rt=te.checkSanitizeDeprecation,De=te.escape,Me=O.getDefaults,Xe=O.changeDefaults,tt=O.defaults;function Ve(we,Ae,Oe){if(typeof we=="undefined"||we===null)throw new Error("marked(): input parameter is undefined or null");if(typeof we!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(we)+", string expected");if(typeof Ae=="function"&&(Oe=Ae,Ae=null),Ae=Re({},Ve.defaults,Ae||{}),rt(Ae),Oe){var fe=Ae.highlight,ge;try{ge=Ie.lex(we,Ae)}catch(qe){return Oe(qe)}var _e=function(pt){var Dt;if(!pt)try{Dt=me.parse(ge,Ae)}catch(jt){pt=jt}return Ae.highlight=fe,pt?Oe(pt):Oe(null,Dt)};if(!fe||fe.length<3)return _e();if(delete Ae.highlight,!ge.length)return _e();var be=0;Ve.walkTokens(ge,function(qe){qe.type==="code"&&(be++,setTimeout(function(){fe(qe.text,qe.lang,function(pt,Dt){if(pt)return _e(pt);Dt!=null&&Dt!==qe.text&&(qe.text=Dt,qe.escaped=!0),be--,be===0&&_e()})},0))}),be===0&&_e();return}try{var Ge=Ie.lex(we,Ae);return Ae.walkTokens&&Ve.walkTokens(Ge,Ae.walkTokens),me.parse(Ge,Ae)}catch(qe){if(qe.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Ae.silent)return"<p>An error occurred:</p><pre>"+De(qe.message+"",!0)+"</pre>";throw qe}}Ve.options=Ve.setOptions=function(we){return Re(Ve.defaults,we),Xe(Ve.defaults),Ve},Ve.getDefaults=Me,Ve.defaults=tt,Ve.use=function(we){var Ae=Re({},we);if(we.renderer&&function(){var fe=Ve.defaults.renderer||new M,ge=function(Ge){var qe=fe[Ge];fe[Ge]=function(){for(var pt=arguments.length,Dt=new Array(pt),jt=0;jt<pt;jt++)Dt[jt]=arguments[jt];var Rt=we.renderer[Ge].apply(fe,Dt);return Rt===!1&&(Rt=qe.apply(fe,Dt)),Rt}};for(var _e in we.renderer)ge(_e);Ae.renderer=fe}(),we.tokenizer&&function(){var fe=Ve.defaults.tokenizer||new oe,ge=function(Ge){var qe=fe[Ge];fe[Ge]=function(){for(var pt=arguments.length,Dt=new Array(pt),jt=0;jt<pt;jt++)Dt[jt]=arguments[jt];var Rt=we.tokenizer[Ge].apply(fe,Dt);return Rt===!1&&(Rt=qe.apply(fe,Dt)),Rt}};for(var _e in we.tokenizer)ge(_e);Ae.tokenizer=fe}(),we.walkTokens){var Oe=Ve.defaults.walkTokens;Ae.walkTokens=function(fe){we.walkTokens(fe),Oe&&Oe(fe)}}Ve.setOptions(Ae)},Ve.walkTokens=function(we,Ae){for(var Oe=P(we),fe;!(fe=Oe()).done;){var ge=fe.value;Ae(ge);switch(ge.type){case"table":{for(var _e=P(ge.tokens.header),be;!(be=_e()).done;){var Ge=be.value;Ve.walkTokens(Ge,Ae)}for(var qe=P(ge.tokens.cells),pt;!(pt=qe()).done;)for(var Dt=pt.value,jt=P(Dt),Rt;!(Rt=jt()).done;){var Lt=Rt.value;Ve.walkTokens(Lt,Ae)}break}case"list":{Ve.walkTokens(ge.items,Ae);break}default:ge.tokens&&Ve.walkTokens(ge.tokens,Ae)}}},Ve.Parser=me,Ve.parser=me.parse,Ve.Renderer=M,Ve.TextRenderer=N,Ve.Lexer=Ie,Ve.lexer=Ie.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:O,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),a=d.length-1;a>=0;a--){if(!U(d[a]))continue;var u=d[a].split("="),s=unescape(u[0]),f=unescape(u[1]);h(f,s)}}function O(h,d){if(!h)return;w.cookie=escape(h)+"="+escape(d)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function T(h){if(!h||!p(h))return;w.cookie=escape(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function l(){S(function(h,d){T(d)})}function p(h){return new RegExp("(?:^|;\\s*)"+escape(h).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(w.cookie)}},E2g8:function($e,We,z){(function(ae,Z){/*!
|
|
|
* @overview es6-promise - a tiny implementation of Promises/A+.
|
|
|
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
|
|
* @license Licensed under MIT license
|
|
|
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
|
|
* @version v4.2.8+1e68dce6
|
|
|
*/(function(U,w){$e.exports=w()})(this,function(){"use strict";function U(M){var N=typeof M;return M!==null&&(N==="object"||N==="function")}function w(M){return typeof M=="function"}var P=void 0;Array.isArray?P=Array.isArray:P=function(M){return Object.prototype.toString.call(M)==="[object Array]"};var S=P,O=0,T=void 0,l=void 0,p=function(N,$){_[O]=N,_[O+1]=$,O+=2,O===2&&(l?l(b):g())};function h(M){l=M}function d(M){p=M}var a=typeof window!="undefined"?window:void 0,u=a||{},s=u.MutationObserver||u.WebKitMutationObserver,f=typeof self=="undefined"&&typeof ae!="undefined"&&{}.toString.call(ae)==="[object process]",i=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function n(){return function(){return ae.nextTick(b)}}function t(){return typeof T!="undefined"?function(){T(b)}:v()}function c(){var M=0,N=new s(b),$=document.createTextNode("");return N.observe($,{characterData:!0}),function(){$.data=M=++M%2}}function y(){var M=new MessageChannel;return M.port1.onmessage=b,function(){return M.port2.postMessage(0)}}function v(){var M=setTimeout;return function(){return M(b,1)}}var _=new Array(1e3);function b(){for(var M=0;M<O;M+=2){var N=_[M],$=_[M+1];N($),_[M]=void 0,_[M+1]=void 0}O=0}function m(){try{var M=Function("return this")().require("vertx");return T=M.runOnLoop||M.runOnContext,t()}catch(N){return v()}}var g=void 0;f?g=n():s?g=c():i?g=y():a===void 0&&!0?g=m():g=v();function E(M,N){var $=this,V=new this.constructor(C);V[x]===void 0&&Be(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 o(M){var N=this;if(M&&typeof M=="object"&&M.constructor===N)return M;var $=new N(C);return J($,M),$}var x=Math.random().toString(36).substring(2);function C(){}var A=void 0,D=1,I=2;function F(){return new TypeError("You cannot resolve a promise with itself")}function H(){return new TypeError("A promises callback cannot return that same promise.")}function te(M,N,$,V){try{M.call(N,$,V)}catch(Y){return Y}}function j(M,N,$){p(function(V){var Y=!1,me=te($,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===o?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),Ee(M)}function Q(M,N){if(M._state!==A)return;M._result=N,M._state=D,M._subscribers.length!==0&&p(Ee,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(Ee,M)}function Ee(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(De){rt=!1,Re=De}if(N===me){ie(N,H());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 Le(M,N){try{N(function(V){J(M,V)},function(V){ie(M,V)})}catch($){ie(M,$)}}var pe=0;function Ce(){return pe++}function Be(M){M[x]=pe++,M._state=void 0,M._result=void 0,M._subscribers=[]}function Pe(){return new Error("Array Methods must be provided an Array")}var ke=function(){function M(N,$){this._instanceConstructor=N,this.promise=new N(C),this.promise[x]||Be(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,Pe())}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===o){var Re=void 0,rt=void 0,De=!1;try{Re=$.then}catch(Xe){De=!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 Me=new Y(C);De?ie(Me,rt):X(Me,$,Re),this._willSettleAt(Me,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 Ne(M){return new ke(this,M).promise}function he(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(C);return ie($,M),$}function Ie(){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]=Ce(),this._result=this._state=void 0,this._subscribers=[],C!==N&&(typeof N!="function"&&Ie(),this instanceof M?Le(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=Ne,Ye.race=he,Ye.resolve=o,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),O=z("ZW9T"),T=z("ZD9Y"),l=z("M8RZ"),p=z("bCnd"),h=z("fcyK"),d=z.n(h),a={theme:Object(p.a)("cmCodeMode","vs-dark"),fontSize:Object(p.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(p.a)("cmTabToSpace",!0)},u;(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"})(u||(u={}));function s(i,n){switch(n.type){case u.set_show_editor_setting:return Object(w.a)(Object(w.a)({},i),{},{showEditorSetting:n.payload});case u.set_theme:return Object(w.a)(Object(w.a)({},i),{},{theme:n.payload});case u.set_font_size:return Object(w.a)(Object(w.a)({},i),{},{fontSize:n.payload});case u.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,c=i.language,y=i.ActionBarRender,v=y===void 0?function(H){return S.a.createElement(f,{onShowCodeSetting:H})}:y,_=Object(P.useReducer)(s,a),b=Object(U.a)(_,2),m=b[0],g=b[1],E=m.theme,o=m.fontSize,x=m.showEditorSetting,C=m.tabToSpace,A={onFontSizeChange:function(te){g({type:u.set_font_size,payload:te}),Object(p.b)("cmFontSize",te)},tabToSpace:C,cmFontSize:o,className:"oj",cmCodeMode:E,onTabToSpace:function(te){g({type:u.on_tab_to_space,payload:te}),Object(p.b)("cmTabToSpace",te)},onCodeModeChange:function(te){g({type:u.set_theme,payload:te}),Object(p.b)("cmCodeMode",te)}};function D(){g({type:u.set_show_editor_setting,payload:!1})}function I(){g({type:u.set_show_editor_setting,payload:!0})}var F={value:n,language:c,onChange:t,theme:E,height:"calc(100% - 56px)",options:{fontSize:o,insertSpaces:C}};return S.a.createElement(P.Fragment,null,S.a.createElement("div",{className:"code-panel-container"},v(I),S.a.createElement(O.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]=O(i))}}S(Z.pairs+"`");function O(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 c=a(s,n[t].head);if(!c||i.indexOf(c)%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 c=a(s,n[t].head);if(!c||i.indexOf(c)%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 v=0;v<n.length;v++){var _=n[v].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 c=w(i,"closeBefore"),y=w(i,"triples"),v=n.charAt(t+1)==f,_=s.listSelections(),b=t%2==0,m,g=0;g<_.length;g++){var E=_[g],o=E.head,x,C=s.getRange(o,U(o.line,o.ch+1));if(b&&!E.empty())x="surround";else if((v||!b)&&C==f)v&&u(s,o)?x="both":y.indexOf(f)>=0&&s.getRange(o,U(o.line,o.ch+3))==f+f+f?x="skipThree":x="skip";else if(v&&o.ch>1&&y.indexOf(f)>=0&&s.getRange(U(o.line,o.ch-2),o)==f+f){if(o.ch>2&&/\bstring/.test(s.getTokenTypeAt(U(o.line,o.ch-2))))return ae.Pass;x="addFour"}else if(v){var A=o.ch==0?" ":s.getRange(U(o.line,o.ch-1),o);if(!ae.isWordChar(C)&&A!=f&&!ae.isWordChar(A))x="both";else return ae.Pass}else if(b&&(C.length===0||/\s/.test(C)||c.indexOf(C)>-1))x="both";else return ae.Pass;if(!m)m=x;else if(m!=x)return ae.Pass}var D=t%2?n.charAt(t-1):f,I=t%2?f:n.charAt(t+1);s.operation(function(){if(m=="skip")s.execCommand("goCharRight");else if(m=="skipThree")for(var F=0;F<3;F++)s.execCommand("goCharRight");else if(m=="surround"){for(var H=s.getSelections(),F=0;F<H.length;F++)H[F]=D+H[F]+I;s.replaceSelections(H,"around"),H=s.listSelections().slice();for(var F=0;F<H.length;F++)H[F]=h(H[F]);s.setSelections(H)}else m=="both"?(s.replaceSelection(D+I,null),s.triggerElectric(D+I),s.execCommand("goCharLeft")):m=="addFour"&&(s.replaceSelection(D+D+D+D,"before"),s.execCommand("goCharRight"))})}function a(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 u(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 Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,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),ne=1;ne<arguments.length;ne++){var se=arguments[ne];if(se!=null)for(var xe in se)se.hasOwnProperty(xe)&&(q[xe]=se[xe])}return q},typeof self.Promise!="function"&&z("E2g8").polyfill()}}]),Se}();U.install();var w=U,P=z("+qE3"),S=z.n(P),O=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"e",value:function(W,q){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var ne="[".concat(W,"] > ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","error",ne),!Se.ENABLE_ERROR)return;console.error?console.error(ne):console.warn?console.warn(ne):console.log(ne)}},{key:"i",value:function(W,q){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var ne="[".concat(W,"] > ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","info",ne),!Se.ENABLE_INFO)return;console.info?console.info(ne):console.log(ne)}},{key:"w",value:function(W,q){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var ne="[".concat(W,"] > ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","warn",ne),!Se.ENABLE_WARN)return;console.warn?console.warn(ne):console.log(ne)}},{key:"d",value:function(W,q){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var ne="[".concat(W,"] > ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","debug",ne),!Se.ENABLE_DEBUG)return;console.debug?console.debug(ne):console.log(ne)}},{key:"v",value:function(W,q){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var ne="[".concat(W,"] > ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","verbose",ne),!Se.ENABLE_VERBOSE)return;console.log(ne)}}]),Se}();O.GLOBAL_TAG="flv.js",O.FORCE_GLOBAL_TAG=!1,O.ENABLE_ERROR=!0,O.ENABLE_INFO=!0,O.ENABLE_WARN=!0,O.ENABLE_DEBUG=!0,O.ENABLE_VERBOSE=!0,O.ENABLE_CALLBACK=!1,O.emitter=new S.a;var T=O,l=function(){function Se(){Object(ae.a)(this,Se),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return Object(Z.a)(Se,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(W){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=W,this._totalBytes+=W):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=W,this._totalBytes+=W):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=W,this._totalBytes+=W,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var W=(this._now()-this._lastCheckpoint)/1e3;return W==0&&(W=1),this._intervalBytes/W/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var W=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/W/1024}}]),Se}(),p=l,h=z("yKVA"),d=z("879j"),a=function(){function Se(de){Object(ae.a)(this,Se),this._message=de}return Object(Z.a)(Se,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),Se}(),u=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),de.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"IllegalStateException"}}]),W}(a),s=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),de.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"InvalidArgumentException"}}]),W}(a),f=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),de.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"NotImplementedException"}}]),W}(a),i={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},n={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},t=function(){function Se(de){Object(ae.a)(this,Se),this._type=de||"undefined",this._status=i.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._status=i.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===i.kConnecting||this._status===i.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(W){this._onContentLengthKnown=W}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(W){this._onURLRedirect=W}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(W){this._onDataArrival=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onComplete",get:function(){return this._onComplete},set:function(W){this._onComplete=W}},{key:"open",value:function(W,q){throw new f("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new f("Unimplemented abstract function!")}}]),Se}(),c=z("oZsa");function y(Se,de){for(;!Object.prototype.hasOwnProperty.call(Se,de)&&!(Se=Object(c.a)(Se),Se===null););return Se}function v(Se,de,W){return typeof Reflect!="undefined"&&Reflect.get?v=Reflect.get:v=function(ne,se,xe){var He=y(ne,se);if(!He)return;var Je=Object.getOwnPropertyDescriptor(He,se);return Je.get?Je.get.call(xe):Je.value},v(Se,de,W||Se)}var _={};function b(){var Se=self.navigator.userAgent.toLowerCase(),de=/(edge)\/([\w.]+)/.exec(Se)||/(opr)[\/]([\w.]+)/.exec(Se)||/(chrome)[ \/]([\w.]+)/.exec(Se)||/(iemobile)[\/]([\w.]+)/.exec(Se)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Se)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Se)||/(webkit)[ \/]([\w.]+)/.exec(Se)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(Se)||/(msie) ([\w.]+)/.exec(Se)||Se.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(Se)||Se.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(Se)||[],W=/(ipad)/.exec(Se)||/(ipod)/.exec(Se)||/(windows phone)/.exec(Se)||/(iphone)/.exec(Se)||/(kindle)/.exec(Se)||/(android)/.exec(Se)||/(windows)/.exec(Se)||/(mac)/.exec(Se)||/(linux)/.exec(Se)||/(cros)/.exec(Se)||[],q={browser:de[5]||de[3]||de[1]||"",version:de[2]||de[4]||"0",majorVersion:de[4]||de[2]||"0",platform:W[0]||""},ne={};if(q.browser){ne[q.browser]=!0;var se=q.majorVersion.split(".");ne.version={major:parseInt(q.majorVersion,10),string:q.version},se.length>1&&(ne.version.minor=parseInt(se[1],10)),se.length>2&&(ne.version.build=parseInt(se[2],10))}if(q.platform&&(ne[q.platform]=!0),(ne.chrome||ne.opr||ne.safari)&&(ne.webkit=!0),ne.rv||ne.iemobile){ne.rv&&delete ne.rv;var xe="msie";q.browser=xe,ne[xe]=!0}if(ne.edge){delete ne.edge;var He="msedge";q.browser=He,ne[He]=!0}if(ne.opr){var Je="opera";q.browser=Je,ne[Je]=!0}if(ne.safari&&ne.android){var Et="android";q.browser=Et,ne[Et]=!0}ne.name=q.browser,ne.platform=q.platform;for(var St in _)_.hasOwnProperty(St)&&delete _[St];Object.assign(_,ne)}b();var m=_,g=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q,ne){var se;return Object(ae.a)(this,W),se=de.call(this,"fetch-stream-loader"),se.TAG="FetchStreamLoader",se._seekHandler=q,se._config=ne,se._needStash=!0,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}return Object(Z.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),v(Object(c.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne,se){var xe=this;this._dataSource=ne,this._range=se;var He=ne.url;this._config.reuseRedirectedURL&&ne.redirectedURL!=null&&(He=ne.redirectedURL);var Je=this._seekHandler.getConfig(He,se),Et=new self.Headers;if(typeof Je.headers=="object"){var St=Je.headers;for(var nt in St)St.hasOwnProperty(nt)&&Et.append(nt,St[nt])}var xt={method:"GET",headers:Et,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var ut in this._config.headers)Et.append(ut,this._config.headers[ut]);ne.cors===!1&&(xt.mode="same-origin"),ne.withCredentials&&(xt.credentials="include"),ne.referrerPolicy&&(xt.referrerPolicy=ne.referrerPolicy),this._status=i.kConnecting,self.fetch(Je.url,xt).then(function(_t){if(xe._requestAbort){xe._requestAbort=!1,xe._status=i.kIdle;return}if(_t.ok&&_t.status>=200&&_t.status<=299){if(_t.url!==Je.url&&xe._onURLRedirect){var Qt=xe._seekHandler.removeURLParameters(_t.url);xe._onURLRedirect(Qt)}var Xt=_t.headers.get("Content-Length");return Xt!=null&&(xe._contentLength=parseInt(Xt),xe._contentLength!==0&&(xe._onContentLengthKnown&&xe._onContentLengthKnown(xe._contentLength))),xe._pump.call(xe,_t.body.getReader())}else if(xe._status=i.kError,xe._onError)xe._onError(n.HTTP_STATUS_CODE_INVALID,{code:_t.status,msg:_t.statusText});else throw new a("FetchStreamLoader: Http code invalid, "+_t.status+" "+_t.statusText)}).catch(function(_t){if(xe._status=i.kError,xe._onError)xe._onError(n.EXCEPTION,{code:-1,msg:_t.message});else throw _t})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(ne){var se=this;return ne.read().then(function(xe){if(xe.done)if(se._contentLength!==null&&se._receivedLength<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 a(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,ne.cancel();se._status=i.kBuffering;var Et=xe.value.buffer,St=se._range.from+se._receivedLength;se._receivedLength+=Et.byteLength,se._onDataArrival&&se._onDataArrival(Et,St,se._receivedLength),se._pump(ne)}}).catch(function(xe){if(xe.code===11&&m.msedge)return;se._status=i.kError;var He=0,Je=null;if((xe.code===19||xe.message==="network error")&&(se._contentLength===null||se._contentLength!==null&&se._receivedLength<se._contentLength)?(He=n.EARLY_EOF,Je={code:xe.code,msg:"Fetch stream meet Early-EOF"}):(He=n.EXCEPTION,Je={code:xe.code,msg:xe.message}),se._onError)se._onError(He,Je);else throw new a(Je.msg)})}}],[{key:"isSupported",value:function(){try{var ne=m.msedge&&m.version.minor>=15048,se=m.msedge?ne:!0;return self.fetch&&self.ReadableStream&&se}catch(xe){return!1}}}]),W}(t),E=g,o=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q,ne){var se;return Object(ae.a)(this,W),se=de.call(this,"xhr-moz-chunked-loader"),se.TAG="MozChunkedLoader",se._seekHandler=q,se._config=ne,se._needStash=!0,se._xhr=null,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}return Object(Z.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),v(Object(c.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne,se){this._dataSource=ne,this._range=se;var xe=ne.url;this._config.reuseRedirectedURL&&ne.redirectedURL!=null&&(xe=ne.redirectedURL);var He=this._seekHandler.getConfig(xe,se);this._requestURL=He.url;var Je=this._xhr=new XMLHttpRequest;if(Je.open("GET",He.url,!0),Je.responseType="moz-chunked-arraybuffer",Je.onreadystatechange=this._onReadyStateChange.bind(this),Je.onprogress=this._onProgress.bind(this),Je.onloadend=this._onLoadEnd.bind(this),Je.onerror=this._onXhrError.bind(this),ne.withCredentials&&(Je.withCredentials=!0),typeof He.headers=="object"){var Et=He.headers;for(var St in Et)Et.hasOwnProperty(St)&&Je.setRequestHeader(St,Et[St])}if(typeof this._config.headers=="object"){var nt=this._config.headers;for(var xt in nt)nt.hasOwnProperty(xt)&&Je.setRequestHeader(xt,nt[xt])}this._status=i.kConnecting,Je.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=i.kComplete}},{key:"_onReadyStateChange",value:function(ne){var se=ne.target;if(se.readyState===2){if(se.responseURL!=null&&se.responseURL!==this._requestURL&&this._onURLRedirect){var xe=this._seekHandler.removeURLParameters(se.responseURL);this._onURLRedirect(xe)}if(se.status!==0&&(se.status<200||se.status>299))if(this._status=i.kError,this._onError)this._onError(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new a("MozChunkedLoader: Http code invalid, "+se.status+" "+se.statusText);else this._status=i.kBuffering}}},{key:"_onProgress",value:function(ne){if(this._status===i.kError)return;this._contentLength===null&&(ne.total!==null&&ne.total!==0&&(this._contentLength=ne.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)));var se=ne.target.response,xe=this._range.from+this._receivedLength;this._receivedLength+=se.byteLength,this._onDataArrival&&this._onDataArrival(se,xe,this._receivedLength)}},{key:"_onLoadEnd",value:function(ne){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===i.kError)return;this._status=i.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}},{key:"_onXhrError",value:function(ne){this._status=i.kError;var se=0,xe=null;if(this._contentLength&&ne.loaded<this._contentLength?(se=n.EARLY_EOF,xe={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(se=n.EXCEPTION,xe={code:-1,msg:ne.constructor.name+" "+ne.type}),this._onError)this._onError(se,xe);else throw new a(xe.msg)}}],[{key:"isSupported",value:function(){try{var ne=new XMLHttpRequest;return ne.open("GET","https://example.com",!0),ne.responseType="moz-chunked-arraybuffer",ne.responseType==="moz-chunked-arraybuffer"}catch(se){return T.w("MozChunkedLoader",se.message),!1}}}]),W}(t),x=o,C=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q,ne){var se;return Object(ae.a)(this,W),se=de.call(this,"xhr-msstream-loader"),se.TAG="MSStreamLoader",se._seekHandler=q,se._config=ne,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),v(Object(c.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne,se){this._internalOpen(ne,se,!1)}},{key:"_internalOpen",value:function(ne,se,xe){this._dataSource=ne,xe?this._currentRange=se:this._totalRange=se;var He=ne.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?He=this._currentRedirectedURL:ne.redirectedURL!=null&&(He=ne.redirectedURL));var Je=this._seekHandler.getConfig(He,se);this._currentRequestURL=Je.url;var Et=this._reader=new self.MSStreamReader;Et.onprogress=this._msrOnProgress.bind(this),Et.onload=this._msrOnLoad.bind(this),Et.onerror=this._msrOnError.bind(this);var St=this._xhr=new XMLHttpRequest;if(St.open("GET",Je.url,!0),St.responseType="ms-stream",St.onreadystatechange=this._xhrOnReadyStateChange.bind(this),St.onerror=this._xhrOnError.bind(this),ne.withCredentials&&(St.withCredentials=!0),typeof Je.headers=="object"){var nt=Je.headers;for(var xt in nt)nt.hasOwnProperty(xt)&&St.setRequestHeader(xt,nt[xt])}if(typeof this._config.headers=="object"){var ut=this._config.headers;for(var _t in ut)ut.hasOwnProperty(_t)&&St.setRequestHeader(_t,ut[_t])}this._isReconnecting?this._isReconnecting=!1:this._status=i.kConnecting,St.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(ne){var se=ne.target;if(se.readyState===2)if(se.status>=200&&se.status<=299){if(this._status=i.kBuffering,se.responseURL!=null){var xe=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&xe!==this._currentRedirectedURL&&(this._currentRedirectedURL=xe,this._onURLRedirect&&this._onURLRedirect(xe))}var He=se.getResponseHeader("Content-Length");if(He!=null&&this._contentLength==null){var Je=parseInt(He);Je>0&&(this._contentLength=Je,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=i.kError,this._onError)this._onError(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new a("MSStreamLoader: Http code invalid, "+se.status+" "+se.statusText);else if(se.readyState===3&&(se.status>=200&&se.status<=299)){this._status=i.kBuffering;var Et=se.response;this._reader.readAsArrayBuffer(Et)}}},{key:"_xhrOnError",value:function(ne){this._status=i.kError;var se=n.EXCEPTION,xe={code:-1,msg:ne.constructor.name+" "+ne.type};if(this._onError)this._onError(se,xe);else throw new a(xe.msg)}},{key:"_msrOnProgress",value:function(ne){var se=ne.target,xe=se.result;if(xe==null){this._doReconnectIfNeeded();return}var He=xe.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=xe.byteLength;var Je=this._totalRange.from+this._receivedLength;this._receivedLength+=He.byteLength,this._onDataArrival&&this._onDataArrival(He,Je,this._receivedLength),xe.byteLength>=this._bufferLimit&&(T.v(this.TAG,"MSStream buffer exceeded max size near ".concat(Je+He.byteLength,", reconnecting...")),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();var ne={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,ne,!0)}}},{key:"_msrOnLoad",value:function(ne){this._status=i.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}},{key:"_msrOnError",value:function(ne){this._status=i.kError;var se=0,xe=null;if(this._contentLength&&this._receivedLength<this._contentLength?(se=n.EARLY_EOF,xe={code:-1,msg:"MSStream meet Early-Eof"}):(se=n.EARLY_EOF,xe={code:-1,msg:ne.constructor.name+" "+ne.type}),this._onError)this._onError(se,xe);else throw new a(xe.msg)}}],[{key:"isSupported",value:function(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;var ne=new XMLHttpRequest;return ne.open("GET","https://example.com",!0),ne.responseType="ms-stream",ne.responseType==="ms-stream"}catch(se){return T.w("MSStreamLoader",se.message),!1}}}]),W}(t),A=C,D=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q,ne){var se;return Object(ae.a)(this,W),se=de.call(this,"xhr-range-loader"),se.TAG="RangeLoader",se._seekHandler=q,se._config=ne,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),v(Object(c.a)(W.prototype),"destroy",this).call(this)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}},{key:"open",value:function(ne,se){this._dataSource=ne,this._range=se,this._status=i.kConnecting;var xe=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(xe=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!xe?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}},{key:"_openSubRange",value:function(){var ne=this._currentChunkSizeKB*1024,se=this._range.from+this._receivedLength,xe=se+ne;this._contentLength!=null&&(xe-this._range.from>=this._contentLength&&(xe=this._range.from+this._contentLength-1)),this._currentRequestRange={from:se,to:xe},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(ne,se){this._lastTimeLoaded=0;var xe=ne.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?xe=this._currentRedirectedURL:ne.redirectedURL!=null&&(xe=ne.redirectedURL));var He=this._seekHandler.getConfig(xe,se);this._currentRequestURL=He.url;var Je=this._xhr=new XMLHttpRequest;if(Je.open("GET",He.url,!0),Je.responseType="arraybuffer",Je.onreadystatechange=this._onReadyStateChange.bind(this),Je.onprogress=this._onProgress.bind(this),Je.onload=this._onLoad.bind(this),Je.onerror=this._onXhrError.bind(this),ne.withCredentials&&(Je.withCredentials=!0),typeof He.headers=="object"){var Et=He.headers;for(var St in Et)Et.hasOwnProperty(St)&&Je.setRequestHeader(St,Et[St])}if(typeof this._config.headers=="object"){var nt=this._config.headers;for(var xt in nt)nt.hasOwnProperty(xt)&&Je.setRequestHeader(xt,nt[xt])}Je.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=i.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(ne){var se=ne.target;if(se.readyState===2){if(se.responseURL!=null){var xe=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&xe!==this._currentRedirectedURL&&(this._currentRedirectedURL=xe,this._onURLRedirect&&this._onURLRedirect(xe))}if(se.status>=200&&se.status<=299){if(this._waitForTotalLength)return;this._status=i.kBuffering}else if(this._status=i.kError,this._onError)this._onError(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new a("RangeLoader: Http code invalid, "+se.status+" "+se.statusText)}}},{key:"_onProgress",value:function(ne){if(this._status===i.kError)return;if(this._contentLength===null){var se=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,se=!0;var xe=ne.total;this._internalAbort(),xe!=null&xe!==0&&(this._totalLength=xe)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,se){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var He=ne.loaded-this._lastTimeLoaded;this._lastTimeLoaded=ne.loaded,this._speedSampler.addBytes(He)}},{key:"_normalizeSpeed",value:function(ne){var se=this._chunkSizeKBList,xe=se.length-1,He=0,Je=0,Et=xe;if(ne<se[0])return se[0];for(;Je<=Et;){if(He=Je+Math.floor((Et-Je)/2),He===xe||ne>=se[He]&&ne<se[He+1])return se[He];se[He]<ne?Je=He+1:Et=He-1}}},{key:"_onLoad",value:function(ne){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 xe=this._normalizeSpeed(se);this._currentSpeedNormalized!==xe&&(this._currentSpeedNormalized=xe,this._currentChunkSizeKB=xe)}var He=ne.target.response,Je=this._range.from+this._receivedLength;this._receivedLength+=He.byteLength;var Et=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():Et=!0,this._onDataArrival&&this._onDataArrival(He,Je,this._receivedLength),Et&&(this._status=i.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},{key:"_onXhrError",value:function(ne){this._status=i.kError;var se=0,xe=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(se=n.EARLY_EOF,xe={code:-1,msg:"RangeLoader meet Early-Eof"}):(se=n.EXCEPTION,xe={code:-1,msg:ne.constructor.name+" "+ne.type}),this._onError)this._onError(se,xe);else throw new a(xe.msg)}}],[{key:"isSupported",value:function(){try{var ne=new XMLHttpRequest;return ne.open("GET","https://example.com",!0),ne.responseType="arraybuffer",ne.responseType==="arraybuffer"}catch(se){return T.w("RangeLoader",se.message),!1}}}]),W}(t),I=D,F=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(){var q;return Object(ae.a)(this,W),q=de.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(),v(Object(c.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne){try{var se=this._ws=new self.WebSocket(ne.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 xe={code:He.code,msg:He.message};if(this._onError)this._onError(n.EXCEPTION,xe);else throw new a(xe.msg)}}},{key:"abort",value:function(){var ne=this._ws;ne&&(ne.readyState===0||ne.readyState===1)&&(this._requestAbort=!0,ne.close()),this._ws=null,this._status=i.kComplete}},{key:"_onWebSocketOpen",value:function(ne){this._status=i.kBuffering}},{key:"_onWebSocketClose",value:function(ne){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=i.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}},{key:"_onWebSocketMessage",value:function(ne){var se=this;if(ne.data instanceof ArrayBuffer)this._dispatchArrayBuffer(ne.data);else if(ne.data instanceof Blob){var xe=new FileReader;xe.onload=function(){se._dispatchArrayBuffer(xe.result)},xe.readAsArrayBuffer(ne.data)}else{this._status=i.kError;var He={code:-1,msg:"Unsupported WebSocket message type: "+ne.data.constructor.name};if(this._onError)this._onError(n.EXCEPTION,He);else throw new a(He.msg)}}},{key:"_dispatchArrayBuffer",value:function(ne){var se=ne,xe=this._receivedLength;this._receivedLength+=se.byteLength,this._onDataArrival&&this._onDataArrival(se,xe,this._receivedLength)}},{key:"_onWebSocketError",value:function(ne){this._status=i.kError;var se={code:ne.code,msg:ne.message};if(this._onError)this._onError(n.EXCEPTION,se);else throw new a(se.msg)}}],[{key:"isSupported",value:function(){try{return typeof self.WebSocket!="undefined"}catch(ne){return!1}}}]),W}(t),H=F,te=function(){function Se(de){Object(ae.a)(this,Se),this._zeroStart=de||!1}return Object(Z.a)(Se,[{key:"getConfig",value:function(W,q){var ne={};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(),"-"),ne.Range=se}else this._zeroStart&&(ne.Range="bytes=0-");return{url:W,headers:ne}}},{key:"removeURLParameters",value:function(W){return W}}]),Se}(),j=te,G=function(){function Se(de,W){Object(ae.a)(this,Se),this._startName=de,this._endName=W}return Object(Z.a)(Se,[{key:"getConfig",value:function(W,q){var ne=W;if(q.from!==0||q.to!==-1){var se=!0;ne.indexOf("?")===-1&&(ne+="?",se=!1),se&&(ne+="&"),ne+="".concat(this._startName,"=").concat(q.from.toString()),q.to!==-1&&(ne+="&".concat(this._endName,"=").concat(q.to.toString()))}return{url:ne,headers:{}}}},{key:"removeURLParameters",value:function(W){var q=W.split("?")[0],ne=void 0,se=W.indexOf("?");se!==-1&&(ne=W.substring(se+1));var xe="";if(ne!=null&&ne.length>0)for(var He=ne.split("&"),Je=0;Je<He.length;Je++){var Et=He[Je].split("="),St=Je>0;Et[0]!==this._startName&&Et[0]!==this._endName&&(St&&(xe+="&"),xe+=He[Je])}return xe.length===0?q:q+"?"+xe}}]),Se}(),X=G,J=function(){function Se(de,W,q){Object(ae.a)(this,Se),this.TAG="IOController",this._config=W,this._extraData=q,this._stashInitialSize=1024*384,W.stashInitialSize!=null&&W.stashInitialSize>0&&(this._stashInitialSize=W.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,W.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=de,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(de.url),this._refTotalLength=de.filesize?de.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new p,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(W){this._extraData=W}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(W){this._onDataArrival=W}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(W){this._onSeeked=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onComplete",get:function(){return this._onComplete},set:function(W){this._onComplete=W}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(W){this._onRedirect=W}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(W){this._onRecoveredEarlyEof=W}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===I?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var W=this._config;if(W.seekType==="range")this._seekHandler=new j(this._config.rangeLoadZeroStart);else if(W.seekType==="param"){var q=W.seekParamStart||"bstart",ne=W.seekParamEnd||"bend";this._seekHandler=new X(q,ne)}else if(W.seekType==="custom"){if(typeof W.customSeekHandler!="function")throw new s("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new W.customSeekHandler}else throw new s("Invalid seekType in config: ".concat(W.seekType))}},{key:"_selectLoader",value:function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=H;else if(E.isSupported())this._loaderClass=E;else if(x.isSupported())this._loaderClass=x;else if(I.isSupported())this._loaderClass=I;else throw new a("Your browser doesn't support xhr with arraybuffer responseType!")}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(W){this._currentRange={from:0,to:-1},W&&(this._currentRange.from=W),this._speedSampler.reset(),W||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var W=this._resumeFrom;this._resumeFrom=0,this._internalSeek(W,!0)}}},{key:"seek",value:function(W){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(W,!0)}},{key:"_internalSeek",value:function(W,q){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(q),this._loader.destroy(),this._loader=null;var ne={from:W,to:-1};this._currentRange={from:ne.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,ne),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(W){if(!W||typeof W!="string"||W.length===0)throw new s("Url must be a non-empty string!");this._dataSource.url=W}},{key:"_expandBuffer",value:function(W){for(var q=this._stashSize;q+1024*1024*1<W;)q*=2;if(q+=1024*1024*1,q===this._bufferSize)return;var ne=new ArrayBuffer(q);if(this._stashUsed>0){var se=new Uint8Array(this._stashBuffer,0,this._stashUsed),xe=new Uint8Array(ne,0,q);xe.set(se,0)}this._stashBuffer=ne,this._bufferSize=q}},{key:"_normalizeSpeed",value:function(W){var q=this._speedNormalizeList,ne=q.length-1,se=0,xe=0,He=ne;if(W<q[0])return q[0];for(;xe<=He;){if(se=xe+Math.floor((He-xe)/2),se===ne||W>=q[se]&&W<q[se+1])return q[se];q[se]<W?xe=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 ne=q*1024+1024*1024*1;this._bufferSize<ne&&this._expandBuffer(ne),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,ne){if(!this._onDataArrival)throw new u("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 xe=this._normalizeSpeed(se);this._speedNormalized!==xe&&(this._speedNormalized=xe,this._adjustStashSize(xe))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=q),this._stashUsed+W.byteLength<=this._stashSize){var ut=new Uint8Array(this._stashBuffer,0,this._stashSize);ut.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength}else{var _t=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var Qt=this._stashBuffer.slice(0,this._stashUsed),Xt=this._dispatchChunks(Qt,this._stashByteStart);if(Xt<Qt.byteLength){if(Xt>0){var Mt=new Uint8Array(Qt,Xt);_t.set(Mt,0),this._stashUsed=Mt.byteLength,this._stashByteStart+=Xt}}else this._stashUsed=0,this._stashByteStart+=Xt;this._stashUsed+W.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+W.byteLength),_t=new Uint8Array(this._stashBuffer,0,this._bufferSize)),_t.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength}else{var mt=this._dispatchChunks(W,q);if(mt<W.byteLength){var Cn=W.byteLength-mt;Cn>this._bufferSize&&(this._expandBuffer(Cn),_t=new Uint8Array(this._stashBuffer,0,this._bufferSize)),_t.set(new Uint8Array(W,mt),0),this._stashUsed+=Cn,this._stashByteStart=q+mt}}}else if(this._stashUsed===0){var He=this._dispatchChunks(W,q);if(He<W.byteLength){var Je=W.byteLength-He;Je>this._bufferSize&&this._expandBuffer(Je);var Et=new Uint8Array(this._stashBuffer,0,this._bufferSize);Et.set(new Uint8Array(W,He),0),this._stashUsed+=Je,this._stashByteStart=q+He}}else{this._stashUsed+W.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+W.byteLength);var St=new Uint8Array(this._stashBuffer,0,this._bufferSize);St.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength;var nt=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(nt<this._stashUsed&&nt>0){var xt=new Uint8Array(this._stashBuffer,nt);St.set(xt,0)}this._stashUsed-=nt,this._stashByteStart+=nt}}},{key:"_flushStashBuffer",value:function(W){if(this._stashUsed>0){var q=this._stashBuffer.slice(0,this._stashUsed),ne=this._dispatchChunks(q,this._stashByteStart),se=q.byteLength-ne;if(ne<q.byteLength)if(W)T.w(this.TAG,"".concat(se," bytes unconsumed data remain when flush buffer, dropped"));else{if(ne>0){var xe=new Uint8Array(this._stashBuffer,0,this._bufferSize),He=new Uint8Array(q,ne);xe.set(He,0),this._stashUsed=He.byteLength,this._stashByteStart+=ne}return 0}return this._stashUsed=0,this._stashByteStart=0,se}return 0}},{key:"_onLoaderComplete",value:function(W,q){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(W,q){T.e(this.TAG,"Loader error, code = ".concat(q.code,", msg = ").concat(q.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,W=n.UNRECOVERABLE_EARLY_EOF);switch(W){case n.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var ne=this._currentRange.to+1;ne<this._totalLength&&(T.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(ne,!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 a("IOException: "+q.msg)}}]),Se}(),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 Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,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){Se.videoElement==null&&(Se.videoElement=window.document.createElement("video"));var q=Se.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=Se.supportMSEH264Playback(),W.networkStreamIO=Se.supportNetworkStreamIO(),W.networkLoaderName=Se.getNetworkLoaderTypeName(),W.mseLiveFlvPlayback=W.mseFlvPlayback&&W.networkStreamIO,W.nativeMP4H264Playback=Se.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),W.nativeWebmVP8Playback=Se.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),W.nativeWebmVP9Playback=Se.supportNativeMediaPlayback('video/webm; codecs="vp9"'),W}}]),Se}(),Ee=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"},Le=ye,pe=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"forceGlobalTag",get:function(){return T.FORCE_GLOBAL_TAG},set:function(W){T.FORCE_GLOBAL_TAG=W,Se._notifyChange()}},{key:"globalTag",get:function(){return T.GLOBAL_TAG},set:function(W){T.GLOBAL_TAG=W,Se._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,Se._notifyChange()}},{key:"enableDebug",get:function(){return T.ENABLE_DEBUG},set:function(W){T.ENABLE_DEBUG=W,Se._notifyChange()}},{key:"enableVerbose",get:function(){return T.ENABLE_VERBOSE},set:function(W){T.ENABLE_VERBOSE=W,Se._notifyChange()}},{key:"enableInfo",get:function(){return T.ENABLE_INFO},set:function(W){T.ENABLE_INFO=W,Se._notifyChange()}},{key:"enableWarn",get:function(){return T.ENABLE_WARN},set:function(W){T.ENABLE_WARN=W,Se._notifyChange()}},{key:"enableError",get:function(){return T.ENABLE_ERROR},set:function(W){T.ENABLE_ERROR=W,Se._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=Se.emitter;if(W.listenerCount("change")>0){var q=Se.getConfig();W.emit("change",q)}}},{key:"registerListener",value:function(W){Se.emitter.addListener("change",W)}},{key:"removeListener",value:function(W){Se.emitter.removeListener("change",W)}},{key:"addLogListener",value:function(W){T.emitter.addListener("log",W),T.emitter.listenerCount("log")>0&&(T.ENABLE_CALLBACK=!0,Se._notifyChange())}},{key:"removeLogListener",value:function(W){T.emitter.removeListener("log",W),T.emitter.listenerCount("log")===0&&(T.ENABLE_CALLBACK=!1,Se._notifyChange())}}]),Se}();pe.emitter=new S.a;var Ce=pe,Be=function(){function Se(){Object(ae.a)(this,Se),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return Object(Z.a)(Se,[{key:"isComplete",value:function(){var W=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,q=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&W&&q}},{key:"isSeekable",value:function(){return this.hasKeyframesIndex===!0}},{key:"getNearestKeyframe",value:function(W){if(this.keyframesIndex==null)return null;var q=this.keyframesIndex,ne=this._search(q.times,W);return{index:ne,milliseconds:q.times[ne],fileposition:q.filepositions[ne]}}},{key:"_search",value:function(W,q){var ne=0,se=W.length-1,xe=0,He=0,Je=se;for(q<W[0]&&(ne=0,He=Je+1);He<=Je;)if(xe=He+Math.floor((Je-He)/2),xe===se||q>=W[xe]&&q<W[xe+1]){ne=xe;break}else W[xe]<q?He=xe+1:Je=xe-1;return ne}}]),Se}(),Pe=Be;function ke(Se,de,W){var q=Se;if(de+W<q.length){for(;W--;)if((q[++de]&192)!==128)return!1;return!0}else return!1}function Ne(Se){for(var de=[],W=Se,q=0,ne=Se.length;q<ne;){if(W[q]<128){de.push(String.fromCharCode(W[q])),++q;continue}else if(!(W[q]<192)){if(W[q]<224){if(ke(W,q,1)){var se=(W[q]&31)<<6|W[q+1]&63;if(se>=128){de.push(String.fromCharCode(se&65535)),q+=2;continue}}}else if(W[q]<240){if(ke(W,q,2)){var xe=(W[q]&15)<<12|(W[q+1]&63)<<6|W[q+2]&63;if(xe>=2048&&(xe&63488)!==55296){de.push(String.fromCharCode(xe&65535)),q+=3;continue}}}else if(W[q]<248&&ke(W,q,3)){var He=(W[q]&7)<<18|(W[q+1]&63)<<12|(W[q+2]&63)<<6|W[q+3]&63;if(He>65536&&He<1114112){He-=65536,de.push(String.fromCharCode(He>>>10|55296)),de.push(String.fromCharCode(He&1023|56320)),q+=4;continue}}}de.push(String.fromCharCode(65533)),++q}return de.join("")}var he=Ne,ue=function(){var Se=new ArrayBuffer(2);return new DataView(Se).setInt16(0,256,!0),new Int16Array(Se)[0]===256}(),Ie=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"parseScriptData",value:function(W,q,ne){var se={};try{var xe=Se.parseValue(W,q,ne),He=Se.parseValue(W,q+xe.size,ne-xe.size);se[xe.data]=He.data}catch(Je){T.e("AMF",Je.toString())}return se}},{key:"parseObject",value:function(W,q,ne){if(ne<3)throw new u("Data not enough when parse ScriptDataObject");var se=Se.parseString(W,q,ne),xe=Se.parseValue(W,q+se.size,ne-se.size),He=xe.objectEnd;return{data:{name:se.data,value:xe.data},size:se.size+xe.size,objectEnd:He}}},{key:"parseVariable",value:function(W,q,ne){return Se.parseObject(W,q,ne)}},{key:"parseString",value:function(W,q,ne){if(ne<2)throw new u("Data not enough when parse String");var se=new DataView(W,q,ne),xe=se.getUint16(0,!ue),He;return xe>0?He=he(new Uint8Array(W,q+2,xe)):He="",{data:He,size:2+xe}}},{key:"parseLongString",value:function(W,q,ne){if(ne<4)throw new u("Data not enough when parse LongString");var se=new DataView(W,q,ne),xe=se.getUint32(0,!ue),He;return xe>0?He=he(new Uint8Array(W,q+4,xe)):He="",{data:He,size:4+xe}}},{key:"parseDate",value:function(W,q,ne){if(ne<10)throw new u("Data size invalid when parse Date");var se=new DataView(W,q,ne),xe=se.getFloat64(0,!ue),He=se.getInt16(8,!ue);return xe+=He*60*1e3,{data:new Date(xe),size:8+2}}},{key:"parseValue",value:function(W,q,ne){if(ne<1)throw new u("Data not enough when parse Value");var se=new DataView(W,q,ne),xe=1,He=se.getUint8(0),Je,Et=!1;try{switch(He){case 0:Je=se.getFloat64(1,!ue),xe+=8;break;case 1:{var St=se.getUint8(1);Je=!!St,xe+=1;break}case 2:{var nt=Se.parseString(W,q+1,ne-1);Je=nt.data,xe+=nt.size;break}case 3:{Je={};var xt=0;for((se.getUint32(ne-4,!ue)&16777215)===9&&(xt=3);xe<ne-4;){var ut=Se.parseObject(W,q+xe,ne-xe-xt);if(ut.objectEnd)break;Je[ut.data.name]=ut.data.value,xe+=ut.size}if(xe<=ne-3){var _t=se.getUint32(xe-1,!ue)&16777215;_t===9&&(xe+=3)}break}case 8:{Je={},xe+=4;var Qt=0;for((se.getUint32(ne-4,!ue)&16777215)===9&&(Qt=3);xe<ne-8;){var Xt=Se.parseVariable(W,q+xe,ne-xe-Qt);if(Xt.objectEnd)break;Je[Xt.data.name]=Xt.data.value,xe+=Xt.size}if(xe<=ne-3){var Mt=se.getUint32(xe-1,!ue)&16777215;Mt===9&&(xe+=3)}break}case 9:Je=void 0,xe=1,Et=!0;break;case 10:{Je=[];var mt=se.getUint32(1,!ue);xe+=4;for(var Cn=0;Cn<mt;Cn++){var En=Se.parseValue(W,q+xe,ne-xe);Je.push(En.data),xe+=En.size}break}case 11:{var Jt=Se.parseDate(W,q+1,ne-1);Je=Jt.data,xe+=Jt.size;break}case 12:{var un=Se.parseString(W,q+1,ne-1);Je=un.data,xe+=un.size;break}default:xe=ne,T.w("AMF","Unsupported AMF value type "+He)}}catch(Jn){T.e("AMF",Jn.toString())}return{data:Je,size:xe,objectEnd:Et}}}]),Se}(),Ue=Ie,Ye=function(){function Se(de){Object(ae.a)(this,Se),this.TAG="ExpGolomb",this._buffer=de,this._buffer_index=0,this._total_bytes=de.byteLength,this._total_bits=de.byteLength*8,this._current_word=0,this._current_word_bits_left=0}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var W=this._total_bytes-this._buffer_index;if(W<=0)throw new u("ExpGolomb: _fillCurrentWord() but no bytes available");var q=Math.min(4,W),ne=new Uint8Array(4);ne.set(this._buffer.subarray(this._buffer_index,this._buffer_index+q)),this._current_word=new DataView(ne.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 ne=this._current_word_bits_left?this._current_word:0;ne=ne>>>32-this._current_word_bits_left;var se=W-this._current_word_bits_left;this._fillCurrentWord();var xe=Math.min(se,this._current_word_bits_left),He=this._current_word>>>32-xe;return this._current_word<<=xe,this._current_word_bits_left-=xe,ne=ne<<xe|He,ne}},{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)}}]),Se}(),ee=Ye,M=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"_ebsp2rbsp",value:function(W){for(var q=W,ne=q.byteLength,se=new Uint8Array(ne),xe=0,He=0;He<ne;He++){if(He>=2&&(q[He]===3&&q[He-1]===0&&q[He-2]===0))continue;se[xe]=q[He],xe++}return new Uint8Array(se.buffer,0,xe)}},{key:"parseSPS",value:function(W){var q=Se._ebsp2rbsp(W),ne=new ee(q);ne.readByte();var se=ne.readByte();ne.readByte();var xe=ne.readByte();ne.readUEG();var He=Se.getProfileString(se),Je=Se.getLevelString(xe),Et=1,St=420,nt=[0,420,422,444],xt=8;if((se===100||se===110||se===122||se===244||se===44||se===83||se===86||se===118||se===128||se===138||se===144)&&(Et=ne.readUEG(),Et===3&&ne.readBits(1),Et<=3&&(St=nt[Et]),xt=ne.readUEG()+8,ne.readUEG(),ne.readBits(1),ne.readBool()))for(var ut=Et!==3?8:12,_t=0;_t<ut;_t++)ne.readBool()&&(_t<6?Se._skipScalingList(ne,16):Se._skipScalingList(ne,64));ne.readUEG();var Qt=ne.readUEG();if(Qt===0)ne.readUEG();else if(Qt===1){ne.readBits(1),ne.readSEG(),ne.readSEG();for(var Xt=ne.readUEG(),Mt=0;Mt<Xt;Mt++)ne.readSEG()}var mt=ne.readUEG();ne.readBits(1);var Cn=ne.readUEG(),En=ne.readUEG(),Jt=ne.readBits(1);Jt===0&&ne.readBits(1),ne.readBits(1);var un=0,Jn=0,ar=0,mn=0,gr=ne.readBool();gr&&(un=ne.readUEG(),Jn=ne.readUEG(),ar=ne.readUEG(),mn=ne.readUEG());var Rr=1,vn=1,An=0,_r=!0,Zr=0,jr=0,tr=ne.readBool();if(tr){if(ne.readBool()){var ur=ne.readByte(),yi=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],xr=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];ur>0&&ur<16?(Rr=yi[ur-1],vn=xr[ur-1]):ur===255&&(Rr=ne.readByte()<<8|ne.readByte(),vn=ne.readByte()<<8|ne.readByte())}if(ne.readBool()&&ne.readBool(),ne.readBool()&&(ne.readBits(4),ne.readBool()&&ne.readBits(24)),ne.readBool()&&(ne.readUEG(),ne.readUEG()),ne.readBool()){var Cr=ne.readBits(32),Sr=ne.readBits(32);_r=ne.readBool(),Zr=Sr,jr=Cr*2,An=Zr/jr}}var Vr=1;(Rr!==1||vn!==1)&&(Vr=Rr/vn);var Mr=0,Si=0;if(Et===0)Mr=1,Si=2-Jt;else{var Or=Et===3?1:2,ei=Et===1?2:1;Mr=Or,Si=ei*(2-Jt)}var ri=(Cn+1)*16,Xr=(2-Jt)*((En+1)*16);ri-=(un+Jn)*Mr,Xr-=(ar+mn)*Si;var ui=Math.ceil(ri*Vr);return ne.destroy(),ne=null,{profile_string:He,level_string:Je,bit_depth:xt,ref_frames:mt,chroma_format:St,chroma_format_string:Se.getChromaFormatString(St),frame_rate:{fixed:_r,fps:An,fps_den:jr,fps_num:Zr},sar_ratio:{width:Rr,height:vn},codec_size:{width:ri,height:Xr},present_size:{width:ui,height:Xr}}}},{key:"_skipScalingList",value:function(W,q){for(var ne=8,se=8,xe=0,He=0;He<q;He++)se!==0&&(xe=W.readSEG(),se=(ne+xe+256)%256),ne=se===0?ne: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"}}}]),Se}(),N=M,$={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"},V=$;function Y(Se){return Se>>>8&255|(Se&255)<<8}function me(Se){return(Se&4278190080)>>>24|(Se&16711680)>>>8|(Se&65280)<<8|(Se&255)<<24}function Re(Se,de){return Se[de]<<24|Se[de+1]<<16|Se[de+2]<<8|Se[de+3]}var rt=function(){function Se(de,W){Object(ae.a)(this,Se),this.TAG="FLVDemuxer",this._config=W,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=de.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=de.hasAudioTrack,this._hasVideo=de.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Pe,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var q=new ArrayBuffer(2);return new DataView(q).setInt16(0,256,!0),new Int16Array(q)[0]===256}()}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(W){return W.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(W){this._onTrackMetadata=W}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(W){this._onMediaInfo=W}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(W){this._onMetaDataArrived=W}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(W){this._onScriptDataArrived=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(W){this._onDataAvailable=W}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(W){this._timestampBase=W}},{key:"overridedDuration",get:function(){return this._duration},set:function(W){this._durationOverrided=!0,this._duration=W,this._mediaInfo.duration=W}},{key:"overridedHasAudio",set:function(W){this._hasAudioFlagOverrided=!0,this._hasAudio=W,this._mediaInfo.hasAudio=W}},{key:"overridedHasVideo",set:function(W){this._hasVideoFlagOverrided=!0,this._hasVideo=W,this._mediaInfo.hasVideo=W}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new Pe}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}},{key:"parseChunks",value:function(W,q){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new u("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var ne=0,se=this._littleEndian;if(q===0)if(W.byteLength>13){var xe=Se.probe(W);ne=xe.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,q+ne!==this._dataOffset&&T.w(this.TAG,"First time parsing but chunk byteStart invalid!");var He=new DataView(W,ne),Je=He.getUint32(0,!se);Je!==0&&T.w(this.TAG,"PrevTagSize0 !== 0 !!!"),ne+=4}for(;ne<W.byteLength;){this._dispatch=!0;var Et=new DataView(W,ne);if(ne+11+4>W.byteLength)break;var St=Et.getUint8(0),nt=Et.getUint32(0,!se)&16777215;if(ne+11+nt+4>W.byteLength)break;if(St!==8&&St!==9&&St!==18){T.w(this.TAG,"Unsupported tag type ".concat(St,", skipped")),ne+=11+nt+4;continue}var xt=Et.getUint8(4),ut=Et.getUint8(5),_t=Et.getUint8(6),Qt=Et.getUint8(7),Xt=_t|ut<<8|xt<<16|Qt<<24,Mt=Et.getUint32(7,!se)&16777215;Mt!==0&&T.w(this.TAG,"Meet tag which has StreamID != 0!");var mt=ne+11;switch(St){case 8:this._parseAudioData(W,mt,nt,Xt);break;case 9:this._parseVideoData(W,mt,nt,Xt,q+ne);break;case 18:this._parseScriptData(W,mt,nt);break}var Cn=Et.getUint32(11+nt,!se);Cn!==11+nt&&T.w(this.TAG,"Invalid PrevTagSize ".concat(Cn)),ne+=11+nt+4}return this._isInitialMetadataDispatched()&&(this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)),ne}},{key:"_parseScriptData",value:function(W,q,ne){var se=Ue.parseScriptData(W,q,ne);if(se.hasOwnProperty("onMetaData")){if(se.onMetaData==null||typeof se.onMetaData!="object"){T.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&T.w(this.TAG,"Found another onMetaData tag!"),this._metadata=se;var xe=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},xe)),typeof xe.hasAudio=="boolean"&&(this._hasAudioFlagOverrided===!1&&(this._hasAudio=xe.hasAudio,this._mediaInfo.hasAudio=this._hasAudio)),typeof xe.hasVideo=="boolean"&&(this._hasVideoFlagOverrided===!1&&(this._hasVideo=xe.hasVideo,this._mediaInfo.hasVideo=this._hasVideo)),typeof xe.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=xe.audiodatarate),typeof xe.videodatarate=="number"&&(this._mediaInfo.videoDataRate=xe.videodatarate),typeof xe.width=="number"&&(this._mediaInfo.width=xe.width),typeof xe.height=="number"&&(this._mediaInfo.height=xe.height),typeof xe.duration=="number"){if(!this._durationOverrided){var He=Math.floor(xe.duration*this._timescale);this._duration=He,this._mediaInfo.duration=He}}else this._mediaInfo.duration=0;if(typeof xe.framerate=="number"){var Je=Math.floor(xe.framerate*1e3);if(Je>0){var Et=Je/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=Et,this._referenceFrameRate.fps_num=Je,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=Et}}if(typeof xe.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var St=xe.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(St),xe.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=xe,T.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(se).length>0&&(this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},se)))}},{key:"_parseKeyframesIndex",value:function(W){for(var q=[],ne=[],se=1;se<W.times.length;se++){var xe=this._timestampBase+Math.floor(W.times[se]*1e3);q.push(xe),ne.push(W.filepositions[se])}return{times:q,filepositions:ne}}},{key:"_parseAudioData",value:function(W,q,ne,se){if(ne<=1){T.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;var xe=this._littleEndian,He=new DataView(W,q,ne),Je=He.getUint8(0),Et=Je>>>4;if(Et!==2&&Et!==10){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+Et);return}var St=0,nt=(Je&12)>>>2;if(nt>=0&&nt<=4)St=this._flvSoundRateTable[nt];else{this._onError(V.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+nt);return}var xt=(Je&2)>>>1,ut=Je&1,_t=this._audioMetadata,Qt=this._audioTrack;if(_t||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),_t=this._audioMetadata={},_t.type="audio",_t.id=Qt.id,_t.timescale=this._timescale,_t.duration=this._duration,_t.audioSampleRate=St,_t.channelCount=ut===0?1:2),Et===10){var Xt=this._parseAACAudioData(W,q+1,ne-1);if(Xt==null)return;if(Xt.packetType===0){_t.config&&T.w(this.TAG,"Found another AudioSpecificConfig!");var Mt=Xt.data;_t.audioSampleRate=Mt.samplingRate,_t.channelCount=Mt.channelCount,_t.codec=Mt.codec,_t.originalCodec=Mt.originalCodec,_t.config=Mt.config,_t.refSampleDuration=1024/_t.audioSampleRate*_t.timescale,T.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",_t);var mt=this._mediaInfo;mt.audioCodec=_t.originalCodec,mt.audioSampleRate=_t.audioSampleRate,mt.audioChannelCount=_t.channelCount,mt.hasVideo?mt.videoCodec!=null&&(mt.mimeType='video/x-flv; codecs="'+mt.videoCodec+","+mt.audioCodec+'"'):mt.mimeType='video/x-flv; codecs="'+mt.audioCodec+'"',mt.isComplete()&&this._onMediaInfo(mt)}else if(Xt.packetType===1){var Cn=this._timestampBase+se,En={unit:Xt.data,length:Xt.data.byteLength,dts:Cn,pts:Cn};Qt.samples.push(En),Qt.length+=Xt.data.length}else T.e(this.TAG,"Flv: Unsupported AAC data type ".concat(Xt.packetType))}else if(Et===2){if(!_t.codec){var Jt=this._parseMP3AudioData(W,q+1,ne-1,!0);if(Jt==null)return;_t.audioSampleRate=Jt.samplingRate,_t.channelCount=Jt.channelCount,_t.codec=Jt.codec,_t.originalCodec=Jt.originalCodec,_t.refSampleDuration=1152/_t.audioSampleRate*_t.timescale,T.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",_t);var un=this._mediaInfo;un.audioCodec=_t.codec,un.audioSampleRate=_t.audioSampleRate,un.audioChannelCount=_t.channelCount,un.audioDataRate=Jt.bitRate,un.hasVideo?un.videoCodec!=null&&(un.mimeType='video/x-flv; codecs="'+un.videoCodec+","+un.audioCodec+'"'):un.mimeType='video/x-flv; codecs="'+un.audioCodec+'"',un.isComplete()&&this._onMediaInfo(un)}var Jn=this._parseMP3AudioData(W,q+1,ne-1,!1);if(Jn==null)return;var ar=this._timestampBase+se,mn={unit:Jn,length:Jn.byteLength,dts:ar,pts:ar};Qt.samples.push(mn),Qt.length+=Jn.length}}},{key:"_parseAACAudioData",value:function(W,q,ne){if(ne<=1){T.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var se={},xe=new Uint8Array(W,q,ne);return se.packetType=xe[0],xe[0]===0?se.data=this._parseAACAudioSpecificConfig(W,q+1,ne-1):se.data=xe.subarray(1),se}},{key:"_parseAACAudioSpecificConfig",value:function(W,q,ne){var se=new Uint8Array(W,q,ne),xe=null,He=0,Je=0,Et=null,St=0,nt=null;if(He=Je=se[0]>>>3,St=(se[0]&7)<<1|se[1]>>>7,St<0||St>=this._mpegSamplingRates.length){this._onError(V.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var xt=this._mpegSamplingRates[St],ut=(se[1]&120)>>>3;if(ut<0||ut>=8){this._onError(V.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}He===5&&(nt=(se[1]&7)<<1|se[2]>>>7,Et=(se[2]&124)>>>2);var _t=self.navigator.userAgent.toLowerCase();return _t.indexOf("firefox")!==-1?St>=6?(He=5,xe=new Array(4),nt=St-3):(He=2,xe=new Array(2),nt=St):_t.indexOf("android")!==-1?(He=2,xe=new Array(2),nt=St):(He=5,nt=St,xe=new Array(4),St>=6?nt=St-3:ut===1&&(He=2,xe=new Array(2),nt=St)),xe[0]=He<<3,xe[0]|=(St&15)>>>1,xe[1]=(St&15)<<7,xe[1]|=(ut&15)<<3,He===5&&(xe[1]|=(nt&15)>>>1,xe[2]=(nt&1)<<7,xe[2]|=2<<2,xe[3]=0),{config:xe,samplingRate:xt,channelCount:ut,codec:"mp4a.40."+He,originalCodec:"mp4a.40."+Je}}},{key:"_parseMP3AudioData",value:function(W,q,ne,se){if(ne<4){T.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}var xe=this._littleEndian,He=new Uint8Array(W,q,ne),Je=null;if(se){if(He[0]!==255)return;var Et=He[1]>>>3&3,St=(He[1]&6)>>1,nt=(He[2]&240)>>>4,xt=(He[2]&12)>>>2,ut=He[3]>>>6&3,_t=ut!==3?2:1,Qt=0,Xt=0,Mt=34,mt="mp3";switch(Et){case 0:Qt=this._mpegAudioV25SampleRateTable[xt];break;case 2:Qt=this._mpegAudioV20SampleRateTable[xt];break;case 3:Qt=this._mpegAudioV10SampleRateTable[xt];break}switch(St){case 1:Mt=34,nt<this._mpegAudioL3BitRateTable.length&&(Xt=this._mpegAudioL3BitRateTable[nt]);break;case 2:Mt=33,nt<this._mpegAudioL2BitRateTable.length&&(Xt=this._mpegAudioL2BitRateTable[nt]);break;case 3:Mt=32,nt<this._mpegAudioL1BitRateTable.length&&(Xt=this._mpegAudioL1BitRateTable[nt]);break}Je={bitRate:Xt,samplingRate:Qt,channelCount:_t,codec:mt,originalCodec:mt}}else Je=He;return Je}},{key:"_parseVideoData",value:function(W,q,ne,se,xe){if(ne<=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,ne)[0],Je=(He&240)>>>4,Et=He&15;if(Et!==7){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(Et));return}this._parseAVCVideoPacket(W,q+1,ne-1,se,xe,Je)}},{key:"_parseAVCVideoPacket",value:function(W,q,ne,se,xe,He){if(ne<4){T.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var Je=this._littleEndian,Et=new DataView(W,q,ne),St=Et.getUint8(0),nt=Et.getUint32(0,!Je)&16777215,xt=nt<<8>>8;if(St===0)this._parseAVCDecoderConfigurationRecord(W,q+4,ne-4);else if(St===1)this._parseAVCVideoData(W,q+4,ne-4,se,xe,He,xt);else if(!(St===2)){this._onError(V.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(St));return}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(W,q,ne){if(ne<7){T.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var se=this._videoMetadata,xe=this._videoTrack,He=this._littleEndian,Je=new DataView(W,q,ne);se?typeof se.avcc!="undefined"&&T.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),se=this._videoMetadata={},se.type="video",se.id=xe.id,se.timescale=this._timescale,se.duration=this._duration);var Et=Je.getUint8(0),St=Je.getUint8(1),nt=Je.getUint8(2),xt=Je.getUint8(3);if(Et!==1||St===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Je.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(V.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));return}var ut=Je.getUint8(5)&31;if(ut===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else ut>1&&T.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(ut));for(var _t=6,Qt=0;Qt<ut;Qt++){var Xt=Je.getUint16(_t,!He);if(_t+=2,Xt===0)continue;var Mt=new Uint8Array(W,q+_t,Xt);_t+=Xt;var mt=N.parseSPS(Mt);if(Qt!==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,En=se.frameRate.fps_num;se.refSampleDuration=se.timescale*(Cn/En);for(var Jt=Mt.subarray(1,4),un="avc1.",Jn=0;Jn<3;Jn++){var ar=Jt[Jn].toString(16);ar.length<2&&(ar="0"+ar),un+=ar}se.codec=un;var mn=this._mediaInfo;mn.width=se.codecWidth,mn.height=se.codecHeight,mn.fps=se.frameRate.fps,mn.profile=se.profile,mn.level=se.level,mn.refFrames=mt.ref_frames,mn.chromaFormat=mt.chroma_format_string,mn.sarNum=se.sarRatio.width,mn.sarDen=se.sarRatio.height,mn.videoCodec=un,mn.hasAudio?mn.audioCodec!=null&&(mn.mimeType='video/x-flv; codecs="'+mn.videoCodec+","+mn.audioCodec+'"'):mn.mimeType='video/x-flv; codecs="'+mn.videoCodec+'"',mn.isComplete()&&this._onMediaInfo(mn)}var gr=Je.getUint8(_t);if(gr===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else gr>1&&T.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(gr));_t++;for(var Rr=0;Rr<gr;Rr++){var vn=Je.getUint16(_t,!He);if(_t+=2,vn===0)continue;_t+=vn}se.avcc=new Uint8Array(ne),se.avcc.set(new Uint8Array(W,q,ne),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,ne,se,xe,He,Je){for(var Et=this._littleEndian,St=new DataView(W,q,ne),nt=[],xt=0,ut=0,_t=this._naluLengthSize,Qt=this._timestampBase+se,Xt=He===1;ut<ne;){if(ut+4>=ne){T.w(this.TAG,"Malformed Nalu near timestamp ".concat(Qt,", offset = ").concat(ut,", dataSize = ").concat(ne));break}var Mt=St.getUint32(ut,!Et);if(_t===3&&(Mt>>>=8),Mt>ne-_t){T.w(this.TAG,"Malformed Nalus near timestamp ".concat(Qt,", NaluSize > DataSize!"));return}var mt=St.getUint8(ut+_t)&31;mt===5&&(Xt=!0);var Cn=new Uint8Array(W,q+ut,_t+Mt),En={type:mt,data:Cn};nt.push(En),xt+=Cn.byteLength,ut+=_t+Mt}if(nt.length){var Jt=this._videoTrack,un={units:nt,length:xt,isKeyframe:Xt,dts:Qt,cts:Je,pts:Qt+Je};Xt&&(un.fileposition=xe),Jt.samples.push(un),Jt.length+=xt}}}],[{key:"probe",value:function(W){var q=new Uint8Array(W),ne={match:!1};if(q[0]!==70||q[1]!==76||q[2]!==86||q[3]!==1)return ne;var se=(q[4]&4)>>>2!==0,xe=(q[4]&1)!==0,He=Re(q,5);return He<9?ne:{match:!0,consumed:He,dataOffset:He,hasAudioTrack:se,hasVideoTrack:xe}}}]),Se}(),De=rt,Me=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"init",value:function(){Se.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var W in Se.types)Se.types.hasOwnProperty(W)&&(Se.types[W]=[W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2),W.charCodeAt(3)]);var q=Se.constants={};q.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),q.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),q.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),q.STSC=q.STCO=q.STTS,q.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),q.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),q.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),q.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),q.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),q.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(W){for(var q=8,ne=null,se=Array.prototype.slice.call(arguments,1),xe=se.length,He=0;He<xe;He++)q+=se[He].byteLength;ne=new Uint8Array(q),ne[0]=q>>>24&255,ne[1]=q>>>16&255,ne[2]=q>>>8&255,ne[3]=q&255,ne.set(W,4);for(var Je=8,Et=0;Et<xe;Et++)ne.set(se[Et],Je),Je+=se[Et].byteLength;return ne}},{key:"generateInitSegment",value:function(W){var q=Se.box(Se.types.ftyp,Se.constants.FTYP),ne=Se.moov(W),se=new Uint8Array(q.byteLength+ne.byteLength);return se.set(q,0),se.set(ne,q.byteLength),se}},{key:"moov",value:function(W){var q=Se.mvhd(W.timescale,W.duration),ne=Se.trak(W),se=Se.mvex(W);return Se.box(Se.types.moov,q,ne,se)}},{key:"mvhd",value:function(W,q){return Se.box(Se.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 Se.box(Se.types.trak,Se.tkhd(W),Se.mdia(W))}},{key:"tkhd",value:function(W){var q=W.id,ne=W.duration,se=W.presentWidth,xe=W.presentHeight;return Se.box(Se.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255,0,0,0,0,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,se>>>8&255,se&255,0,0,xe>>>8&255,xe&255,0,0]))}},{key:"mdia",value:function(W){return Se.box(Se.types.mdia,Se.mdhd(W),Se.hdlr(W),Se.minf(W))}},{key:"mdhd",value:function(W){var q=W.timescale,ne=W.duration;return Se.box(Se.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&255,85,196,0,0]))}},{key:"hdlr",value:function(W){var q=null;return W.type==="audio"?q=Se.constants.HDLR_AUDIO:q=Se.constants.HDLR_VIDEO,Se.box(Se.types.hdlr,q)}},{key:"minf",value:function(W){var q=null;return W.type==="audio"?q=Se.box(Se.types.smhd,Se.constants.SMHD):q=Se.box(Se.types.vmhd,Se.constants.VMHD),Se.box(Se.types.minf,q,Se.dinf(),Se.stbl(W))}},{key:"dinf",value:function(){var W=Se.box(Se.types.dinf,Se.box(Se.types.dref,Se.constants.DREF));return W}},{key:"stbl",value:function(W){var q=Se.box(Se.types.stbl,Se.stsd(W),Se.box(Se.types.stts,Se.constants.STTS),Se.box(Se.types.stsc,Se.constants.STSC),Se.box(Se.types.stsz,Se.constants.STSZ),Se.box(Se.types.stco,Se.constants.STCO));return q}},{key:"stsd",value:function(W){return W.type==="audio"?W.codec==="mp3"?Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.mp3(W)):Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.mp4a(W)):Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.avc1(W))}},{key:"mp3",value:function(W){var q=W.channelCount,ne=W.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,q,0,16,0,0,0,0,ne>>>8&255,ne&255,0,0]);return Se.box(Se.types[".mp3"],se)}},{key:"mp4a",value:function(W){var q=W.channelCount,ne=W.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,q,0,16,0,0,0,0,ne>>>8&255,ne&255,0,0]);return Se.box(Se.types.mp4a,se,Se.esds(W))}},{key:"esds",value:function(W){var q=W.config||[],ne=q.length,se=new Uint8Array([0,0,0,0,3,23+ne,0,1,0,4,15+ne,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([ne]).concat(q).concat([6,1,2]));return Se.box(Se.types.esds,se)}},{key:"avc1",value:function(W){var q=W.avcc,ne=W.codecWidth,se=W.codecHeight,xe=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,ne>>>8&255,ne&255,se>>>8&255,se&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Se.box(Se.types.avc1,xe,Se.box(Se.types.avcC,q))}},{key:"mvex",value:function(W){return Se.box(Se.types.mvex,Se.trex(W))}},{key:"trex",value:function(W){var q=W.id,ne=new Uint8Array([0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Se.box(Se.types.trex,ne)}},{key:"moof",value:function(W,q){return Se.box(Se.types.moof,Se.mfhd(W.sequenceNumber),Se.traf(W,q))}},{key:"mfhd",value:function(W){var q=new Uint8Array([0,0,0,0,W>>>24&255,W>>>16&255,W>>>8&255,W&255]);return Se.box(Se.types.mfhd,q)}},{key:"traf",value:function(W,q){var ne=W.id,se=Se.box(Se.types.tfhd,new Uint8Array([0,0,0,0,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&255])),xe=Se.box(Se.types.tfdt,new Uint8Array([0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255])),He=Se.sdtp(W),Je=Se.trun(W,He.byteLength+16+16+8+16+8+8);return Se.box(Se.types.traf,se,xe,Je,He)}},{key:"sdtp",value:function(W){for(var q=W.samples||[],ne=q.length,se=new Uint8Array(4+ne),xe=0;xe<ne;xe++){var He=q[xe].flags;se[xe+4]=He.isLeading<<6|He.dependsOn<<4|He.isDependedOn<<2|He.hasRedundancy}return Se.box(Se.types.sdtp,se)}},{key:"trun",value:function(W,q){var ne=W.samples||[],se=ne.length,xe=12+16*se,He=new Uint8Array(xe);q+=8+xe,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 Et=ne[Je].duration,St=ne[Je].size,nt=ne[Je].flags,xt=ne[Je].cts;He.set([Et>>>24&255,Et>>>16&255,Et>>>8&255,Et&255,St>>>24&255,St>>>16&255,St>>>8&255,St&255,nt.isLeading<<2|nt.dependsOn,nt.isDependedOn<<6|nt.hasRedundancy<<4|nt.isNonSync,0,0,xt>>>24&255,xt>>>16&255,xt>>>8&255,xt&255],12+16*Je)}return Se.box(Se.types.trun,He)}},{key:"mdat",value:function(W){return Se.box(Se.types.mdat,W)}}]),Se}();Me.init();var Xe=Me,tt=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"getSilentFrame",value:function(W,q){if(W==="mp4a.40.2"){if(q===1)return new Uint8Array([0,200,0,128,35,128]);if(q===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(q===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(q===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(q===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(q===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(q===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(q===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(q===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),Se}(),Ve=tt,Ke=function Se(de,W,q,ne,se){Object(ae.a)(this,Se),this.dts=de,this.pts=W,this.duration=q,this.originalDts=ne,this.isSyncPoint=se,this.fileposition=null},we=function(){function Se(){Object(ae.a)(this,Se),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return Object(Z.a)(Se,[{key:"appendSyncPoint",value:function(W){W.isSyncPoint=!0,this.syncPoints.push(W)}}]),Se}(),Ae=function(){function Se(){Object(ae.a)(this,Se),this._list=[]}return Object(Z.a)(Se,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(W){var q=this._list;if(W.length===0)return;q.length>0&&W[0].originalDts<q[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,ne=0,se=q.length-1,xe=0,He=0,Je=se;for(W<q[0].dts&&(ne=0,He=Je+1);He<=Je;)if(xe=He+Math.floor((Je-He)/2),xe===se||W>=q[xe].dts&&W<q[xe+1].dts){ne=xe;break}else q[xe].dts<W?He=xe+1:Je=xe-1;return this._list[ne]}}]),Se}(),Oe=function(){function Se(de){Object(ae.a)(this,Se),this._type=de,this._list=[],this._lastAppendLocation=-1}return Object(Z.a)(Se,[{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 ne=q.length-1,se=0,xe=0,He=ne,Je=0;if(W<q[0].originalBeginDts)return Je=-1,Je;for(;xe<=He;)if(se=xe+Math.floor((He-xe)/2),se===ne||W>q[se].lastSample.originalDts&&W<q[se+1].originalBeginDts){Je=se;break}else q[se].originalBeginDts<W?xe=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,ne=W,se=this._lastAppendLocation,xe=0;se!==-1&&se<q.length&&ne.originalBeginDts>=q[se].lastSample.originalDts&&(se===q.length-1||se<q.length-1&&ne.originalBeginDts<q[se+1].originalBeginDts)?xe=se+1:q.length>0&&(xe=this._searchNearestSegmentBefore(ne.originalBeginDts)+1),this._lastAppendLocation=xe,this._list.splice(xe,0,ne)}},{key:"getLastSegmentBefore",value:function(W){var q=this._searchNearestSegmentBefore(W);return q>=0?this._list[q]:null}},{key:"getLastSampleBefore",value:function(W){var q=this.getLastSegmentBefore(W);return q!=null?q.lastSample:null}},{key:"getLastSyncPointBefore",value:function(W){for(var q=this._searchNearestSegmentBefore(W),ne=this._list[q].syncPoints;ne.length===0&&q>0;)q--,ne=this._list[q].syncPoints;return ne.length>0?ne[ne.length-1]:null}}]),Se}(),fe=function(){function Se(de){Object(ae.a)(this,Se),this.TAG="MP4Remuxer",this._config=de,this._isLive=de.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=Infinity,this._videoDtsBase=Infinity,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Oe("audio"),this._videoSegmentInfoList=new Oe("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(m.chrome&&(m.version.major<50||m.version.major===50&&m.version.build<2661)),this._fillSilentAfterSeek=m.msedge||m.msie,this._mp3UseMpegAudio=!m.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(W){return W.onDataAvailable=this.remux.bind(this),W.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(W){this._onInitSegment=W}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(W){this._onMediaSegment=W}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(W){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(W,q){if(!this._onMediaSegment)throw new u("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(W,q),this._remuxVideo(q),this._remuxAudio(W)}},{key:"_onTrackMetadataReceived",value:function(W,q){var ne=null,se="mp4",xe=q.codec;if(W==="audio")this._audioMeta=q,q.codec==="mp3"&&this._mp3UseMpegAudio?(se="mpeg",xe="",ne=new Uint8Array):ne=Xe.generateInitSegment(q);else if(W==="video")this._videoMeta=q,ne=Xe.generateInitSegment(q);else return;if(!this._onInitSegment)throw new u("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(W,{type:W,data:ne.buffer,codec:xe,container:"".concat(W,"/").concat(se),mediaDuration:q.duration})}},{key:"_calculateDtsBase",value:function(W,q){if(this._dtsBaseInited)return;W.samples&&W.samples.length&&(this._audioDtsBase=W.samples[0].dts),q.samples&&q.samples.length&&(this._videoDtsBase=q.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0}},{key:"flushStashedSamples",value:function(){var W=this._videoStashedLastSample,q=this._audioStashedLastSample,ne={type:"video",id:1,sequenceNumber:0,samples:[],length:0};W!=null&&(ne.samples.push(W),ne.length=W.length);var se={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};q!=null&&(se.samples.push(q),se.length=q.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(ne,!0),this._remuxAudio(se,!0)}},{key:"_remuxAudio",value:function(W,q){if(this._audioMeta==null)return;var ne=W,se=ne.samples,xe=void 0,He=-1,Je=-1,Et=-1,St=this._audioMeta.refSampleDuration,nt=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,xt=this._dtsBaseInited&&this._audioNextDts===void 0,ut=!1;if(!se||se.length===0)return;if(se.length===1&&!q)return;var _t=0,Qt=null,Xt=0;nt?(_t=0,Xt=ne.length):(_t=8,Xt=8+ne.length);var Mt=null;if(se.length>1&&(Mt=se.pop(),Xt-=Mt.length),this._audioStashedLastSample!=null){var mt=this._audioStashedLastSample;this._audioStashedLastSample=null,se.unshift(mt),Xt+=mt.length}Mt!=null&&(this._audioStashedLastSample=Mt);var Cn=se[0].dts-this._dtsBase;if(this._audioNextDts)xe=Cn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())xe=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&(this._audioMeta.originalCodec!=="mp3"&&(ut=!0));else{var En=this._audioSegmentInfoList.getLastSampleBefore(Cn);if(En!=null){var Jt=Cn-(En.originalDts+En.duration);Jt<=3&&(Jt=0);var un=En.dts+En.duration+Jt;xe=Cn-un}else xe=0}if(ut){var Jn=Cn-xe,ar=this._videoSegmentInfoList.getLastSegmentBefore(Cn);if(ar!=null&&ar.beginDts<Jn){var mn=Ve.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(mn){var gr=ar.beginDts,Rr=Jn-ar.beginDts;T.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(gr,", duration: ").concat(Rr)),se.unshift({unit:mn,dts:gr,pts:gr}),Xt+=mn.byteLength}}else ut=!1}for(var vn=[],An=0;An<se.length;An++){var _r=se[An],Zr=_r.unit,jr=_r.dts-this._dtsBase,tr=jr-xe;He===-1&&(He=tr);var ur=0;if(An!==se.length-1){var yi=se[An+1].dts-this._dtsBase-xe;ur=yi-tr}else if(Mt!=null){var xr=Mt.dts-this._dtsBase-xe;ur=xr-tr}else vn.length>=1?ur=vn[vn.length-1].duration:ur=Math.floor(St);var Cr=!1,Sr=null;if(ur>St*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!m.safari){Cr=!0;var Vr=Math.abs(ur-St),Mr=Math.ceil(Vr/St),Si=tr+St;T.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
`+"dts: ".concat(tr+ur," ms, expected: ").concat(tr+Math.round(St)," ms, ")+"delta: ".concat(Math.round(Vr)," ms, generate: ").concat(Mr," frames"));var Or=Ve.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Or==null&&(T.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),Or=Zr),Sr=[];for(var ei=0;ei<Mr;ei++){var ri=Math.round(Si);if(Sr.length>0){var Xr=Sr[Sr.length-1];Xr.duration=ri-Xr.dts}var ui={dts:ri,pts:ri,cts:0,unit:Or,size:Or.byteLength,duration:0,originalDts:jr,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Sr.push(ui),Xt+=ui.size,Si+=St}var Ri=Sr[Sr.length-1];Ri.duration=tr+ur-Ri.dts,ur=Math.round(St)}vn.push({dts:tr,pts:tr,cts:0,unit:_r.unit,size:_r.unit.byteLength,duration:ur,originalDts:jr,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Cr&&vn.push.apply(vn,Sr)}nt?Qt=new Uint8Array(Xt):(Qt=new Uint8Array(Xt),Qt[0]=Xt>>>24&255,Qt[1]=Xt>>>16&255,Qt[2]=Xt>>>8&255,Qt[3]=Xt&255,Qt.set(Xe.types.mdat,4));for(var bi=0;bi<vn.length;bi++){var ii=vn[bi].unit;Qt.set(ii,_t),_t+=ii.byteLength}var yr=vn[vn.length-1];Je=yr.dts+yr.duration,this._audioNextDts=Je;var or=new we;or.beginDts=He,or.endDts=Je,or.beginPts=He,or.endPts=Je,or.originalBeginDts=vn[0].originalDts,or.originalEndDts=yr.originalDts+yr.duration,or.firstSample=new Ke(vn[0].dts,vn[0].pts,vn[0].duration,vn[0].originalDts,!1),or.lastSample=new Ke(yr.dts,yr.pts,yr.duration,yr.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(or),ne.samples=vn,ne.sequenceNumber++;var ai=null;nt?ai=new Uint8Array:ai=Xe.moof(ne,He),ne.samples=[],ne.length=0;var Di={type:"audio",data:this._mergeBoxes(ai,Qt).buffer,sampleCount:vn.length,info:or};nt&&xt&&(Di.timestampOffset=He),this._onMediaSegment("audio",Di)}},{key:"_remuxVideo",value:function(W,q){if(this._videoMeta==null)return;var ne=W,se=ne.samples,xe=void 0,He=-1,Je=-1,Et=-1,St=-1;if(!se||se.length===0)return;if(se.length===1&&!q)return;var nt=8,xt=null,ut=8+W.length,_t=null;if(se.length>1&&(_t=se.pop(),ut-=_t.length),this._videoStashedLastSample!=null){var Qt=this._videoStashedLastSample;this._videoStashedLastSample=null,se.unshift(Qt),ut+=Qt.length}_t!=null&&(this._videoStashedLastSample=_t);var Xt=se[0].dts-this._dtsBase;if(this._videoNextDts)xe=Xt-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())xe=0;else{var Mt=this._videoSegmentInfoList.getLastSampleBefore(Xt);if(Mt!=null){var mt=Xt-(Mt.originalDts+Mt.duration);mt<=3&&(mt=0);var Cn=Mt.dts+Mt.duration+mt;xe=Xt-Cn}else xe=0}for(var En=new we,Jt=[],un=0;un<se.length;un++){var Jn=se[un],ar=Jn.dts-this._dtsBase,mn=Jn.isKeyframe,gr=ar-xe,Rr=Jn.cts,vn=gr+Rr;He===-1&&(He=gr,Et=vn);var An=0;if(un!==se.length-1){var _r=se[un+1].dts-this._dtsBase-xe;An=_r-gr}else if(_t!=null){var Zr=_t.dts-this._dtsBase-xe;An=Zr-gr}else Jt.length>=1?An=Jt[Jt.length-1].duration:An=Math.floor(this._videoMeta.refSampleDuration);if(mn){var jr=new Ke(gr,vn,An,Jn.dts,!0);jr.fileposition=Jn.fileposition,En.appendSyncPoint(jr)}Jt.push({dts:gr,pts:vn,cts:Rr,units:Jn.units,size:Jn.length,isKeyframe:mn,duration:An,originalDts:ar,flags:{isLeading:0,dependsOn:mn?2:1,isDependedOn:mn?1:0,hasRedundancy:0,isNonSync:mn?0:1}})}xt=new Uint8Array(ut),xt[0]=ut>>>24&255,xt[1]=ut>>>16&255,xt[2]=ut>>>8&255,xt[3]=ut&255,xt.set(Xe.types.mdat,4);for(var tr=0;tr<Jt.length;tr++)for(var ur=Jt[tr].units;ur.length;){var yi=ur.shift(),xr=yi.data;xt.set(xr,nt),nt+=xr.byteLength}var Cr=Jt[Jt.length-1];if(Je=Cr.dts+Cr.duration,St=Cr.pts+Cr.duration,this._videoNextDts=Je,En.beginDts=He,En.endDts=Je,En.beginPts=Et,En.endPts=St,En.originalBeginDts=Jt[0].originalDts,En.originalEndDts=Cr.originalDts+Cr.duration,En.firstSample=new Ke(Jt[0].dts,Jt[0].pts,Jt[0].duration,Jt[0].originalDts,Jt[0].isKeyframe),En.lastSample=new Ke(Cr.dts,Cr.pts,Cr.duration,Cr.originalDts,Cr.isKeyframe),this._isLive||this._videoSegmentInfoList.append(En),ne.samples=Jt,ne.sequenceNumber++,this._forceFirstIDR){var Sr=Jt[0].flags;Sr.dependsOn=2,Sr.isNonSync=0}var Vr=Xe.moof(ne,He);ne.samples=[],ne.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Vr,xt).buffer,sampleCount:Jt.length,info:En})}},{key:"_mergeBoxes",value:function(W,q){var ne=new Uint8Array(W.byteLength+q.byteLength);return ne.set(W,0),ne.set(q,W.byteLength),ne}}]),Se}(),ge=fe,_e={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=_e,Ge=function(){function Se(de,W){Object(ae.a)(this,Se),this.TAG="TransmuxingController",this._emitter=new S.a,this._config=W,de.segments||(de.segments=[{duration:de.duration,filesize:de.filesize,url:de.url}]),typeof de.cors!="boolean"&&(de.cors=!0),typeof de.withCredentials!="boolean"&&(de.withCredentials=!1),this._mediaDataSource=de,this._currentSegmentIndex=0;var q=0;this._mediaDataSource.segments.forEach(function(ne){ne.timestampBase=q,q+=ne.duration,ne.cors=de.cors,ne.withCredentials=de.withCredentials,W.referrerPolicy&&(ne.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)(Se,[{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 ne=this._mediaDataSource.segments[W],se=this._ioctl=new B(ne,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 ne=this._mediaInfo.segments[q];if(ne==null)this._pendingSeekTime=W;else{var se=ne.getNearestKeyframe(W);this._remuxer.seek(se.milliseconds),this._ioctl.seek(se.fileposition),this._pendingResolveSeekPoint=se.milliseconds}}else{var xe=this._mediaInfo.segments[q];if(xe==null)this._pendingSeekTime=W,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(q);else{var He=xe.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,ne=q.length-1,se=0;se<q.length;se++)if(W<q[se].timestampBase){ne=se-1;break}return ne}},{key:"_onInitChunkArrival",value:function(W,q){var ne=this,se=null,xe=0;if(q>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,xe=this._demuxer.parseChunks(W,q);else if((se=De.probe(W)).match){this._demuxer=new De(se,this._config),this._remuxer||(this._remuxer=new ge(this._config));var He=this._mediaDataSource;He.duration!=null&&!isNaN(He.duration)&&(this._demuxer.overridedDuration=He.duration),typeof He.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=He.hasAudio),typeof He.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=He.hasVideo),this._demuxer.timestampBase=He.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),xe=this._demuxer.parseChunks(W,q)}else se=null,T.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){ne._internalAbort()}),this._emitter.emit(be.DEMUX_ERROR,V.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),xe=0;return xe}},{key:"_onMediaInfo",value:function(W){var q=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},W),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Pe.prototype));var ne=Object.assign({},W);Object.setPrototypeOf(ne,Pe.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=ne,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var se=q._pendingSeekTime;q._pendingSeekTime=null,q.seek(se)})}},{key:"_onMetaDataArrived",value:function(W){this._emitter.emit(be.METADATA_ARRIVED,W)}},{key:"_onScriptDataArrived",value:function(W){this._emitter.emit(be.SCRIPTDATA_ARRIVED,W)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(W){var q=W,ne=q+1;ne<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(ne)):(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 ne=q.info.syncPoints,se=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,m.safari&&ne.length>0&&ne[0].originalDts===se&&(se=ne[0].pts),this._emitter.emit(be.RECOMMEND_SEEKPOINT,se)}}},{key:"_enableStatisticsReporter",value:function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(W){var q=this._mediaInfo.segments[W],ne=Object.assign({},q);ne.duration=this._mediaInfo.duration,ne.segmentCount=this._mediaInfo.segmentCount,delete ne.segments,delete ne.keyframesIndex,this._emitter.emit(be.MEDIA_INFO,ne)}},{key:"_reportStatisticsInfo",value:function(){var W={};W.url=this._ioctl.currentURL,W.hasRedirect=this._ioctl.hasRedirect,W.hasRedirect&&(W.redirectedURL=this._ioctl.currentRedirectedURL),W.speed=this._ioctl.currentSpeed,W.loaderType=this._ioctl.loaderType,W.currentSegmentIndex=this._currentSegmentIndex,W.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(be.STATISTICS_INFO,W)}}]),Se}(),qe=Ge,pt=function(de){var W="TransmuxingWorker",q=null,ne=Xt.bind(this);w.install(),de.addEventListener("message",function(Mt){switch(Mt.data.cmd){case"init":q=new qe(Mt.data.param[0],Mt.data.param[1]),q.on(be.IO_ERROR,ut.bind(this)),q.on(be.DEMUX_ERROR,_t.bind(this)),q.on(be.INIT_SEGMENT,se.bind(this)),q.on(be.MEDIA_SEGMENT,xe.bind(this)),q.on(be.LOADING_COMPLETE,He.bind(this)),q.on(be.RECOVERED_EARLY_EOF,Je.bind(this)),q.on(be.MEDIA_INFO,Et.bind(this)),q.on(be.METADATA_ARRIVED,St.bind(this)),q.on(be.SCRIPTDATA_ARRIVED,nt.bind(this)),q.on(be.STATISTICS_INFO,xt.bind(this)),q.on(be.RECOMMEND_SEEKPOINT,Qt.bind(this));break;case"destroy":q&&(q.destroy(),q=null),de.postMessage({msg:"destroyed"});break;case"start":q.start();break;case"stop":q.stop();break;case"seek":q.seek(Mt.data.param);break;case"pause":q.pause();break;case"resume":q.resume();break;case"logging_config":{var mt=Mt.data.param;Ce.applyConfig(mt),mt.enableCallback===!0?Ce.addLogListener(ne):Ce.removeLogListener(ne);break}}});function se(Mt,mt){var Cn={msg:be.INIT_SEGMENT,data:{type:Mt,data:mt}};de.postMessage(Cn,[mt.data])}function xe(Mt,mt){var Cn={msg:be.MEDIA_SEGMENT,data:{type:Mt,data:mt}};de.postMessage(Cn,[mt.data])}function He(){var Mt={msg:be.LOADING_COMPLETE};de.postMessage(Mt)}function Je(){var Mt={msg:be.RECOVERED_EARLY_EOF};de.postMessage(Mt)}function Et(Mt){var mt={msg:be.MEDIA_INFO,data:Mt};de.postMessage(mt)}function St(Mt){var mt={msg:be.METADATA_ARRIVED,data:Mt};de.postMessage(mt)}function nt(Mt){var mt={msg:be.SCRIPTDATA_ARRIVED,data:Mt};de.postMessage(mt)}function xt(Mt){var mt={msg:be.STATISTICS_INFO,data:Mt};de.postMessage(mt)}function ut(Mt,mt){de.postMessage({msg:be.IO_ERROR,data:{type:Mt,info:mt}})}function _t(Mt,mt){de.postMessage({msg:be.DEMUX_ERROR,data:{type:Mt,info:mt}})}function Qt(Mt){de.postMessage({msg:be.RECOMMEND_SEEKPOINT,data:Mt})}function Xt(Mt,mt){de.postMessage({msg:"logcat_callback",data:{type:Mt,logcat:mt}})}},Dt=pt,jt=function(){function Se(de,W){if(Object(ae.a)(this,Se),this.TAG="Transmuxer",this._emitter=new S.a,W.enableWorker&&typeof Worker!="undefined")try{var q=z("0r65");this._worker=q(Dt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[de,W]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},Ce.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:Ce.getConfig()})}catch(se){T.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new qe(de,W)}else this._controller=new qe(de,W);if(this._controller){var ne=this._controller;ne.on(be.IO_ERROR,this._onIOError.bind(this)),ne.on(be.DEMUX_ERROR,this._onDemuxError.bind(this)),ne.on(be.INIT_SEGMENT,this._onInitSegment.bind(this)),ne.on(be.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),ne.on(be.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),ne.on(be.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),ne.on(be.MEDIA_INFO,this._onMediaInfo.bind(this)),ne.on(be.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),ne.on(be.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),ne.on(be.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),ne.on(be.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),Ce.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,q){this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,q)}},{key:"hasWorker",value:function(){return this._worker!=null}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(W){this._worker?this._worker.postMessage({cmd:"seek",param:W}):this._controller.seek(W)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(W,q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(be.INIT_SEGMENT,W,q)})}},{key:"_onMediaSegment",value:function(W,q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(be.MEDIA_SEGMENT,W,q)})}},{key:"_onLoadingComplete",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(be.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(be.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.MEDIA_INFO,W)})}},{key:"_onMetaDataArrived",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.METADATA_ARRIVED,W)})}},{key:"_onScriptDataArrived",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.SCRIPTDATA_ARRIVED,W)})}},{key:"_onStatisticsInfo",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.STATISTICS_INFO,W)})}},{key:"_onIOError",value:function(W,q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(be.IO_ERROR,W,q)})}},{key:"_onDemuxError",value:function(W,q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(be.DEMUX_ERROR,W,q)})}},{key:"_onRecommendSeekpoint",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.RECOMMEND_SEEKPOINT,W)})}},{key:"_onLoggingConfigChanged",value:function(W){this._worker&&this._worker.postMessage({cmd:"logging_config",param:W})}},{key:"_onWorkerMessage",value:function(W){var q=W.data,ne=q.data;if(q.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(q.msg){case be.INIT_SEGMENT:case be.MEDIA_SEGMENT:this._emitter.emit(q.msg,ne.type,ne.data);break;case be.LOADING_COMPLETE:case be.RECOVERED_EARLY_EOF:this._emitter.emit(q.msg);break;case be.MEDIA_INFO:Object.setPrototypeOf(ne,Pe.prototype),this._emitter.emit(q.msg,ne);break;case be.METADATA_ARRIVED:case be.SCRIPTDATA_ARRIVED:case be.STATISTICS_INFO:this._emitter.emit(q.msg,ne);break;case be.IO_ERROR:case be.DEMUX_ERROR:this._emitter.emit(q.msg,ne.type,ne.info);break;case be.RECOMMEND_SEEKPOINT:this._emitter.emit(q.msg,ne);break;case"logcat_callback":T.emitter.emit("log",ne.type,ne.logcat);break;default:break}}}]),Se}(),Rt=jt,Lt={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},lt=Lt,ft=function(){function Se(de){Object(ae.a)(this,Se),this.TAG="MSEController",this._config=de,this._emitter=new S.a,this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new Ae}return Object(Z.a)(Se,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,q){this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,q)}},{key:"attachMediaElement",value:function(W){if(this._mediaSource)throw new u("MediaSource has been attached to an HTMLMediaElement!");var q=this._mediaSource=new window.MediaSource;q.addEventListener("sourceopen",this.e.onSourceOpen),q.addEventListener("sourceended",this.e.onSourceEnded),q.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=W,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),W.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var W=this._mediaSource;for(var q in this._sourceBuffers){var ne=this._pendingSegments[q];ne.splice(0,ne.length),this._pendingSegments[q]=null,this._pendingRemoveRanges[q]=null,this._lastInitSegments[q]=null;var se=this._sourceBuffers[q];if(se){if(W.readyState!=="closed"){try{W.removeSourceBuffer(se)}catch(xe){T.e(this.TAG,xe.message)}se.removeEventListener("error",this.e.onSourceBufferError),se.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[q]=null,this._sourceBuffers[q]=null}}if(W.readyState==="open")try{W.endOfStream()}catch(xe){T.e(this.TAG,xe.message)}W.removeEventListener("sourceopen",this.e.onSourceOpen),W.removeEventListener("sourceended",this.e.onSourceEnded),W.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(W,q){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(W),this._pendingSegments[W.type].push(W);return}var ne=W,se="".concat(ne.container);ne.codec&&ne.codec.length>0&&(se+=";codecs=".concat(ne.codec));var xe=!1;if(T.v(this.TAG,"Received Initialization Segment, mimeType: "+se),this._lastInitSegments[ne.type]=ne,se!==this._mimeTypes[ne.type]){if(this._mimeTypes[ne.type])T.v(this.TAG,"Notice: ".concat(ne.type," mimeType changed, origin: ").concat(this._mimeTypes[ne.type],", target: ").concat(se));else{xe=!0;try{var He=this._sourceBuffers[ne.type]=this._mediaSource.addSourceBuffer(se);He.addEventListener("error",this.e.onSourceBufferError),He.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Je){T.e(this.TAG,Je.message),this._emitter.emit(lt.ERROR,{code:Je.code,msg:Je.message});return}}this._mimeTypes[ne.type]=se}q||this._pendingSegments[ne.type].push(ne),xe||this._sourceBuffers[ne.type]&&!this._sourceBuffers[ne.type].updating&&this._doAppendSegments(),m.safari&&ne.container==="audio/mpeg"&&ne.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=ne.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(W){var q=W;this._pendingSegments[q.type].push(q),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var ne=this._sourceBuffers[q.type];ne&&!ne.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}},{key:"seek",value:function(W){for(var q in this._sourceBuffers){if(!this._sourceBuffers[q])continue;var ne=this._sourceBuffers[q];if(this._mediaSource.readyState==="open")try{ne.abort()}catch(St){T.e(this.TAG,St.message)}this._idrList.clear();var se=this._pendingSegments[q];if(se.splice(0,se.length),this._mediaSource.readyState==="closed")continue;for(var xe=0;xe<ne.buffered.length;xe++){var He=ne.buffered.start(xe),Je=ne.buffered.end(xe);this._pendingRemoveRanges[q].push({start:He,end:Je})}if(ne.updating||this._doRemoveRanges(),m.safari){var Et=this._lastInitSegments[q];Et&&(this._pendingSegments[q].push(Et),ne.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 ne=this._sourceBuffers[q];if(ne){var se=ne.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 ne=this._sourceBuffers[q];if(ne){for(var se=ne.buffered,xe=!1,He=0;He<se.length;He++){var Je=se.start(He),Et=se.end(He);if(Je<=W&&W<Et+3){if(W-Je>=this._config.autoCleanupMaxBackwardDuration){xe=!0;var St=W-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[q].push({start:Je,end:St})}}else Et<W&&(xe=!0,this._pendingRemoveRanges[q].push({start:Je,end:Et}))}xe&&!ne.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,ne=this._pendingMediaDuration;ne>0&&(isNaN(q)||ne>q)&&(T.v(this.TAG,"Update MediaSource duration from ".concat(q," to ").concat(ne)),this._mediaSource.duration=ne),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},{key:"_doRemoveRanges",value:function(){for(var W in this._pendingRemoveRanges){if(!this._sourceBuffers[W]||this._sourceBuffers[W].updating)continue;for(var q=this._sourceBuffers[W],ne=this._pendingRemoveRanges[W];ne.length&&!q.updating;){var se=ne.shift();q.remove(se.start,se.end)}}}},{key:"_doAppendSegments",value:function(){var W=this._pendingSegments;for(var q in W){if(!this._sourceBuffers[q]||this._sourceBuffers[q].updating)continue;if(W[q].length>0){var ne=W[q].shift();if(ne.timestampOffset){var se=this._sourceBuffers[q].timestampOffset,xe=ne.timestampOffset/1e3,He=Math.abs(se-xe);He>.1&&(T.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(se," to ").concat(xe)),this._sourceBuffers[q].timestampOffset=xe),delete ne.timestampOffset}if(!ne.data||ne.data.byteLength===0)continue;try{this._sourceBuffers[q].appendBuffer(ne.data),this._isBufferFull=!1,q==="video"&&ne.hasOwnProperty("info")&&this._idrList.appendArray(ne.info.syncPoints)}catch(Je){this._pendingSegments[q].unshift(ne),Je.code===22?(this._isBufferFull||this._emitter.emit(lt.BUFFER_FULL),this._isBufferFull=!0):(T.e(this.TAG,Je.message),this._emitter.emit(lt.ERROR,{code:Je.code,msg:Je.message}))}}}}},{key:"_onSourceOpen",value:function(){if(T.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var W=this._pendingSourceBufferInit;W.length;){var q=W.shift();this.appendInitSegment(q,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(lt.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){T.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){T.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var W=this._pendingSegments;return W.video.length>0||W.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var W=this._pendingRemoveRanges;return W.video.length>0||W.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(lt.UPDATE_END)}},{key:"_onSourceBufferError",value:function(W){T.e(this.TAG,"SourceBuffer Error: ".concat(W))}}]),Se}(),Qe=ft,Te={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},je={NETWORK_EXCEPTION:n.EXCEPTION,NETWORK_STATUS_CODE_INVALID:n.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:n.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:n.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:V.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:V.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:V.CODEC_UNSUPPORTED},dt=function(){function Se(de,W){if(Object(ae.a)(this,Se),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new S.a,this._config=ie(),typeof W=="object"&&Object.assign(this._config,W),de.type.toLowerCase()!=="flv")throw new s("FlvPlayer requires an flv MediaDataSource input!");de.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=de,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var q=m.chrome&&(m.version.major<50||m.version.major===50&&m.version.build<2661);this._alwaysSeekKeyframe=!!(q||m.msedge||m.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,q){var ne=this;W===Le.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){ne._emitter.emit(Le.MEDIA_INFO,ne.mediaInfo)}):W===Le.STATISTICS_INFO&&(this._statisticsInfo!=null&&Promise.resolve().then(function(){ne._emitter.emit(Le.STATISTICS_INFO,ne.statisticsInfo)})),this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,q)}},{key:"attachMediaElement",value:function(W){var q=this;if(this._mediaElement=W,W.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),W.addEventListener("seeking",this.e.onvSeeking),W.addEventListener("canplay",this.e.onvCanPlay),W.addEventListener("stalled",this.e.onvStalled),W.addEventListener("progress",this.e.onvProgress),this._msectl=new Qe(this._config),this._msectl.on(lt.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(lt.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(lt.SOURCE_OPEN,function(){q._mseSourceOpened=!0,q._hasPendingLoad&&(q._hasPendingLoad=!1,q.load())}),this._msectl.on(lt.ERROR,function(ne){q._emitter.emit(Le.ERROR,Te.MEDIA_ERROR,je.MEDIA_MSE_ERROR,ne)}),this._msectl.attachMediaElement(W),this._pendingSeekTime!=null)try{W.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(ne){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var W=this;if(!this._mediaElement)throw new u("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new u("FlvPlayer.load() has been called, please call unload() first!");if(this._hasPendingLoad)return;if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Rt(this._mediaDataSource,this._config),this._transmuxer.on(be.INIT_SEGMENT,function(q,ne){W._msectl.appendInitSegment(ne)}),this._transmuxer.on(be.MEDIA_SEGMENT,function(q,ne){if(W._msectl.appendMediaSegment(ne),W._config.lazyLoad&&!W._config.isLive){var se=W._mediaElement.currentTime;ne.info.endDts>=(se+W._config.lazyLoadMaxDuration)*1e3&&(W._progressChecker==null&&(T.v(W.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),W._suspendTransmuxer()))}}),this._transmuxer.on(be.LOADING_COMPLETE,function(){W._msectl.endOfStream(),W._emitter.emit(Le.LOADING_COMPLETE)}),this._transmuxer.on(be.RECOVERED_EARLY_EOF,function(){W._emitter.emit(Le.RECOVERED_EARLY_EOF)}),this._transmuxer.on(be.IO_ERROR,function(q,ne){W._emitter.emit(Le.ERROR,Te.NETWORK_ERROR,q,ne)}),this._transmuxer.on(be.DEMUX_ERROR,function(q,ne){W._emitter.emit(Le.ERROR,Te.MEDIA_ERROR,q,{code:-1,msg:ne})}),this._transmuxer.on(be.MEDIA_INFO,function(q){W._mediaInfo=q,W._emitter.emit(Le.MEDIA_INFO,Object.assign({},q))}),this._transmuxer.on(be.METADATA_ARRIVED,function(q){W._emitter.emit(Le.METADATA_ARRIVED,q)}),this._transmuxer.on(be.SCRIPTDATA_ARRIVED,function(q){W._emitter.emit(Le.SCRIPTDATA_ARRIVED,q)}),this._transmuxer.on(be.STATISTICS_INFO,function(q){W._statisticsInfo=W._fillStatisticsInfo(q),W._emitter.emit(Le.STATISTICS_INFO,Object.assign({},W._statisticsInfo))}),this._transmuxer.on(be.RECOMMEND_SEEKPOINT,function(q){W._mediaElement&&!W._config.accurateSeek&&(W._requestSetTime=!0,W._mediaElement.currentTime=q/1e3)}),this._transmuxer.open()}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(W){this._mediaElement.volume=W}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(W){this._mediaElement.muted=W}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(W){this._mediaElement?this._internalSeek(W):this._pendingSeekTime=W}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(W){if(W.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return W;var q=!0,ne=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var xe=this._mediaElement.getVideoPlaybackQuality();ne=xe.totalVideoFrames,se=xe.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ne=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):q=!1;return q&&(W.decodedFrames=ne,W.droppedFrames=se),W}},{key:"_onmseUpdateEnd",value:function(){if(!this._config.lazyLoad||this._config.isLive)return;for(var W=this._mediaElement.buffered,q=this._mediaElement.currentTime,ne=0,se=0,xe=0;xe<W.length;xe++){var He=W.start(xe),Je=W.end(xe);if(He<=q&&q<Je){ne=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,ne=!1,se=0;se<q.length;se++){var xe=q.start(se),He=q.end(se);if(W>=xe&&W<He){W>=He-this._config.lazyLoadRecoverDuration&&(ne=!0);break}}ne&&(window.clearInterval(this._progressChecker),this._progressChecker=null,ne&&(T.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(W){for(var q=this._mediaElement.buffered,ne=0;ne<q.length;ne++){var se=q.start(ne),xe=q.end(ne);if(W>=se&&W<xe)return!0}return!1}},{key:"_internalSeek",value:function(W){var q=this._isTimepointBuffered(W),ne=!1,se=0;if(W<1&&this._mediaElement.buffered.length>0){var xe=this._mediaElement.buffered.start(0);(xe<1&&W<xe||m.safari)&&(ne=!0,se=m.safari?.1:xe)}if(ne)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 ne=q.buffered;ne.length>0&&q.currentTime<ne.start(0)&&(T.w(this.TAG,"Playback seems stuck at ".concat(q.currentTime,", seek to ").concat(ne.start(0))),this._requestSetTime=!0,this._mediaElement.currentTime=ne.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,ne=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(q<1&&ne.length>0){var se=ne.start(0);if(se<1&&q<se||m.safari){this._requestSetTime=!0,this._mediaElement.currentTime=m.safari?.1:se;return}}if(this._isTimepointBuffered(q)){if(this._alwaysSeekKeyframe){var xe=this._msectl.getNearestKeyframe(Math.floor(q*1e3));xe!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=xe.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()}}]),Se}(),Ze=dt,Tt=function(){function Se(de,W){if(Object(ae.a)(this,Se),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new S.a,this._config=ie(),typeof W=="object"&&Object.assign(this._config,W),de.type.toLowerCase()==="flv")throw new s("NativePlayer does't support flv MediaDataSource input!");if(de.hasOwnProperty("segments"))throw new s("NativePlayer(".concat(de.type,") doesn't support multipart playback!"));this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=de,this._mediaElement=null}return Object(Z.a)(Se,[{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 ne=this;W===Le.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){ne._emitter.emit(Le.MEDIA_INFO,ne.mediaInfo)}):W===Le.STATISTICS_INFO&&(this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){ne._emitter.emit(Le.STATISTICS_INFO,ne.statisticsInfo)})),this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,q)}},{key:"attachMediaElement",value:function(W){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 u("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,ne=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var xe=this._mediaElement.getVideoPlaybackQuality();ne=xe.totalVideoFrames,se=xe.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ne=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):q=!1;return q&&(W.decodedFrames=ne,W.droppedFrames=se),W}},{key:"_onvLoadedMetadata",value:function(W){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Le.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(Le.STATISTICS_INFO,this.statisticsInfo)}}]),Se}(),Ct=Tt;w.install();function ot(Se,de){var W=Se;if(W==null||typeof W!="object")throw new s("MediaDataSource must be an javascript object!");if(!W.hasOwnProperty("type"))throw new s("MediaDataSource must has type field to indicate video file type!");switch(W.type){case"flv":return new Ze(W,de);default:return new Ct(W,de)}}function gt(){return Ee.supportMSEH264Playback()}function kt(){return Ee.getFeatureList()}var Kt={};Kt.createPlayer=ot,Kt.isSupported=gt,Kt.getFeatureList=kt,Kt.BaseLoader=t,Kt.LoaderStatus=i,Kt.LoaderErrors=n,Kt.Events=Le,Kt.ErrorTypes=Te,Kt.ErrorDetails=je,Kt.FlvPlayer=Ze,Kt.NativePlayer=Ct,Kt.LoggingControl=Ce,Object.defineProperty(Kt,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Gt=We.a=Kt},GgEA:function($e,We,z){},Gytx:function($e,We){$e.exports=function(ae,Z,U,w){var P=U?U.call(w,ae,Z):void 0;if(P!==void 0)return!!P;if(ae===Z)return!0;if(typeof ae!="object"||!ae||typeof Z!="object"||!Z)return!1;var S=Object.keys(ae),O=Object.keys(Z);if(S.length!==O.length)return!1;for(var T=Object.prototype.hasOwnProperty.bind(Z),l=0;l<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 a}),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,c){t.__proto__=c}||function(t,c){for(var y in c)c.hasOwnProperty(y)&&(t[y]=c[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),O=z("2mql"),T=z.n(O),l=function(){var f=function(i,n){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,c){t.__proto__=c}||function(t,c){for(var y in c)c.hasOwnProperty(y)&&(t[y]=c[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 c in i)Object.prototype.hasOwnProperty.call(i,c)&&(f[c]=i[c])}return f},p.apply(this,arguments)};function h(f){return f.displayName||f.name||"Component"}var d=function(){return{}};function a(f,i){i===void 0&&(i={});var n=!!f,t=f||d;return function(y){var v=function(b){l(m,b);function m(g,E){var o=b.call(this,g,E)||this;return o.unsubscribe=null,o.handleChange=function(){if(!o.unsubscribe)return;var x=t(o.store.getState(),o.props);o.setState({subscribed:x})},o.store=o.context,o.state={subscribed:t(o.store.getState(),g),store:o.store,props:g},o}return m.getDerivedStateFromProps=function(g,E){return f&&f.length===2&&g!==E.props?{subscribed:t(E.store.getState(),g),props:g}:{props:g}},m.prototype.componentDidMount=function(){this.trySubscribe()},m.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},m.prototype.shouldComponentUpdate=function(g,E){return!S()(this.props,g)||!S()(this.state.subscribed,E.subscribed)},m.prototype.trySubscribe=function(){n&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},m.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},m.prototype.render=function(){var g=p(p(p({},this.props),this.state.subscribed),{store:this.store});return ae.createElement(y,p({},g,{ref:this.props.miniStoreForwardedRef}))},m.displayName="Connect("+h(y)+")",m.contextType=U,m}(ae.Component);if(i.forwardRef){var _=ae.forwardRef(function(b,m){return ae.createElement(v,p({},b,{miniStoreForwardedRef:m}))});return T()(_,y)}return T()(v,y)}}var u=function(){return u=Object.assign||function(f){for(var i,n=1,t=arguments.length;n<t;n++){i=arguments[n];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(f[c]=i[c])}return f},u.apply(this,arguments)};function s(f){var i=f,n=[];function t(v){i=u(u({},i),v);for(var _=0;_<n.length;_++)n[_]()}function c(){return i}function y(v){return n.push(v),function(){var b=n.indexOf(v);n.splice(b,1)}}return{setState:t,getState:c,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,O=P.className,T=P.children,l=P.style,p=l===void 0?{}:l;return Z.a.createElement("div",{className:"".concat(w.a.idsRingWrapper," ").concat(O)},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",O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=function(D){for(var I={},F=0,H=D.length;F<H;F++)I[D.charAt(F)]=F;return I}(O),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)},a=function(D){var I=[0,2,1][D.length%3],F=D.charCodeAt(0)<<16|(D.length>1?D.charCodeAt(1):0)<<8|(D.length>2?D.charCodeAt(2):0),H=[O.charAt(F>>>18),O.charAt(F>>>12&63),I>=2?"=":O.charAt(F>>>6&63),I>=1?"=":O.charAt(F&63)];return H.join("")},u=w.btoa&&typeof w.btoa=="function"?function(D){return w.btoa(D)}:function(D){if(D.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return D.replace(/[\s\S]{1,3}/g,a)},s=function(D){return u(d(String(D)))},f=function(D){return D.replace(/[+\/]/g,function(I){return I=="+"?"-":"_"}).replace(/=/g,"")},i=function(D,I){return I?f(s(D)):s(D)},n=function(D){return i(D,!0)},t;w.Uint8Array&&(t=function(D,I){for(var F="",H=0,te=D.length;H<te;H+=3){var j=D[H],G=D[H+1],X=D[H+2],J=j<<16|G<<8|X;F+=O.charAt(J>>>18)+O.charAt(J>>>12&63)+(typeof G!="undefined"?O.charAt(J>>>6&63):"=")+(typeof X!="undefined"?O.charAt(J&63):"=")}return I?f(F):F});var c=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=function(D){switch(D.length){case 4:var I=(7&D.charCodeAt(0))<<18|(63&D.charCodeAt(1))<<12|(63&D.charCodeAt(2))<<6|63&D.charCodeAt(3),F=I-65536;return l((F>>>10)+55296)+l((F&1023)+56320);case 3:return l((15&D.charCodeAt(0))<<12|(63&D.charCodeAt(1))<<6|63&D.charCodeAt(2));default:return l((31&D.charCodeAt(0))<<6|63&D.charCodeAt(1))}},v=function(D){return D.replace(c,y)},_=function(D){var I=D.length,F=I%4,H=(I>0?T[D.charAt(0)]<<18:0)|(I>1?T[D.charAt(1)]<<12:0)|(I>2?T[D.charAt(2)]<<6:0)|(I>3?T[D.charAt(3)]:0),te=[l(H>>>16),l(H>>>8&255),l(H&255)];return te.length-=[0,0,2,1][F],te.join("")},b=w.atob&&typeof w.atob=="function"?function(D){return w.atob(D)}:function(D){return D.replace(/\S{1,4}/g,_)},m=function(D){return b(String(D).replace(/[^A-Za-z0-9\+\/]/g,""))},g=function(D){return v(b(D))},E=function(D){return String(D).replace(/[-_]/g,function(I){return I=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},o=function(D){return g(E(D))},x;w.Uint8Array&&(x=function(D){return Uint8Array.from(m(E(D)),function(I){return I.charCodeAt(0)})});var C=function(){var D=w.Base64;return w.Base64=P,D};if(w.Base64={VERSION:S,atob:m,btoa:u,fromBase64:o,toBase64:i,utob:d,encode:i,encodeURI:n,btou:v,decode:o,noConflict:C,fromUint8Array:t,toUint8Array:x},typeof Object.defineProperty=="function"){var A=function(D){return{value:D,enumerable:!1,writable:!0,configurable:!0}};w.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",A(function(){return o(this)})),Object.defineProperty(String.prototype,"toBase64",A(function(D){return i(this,D)})),Object.defineProperty(String.prototype,"toBase64URI",A(function(){return i(this,!0)}))}}return w.Meteor&&(Base64=w.Base64),$e.exports?$e.exports.Base64=w.Base64:!(Z=[],U=function(){return w.Base64}.apply(We,Z),U!==void 0&&($e.exports=U)),{Base64:w.Base64}})}).call(this,z("IyRk"))},JOrW:function($e,We,z){$e.exports=z.p+"static/gf.09d89ab3.svg"},LdHM:function($e,We,z){"use strict";z.d(We,"b",function(){return c}),z.d(We,"a",function(){return v});var ae=z("1OyB"),Z=z("vuIU"),U=z("Ji7U"),w=z("LK+K"),P=z("q1tI"),S=z("rePB"),O=z("Ff2n"),T=z("ODXe"),l=z("4IlW"),p=z("bX4T"),h=z("YrtM"),d=z("TSYQ"),a=z.n(d),u=z("+nKL"),s=z("8OUc"),f=function(X,J){var B=X.prefixCls,Q=X.id,ie=X.flattenOptions,oe=X.childrenAsData,Ee=X.values,ye=X.searchValue,Le=X.multiple,pe=X.defaultActiveFirstOption,Ce=X.height,Be=X.itemHeight,Pe=X.notFoundContent,ke=X.open,Ne=X.menuItemSelectedIcon,he=X.virtual,ue=X.onSelect,Ie=X.onToggleOpen,Ue=X.onActiveValue,Ye=X.onScroll,ee=X.onMouseEnter,M="".concat(B,"-item"),N=Object(h.a)(function(){return ie},[ke,ie],function(Ke,we){return we[0]&&Ke[1]!==we[1]}),$=P.useRef(null),V=function(we){we.preventDefault()},Y=function(we){$.current&&$.current.scrollTo({index:we})},me=function(we){for(var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Oe=N.length,fe=0;fe<Oe;fe+=1){var ge=(we+fe*Ae+Oe)%Oe,_e=N[ge],be=_e.group,Ge=_e.data;if(!be&&!Ge.disabled)return ge}return-1},Re=P.useState(function(){return me(0)}),rt=Object(T.a)(Re,2),De=rt[0],Me=rt[1],Xe=function(we){Me(we);var Ae=N[we];if(!Ae){Ue(null,-1);return}Ue(Ae.data.value,we)};P.useEffect(function(){Xe(pe!==!1?me(0):-1)},[N.length,ye]),P.useEffect(function(){var Ke=setTimeout(function(){if(!Le&&ke&&Ee.size===1){var we=Array.from(Ee)[0],Ae=N.findIndex(function(Oe){var fe=Oe.data;return fe.value===we});Xe(Ae),Y(Ae)}});return function(){return clearTimeout(Ke)}},[ke]);var tt=function(we){we!==void 0&&ue(we,{selected:!Ee.has(we)}),Le||Ie(!1)};if(P.useImperativeHandle(J,function(){return{onKeyDown:function(we){var Ae=we.which;switch(Ae){case l.a.UP:case l.a.DOWN:{var Oe=0;if(Ae===l.a.UP?Oe=-1:Ae===l.a.DOWN&&(Oe=1),Oe!==0){var fe=me(De+Oe,Oe);Y(fe),Xe(fe)}break}case l.a.ENTER:{var ge=N[De];ge&&!ge.data.disabled?tt(ge.data.value):tt(void 0),ke&&we.preventDefault();break}case l.a.ESC:Ie(!1)}},onKeyUp:function(){},scrollTo:function(we){Y(we)}}}),N.length===0)return P.createElement("div",{role:"listbox",id:"".concat(Q,"_list"),className:"".concat(M,"-empty"),onMouseDown:V},Pe);function Ve(Ke){var we=N[Ke];if(!we)return null;var Ae=we.data||{},Oe=Ae.value,fe=Ae.label,ge=Ae.children,_e=Object(p.a)(Ae,!0),be=oe?ge:fe;return we?P.createElement("div",Object.assign({"aria-label":typeof be=="string"?be:null},_e,{key:Ke,role:"option",id:"".concat(Q,"_list_").concat(Ke),"aria-selected":Ee.has(Oe)}),Oe):null}return P.createElement(P.Fragment,null,P.createElement("div",{role:"listbox",id:"".concat(Q,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ve(De-1),Ve(De),Ve(De+1)),P.createElement(u.a,{itemKey:"key",ref:$,data:N,height:Ce,itemHeight:Be,fullHeight:!1,onMouseDown:V,onScroll:Ye,virtual:he,onMouseEnter:ee},function(Ke,we){var Ae,Oe=Ke.group,fe=Ke.groupOption,ge=Ke.data,_e=ge.label,be=ge.key;if(Oe)return P.createElement("div",{className:a()(M,"".concat(M,"-group"))},_e!==void 0?_e:be);var Ge=ge.disabled,qe=ge.value,pt=ge.title,Dt=ge.children,jt=ge.style,Rt=ge.className,Lt=Object(O.a)(ge,["disabled","value","title","children","style","className"]),lt=Ee.has(qe),ft="".concat(M,"-option"),Qe=a()(M,ft,Rt,(Ae={},Object(S.a)(Ae,"".concat(ft,"-grouped"),fe),Object(S.a)(Ae,"".concat(ft,"-active"),De===we&&!Ge),Object(S.a)(Ae,"".concat(ft,"-disabled"),Ge),Object(S.a)(Ae,"".concat(ft,"-selected"),lt),Ae)),Te=oe?Dt:_e,je=!Ne||typeof Ne=="function"||lt;return P.createElement("div",Object.assign({},Lt,{"aria-selected":lt,className:Qe,title:pt,onMouseMove:function(){if(De===we||Ge)return;Xe(we)},onClick:function(){Ge||tt(qe)},style:jt}),P.createElement("div",{className:"".concat(ft,"-content")},Te||qe),P.isValidElement(Ne)||lt,je&&P.createElement(s.a,{className:"".concat(M,"-option-state"),customizeIcon:Ne,customizeIconProps:{isSelected:lt}},lt?"\u2713":null))}))},i=P.forwardRef(f);i.displayName="OptionList";var n=i,t=function(){return null};t.isSelectOption=!0;var c=t,y=function(){return null};y.isSelectOptGroup=!0;var v=y,_=z("VTBJ"),b=z("Zm9Q");function m(G){var X=G.key,J=G.props,B=J.children,Q=J.value,ie=Object(O.a)(J,["children","value"]);return Object(_.a)({key:X,value:Q!==void 0?Q:X,children:B},ie)}function g(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,Ee=oe.children,ye=Object(O.a)(oe,["children"]);return X||!Q?m(J):Object(_.a)(Object(_.a)({key:"__RC_SELECT_GRP__".concat(ie===null?B:ie,"__"),label:ie},ye),{},{options:g(Ee)})}).filter(function(J){return J})}var E=z("2Qr1"),o=z("qNPg"),x=z("U8pU"),C=z("Kwbf"),A=z("WKfj");function D(G){var X=G.mode,J=G.options,B=G.children,Q=G.backfill,ie=G.allowClear,oe=G.placeholder,Ee=G.getInputElement,ye=G.showSearch,Le=G.onSearch,pe=G.defaultOpen,Ce=G.autoFocus,Be=G.labelInValue,Pe=G.value,ke=G.inputValue,Ne=G.optionLabelProp,he=X==="multiple"||X==="tags",ue=ye!==void 0?ye:he||X==="combobox",Ie=J||g(B);if(Object(C.a)(X!=="tags"||Ie.every(function(M){return!M.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),X==="tags"||X==="combobox"){var Ue=Ie.some(function(M){return M.options?M.options.some(function(N){return typeof("value"in N?N.value:N.key)=="number"}):typeof("value"in M?M.value:M.key)=="number"});Object(C.a)(!Ue,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(C.a)(X!=="combobox"||!Ne,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(C.a)(X==="combobox"||!Q,"`backfill` only works with `combobox` mode."),Object(C.a)(X==="combobox"||!Ee,"`getInputElement` only work with `combobox` mode."),Object(C.b)(X!=="combobox"||!Ee||!ie||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Le&&!ue&&X!=="combobox"&&X!=="tags"&&Object(C.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(C.b)(!pe||Ce,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Pe!=null){var Ye=Object(A.d)(Pe);Object(C.a)(!Be||Ye.every(function(M){return Object(x.a)(M)==="object"&&("key"in M||"value"in M)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(C.a)(!he||Array.isArray(Pe),"`value` should be array when `mode` is `multiple` or `tags`")}if(B){var ee=null;Object(b.a)(B).some(function(M){if(!P.isValidElement(M)||!M.type)return!1;var N=M.type;if(N.isSelectOption)return!1;if(N.isSelectOptGroup){var $=Object(b.a)(M.props.children).every(function(V){return!P.isValidElement(V)||!M.type||V.type.isSelectOption?!0:(ee=V.type,!1)});return!$}return ee=N,!0}),ee&&Object(C.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ee.displayName||ee.name||ee,"`.")),Object(C.a)(ke===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var I=D,F=Object(o.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:g,flattenOptions:E.d,getLabeledValue:E.e,filterOptions:E.b,isValueDisabled:E.g,findValueOption:E.c,warningProps:I,fillOptionsWithMissingValue:E.a}),H=function(G){Object(U.a)(J,G);var X=Object(w.a)(J);function J(){var B;return Object(ae.a)(this,J),B=X.apply(this,arguments),B.selectRef=P.createRef(),B.focus=function(){B.selectRef.current.focus()},B.blur=function(){B.selectRef.current.blur()},B}return Object(Z.a)(J,[{key:"render",value:function(){return P.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),J}(P.Component);H.Option=c,H.OptGroup=v;var te=H,j=We.c=te},M8RZ:function($e,We,z){"use strict";z.d(We,"a",function(){return l});var ae=z("fWQN"),Z=z("mtLc"),U=z("yKVA"),w=z("879j"),P=z("q1tI"),S=z.n(P),O=z("i8i4"),T=z.n(O),l=function(p){Object(U.a)(d,p);var h=Object(w.a)(d);function d(a){var u;Object(ae.a)(this,d),u=h.call(this,a);var s=window.document;return u.node=s.createElement("div"),s.body.appendChild(u.node),u}return Object(Z.a)(d,[{key:"render",value:function(){var u=this.props.children;return Object(O.createPortal)(u,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),d}(S.a.Component)},MFOe:function($e,We,z){(function(ae){var Z=S(),U=O(),w=T(),P=typeof window!="undefined"?window:ae;$e.exports={assign:Z,create:U,trim:w,bind:l,slice:p,each:h,map:d,pluck:a,isList:u,isFunction:s,isObject:f,Global:P};function S(){return Object.assign?Object.assign:function(n,t,c,y){for(var v=1;v<arguments.length;v++)h(Object(arguments[v]),function(_,b){n[b]=_});return n}}function O(){if(Object.create)return function(t,c,y,v){var _=p(arguments,1);return Z.apply(this,[Object.create(t)].concat(_))};{function i(){}return function(t,c,y,v){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){a(i,function(t,c){return n(t,c),!1})}function d(i,n){var t=u(i)?[]:{};return a(i,function(c,y){return t[y]=n(c,y),!1}),t}function a(i,n){if(u(i)){for(var t=0;t<i.length;t++)if(n(i[t],t))return i[t]}else for(var c in i)if(i.hasOwnProperty(c)&&n(i[c],c))return i[c]}function u(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(O,T){var l=new Set;return O.forEach(function(p){T.has(p)||l.add(p)}),l}function U(O){var T=O||{},l=T.disabled,p=T.disableCheckbox,h=T.checkable;return!!(l||p)||h===!1}function w(O,T,l,p){for(var h=new Set(O),d=new Set,a=0;a<=l;a+=1){var u=T.get(a)||new Set;u.forEach(function(n){var t=n.key,c=n.node,y=n.children,v=y===void 0?[]:y;h.has(t)&&!p(c)&&v.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,c=n.node;if(p(c)||!n.parent||s.has(n.parent.key))return;if(p(n.parent.node)){s.add(t.key);return}var y=!0,v=!1;(t.children||[]).filter(function(_){return!p(_.node)}).forEach(function(_){var b=_.key,m=h.has(b);y&&!m&&(y=!1),!v&&(m||d.has(b))&&(v=!0)}),y&&h.add(t.key),v&&d.add(t.key),s.add(t.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(Z(d,h))}}function P(O,T,l,p,h){for(var d=new Set(O),a=new Set(T),u=0;u<=p;u+=1){var s=l.get(u)||new Set;s.forEach(function(t){var c=t.key,y=t.node,v=t.children,_=v===void 0?[]:v;!d.has(c)&&!a.has(c)&&!h(y)&&_.filter(function(b){return!h(b.node)}).forEach(function(b){d.delete(b.key)})})}a=new Set;for(var f=new Set,i=p;i>=0;i-=1){var n=l.get(i)||new Set;n.forEach(function(t){var c=t.parent,y=t.node;if(h(y)||!t.parent||f.has(t.parent.key))return;if(h(t.parent.node)){f.add(c.key);return}var v=!0,_=!1;(c.children||[]).filter(function(b){return!h(b.node)}).forEach(function(b){var m=b.key,g=d.has(m);v&&!g&&(v=!1),!_&&(g||a.has(m))&&(_=!0)}),v||d.delete(c.key),_&&a.add(c.key),f.add(c.key)})}return{checkedKeys:Array.from(d),halfCheckedKeys:Array.from(Z(a,d))}}function S(O,T,l,p){var h=[],d;p?d=p:d=U;var a=new Set(O.filter(function(i){var n=!!l[i];return n||h.push(i),n})),u=new Map,s=0;Object.keys(l).forEach(function(i){var n=l[i],t=n.level,c=u.get(t);c||(c=new Set,u.set(t,c)),c.add(n),s=Math.max(s,t)}),Object(ae.a)(!h.length,"Tree missing follow keys: ".concat(h.slice(0,100).map(function(i){return"'".concat(i,"'")}).join(", ")));var f;return T===!0?f=w(a,u,s,d):f=P(a,T.halfCheckedKeys,u,s,d),f}},OLES:function($e,We,z){"use strict";var ae=z("U8pU"),Z=z("VTBJ"),U=z("Ff2n"),w=z("q1tI"),P=z("uciX"),S=z("7ixt"),O=function(a){var u=a.overlay,s=a.prefixCls,f=a.id,i=a.overlayInnerStyle;return w.createElement("div",{className:"".concat(s,"-inner"),id:f,role:"tooltip",style:i},typeof u=="function"?u():u)},T=O,l=function(a,u){var s=a.overlayClassName,f=a.trigger,i=f===void 0?["hover"]:f,n=a.mouseEnterDelay,t=n===void 0?0:n,c=a.mouseLeaveDelay,y=c===void 0?.1:c,v=a.overlayStyle,_=a.prefixCls,b=_===void 0?"rc-tooltip":_,m=a.children,g=a.onVisibleChange,E=a.afterVisibleChange,o=a.transitionName,x=a.animation,C=a.placement,A=C===void 0?"right":C,D=a.align,I=D===void 0?{}:D,F=a.destroyTooltipOnHide,H=F===void 0?!1:F,te=a.defaultVisible,j=a.getTooltipContainer,G=a.overlayInnerStyle,X=Object(U.a)(a,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),J=Object(w.useRef)(null);Object(w.useImperativeHandle)(u,function(){return J.current});var B=Object(Z.a)({},X);"visible"in a&&(B.popupVisible=a.visible);var Q=function(){var Le=a.arrowContent,pe=Le===void 0?null:Le,Ce=a.overlay,Be=a.id;return[w.createElement("div",{className:"".concat(b,"-arrow"),key:"arrow"},pe),w.createElement(T,{key:"content",prefixCls:b,id:Be,overlay:Ce,overlayInnerStyle:G})]},ie=!1,oe=!1;if(typeof H=="boolean")ie=H;else if(H&&Object(ae.a)(H)==="object"){var Ee=H.keepParent;ie=Ee===!0,oe=Ee===!1}return w.createElement(P.a,Object.assign({popupClassName:s,prefixCls:b,popup:Q,action:i,builtinPlacements:S.a,popupPlacement:A,ref:J,popupAlign:I,getPopupContainer:j,onPopupVisibleChange:g,afterPopupVisibleChange:E,popupTransitionName:o,popupAnimation:x,defaultPopupVisible:te,destroyPopupOnHide:ie,autoDestroy:oe,mouseLeaveDelay:y,popupStyle:v,mouseEnterDelay:t},B),m)},p=Object(w.forwardRef)(l),h=We.a=p},OZM5:function($e,We,z){"use strict";z.d(We,"b",function(){return p}),z.d(We,"a",function(){return h}),z.d(We,"k",function(){return d}),z.d(We,"h",function(){return a}),z.d(We,"i",function(){return u}),z.d(We,"g",function(){return s}),z.d(We,"c",function(){return f}),z.d(We,"d",function(){return i}),z.d(We,"j",function(){return c}),z.d(We,"e",function(){return y}),z.d(We,"f",function(){return v});var ae=z("KQm4"),Z=z("U8pU"),U=z("Ff2n"),w=z("q1tI"),P=z.n(w),S=z("Kwbf"),O=z("WaYH"),T=.25,l=2;function p(_,b){var m=_.slice(),g=m.indexOf(b);return g>=0&&m.splice(g,1),m}function h(_,b){var m=_.slice();return m.indexOf(b)===-1&&m.push(b),m}function d(_){return _.split("-")}function a(_,b){return"".concat(_,"-").concat(b)}function u(_){return _&&_.type&&_.type.isTreeNode}function s(_,b){var m=[_],g=b[_];function E(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(x){var C=x.key,A=x.children;m.push(C),E(A)})}return E(g.children),m}function f(_,b){var m=_.clientY,g=b.selectHandle.getBoundingClientRect(),E=g.top,o=g.bottom,x=g.height,C=Math.max(x*T,l);return m<=E+C?-1:m>=o-C?1:0}function i(_,b){if(!_)return;var m=b.multiple;return m?_.slice():_.length?[_[0]]:_}var n=function(b){return b};function t(_,b){if(!_)return[];var m=b||{},g=m.processProps,E=g===void 0?n:g,o=Array.isArray(_)?_:[_];return o.map(function(x){var C=x.children,A=Object(U.a)(x,["children"]),D=t(C,b);return P.a.createElement(O.a,Object.assign({},E(A)),D)})}function c(_){if(!_)return null;var b;if(Array.isArray(_))b={checkedKeys:_,halfCheckedKeys:void 0};else if(Object(Z.a)(_)==="object")b={checkedKeys:_.checked||void 0,halfCheckedKeys:_.halfChecked||void 0};else return Object(S.a)(!1,"`checkedKeys` is not an array or an object"),null;return b}function y(_,b){var m=new Set;function g(E){if(m.has(E))return;var o=b[E];if(!o)return;m.add(E);var x=o.parent,C=o.node;if(C.disabled)return;x&&g(x.key)}return(_||[]).forEach(function(E){g(E)}),Object(ae.a)(m)}function v(_){var b={};return Object.keys(_).forEach(function(m){(m.startsWith("data-")||m.startsWith("aria-"))&&(b[m]=_[m])}),b}},"OkW/":function($e,We,z){},Ot1p:function($e,We,z){"use strict";var ae=z("2qtc"),Z=z("kLXV"),U=z("rAM+"),w=z("miYZ"),P=z("tsqr"),S=z("tJVT"),O=z("jrin"),T=z("q1tI"),l=z.n(T),p=z("VrN/"),h=z.n(p),d=z("bdgK"),a=z("p77/"),u=z("Bd2K"),s=z("ELLl"),f=z("19Vz"),i=z("lZu9"),n=z("+NIl"),t=z("kSUc"),c=z("9Bee"),y=function(we){var Ae=we.value,Oe=Ae===void 0?"":Ae,fe=we.className,ge=we.showTextOnly,_e=we.showLines,be=we.style,Ge=be===void 0?{}:be,qe=Object(T.useMemo)(function(){return""},[Oe]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:qe}}))},v=z("0Owb"),_=z("dejd"),b=z("C+DQ"),m=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function g(we){var Ae=we.onActionCallback,Oe=we.title,fe=we.icon,ge=we.actionName,_e=we.className,be=_e===void 0?"":_e,Ge=we.children;function qe(){Ae(ge)}return l.a.createElement("a",{title:Oe,className:be,onClick:qe},l.a.createElement("i",{className:"md-iconfont ".concat(fe)}),Ge)}var E=function(we){var Ae=we.watch,Oe=we.showNullButton,fe=we.onActionCallback,ge=we.fullScreen,_e=we.insertTemp,be=we.hidetoolBar,Ge=[].concat(m,[{title:"".concat(Ae?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ae?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!be&&Ge.map(function(qe,pt){return l.a.createElement("li",{key:pt},qe.actionName?l.a.createElement(g,Object(v.a)({},qe,{onActionCallback:fe})):l.a.createElement("span",{className:"v-line"}))}),Oe?l.a.createElement("li",null,l.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:fe},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,_e&&l.a.createElement("li",null,l.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(_e),onActionCallback:fe},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(g,{icon:"".concat(ge?"icon-shrink":"icon-enlarge"),title:ge?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:fe})))},o=z("M8RZ"),x=z("+L6B"),C=z("2/Rp"),A=z("y8nQ"),D=z("Vl3Y"),I=z("5NDa"),F=z("5rEg"),H={labelCol:{span:4},wrapperCol:{span:20}},te=function(we){var Ae=we.callback,Oe=we.onCancel;function fe(ge){Ae(ge)}return l.a.createElement(D.a,Object(v.a)({},H,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:fe}),l.a.createElement(D.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},l.a.createElement(F.a,null)),l.a.createElement(D.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},l.a.createElement(F.a,null)),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(C.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(C.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},j=z("7ahc"),G=z("HmJG"),X=z("BjJ7"),J=D.a.useForm,B={width:280,marginRight:10},Q={labelCol:{span:5},wrapperCol:{span:19}},ie=function(we){var Ae=we.callback,Oe=we.onCancel,fe=J(),ge=Object(S.a)(fe,1),_e=ge[0];function be(pt){Ae(pt)}function Ge(pt,Dt){_e.setFieldsValue({src:"/api/attachments/".concat(pt.id),type:Dt.type})}function qe(pt){var Dt=pt.target.files[0];Ee(Dt,Ge)}return l.a.createElement(D.a,Object(v.a)({form:_e},Q,{className:"upload-image-panel",onFinish:be}),l.a.createElement(D.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},l.a.createElement("div",{className:"flex-container"},l.a.createElement(D.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},l.a.createElement(F.a,{style:B})),l.a.createElement(oe,{onFileChange:qe}))),l.a.createElement(D.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},l.a.createElement(F.a,{style:{width:264}})),l.a.createElement(D.a.Item,{style:{textAlign:"right"}},l.a.createElement(C.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(C.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))};function oe(we){var Ae=we.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:Ae}))}function Ee(we,Ae){if(!we)throw new String("\u6CA1\u6709\u6587\u4EF6");var Oe=new FormData;Oe.append("editormd-image-file",we),Oe.append("file_param_name","editormd-image-file"),Oe.append("byxhr","true");var fe=new window.XMLHttpRequest;fe.withCredentials=!0,fe.addEventListener("load",function(ge){Ae(JSON.parse(ge.target.responseText),we)},!1),fe.addEventListener("error",function(ge){console.error(ge)},!1),fe.open("POST","".concat(X.a,"/api/attachments.json")),fe.send(Oe)}var ye=z("giR+"),Le=z("fyUT"),pe=z("7Kak"),Ce=z("9yH6"),Be=Ce.a.Group,Pe={margin:"0 8px"},ke=function(we){var Ae=we.callback,Oe=we.onCancel;function fe(ge){Ae(ge)}return l.a.createElement(D.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:fe},l.a.createElement("div",{className:"flex-container"},l.a.createElement("span",{style:Pe},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:Pe},"\u884C\u6570"),l.a.createElement(D.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(Le.a,null)),l.a.createElement("span",{style:Pe},"\u5217\u6570"),l.a.createElement(D.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(Le.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12}},l.a.createElement("span",{style:Pe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(D.a.Item,{name:"align"},l.a.createElement(Be,null,l.a.createElement(Ce.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(Ce.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(Ce.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(Ce.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(C.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(C.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},Ne=z("m3rI"),he="link",ue="upload-image",Ie="code-block",Ue="add-table",Ye="------------",ee={default:Ye,left:":".concat(Ye),center:":".concat(Ye,":"),right:"".concat(Ye,":")},M=z("9VGf"),N,$;function V(){}var Y=0,me=1e4,Re="\u2581",rt=`
|
|
|
**\u6A21\u677F\u6807\u9898**
|
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function De(we){return/^\d+$/.test(we)?"".concat(we,"px"):we}var Me=navigator.platform.toUpperCase().indexOf("MAC")>=0,Xe=Me?"Cmd":"Ctrl",tt=(N={},Object(O.a)(N,Xe+"-B","bold"),Object(O.a)(N,Xe+"-I","italic"),N),Ve=($={},Object(O.a)($,he,"\u6DFB\u52A0\u94FE\u63A5"),Object(O.a)($,Ie,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(O.a)($,ue,"\u6DFB\u52A0\u56FE\u7247"),Object(O.a)($,Ue,"\u6DFB\u52A0\u8868\u683C"),$),Ke=We.a=function(we){var Ae=we.defaultValue,Oe=Ae===void 0?"":Ae,fe=we.onChange,ge=we.width,_e=ge===void 0?"100%":ge,be=we.height,Ge=be===void 0?400:be,qe=we.miniToolbar,pt=qe===void 0?!1:qe,Dt=we.isFocus,jt=Dt===void 0?!1:Dt,Rt=we.watch,Lt=we.insertTemp,lt=we.mode,ft=lt===void 0?"markdown":lt,Qe=we.id,Te=Qe===void 0?"markdown-editor-id":Qe,je=we.showResizeBar,dt=je===void 0?!1:je,Ze=we.noStorage,Tt=Ze===void 0?!1:Ze,Ct=we.showNullButton,ot=Ct===void 0?!1:Ct,gt=we.hidetoolBar,kt=gt===void 0?!1:gt,Kt=we.fullScreen,Gt=Kt===void 0?!1:Kt,Se=we.onBlur,de=we.onCMBeforeChange,W=we.onFullScreen,q=we.className,ne=q===void 0?"":q,se=we.disablePaste,xe=se===void 0?!1:se,He=we.placeholder,Je=He===void 0?"":He,Et=we.values,St=Et===void 0?"":Et,nt=Object(T.useState)(null),xt=Object(S.a)(nt,2),ut=xt[0],_t=xt[1],Qt=Object(T.useState)(Oe),Xt=Object(S.a)(Qt,2),Mt=Xt[0],mt=Xt[1],Cn=Object(T.useState)(Rt),En=Object(S.a)(Cn,2),Jt=En[0],un=En[1],Jn=Object(T.useState)(Gt),ar=Object(S.a)(Jn,2),mn=ar[0],gr=ar[1],Rr=Object(T.useState)(""),vn=Object(S.a)(Rr,2),An=vn[0],_r=vn[1],Zr=Object(T.useState)(0),jr=Object(S.a)(Zr,2),tr=jr[0],ur=jr[1],yi=Object(T.useState)(Ge),xr=Object(S.a)(yi,2),Cr=xr[0],Sr=xr[1],Vr=Object(T.useState)(!1),Mr=Object(S.a)(Vr,2),Si=Mr[0],Or=Mr[1],ei=Object(T.useRef)(),ri=Object(T.useRef)(),Xr=Object(T.useRef)(),ui=Object(T.useRef)();Object(T.useEffect)(function(){mt(St),ut==null||ut.setValue(St)},[St]),Object(T.useEffect)(function(){W==null||W(mn)},[mn]),Object(T.useEffect)(function(){if(ei.current){var tn=h.a.fromTextArea(ei.current,{mode:ft,lineNumbers:!pt,lineWrapping:!0,value:Oe,autoCloseTags:!0,autoCloseBrackets:!0});jt&&tn.focus();function xn(fn,Zn){if(xe){Zn.preventDefault();return}var nr=Zn.clipboardData;if(nr){var cr=nr.types.toString(),hr=nr.items,pr=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];if(cr==="Files"||nr.types.indexOf("Files")>-1){if(Zn.preventDefault(),ft=="stex")return;try{var kr,oi=hr[1];((kr=hr[0])===null||kr===void 0?void 0:kr.kind)==="file"&&(oi=hr[0]);var er=oi.getAsFile(),_i=er.name.split(".").pop();Ee(er,function(Fr){if(Fr.id){var Ti,fi,Pi;(er==null||((Ti=er.type)===null||Ti===void 0)?void 0:Ti.indexOf("image"))>-1?tn.replaceSelection(".concat(Fr.content_type,")")):(er==null||((fi=er.type)===null||fi===void 0)?void 0:fi.indexOf("video"))>-1?tn.replaceSelection('<video width="100%" controls src="'.concat(Ne.a.API_SERVER,"/api/attachments/").concat(Fr.id,'"></video>')):(er==null||((Pi=er.type)===null||Pi===void 0)?void 0:Pi.indexOf("pdf"))>-1?tn.replaceSelection('<a href="'.concat(Ne.a.API_SERVER,"/api/attachments/").concat(Fr.id,"?type=").concat(er.type,'&disposition=inline" target="_blank">').concat(er.name,"</a>")):pr.includes(_i)?tn.replaceSelection('<a href="'.concat(Ne.a.API_SERVER,"/api/attachments/").concat(Fr.id,'?type=office&disposition=inline" target="_blank">').concat(er.name,"</a>")):tn.replaceSelection("[".concat(er.name,"](").concat(Ne.a.API_SERVER,"/api/attachments/").concat(Fr.id,"?type=").concat(Fr.content_type,")"))}else(Fr==null?void 0:Fr.status)===401&&(document.location.href="/user/login")})}catch(Fr){P.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return tn.on("paste",xn),_t(tn),function(){tn.off("paste",xn)}}},[]);var Ri=Object(T.useCallback)(function(){if(ri.current)try{}catch(tn){console.log(tn,"---- to set md editor body height")}},[Cr,ri,mn]);Object(T.useEffect)(function(){function tn(){var fn=new d.default(function(Zn){var nr=Object(U.a)(Zn),cr;try{for(nr.s();!(cr=nr.n()).done;){var hr=cr.value;(hr.target.offsetHeight>0||hr.target.offsetWidth>0)&&(Ri(),ut.setSize("100%","100%"),ut.refresh())}}catch(pr){nr.e(pr)}finally{nr.f()}});return fn.observe(ei.current.parentElement),fn}if(ut){var xn=tn();return function(){xn.unobserve(ei.current.parentElement)}}},[ut,Ri]),Object(T.useEffect)(function(){if(ut){for(var tn=[],xn=function(){var hr=Zn[fn];nr=Object(S.a)(hr,2);var pr=nr[0],kr=nr[1],oi=Object(O.a)({},pr,function(){bi(kr)});tn.push(oi),ut.addKeyMap(oi)},fn=0,Zn=Object.entries(tt);fn<Zn.length;fn++){var nr;xn()}return function(){var cr=Object(U.a)(tn),hr;try{for(cr.s();!(hr=cr.n()).done;){var pr=hr.value;ut.removeKeyMap(pr)}}catch(kr){cr.e(kr)}finally{cr.f()}}}},[ut]),Object(T.useEffect)(function(){Gt!==mn&&gr(Gt)},[Gt]),Object(M.a)(function(){if(!Tt&&tr>0){var tn=new Date().getTime(),xn=window.sessionStorage.getItem(Te);tn>=tr+me&&(!xn||xn!==Mt)&&(window.sessionStorage.setItem(Te,Mt),Or(!0))}},me),Object(T.useEffect)(function(){un(Rt)},[ut,Rt]),Object(T.useEffect)(function(){ut&&(jt&&ut.focus())},[ut,jt]),Object(T.useEffect)(function(){if(Jt&&ut){var tn=ut.getScrollerElement();function xn(fn){var Zn=fn.target;if(ui.current){var nr=Zn.scrollTop/Zn.scrollHeight;ui.current.scrollTop=ui.current.scrollHeight*nr}}return tn.addEventListener("scroll",xn),function(){tn.removeEventListener("scroll",xn)}}},[ut,Jt]),Object(T.useEffect)(function(){if(ut&&de){function tn(xn,fn){de(xn,fn)}return ut.on("beforeChange",tn),function(){ut.off("beforeChange",tn)}}},[ut,de]),Object(T.useEffect)(function(){if(ut&&Se){function tn(){Se(ut.getValue())}return ut.on("blur",tn),function(){ut.off("blur",tn)}}},[ut,Se]),Object(T.useEffect)(function(){if(ut){function tn(xn){var fn=xn.getValue();mt(fn),ur(new Date().getTime()),xn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),fe&&fe(fn)}return ut.on("change",tn),function(){ut.off("change",tn)}}},[ut,fe]),Object(T.useEffect)(function(){ut&&(Oe==null?(ut.setValue(""),mt("")):Oe!==ut.getValue()&&(ut.setValue(Oe),mt(Oe),ut.setCursor(ut.lineCount(),0)))},[ut,Oe]);var bi=Object(T.useCallback)(function(tn){var xn=ut.getCursor(),fn=ut.getSelection(),Zn=fn.split(`
|
|
|
`);switch(tn){case"bold":return ut.replaceSelection("**"+fn+"**"),fn===""&&ut.setCursor(xn.line,xn.ch+2),ut.focus();case"italic":return ut.replaceSelection("*"+fn+"*"),fn===""&&ut.setCursor(xn.line,xn.ch+1),ut.focus();case"code":return ut.replaceSelection("`"+fn+"`"),fn===""&&ut.setCursor(xn.line,xn.ch+1),ut.focus();case"inline-latex":return ut.replaceSelection("`$$"+fn+"$$`"),fn===""&&ut.setCursor(xn.line,xn.ch+3),ut.focus();case"latex":return ut.replaceSelection("```latex\n"+fn+"\n```"),ut.setCursor(xn.line+1,fn.length+1),ut.focus();case"line-break":return ut.replaceSelection(`<br/>
|
|
|
`),ut.focus();case"list-ul":return fn===""?ut.replaceSelection("- "+fn):ut.replaceSelection(Zn.map(function(nr){return nr===""?"":"- ".concat(nr)}).join(`
|
|
|
`)),ut.focus();case"list-ol":return fn===""?ut.replaceSelection("1. "+fn):ut.replaceSelection(Zn.map(function(nr,cr){return nr===""?"":"".concat(cr+1,". ").concat(nr)}).join(`
|
|
|
`)),ut.focus();case"add-null-ch":return fn===""&&ut.setCursor(xn.line,xn.ch+1),ut.replaceSelection(Re),ut.focus();case"inster-template-1":return fn===""&&ut.setCursor(xn.line,xn.ch),ut.replaceSelection(rt),ut.focus();case"eraser":return ut.setValue(""),ut.focus();case"trigger-watch":return un(!Jt),ut.focus();case"trigger-full-screen":return gr(!mn),ut.focus();case he:_r(he);return;case Ie:_r(Ie);return;case ue:_r(ue);return;case Ue:_r(Ue);return;default:throw new Error}},[ut,Jt,mn]),ii=Object(T.useCallback)(function(tn){_r("");switch(An){case he:var xn=tn.title,fn=tn.link;return ut.replaceSelection("[".concat(xn,"](").concat(fn,")")),ut.focus();case Ie:var Zn=tn.language,nr=tn.content;return ut.replaceSelection(["```"+Zn,nr,"```"].join(`
|
|
|
`)),ut.focus();case ue:var cr=tn.src,hr=tn.alt;return ut.replaceSelection(".concat(cr,' "').concat(hr,'" )')),ut.focus();case Ue:for(var pr=tn.row,kr=tn.col,oi=tn.align,er=`
|
|
|
`,_i=0;_i<pr;_i++){for(var Fr=[],Ti=[],fi=0;fi<kr;fi++)_i===1&&Ti.push(ee[oi]),Fr.push(" ");_i===1&&(er+="| ".concat(Ti.join(" | "),` |
|
|
|
`)),er+="| ".concat(Fr.join(kr===1?"":" | "),` |
|
|
|
`)}return ut.replaceSelection(er+`
|
|
|
`),ut.focus();default:throw new Error}},[ut,An]),yr=Object(T.useMemo)(function(){switch(An){case he:return l.a.createElement(te,{callback:ii,onCancel:or});case Ie:return l.a.createElement(j.b,{callback:ii,onCancel:or});case ue:return l.a.createElement(ie,{callback:ii,onCancel:or});case Ue:return l.a.createElement(ke,{callback:ii,onCancel:or});default:return null}},[An]);function or(){_r("")}Object(T.useEffect)(function(){if(Xr.current){var tn=Xr.current,xn=!1,fn=0;function Zn(hr){xn=!0,fn=hr.pageY}function nr(){xn=!1}function cr(hr){if(xn){var pr=hr.pageY-fn;pr<0&&(pr=0),pr>300&&(pr=300);var kr=Ge+pr+"px";Sr(kr)}}return tn.addEventListener("mousedown",Zn),document.addEventListener("mousemove",cr),document.addEventListener("mouseup",nr),function(){tn.removeEventListener("mousedown",Zn),document.removeEventListener("mousemove",cr),document.removeEventListener("mouseup",nr)}}},[ut,Xr]),Object(T.useEffect)(function(){Sr(Ge)},[Ge]);var ai=De(_e),Di=De(Cr),Ni={width:ai,height:Di},wi=Object(T.useMemo)(function(){if(tr){var tn=new Date(tr),xn=tn.getHours(),fn=tn.getMinutes(),Zn=tn.getSeconds();return xn=xn<10?"0"+xn:xn,fn=fn<10?"0"+fn:fn,Zn=Zn<10?"0"+Zn:Zn,"".concat(xn,":").concat(fn,":").concat(Zn)}return 0},[tr]);function ga(){window.sessionStorage.removeItem(Te),Or(!1),ur(0)}function la(){Or(!1),ur(0),ut.setValue(window.sessionStorage.getItem(Te))}return l.a.createElement(T.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:ri},l.a.createElement("div",{className:"markdown-editor-container ".concat(ne," ").concat(Jt?"on-preview":""," ").concat(pt?"mini":""," ").concat(mn?"full-screen":""),style:Ni},l.a.createElement(E,{insertTemp:Lt,watch:Jt,fullScreen:mn,showNullButton:ot,onActionCallback:bi,hidetoolBar:kt}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:ei,placeholder:Je})),Jt?l.a.createElement("div",{ref:ui,className:"preview-container"},ft==="stex"&&l.a.createElement(y,{value:Mt}),ft!=="stex"&&l.a.createElement(c.a,{value:Mt})):null))),dt?l.a.createElement("a",{ref:Xr,className:"editor-resize"}):null,l.a.createElement(o.a,null,Ve[An]?l.a.createElement(Z.a,{centered:!0,title:Ve[An],visible:!0,onCancel:or,footer:null},yr):null))}},P5Jw:function($e,We,z){"use strict";var ae=z("rHrb"),Z=ae.CopyToClipboard;Z.CopyToClipboard=Z,$e.exports=Z},PD8m:function($e,We){$e.exports={name:"memoryStorage",read:ae,write:Z,each:U,remove:w,clearAll:P};var z={};function ae(S){return z[S]}function Z(S,O){z[S]=O}function U(S){for(var O in z)z.hasOwnProperty(O)&&S(z[O],O)}function w(S){delete z[S]}function P(S){z={}}},RELg:function($e,We,z){var ae=z("MFOe"),Z=ae.Global;$e.exports={name:"oldIE-userDataStorage",write:O,read:T,each:l,remove:p,clearAll:h};var U="storejs",w=Z.document,P=u(),S=(Z.navigator?Z.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function O(s,f){if(S)return;var i=a(s);P(function(n){n.setAttribute(i,f),n.save(U)})}function T(s){if(S)return;var f=a(s),i=null;return P(function(n){i=n.getAttribute(f)}),i}function l(s){P(function(f){for(var i=f.XMLDocument.documentElement.attributes,n=i.length-1;n>=0;n--){var t=i[n];s(f.getAttribute(t.name),t.name)}})}function p(s){var f=a(s);P(function(i){i.removeAttribute(f),i.save(U)})}function h(){P(function(s){var f=s.XMLDocument.documentElement.attributes;s.load(U);for(var i=f.length-1;i>=0;i--)s.removeAttribute(f[i].name);s.save(U)})}var d=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function a(s){return s.replace(/^\d/,"___$&").replace(d,"___")}function u(){if(!w||!w.documentElement||!w.documentElement.addBehavior)return null;var s="script",f,i,n;try{i=new ActiveXObject("htmlfile"),i.open(),i.write("<"+s+">document.w=window</"+s+'><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 c=[].slice.call(arguments,0);c.unshift(n),f.appendChild(n),n.addBehavior("#default#userData"),n.load(U),t.apply(this,c),f.removeChild(n);return}}},RpDr:function($e,We,z){"use strict";z.d(We,"a",function(){return _}),z.d(We,"c",function(){return g});var ae=z("+L6B"),Z=z("2/Rp"),U=z("tJVT"),w=z("k1fw"),P=z("jrin"),S=z("5NDa"),O=z("5rEg"),T=z("q1tI"),l=z.n(T),p=z("8Skl"),h=z("y3Kf"),d=z("bdLU"),a=z("J66h"),u=z.n(a),s=z("++UQ"),f=z.n(s),i=z("IxHN"),n=z("9Bee"),t=z("1vsH"),c,y=O.a.TextArea,v={visible:!1,tabIndex:"0"},_=(c={},Object(P.a)(c,d.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(P.a)(c,d.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(P.a)(c,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(P.a)(c,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(P.a)(c,4,"\u7F16\u8BD1\u5931\u8D25"),Object(P.a)(c,5,"\u6267\u884C\u5931\u8D25"),c),b;(function(o){o[o.SET_VISIBLE=0]="SET_VISIBLE",o[o.SET_TABINDEX=1]="SET_TABINDEX"})(b||(b={}));function m(o,x){switch(x.type){case b.SET_VISIBLE:return Object(w.a)(Object(w.a)({},o),{},{visible:x.payload});case b.SET_TABINDEX:return Object(w.a)(Object(w.a)({},o),{},{tabIndex:x.payload});default:throw new Error}}function g(o){var x=o.status,C=o.error_msg,A=o.output,D=o.input,I=o.expected_output,F=o.is_file,H=o.input_file_url,te=o.output_file_url,j=o.expected_output_file_url,G=null,X={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(x){case d.a.NOMATCH:G=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!F&&l.a.createElement(n.a,{value:D,style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(H,D)}},D)),l.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!F&&l.a.createElement(n.a,{value:A&&a.Base64.decode(A)||"",style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(te,A)}},A)),l.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!F&&l.a.createElement(n.a,{value:I&&a.Base64.decode(I)||"",style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(j,I)}},I)));break;case d.a.EXECUTEFAILURE:G=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!F&&l.a.createElement(n.a,{value:D,style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(H,D)}},D)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},a.Base64.decode(C)));break;case d.a.COMPILEFAILURE:G=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!F&&l.a.createElement(n.a,{value:D,style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(H,D)}},D)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},a.Base64.decode(C)));break;case d.a.PODFAILURE:G=l.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case d.a.TIMEOUT:G=l.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return l.a.createElement(l.a.Fragment,null," ",G," ")}function E(o){var x=o.status,C=o.error_msg,A=o.execute_time,D=o.output,I=o.input,F=o.expected_output,H=o.is_file,te=o.input_file_url,j=o.output_file_url,G=o.expected_output_file_url,X=null;switch(x){case d.a.OK:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",A),l.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),l.a.createElement("pre",null,a.Base64.decode(D)));break;case d.a.NOMATCH:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u8F93\u5165\uFF1A",l.a.createElement("pre",null,I)),l.a.createElement("p",null,"\u8F93\u51FA\uFF1A",D&&a.Base64.decode(D)),l.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",F&&a.Base64.decode(F)));break;case d.a.EXECUTEFAILURE:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",l.a.createElement("pre",null,I)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},a.Base64.decode(C)));break;case d.a.COMPILEFAILURE:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",l.a.createElement("pre",null,I)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},a.Base64.decode(C)));break;case d.a.PODFAILURE:X=l.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case d.a.TIMEOUT:X=l.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return l.a.createElement(l.a.Fragment,null," ",X," ")}We.b=function(o){var x=o.id,C=o.input,A=o.debuging,D=o.submitting,I=o.executingMessage,F=o.debugResult,H=o.onChangeInput,te=o.onDebugCode,j=o.onSubmitCode,G=Object(T.useReducer)(m,v),X=Object(U.a)(G,2),J=X[0],B=X[1],Q=J.visible,ie=J.tabIndex;Object(T.useEffect)(function(){B({type:b.SET_VISIBLE,payload:!1})},[x]);function oe(pe){var Ce=pe.target.id;B({type:b.SET_TABINDEX,payload:Ce})}function Ee(){B({type:b.SET_VISIBLE,payload:!Q})}var ye=Object(T.useMemo)(function(){if(F){var pe=F.status;return l.a.createElement(l.a.Fragment,null,E(F))}return null},[F]);function Le(){B({type:b.SET_VISIBLE,payload:!0}),B({type:b.SET_TABINDEX,payload:"1"}),te()}return l.a.createElement("div",{className:"test-case-panel"},l.a.createElement("div",{className:"test-case-panel-body ".concat(Q?"active":"")},l.a.createElement("ul",{className:"s-navs"},l.a.createElement("li",null,l.a.createElement("a",{className:ie==="0"?"active":"",id:"0",onClick:oe},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),l.a.createElement("li",null,l.a.createElement("a",{className:ie==="1"?"active":"",id:"1",onClick:oe},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),l.a.createElement("div",{className:"tab-panel-body ".concat(ie==="0"?"":"hide")},l.a.createElement(y,{placeholder:"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D",value:C,onChange:H})),l.a.createElement("div",{className:"tab-panel-body ".concat(ie==="1"?"":"hide")},A?l.a.createElement(i.a,{message:I}):F?l.a.createElement("section",{style:{height:200}}," ",ye," "):l.a.createElement("p",{className:"tip"},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D"))),l.a.createElement("a",{className:"btn-collapse ".concat(Q?"up":""),onClick:Ee},Q?l.a.createElement(p.a,null):l.a.createElement(h.a,null)),l.a.createElement("footer",{className:"footer"},l.a.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),l.a.createElement("div",{className:"flex-container"},l.a.createElement(Z.a,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),l.a.createElement(Z.a,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),l.a.createElement(Z.a,{className:"btn-green",type:"ghost",loading:A,onClick:Le},"\u8C03\u8BD5\u4EE3\u7801"),l.a.createElement(Z.a,{type:"primary",loading:D,disabled:D,onClick:function(){B({type:b.SET_VISIBLE,payload:!1}),j()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},"S/kP":function($e,We,z){$e.exports=z.p+"static/time.a3dc82f3.svg"},"SA+Z":function($e,We,z){var ae=z("wTVA"),Z=z("EbDI"),U=z("ZhPi"),w=z("wkBT");function P(S){return ae(S)||Z(S)||U(S)||w()}$e.exports=P,$e.exports.__esModule=!0,$e.exports.default=$e.exports},SJMd:function($e,We){/**
|
|
|
* @license
|
|
|
* Copyright (C) 2006 Google Inc.
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
* You may obtain a copy of the License at
|
|
|
*
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
*
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
* See the License for the specific language governing permissions and
|
|
|
* limitations under the License.
|
|
|
*/var z,ae,Z,U=!1,w,P;window.PR_SHOULD_USE_CONTINUATION=!0;var S,O;(function(){var T=window,l=["break,continue,do,else,for,if,return,while"],p=[l,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],h=[p,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],d=[h,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],a=[h,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],u=[h,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],s="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",f=[h,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],i="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",n=[l,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],t=[l,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],c=[l,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],y=[d,u,a,f,i,n,t,c],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,_="str",b="kwd",m="com",g="typ",E="lit",o="pun",x="pln",C="tag",A="dec",D="src",I="atn",F="atv",H="nocode",te="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function j(ue){for(var Ie=0,Ue=!1,Ye=!1,ee=0,M=ue.length;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(De){var Me=De.charCodeAt(0);if(Me!==92)return Me;var Xe=De.charAt(1);return Me=$[Xe],Me||("0"<=Xe&&Xe<="7"?parseInt(De.substring(1),8):Xe==="u"||Xe==="x"?parseInt(De.substring(2),16):De.charCodeAt(1))}function Y(De){if(De<32)return(De<16?"\\x0":"\\x")+De.toString(16);var Me=String.fromCharCode(De);return Me==="\\"||Me==="-"||Me==="]"||Me==="^"?"\\"+Me:Me}function me(De){var Me=De.substring(1,De.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=Me[0]==="^",Ve=["["];tt&&Ve.push("^");for(var Ke=tt?1:0,we=Me.length;Ke<we;++Ke){var Ae=Me[Ke];if(/\\[bdsw]/i.test(Ae))Ve.push(Ae);else{var Oe=V(Ae),fe;Ke+2<we&&Me[Ke+1]==="-"?(fe=V(Me[Ke+2]),Ke+=2):fe=Oe,Xe.push([Oe,fe]),fe<65||Oe>122||(fe<65||Oe>90||Xe.push([Math.max(65,Oe)|32,Math.min(fe,90)|32]),fe<97||Oe>122||Xe.push([Math.max(97,Oe)&~32,Math.min(fe,122)&~32]))}}Xe.sort(function(Ge,qe){return Ge[0]-qe[0]||qe[1]-Ge[1]});for(var ge=[],_e=[],Ke=0;Ke<Xe.length;++Ke){var be=Xe[Ke];be[0]<=_e[1]+1?_e[1]=Math.max(_e[1],be[1]):ge.push(_e=be)}for(var Ke=0;Ke<ge.length;++Ke){var be=ge[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(De){for(var Me=De.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Xe=Me.length,tt=[],Ve=0,Ke=0;Ve<Xe;++Ve){var we=Me[Ve];if(we==="(")++Ke;else if(we.charAt(0)==="\\"){var Ae=+we.substring(1);Ae&&(Ae<=Ke?tt[Ae]=-1:Me[Ve]=Y(Ae))}}for(var Ve=1;Ve<tt.length;++Ve)tt[Ve]===-1&&(tt[Ve]=++Ie);for(var Ve=0,Ke=0;Ve<Xe;++Ve){var we=Me[Ve];if(we==="(")++Ke,tt[Ke]||(Me[Ve]="(?:");else if(we.charAt(0)==="\\"){var Ae=+we.substring(1);Ae&&Ae<=Ke&&(Me[Ve]="\\"+tt[Ae])}}for(var Ve=0;Ve<Xe;++Ve)Me[Ve]==="^"&&Me[Ve+1]!=="^"&&(Me[Ve]="");if(De.ignoreCase&&Ue)for(var Ve=0;Ve<Xe;++Ve){var we=Me[Ve],Oe=we.charAt(0);we.length>=2&&Oe==="["?Me[Ve]=me(we):Oe!=="\\"&&(Me[Ve]=we.replace(/[a-zA-Z]/g,function(_e){var be=_e.charCodeAt(0);return"["+String.fromCharCode(be&~32,be|32)+"]"}))}return Me.join("")}for(var rt=[],ee=0,M=ue.length;ee<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,Ie){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&&(Ie?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,Ie,Ue,Ye,ee){if(!Ue)return;var M={sourceNode:ue,pre:1,langExtension:null,numberLines:null,sourceCode:Ue,spans:null,basePos:Ie,decorations:null};Ye(M),ee.push.apply(ee,M.decorations)}var J=/\S/;function B(ue){for(var Ie=void 0,Ue=ue.firstChild;Ue;Ue=Ue.nextSibling){var Ye=Ue.nodeType;Ie=Ye===1?Ie?ue:Ue:Ye===3&&J.test(Ue.nodeValue)?ue:Ie}return Ie===ue?void 0:Ie}function Q(ue,Ie){var Ue={},Ye;(function(){for(var N=ue.concat(Ie),$=[],V={},Y=0,me=N.length;Y<me;++Y){var Re=N[Y],rt=Re[3];if(rt)for(var De=rt.length;--De>=0;)Ue[rt.charAt(De)]=Re;var Me=Re[1],Xe=""+Me;V.hasOwnProperty(Xe)||($.push(Me),V[Xe]=null)}$.push(/[\0-\uffff]/),Ye=j($)})();var ee=Ie.length,M=function(N){for(var $=N.sourceCode,V=N.basePos,Y=N.sourceNode,me=[V,x],Re=0,rt=$.match(Ye)||[],De={},Me=0,Xe=rt.length;Me<Xe;++Me){var tt=rt[Me],Ve=De[tt],Ke=void 0,we;if(typeof Ve=="string")we=!1;else{var Ae=Ue[tt.charAt(0)];if(Ae)Ke=tt.match(Ae[1]),Ve=Ae[0];else{for(var Oe=0;Oe<ee;++Oe)if(Ae=Ie[Oe],Ke=tt.match(Ae[1]),Ke){Ve=Ae[0];break}Ke||(Ve=x)}we=Ve.length>=5&&Ve.substring(0,5)==="lang-",we&&!(Ke&&typeof Ke[1]=="string")&&(we=!1,Ve=D),we||(De[tt]=Ve)}var fe=Re;if(Re+=tt.length,!we)me.push(V+fe,Ve);else{var ge=Ke[1],_e=tt.indexOf(ge),be=_e+ge.length;Ke[2]&&(be=tt.length-Ke[2].length,_e=be-ge.length);var Ge=Ve.substring(5);X(Y,V+fe,tt.substring(0,_e),M,me),X(Y,V+fe+_e,ge,Ce(Ge,ge),me),X(Y,V+fe+be,tt.substring(be),M,me)}}N.decorations=me};return M}function ie(ue){var Ie=[],Ue=[];ue.tripleQuotedStrings?Ie.push([_,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ue.multiLineStrings?Ie.push([_,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ie.push([_,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ue.verbatimStrings&&Ue.push([_,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ye=ue.hashComments;Ye&&(ue.cStyleComments?(Ye>1?Ie.push([m,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ie.push([m,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ue.push([_,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ie.push([m,/^#[^\r\n]*/,null,"#"])),ue.cStyleComments&&(Ue.push([m,/^\/\/[^\r\n]*/,null]),Ue.push([m,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ee=ue.regexLiterals;if(ee){var M=ee>1?"":`
|
|
|
\r`,N=M?".":"[\\S\\s]",$="/(?=[^/*"+M+"])(?:[^/\\x5B\\x5C"+M+"]|\\x5C"+N+"|\\x5B(?:[^\\x5C\\x5D"+M+"]|\\x5C"+N+")*(?:\\x5D|$))+/";Ue.push(["lang-regex",RegExp("^"+te+"("+$+")")])}var V=ue.types;V&&Ue.push([g,V]);var Y=(""+ue.keywords).replace(/^ | $/g,"");Y.length&&Ue.push([b,new RegExp("^(?:"+Y.replace(/[\s,]+/g,"|")+")\\b"),null]),Ie.push([x,/^\s+/,null,` \r
|
|
|
\xA0`]);var me="^.[^\\s\\w.$@'\"`/\\\\]*";return ue.regexLiterals&&(me+="(?!s*/)"),Ue.push([E,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[x,/^[a-z_$][a-z_$@0-9]*/i,null],[E,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[x,/^\\[\s\S]?/,null],[o,new RegExp(me),null]),Q(Ie,Ue)}var oe=ie({keywords:y,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ee(ue,Ie,Ue){for(var Ye=/(?:^|\s)nocode(?:\s|$)/,ee=/\r\n?|\n/,M=ue.ownerDocument,N=M.createElement("li");ue.firstChild;)N.appendChild(ue.firstChild);var $=[N];function V(Me){var Xe=Me.nodeType;if(Xe==1&&!Ye.test(Me.className))if(Me.nodeName==="br")Y(Me),Me.parentNode&&Me.parentNode.removeChild(Me);else for(var tt=Me.firstChild;tt;tt=tt.nextSibling)V(tt);else if((Xe==3||Xe==4)&&Ue){var Ve=Me.nodeValue,Ke=Ve.match(ee);if(Ke){var we=Ve.substring(0,Ke.index);Me.nodeValue=we;var Ae=Ve.substring(Ke.index+Ke[0].length);if(Ae){var Oe=Me.parentNode;Oe.insertBefore(M.createTextNode(Ae),Me.nextSibling)}Y(Me),we||Me.parentNode.removeChild(Me)}}}function Y(Me){for(;!Me.nextSibling;)if(Me=Me.parentNode,!Me)return;function Xe(Ke,we){var Ae=we?Ke.cloneNode(!1):Ke,Oe=Ke.parentNode;if(Oe){var fe=Xe(Oe,1),ge=Ke.nextSibling;fe.appendChild(Ae);for(var _e=ge;_e;_e=ge)ge=_e.nextSibling,fe.appendChild(_e)}return Ae}for(var tt=Xe(Me.nextSibling,0),Ve;(Ve=tt.parentNode)&&Ve.nodeType===1;)tt=Ve;$.push(tt)}for(var me=0;me<$.length;++me)V($[me]);Ie===(Ie|0)&&$[0].setAttribute("value",Ie);var Re=M.createElement("ol");Re.className="linenums";for(var rt=Math.max(0,Ie-1|0)||0,me=0,De=$.length;me<De;++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 Ie=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ie=Ie&&+Ie[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,De;for(De=rt=0;De<me;)Y[De]!==Y[De+2]?(Y[rt++]=Y[De++],Y[rt++]=Y[De++]):De+=2;for(me=rt,De=rt=0;De<me;){for(var Me=Y[De],Xe=Y[De+1],tt=De+2;tt+2<=me&&Y[tt+1]===Xe;)tt+=2;Y[rt++]=Me,Y[rt++]=Xe,De=tt}me=Y.length=rt;var Ve=ue.sourceNode,Ke="";Ve&&(Ke=Ve.style.display,Ve.style.display="none");try{for(var we=null;V<$;){var Ae=N[V],Oe=N[V+2]||ee,fe=Y[Re+2]||ee,tt=Math.min(Oe,fe),ge=N[V+1],_e;if(ge.nodeType!==1&&(_e=Ye.substring(M,tt))){Ie&&(_e=_e.replace(Ue,"\r")),ge.nodeValue=_e;var be=ge.ownerDocument,Ge=be.createElement("span");Ge.className=Y[Re+1];var qe=ge.parentNode;qe.replaceChild(Ge,ge),Ge.appendChild(ge),M<Oe&&(N[V+1]=ge=be.createTextNode(Ye.substring(tt,Oe)),qe.insertBefore(ge,Ge.nextSibling))}M=tt,M>=Oe&&(V+=2),M>=fe&&(Re+=2)}}finally{Ve&&(Ve.style.display=Ke)}}var Le={};function pe(ue,Ie){for(var Ue=Ie.length;--Ue>=0;){var Ye=Ie[Ue];Le.hasOwnProperty(Ye)?T.console&&console.warn("cannot override language handler %s",Ye):Le[Ye]=ue}}function Ce(ue,Ie){return ue&&Le.hasOwnProperty(ue)||(ue=/^\s*</.test(Ie)?"default-markup":"default-code"),Le[ue]}pe(oe,["default-code"]),pe(Q([],[[x,/^[^<?]+/],[A,/^<!\w[^>]*(?:>|$)/],[m,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[o,/^(?:<[%?]|[%?]>)/],["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,`"'`]],[[C,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[o,/^[=<>\/]+/],["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:v}),["c","cc","cpp","cxx","cyc","m"]),pe(ie({keywords:"null,true,false"}),["json"]),pe(ie({keywords:u,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:v}),["cs"]),pe(ie({keywords:a,cStyleComments:!0}),["java"]),pe(ie({keywords:c,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 Be(ue){var Ie=ue.langExtension;try{var Ue=G(ue.sourceNode,ue.pre),Ye=Ue.sourceCode;ue.sourceCode=Ye,ue.spans=Ue.spans,ue.basePos=0,Ce(Ie,Ye)(ue),ye(ue)}catch(ee){T.console&&console.log(ee&&ee.stack||ee)}}function Pe(ue,Ie,Ue){var Ye=Ue||!1,ee=Ie||null,M=document.createElement("div");M.innerHTML="<pre>"+ue+"</pre>",M=M.firstChild,Ye&&Ee(M,Ye,!0);var N={langExtension:ee,numberLines:Ye,sourceNode:M,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Be(N),M.innerHTML}function ke(ue,Ie){var Ue=Ie||document.body,Ye=Ue.ownerDocument||document;function ee(Ae){return Ue.getElementsByTagName(Ae)}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)/,De=/\bprettyprint\b/,Me=/\bprettyprinted\b/,Xe=/pre|xmp/i,tt=/^code$/i,Ve=/^(?:pre|code|xmp)$/i,Ke={};function we(){for(var Ae=T.PR_SHOULD_USE_CONTINUATION?me.now()+250:Infinity;Re<N.length&&me.now()<Ae;Re++){for(var Oe=N[Re],fe=Ke,ge=Oe;ge=ge.previousSibling;){var _e=ge.nodeType,be=(_e===7||_e===8)&&ge.nodeValue;if(be?!/^\??prettify\b/.test(be):_e!==3||/\S/.test(ge.nodeValue))break;if(be){fe={},be.replace(/\b(\w+)=([\w:.%+-]+)/g,function(dt,Ze,Tt){fe[Ze]=Tt});break}}var Ge=Oe.className;if((fe!==Ke||De.test(Ge))&&!Me.test(Ge)){for(var qe=!1,pt=Oe.parentNode;pt;pt=pt.parentNode){var Dt=pt.tagName;if(Ve.test(Dt)&&pt.className&&De.test(pt.className)){qe=!0;break}}if(!qe){Oe.className+=" prettyprinted";var jt=fe.lang;if(!jt){jt=Ge.match(rt);var Rt;!jt&&(Rt=B(Oe))&&tt.test(Rt.tagName)&&(jt=Rt.className.match(rt)),jt&&(jt=jt[1])}var Lt;if(Xe.test(Oe.tagName))Lt=1;else{var lt=Oe.currentStyle,ft=Ye.defaultView,Qe=lt?lt.whiteSpace:ft&&ft.getComputedStyle?ft.getComputedStyle(Oe,null).getPropertyValue("white-space"):0;Lt=Qe&&Qe.substring(0,3)==="pre"}var Te=fe.linenums;(Te=Te==="true"||+Te)||(Te=Ge.match(/\blinenums\b(?::(\d+))?/),Te=Te?Te[1]&&Te[1].length?+Te[1]:!0:!1),Te&&Ee(Oe,Te,Lt);var je={langExtension:jt,sourceNode:Oe,numberLines:Te,pre:Lt,sourceCode:null,basePos:null,spans:null,decorations:null};Be(je)}}}Re<N.length?T.setTimeout(we,250):typeof ue=="function"&&ue()}we()}var Ne=T.PR={createSimpleLexer:Q,registerLangHandler:pe,sourceDecorator:ie,PR_ATTRIB_NAME:I,PR_ATTRIB_VALUE:F,PR_COMMENT:m,PR_DECLARATION:A,PR_KEYWORD:b,PR_LITERAL:E,PR_NOCODE:H,PR_PLAIN:x,PR_PUNCTUATION:o,PR_SOURCE:D,PR_STRING:_,PR_TAG:C,PR_TYPE:g,prettyPrintOne:U?T.prettyPrintOne=Pe:S=Pe,prettyPrint:O=U?T.prettyPrint=ke:O=ke},he=T.define;typeof he=="function"&&he.amd&&he("google-code-prettify",[],function(){return Ne})})()},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),O=w||P||S,T=O&&(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),a=/Apple Computer/.test(navigator.vendor),u=/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),c=/\bCrOS\b/.test(ae),y=/win/i.test(Z),v=d&&ae.match(/Version\/(\d*\.\d*)/);v&&(v=Number(v[1])),v&&v>=15&&(d=!1,l=!0);var _=t&&(p||d&&(v==null||v<12.11)),b=U||O&&T>=9;function m(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var g=function(e,r){var R=e.className,L=m(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 o(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 K=0;K<r.length;++K)k.appendChild(r[K]);return k}function C(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;m(r).test(R)||(e.className+=(R?" ":"")+r)}function H(e,r){for(var R=e.split(" "),L=0;L<R.length;L++)R[L]&&!m(R[L]).test(r)&&(r+=" "+R[L]);return r}var te=function(e){e.select()};f?te=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:O&&(te=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 K=L||0,re=k||0;;){var le=e.indexOf(" ",K);if(le<0||le>=r)return re+(r-K);re+=le-K,re+=R-re%R,K=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},Ee={origin:"*mouse"},ye={origin:"+move"};function Le(e,r,R){for(var L=0,k=0;;){var K=e.indexOf(" ",L);K==-1&&(K=e.length);var re=K-L;if(K==e.length||k+re>=r)return L+Math.min(re,r-k);if(k+=K-L,k+=R-k%R,L=K+1,k>=r)return L}}var pe=[""];function Ce(e){for(;pe.length<=e;)pe.push(Be(pe)+" ");return pe[e]}function Be(e){return e[e.length-1]}function Pe(e,r){for(var R=[],L=0;L<e.length;L++)R[L]=r(e[L],L);return R}function ke(e,r,R){for(var L=0,k=R(r);L<e.length&&R(e[L])<=k;)L++;e.splice(L,0,r)}function Ne(){}function he(e,r){var R;return Object.create?R=Object.create(e):(Ne.prototype=e,R=new Ne),r&&G(r,R),R}var ue=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ie(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&&Ie(e)?!0:r.test(e):Ie(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,K=L<0?Math.ceil(k):Math.floor(k);if(K==r)return e(K)?r:R;e(K)?R=K:r=K+L}}function V(e,r,R,L){if(!e)return L(r,R,"ltr",0);for(var k=!1,K=0;K<e.length;++K){var re=e[K];(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",K),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 K=e[k];if(K.from<r&&K.to>r)return k;K.to==r&&(K.from!=K.to&&R=="before"?L=k:Y=k),K.from==r&&(K.from!=K.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(ve){return ve<=247?e.charAt(ve):1424<=ve&&ve<=1524?"R":1536<=ve&&ve<=1785?r.charAt(ve-1536):1774<=ve&&ve<=2220?"r":8192<=ve&&ve<=8203?"w":ve==8204?"b":"L"}var L=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,k=/[stwN]/,K=/[LRr]/,re=/[Lb1n]/,le=/[1n]/;function ce(ve,Fe,ze){this.level=ve,this.from=Fe,this.to=ze}return function(ve,Fe){var ze=Fe=="ltr"?"L":"R";if(ve.length==0||Fe=="ltr"&&!L.test(ve))return!1;for(var it=ve.length,et=[],yt=0;yt<it;++yt)et.push(R(ve.charCodeAt(yt)));for(var wt=0,Pt=ze;wt<it;++wt){var Bt=et[wt];Bt=="m"?et[wt]=Pt:Pt=Bt}for(var Vt=0,Wt=ze;Vt<it;++Vt){var $t=et[Vt];$t=="1"&&Wt=="r"?et[Vt]="n":K.test($t)&&(Wt=$t,$t=="r"&&(et[Vt]="R"))}for(var yn=1,ln=et[0];yn<it-1;++yn){var Wn=et[yn];Wn=="+"&&ln=="1"&&et[yn+1]=="1"?et[yn]="1":Wn==","&&ln==et[yn+1]&&(ln=="1"||ln=="n")&&(et[yn]=ln),ln=Wn}for(var br=0;br<it;++br){var Qr=et[br];if(Qr==",")et[br]="N";else if(Qr=="%"){var Lr=void 0;for(Lr=br+1;Lr<it&&et[Lr]=="%";++Lr);for(var xi=br&&et[br-1]=="!"||Lr<it&&et[Lr]=="1"?"1":"N",mi=br;mi<Lr;++mi)et[mi]=xi;br=Lr-1}}for(var Kr=0,vi=ze;Kr<it;++Kr){var ni=et[Kr];vi=="L"&&ni=="1"?et[Kr]="L":K.test(ni)&&(vi=ni)}for(var Gr=0;Gr<it;++Gr)if(k.test(et[Gr])){var Hr=void 0;for(Hr=Gr+1;Hr<it&&k.test(et[Hr]);++Hr);for(var Pr=(Gr?et[Gr-1]:ze)=="L",gi=(Hr<it?et[Hr]:ze)=="L",Ra=Pr==gi?Pr?"L":"R":ze,sa=Gr;sa<Hr;++sa)et[sa]=Ra;Gr=Hr-1}for(var li=[],Xi,Jr=0;Jr<it;)if(re.test(et[Jr])){var Fo=Jr;for(++Jr;Jr<it&&re.test(et[Jr]);++Jr);li.push(new ce(0,Fo,Jr))}else{var Qi=Jr,ma=li.length,va=Fe=="rtl"?1:0;for(++Jr;Jr<it&&et[Jr]!="L";++Jr);for(var di=Qi;di<Jr;)if(le.test(et[di])){Qi<di&&(li.splice(ma,0,new ce(1,Qi,di)),ma+=va);var Da=di;for(++di;di<Jr&&le.test(et[di]);++di);li.splice(ma,0,new ce(2,Da,di)),ma+=va,Qi=di}else++di;Qi<Jr&&li.splice(ma,0,new ce(1,Qi,Jr))}return Fe=="ltr"&&(li[0].level==1&&(Xi=ve.match(/^\s+/))&&(li[0].from=Xi[0].length,li.unshift(new ce(0,0,Xi[0].length))),Be(li).level==1&&(Xi=ve.match(/\s+$/))&&(Be(li).to-=Xi[0].length,li.push(new ce(0,it-Xi[0].length,it)))),Fe=="rtl"?li.reverse():li}}();function rt(e,r){var R=e.order;return R==null&&(R=e.order=Re(e.text,r)),R}var De=[],Me=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]||De).concat(R)}};function Xe(e,r){return e._handlers&&e._handlers[r]||De}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 K=B(k,R);K>-1&&(L[r]=k.slice(0,K).concat(k.slice(K+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),_e(r)||r.codemirrorIgnore}function we(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 Ae(e,r){return Xe(e,r).length>0}function Oe(e){e.prototype.on=function(r,R){Me(this,r,R)},e.prototype.off=function(r,R){tt(this,r,R)}}function fe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ge(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function _e(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function be(e){fe(e),ge(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(O&&T<9)return!1;var e=x("div");return"draggable"in e||"dragDrop"in e}(),Dt;function jt(e){if(Dt==null){var r=x("span","\u200B");o(e,x("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Dt=r.offsetWidth<=1&&r.offsetHeight>2&&!(O&&T<8))}var R=Dt?x("span","\u200B"):x("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var Rt;function Lt(e){if(Rt!=null)return Rt;var r=o(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:Rt=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 K=e.slice(r,e.charAt(k-1)=="\r"?k-1:k),re=K.indexOf("\r");re!=-1?(R.push(K.slice(0,re)),r+=re+1):(R.push(K),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=o(e,x("span","x")),R=r.getBoundingClientRect(),L=A(r,0,1).getBoundingClientRect();return Te=Math.abs(R.left-L.left)>1}var dt={},Ze={};function Tt(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),dt[e]=r}function Ct(e,r){Ze[e]=r}function ot(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=he(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ot("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ot("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function gt(e,r){r=ot(r);var R=dt[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 K in k){if(!k.hasOwnProperty(K))continue;L.hasOwnProperty(K)&&(L["_"+K]=L[K]),L[K]=k[K]}}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 Kt(e,r){var R=kt.hasOwnProperty(e)?kt[e]:kt[e]={};G(r,R)}function Gt(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 Se(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 de(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 K=this.string.slice(this.pos).match(e);return K&&K.index>0?null:(K&&r!==!1&&(this.pos+=K[0].length),K)}},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],K=k.chunkSize();if(r<K){R=k;break}r-=K}return R.lines[r]}function ne(e,r,R){var L=[],k=r.line;return e.iter(r.line,R.line+1,function(K){var re=K.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 xe(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],K=k.height;if(r<K){e=k;continue e}r-=K,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 Et(e,r){return r>=e.first&&r<e.first+e.size}function St(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function nt(e,r,R){if(R===void 0&&(R=null),!(this instanceof nt))return new nt(e,r,R);this.line=e,this.ch=r,this.sticky=R}function xt(e,r){return e.line-r.line||e.ch-r.ch}function ut(e,r){return e.sticky==r.sticky&&xt(e,r)==0}function _t(e){return nt(e.line,e.ch)}function Qt(e,r){return xt(e,r)<0?r:e}function Xt(e,r){return xt(e,r)<0?e:r}function Mt(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 nt(e.first,0);var R=e.first+e.size-1;return r.line>R?nt(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?nt(e.line,r):R<0?nt(e.line,0):e}function En(e,r){for(var R=[],L=0;L<r.length;L++)R[L]=mt(e,r[L]);return R}var Jt=function(e,r){this.state=e,this.lookAhead=r},un=function(e,r,R,L){this.state=r,this.doc=e,this.line=R,this.maxLookAhead=L||0,this.baseTokens=null,this.baseTokenPos=1};un.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},un.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}},un.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},un.fromSaved=function(e,r,R){return r instanceof Jt?new un(e,Gt(e.mode,r.state),R,r.lookAhead):new un(e,Gt(e.mode,r),R)},un.prototype.save=function(e){var r=e!==!1?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Jt(r,this.maxLookAhead):r};function Jn(e,r,R,L){var k=[e.state.modeGen],K={};jr(e,r.text,e.doc.mode,R,function(ve,Fe){return k.push(ve,Fe)},K,L);for(var re=R.state,le=function(ve){R.baseTokens=k;var Fe=e.state.overlays[ve],ze=1,it=0;R.state=!0,jr(e,r.text,Fe.mode,R,function(et,yt){for(var wt=ze;it<et;){var Pt=k[ze];Pt>et&&k.splice(ze,1,et,k[ze+1],Pt),ze+=2,it=Math.min(et,Pt)}if(!yt)return;if(Fe.opaque)k.splice(wt,ze-wt,et,"overlay "+yt),ze=wt+2;else for(;wt<ze;wt+=2){var Bt=k[wt+1];k[wt+1]=(Bt?Bt+" ":"")+"overlay "+yt}},K),R.state=re,R.baseTokens=null,R.baseTokenPos=1},ce=0;ce<e.state.overlays.length;++ce)le(ce);return{styles:k,classes:K.bgClass||K.textClass?K:null}}function ar(e,r,R){if(!r.styles||r.styles[0]!=e.state.modeGen){var L=mn(e,He(r)),k=r.text.length>e.options.maxHighlightLength&&Gt(e.doc.mode,L.state),K=Jn(e,r,L);k&&(L.state=k),r.stateAfter=L.save(!k),r.styles=K.styles,K.classes?r.styleClasses=K.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 mn(e,r,R){var L=e.doc,k=e.display;if(!L.mode.startState)return new un(L,!0,r);var K=tr(e,r,R),re=K>L.first&&q(L,K-1).stateAfter,le=re?un.fromSaved(L,re,K):new un(L,de(L.mode),K);return L.iter(K,r,function(ce){gr(e,ce.text,le);var ve=le.line;ce.stateAfter=ve==r-1||ve%5==0||ve>=k.viewFrom&&ve<k.viewTo?le.save():null,le.nextLine()}),R&&(L.modeFrontier=le.line),le}function gr(e,r,R,L){var k=e.doc.mode,K=new W(r,e.options.tabSize,R);for(K.start=K.pos=L||0,r==""&&Rr(k,R.state);!K.eol();)vn(k,K,R.state),K.start=K.pos}function Rr(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var R=Se(e,r);if(R.mode.blankLine)return R.mode.blankLine(R.state)}function vn(e,r,R,L){for(var k=0;k<10;k++){L&&(L[0]=Se(e,R).mode);var K=e.token(r,R);if(r.pos>r.start)return K}throw new Error("Mode "+e.name+" failed to advance stream.")}var An=function(e,r,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=R};function _r(e,r,R,L){var k=e.doc,K=k.mode,re;r=mt(k,r);var le=q(k,r.line),ce=mn(e,r.line,R),ve=new W(le.text,e.options.tabSize,ce),Fe;for(L&&(Fe=[]);(L||ve.pos<r.ch)&&!ve.eol();)ve.start=ve.pos,re=vn(K,ve,ce.state),L&&Fe.push(new An(ve,re,Gt(k.mode,ce.state)));return L?Fe:new An(ve,re,ce.state)}function Zr(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 jr(e,r,R,L,k,K,re){var le=R.flattenSpans;le==null&&(le=e.options.flattenSpans);var ce=0,ve=null,Fe=new W(r,e.options.tabSize,L),ze,it=e.options.addModeClass&&[null];for(r==""&&Zr(Rr(R,L.state),K);!Fe.eol();){if(Fe.pos>e.options.maxHighlightLength?(le=!1,re&&gr(e,r,L,Fe.pos),Fe.pos=r.length,ze=null):ze=Zr(vn(R,Fe,L.state,it),K),it){var et=it[0].name;et&&(ze="m-"+(ze?et+" "+ze:et))}if(!le||ve!=ze){for(;ce<Fe.start;)ce=Math.min(Fe.start,ce+5e3),k(ce,ve);ve=ze}Fe.start=Fe.pos}for(;ce<Fe.pos;){var yt=Math.min(Fe.pos,ce+5e3);k(yt,ve),ce=yt}}function tr(e,r,R){for(var L,k,K=e.doc,re=R?-1:r-(e.doc.mode.innerMode?1e3:100),le=r;le>re;--le){if(le<=K.first)return K.first;var ce=q(K,le-1),ve=ce.stateAfter;if(ve&&(!R||le+(ve instanceof Jt?ve.lookAhead:0)<=K.modeFrontier))return le;var Fe=X(ce.text,null,e.options.tabSize);(k==null||L>Fe)&&(k=le-1,L=Fe)}return k}function ur(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 Jt)||L+k.lookAhead<r)){R=L+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,R)}var yi=!1,xr=!1;function Cr(){yi=!0}function Sr(){xr=!0}function Vr(e,r,R){this.marker=e,this.from=r,this.to=R}function Mr(e,r){if(e)for(var R=0;R<e.length;++R){var L=e[R];if(L.marker==r)return L}}function Si(e,r){for(var R,L=0;L<e.length;++L)e[L]!=r&&(R||(R=[])).push(e[L]);return R}function Or(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function ei(e,r,R){var L;if(e)for(var k=0;k<e.length;++k){var K=e[k],re=K.marker,le=K.from==null||(re.inclusiveLeft?K.from<=r:K.from<r);if(le||K.from==r&&re.type=="bookmark"&&(!R||!K.marker.insertLeft)){var ce=K.to==null||(re.inclusiveRight?K.to>=r:K.to>r);(L||(L=[])).push(new Vr(re,K.from,ce?null:K.to))}}return L}function ri(e,r,R){var L;if(e)for(var k=0;k<e.length;++k){var K=e[k],re=K.marker,le=K.to==null||(re.inclusiveRight?K.to>=r:K.to>r);if(le||K.from==r&&re.type=="bookmark"&&(!R||K.marker.insertLeft)){var ce=K.from==null||(re.inclusiveLeft?K.from<=r:K.from<r);(L||(L=[])).push(new Vr(re,ce?null:K.from-r,K.to==null?null:K.to-r))}}return L}function Xr(e,r){if(r.full)return null;var R=Et(e,r.from.line)&&q(e,r.from.line).markedSpans,L=Et(e,r.to.line)&&q(e,r.to.line).markedSpans;if(!R&&!L)return null;var k=r.from.ch,K=r.to.ch,re=xt(r.from,r.to)==0,le=ei(R,k,re),ce=ri(L,K,re),ve=r.text.length==1,Fe=Be(r.text).length+(ve?k:0);if(le)for(var ze=0;ze<le.length;++ze){var it=le[ze];if(it.to==null){var et=Mr(ce,it.marker);et?ve&&(it.to=et.to==null?null:et.to+Fe):it.to=k}}if(ce)for(var yt=0;yt<ce.length;++yt){var wt=ce[yt];if(wt.to!=null&&(wt.to+=Fe),wt.from==null){var Pt=Mr(le,wt.marker);Pt||(wt.from=Fe,ve&&(le||(le=[])).push(wt))}else wt.from+=Fe,ve&&(le||(le=[])).push(wt)}le&&(le=ui(le)),ce&&ce!=le&&(ce=ui(ce));var Bt=[le];if(!ve){var Vt=r.text.length-2,Wt;if(Vt>0&&le)for(var $t=0;$t<le.length;++$t)le[$t].to==null&&(Wt||(Wt=[])).push(new Vr(le[$t].marker,null,null));for(var yn=0;yn<Vt;++yn)Bt.push(Wt);Bt.push(ce)}return Bt}function ui(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 Ri(e,r,R){var L=null;if(e.iter(r.line,R.line+1,function(et){if(et.markedSpans)for(var yt=0;yt<et.markedSpans.length;++yt){var wt=et.markedSpans[yt].marker;wt.readOnly&&(!L||B(L,wt)==-1)&&(L||(L=[])).push(wt)}}),!L)return null;for(var k=[{from:r,to:R}],K=0;K<L.length;++K)for(var re=L[K],le=re.find(0),ce=0;ce<k.length;++ce){var ve=k[ce];if(xt(ve.to,le.from)<0||xt(ve.from,le.to)>0)continue;var Fe=[ce,1],ze=xt(ve.from,le.from),it=xt(ve.to,le.to);(ze<0||!re.inclusiveLeft&&!ze)&&Fe.push({from:ve.from,to:le.from}),(it>0||!re.inclusiveRight&&!it)&&Fe.push({from:le.to,to:ve.to}),k.splice.apply(k,Fe),ce+=Fe.length-3}return k}function bi(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 ii(e,r){if(!r)return;for(var R=0;R<r.length;++R)r[R].marker.attachLine(e);e.markedSpans=r}function yr(e){return e.inclusiveLeft?-1:0}function or(e){return e.inclusiveRight?1:0}function ai(e,r){var R=e.lines.length-r.lines.length;if(R!=0)return R;var L=e.find(),k=r.find(),K=xt(L.from,k.from)||yr(e)-yr(r);if(K)return-K;var re=xt(L.to,k.to)||or(e)-or(r);return re||r.id-e.id}function Di(e,r){var R=xr&&e.markedSpans,L;if(R)for(var k=void 0,K=0;K<R.length;++K)k=R[K],k.marker.collapsed&&(r?k.from:k.to)==null&&(!L||ai(L,k.marker)<0)&&(L=k.marker);return L}function Ni(e){return Di(e,!0)}function wi(e){return Di(e,!1)}function ga(e,r){var R=xr&&e.markedSpans,L;if(R)for(var k=0;k<R.length;++k){var K=R[k];K.marker.collapsed&&(K.from==null||K.from<r)&&(K.to==null||K.to>r)&&(!L||ai(L,K.marker)<0)&&(L=K.marker)}return L}function la(e,r,R,L,k){var K=q(e,r),re=xr&&K.markedSpans;if(re)for(var le=0;le<re.length;++le){var ce=re[le];if(!ce.marker.collapsed)continue;var ve=ce.marker.find(0),Fe=xt(ve.from,R)||yr(ce.marker)-yr(k),ze=xt(ve.to,L)||or(ce.marker)-or(k);if(Fe>=0&&ze<=0||Fe<=0&&ze>=0)continue;if(Fe<=0&&(ce.marker.inclusiveRight&&k.inclusiveLeft?xt(ve.to,R)>=0:xt(ve.to,R)>0)||Fe>=0&&(ce.marker.inclusiveRight&&k.inclusiveLeft?xt(ve.from,L)<=0:xt(ve.from,L)<0))return!0}}function tn(e){for(var r;r=Ni(e);)e=r.find(-1,!0).line;return e}function xn(e){for(var r;r=wi(e);)e=r.find(1,!0).line;return e}function fn(e){for(var r,R;r=wi(e);)e=r.find(1,!0).line,(R||(R=[])).push(e);return R}function Zn(e,r){var R=q(e,r),L=tn(R);return R==L?r:He(L)}function nr(e,r){if(r>e.lastLine())return r;var R=q(e,r),L;if(!cr(e,R))return r;for(;L=wi(R);)R=L.find(1,!0).line;return He(R)+1}function cr(e,r){var R=xr&&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&&hr(e,r,L))return!0}}function hr(e,r,R){if(R.to==null){var L=R.marker.find(1,!0);return hr(e,L.line,Mr(L.line.markedSpans,R.marker))}if(R.marker.inclusiveRight&&R.to==r.text.length)return!0;for(var k=void 0,K=0;K<r.markedSpans.length;++K)if(k=r.markedSpans[K],k.marker.collapsed&&!k.marker.widgetNode&&k.from==R.to&&(k.to==null||k.to!=R.from)&&(k.marker.inclusiveLeft||R.marker.inclusiveRight)&&hr(e,r,k))return!0}function pr(e){e=tn(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 K=R.parent;K;R=K,K=R.parent)for(var re=0;re<K.children.length;++re){var le=K.children[re];if(le==R)break;r+=le.height}return r}function kr(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 K=R.find(0,!0);r-=L.text.length-K.from.ch,L=K.to.line,r+=L.text.length-K.to.ch}return r}function oi(e){var r=e.display,R=e.doc;r.maxLine=q(R,R.first),r.maxLineLength=kr(r.maxLine),r.maxLineChanged=!0,R.iter(function(L){var k=kr(L);k>r.maxLineLength&&(r.maxLineLength=k,r.maxLine=L)})}var er=function(e,r,R){this.text=e,ii(this,r),this.height=R?R(this):1};er.prototype.lineNo=function(){return He(this)},Oe(er);function _i(e,r,R,L){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),bi(e),ii(e,R);var k=L?L(e):1;k!=e.height&&xe(e,k)}function Fr(e){e.parent=null,bi(e)}var Ti={},fi={};function Pi(e,r){if(!e||/^\s*$/.test(e))return null;var R=r.addModeClass?fi:Ti;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function Ji(e,r){var R=C("span",null,null,l?"padding-right: .1px":null),L={pre:C("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 K=k?r.rest[k-1]:r.line,re=void 0;L.pos=0,L.addToken=Ma,Lt(e.display.measure)&&(re=rt(K,e.doc.direction))&&(L.addToken=Rn(L.addToken,re)),L.map=[];var le=r!=e.display.externalMeasured&&He(K);ua(K,L,ar(e,K,le)),K.styleClasses&&(K.styleClasses.bgClass&&(L.bgClass=H(K.styleClasses.bgClass,L.bgClass||"")),K.styleClasses.textClass&&(L.textClass=H(K.styleClasses.textClass,L.textClass||""))),L.map.length==0&&L.map.push(0,0,L.content.appendChild(jt(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=H(L.pre.className,L.textClass||"")),L}function Pa(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,K,re){if(!r)return;var le=e.splitSpaces?ya(r,e.trailingSpace):r,ce=e.cm.state.specialChars,ve=!1,Fe;if(!ce.test(r))e.col+=r.length,Fe=document.createTextNode(le),e.map.push(e.pos,e.pos+r.length,Fe),O&&T<9&&(ve=!0),e.pos+=r.length;else{Fe=document.createDocumentFragment();for(var ze=0;;){ce.lastIndex=ze;var it=ce.exec(r),et=it?it.index-ze:r.length-ze;if(et){var yt=document.createTextNode(le.slice(ze,ze+et));O&&T<9?Fe.appendChild(x("span",[yt])):Fe.appendChild(yt),e.map.push(e.pos,e.pos+et,yt),e.col+=et,e.pos+=et}if(!it)break;ze+=et+1;var wt=void 0;if(it[0]==" "){var Pt=e.cm.options.tabSize,Bt=Pt-e.col%Pt;wt=Fe.appendChild(x("span",Ce(Bt),"cm-tab")),wt.setAttribute("role","presentation"),wt.setAttribute("cm-text"," "),e.col+=Bt}else it[0]=="\r"||it[0]==`
|
|
|
`?(wt=Fe.appendChild(x("span",it[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),wt.setAttribute("cm-text",it[0]),e.col+=1):(wt=e.cm.options.specialCharPlaceholder(it[0]),wt.setAttribute("cm-text",it[0]),O&&T<9?Fe.appendChild(x("span",[wt])):Fe.appendChild(wt),e.col+=1);e.map.push(e.pos,e.pos+1,wt),e.pos++}}if(e.trailingSpace=le.charCodeAt(r.length-1)==32,R||L||k||ve||K||re){var Vt=R||"";L&&(Vt+=L),k&&(Vt+=k);var Wt=x("span",[Fe],Vt,K);if(re)for(var $t in re)re.hasOwnProperty($t)&&$t!="style"&&$t!="class"&&Wt.setAttribute($t,re[$t]);return e.content.appendChild(Wt)}e.content.appendChild(Fe)}function ya(e,r){if(e.length>1&&!/ /.test(e))return e;for(var R=r,L="",k=0;k<e.length;k++){var K=e.charAt(k);K==" "&&R&&(k==e.length-1||e.charCodeAt(k+1)==32)&&(K="\xA0"),L+=K,R=K==" "}return L}function Rn(e,r){return function(R,L,k,K,re,le,ce){k=k?k+" cm-force-border":"cm-force-border";for(var ve=R.pos,Fe=ve+L.length;;){for(var ze=void 0,it=0;it<r.length&&!(ze=r[it],ze.to>ve&&ze.from<=ve);it++);if(ze.to>=Fe)return e(R,L,k,K,re,le,ce);e(R,L.slice(0,ze.to-ve),k,K,null,le,ce),K=null,L=L.slice(ze.to-ve),ve=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 ua(e,r,R){var L=e.markedSpans,k=e.text,K=0;if(!L){for(var re=1;re<R.length;re+=2)r.addToken(r,k.slice(K,K=R[re]),Pi(R[re+1],r.cm.options));return}for(var le=k.length,ce=0,ve=1,Fe="",ze,it,et=0,yt,wt,Pt,Bt,Vt;;){if(et==ce){yt=wt=Pt=it="",Vt=null,Bt=null,et=Infinity;for(var Wt=[],$t=void 0,yn=0;yn<L.length;++yn){var ln=L[yn],Wn=ln.marker;if(Wn.type=="bookmark"&&ln.from==ce&&Wn.widgetNode)Wt.push(Wn);else if(ln.from<=ce&&(ln.to==null||ln.to>ce||Wn.collapsed&&ln.to==ce&&ln.from==ce)){if(ln.to!=null&&ln.to!=ce&&et>ln.to&&(et=ln.to,wt=""),Wn.className&&(yt+=" "+Wn.className),Wn.css&&(it=(it?it+";":"")+Wn.css),Wn.startStyle&&ln.from==ce&&(Pt+=" "+Wn.startStyle),Wn.endStyle&&ln.to==et&&($t||($t=[])).push(Wn.endStyle,ln.to),Wn.title&&((Vt||(Vt={})).title=Wn.title),Wn.attributes)for(var br in Wn.attributes)(Vt||(Vt={}))[br]=Wn.attributes[br];Wn.collapsed&&(!Bt||ai(Bt.marker,Wn)<0)&&(Bt=ln)}else ln.from>ce&&et>ln.from&&(et=ln.from)}if($t)for(var Qr=0;Qr<$t.length;Qr+=2)$t[Qr+1]==et&&(wt+=" "+$t[Qr]);if(!Bt||Bt.from==ce)for(var Lr=0;Lr<Wt.length;++Lr)zi(r,0,Wt[Lr]);if(Bt&&(Bt.from||0)==ce){if(zi(r,(Bt.to==null?le+1:Bt.to)-ce,Bt.marker,Bt.from==null),Bt.to==null)return;Bt.to==ce&&(Bt=!1)}}if(ce>=le)break;for(var xi=Math.min(le,et);;){if(Fe){var mi=ce+Fe.length;if(!Bt){var Kr=mi>xi?Fe.slice(0,xi-ce):Fe;r.addToken(r,Kr,ze?ze+yt:yt,Pt,ce+Kr.length==et?wt:"",it,Vt)}if(mi>=xi){Fe=Fe.slice(xi-ce),ce=xi;break}ce=mi,Pt=""}Fe=k.slice(K,K=R[ve++]),ze=Pi(R[ve++],r.cm.options)}}}function ba(e,r,R){this.line=r,this.rest=fn(r),this.size=this.rest?He(Be(this.rest))-R+1:1,this.node=this.text=null,this.hidden=cr(e,r)}function Yi(e,r,R){for(var L=[],k,K=r;K<R;K=k){var re=new ba(e.doc,q(e.doc,K),K);k=K+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 at(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 st(e,r){var R=e.ownsGroup;if(!R)return;try{at(R)}finally{Gi=null,r(R)}}var bt=null;function At(e,r){var R=Xe(e,r);if(!R.length)return;var L=Array.prototype.slice.call(arguments,2),k;Gi?k=Gi.delayedCallbacks:bt?k=bt:(k=bt=[],setTimeout(nn,0));for(var K=function(le){k.push(function(){return R[le].apply(null,L)})},re=0;re<R.length;++re)K(re)}function nn(){var e=bt;bt=null;for(var r=0;r<e.length;++r)e[r]()}function en(e,r,R,L){for(var k=0;k<r.changes.length;k++){var K=r.changes[k];K=="text"?vt(e,r):K=="gutter"?Ot(e,r,R,L):K=="class"?Yt(e,r):K=="widget"&&Zt(e,r,L)}r.changes=null}function ht(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),O&&T<8&&(e.node.style.zIndex=2)),e.node}function ct(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=ht(r);r.background=L.insertBefore(x("div",null,R),L.firstChild),e.display.input.setUneditable(r.background)}}function Ft(e,r){var R=e.display.externalMeasured;return R&&R.line==r.line?(e.display.externalMeasured=null,r.measure=R.measure,R.built):Ji(e,r)}function vt(e,r){var R=r.text.className,L=Ft(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,Yt(e,r)):R&&(r.text.className=R)}function Yt(e,r){ct(e,r),r.line.wrapClass?ht(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 Ot(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=ht(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 K=r.line.gutterMarkers;if(e.options.lineNumbers||K){var re=ht(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&&(!K||!K["CodeMirror-linenumbers"])&&(r.lineNumber=le.appendChild(x("div",St(e.options,R),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+L.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),K)for(var ce=0;ce<e.display.gutterSpecs.length;++ce){var ve=e.display.gutterSpecs[ce].className,Fe=K.hasOwnProperty(ve)&&K[ve];Fe&&le.appendChild(x("div",[Fe],"CodeMirror-gutter-elt","left: "+L.gutterLeft[ve]+"px; width: "+L.gutterWidth[ve]+"px"))}}}function Zt(e,r,R){r.alignable&&(r.alignable=null);for(var L=m("CodeMirror-linewidget"),k=r.node.firstChild,K=void 0;k;k=K)K=k.nextSibling,L.test(k.className)&&r.node.removeChild(k);Sn(e,r,R)}function jn(e,r,R,L){var k=Ft(e,r);return r.text=r.node=k.pre,k.bgClass&&(r.bgClass=k.bgClass),k.textClass&&(r.textClass=k.textClass),Yt(e,r),Ot(e,r,R,L),Sn(e,r,L),r.node}function Sn(e,r,R){if(cn(e,r.line,r,R,!0),r.rest)for(var L=0;L<r.rest.length;L++)cn(e,r.rest[L],r,R,!1)}function cn(e,r,R,L,k){if(!r.widgets)return;for(var K=ht(R),re=0,le=r.widgets;re<le.length;++re){var ce=le[re],ve=x("div",[ce.node],"CodeMirror-linewidget"+(ce.className?" "+ce.className:""));ce.handleMouseEvents||ve.setAttribute("cm-ignore-events","true"),Kn(ce,ve,R,L),e.display.input.setUneditable(ve),k&&ce.above?K.insertBefore(ve,R.gutter||R.text):K.appendChild(ve),At(ce,"redraw")}}function Kn(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 _n(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;"),o(r.display.measure,x("div",[e.node],null,R))}return e.height=e.node.parentNode.offsetHeight}function wn(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 kn(e){return e.lineSpace.offsetTop}function mr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Gn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=o(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 qn(e){return Q-e.display.nativeBarWidth}function rr(e){return e.display.scroller.clientWidth-qn(e)-e.display.barWidth}function dr(e){return e.display.scroller.clientHeight-qn(e)-e.display.barHeight}function Vn(e,r,R){var L=e.options.lineWrapping,k=L&&rr(e);if(!r.measure.heights||L&&r.measure.width!=k){var K=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],ve=re[le+1];Math.abs(ce.bottom-ve.bottom)>2&&K.push((ce.bottom+ve.top)/2-R.top)}}K.push(R.bottom-R.top)}}function Qn(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 Dn(e,r){r=tn(r);var R=He(r),L=e.display.externalMeasured=new ba(e.doc,r,R);L.lineN=R;var k=L.built=Ji(e,L);return L.text=k.pre,o(e.display.lineMeasure,k.pre),L}function Nt(e,r,R,L){return Xn(e,Hn(e,r),R,L)}function an(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[Yr(e,r)];var R=e.display.externalMeasured;if(R&&r>=R.lineN&&r<R.lineN+R.size)return R}function Hn(e,r){var R=He(r),L=an(e,R);L&&!L.text?L=null:L&&L.changes&&(en(e,L,R,gn(e)),e.curOp.forceUpdate=!0),L||(L=Dn(e,r));var k=Qn(L,r,R);return{line:r,view:L,rect:null,map:k.map,cache:k.cache,before:k.before,hasHeights:!1}}function Xn(e,r,R,L,k){r.before&&(R=-1);var K=R+(L||""),re;return r.cache.hasOwnProperty(K)?re=r.cache[K]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(Vn(e,r.view,r.rect),r.hasHeights=!0),re=on(e,r,R,L),re.bogus||(r.cache[K]=re)),{left:re.left,right:re.right,top:k?re.rtop:re.top,bottom:k?re.rbottom:re.bottom}}var ir={left:0,right:0,top:0,bottom:0};function Fn(e,r,R){for(var L,k,K,re,le,ce,ve=0;ve<e.length;ve+=3)if(le=e[ve],ce=e[ve+1],r<le?(k=0,K=1,re="left"):r<ce?(k=r-le,K=k+1):(ve==e.length-3||r==ce&&e[ve+3]>r)&&(K=ce-le,k=K-1,r>=ce&&(re="right")),k!=null){if(L=e[ve+2],le==ce&&R==(L.insertLeft?"left":"right")&&(re=R),R=="left"&&k==0)for(;ve&&e[ve-2]==e[ve-3]&&e[ve-1].insertLeft;)L=e[(ve-=3)+2],re="left";if(R=="right"&&k==ce-le)for(;ve<e.length-3&&e[ve+3]==e[ve+4]&&!e[ve+5].insertLeft;)L=e[(ve+=3)+2],re="right";break}return{node:L,start:k,end:K,collapse:re,coverStart:le,coverEnd:ce}}function Bn(e,r){var R=ir;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 on(e,r,R,L){var k=Fn(r.map,R,L),K=k.node,re=k.start,le=k.end,ce=k.collapse,ve;if(K.nodeType==3){for(var Fe=0;Fe<4;Fe++){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(O&&T<9&&re==0&&le==k.coverEnd-k.coverStart?ve=K.parentNode.getBoundingClientRect():ve=Bn(A(K,re,le).getClientRects(),L),ve.left||ve.right||re==0)break;le=re,re=re-1,ce="right"}O&&T<11&&(ve=bn(e.display.measure,ve))}else{re>0&&(ce=L="right");var ze;e.options.lineWrapping&&(ze=K.getClientRects()).length>1?ve=ze[L=="right"?ze.length-1:0]:ve=K.getBoundingClientRect()}if(O&&T<9&&!re&&(!ve||!ve.left&&!ve.right)){var it=K.parentNode.getClientRects()[0];it?ve={left:it.left,right:it.left+Nn(e.display),top:it.top,bottom:it.bottom}:ve=ir}for(var et=ve.top-r.rect.top,yt=ve.bottom-r.rect.top,wt=(et+yt)/2,Pt=r.view.measure.heights,Bt=0;Bt<Pt.length-1&&!(wt<Pt[Bt]);Bt++);var Vt=Bt?Pt[Bt-1]:0,Wt=Pt[Bt],$t={left:(ce=="right"?ve.right:ve.left)-r.rect.left,right:(ce=="left"?ve.left:ve.right)-r.rect.left,top:Vt,bottom:Wt};return!ve.left&&!ve.right&&($t.bogus=!0),e.options.singleCursorHeightPerLine||($t.rtop=et,$t.rbottom=yt),$t}function bn(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 It(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 Ut(e){e.display.externalMeasure=null,E(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)It(e.display.view[r])}function Ht(e){Ut(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function dn(){return h&&i?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function qt(){return h&&i?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Pn(e){var r=0;if(e.widgets)for(var R=0;R<e.widgets.length;++R)e.widgets[R].above&&(r+=_n(e.widgets[R]));return r}function sn(e,r,R,L,k){if(!k){var K=Pn(r);R.top+=K,R.bottom+=K}if(L=="line")return R;L||(L="local");var re=pr(r);if(L=="local"?re+=kn(e.display):re-=e.display.viewOffset,L=="page"||L=="window"){var le=e.display.lineSpace.getBoundingClientRect();re+=le.top+(L=="window"?0:qt());var ce=le.left+(L=="window"?0:dn());R.left+=ce,R.right+=ce}return R.top+=re,R.bottom+=re,R}function On(e,r,R){if(R=="div")return r;var L=r.left,k=r.top;if(R=="page")L-=dn(),k-=qt();else if(R=="local"||!R){var K=e.display.sizer.getBoundingClientRect();L+=K.left,k+=K.top}var re=e.display.lineSpace.getBoundingClientRect();return{left:L-re.left,top:k-re.top}}function pn(e,r,R,L,k){return L||(L=q(e.doc,r.line)),sn(e,L,Nt(e,L,r.ch,k),R)}function In(e,r,R,L,k,K){L=L||q(e.doc,r.line),k||(k=Hn(e,L));function re(yt,wt){var Pt=Xn(e,k,yt,wt?"right":"left",K);return wt?Pt.left=Pt.right:Pt.right=Pt.left,sn(e,L,Pt,R)}var le=rt(L,e.doc.direction),ce=r.ch,ve=r.sticky;if(ce>=L.text.length?(ce=L.text.length,ve="before"):ce<=0&&(ce=0,ve="after"),!le)return re(ve=="before"?ce-1:ce,ve=="before");function Fe(yt,wt,Pt){var Bt=le[wt],Vt=Bt.level==1;return re(Pt?yt-1:yt,Vt!=Pt)}var ze=me(le,ce,ve),it=Y,et=Fe(ce,ze,ve=="before");return it!=null&&(et.other=Fe(ce,it,ve!="before")),et}function Yn(e,r){var R=0;r=mt(e.doc,r),e.options.lineWrapping||(R=Nn(e.display)*r.ch);var L=q(e.doc,r.line),k=pr(L)+kn(e.display);return{left:R,right:R,top:k,bottom:k+L.height}}function sr(e,r,R,L,k){var K=nt(e,r,R);return K.xRel=k,L&&(K.outside=L),K}function Er(e,r,R){var L=e.doc;if(R+=e.display.viewOffset,R<0)return sr(L.first,0,null,-1,-1);var k=Je(L,R),K=L.first+L.size-1;if(k>K)return sr(L.first+L.size-1,q(L,K).text.length,null,1,1);r<0&&(r=0);for(var re=q(L,k);;){var le=Mi(e,re,k,r,R),ce=ga(re,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ce)return le;var ve=ce.find(1);if(ve.line==k)return ve;re=q(L,k=ve.line)}}function zr(e,r,R,L){L-=Pn(r);var k=r.text.length,K=$(function(re){return Xn(e,R,re-1).bottom<=L},k,0);return k=$(function(re){return Xn(e,R,re).top>L},K,k),{begin:K,end:k}}function Ci(e,r,R,L){R||(R=Hn(e,r));var k=sn(e,r,Xn(e,R,L),"line").top;return zr(e,r,R,k)}function Br(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 K=Hn(e,r),re=Pn(r),le=0,ce=r.text.length,ve=!0,Fe=rt(r,e.doc.direction);if(Fe){var ze=(e.options.lineWrapping?Ui:$i)(e,r,R,K,Fe,L,k);ve=ze.level!=1,le=ve?ze.from:ze.to-1,ce=ve?ze.to:ze.from-1}var it=null,et=null,yt=$(function(yn){var ln=Xn(e,K,yn);return ln.top+=re,ln.bottom+=re,Br(ln,L,k,!1)?(ln.top<=k&&ln.left<=L&&(it=yn,et=ln),!0):!1},le,ce),wt,Pt,Bt=!1;if(et){var Vt=L-et.left<et.right-L,Wt=Vt==ve;yt=it+(Wt?0:1),Pt=Wt?"after":"before",wt=Vt?et.left:et.right}else{!ve&&(yt==ce||yt==le)&&yt++,Pt=yt==0?"after":yt==r.text.length?"before":Xn(e,K,yt-(ve?1:0)).bottom+re<=k==ve?"after":"before";var $t=In(e,nt(R,yt,Pt),"line",r,K);wt=$t.left,Bt=k<$t.top?-1:k>=$t.bottom?1:0}return yt=N(r.text,yt,1),sr(R,yt,Pt,Bt,L-wt)}function $i(e,r,R,L,k,K,re){var le=$(function(ze){var it=k[ze],et=it.level!=1;return Br(In(e,nt(R,et?it.to:it.from,et?"before":"after"),"line",r,L),K,re,!0)},0,k.length-1),ce=k[le];if(le>0){var ve=ce.level!=1,Fe=In(e,nt(R,ve?ce.from:ce.to,ve?"after":"before"),"line",r,L);Br(Fe,K,re,!0)&&Fe.top>re&&(ce=k[le-1])}return ce}function Ui(e,r,R,L,k,K,re){var le=zr(e,r,L,re),ce=le.begin,ve=le.end;/\s/.test(r.text.charAt(ve-1))&&ve--;for(var Fe=null,ze=null,it=0;it<k.length;it++){var et=k[it];if(et.from>=ve||et.to<=ce)continue;var yt=et.level!=1,wt=Xn(e,L,yt?Math.min(ve,et.to)-1:Math.max(ce,et.from)).right,Pt=wt<K?K-wt+1e9:wt-K;(!Fe||ze>Pt)&&(Fe=et,ze=Pt)}return Fe||(Fe=k[k.length-1]),Fe.from<ce&&(Fe={from:ce,to:Fe.to,level:Fe.level}),Fe.to>ve&&(Fe={from:Fe.from,to:ve,level:Fe.level}),Fe}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"))}o(e.measure,ti);var R=ti.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),E(e.measure),R||1}function Nn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=x("span","xxxxxxxxxx"),R=x("pre",[r],"CodeMirror-line-like");o(e.measure,R);var L=r.getBoundingClientRect(),k=(L.right-L.left)/10;return k>2&&(e.cachedCharWidth=k),k||10}function gn(e){for(var r=e.display,R={},L={},k=r.gutters.clientLeft,K=r.gutters.firstChild,re=0;K;K=K.nextSibling,++re){var le=e.display.gutterSpecs[re].className;R[le]=K.offsetLeft+K.clientLeft+k,L[le]=K.clientWidth}return{fixedPos:zn(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:R,gutterWidth:L,wrapperWidth:r.wrapper.clientWidth}}function zn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function $n(e){var r=ji(e.display),R=e.options.lineWrapping,L=R&&Math.max(5,e.display.scroller.clientWidth/Nn(e.display)-3);return function(k){if(cr(e.doc,k))return 0;var K=0;if(k.widgets)for(var re=0;re<k.widgets.length;re++)k.widgets[re].height&&(K+=k.widgets[re].height);return R?K+(Math.ceil(k.text.length/L)||1)*r:K+r}}function Dr(e){var r=e.doc,R=$n(e);r.iter(function(L){var k=R(L);k!=L.height&&xe(L,k)})}function Ln(e,r,R,L){var k=e.display;if(!R&&Ge(r).getAttribute("cm-not-content")=="true")return null;var K,re,le=k.lineSpace.getBoundingClientRect();try{K=r.clientX-le.left,re=r.clientY-le.top}catch(ze){return null}var ce=Er(e,K,re),ve;if(L&&ce.xRel>0&&(ve=q(e.doc,ce.line).text).length==ce.ch){var Fe=X(ve,ve.length,e.options.tabSize)-ve.length;ce=nt(ce.line,Math.max(0,Math.round((K-Gn(e.display).left)/Nn(e.display))-Fe))}return ce}function Yr(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 Ar(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)xr&&Zn(e.doc,r)<k.viewTo&&hi(e);else if(R<=k.viewFrom)xr&&nr(e.doc,R+L)>k.viewFrom?hi(e):(k.viewFrom+=L,k.viewTo+=L);else if(r<=k.viewFrom&&R>=k.viewTo)hi(e);else if(r<=k.viewFrom){var K=Oi(e,R,R+L,1);K?(k.view=k.view.slice(K.index),k.viewFrom=K.lineN,k.viewTo+=L):hi(e)}else if(R>=k.viewTo){var re=Oi(e,r,r,-1);re?(k.view=k.view.slice(0,re.index),k.viewTo=re.lineN):hi(e)}else{var le=Oi(e,r,r,-1),ce=Oi(e,R,R+L,1);le&&ce?(k.view=k.view.slice(0,le.index).concat(Yi(e,le.lineN,ce.lineN)).concat(k.view.slice(ce.index)),k.viewTo+=L):hi(e)}var ve=k.externalMeasured;ve&&(R<ve.lineN?ve.lineN+=L:r<ve.lineN+ve.size&&(k.externalMeasured=null))}function Wr(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 K=L.view[Yr(e,r)];if(K.node==null)return;var re=K.changes||(K.changes=[]);B(re,R)==-1&&re.push(R)}function hi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Oi(e,r,R,L){var k=Yr(e,r),K,re=e.display.view;if(!xr||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;K=le+re[k].size-r,k++}else K=le-r;r+=K,R+=K}for(;Zn(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=Yi(e,r,R),L.viewFrom=r):(L.viewFrom>r?L.view=Yi(e,r,L.viewFrom).concat(L.view):L.viewFrom<r&&(L.view=L.view.slice(Yr(e,r))),L.viewFrom=r,L.viewTo<R?L.view=L.view.concat(Yi(e,L.viewTo,R)):L.viewTo>R&&(L.view=L.view.slice(0,Yr(e,R)))),L.viewTo=R}function Mn(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 hn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Un(e,r){r===void 0&&(r=!0);for(var R=e.doc,L={},k=L.cursors=document.createDocumentFragment(),K=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)&&zt(e,le.head,k),ce||vr(e,le,K)}return L}function zt(e,r,R){var L=In(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 K=R.appendChild(x("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));K.style.display="",K.style.left=L.other.left+"px",K.style.top=L.other.top+"px",K.style.height=(L.other.bottom-L.other.top)*.85+"px"}}function Tn(e,r){return e.top-r.top||e.left-r.left}function vr(e,r,R){var L=e.display,k=e.doc,K=document.createDocumentFragment(),re=Gn(e.display),le=re.left,ce=Math.max(L.sizerWidth,rr(e)-L.sizer.offsetLeft)-re.right,ve=k.direction=="ltr";function Fe(Wt,$t,yn,ln){$t<0&&($t=0),$t=Math.round($t),ln=Math.round(ln),K.appendChild(x("div",null,"CodeMirror-selected","position: absolute; left: "+Wt+`px;
|
|
|
top: `+$t+"px; width: "+(yn==null?ce-Wt:yn)+`px;
|
|
|
height: `+(ln-$t)+"px"))}function ze(Wt,$t,yn){var ln=q(k,Wt),Wn=ln.text.length,br,Qr;function Lr(Kr,vi){return pn(e,nt(Wt,Kr),"div",ln,vi)}function xi(Kr,vi,ni){var Gr=Ci(e,ln,null,Kr),Hr=vi=="ltr"==(ni=="after")?"left":"right",Pr=ni=="after"?Gr.begin:Gr.end-(/\s/.test(ln.text.charAt(Gr.end-1))?2:1);return Lr(Pr,Hr)[Hr]}var mi=rt(ln,k.direction);return V(mi,$t||0,yn==null?Wn:yn,function(Kr,vi,ni,Gr){var Hr=ni=="ltr",Pr=Lr(Kr,Hr?"left":"right"),gi=Lr(vi-1,Hr?"right":"left"),Ra=$t==null&&Kr==0,sa=yn==null&&vi==Wn,li=Gr==0,Xi=!mi||Gr==mi.length-1;if(gi.top-Pr.top<=3){var Jr=(ve?Ra:sa)&&li,Fo=(ve?sa:Ra)&&Xi,Qi=Jr?le:(Hr?Pr:gi).left,ma=Fo?ce:(Hr?gi:Pr).right;Fe(Qi,Pr.top,ma-Qi,Pr.bottom)}else{var va,di,Da,Bo;Hr?(va=ve&&Ra&&li?le:Pr.left,di=ve?ce:xi(Kr,ni,"before"),Da=ve?le:xi(vi,ni,"after"),Bo=ve&&sa&&Xi?ce:gi.right):(va=ve?xi(Kr,ni,"before"):le,di=!ve&&Ra&&li?ce:Pr.right,Da=!ve&&sa&&Xi?le:gi.left,Bo=ve?xi(vi,ni,"after"):ce),Fe(va,Pr.top,di-va,Pr.bottom),Pr.bottom<gi.top&&Fe(le,Pr.bottom,null,gi.top),Fe(Da,gi.top,Bo-Da,gi.bottom)}(!br||Tn(Pr,br)<0)&&(br=Pr),Tn(gi,br)<0&&(br=gi),(!Qr||Tn(Pr,Qr)<0)&&(Qr=Pr),Tn(gi,Qr)<0&&(Qr=gi)}),{start:br,end:Qr}}var it=r.from(),et=r.to();if(it.line==et.line)ze(it.line,it.ch,et.ch);else{var yt=q(k,it.line),wt=q(k,et.line),Pt=tn(yt)==tn(wt),Bt=ze(it.line,it.ch,Pt?yt.text.length+1:null).end,Vt=ze(et.line,Pt?0:null,et.ch).start;Pt&&(Bt.top<Vt.top-2?(Fe(Bt.right,Bt.top,null,Bt.bottom),Fe(le,Vt.top,Vt.left,Vt.bottom)):Fe(Bt.right,Bt.top,Vt.left-Bt.right,Bt.bottom)),Bt.bottom<Vt.top&&Fe(le,Bt.bottom,null,Vt.top)}R.appendChild(K)}function Ir(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 Nr(e){e.state.focused||(e.display.input.focus(),rn(e))}function ca(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ki(e))},100)}function rn(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()),Ir(e)}function ki(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ve(e,"blur",e,r),e.state.focused=!1,g(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Zi(e){for(var r=e.display,R=r.lineDiv.offsetTop,L=0;L<r.view.length;L++){var k=r.view[L],K=e.options.lineWrapping,re=void 0,le=0;if(k.hidden)continue;if(O&&T<8){var ce=k.node.offsetTop+k.node.offsetHeight;re=ce-R,R=ce}else{var ve=k.node.getBoundingClientRect();re=ve.bottom-ve.top,!K&&k.text.firstChild&&(le=k.text.firstChild.getBoundingClientRect().right-ve.left-1)}var Fe=k.line.height-re;if((Fe>.005||Fe<-.005)&&(xe(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 it=Math.ceil(le/Nn(e.display));it>e.display.maxLineLength&&(e.display.maxLineLength=it,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-kn(e));var k=R&&R.bottom!=null?R.bottom:L+e.wrapper.clientHeight,K=Je(r,L),re=Je(r,k);if(R&&R.ensure){var le=R.ensure.from.line,ce=R.ensure.to.line;le<K?(K=le,re=Je(r,pr(q(r,le))+e.wrapper.clientHeight)):Math.min(ce,r.lastLine())>=re&&(K=Je(r,pr(q(r,ce))-e.wrapper.clientHeight),re=ce)}return{from:K,to:Math.max(re,K+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 K=x("div","\u200B",null,`position: absolute;
|
|
|
top: `+(r.top-R.viewOffset-kn(e.display))+`px;
|
|
|
height: `+(r.bottom-r.top+qn(e)+R.barHeight)+`px;
|
|
|
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(K),K.scrollIntoView(k),e.display.lineSpace.removeChild(K)}}function ea(e,r,R,L){L==null&&(L=0);var k;!e.options.lineWrapping&&r==R&&(r=r.ch?nt(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,R=r.sticky=="before"?nt(r.line,r.ch+1,"before"):r);for(var K=0;K<5;K++){var re=!1,le=In(e,r),ce=!R||R==r?le:In(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 ve=Vi(e,k),Fe=e.doc.scrollTop,ze=e.doc.scrollLeft;if(ve.scrollTop!=null&&(Ua(e,ve.scrollTop),Math.abs(e.doc.scrollTop-Fe)>1&&(re=!0)),ve.scrollLeft!=null&&(da(e,ve.scrollLeft),Math.abs(e.doc.scrollLeft-ze)>1&&(re=!0)),!re)break}return k}function ta(e,r){var R=Vi(e,r);R.scrollTop!=null&&Ua(e,R.scrollTop),R.scrollLeft!=null&&da(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,K=dr(e),re={};r.bottom-r.top>K&&(r.bottom=r.top+K);var le=e.doc.height+mr(R),ce=r.top<L,ve=r.bottom>le-L;if(r.top<k)re.scrollTop=ce?0:r.top;else if(r.bottom>k+K){var Fe=Math.min(r.top,(ve?le:r.bottom)-K);Fe!=k&&(re.scrollTop=Fe)}var ze=e.options.fixedGutter?0:R.gutters.offsetWidth,it=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-ze,et=rr(e)-R.gutters.offsetWidth,yt=r.right-r.left>et;return yt&&(r.right=r.left+et),r.left<10?re.scrollLeft=0:r.left<it?re.scrollLeft=Math.max(0,r.left+ze-(yt?0:10)):r.right>et+it-3&&(re.scrollLeft=r.right+(yt?0:10)-et),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 wr(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=Yn(e,r.from),L=Yn(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 da(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+mr(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+qn(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:R}}var fa=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),Me(L,"scroll",function(){L.clientHeight&&r(L.scrollTop,"vertical")}),Me(k,"scroll",function(){k.clientWidth&&r(k.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,O&&T<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};fa.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 K=e.viewWidth-e.barLeft-(R?L:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+K)+"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}},fa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},fa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},fa.prototype.zeroWidthHack=function(){var e=t&&!u?"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},fa.prototype.enableZeroWidthBar=function(e,r,R){e.style.pointerEvents="auto";function L(){var k=e.getBoundingClientRect(),K=R=="vert"?document.elementFromPoint(k.right-1,(k.top+k.bottom)/2):document.elementFromPoint((k.right+k.left)/2,k.bottom-1);K!=e?e.style.pointerEvents="none":r.set(1e3,L)}r.set(1e3,L)},fa.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 _a(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&&Zi(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:fa,null:Fa};function Go(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&g(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),Me(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"?da(e,r):Ua(e,r)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function ha(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 pa(e){var r=e.curOp;r&&st(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 K=0;K<r.length;K++)il(r[K]);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&&oi(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&&Zi(r),e.barMeasure=ja(r),R.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Nt(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+qn(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-rr(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&&da(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)&&_a(r,e.barMeasure),e.updatedDisplay&&xo(r,e.barMeasure),e.selectionChanged&&Ir(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),R&&Nr(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&&da(r,e.scrollLeft,!0,!0),e.scrollToPos){var k=ea(r,mt(L,e.scrollToPos.from),mt(L,e.scrollToPos.to),e.scrollToPos.margin);Wi(r,k)}var K=e.maybeHiddenMarkers,re=e.maybeUnhiddenMarkers;if(K)for(var le=0;le<K.length;++le)K[le].lines.length||Ve(K[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 Ei(e,r){if(e.curOp)return r();ha(e);try{return r()}finally{pa(e)}}function $r(e,r){return function(){if(e.curOp)return r.apply(e,arguments);ha(e);try{return r.apply(e,arguments)}finally{pa(e)}}}function ci(e){return function(){if(this.curOp)return e.apply(this,arguments);ha(this);try{return e.apply(this,arguments)}finally{pa(this)}}}function qr(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);ha(r);try{return e.apply(this,arguments)}finally{pa(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=mn(e,r.highlightFrontier),k=[];r.iter(L.line,Math.min(r.first+r.size,e.display.viewTo+500),function(K){if(L.line>=e.display.viewFrom){var re=K.styles,le=K.text.length>e.options.maxHighlightLength?Gt(r.mode,L.state):null,ce=Jn(e,K,L,!0);le&&(L.state=le),K.styles=ce.styles;var ve=K.styleClasses,Fe=ce.classes;Fe?K.styleClasses=Fe:ve&&(K.styleClasses=null);for(var ze=!re||re.length!=K.styles.length||ve!=Fe&&(!ve||!Fe||ve.bgClass!=Fe.bgClass||ve.textClass!=Fe.textClass),it=0;!ze&&it<re.length;++it)ze=re[it]!=K.styles[it];ze&&k.push(L.line),K.stateAfter=L.save(),L.nextLine()}else K.text.length<=e.options.maxHighlightLength&&gr(e,K.text,L),K.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&&Ei(e,function(){for(var K=0;K<k.length;K++)Wr(e,k[K],"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=rr(e),this.force=R,this.dims=gn(e),this.events=[]};ro.prototype.signal=function(e,r){Ae(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=qn(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=qn(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 hi(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&&Mn(e)==0)return!1;Yo(e)&&(hi(e),r.dims=gn(e));var k=L.first+L.size,K=Math.max(r.visible.from-e.options.viewportMargin,L.first),re=Math.min(k,r.visible.to+e.options.viewportMargin);R.viewFrom<K&&K-R.viewFrom<20&&(K=Math.max(L.first,R.viewFrom)),R.viewTo>re&&R.viewTo-re<20&&(re=Math.min(k,R.viewTo)),xr&&(K=Zn(e.doc,K),re=nr(e.doc,re));var le=K!=R.viewFrom||re!=R.viewTo||R.lastWrapHeight!=r.wrapperHeight||R.lastWrapWidth!=r.wrapperWidth;Fi(e,K,re),R.viewOffset=pr(q(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var ce=Mn(e);if(!le&&ce==0&&!r.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var ve=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(ve),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==rr(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+mr(e.display)-dr(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;Zi(e);var k=ja(e);hn(e),_a(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)){Zi(e),Vo(e,R);var L=ja(e);hn(e),_a(e,L),xo(e,L),R.finish()}}function cl(e,r,R){var L=e.display,k=e.options.lineNumbers,K=L.lineDiv,re=K.firstChild;function le(yt){var wt=yt.nextSibling;return l&&t&&e.display.currentWheelTarget==yt?yt.style.display="none":yt.parentNode.removeChild(yt),wt}for(var ce=L.view,ve=L.viewFrom,Fe=0;Fe<ce.length;Fe++){var ze=ce[Fe];if(!ze.hidden)if(!ze.node||ze.node.parentNode!=K){var it=jn(e,ze,ve,R);K.insertBefore(it,re)}else{for(;re!=ze.node;)re=le(re);var et=k&&r!=null&&r<=ve&&ze.lineNumber;ze.changes&&(B(ze.changes,"gutter")>-1&&(et=!1),en(e,ze,ve,R)),et&&(E(ze.lineNumber),ze.lineNumber.appendChild(document.createTextNode(St(e.options,ve)))),re=ze.node.nextSibling}ve+=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+qn(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=zn(r)-r.scroller.scrollLeft+e.doc.scrollLeft,k=r.gutters.offsetWidth,K=L+"px",re=0;re<R.length;re++)if(!R[re].hidden){e.options.fixedGutter&&(R[re].gutter&&(R[re].gutter.style.left=K),R[re].gutterBackground&&(R[re].gutterBackground.style.left=K));var le=R[re].alignable;if(le)for(var ce=0;ce<le.length;ce++)le[ce].style.left=K}e.options.fixedGutter&&(r.gutters.style.left=L+k+"px")}function Yo(e){if(!e.options.lineNumbers)return!1;var r=e.doc,R=St(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")),K=k.firstChild.offsetWidth,re=k.offsetWidth-K;return L.lineGutter.style.width="",L.lineNumInnerWidth=Math.max(K,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 K=e[k],re=null;if(typeof K!="string"&&(re=K.style,K=K.className),K=="CodeMirror-linenumbers")if(r)L=!0;else continue;R.push({className:K,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],K=k.className,re=k.style,le=r.appendChild(x("div",null,"CodeMirror-gutter "+K));re&&(le.style.cssText=re),K=="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),Ar(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=C("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=C("div",[k.measure,k.lineMeasure,k.selectionDiv,k.cursorDiv,k.lineDiv],null,"position: relative; outline: none");var K=C("div",[k.lineSpace],"CodeMirror-lines");k.mover=x("div",[K],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"),O&&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,Ai=null;O?Ai=-.53:U?Ai=15:h?Ai=-.7:a&&(Ai=-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*=Ai,r.y*=Ai,r}function Qo(e,r){var R=qo(r),L=R.x,k=R.y,K=e.display,re=K.scroller,le=re.scrollWidth>re.clientWidth,ce=re.scrollHeight>re.clientHeight;if(!(L&&le||k&&ce))return;if(k&&t&&l){e:for(var ve=r.target,Fe=K.view;ve!=re;ve=ve.parentNode)for(var ze=0;ze<Fe.length;ze++)if(Fe[ze].node==ve){e.display.currentWheelTarget=ve;break e}}if(L&&!U&&!d&&Ai!=null){k&&ce&&Ua(e,Math.max(0,re.scrollTop+k*Ai)),da(e,Math.max(0,re.scrollLeft+L*Ai)),(!k||k&&ce)&&fe(r),K.wheelStartX=null;return}if(k&&Ai!=null){var it=k*Ai,et=e.doc.scrollTop,yt=et+K.wrapper.clientHeight;it<0?et=Math.max(0,et+it-50):yt=Math.min(e.doc.height,yt+it+50),_o(e,{top:et,bottom:yt})}io<20&&(K.wheelStartX==null?(K.wheelStartX=re.scrollLeft,K.wheelStartY=re.scrollTop,K.wheelDX=L,K.wheelDY=k,setTimeout(function(){if(K.wheelStartX==null)return;var wt=re.scrollLeft-K.wheelStartX,Pt=re.scrollTop-K.wheelStartY,Bt=Pt&&K.wheelDY&&Pt/K.wheelDY||wt&&K.wheelDX&&wt/K.wheelDX;if(K.wheelStartX=K.wheelStartY=null,!Bt)return;Ai=(Ai*io+Bt)/(io+1),++io},200)):(K.wheelDX+=L,K.wheelDY+=k))}var Li=function(e,r){this.ranges=e,this.primIndex=r};Li.prototype.primary=function(){return this.ranges[this.primIndex]},Li.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(!ut(R.anchor,L.anchor)||!ut(R.head,L.head))return!1}return!0},Li.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new lr(_t(this.ranges[r].anchor),_t(this.ranges[r].head));return new Li(e,this.primIndex)},Li.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Li.prototype.contains=function(e,r){r||(r=e);for(var R=0;R<this.ranges.length;R++){var L=this.ranges[R];if(xt(r,L.from())>=0&&xt(e,L.to())<=0)return R}return-1};var lr=function(e,r){this.anchor=e,this.head=r};lr.prototype.from=function(){return Xt(this.anchor,this.head)},lr.prototype.to=function(){return Qt(this.anchor,this.head)},lr.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(it,et){return xt(it.from(),et.from())}),R=B(r,k);for(var K=1;K<r.length;K++){var re=r[K],le=r[K-1],ce=xt(le.to(),re.from());if(L&&!re.empty()?ce>0:ce>=0){var ve=Xt(le.from(),re.from()),Fe=Qt(le.to(),re.to()),ze=le.empty()?re.from()==re.head:le.from()==le.head;K<=R&&--R,r.splice(--K,2,new lr(ze?Fe:ve,ze?ve:Fe))}}return new Li(r,R)}function na(e,r){return new Li([new lr(e,r||e)],0)}function ra(e){return e.text?nt(e.from.line+e.text.length-1,Be(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Jo(e,r){if(xt(e,r.from)<0)return e;if(xt(e,r.to)<=0)return ra(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+=ra(r).ch-r.to.ch),nt(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 lr(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?nt(R.line,e.ch-r.ch+R.ch):nt(R.line+(e.line-r.line),e.ch)}function hl(e,r,R){for(var L=[],k=nt(e.first,0),K=k,re=0;re<r.length;re++){var le=r[re],ce=Zo(le.from,k,K),ve=Zo(ra(le),k,K);if(k=le.to,K=ve,R=="around"){var Fe=e.sel.ranges[re],ze=xt(Fe.head,Fe.anchor)<0;L[re]=new lr(ze?ve:ce,ze?ce:ve)}else L[re]=new lr(ce,ce)}return new Li(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&&Ar(e)}function es(e,r){return r.from.ch==0&&r.to.ch==0&&Be(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Co(e,r,R,L){function k(Vt){return R?R[Vt]:null}function K(Vt,Wt,$t){_i(Vt,Wt,$t,L),At(Vt,"change",Vt,r)}function re(Vt,Wt){for(var $t=[],yn=Vt;yn<Wt;++yn)$t.push(new er(ve[yn],k(yn),L));return $t}var le=r.from,ce=r.to,ve=r.text,Fe=q(e,le.line),ze=q(e,ce.line),it=Be(ve),et=k(ve.length-1),yt=ce.line-le.line;if(r.full)e.insert(0,re(0,ve.length)),e.remove(ve.length,e.size-ve.length);else if(es(e,r)){var wt=re(0,ve.length-1);K(ze,ze.text,et),yt&&e.remove(le.line,yt),wt.length&&e.insert(le.line,wt)}else if(Fe==ze)if(ve.length==1)K(Fe,Fe.text.slice(0,le.ch)+it+Fe.text.slice(ce.ch),et);else{var Pt=re(1,ve.length-1);Pt.push(new er(it+Fe.text.slice(ce.ch),et,L)),K(Fe,Fe.text.slice(0,le.ch)+ve[0],k(0)),e.insert(le.line+1,Pt)}else if(ve.length==1)K(Fe,Fe.text.slice(0,le.ch)+ve[0]+ze.text.slice(ce.ch),k(0)),e.remove(le.line+1,yt);else{K(Fe,Fe.text.slice(0,le.ch)+ve[0],k(0)),K(ze,it+ze.text.slice(ce.ch),et);var Bt=re(1,ve.length-1);yt>1&&e.remove(le.line+1,yt-1),e.insert(le.line+1,Bt)}At(e,"change",e,r)}function ia(e,r,R){function L(k,K,re){if(k.linked)for(var le=0;le<k.linked.length;++le){var ce=k.linked[le];if(ce.doc==K)continue;var ve=re&&ce.sharedHist;if(R&&!ve)continue;r(ce.doc,ve),L(ce.doc,k,ve)}}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,Dr(e),To(e),ns(e),e.options.lineWrapping||oi(e),e.options.mode=r.modeOption,Ar(e)}function ns(e){(e.doc.direction=="rtl"?F:g)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Ei(e,function(){ns(e),Ar(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:_t(r.from),to:ra(r),text:ne(e,r.from,r.to)};return as(e,R,r.from.line,r.to.line+1),ia(e,function(L){return as(L,R,r.from.line,r.to.line+1)},!0),R}function rs(e){for(;e.length;){var r=Be(e);if(r.ranges)e.pop();else break}}function ml(e,r){if(r)return rs(e.done),Be(e.done);if(e.done.length&&!Be(e.done).ranges)return Be(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Be(e.done)}function is(e,r,R,L){var k=e.history;k.undone.length=0;var K=+new Date,re,le;if((k.lastOp==L||k.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&k.lastModTime>K-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(re=ml(k,k.lastOp==L)))le=Be(re.changes),xt(r.from,r.to)==0&&xt(r.from,le.to)==0?le.to=ra(r):re.changes.push(Oo(e,r));else{var ce=Be(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=K,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,K=L&&L.origin;R==k.lastSelOp||K&&k.lastSelOrigin==K&&(k.lastModTime==k.lastSelTime&&k.lastOrigin==K||vl(e,K,Be(k.done),r))?k.done[k.done.length-1]=r:oo(r,k.done),k.lastSelTime=+new Date,k.lastSelOrigin=K,k.lastSelOp=R,L&&L.clearRedo!==!1&&rs(k.undone)}function oo(e,r){var R=Be(r);R&&R.ranges&&R.equals(e)||r.push(e)}function as(e,r,R,L){var k=r["spans_"+e.id],K=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]={}))[K]=re.markedSpans),++K})}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 K=R[k],re=L[k];if(K&&re){e:for(var le=0;le<re.length;++le){for(var ce=re[le],ve=0;ve<K.length;++ve)if(K[ve].marker==ce.marker)continue e;K.push(ce)}}else re&&(R[k]=re)}return R}function Ea(e,r,R){for(var L=[],k=0;k<e.length;++k){var K=e[k];if(K.ranges){L.push(R?Li.prototype.deepCopy.call(K):K);continue}var re=K.changes,le=[];L.push({changes:le});for(var ce=0;ce<re.length;++ce){var ve=re[ce],Fe=void 0;if(le.push({from:ve.from,to:ve.to,text:ve.text}),r)for(var ze in ve)(Fe=ze.match(/^spans_(\d+)$/))&&(B(r,Number(Fe[1]))>-1&&(Be(le)[ze]=ve[ze],delete ve[ze]))}}return L}function Ao(e,r,R,L){if(L){var k=e.anchor;if(R){var K=xt(r,k)<0;K!=xt(R,k)<0?(k=r,r=R):K!=xt(r,R)<0&&(r=R)}return new lr(k,r)}else return new lr(R||r,r)}function so(e,r,R,L,k){k==null&&(k=e.cm&&(e.cm.display.shift||e.extend)),si(e,new Li([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),K=0;K<e.sel.ranges.length;K++)L[K]=Ao(e.sel.ranges[K],r[K],null,k);var re=Ki(e.cm,L,e.sel.primIndex);si(e,re,R)}function Lo(e,r,R,L){var k=e.sel.ranges.slice(0);k[r]=R,si(e,Ki(e.cm,k,e.sel.primIndex),L)}function ls(e,r,R,L){si(e,na(r,R),L)}function _l(e,r,R){var L={ranges:r.ranges,update:function(k){this.ranges=[];for(var K=0;K<k.length;K++)this.ranges[K]=new lr(mt(e,k[K].anchor),mt(e,k[K].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=Be(L);k&&k.ranges?(L[L.length-1]=r,lo(e,r,R)):si(e,r,R)}function si(e,r,R){lo(e,r,R),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,R)}function lo(e,r,R){(Ae(e,"beforeSelectionChange")||e.cm&&Ae(e.cm,"beforeSelectionChange"))&&(r=_l(e,r,R));var L=R&&R.bias||(xt(r.primary().head,e.sel.primary().head)<0?-1:1);cs(e,fs(e,r,L,!0)),!(R&&R.scroll===!1)&&e.cm&&wr(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,we(e.cm)),At(e,"cursorActivity",e)}function ds(e){cs(e,fs(e,e.sel,null,!1))}function fs(e,r,R,L){for(var k,K=0;K<r.ranges.length;K++){var re=r.ranges[K],le=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[K],ce=uo(e,re.anchor,le&&le.anchor,R,L),ve=uo(e,re.head,le&&le.head,R,L);(k||ce!=re.anchor||ve!=re.head)&&(k||(k=r.ranges.slice(0,K)),k[K]=new lr(ce,ve))}return k?Ki(e.cm,k,r.primIndex):r}function xa(e,r,R,L,k){var K=q(e,r.line);if(K.markedSpans)for(var re=0;re<K.markedSpans.length;++re){var le=K.markedSpans[re],ce=le.marker,ve="selectLeft"in ce?!ce.selectLeft:ce.inclusiveLeft,Fe="selectRight"in ce?!ce.selectRight:ce.inclusiveRight;if((le.from==null||(ve?le.from<=r.ch:le.from<r.ch))&&(le.to==null||(Fe?le.to>=r.ch:le.to>r.ch))){if(k&&(Ve(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(K.markedSpans){--re;continue}else break;if(!ce.atomic)continue;if(R){var ze=ce.find(L<0?1:-1),it=void 0;if((L<0?Fe:ve)&&(ze=hs(e,ze,-L,ze&&ze.line==r.line?K:null)),ze&&ze.line==r.line&&(it=xt(ze,R))&&(L<0?it<0:it>0))return xa(e,ze,r,L,k)}var et=ce.find(L<0?-1:1);return(L<0?ve:Fe)&&(et=hs(e,et,L,et.line==r.line?K:null)),et?xa(e,et,r,L,k):null}}return r}function uo(e,r,R,L,k){var K=L||1,re=xa(e,r,R,K,k)||!k&&xa(e,r,R,K,!0)||xa(e,r,R,-K,k)||!k&&xa(e,r,R,-K,!0);return re||(e.cantEdit=!0,nt(e.first,0))}function hs(e,r,R,L){return R<0&&r.ch==0?r.line>e.first?mt(e,nt(r.line-1)):null:R>0&&r.ch==(L||q(e,r.line)).text.length?r.line<e.first+e.size-1?nt(r.line+1,0):null:new nt(r.line,r.ch+R)}function ps(e){e.setSelection(nt(e.firstLine(),0),nt(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,K,re,le){k&&(L.from=mt(e,k)),K&&(L.to=mt(e,K)),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 Sa(e,r,R){if(e.cm){if(!e.cm.curOp)return $r(e.cm,Sa)(e,r,R);if(e.cm.state.suppressEdits)return}if((Ae(e,"beforeChange")||e.cm&&Ae(e.cm,"beforeChange"))&&(r=ms(e,r,!0),!r))return;var L=yi&&!R&&Ri(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]==""&&xt(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=[];ia(e,function(k,K){!K&&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,K,re=e.sel,le=r=="undo"?k.done:k.undone,ce=r=="undo"?k.undone:k.done,ve=0;ve<le.length&&!(K=le[ve],R?K.ranges&&!K.equals(e.sel):!K.ranges);ve++);if(ve==le.length)return;for(k.lastOrigin=k.lastSelOrigin=null;;)if(K=le.pop(),K.ranges){if(oo(K,ce),R&&!K.equals(e.sel)){si(e,K,{clearRedo:!1});return}re=K}else if(L){le.push(K);return}else break;var Fe=[];oo(re,ce),ce.push({changes:Fe,generation:k.generation}),k.generation=K.generation||++k.maxGeneration;for(var ze=Ae(e,"beforeChange")||e.cm&&Ae(e.cm,"beforeChange"),it=function(wt){var Pt=K.changes[wt];if(Pt.origin=r,ze&&!ms(e,Pt,!1))return le.length=0,{};Fe.push(Oo(e,Pt));var Bt=wt?wo(e,Pt):Be(le);Ha(e,Pt,Bt,os(e,Pt)),!wt&&e.cm&&e.cm.scrollIntoView({from:Pt.from,to:ra(Pt)});var Vt=[];ia(e,function(Wt,$t){!$t&&B(Vt,Wt.history)==-1&&(_s(Wt.history,Pt),Vt.push(Wt.history)),Ha(Wt,Pt,null,os(Wt,Pt))})},et=K.changes.length-1;et>=0;--et){var yt=it(et);if(yt)return yt.v}}function gs(e,r){if(r==0)return;if(e.first+=r,e.sel=new Li(Pe(e.sel.ranges,function(k){return new lr(nt(k.anchor.line+r,k.anchor.ch),nt(k.head.line+r,k.head.ch))}),e.sel.primIndex),e.cm){Ar(e.cm,e.first,e.first-r,r);for(var R=e.cm.display,L=R.viewFrom;L<R.viewTo;L++)Wr(e.cm,L,"gutter")}}function Ha(e,r,R,L){if(e.cm&&!e.cm.curOp)return $r(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:nt(e.first,0),to:nt(r.to.line+k,r.to.ch),text:[Be(r.text)],origin:r.origin}}var K=e.lastLine();r.to.line>K&&(r={from:r.from,to:nt(K,q(e,K).text.length),text:[r.text[0]],origin:r.origin}),r.removed=ne(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,nt(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,r,R){var L=e.doc,k=e.display,K=r.from,re=r.to,le=!1,ce=K.line;e.options.lineWrapping||(ce=He(tn(q(L,K.line))),L.iter(ce,re.line+1,function(et){if(et==k.maxLine)return le=!0,!0})),L.sel.contains(r.from,r.to)>-1&&we(e),Co(L,r,R,$n(e)),e.options.lineWrapping||(L.iter(ce,K.line+r.text.length,function(et){var yt=kr(et);yt>k.maxLineLength&&(k.maxLine=et,k.maxLineLength=yt,k.maxLineChanged=!0,le=!1)}),le&&(e.curOp.updateMaxLine=!0)),ur(L,K.line),Ba(e,400);var ve=r.text.length-(re.line-K.line)-1;r.full?Ar(e):K.line==re.line&&r.text.length==1&&!es(e.doc,r)?Wr(e,K.line,"text"):Ar(e,K.line,re.line+1,ve);var Fe=Ae(e,"changes"),ze=Ae(e,"change");if(ze||Fe){var it={from:K,to:re,text:r.text,removed:r.removed,origin:r.origin};ze&&At(e,"change",e,it),Fe&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(it)}e.display.selForContextMenu=null}function wa(e,r,R,L,k){var K;L||(L=R),xt(L,R)<0&&(K=[L,R],R=K[0],L=K[1]),typeof r=="string"&&(r=e.splitLines(r)),Sa(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 K=e[k],re=!0;if(K.ranges){K.copied||(K=e[k]=K.deepCopy(),K.copied=!0);for(var le=0;le<K.ranges.length;le++)ys(K.ranges[le].anchor,r,R,L),ys(K.ranges[le].head,r,R,L);continue}for(var ce=0;ce<K.changes.length;++ce){var ve=K.changes[ce];if(R<ve.from.line)ve.from=nt(ve.from.line+L,ve.from.ch),ve.to=nt(ve.to.line+L,ve.to.ch);else if(r<=ve.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,K=r;return typeof r=="number"?K=q(e,Mt(e,r)):k=He(r),k==null?null:(L(K,k)&&e.cm&&Wr(e.cm,k,R),K)}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,Fr(k),At(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 K=Math.min(r,k-e),re=L.height;if(L.removeInner(e,K),this.height-=re-L.height,k==K&&(this.children.splice(R--,1),L.parent=null),(r-=K)==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],K=k.chunkSize();if(e<=K){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-=K}},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],K=k.chunkSize();if(e<K){var re=Math.min(r,K-e);if(k.iterN(e,re,R))return!0;if((r-=re)==0)break;e=0}else e-=K}}};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 K=_n(this);xe(R,Math.max(0,R.height-K)),e&&(Ei(e,function(){Es(e,R,-K),Wr(e,L,"widget")}),At(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=_n(this)-r;if(!k)return;cr(this.doc,L)||xe(L,L.height+k),R&&Ei(R,function(){R.curOp.forceUpdate=!0,Es(R,L,k),At(R,"lineWidgetChanged",R,e,He(L))})},Oe(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),K=e.cm;return K&&k.noHScroll&&(K.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,K&&!cr(e,re)){var ce=pr(re)<e.scrollTop;xe(re,re.height+_n(k)),ce&&Ia(K,k.height),K.curOp.forceUpdate=!0}return!0}),K&&At(K,"lineWidgetAdded",K,k,typeof r=="number"?r:He(r)),k}var xs=0,aa=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++xs};aa.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&ha(e),Ae(this,"clear")){var R=this.find();R&&At(this,"clear",R.from,R.to)}for(var L=null,k=null,K=0;K<this.lines.length;++K){var re=this.lines[K],le=Mr(re.markedSpans,this);e&&!this.collapsed?Wr(e,He(re),"text"):e&&(le.to!=null&&(k=He(re)),le.from!=null&&(L=He(re))),re.markedSpans=Si(re.markedSpans,le),le.from==null&&this.collapsed&&!cr(this.doc,re)&&e&&xe(re,ji(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ce=0;ce<this.lines.length;++ce){var ve=tn(this.lines[ce]),Fe=kr(ve);Fe>e.display.maxLineLength&&(e.display.maxLine=ve,e.display.maxLineLength=Fe,e.display.maxLineChanged=!0)}L!=null&&e&&this.collapsed&&Ar(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&&At(e,"markerCleared",e,this,L,k),r&&pa(e),this.parent&&this.parent.clear()},aa.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var R,L,k=0;k<this.lines.length;++k){var K=this.lines[k],re=Mr(K.markedSpans,this);if(re.from!=null&&(R=nt(r?K:He(K),re.from),e==-1))return R;if(re.to!=null&&(L=nt(r?K:He(K),re.to),e==1))return L}return R&&{from:R,to:L}},aa.prototype.changed=function(){var e=this,r=this.find(-1,!0),R=this,L=this.doc.cm;if(!r||!L)return;Ei(L,function(){var k=r.line,K=He(r.line),re=an(L,K);if(re&&(It(re),L.curOp.selectionChanged=L.curOp.forceUpdate=!0),L.curOp.updateMaxLine=!0,!cr(R.doc,k)&&R.height!=null){var le=R.height;R.height=null;var ce=_n(R)-le;ce&&xe(k,k.height+ce)}At(L,"markerChanged",L,e)})},aa.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)},aa.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)}},Oe(aa);function Ta(e,r,R,L,k){if(L&&L.shared)return Sl(e,r,R,L,k);if(e.cm&&!e.cm.curOp)return $r(e.cm,Ta)(e,r,R,L,k);var K=new aa(e,k),re=xt(r,R);if(L&&G(L,K,!1),re>0||re==0&&K.clearWhenEmpty!==!1)return K;if(K.replacedWith&&(K.collapsed=!0,K.widgetNode=C("span",[K.replacedWith],"CodeMirror-widget"),L.handleMouseEvents||K.widgetNode.setAttribute("cm-ignore-events","true"),L.insertLeft&&(K.widgetNode.insertLeft=!0)),K.collapsed){if(la(e,r.line,r,R,K)||r.line!=R.line&&la(e,R.line,r,R,K))throw new Error("Inserting collapsed marker partially overlapping an existing one");Sr()}K.addToHistory&&is(e,{from:r,to:R,origin:"markText"},e.sel,NaN);var le=r.line,ce=e.cm,ve;if(e.iter(le,R.line+1,function(ze){ce&&K.collapsed&&!ce.options.lineWrapping&&tn(ze)==ce.display.maxLine&&(ve=!0),K.collapsed&&le!=r.line&&xe(ze,0),Or(ze,new Vr(K,le==r.line?r.ch:null,le==R.line?R.ch:null)),++le}),K.collapsed&&e.iter(r.line,R.line+1,function(ze){cr(e,ze)&&xe(ze,0)}),K.clearOnEnter&&Me(K,"beforeCursorEnter",function(){return K.clear()}),K.readOnly&&(Cr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),K.collapsed&&(K.id=++xs,K.atomic=!0),ce){if(ve&&(ce.curOp.updateMaxLine=!0),K.collapsed)Ar(ce,r.line,R.line+1);else if(K.className||K.startStyle||K.endStyle||K.css||K.attributes||K.title)for(var Fe=r.line;Fe<=R.line;Fe++)Wr(ce,Fe,"text");K.atomic&&ds(ce.doc),At(ce,"markerAdded",ce,K)}return K}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();At(this,"clear")},Ya.prototype.find=function(e,r){return this.primary.find(e,r)},Oe(Ya);function Sl(e,r,R,L,k){L=G(L),L.shared=!1;var K=[Ta(e,r,R,L,k)],re=K[0],le=L.widgetNode;return ia(e,function(ce){le&&(L.widgetNode=le.cloneNode(!0)),K.push(Ta(ce,mt(ce,r),mt(ce,R),L,k));for(var ve=0;ve<ce.linked.length;++ve)if(ce.linked[ve].isParent)return;re=Be(K)}),new Ya(K,re)}function Ss(e){return e.findMarks(nt(e.first,0),e.clipPos(nt(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(),K=e.clipPos(k.from),re=e.clipPos(k.to);if(xt(K,re)){var le=Ta(e,K,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],K=[k.primary.doc];ia(k.primary.doc,function(ce){return K.push(ce)});for(var re=0;re<k.markers.length;re++){var le=k.markers[re];B(K,le.doc)==-1&&(le.parent=null,k.markers.splice(re--,1))}},R=0;R<e.length;R++)r(R)}var Cl=0,pi=function(e,r,R,L,k){if(!(this instanceof pi))return new pi(e,r,R,L,k);R==null&&(R=0),Va.call(this,[new Ga([new er("",null)])]),this.first=R,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=R;var K=nt(R,0);this.sel=na(K),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:K,to:K,text:e}),si(this,na(K),oe)};pi.prototype=he(Va.prototype,{constructor:pi,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:qr(function(e){var r=nt(this.first,0),R=this.first+this.size-1;Sa(this,{from:r,to:nt(R,q(this,R).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Na(this.cm,0,0),si(this,na(r),oe)}),replaceRange:function(e,r,R,L){r=mt(this,r),R=R?mt(this,R):r,wa(this,e,r,R,L)},getRange:function(e,r,R){var L=ne(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(Et(this,e))return q(this,e)},getLineNumber:function(e){return He(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=q(this,e)),tn(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:qr(function(e,r,R){ls(this,mt(this,typeof e=="number"?nt(e,r||0):e),null,R)}),setSelection:qr(function(e,r,R){ls(this,mt(this,e),mt(this,r||e),R)}),extendSelection:qr(function(e,r,R){so(this,mt(this,e),r&&mt(this,r),R)}),extendSelections:qr(function(e,r){ss(this,En(this,e),r)}),extendSelectionsBy:qr(function(e,r){var R=Pe(this.sel.ranges,e);ss(this,En(this,R),r)}),setSelections:qr(function(e,r,R){if(!e.length)return;for(var L=[],k=0;k<e.length;k++)L[k]=new lr(mt(this,e[k].anchor),mt(this,e[k].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),si(this,Ki(this.cm,L,r),R)}),addSelection:qr(function(e,r,R){var L=this.sel.ranges.slice(0);L.push(new lr(mt(this,e),mt(this,r||e))),si(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=ne(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=ne(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:qr(function(e,r,R){for(var L=[],k=this.sel,K=0;K<k.ranges.length;K++){var re=k.ranges[K];L[K]={from:re.from(),to:re.to(),text:this.splitLines(e[K]),origin:R}}for(var le=r&&r!="end"&&hl(this,L,r),ce=L.length-1;ce>=0;ce--)Sa(this,L[ce]);le?us(this,le):this.cm&&wr(this.cm)}),undo:qr(function(){co(this,"undo")}),redo:qr(function(){co(this,"redo")}),undoSelection:qr(function(){co(this,"undo",!0)}),redoSelection:qr(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),ia(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:Ea(this.history.done),undone:Ea(this.history.undone)}},setHistory:function(e){var r=this.history=new ao(this.history.maxGeneration);r.done=Ea(e.done.slice(0),null,!0),r.undone=Ea(e.undone.slice(0),null,!0)},setGutterMarker:qr(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:qr(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(!Et(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:qr(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(m(R).test(L[k]))return!1;L[k]+=" "+R}return!0})}),removeLineClass:qr(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",K=L[k];if(K)if(R==null)L[k]=null;else{var re=K.match(m(R));if(!re)return!1;var le=re.index+re[0].length;L[k]=K.slice(0,re.index)+(!re.index||le==K.length?"":" ")+K.slice(le)||null}else return!1;return!0})}),addLineWidget:qr(function(e,r,R){return xl(this,e,r,R)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,R){return Ta(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),Ta(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(K){var re=K.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 K=k.text.length+L;if(K>e)return r=e,!0;e-=K,++R}),mt(this,nt(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 pi(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 pi(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 Tr&&(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];ia(e,function(k){return L.push(k.id)},!0),e.history=new ao(null),e.history.done=Ea(this.history.done,L),e.history.undone=Ea(this.history.undone,L)}},iterLinkedDocs:function(e){ia(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:qr(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)})}),pi.prototype.eachLine=pi.prototype.iter;var ws=0;function Ol(e){var r=this;if(Ts(r),Ke(r,e)||wn(r.display,e))return;fe(e),O&&(ws=+new Date);var R=Ln(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,K=Array(k),re=0,le=function(){++re==k&&$r(r,function(){R=mt(r.doc,R);var et={from:R,to:R,text:r.doc.splitLines(K.filter(function(yt){return yt!=null}).join(r.doc.lineSeparator())),origin:"paste"};Sa(r.doc,et),us(r.doc,na(mt(r.doc,R),mt(r.doc,ra(et))))})()},ce=function(et,yt){if(r.options.allowDropFileTypes&&B(r.options.allowDropFileTypes,et.type)==-1){le();return}var wt=new FileReader;wt.onerror=function(){return le()},wt.onload=function(){var Pt=wt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Pt)){le();return}K[yt]=Pt,le()},wt.readAsText(et)},ve=0;ve<L.length;ve++)ce(L[ve],ve);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 Fe=e.dataTransfer.getData("Text");if(Fe){var ze;if(r.state.draggingText&&!r.state.draggingText.copy&&(ze=r.listSelections()),lo(r.doc,na(R,R)),ze)for(var it=0;it<ze.length;++it)wa(r.doc,"",ze[it].anchor,ze[it].head,"drag");r.replaceSelection(Fe,"around","paste"),r.display.input.focus()}}catch(et){}}}function Al(e,r){if(O&&(!e.state.draggingText||+new Date-ws<100)){be(r);return}if(Ke(e,r)||wn(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!a){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=Ln(e,r);if(!R)return;var L=document.createDocumentFragment();zt(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)),o(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 K=0;K<R.length;K++)e(R[K])})}var Os=!1;function Rl(){if(Os)return;Dl(),Os=!0}function Dl(){var e;Me(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Cs(Pl)},100))}),Me(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 oa={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++)oa[$a+48]=oa[$a+96]=String($a);for(var fo=65;fo<=90;fo++)oa[fo]=String.fromCharCode(fo);for(var qa=1;qa<=12;qa++)oa[qa+111]=oa[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,K,re=0;re<r.length-1;re++){var le=r[re];if(/^(cmd|meta|m)$/i.test(le))K=!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),K&&(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=Pe(R.split(" "),Ml),K=0;K<k.length;K++){var re=void 0,le=void 0;K==k.length-1?(le=k.join(" "),re=L):(le=k.slice(0,K+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 ve in r)e[ve]=r[ve];return e}function Ca(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 Ca(e,r.fallthrough,R,L);for(var K=0;K<r.fallthrough.length;K++){var re=Ca(e,r.fallthrough[K],R,L);if(re)return re}}}function As(e){var r=typeof e=="string"?e:oa[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=oa[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 Oa(e,r){for(var R=e.doc.sel.ranges,L=[],k=0;k<R.length;k++){for(var K=r(R[k]);L.length&&xt(K.from,Be(L).to)<=0;){var re=L.pop();if(xt(re.from,K.from)<0){K.from=re.from;break}}L.push(K)}Ei(e,function(){for(var le=L.length-1;le>=0;le--)wa(e.doc,"",L[le].from,L[le].to,"+delete");wr(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 nt(r.line,L,R<0?"after":"before")}function Po(e,r,R,L,k){if(e){r.doc.direction=="rtl"&&(k=-k);var K=rt(R,r.doc.direction);if(K){var re=k<0?Be(K):K[0],le=k<0==(re.level==1),ce=le?"after":"before",ve;if(re.level>0||r.doc.direction=="rtl"){var Fe=Hn(r,R);ve=k<0?R.text.length-1:0;var ze=Xn(r,Fe,ve).top;ve=$(function(it){return Xn(r,Fe,it).top==ze},k<0==(re.level==1)?re.from:re.to-1,ve),ce=="before"&&(ve=Ro(R,ve,1))}else ve=k<0?re.to:re.from;return new nt(L,ve,ce)}}return new nt(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 K=me(k,R.ch,R.sticky),re=k[K];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(Bt,Vt){return Ro(r,Bt instanceof nt?Bt.ch:Bt,Vt)},ce,ve=function(Bt){return e.options.lineWrapping?(ce=ce||Hn(e,r),Ci(e,r,ce,Bt)):{begin:0,end:r.text.length}},Fe=ve(R.sticky=="before"?le(R,-1):R.ch);if(e.doc.direction=="rtl"||re.level==1){var ze=re.level==1==L<0,it=le(R,ze?1:-1);if(it!=null&&(ze?it<=re.to&&it<=Fe.end:it>=re.from&&it>=Fe.begin)){var et=ze?"before":"after";return new nt(R.line,it,et)}}var yt=function(Bt,Vt,Wt){for(var $t=function(br,Qr){return Qr?new nt(R.line,le(br,1),"before"):new nt(R.line,br,"after")};Bt>=0&&Bt<k.length;Bt+=Vt){var yn=k[Bt],ln=Vt>0==(yn.level!=1),Wn=ln?Wt.begin:le(Wt.end,-1);if(yn.from<=Wn&&Wn<yn.to)return $t(Wn,ln);if(Wn=ln?yn.from:le(yn.to,-1),Wt.begin<=Wn&&Wn<Wt.end)return $t(Wn,ln)}},wt=yt(K+L,L,Fe);if(wt)return wt;var Pt=L>0?Fe.end:le(Fe.begin,-1);return Pt!=null&&!(L>0&&Pt==r.text.length)&&(wt=yt(L>0?0:k.length-1,L,ve(Pt)),wt)?wt:null}var Qa={selectAll:ps,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),oe)},killLine:function(e){return Oa(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:nt(r.head.line+1,0)}:{from:r.head,to:nt(r.head.line,R)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return Oa(e,function(r){return{from:nt(r.from().line,0),to:mt(e.doc,nt(r.to().line+1,0))}})},delLineLeft:function(e){return Oa(e,function(r){return{from:nt(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return Oa(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 Oa(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(nt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(nt(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 K=R[k].from(),re=X(e.getLine(K.line),K.ch,L);r.push(Ce(L-re%L))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ei(e,function(){for(var r=e.listSelections(),R=[],L=0;L<r.length;L++){if(!r[L].empty())continue;var k=r[L].head,K=q(e.doc,k.line).text;if(K){if(k.ch==K.length&&(k=new nt(k.line,k.ch-1)),k.ch>0)k=new nt(k.line,k.ch+1),e.replaceRange(K.charAt(k.ch-1)+K.charAt(k.ch-2),nt(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 nt(k.line,1),e.replaceRange(K.charAt(0)+e.doc.lineSeparator()+re.charAt(re.length-1),nt(k.line-1,re.length-1),k,"+transpose"))}}R.push(new lr(k,k))}e.setSelections(R)})},newlineAndIndent:function(e){return Ei(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);wr(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=tn(R);return L!=R&&(r=He(L)),Po(!0,e,L,r,1)}function Nl(e,r){var R=q(e.doc,r),L=xn(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 K=Math.max(R.ch,L.text.search(/\S/)),re=r.line==R.line&&r.ch<=K&&r.ch;return nt(R.line,re?0:K,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=Ca(r,e.state.keyMaps[L],R,e);if(k)return k}return e.options.extraKeys&&Ca(r,e.options.extraKeys,R,e)||Ca(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"&&At(e,"keyHandled",e,r,R),(k=="handled"||k=="multi")&&(fe(R),Ir(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;O&&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)&&(g(r,"CodeMirror-crosshair"),tt(document,"keyup",R),tt(document,"mouseover",R))}Me(document,"keyup",R),Me(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(wn(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,fe(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&&xt(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,wn(R,e)){l||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(Io(r,e))return;var L=Ln(r,e),k=qe(e),K=L?Kl(L,k):"single";if(window.focus(),k==1&&r.state.selectingText&&r.state.selectingText(e),L&&Hl(r,k,L,K,e))return;k==1?L?Gl(r,L,K,e):Ge(e)==R.scroller&&fe(e):k==2?(L&&so(r.doc,L),setTimeout(function(){return R.input.focus()},20)):k==3&&(b?r.display.input.onContextMenu(e):ca(r))}function Hl(e,r,R,L,k){var K="Click";return L=="double"?K="Double"+K:L=="triple"&&(K="Triple"+K),K=(r==1?"Left":r==2?"Middle":"Right")+K,Ja(e,Ls(K,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 K=c?R.shiftKey&&R.metaKey:R.altKey;k.unit=K?"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){O?setTimeout(j(Nr,e),0):e.curOp.focus=I();var k=zl(e,R,L),K=e.doc.sel,re;e.options.dragDrop&&pt&&!e.isReadOnly()&&R=="single"&&(re=K.contains(r))>-1&&(xt((re=K.ranges[re]).from(),r)<0||r.xRel>0)&&(xt(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,K=!1,re=$r(e,function(ve){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),K||(fe(ve),L.addNew||so(e.doc,R,null,null,L.extend),l&&!a||O&&T==9?setTimeout(function(){k.wrapper.ownerDocument.body.focus({preventScroll:!0}),k.input.focus()},20):k.input.focus())}),le=function(ve){K=K||Math.abs(r.clientX-ve.clientX)+Math.abs(r.clientY-ve.clientY)>=10},ce=function(){return K=!0};l&&(k.scroller.draggable=!0),e.state.draggingText=re,re.copy=!L.moveOnDrag,k.scroller.dragDrop&&k.scroller.dragDrop(),Me(k.wrapper.ownerDocument,"mouseup",re),Me(k.wrapper.ownerDocument,"mousemove",le),Me(k.scroller,"dragstart",ce),Me(k.scroller,"drop",re),ca(e),setTimeout(function(){return k.input.focus()},20)}function Fs(e,r,R){if(R=="char")return new lr(r,r);if(R=="word")return e.findWordAt(r);if(R=="line")return new lr(nt(r.line,0),mt(e.doc,nt(r.line+1,0)));var L=R(e,r);return new lr(L.from,L.to)}function Xl(e,r,R,L){var k=e.display,K=e.doc;fe(r);var re,le,ce=K.sel,ve=ce.ranges;if(L.addNew&&!L.extend?(le=K.sel.contains(R),le>-1?re=ve[le]:re=new lr(R,R)):(re=K.sel.primary(),le=K.sel.primIndex),L.unit=="rectangle")L.addNew||(re=new lr(R,R)),R=Ln(e,r,!0,!0),le=-1;else{var Fe=Fs(e,R,L.unit);L.extend?re=Ao(re,Fe.anchor,Fe.head,L.extend):re=Fe}L.addNew?le==-1?(le=ve.length,si(K,Ki(e,ve.concat([re]),le),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[le].empty()&&L.unit=="char"&&!L.extend?(si(K,Ki(e,ve.slice(0,le).concat(ve.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ce=K.sel):Lo(K,le,re,Ee):(le=0,si(K,new Li([re],0),Ee),ce=K.sel);var ze=R;function it(Wt){if(xt(ze,Wt)==0)return;if(ze=Wt,L.unit=="rectangle"){for(var $t=[],yn=e.options.tabSize,ln=X(q(K,R.line).text,R.ch,yn),Wn=X(q(K,Wt.line).text,Wt.ch,yn),br=Math.min(ln,Wn),Qr=Math.max(ln,Wn),Lr=Math.min(R.line,Wt.line),xi=Math.min(e.lastLine(),Math.max(R.line,Wt.line));Lr<=xi;Lr++){var mi=q(K,Lr).text,Kr=Le(mi,br,yn);br==Qr?$t.push(new lr(nt(Lr,Kr),nt(Lr,Kr))):mi.length>Kr&&$t.push(new lr(nt(Lr,Kr),nt(Lr,Le(mi,Qr,yn))))}$t.length||$t.push(new lr(R,R)),si(K,Ki(e,ce.ranges.slice(0,le).concat($t),le),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Wt)}else{var vi=re,ni=Fs(e,Wt,L.unit),Gr=vi.anchor,Hr;xt(ni.anchor,Gr)>0?(Hr=ni.head,Gr=Xt(vi.from(),ni.anchor)):(Hr=ni.anchor,Gr=Qt(vi.to(),ni.head));var Pr=ce.ranges.slice(0);Pr[le]=Yl(e,new lr(mt(K,Gr),Hr)),si(K,Ki(e,Pr,le),Ee)}}var et=k.wrapper.getBoundingClientRect(),yt=0;function wt(Wt){var $t=++yt,yn=Ln(e,Wt,!0,L.unit=="rectangle");if(!yn)return;if(xt(yn,ze)!=0){e.curOp.focus=I(),it(yn);var ln=Ii(k,K);(yn.line>=ln.to||yn.line<ln.from)&&setTimeout($r(e,function(){yt==$t&&wt(Wt)}),150)}else{var Wn=Wt.clientY<et.top?-20:Wt.clientY>et.bottom?20:0;Wn&&setTimeout($r(e,function(){if(yt!=$t)return;k.scroller.scrollTop+=Wn,wt(Wt)}),50)}}function Pt(Wt){e.state.selectingText=!1,yt=Infinity,Wt&&(fe(Wt),k.input.focus()),tt(k.wrapper.ownerDocument,"mousemove",Bt),tt(k.wrapper.ownerDocument,"mouseup",Vt),K.history.lastSelOrigin=null}var Bt=$r(e,function(Wt){Wt.buttons===0||!qe(Wt)?Pt(Wt):wt(Wt)}),Vt=$r(e,Pt);e.state.selectingText=Vt,Me(k.wrapper.ownerDocument,"mousemove",Bt),Me(k.wrapper.ownerDocument,"mouseup",Vt)}function Yl(e,r){var R=r.anchor,L=r.head,k=q(e.doc,R.line);if(xt(R,L)==0&&R.sticky==L.sticky)return r;var K=rt(k);if(!K)return r;var re=me(K,R.ch,R.sticky),le=K[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==K.length)return r;var ve;if(L.line!=R.line)ve=(L.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Fe=me(K,L.ch,L.sticky),ze=Fe-re||(L.ch-R.ch)*(le.level==1?-1:1);Fe==ce-1||Fe==ce?ve=ze<0:ve=ze>0}var it=K[ce+(ve?-1:0)],et=ve==(it.level==1),yt=et?it.from:it.to,wt=et?"after":"before";return R.ch==yt&&R.sticky==wt?r:new lr(new nt(R.line,yt,wt),L)}function Bs(e,r,R,L){var k,K;if(r.touches)k=r.touches[0].clientX,K=r.touches[0].clientY;else try{k=r.clientX,K=r.clientY}catch(it){return!1}if(k>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;L&&fe(r);var re=e.display,le=re.lineDiv.getBoundingClientRect();if(K>le.bottom||!Ae(e,R))return _e(r);K-=le.top-re.viewOffset;for(var ce=0;ce<e.display.gutterSpecs.length;++ce){var ve=re.gutters.childNodes[ce];if(ve&&ve.getBoundingClientRect().right>=k){var Fe=Je(e.doc,K),ze=e.display.gutterSpecs[ce];return Ve(e,R,e,Fe,ze.className,r),_e(r)}}}function Io(e,r){return Bs(e,r,"gutterClick",!0)}function Ws(e,r){if(wn(e.display,r)||$l(e,r))return;if(Ke(e,r,"contextmenu"))return;b||e.display.input.onContextMenu(r)}function $l(e,r){return Ae(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-"),Ht(e)}var Aa={toString:function(){return"CodeMirror.Init"}},Hs={},mo={};function ql(e){var r=e.optionHandlers;function R(L,k,K,re){e.defaults[L]=k,K&&(r[L]=re?function(le,ce,ve){ve!=Aa&&K(le,ce,ve)}:K)}e.defineOption=R,e.Init=Aa,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),Ht(L),Ar(L)},!0),R("lineSeparator",null,function(L,k){if(L.doc.lineSep=k,!k)return;var K=[],re=L.doc.first;L.doc.iter(function(ce){for(var ve=0;;){var Fe=ce.text.indexOf(k,ve);if(Fe==-1)break;ve=Fe+k.length,K.push(nt(re,Fe))}re++});for(var le=K.length-1;le>=0;le--)wa(L.doc,k,K[le],nt(K[le].line,K[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,K){L.state.specialChars=new RegExp(k.source+(k.test(" ")?"":"| "),"g"),K!=Aa&&L.refresh()}),R("specialCharPlaceholder",Pa,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,K){var re=ho(k),le=K!=Aa&&ho(K);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?zn(L.display)+"px":"0",L.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(L){return _a(L)},!0),R("scrollbarStyle","native",function(L){Go(L),_a(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,hn,!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,hn,!0),R("singleCursorHeightPerLine",!0,hn,!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!=Aa;if(!r!=!L){var k=e.display.dragFunctions,K=r?Me:tt;K(e.display.scroller,"dragstart",k.start),K(e.display.scroller,"dragenter",k.enter),K(e.display.scroller,"dragover",k.over),K(e.display.scroller,"dragleave",k.leave),K(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):(g(e.display.wrapper,"CodeMirror-wrap"),oi(e)),Dr(e),Ar(e),Ht(e),setTimeout(function(){return _a(e)},100)}function Tr(e,r){var R=this;if(!(this instanceof Tr))return new Tr(e,r);this.options=r=r?G(r):{},G(Hs,r,!1);var L=r.value;typeof L=="string"?L=new pi(L,r.mode,null,r.lineSeparator,r.direction):r.mode&&(L.modeOption=r.mode),this.doc=L;var k=new Tr.inputStyles[r.inputStyle](this),K=this.display=new dl(e,L,k,r);K.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&&K.input.focus(),O&&T<11&&setTimeout(function(){return R.display.input.reset(!0)},20),Zl(this),Rl(),ha(this),this.curOp.forceUpdate=!0,ts(this,L),r.autofocus&&!n||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&rn(R)},20):ki(this);for(var re in mo)mo.hasOwnProperty(re)&&mo[re](this,r[re],Aa);Yo(this),r.finishInit&&r.finishInit(this);for(var le=0;le<No.length;++le)No[le](this);pa(this),l&&r.lineWrapping&&getComputedStyle(K.lineDiv).textRendering=="optimizelegibility"&&(K.lineDiv.style.textRendering="auto")}Tr.defaults=Hs,Tr.optionHandlers=mo;function Zl(e){var r=e.display;Me(r.scroller,"mousedown",$r(e,js)),O&&T<11?Me(r.scroller,"dblclick",$r(e,function(ce){if(Ke(e,ce))return;var ve=Ln(e,ce);if(!ve||Io(e,ce)||wn(e.display,ce))return;fe(ce);var Fe=e.findWordAt(ve);so(e.doc,Fe.anchor,Fe.head)})):Me(r.scroller,"dblclick",function(ce){return Ke(e,ce)||fe(ce)}),Me(r.scroller,"contextmenu",function(ce){return Ws(e,ce)}),Me(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 K(ce){if(ce.touches.length!=1)return!1;var ve=ce.touches[0];return ve.radiusX<=1&&ve.radiusY<=1}function re(ce,ve){if(ve.left==null)return!0;var Fe=ve.left-ce.left,ze=ve.top-ce.top;return Fe*Fe+ze*ze>20*20}Me(r.scroller,"touchstart",function(ce){if(!Ke(e,ce)&&!K(ce)&&!Io(e,ce)){r.input.ensurePolled(),clearTimeout(R);var ve=+new Date;r.activeTouch={start:ve,moved:!1,prev:ve-L.end<=300?L:null},ce.touches.length==1&&(r.activeTouch.left=ce.touches[0].pageX,r.activeTouch.top=ce.touches[0].pageY)}}),Me(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Me(r.scroller,"touchend",function(ce){var ve=r.activeTouch;if(ve&&!wn(r,ce)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var Fe=e.coordsChar(r.activeTouch,"page"),ze;!ve.prev||re(ve,ve.prev)?ze=new lr(Fe,Fe):!ve.prev.prev||re(ve,ve.prev.prev)?ze=e.findWordAt(Fe):ze=new lr(nt(Fe.line,0),mt(e.doc,nt(Fe.line+1,0))),e.setSelection(ze.anchor,ze.head),e.focus(),fe(ce)}k()}),Me(r.scroller,"touchcancel",k),Me(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Ua(e,r.scroller.scrollTop),da(e,r.scroller.scrollLeft,!0),Ve(e,"scroll",e))}),Me(r.scroller,"mousewheel",function(ce){return Qo(e,ce)}),Me(r.scroller,"DOMMouseScroll",function(ce){return Qo(e,ce)}),Me(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:$r(e,Ol),leave:function(ce){Ke(e,ce)||Ts(e)}};var le=r.input.getField();Me(le,"keyup",function(ce){return Ns.call(e,ce)}),Me(le,"keydown",$r(e,Is)),Me(le,"keypress",$r(e,Us)),Me(le,"focus",function(ce){return rn(e,ce)}),Me(le,"blur",function(ce){return ki(e,ce)})}var No=[];Tr.defineInitHook=function(e){return No.push(e)};function to(e,r,R,L){var k=e.doc,K;R==null&&(R="add"),R=="smart"&&(k.mode.indent?K=mn(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 ve=le.text.match(/^\s*/)[0],Fe;if(!L&&!/\S/.test(le.text))Fe=0,R="not";else if(R=="smart"&&(Fe=k.mode.indent(K,le.text.slice(ve.length),le.text),Fe==ie||Fe>150)){if(!L)return;R="prev"}R=="prev"?r>k.first?Fe=X(q(k,r-1).text,null,re):Fe=0:R=="add"?Fe=ce+e.options.indentUnit:R=="subtract"?Fe=ce-e.options.indentUnit:typeof R=="number"&&(Fe=ce+R),Fe=Math.max(0,Fe);var ze="",it=0;if(e.options.indentWithTabs)for(var et=Math.floor(Fe/re);et;--et)it+=re,ze+=" ";if(it<Fe&&(ze+=Ce(Fe-it)),ze!=ve)return wa(k,ze,nt(r,0),nt(r,ve.length),"+input"),le.stateAfter=null,!0;for(var yt=0;yt<k.sel.ranges.length;yt++){var wt=k.sel.ranges[yt];if(wt.head.line==r&&wt.head.ch<ve.length){var Pt=nt(r,ve.length);Lo(k,yt,new lr(Pt,Pt));break}}}var Hi=null;function vo(e){Hi=e}function Uo(e,r,R,L,k){var K=e.doc;e.display.shift=!1,L||(L=K.sel);var re=+new Date-200,le=k=="paste"||e.state.pasteIncoming>re,ce=lt(r),ve=null;if(le&&L.ranges.length>1)if(Hi&&Hi.text.join(`
|
|
|
`)==r){if(L.ranges.length%Hi.text.length==0){ve=[];for(var Fe=0;Fe<Hi.text.length;Fe++)ve.push(K.splitLines(Hi.text[Fe]))}}else ce.length==L.ranges.length&&e.options.pasteLinesPerSelection&&(ve=Pe(ce,function(Bt){return[Bt]}));for(var ze=e.curOp.updateInput,it=L.ranges.length-1;it>=0;it--){var et=L.ranges[it],yt=et.from(),wt=et.to();et.empty()&&(R&&R>0?yt=nt(yt.line,yt.ch-R):e.state.overwrite&&!le?wt=nt(wt.line,Math.min(q(K,wt.line).text.length,wt.ch+Be(ce).length)):le&&Hi&&Hi.lineWise&&Hi.text.join(`
|
|
|
`)==ce.join(`
|
|
|
`)&&(yt=wt=nt(yt.line,0)));var Pt={from:yt,to:wt,text:ve?ve[it%ve.length]:ce,origin:k||(le?"paste":e.state.cutIncoming>re?"cut":"+input")};Sa(e.doc,Pt),At(e,"inputRead",e,Pt)}r&&!le&&Gs(e,r),wr(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&&Ei(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 K=e.getModeAt(k.head),re=!1;if(K.electricChars){for(var le=0;le<K.electricChars.length;le++)if(r.indexOf(K.electricChars.charAt(le))>-1){re=to(e,k.head.line,"smart");break}}else K.electricInput&&(K.electricInput.test(q(e.doc,k.head.line).text.slice(0,k.head.ch))&&(re=to(e,k.head.line,"smart")));re&&At(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,K={anchor:nt(k,0),head:nt(k+1,0)};R.push(K),r.push(e.getRange(K.anchor,K.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 K=this.options,re=K[L];if(K[L]==k&&L!="mode")return;K[L]=k,r.hasOwnProperty(L)&&$r(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,K=0;K<k.length;++K)if(k[K]==L||k[K].name==L)return k.splice(K,1),!0},addOverlay:ci(function(L,k){var K=L.token?L:e.getMode(this.options,L);if(K.startState)throw new Error("Overlays may not be stateful.");ke(this.state.overlays,{mode:K,modeSpec:L,opaque:k&&k.opaque,priority:k&&k.priority||0},function(re){return re.priority}),this.state.modeGen++,Ar(this)}),removeOverlay:ci(function(L){for(var k=this.state.overlays,K=0;K<k.length;++K){var re=k[K].modeSpec;if(re==L||typeof L=="string"&&re.name==L){k.splice(K,1),this.state.modeGen++,Ar(this);return}}}),indentLine:ci(function(L,k,K){typeof k!="string"&&typeof k!="number"&&(k==null?k=this.options.smartIndent?"smart":"prev":k=k?"add":"subtract"),Et(this.doc,L)&&to(this,L,k,K)}),indentSelection:ci(function(L){for(var k=this.doc.sel.ranges,K=-1,re=0;re<k.length;re++){var le=k[re];if(le.empty())le.head.line>K&&(to(this,le.head.line,L,!0),K=le.head.line,re==this.doc.sel.primIndex&&wr(this));else{var ce=le.from(),ve=le.to(),Fe=Math.max(K,ce.line);K=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var ze=Fe;ze<K;++ze)to(this,ze,L);var it=this.doc.sel.ranges;ce.ch==0&&k.length==it.length&&it[re].from().ch>0&&Lo(this.doc,re,new lr(ce,it[re].to()),oe)}}}),getTokenAt:function(L,k){return _r(this,L,k)},getLineTokens:function(L,k){return _r(this,nt(L),k,!0)},getTokenTypeAt:function(L){L=mt(this.doc,L);var k=ar(this,q(this.doc,L.line)),K=0,re=(k.length-1)/2,le=L.ch,ce;if(le==0)ce=k[2];else for(;;){var ve=K+re>>1;if((ve?k[ve*2-1]:0)>=le)re=ve;else if(k[ve*2+1]<le)K=ve+1;else{ce=k[ve*2+2];break}}var Fe=ce?ce.indexOf("overlay "):-1;return Fe<0?ce:Fe==0?null:ce.slice(0,Fe-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 K=[];if(!R.hasOwnProperty(k))return K;var re=R[k],le=this.getModeAt(L);if(typeof le[k]=="string")re[le[k]]&&K.push(re[le[k]]);else if(le[k])for(var ce=0;ce<le[k].length;ce++){var ve=re[le[k][ce]];ve&&K.push(ve)}else le.helperType&&re[le.helperType]?K.push(re[le.helperType]):re[le.name]&&K.push(re[le.name]);for(var Fe=0;Fe<re._global.length;Fe++){var ze=re._global[Fe];ze.pred(le,this)&&B(K,ze.val)==-1&&K.push(ze.val)}return K},getStateAfter:function(L,k){var K=this.doc;return L=Mt(K,L==null?K.first+K.size-1:L),mn(this,L+1,k).state},cursorCoords:function(L,k){var K,re=this.doc.sel.primary();return L==null?K=re.head:typeof L=="object"?K=mt(this.doc,L):K=L?re.from():re.to(),In(this,K,k||"page")},charCoords:function(L,k){return pn(this,mt(this.doc,L),k||"page")},coordsChar:function(L,k){return L=On(this,L,k||"page"),Er(this,L.left,L.top)},lineAtHeight:function(L,k){return L=On(this,{top:L,left:0},k||"page").top,Je(this.doc,L+this.display.viewOffset)},heightAtLine:function(L,k,K){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 sn(this,le,{top:0,left:0},k||"page",K||re).top+(re?this.doc.height-pr(le):0)},defaultTextHeight:function(){return ji(this.display)},defaultCharWidth:function(){return Nn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(L,k,K,re,le){var ce=this.display;L=In(this,mt(this.doc,L));var ve=L.bottom,Fe=L.left;if(k.style.position="absolute",k.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(k),ce.sizer.appendChild(k),re=="over")ve=L.top;else if(re=="above"||re=="near"){var ze=Math.max(ce.wrapper.clientHeight,this.doc.height),it=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(re=="above"||L.bottom+k.offsetHeight>ze)&&L.top>k.offsetHeight?ve=L.top-k.offsetHeight:L.bottom+k.offsetHeight<=ze&&(ve=L.bottom),Fe+k.offsetWidth>it&&(Fe=it-k.offsetWidth)}k.style.top=ve+"px",k.style.left=k.style.right="",le=="right"?(Fe=ce.sizer.clientWidth-k.offsetWidth,k.style.right="0px"):(le=="left"?Fe=0:le=="middle"&&(Fe=(ce.sizer.clientWidth-k.offsetWidth)/2),k.style.left=Fe+"px"),K&&ta(this,{left:Fe,top:ve,right:Fe+k.offsetWidth,bottom:ve+k.offsetHeight})},triggerOnKeyDown:ci(Is),triggerOnKeyPress:ci(Us),triggerOnKeyUp:Ns,triggerOnMouseDown:ci(js),execCommand:function(L){if(Qa.hasOwnProperty(L))return Qa[L].call(null,this)},triggerElectric:ci(function(L){Gs(this,L)}),findPosH:function(L,k,K,re){var le=1;k<0&&(le=-1,k=-k);for(var ce=mt(this.doc,L),ve=0;ve<k&&!(ce=jo(this.doc,ce,le,K,re),ce.hitSide);++ve);return ce},moveH:ci(function(L,k){var K=this;this.extendSelectionsBy(function(re){return K.display.shift||K.doc.extend||re.empty()?jo(K.doc,re.head,L,k,K.options.rtlMoveVisually):L<0?re.from():re.to()},ye)}),deleteH:ci(function(L,k){var K=this.doc.sel,re=this.doc;K.somethingSelected()?re.replaceSelection("",null,"+delete"):Oa(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,K,re){var le=1,ce=re;k<0&&(le=-1,k=-k);for(var ve=mt(this.doc,L),Fe=0;Fe<k;++Fe){var ze=In(this,ve,"div");if(ce==null?ce=ze.left:ze.left=ce,ve=$s(this,ze,le,K),ve.hitSide)break}return ve},moveV:ci(function(L,k){var K=this,re=this.doc,le=[],ce=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(Fe){if(ce)return L<0?Fe.from():Fe.to();var ze=In(K,Fe.head,"div");Fe.goalColumn!=null&&(ze.left=Fe.goalColumn),le.push(ze.left);var it=$s(K,ze,L,k);return k=="page"&&Fe==re.sel.primary()&&Ia(K,pn(K,it,"div").top-ze.top),it},ye),le.length)for(var ve=0;ve<re.sel.ranges.length;ve++)re.sel.ranges[ve].goalColumn=le[ve]}),findWordAt:function(L){var k=this.doc,K=q(k,L.line).text,re=L.ch,le=L.ch;if(K){var ce=this.getHelper(L,"wordChars");(L.sticky=="before"||le==K.length)&&re?--re:++le;for(var ve=K.charAt(re),Fe=Ue(ve,ce)?function(ze){return Ue(ze,ce)}:/\s/.test(ve)?function(ze){return/\s/.test(ze)}:function(ze){return!/\s/.test(ze)&&!Ue(ze)};re>0&&Fe(K.charAt(re-1));)--re;for(;le<K.length&&Fe(K.charAt(le));)++le}return new lr(nt(L.line,re),nt(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"):g(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:ci(function(L,k){Na(this,L,k)}),getScrollInfo:function(){var L=this.display.scroller;return{left:L.scrollLeft,top:L.scrollTop,height:L.scrollHeight-qn(this)-this.display.barHeight,width:L.scrollWidth-qn(this)-this.display.barWidth,clientHeight:dr(this),clientWidth:rr(this)}},scrollIntoView:ci(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:nt(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:ci(function(L,k){var K=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&&Ut(this);var le=this.display.viewFrom;this.doc.iter(le,this.display.viewTo,function(ce){if(ce.widgets){for(var ve=0;ve<ce.widgets.length;ve++)if(ce.widgets[ve].noHScroll){Wr(K,le,"widget");break}}++le}),this.curOp.forceUpdate=!0,Ve(this,"refresh",this)}),operation:function(L){return Ei(this,L)},startOperation:function(){return ha(this)},endOperation:function(){return pa(this)},refresh:ci(function(){var L=this.display.cachedTextHeight;Ar(this),this.curOp.forceUpdate=!0,Ht(this),Na(this,this.doc.scrollLeft,this.doc.scrollTop),Eo(this.display),(L==null||Math.abs(L-ji(this.display))>.5||this.options.lineWrapping)&&Dr(this),Ve(this,"refresh",this)}),swapDoc:ci(function(L){var k=this.doc;return k.cm=null,this.state.selectingText&&this.state.selectingText(),ts(this,L),Ht(this),this.display.input.reset(),Na(this,L.scrollLeft,L.scrollTop),this.curOp.forceScroll=!0,At(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}},Oe(e),e.registerHelper=function(L,k,K){R.hasOwnProperty(L)||(R[L]=e[L]={_global:[]}),R[L][k]=K},e.registerGlobalHelper=function(L,k,K,re){e.registerHelper(L,k,re),R[L]._global.push({pred:K,val:re})}}function jo(e,r,R,L,k){var K=r,re=R,le=q(e,r.line),ce=k&&e.direction=="rtl"?-R:R;function ve(){var Vt=r.line+ce;return Vt<e.first||Vt>=e.first+e.size?!1:(r=new nt(Vt,r.ch,r.sticky),le=q(e,Vt))}function Fe(Vt){var Wt;if(L=="codepoint"){var $t=le.text.charCodeAt(r.ch+(L>0?0:-1));isNaN($t)?Wt=null:Wt=new nt(r.line,Math.max(0,Math.min(le.text.length,r.ch+R*($t>=55296&&$t<56320?2:1))),-R)}else k?Wt=Il(e.cm,le,r,R):Wt=Do(le,r,R);if(Wt==null)if(!Vt&&ve())r=Po(k,e.cm,le,r.line,ce);else return!1;else r=Wt;return!0}if(L=="char"||L=="codepoint")Fe();else if(L=="column")Fe(!0);else if(L=="word"||L=="group")for(var ze=null,it=L=="group",et=e.cm&&e.cm.getHelper(r,"wordChars"),yt=!0;!(R<0&&!Fe(!yt));yt=!1){var wt=le.text.charAt(r.ch)||`
|
|
|
`,Pt=Ue(wt,et)?"w":it&&wt==`
|
|
|
`?"n":!it||/\s/.test(wt)?null:"p";if(it&&!yt&&!Pt&&(Pt="s"),ze&&ze!=Pt){R<0&&(R=1,Fe(),r.sticky="after");break}if(Pt&&(ze=Pt),R>0&&!Fe(!yt))break}var Bt=uo(e,r,K,re,!0);return ut(K,Bt)&&(Bt.hitSide=!0),Bt}function $s(e,r,R,L){var k=e.doc,K=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 ve;!(ve=Er(e,K,re),!ve.outside);){if(R<0?re<=0:re>=k.height){ve.hitSide=!0;break}re+=R*5}return ve}var fr=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};fr.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 K(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}Me(k,"paste",function(le){if(!K(le)||Ke(L,le)||zs(le,L))return;T<=11&&setTimeout($r(L,function(){return r.updateFromDOM()}),20)}),Me(k,"compositionstart",function(le){r.composing={data:le.data,done:!1}}),Me(k,"compositionupdate",function(le){r.composing||(r.composing={data:le.data,done:!1})}),Me(k,"compositionend",function(le){r.composing&&(le.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Me(k,"touchstart",function(){return R.forceCompositionEnd()}),Me(k,"input",function(){r.composing||r.readFromDOMSoon()});function re(le){if(!K(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 ve=Hi.text.join(`
|
|
|
`);if(le.clipboardData.setData("Text",ve),le.clipboardData.getData("Text")==ve){le.preventDefault();return}}var Fe=Ys(),ze=Fe.firstChild;L.display.lineSpace.insertBefore(Fe,L.display.lineSpace.firstChild),ze.value=Hi.text.join(`
|
|
|
`);var it=document.activeElement;te(ze),setTimeout(function(){L.display.lineSpace.removeChild(Fe),it.focus(),it==k&&R.showPrimarySelection()},50)}Me(k,"copy",re),Me(k,"cut",re)},fr.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},fr.prototype.prepareSelection=function(){var e=Un(this.cm,!1);return e.focus=document.activeElement==this.div,e},fr.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},fr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},fr.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 K=go(r,e.anchorNode,e.anchorOffset),re=go(r,e.focusNode,e.focusOffset);if(K&&!K.bad&&re&&!re.bad&&xt(Xt(K,re),L)==0&&xt(Qt(K,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},ve=k.line<r.display.viewTo&&Qs(r,k);if(!ve){var Fe=le[le.length-1].measure,ze=Fe.maps?Fe.maps[Fe.maps.length-1]:Fe.map;ve={node:ze[ze.length-1],offset:ze[ze.length-2]-ze[ze.length-3]}}if(!ce||!ve){e.removeAllRanges();return}var it=e.rangeCount&&e.getRangeAt(0),et;try{et=A(ce.node,ce.offset,ve.offset,ve.node)}catch(yt){}et&&(!U&&r.state.focused?(e.collapse(ce.node,ce.offset),et.collapsed||(e.removeAllRanges(),e.addRange(et))):(e.removeAllRanges(),e.addRange(et)),it&&e.anchorNode==null?e.addRange(it):U&&this.startGracePeriod()),this.rememberSelection()},fr.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)},fr.prototype.showMultipleSelections=function(e){o(this.cm.display.cursorDiv,e.cursors),o(this.cm.display.selectionDiv,e.selection)},fr.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},fr.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return D(this.div,r)},fr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},fr.prototype.blur=function(){this.div.blur()},fr.prototype.getField=function(){return this.div},fr.prototype.supportsTouch=function(){return!0},fr.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Ei(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)},fr.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},fr.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&&Ei(r,function(){si(r.doc,na(R,L),oe),(R.bad||L.bad)&&(r.curOp.selectionChanged=!0)})},fr.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=nt(L.line-1,q(e.doc,L.line-1).length)),k.ch==q(e.doc,k.line).text.length&&k.line<e.lastLine()&&(k=nt(k.line+1,0)),L.line<r.viewFrom||k.line>r.viewTo-1)return!1;var K,re,le;L.line==r.viewFrom||(K=Yr(e,L.line))==0?(re=He(r.view[0].line),le=r.view[0].node):(re=He(r.view[K].line),le=r.view[K-1].node.nextSibling);var ce=Yr(e,k.line),ve,Fe;if(ce==r.view.length-1?(ve=r.viewTo-1,Fe=r.lineDiv.lastChild):(ve=He(r.view[ce+1].line)-1,Fe=r.view[ce+1].node.previousSibling),!le)return!1;for(var ze=e.doc.splitLines(nu(e,le,Fe,re,ve)),it=ne(e.doc,nt(re,0),nt(ve,q(e.doc,ve).text.length));ze.length>1&&it.length>1;)if(Be(ze)==Be(it))ze.pop(),it.pop(),ve--;else if(ze[0]==it[0])ze.shift(),it.shift(),re++;else break;for(var et=0,yt=0,wt=ze[0],Pt=it[0],Bt=Math.min(wt.length,Pt.length);et<Bt&&wt.charCodeAt(et)==Pt.charCodeAt(et);)++et;for(var Vt=Be(ze),Wt=Be(it),$t=Math.min(Vt.length-(ze.length==1?et:0),Wt.length-(it.length==1?et:0));yt<$t&&Vt.charCodeAt(Vt.length-yt-1)==Wt.charCodeAt(Wt.length-yt-1);)++yt;if(ze.length==1&&it.length==1&&re==L.line)for(;et&&et>L.ch&&Vt.charCodeAt(Vt.length-yt-1)==Wt.charCodeAt(Wt.length-yt-1);)et--,yt++;ze[ze.length-1]=Vt.slice(0,Vt.length-yt).replace(/^\u200b+/,""),ze[0]=ze[0].slice(et).replace(/\u200b+$/,"");var yn=nt(re,et),ln=nt(ve,it.length?Be(it).length-yt:0);if(ze.length>1||ze[0]||xt(yn,ln))return wa(e.doc,ze,yn,ln,"+input"),!0},fr.prototype.ensurePolled=function(){this.forceCompositionEnd()},fr.prototype.reset=function(){this.forceCompositionEnd()},fr.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},fr.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)},fr.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ei(this.cm,function(){return Ar(e.cm)})},fr.prototype.setUneditable=function(e){e.contentEditable="false"},fr.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||$r(this.cm,Uo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},fr.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},fr.prototype.onContextMenu=function(){},fr.prototype.resetPosition=function(){},fr.prototype.needsContentAttribute=!0;function Qs(e,r){var R=an(e,r.line);if(!R||R.hidden)return null;var L=q(e.doc,r.line),k=Qn(R,L,r.line),K=rt(L,e.doc.direction),re="left";if(K){var le=me(K,r.ch);re=le%2?"right":"left"}var ce=Fn(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 La(e,r){return r&&(e.bad=!0),e}function nu(e,r,R,L,k){var K="",re=!1,le=e.doc.lineSeparator(),ce=!1;function ve(et){return function(yt){return yt.id==et}}function Fe(){re&&(K+=le,ce&&(K+=le),re=ce=!1)}function ze(et){et&&(Fe(),K+=et)}function it(et){if(et.nodeType==1){var yt=et.getAttribute("cm-text");if(yt){ze(yt);return}var wt=et.getAttribute("cm-marker"),Pt;if(wt){var Bt=e.findMarks(nt(L,0),nt(k+1,0),ve(+wt));Bt.length&&(Pt=Bt[0].find(0))&&ze(ne(e.doc,Pt.from,Pt.to).join(le));return}if(et.getAttribute("contenteditable")=="false")return;var Vt=/^(pre|div|p|li|table|br)$/i.test(et.nodeName);if(!/^br$/i.test(et.nodeName)&&et.textContent.length==0)return;Vt&&Fe();for(var Wt=0;Wt<et.childNodes.length;Wt++)it(et.childNodes[Wt]);/^(pre|p)$/i.test(et.nodeName)&&(ce=!0),Vt&&(re=!0)}else et.nodeType==3&&ze(et.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(it(r),r==R);)r=r.nextSibling,ce=!1;return K}function go(e,r,R){var L;if(r==e.display.lineDiv){if(L=e.display.lineDiv.childNodes[R],!L)return La(e.clipPos(nt(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 K=e.display.view[k];if(K.node==L)return ru(K,r,R)}}function ru(e,r,R){var L=e.text.firstChild,k=!1;if(!r||!D(L,r))return La(nt(He(e.line),0),!0);if(r==L&&(k=!0,r=L.childNodes[R],R=0,!r)){var K=e.rest?Be(e.rest):e.line;return La(nt(He(K),K.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,ve=ce.maps;function Fe(Pt,Bt,Vt){for(var Wt=-1;Wt<(ve?ve.length:0);Wt++)for(var $t=Wt<0?ce.map:ve[Wt],yn=0;yn<$t.length;yn+=3){var ln=$t[yn+2];if(ln==Pt||ln==Bt){var Wn=He(Wt<0?e.line:e.rest[Wt]),br=$t[yn]+Vt;return(Vt<0||ln!=Pt)&&(br=$t[yn+(Vt?1:0)]),nt(Wn,br)}}}var ze=Fe(re,le,R);if(ze)return La(ze,k);for(var it=le.nextSibling,et=re?re.nodeValue.length-R:0;it;it=it.nextSibling){if(ze=Fe(it,it.firstChild,0),ze)return La(nt(ze.line,ze.ch-et),k);et+=it.textContent.length}for(var yt=le.previousSibling,wt=R;yt;yt=yt.previousSibling){if(ze=Fe(yt,yt.firstChild,-1),ze)return La(nt(ze.line,ze.ch+wt),k);wt+=yt.textContent.length}}var Ur=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new J,this.hasSelection=!1,this.composing=null};Ur.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"),Me(k,"input",function(){O&&T>=9&&r.hasSelection&&(r.hasSelection=null),R.poll()}),Me(k,"paste",function(re){if(Ke(L,re)||zs(re,L))return;L.state.pasteIncoming=+new Date,R.fastPoll()});function K(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(`
|
|
|
`),te(k))}else return;re.type=="cut"&&(L.state.cutIncoming=+new Date)}Me(k,"cut",K),Me(k,"copy",K),Me(e.scroller,"paste",function(re){if(wn(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)}),Me(e.lineSpace,"selectstart",function(re){wn(e,re)||fe(re)}),Me(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"})}}),Me(k,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},Ur.prototype.createField=function(e){this.wrapper=Ys(),this.textarea=this.wrapper.firstChild},Ur.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ur.prototype.prepareSelection=function(){var e=this.cm,r=e.display,R=e.doc,L=Un(e);if(e.options.moveInputWithCursor){var k=In(e,R.sel.primary().head,"div"),K=r.wrapper.getBoundingClientRect(),re=r.lineDiv.getBoundingClientRect();L.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,k.top+re.top-K.top)),L.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,k.left+re.left-K.left))}return L},Ur.prototype.showSelection=function(e){var r=this.cm,R=r.display;o(R.cursorDiv,e.cursors),o(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ur.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&&te(this.textarea),O&&T>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",O&&T>=9&&(this.hasSelection=null))},Ur.prototype.getField=function(){return this.textarea},Ur.prototype.supportsTouch=function(){return!1},Ur.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ur.prototype.blur=function(){this.textarea.blur()},Ur.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ur.prototype.receivedFocus=function(){this.slowPoll()},Ur.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()})},Ur.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)},Ur.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(O&&T>=9&&this.hasSelection===k||t&&/[\uf700-\uf7ff]/.test(k))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var K=k.charCodeAt(0);if(K==8203&&!L&&(L="\u200B"),K==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 Ei(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},Ur.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ur.prototype.onKeyPress=function(){O&&T>=9&&(this.hasSelection=null),this.fastPoll()},Ur.prototype.onContextMenu=function(e){var r=this,R=r.cm,L=R.display,k=r.textarea;r.contextMenuPending&&r.contextMenuPending();var K=Ln(R,e),re=L.scroller.scrollTop;if(!K||d)return;var le=R.options.resetSelectionOnContextMenu;le&&R.doc.sel.contains(K)==-1&&$r(R,si)(R.doc,na(K),oe);var ce=k.style.cssText,ve=r.wrapper.style.cssText,Fe=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",k.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-Fe.top-5)+"px; left: "+(e.clientX-Fe.left-5)+`px;
|
|
|
z-index: 1000; background: `+(O?"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=et,L.selForContextMenu=R.doc.sel,clearTimeout(L.detectingSelectAll);function it(){if(k.selectionStart!=null){var wt=R.somethingSelected(),Pt="\u200B"+(wt?k.value:"");k.value="\u21DA",k.value=Pt,r.prevInput=wt?"":"\u200B",k.selectionStart=1,k.selectionEnd=Pt.length,L.selForContextMenu=R.doc.sel}}function et(){if(r.contextMenuPending!=et)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=ve,k.style.cssText=ce,O&&T<9&&L.scrollbars.setScrollTop(L.scroller.scrollTop=re),k.selectionStart!=null){(!O||O&&T<9)&&it();var wt=0,Pt=function(){L.selForContextMenu==R.doc.sel&&k.selectionStart==0&&k.selectionEnd>0&&r.prevInput=="\u200B"?$r(R,ps)(R):wt++<10?L.detectingSelectAll=setTimeout(Pt,500):(L.selForContextMenu=null,L.input.reset())};L.detectingSelectAll=setTimeout(Pt,200)}}if(O&&T>=9&&it(),b){be(e);var yt=function(){tt(window,"mouseup",yt),setTimeout(et,20)};Me(window,"mouseup",yt)}else setTimeout(et,50)},Ur.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ur.prototype.setUneditable=function(){},Ur.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&&(Me(e.form,"submit",L),!r.leaveSubmitMethodAlone)){var K=e.form;k=K.submit;try{var re=K.submit=function(){L(),K.submit=k,K.submit(),K.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=Tr(function(ce){return e.parentNode.insertBefore(ce,e.nextSibling)},r);return le}function au(e){e.off=tt,e.on=Me,e.wheelEventPixels=fl,e.Doc=pi,e.splitLines=lt,e.countColumn=X,e.findColumn=Le,e.isWordChar=Ie,e.Pass=ie,e.signal=Ve,e.Line=er,e.changeEnd=ra,e.scrollbarModel=zo,e.Pos=nt,e.cmpPos=xt,e.modes=dt,e.mimeModes=Ze,e.resolveMode=ot,e.getMode=gt,e.modeExtensions=kt,e.extendMode=Kt,e.copyState=Gt,e.startState=de,e.innerMode=Se,e.commands=Qa,e.keyMap=qi,e.keyName=Rs,e.isModifierKey=As,e.lookupKey=Ca,e.normalizeKeyMap=kl,e.StringStream=W,e.SharedTextMarker=Ya,e.TextMarker=aa,e.LineWidget=Xa,e.e_preventDefault=fe,e.e_stopPropagation=ge,e.e_stop=be,e.addClass=F,e.contains=D,e.rmClass=g,e.keyNames=oa}ql(Tr),eu(Tr);var ou="iter insert remove copy getEditor constructor".split(" ");for(var yo in pi.prototype)pi.prototype.hasOwnProperty(yo)&&B(ou,yo)<0&&(Tr.prototype[yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(pi.prototype[yo]));return Oe(pi),Tr.inputStyles={textarea:Ur,contenteditable:fr},Tr.defineMode=function(e){!Tr.defaults.mode&&e!="null"&&(Tr.defaults.mode=e),Tt.apply(this,arguments)},Tr.defineMIME=Ct,Tr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Tr.defineMIME("text/plain","null"),Tr.defineExtension=function(e,r){Tr.prototype[e]=r},Tr.defineDocExtension=function(e,r){pi.prototype[e]=r},Tr.fromTextArea=iu,au(Tr),Tr.version="5.58.2",Tr})},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"),O=z("miYZ"),T=z("tsqr"),l=z("2qtc"),p=z("kLXV"),h=z("9og8"),d=z("tJVT"),a=z("k1fw"),u=z("aHsQ"),s=z("sGsY"),f=z("WmNS"),i=z.n(f),n=z("q1tI"),t=z.n(n),c=z("Fvcw"),y=z("GIiI"),v=z("Ty5D"),_=z("9kvl"),b=z("55Ip"),m=z("7qur"),g=z("cDPC"),E=z("m3rI"),o=z("RCxd"),x=z("EHPI"),C=z("J66h"),A=z("uMZB"),D=z.n(A),I=z("sNtx"),F=z("RpDr"),H=z("+L6B"),te=z("2/Rp"),j=z("y8nQ"),G=z("Vl3Y"),X=z("5NDa"),J=z("5rEg"),B=J.a.TextArea,Q=5e3,ie=function(at){var st=at.callback,bt=at.onCancel,At=at.notes;function nn(en){st(en)}return t.a.createElement(G.a,{className:"note-form-panel",onFinish:nn,initialValues:{notes:At}},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(te.a,{type:"ghost",onClick:bt,style:{marginRight:10}}," \u53D6\u6D88 "),t.a.createElement(te.a,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},oe=z("ZsLC"),Ee=z.n(oe),ye=z("DjyN"),Le=z("NUBc"),pe=z("g9YV"),Ce=z("wCAj"),Be=z("Hw79"),Pe=z.n(Be),ke=z("ye1Q"),Ne=z("lfch"),he=z("bdLU"),ue=z("1vsH"),Ie=z("wd/R"),Ue=z.n(Ie),Ye=Ce.a.Column,ee=function(at){var st=at.submitResult,bt=at.submitting,At=at.submitRecords,nn=at.page,en=at.onPageChange,ht=at.topicId,ct=st||{},Ft=ct.status,vt=ct.id,Yt=ct.input,Ot=ct.output,Zt=ct.expected_output,jn=ct.is_file,Sn=ct.input_file_url,cn=ct.output_file_url,Kn=ct.expected_output_file_url,_n=ct.error_msg,wn=At||{},kn=wn.records,mr=wn.records_count,Gn=Object(v.i)();function qn(){jn?navigator.clipboard.writeText(C.Base64.decode(_n)).then(function(){T.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(C.Base64.decode(Ot)).then(function(){T.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return t.a.createElement(S.a,{spinning:bt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:t.a.createElement(ke.a,{style:{fontSize:24},spin:!0})},vt?t.a.createElement(t.a.Fragment,null,t.a.createElement("ul",{className:Pe.a.info},t.a.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",t.a.createElement("span",{className:Ft===he.a.OK?"c-green":"c-red"},F.a[Ft])),t.a.createElement("li",{className:Pe.a.error},t.a.createElement("a",{onClick:qn},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",t.a.createElement(Ne.a,null)," ")),t.a.createElement("li",null,t.a.createElement(b.a,{to:"/problems/".concat(ht,"/record-detail/").concat(vt,"?backId=").concat(Gn==null?void 0:Gn.save_identifier)},"\u663E\u793A\u8BE6\u60C5 > "))),Ft!==he.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,!jn&&Yt,jn&&t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ue.w)(Sn,Yt)}},Yt)),t.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),t.a.createElement("pre",null,(Ft===4||Ft===5)&&C.Base64.decode(_n),Ft!=4&&Ft!=5&&(jn?t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ue.w)(cn,Ot)}},Ot):C.Base64.decode(Ot))),t.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),t.a.createElement("pre",null,!jn&&C.Base64.decode(Zt),jn&&t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ue.w)(Kn,Zt)}},Zt))):null):null,(kn==null?void 0:kn.length)>0?t.a.createElement(Ce.a,{dataSource:kn,rowKey:"id",pagination:!1},t.a.createElement(Ye,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:function(dr,Vn){return t.a.createElement("span",null," ",Ue()(dr).format("YYYY-MM-DD HH:mm:ss"))}}),t.a.createElement(Ye,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:function(dr,Vn){var Qn;return t.a.createElement(b.a,{className:dr===0?"c-green":"c-red",to:"/problems/".concat(ht,"/record-detail/").concat(Vn.id,"?backId=").concat(Gn==null?void 0:Gn.save_identifier)},(Qn=F.a[dr])===null||Qn===void 0?void 0:Qn.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,mr>15?t.a.createElement(Le.a,{className:Pe.a.pagination,current:nn,pageSize:15,total:mr,onChange:en}):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"),De={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}},Me=function(at){var st=at.hack,bt=at.onTriggerPraise,At=at.toDiscuss,nn=st.language,en=st.difficulty,ht=st.time_limit,ct=st.username,Ft=st.user_path,vt=st.user_praise,Yt=st.comments_count,Ot=st.praises_count,Zt=st.description,jn=st.pass_count,Sn=st.submit_count,cn=Object(v.h)();console.log(st.language,"language");var Kn=De[en];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:Kn.color},Kn.name)),t.a.createElement("li",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",t.a.createElement("b",null,ht,"\u79D2"))),t.a.createElement(rt.a,{value:Zt,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,jn))),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,Sn))," "),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:At})," ",t.a.createElement("b",null,Yt))," ")))},Xe=z("dhSg"),tt=z("ps8w"),Ve=z.n(tt),Ke=z("oBTY"),we=z("M8RZ"),Ae=z("OkW/"),Oe=z("ErOA");function fe(at){return Object(Oe.c)("comments.json",at)}function ge(at){return Object(Oe.f)("/discusses/".concat(at,"/plus.json"),{container_type:"Discuss",type:1})}function _e(at){return Object(Oe.f)("comments/reply.json",at)}function be(at){return Object(Oe.f)("comments.json",at)}function Ge(at){return Object(Oe.f)("comments/".concat(at==null?void 0:at.id,"/hidden.json"),at)}function qe(at){return Object(Oe.b)("comments/".concat(at==null?void 0:at.id,".json"))}var pt=z("GgEA"),Dt=z("AMnG"),jt=z("xKgJ");function Rt(at){var st=at.author;return t.a.createElement("a",{href:"/users/".concat(st.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(st.image_url),width:"50"}))}function Lt(at){var st=at.data,bt=at.index,At=at.parentDiscussIndex,nn=at.user,en=at.onSetActionType,ht=st.author,ct=st.can_delete,Ft=st.content,vt=st.id,Yt=st.time;function Ot(){en({id:vt,index:bt,type:"delete-discuss",parentDiscussIndex:At,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var Zt=nn.admin||ct||ht.user_id===nn.user_id;return t.a.createElement("div",{className:"discuss-item-container second-discuss "},t.a.createElement(Rt,{author:ht}),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(ht.login),target:"_blank"},ht.name),t.a.createElement("span",{className:"grey"},Yt),t.a.createElement("div",{className:"btn-group",style:{marginBottom:0}},Zt?t.a.createElement("a",{onClick:Ot,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),t.a.createElement(rt.a,{className:"discuss-content",value:Ft})))}var lt=function(at){var st=at.user,bt=at.data,At=at.index,nn=at.onPlusDiscuss,en=at.onSetActionType,ht=at.activeDiscussIndex,ct=at.onReplyDiscuss,Ft=at.onSetActiveDiscussIndex,vt=bt.content,Yt=bt.children,Ot=bt.hidden,Zt=bt.id,jn=bt.praise_count,Sn=bt.time,cn=bt.user_praise,Kn=bt.can_delete,_n=bt.author;console.log(Kn&&(!Yt||Yt.length==0),"children22");function wn(){Ft(Zt)}function kn(){nn(Zt,!cn,At)}function mr(){en({id:Zt,index:At,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Gn(){en({id:Zt,index:At,params:{hidden:Ot?"0":"1"},type:"hidden-discuss",message:Ot?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}var qn=st.admin||st.user_id===_n.user_id;return t.a.createElement("div",{className:"discuss-item-container",key:Zt},t.a.createElement(Rt,{author:_n}),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(_n.login),target:"_blank"}," ",_n.name," "),t.a.createElement("span",{className:"grey"},Sn)),t.a.createElement(rt.a,{className:"discuss-content",value:vt}),Yt&&Yt.length>0?t.a.createElement("div",{className:"reply-discuss-container"},Yt.map(function(rr,dr){return t.a.createElement(Lt,{key:rr.id,data:rr,index:dr,user:st,onSetActionType:en,parentDiscussIndex:At})})):null,t.a.createElement("div",{className:"btn-group"},Object(jt.v)()?t.a.createElement("a",{onClick:Gn,title:Ot?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:Ot?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Kn&&(!Yt||Yt.length==0)?t.a.createElement("a",{onClick:mr,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null,t.a.createElement("a",{onClick:wn,title:"\u56DE\u590D"}," ",t.a.createElement("i",{className:"iconfont icon-huifu1"})," "),t.a.createElement("a",{onClick:kn,className:cn?"c-orange":""},t.a.createElement("i",{className:cn?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),t.a.createElement("span",null,jn||""))),t.a.createElement(Dt.a,{id:Zt,activeDiscussIndex:ht,onReplyDiscuss:ct})))},ft=z("kaH+"),Qe=z("Wx9E"),Te=z("Ot1p"),je=function(at){var st=at.user_praise,bt=at.praise_count,At=at.praisePlus,nn=at.onCreateDiscuss,en=at.discuss_count,ht=Object(n.useState)(!1),ct=Object(d.a)(ht,2),Ft=ct[0],vt=ct[1],Yt=Object(n.useState)(""),Ot=Object(d.a)(Yt,2),Zt=Ot[0],jn=Ot[1];function Sn(kn){jn(kn)}function cn(){vt(!0)}function Kn(){vt(!1)}function _n(){return wn.apply(this,arguments)}function wn(){return wn=Object(h.a)(i.a.mark(function kn(){return i.a.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:nn(Zt),jn(""),vt(!1);case 3:case"end":return Gn.stop()}},kn)})),wn.apply(this,arguments)}return t.a.createElement("div",{className:"dis-input-editor-container ".concat(Ft?"active":""," ")},t.a.createElement("div",{className:Ft?"text-area hide":"text-area"},t.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:cn}),t.a.createElement("a",{style:{alignItems:"center"}}," ",t.a.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",en," "),t.a.createElement("a",{className:"c-light-black",onClick:At,style:{alignItems:"center"},title:st?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},t.a.createElement("i",{className:"mr3 ".concat(st?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),bt?t.a.createElement("span",null,bt):"")),Ft?t.a.createElement("div",{className:"input-mask",onClick:Kn}):null,t.a.createElement("div",{className:Ft?"md-container":"md-container hide"},t.a.createElement(Te.a,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:Zt,height:240,onChange:Sn}),t.a.createElement("div",{className:"tip-container",onClick:Kn},t.a.createElement("a",{className:"btn-send",onClick:_n}," \u53D1\u9001 "))))},dt={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null},Ze;(function(at){at[at.GET_DISCUSSES=0]="GET_DISCUSSES",at[at.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",at[at.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",at[at.PLUS_DISCUSS=3]="PLUS_DISCUSS",at[at.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",at[at.SET_PAGE=5]="SET_PAGE",at[at.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING"})(Ze||(Ze={}));function Tt(at,st){switch(st.type){case Ze.SHOW_DISCUSSES_LOADING:return Object(a.a)(Object(a.a)({},at),{},{loading:!0});case Ze.GET_DISCUSSES:return Object(a.a)(Object(a.a)({},at),st.payload);case Ze.TOP_OR_DOWN_DISCUSS:return Object(a.a)(Object(a.a)({},at),st.payload);case Ze.SET_ACTION_TYPE:return Object(a.a)(Object(a.a)({},at),st.payload);case Ze.PLUS_DISCUSS:return Object(a.a)(Object(a.a)({},at),st.payload);case Ze.SET_PAGE:return Object(a.a)(Object(a.a)({},at),{},{page:st.payload});case Ze.ACTIVE_DISCUSS_INDEX:return Object(a.a)(Object(a.a)({},at),st.payload);default:throw new Error}}var Ct=function(at){var st=at.user,bt=at.identifier,At=at.hack,nn=at.onTriggerPraise,en=at.setDiscussTotal,ht=Object(n.useReducer)(Tt,dt),ct=Object(d.a)(ht,2),Ft=ct[0],vt=ct[1],Yt=Ft.loading,Ot=Ft.page,Zt=Ft.data,jn=Ft.count,Sn=Ft.actionType,cn=Ft.activeDiscussIndex,Kn=Object(n.useCallback)(Object(h.a)(i.a.mark(function an(){var Hn,Xn,ir;return i.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:return vt({type:Ze.SHOW_DISCUSSES_LOADING}),Bn.next=3,fe({container_type:"Practice",container_identifier:bt,limit:10,page:Ot});case 3:Hn=Bn.sent,Xn=Hn.comments,ir=Hn.disscuss_count,vt({type:Ze.GET_DISCUSSES,payload:{data:Xn,count:ir,loading:!1}}),en(ir);case 7:case"end":return Bn.stop()}},an)})),[Ot,bt]);Object(n.useEffect)(function(){Kn()},[bt,Ot]);function _n(an){vt({type:Ze.SET_PAGE,page:an})}function wn(an){vt({type:Ze.SET_ACTION_TYPE,payload:{actionType:an}})}function kn(an){cn===an?vt({type:Ze.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}):vt({type:Ze.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:an}})}function mr(an,Hn,Xn){return Gn.apply(this,arguments)}function Gn(){return Gn=Object(h.a)(i.a.mark(function an(Hn,Xn,ir){var Fn;return i.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return on.prev=0,on.next=3,ge(Hn);case 3:Fn=on.sent,Zt[ir].user_praise=Xn,Zt[ir].praise_count=Fn.praise_count,vt({type:Ze.PLUS_DISCUSS,payload:{data:Object(Ke.a)(Zt)}}),on.next=12;break;case 9:on.prev=9,on.t0=on.catch(0),console.log(on.t0);case 12:case"end":return on.stop()}},an,null,[[0,9]])})),Gn.apply(this,arguments)}function qn(){return rr.apply(this,arguments)}function rr(){return rr=Object(h.a)(i.a.mark(function an(){var Hn,Xn,ir,Fn,Bn;return i.a.wrap(function(bn){for(;;)switch(bn.prev=bn.next){case 0:if(Hn=Sn.id,Xn=Sn.params,ir=Sn.type,Fn=Sn.index,Bn=Sn.parentDiscussIndex,!(ir==="hidden-discuss")){bn.next=7;break}return console.log(Xn,"params"),bn.next=5,Ge(Object(a.a)({id:Hn,container_type:"Practice",container_identifier:bt},Xn));case 5:Bn?Zt[Bn].children[Fn].hidden=Xn.hidden==1:Zt[Fn].hidden=Xn.hidden==1,vt({type:Ze.SET_ACTION_TYPE,payload:{actionType:null,data:Object(Ke.a)(Zt)}});case 7:if(!(ir==="delete-discuss")){bn.next=13;break}return bn.next=10,qe({id:Hn,container_type:"Practice",container_identifier:bt});case 10:return vt({type:Ze.SET_ACTION_TYPE,payload:{actionType:null}}),bn.next=13,Kn();case 13:case"end":return bn.stop()}},an)})),rr.apply(this,arguments)}function dr(){vt({type:Ze.SET_ACTION_TYPE,payload:{actionType:null}})}function Vn(an,Hn){return Qn.apply(this,arguments)}function Qn(){return Qn=Object(h.a)(i.a.mark(function an(Hn,Xn){return i.a.wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:return Fn.prev=0,Fn.next=3,_e({container_type:"Practice",container_identifier:bt,comments:{content:Xn,parent_id:Hn}});case 3:Kn(),Fn.next=9;break;case 6:Fn.prev=6,Fn.t0=Fn.catch(0),console.log(Fn.t0);case 9:case"end":return Fn.stop()}},an,null,[[0,6]])})),Qn.apply(this,arguments)}function Dn(an){return Nt.apply(this,arguments)}function Nt(){return Nt=Object(h.a)(i.a.mark(function an(Hn){return i.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return vt({type:Ze.SHOW_DISCUSSES_LOADING}),ir.next=3,be({comments:{content:Hn},container_type:"Practice",container_identifier:bt});case 3:Kn();case 4:case"end":return ir.stop()}},an)})),Nt.apply(this,arguments)}return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:"discuss-panel"},Zt.length===0?t.a.createElement(M.a,null):Zt.map(function(an,Hn){return t.a.createElement(lt,{onReplyDiscuss:Vn,onPlusDiscuss:mr,onSetActiveDiscussIndex:kn,onSetActionType:wn,data:an,index:Hn,user:st,activeDiscussIndex:cn})}),jn>10?t.a.createElement("div",{className:"pagination-container"},t.a.createElement(Le.a,{showQuickJumper:!0,onChange:_n,current:Ot,total:jn})):null),t.a.createElement(je,{user_praise:At.user_praise,praise_count:At.praises_count,praisePlus:nn,discuss_count:At.comments_count,onCreateDiscuss:Dn}),t.a.createElement(we.a,null,t.a.createElement(p.a,{centered:!0,title:"\u63D0\u793A",visible:!!Sn,onOk:qn,onCancel:dr},t.a.createElement("p",null,Sn?Sn.message:"")),t.a.createElement(ft.a,null)))},ot=z("1FX+"),gt=z.n(ot),kt=z("pYxM"),Kt=z.n(kt),Gt=z("sB/4"),Se=z.n(Gt),de=z("Wtmd"),W=z.n(de),q=z("CNDd"),ne=z.n(q),se=z("nCk5"),xe=z.n(se),He=z("kovY"),Je=z.n(He),Et=function(st){var bt=st.style,At=bt===void 0?{}:bt,nn=st.onClick,en=st.onAssist,ht=st.onHide,ct=st.data,Ft=st.active,vt=st.showLine;return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:Ft===(ct==null?void 0:ct.id)?"".concat(Kt.a.list," ").concat(Kt.a.active):Kt.a.list,style:At,onClick:function(){return nn(ct)}},(ct==null?void 0:ct.video)&&t.a.createElement("div",{className:Kt.a.left},t.a.createElement("img",{src:ct==null?void 0:ct.video_cover}),t.a.createElement("div",null,t.a.createElement("img",{src:Se.a}),t.a.createElement("span",null,ct==null?void 0:ct.video_duration)),t.a.createElement("div",{className:Kt.a.mask})),t.a.createElement("div",{className:Kt.a.right},t.a.createElement("div",{className:Kt.a.name},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(ct==null?void 0:ct.image_url),width:30,height:30}),t.a.createElement("div",{title:ct==null?void 0:ct.name,className:Kt.a.title},ct==null?void 0:ct.name),(ct==null?void 0:ct.is_authority)&&t.a.createElement("div",{className:Kt.a.b},"\u5B98\u65B9"),(ct==null?void 0:ct.is_excellent)&&t.a.createElement("div",{className:Kt.a.a},"\u7CBE\u9009")),t.a.createElement("div",{className:Kt.a.des},t.a.createElement(rt.a,{showLines:2,showTextOnly:!0,value:(ct==null?void 0:ct.content)||"\u6682\u65E0\u5185\u5BB9"})),t.a.createElement("div",{className:Kt.a.tag},t.a.createElement("span",{className:"current",onClick:function(Ot){Ot.stopPropagation(),en(ct)}},t.a.createElement("img",{src:ct!=null&&ct.user_liker?ne.a:W.a}),t.a.createElement("span",{style:{color:ct!=null&&ct.user_liker?"#0152d9":"#656f87"}},ct==null?void 0:ct.praises_count)),t.a.createElement("span",null,t.a.createElement("img",{src:xe.a}),t.a.createElement("span",null,ct==null?void 0:ct.discusses_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Je.a}),t.a.createElement("span",null,ct==null?void 0:ct.viewed_count)),Object(jt.v)()&&t.a.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:function(Ot){Ot.stopPropagation(),ht(ct)}},ct!=null&&ct.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),vt&&t.a.createElement("div",{className:Kt.a.line}))},St=Et,nt=z("5Dmo"),xt=z("3S7+"),ut=z("Z8dc"),_t=z.n(ut),Qt=z("Aky1"),Xt=z("7+5b"),Mt=z.n(Xt),mt=z("twBr"),Cn=z.n(mt),En=z("oE5q"),Jt=z.n(En),un=function(st,bt){var At,nn,en,ht=bt.payload.uploadInfo,ct=ht===void 0?{}:ht;switch(bt.type){case"addVideo":return{videoList:[].concat(Object(Ke.a)(st.videoList),[{name:ct.file.name,size:ct.file.size,type:ct.file.type,fileHash:ct.fileHash,state:ct.state,video_id:ct.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}])};case"removeVideo":return{videoList:st.videoList.filter(function(Ft){return Ft.name!==bt.payload.name})};case"replaceVideo":return{videoList:bt.payload};case"removeAll":return[];case"updateProgress":return{videoList:st.videoList.map(function(Ft){return Ft.name===bt.payload.uploadInfo.file.name?Object(a.a)(Object(a.a)({},Ft),{loaded:bt.payload.progressPercent,video_id:ct.videoId,fileHash:ct.fileHash}):Ft})};case"updateTitle":return{videoList:(At=st.videoList)===null||At===void 0?void 0:At.map(function(Ft){return Ft.name===bt.payload.item.name?Object(a.a)(Object(a.a)({},Ft),{title:bt.payload.title}):Ft})};case"updateImg":return{videoList:(nn=st.videoList)===null||nn===void 0?void 0:nn.map(function(Ft){return Ft.name===bt.payload.item.name?Object(a.a)(Object(a.a)({},Ft),{attachment_id:bt.payload.attachment_id}):Ft})};case"updateImg":return{videoList:(en=st.videoList)===null||en===void 0?void 0:en.map(function(Ft){return Ft.name===bt.payload.item.name?Object(a.a)(Object(a.a)({},Ft),{attachment_id:bt.payload.attachment_id}):Ft})};default:return[]}},Jn=function(st){var bt,At,nn=st.onClose,en=st.onOk,ht=st.identifier,ct=st.active,Ft=G.a.useForm(),vt=Object(d.a)(Ft,1),Yt=vt[0],Ot=Object(n.useState)({}),Zt=Object(d.a)(Ot,2),jn=Zt[0],Sn=Zt[1],cn=Object(n.useState)(!1),Kn=Object(d.a)(cn,2),_n=Kn[0],wn=Kn[1],kn=Object(n.useState)(!1),mr=Object(d.a)(kn,2),Gn=mr[0],qn=mr[1],rr=Object(n.useReducer)(un,{videoList:[]}),dr=Object(d.a)(rr,2),Vn=dr[0],Qn=dr[1],Dn=Object(jt.x)(),Nt=Object(v.i)(),an=Object(n.useRef)();Object(n.useEffect)(function(){ct&&Hn()},[ct]);var Hn=function(){var sn=Object(h.a)(i.a.mark(function On(){var pn,In,Yn,sr,Er,zr,Ci,Br,Mi,$i,Ui,ti;return i.a.wrap(function(Nn){for(;;)switch(Nn.prev=Nn.next){case 0:return Nn.next=2,Object(m.k)(ht,{active:ct});case 2:pn=Nn.sent,(pn==null?void 0:pn.status)===0&&(zr={name:pn==null||((In=pn.data)===null||In===void 0)?void 0:In.name,content:pn==null||((Yn=pn.data)===null||Yn===void 0)?void 0:Yn.content},Yt.setFieldsValue(zr),Sn(zr),pn!=null&&(sr=pn.data)!==null&&sr!==void 0&&(Er=sr.videos)!==null&&Er!==void 0&&Er[0]&&Qn({type:"replaceVideo",payload:[{video_id:pn==null||((Ci=pn.data)===null||Ci===void 0||((Br=Ci.videos)===null||Br===void 0||((Mi=Br[0])===null||Mi===void 0)))?void 0:Mi.video_id,name:pn==null||(($i=pn.data)===null||$i===void 0||((Ui=$i.videos)===null||Ui===void 0||((ti=Ui[0])===null||ti===void 0)))?void 0:ti.title,loaded:100}]}));case 4:case"end":return Nn.stop()}},On)}));return function(){return sn.apply(this,arguments)}}(),Xn=function(On,pn){Sn(Object(a.a)({},pn))},ir=function(){var sn=Object(h.a)(i.a.mark(function On(pn){var In,Yn,sr,Er,zr;return i.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:if(Yn={videos:Vn.videoList,articles:pn},qn(!0),!ct){Br.next=9;break}return Yn.active=ct,Br.next=6,Object(m.j)(ht,Yn);case 6:sr=Br.sent,Br.next=12;break;case 9:return Br.next=11,Object(m.a)(ht,Yn);case 11:sr=Br.sent;case 12:((In=sr)===null||In===void 0?void 0:In.status)===0&&(console.log(ct||((Er=sr)===null||Er===void 0?void 0:Er.id),44),en(ct||((zr=sr)===null||zr===void 0?void 0:zr.id))),qn(!1);case 14:case"end":return Br.stop()}},On)}));return function(pn){return sn.apply(this,arguments)}}(),Fn=function(){var On=document.getElementById("fileUpload");On.value=""},Bn=function(On){var pn='{"Vod":{}}';if(wn(!0),an.current){an.current.addFile(On,null,null,null,pn);return}Object(Qt.a)(Dn==null?void 0:Dn.login,"",{create:!an,addFileSuccess:function(Yn){Qn({type:"addVideo",payload:{uploadInfo:Yn}})},onUploadProgress:function(Yn,sr,Er){var zr=Math.ceil(Er*100);Qn({type:"updateProgress",payload:{uploadInfo:Yn,progressPercent:zr}}),Fn()},onUploadFailed:function(Yn){T.b.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:function(Yn){wn(!1)},onUploadSucceed:function(Yn){wn(!1)},onUploadError:function(Yn){wn(!1)},gotUploader:function(Yn){Yn.addFile(On,null,null,null,pn),an.current=Yn}})},on=function(On){var pn,In=1024,Yn=On.target.files[0];if(!Yn){Fn();return}var sr=Yn.name.toLowerCase();if(sr&&sr.indexOf(".avi")==-1&&sr.indexOf(".flv")==-1&&sr.indexOf(".f4v")==-1&&sr.indexOf(".m4v")==-1&&sr.indexOf(".mov")==-1&&sr.indexOf(".mp4")==-1&&sr.indexOf(".rmvb")==-1&&sr.indexOf(".swf")==-1&&sr.indexOf(".webm")==-1&&sr.indexOf(".wmv")==-1){T.b.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),Fn();return}if(Yn.size>In*1024*1024){T.b.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC7".concat(In,"M")),Fn();return}if((pn=Vn.videoList)!==null&&pn!==void 0&&pn.find(function(Er){return Er.name===Yn.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"),Fn();return}Bn(Yn)},bn=function(On,pn){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",pn?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:function(){Fn(),Qn({type:"removeVideo",payload:{name:On}})}})},It=function(){return t.a.createElement("label",{htmlFor:"fileUpload",className:_t.a.main},t.a.createElement("img",{src:Mt.a,alt:""}),t.a.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891"))},Ut=function(On){return t.a.createElement("div",{className:_t.a.mainLoading},t.a.createElement("div",{className:_t.a.proWarp},t.a.createElement("div",{className:_t.a.pro},t.a.createElement("div",{style:{width:On}})),t.a.createElement("span",null,On||0,"%")),t.a.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),t.a.createElement("div",{className:_t.a.tip},t.a.createElement(xt.a,{getPopupContainer:function(In){return In.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:Jt.a,alt:""}))))},Ht=function(On){return t.a.createElement("div",{className:_t.a.mainSucceed},t.a.createElement("img",{src:Cn.a,alt:""}),t.a.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),t.a.createElement("div",{className:_t.a.tip},t.a.createElement(xt.a,{getPopupContainer:function(In){return In.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:Jt.a,alt:""}))),t.a.createElement("div",{className:_t.a.del,onClick:function(){return bn(On.name,On.loaded==100)}},t.a.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891"))},dn=function(){var On;return t.a.createElement(t.a.Fragment,null,(On=Vn.videoList)===null||On===void 0?void 0:On.map(function(pn,In){return t.a.createElement(t.a.Fragment,{key:In},pn.loaded==100?Ht(pn):Ut(pn.loaded))}))},qt=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:nn})},Pn=(bt=Vn.videoList)===null||bt===void 0?void 0:bt.length;return t.a.createElement("div",{className:_t.a.listForm},t.a.createElement("header",null,ct?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),t.a.createElement("section",{className:_t.a.scroll,id:"sss"},t.a.createElement("div",{className:_t.a.formWrap}," ",t.a.createElement(G.a,{form:Yt,scrollToFirstError:!0,layout:"vertical",onValuesChange:Xn,onFinish:ir},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(((At=jn.name)===null||At===void 0?void 0:At.length)||0,"/60")})),t.a.createElement(G.a.Item,{name:"content",label:"\u5185\u5BB9:"},t.a.createElement(Te.a,{defaultValue:jn.content||"",watch:!0})))),t.a.createElement("div",{className:_t.a.upload},Pn?dn():It(),t.a.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:on,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:_t.a.btns},t.a.createElement(te.a,{onClick:qt,type:"primary",ghost:!0},"\u5173\u95ED"),t.a.createElement(te.a,{loading:Gn,disabled:_n,onClick:function(){return Yt.submit()},type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},ar=Jn,mn=z("cWXX"),gr=z("/ezw"),Rr=z("CaVn"),vn=z.n(Rr),An=z("s8/Y"),_r=z.n(An),Zr=z("JOrW"),jr=z.n(Zr),tr=z("gqXR"),ur=z.n(tr),yi=z("14J3"),xr=z("BMrR"),Cr=z("jCWc"),Sr=z("kPKH"),Vr=z("wW8i"),Mr=z.n(Vr),Si=z("MVJL"),Or=z.n(Si),ei=function(st){var bt=st.id,At=st.cb,nn=Object(n.useState)(""),en=Object(d.a)(nn,2),ht=en[0],ct=en[1];return t.a.createElement("aside",{className:"mt10"},t.a.createElement(Te.a,{defaultValue:ht,id:"writeForumsReviewId",onChange:function(vt){ct(vt)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),t.a.createElement(xr.a,null,t.a.createElement(Sr.a,{flex:"1"}),t.a.createElement(Sr.a,null,t.a.createElement(te.a,{type:"primary",size:"large",onClick:Object(h.a)(i.a.mark(function Ft(){return i.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:ht===""?T.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):At(bt,ht);case 1:case"end":return Yt.stop()}},Ft)}))},"\u53D1\u9001"))))},ri=function(st){var bt,At=st.data;return t.a.createElement("div",{className:Or.a.thirdlyLevelDiscuss},t.a.createElement("span",{className:"c-grey-333"},t.a.createElement("span",{className:"font 14 c-light-primary"},At==null||((bt=At.author)===null||bt===void 0)?void 0:bt.name),"@",t.a.createElement("span",{className:"font 14 c-light-primary"},At==null?void 0:At.parent_name),":"),t.a.createElement(rt.a,{value:At==null?void 0:At.content}))},Xr=function(st){var bt,At,nn,en,ht=st.data,ct=st.onReplyDiscuss,Ft=st.thirdlyReply,vt=st.setThirdlyReply,Yt=Object(jt.x)();return console.log(Yt,"user"),t.a.createElement("div",{className:Or.a.list},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(ht==null||((bt=ht.author)===null||bt===void 0)?void 0:bt.image_url)}),t.a.createElement("div",{className:Or.a.wrap},t.a.createElement("div",{className:"font14",style:{marginBottom:6}},t.a.createElement("span",{className:"c-grey-333"},ht==null||((At=ht.author)===null||At===void 0)?void 0:At.name),(Yt==null?void 0:Yt.login)!==(ht==null||((nn=ht.author)===null||nn===void 0)?void 0:nn.login)&&t.a.createElement("span",{onClick:function(){return vt(ht==null?void 0:ht.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:ht==null?void 0:ht.content}),ht==null||((en=ht.children)===null||en===void 0)?void 0:en.map(function(Ot){return t.a.createElement(ri,{key:Ot.id,data:Ot})}),Ft===(ht==null?void 0:ht.id)&&t.a.createElement("div",null,t.a.createElement(ei,{id:ht==null?void 0:ht.id,cb:ct}),t.a.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:function(){return vt(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:Or.a.line})))},ui=function(st){var bt,At,nn,en,ht=st.data,ct=st.onReplyDiscuss,Ft=st.secondReply,vt=st.setSecondReply,Yt=st.thirdlyReply,Ot=st.setThirdlyReply,Zt=st.onPlusDiscuss,jn=Object(n.useState)(!1),Sn=Object(d.a)(jn,2),cn=Sn[0],Kn=Sn[1];return console.log(ht,"data"),t.a.createElement("div",{className:Or.a.discussItem},t.a.createElement("div",{className:Or.a.list},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(ht==null||((bt=ht.author)===null||bt===void 0)?void 0:bt.image_url)}),t.a.createElement("div",{className:Or.a.wrap},t.a.createElement("div",{className:"font14",style:{marginBottom:6}},t.a.createElement("span",{className:"c-grey-333 mr30"},ht==null||((At=ht.author)===null||At===void 0)?void 0:At.name),t.a.createElement("span",{className:"c-grey-999"},ht==null?void 0:ht.time)),t.a.createElement(rt.a,{value:ht==null?void 0:ht.content}),t.a.createElement("div",{className:Or.a.btns},t.a.createElement("div",{onClick:function(){return Zt(ht==null?void 0:ht.id)},className:ht!=null&&ht.user_praise?"c-light-primary":"c-grey-999"},t.a.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),t.a.createElement("span",null,ht==null?void 0:ht.praise_count)),t.a.createElement("div",{onClick:function(){var wn;if((ht==null||((wn=ht.children)===null||wn===void 0)?void 0:wn.length)===0)return;vt(null),Kn(!cn)},style:{color:cn?"#0152d9":"#999999"}},t.a.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),t.a.createElement("span",null,cn?"\u6536\u8D77\u8BC4\u8BBA":ht==null||((nn=ht.children)===null||nn===void 0)?void 0:nn.length)),t.a.createElement("div",{onClick:function(){Kn(!1),vt(Ft===(ht==null?void 0:ht.id)?null:ht==null?void 0:ht.id)},style:{color:Ft===(ht==null?void 0:ht.id)?"#0152d9":"#999999"}},t.a.createElement("i",{className:"iconfont icon-huifu3 mr3"}),t.a.createElement("span",null,Ft===(ht==null?void 0:ht.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Ft===(ht==null?void 0:ht.id)&&t.a.createElement(ei,{id:ht==null?void 0:ht.id,cb:function(wn,kn){ct(wn,kn),Kn(!0)}}),cn&&t.a.createElement("div",{className:Or.a.secondLevelDiscuss},ht==null||((en=ht.children)===null||en===void 0)?void 0:en.map(function(_n){return t.a.createElement(Xr,{thirdlyReply:Yt,setThirdlyReply:Ot,key:_n.id,data:_n,onReplyDiscuss:ct})})))))},Ri=ui,bi=function(st){var bt=st.identifier,At=st.active,nn=st.onOk,en=Object(n.useState)(""),ht=Object(d.a)(en,2),ct=ht[0],Ft=ht[1],vt=Object(n.useState)(1),Yt=Object(d.a)(vt,2),Ot=Yt[0],Zt=Yt[1],jn=Object(n.useState)([]),Sn=Object(d.a)(jn,2),cn=Sn[0],Kn=Sn[1],_n=Object(n.useState)(0),wn=Object(d.a)(_n,2),kn=wn[0],mr=wn[1],Gn=Object(n.useState)(null),qn=Object(d.a)(Gn,2),rr=qn[0],dr=qn[1],Vn=Object(n.useState)(null),Qn=Object(d.a)(Vn,2),Dn=Qn[0],Nt=Qn[1];Object(n.useEffect)(function(){an(1),Zt(1)},[At]);var an=function(){var Bn=Object(h.a)(i.a.mark(function on(bn){var It;return i.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,fe({container_type:"QuestionSolutionArticle",container_identifier:At,limit:5,page:bn});case 2:It=Ht.sent,It!=null&&It.comments&&(Kn((It==null?void 0:It.comments)||[]),Zt(bn),mr(It==null?void 0:It.disscuss_count));case 4:case"end":return Ht.stop()}},on)}));return function(bn){return Bn.apply(this,arguments)}}(),Hn=function(){var Bn=Object(h.a)(i.a.mark(function on(){var bn;return i.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:if(!(ct==="")){Ut.next=3;break}return T.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),Ut.abrupt("return");case 3:return Ut.next=5,be({comments:{content:ct},container_type:"QuestionSolutionArticle",container_identifier:At});case 5:bn=Ut.sent,bn!=null&&bn.discuss&&(Ft(""),an(Ot),nn());case 7:case"end":return Ut.stop()}},on)}));return function(){return Bn.apply(this,arguments)}}(),Xn=function(){var Bn=Object(h.a)(i.a.mark(function on(bn,It,Ut){var Ht;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,_e({container_type:"QuestionSolutionArticle",container_identifier:At,comments:{content:It,parent_id:bn}});case 2:Ht=qt.sent,dr(null),Nt(null),an(Ot);case 6:case"end":return qt.stop()}},on)}));return function(bn,It,Ut){return Bn.apply(this,arguments)}}(),ir=function(){var Bn=Object(h.a)(i.a.mark(function on(bn){var It;return i.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,ge(bn);case 2:It=Ht.sent,an(Ot);case 4:case"end":return Ht.stop()}},on)}));return function(bn){return Bn.apply(this,arguments)}}(),Fn=function(on){Zt(on),an(on)};return t.a.createElement("div",{className:Mr.a.discuss},t.a.createElement("aside",{className:Mr.a.reply,style:{borderWidth:kn?1:0}},t.a.createElement(Te.a,{defaultValue:ct,id:"writeForumsReviewId",onChange:function(on){Ft(on)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),t.a.createElement(xr.a,null,t.a.createElement(Sr.a,{flex:"1"}),t.a.createElement(Sr.a,null,t.a.createElement(te.a,{type:"primary",size:"large",onClick:function(){return Hn()}},"\u53D1\u9001")))),cn==null?void 0:cn.map(function(Bn){return t.a.createElement(Ri,{secondReply:rr,setSecondReply:dr,thirdlyReply:Dn,setThirdlyReply:Nt,key:Bn.id,data:Bn,onReplyDiscuss:Xn,onPlusDiscuss:ir})}),t.a.createElement(Le.a,{className:Mr.a.pagination,showTotal:function(on){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},on),"\u6761\u6570\u636E")},current:Ot,onChange:Fn,total:kn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},ii=bi,yr=z("hgre"),or=function(st){var bt,At,nn,en,ht,ct,Ft,vt,Yt,Ot,Zt=st.active,jn=st.identifier,Sn=st.onAssist,cn=st.onEdit,Kn=st.onArticlesSkip,_n=st.onClose,wn=st.onOk,kn=st.onDelete,mr=st.detailsIndex,Gn=st.btnShowStatus,qn=Object(n.useState)(!0),rr=Object(d.a)(qn,2),dr=rr[0],Vn=rr[1],Qn=Object(n.useState)({}),Dn=Object(d.a)(Qn,2),Nt=Dn[0],an=Dn[1];Object(n.useEffect)(function(){Zt&&Hn()},[Zt,mr]);var Hn=function(){var on=Object(h.a)(i.a.mark(function bn(){var It,Ut,Ht=arguments;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return It=Ht.length>0&&Ht[0]!==void 0?Ht[0]:!0,It&&Vn(!0),qt.next=4,Object(m.d)(jn,{active:Zt});case 4:Ut=qt.sent,(Ut==null?void 0:Ut.status)===0&&an((Ut==null?void 0:Ut.data)||{}),Vn(!1);case 7:case"end":return qt.stop()}},bn)}));return function(){return on.apply(this,arguments)}}(),Xn=function(){var on=Object(h.a)(i.a.mark(function bn(It){var Ut;return i.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return dn.next=2,Object(m.g)(jn,Object(a.a)({active:Zt},It));case 2:Ut=dn.sent,(Ut==null?void 0:Ut.status)===0&&(Hn(!1),wn());case 4:case"end":return dn.stop()}},bn)}));return function(It){return on.apply(this,arguments)}}(),ir=function(){var on=Object(h.a)(i.a.mark(function bn(It){var Ut;return i.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return dn.next=2,Object(m.c)(jn,{active:It==null?void 0:It.id});case 2:Ut=dn.sent,Ut.status===0&&(Hn(!1),wn());case 4:case"end":return dn.stop()}},bn)}));return function(It){return on.apply(this,arguments)}}(),Fn=function(bn){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 kn(bn)}})},Bn=function(){Hn(!1),wn()};return t.a.createElement("div",{className:vn.a.listDetails},t.a.createElement(gr.a,{className:"pt20 pl20 pr20",loading:dr,active:!0,paragraph:{rows:5}},t.a.createElement("div",{className:vn.a.head},t.a.createElement("div",{className:vn.a.name},t.a.createElement("div",{title:Nt==null?void 0:Nt.name,className:vn.a.title},Nt==null?void 0:Nt.name),(Nt==null?void 0:Nt.is_authority)&&t.a.createElement("div",{className:vn.a.b},"\u5B98\u65B9"),(Nt==null?void 0:Nt.is_excellent)&&t.a.createElement("div",{className:vn.a.a},"\u7CBE\u9009")),t.a.createElement("div",{className:vn.a.tag},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(Nt==null?void 0:Nt.image_url)}),t.a.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},Nt==null?void 0:Nt.username),t.a.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Ue()(Nt==null?void 0:Nt.created_at).format("YYYY-MM-DD")),t.a.createElement("span",null,t.a.createElement("img",{src:W.a}),t.a.createElement("span",null,Nt==null?void 0:Nt.praises_count)),t.a.createElement("span",null,t.a.createElement("img",{src:xe.a}),t.a.createElement("span",null,Nt==null?void 0:Nt.discusses_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Je.a}),t.a.createElement("span",null,Nt==null?void 0:Nt.viewed_count)),t.a.createElement("div",{className:vn.a.btn},(Object(jt.v)()||(Nt==null?void 0:Nt.is_self))&&t.a.createElement(t.a.Fragment,null,t.a.createElement(te.a,{onClick:function(){return Fn(Nt)},type:"primary",ghost:!0},"\u5220\u9664"),t.a.createElement(te.a,{onClick:function(){return cn(Nt)},type:"primary",ghost:!0},"\u7F16\u8F91")),Object(jt.v)()&&t.a.createElement(te.a,{onClick:function(){return Xn({is_authority:!(Nt!=null&&Nt.is_authority)})},type:"primary"},t.a.createElement("img",{src:jr.a}),Nt!=null&&Nt.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),Object(jt.v)()&&t.a.createElement(te.a,{onClick:function(){return Xn({is_excellent:!(Nt!=null&&Nt.is_excellent)})},type:"primary"},t.a.createElement("img",{src:_r.a}),Nt!=null&&Nt.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),t.a.createElement("div",{className:vn.a.scroll},(Nt==null||((bt=Nt.videos)===null||bt===void 0||((At=bt[0])===null||At===void 0))?void 0:At.id)&&t.a.createElement("div",{className:vn.a.video},t.a.createElement(S.a,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!(Nt!=null&&(nn=Nt.videos)!==null&&nn!==void 0&&(en=nn[0])!==null&&en!==void 0&&en.transcoded)},t.a.createElement(yr.a,{poster:Nt==null||((ht=Nt.videos)===null||ht===void 0||((ct=ht[0])===null||ct===void 0))?void 0:ct.cover_url,src:(Nt==null||((Ft=Nt.videos)===null||Ft===void 0||((vt=Ft[0])===null||vt===void 0))?void 0:vt.play_url)||"",videoId:Nt==null||((Yt=Nt.videos)===null||Yt===void 0||((Ot=Yt[0])===null||Ot===void 0))?void 0:Ot.id,logWatchHistory:function(){}}))),t.a.createElement(rt.a,{className:vn.a.html,value:(Nt==null?void 0:Nt.content)||""}),t.a.createElement("div",{onClick:function(){return ir(Nt)},className:vn.a.g},t.a.createElement("img",{className:"mr10",src:(Nt!=null&&Nt.user_liker,ur.a)}),t.a.createElement("span",null,Nt==null?void 0:Nt.praises_count)),t.a.createElement(ii,{onOk:Bn,active:Zt,identifier:jn})),t.a.createElement("div",{className:vn.a.btns},t.a.createElement(te.a,{onClick:function(){return _n()},type:"primary",ghost:!0},"\u5173\u95ED"),Gn[0]&&t.a.createElement(te.a,{onClick:function(bn){return Kn(bn,"prev")},style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),Gn[1]&&t.a.createElement(te.a,{onClick:function(bn){return Kn(bn,"next")},style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},ai=or,Di=z("3tLw"),Ni=z.n(Di),wi=z("ek7X"),ga=z("0NbB"),la=function(st){var bt=st.identifier,At=st.tabStatus,nn=st.setFilterListTotal,en=st.setListStatus,ht={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null},ct=Object(n.useState)(Object(a.a)({},ht)),Ft=Object(d.a)(ct,2),vt=Ft[0],Yt=Ft[1],Ot=Object(n.useState)(!1),Zt=Object(d.a)(Ot,2),jn=Zt[0],Sn=Zt[1],cn=Object(n.useState)(0),Kn=Object(d.a)(cn,2),_n=Kn[0],wn=Kn[1],kn=Object(n.useState)(1),mr=Object(d.a)(kn,2),Gn=mr[0],qn=mr[1],rr=Object(n.useState)(null),dr=Object(d.a)(rr,2),Vn=dr[0],Qn=dr[1],Dn=Object(n.useState)([]),Nt=Object(d.a)(Dn,2),an=Nt[0],Hn=Nt[1],Xn=Object(n.useState)([!0,!0]),ir=Object(d.a)(Xn,2),Fn=ir[0],Bn=ir[1],on=Object(n.useState)(0),bn=Object(d.a)(on,2),It=bn[0],Ut=bn[1],Ht=Object(n.useRef)(null);Object(n.useEffect)(function(){Er()},[At]),Object(n.useEffect)(function(){dn()},[Vn]),Object(n.useEffect)(function(){Pn(Object(a.a)({},ht)),Er()},[bt]),Object(n.useEffect)(function(){return window.addEventListener("resize",qt),en(It),function(){window.removeEventListener("resize",qt)}},[It]);var dn=function(){var Nn=Object(h.a)(i.a.mark(function gn(){var zn,$n;return i.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:if(Vn){Ln.next=3;break}return Bn([!0,!0]),Ln.abrupt("return");case 3:zn=[!0,!0],$n=an==null?void 0:an.findIndex(function(Yr){return Yr.id===Vn}),$n===0&&vt.page===1&&(zn[0]=!1),(vt.page-1)*vt.limit+($n+1)===vt.total&&(zn[1]=!1),Bn(zn);case 8:case"end":return Ln.stop()}},gn)}));return function(){return Nn.apply(this,arguments)}}(),qt=function(){if(It){var gn,zn=window.innerWidth-((gn=Ht.current)===null||gn===void 0?void 0:gn.clientWidth);wn(zn)}},Pn=function(){var Nn=Object(h.a)(i.a.mark(function gn(zn){var $n,Dr,Ln,Yr;return i.a.wrap(function(Wr){for(;;)switch(Wr.prev=Wr.next){case 0:return Sn(!0),Wr.next=3,Object(m.f)(bt,zn);case 3:return $n=Wr.sent,($n==null?void 0:$n.status)===0&&(Hn(($n==null||((Dr=$n.data)===null||Dr===void 0)?void 0:Dr.articles)||[]),Yt(Object(a.a)(Object(a.a)({},zn),{},{total:$n==null||((Ln=$n.data)===null||Ln===void 0)?void 0:Ln.articles_count})),nn($n==null||((Yr=$n.data)===null||Yr===void 0)?void 0:Yr.articles_count)),Sn(!1),Wr.abrupt("return",$n);case 7:case"end":return Wr.stop()}},gn)}));return function(zn){return Nn.apply(this,arguments)}}(),sn=function(){(vt==null?void 0:vt.sort_direction)===null?vt.sort_direction="asc":(vt==null?void 0:vt.sort_direction)==="asc"?vt.sort_direction="desc":(vt==null?void 0:vt.sort_direction)==="desc"&&(vt.sort_direction=null),vt.page=1,Er(),Yt(Object(a.a)({},vt)),Pn(vt)},On=function(){vt.page=1,vt.search=vt==null?void 0:vt.save_search,Er(),Yt(Object(a.a)({},vt)),Pn(vt)},pn=function(){var gn,zn=document.getElementsByClassName("btn-resize");zn[0].style.visibility="hidden";var $n=window.innerWidth-((gn=Ht.current)===null||gn===void 0?void 0:gn.clientWidth);wn($n)},In=function(){pn(),Ut(1)},Yn=function(gn){pn(),Qn(gn==null?void 0:gn.id),Ut(3)},sr=function(gn){pn(),Qn(gn==null?void 0:gn.id),Ut(2)},Er=function(){var gn=document.getElementsByClassName("btn-resize");gn[0].style.visibility="visible",wn(0),Ut(0),Qn(null)},zr=function(gn){Ut(3),Qn(gn),vt.page=1,Yt(Object(a.a)({},vt)),Pn(vt)},Ci=function(gn){Ut(3),Qn(gn),Yt(Object(a.a)({},vt)),Pn(vt)},Br=function(gn){Yt(Object(a.a)({},vt)),Pn(vt)},Mi=function(){var Nn=Object(h.a)(i.a.mark(function gn(zn){var $n;return i.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,Object(m.c)(bt,{active:zn==null?void 0:zn.id});case 2:$n=Ln.sent,$n.status===0&&(Pn(vt),qn(Gn+1));case 4:case"end":return Ln.stop()}},gn)}));return function(zn){return Nn.apply(this,arguments)}}(),$i=function(){var Nn=Object(h.a)(i.a.mark(function gn(zn){var $n;return i.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,Object(m.e)(bt,{active:zn==null?void 0:zn.id});case 2:$n=Ln.sent,$n.status===0&&(Pn(vt),qn(Gn+1));case 4:case"end":return Ln.stop()}},gn)}));return function(zn){return Nn.apply(this,arguments)}}(),Ui=function(){var Nn=Object(h.a)(i.a.mark(function gn(zn){var $n;return i.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,Object(m.i)(bt,{active:zn==null?void 0:zn.id});case 2:$n=Ln.sent,$n.status===0&&(Er(),Pn(vt));case 4:case"end":return Ln.stop()}},gn)}));return function(zn){return Nn.apply(this,arguments)}}(),ti=function(gn){vt.page=gn,Yt(Object(a.a)({},vt)),Pn(vt)},ji=function(){var Nn=Object(h.a)(i.a.mark(function gn(zn,$n){var Dr,Ln,Yr,Ar,Wr,hi,Oi,Fi,Mn,hn,Un;return i.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:if(Dr=an==null?void 0:an.findIndex(function(vr){return vr.id===Vn}),console.log(Dr,$n,22),!($n==="prev")){Tn.next=21;break}if(!(Dr===void 0)){Tn.next=6;break}return T.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Tn.abrupt("return");case 6:if(!(Dr===0)){Tn.next=19;break}if(!(vt.page===1)){Tn.next=10;break}return T.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Tn.abrupt("return");case 10:if(!(vt.page!==1)){Tn.next=17;break}return vt.page=vt.page-1,Yt(Object(a.a)({},vt)),Tn.next=15,Pn(vt);case 15:Ln=Tn.sent,(Ln==null?void 0:Ln.status)===0&&(hi=Ln==null||((Yr=Ln.data)===null||Yr===void 0)?void 0:Yr.articles[(Ln==null||((Ar=Ln.data)===null||Ar===void 0||((Wr=Ar.articles)===null||Wr===void 0))?void 0:Wr.length)-1],Qn(hi==null?void 0:hi.id),console.log(zn.target,555));case 17:Tn.next=21;break;case 19:Oi=an[Dr-1],Qn(Oi==null?void 0:Oi.id);case 21:if(!($n==="next")){Tn.next=39;break}if(!(Dr===void 0)){Tn.next=25;break}return T.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Tn.abrupt("return");case 25:if(!((vt.page-1)*vt.limit+(Dr+1)===vt.total)){Tn.next=28;break}return T.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Tn.abrupt("return");case 28:if(!(Dr+1===vt.limit)){Tn.next=37;break}return vt.page=vt.page+1,Yt(Object(a.a)({},vt)),Tn.next=33,Pn(vt);case 33:Fi=Tn.sent,(Fi==null?void 0:Fi.status)===0&&(hn=Fi==null||((Mn=Fi.data)===null||Mn===void 0)?void 0:Mn.articles[0],Qn(hn==null?void 0:hn.id)),Tn.next=39;break;case 37:Un=an[Dr+1],Qn(Un==null?void 0:Un.id);case 39:case"end":return Tn.stop()}},gn)}));return function(zn,$n){return Nn.apply(this,arguments)}}();return t.a.createElement("div",{className:gt.a.wrap,ref:Ht},t.a.createElement("div",{className:gt.a.head},t.a.createElement("div",{className:gt.a.sort,onClick:sn},t.a.createElement("span",null,"\u6700\u65B0"),t.a.createElement("aside",null,t.a.createElement(wi.a,{style:{color:(vt==null?void 0:vt.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),t.a.createElement(ga.a,{style:{color:(vt==null?void 0:vt.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),t.a.createElement(J.a.Search,{value:vt.save_search,className:gt.a["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:function(gn){vt.save_search=gn.target.value,Yt(Object(a.a)({},vt))},onSearch:On}),t.a.createElement("div",{onClick:In,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:jn,className:"mt20"},an==null?void 0:an.map(function(Nn,gn){var zn=!0;return gn+1===an.length&&gn!==0&&(zn=!1),t.a.createElement(St,{active:Vn,key:Nn.id,data:Nn,showLine:zn,onClick:Yn,onAssist:Mi,onHide:$i})}),(an==null?void 0:an.length)===0&&t.a.createElement(M.a,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),t.a.createElement(Le.a,{className:gt.a.pagination,showTotal:function(gn){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},gn),"\u6761\u6570\u636E")},total:vt.total,showSizeChanger:!1,current:vt==null?void 0:vt.page,onChange:ti,hideOnSinglePage:!0,showQuickJumper:!0}),It>0&&t.a.createElement("div",{className:gt.a.fixedRight,style:{width:_n}},It===1&&t.a.createElement(ar,{identifier:bt,onClose:Er,onOk:zr}),It===2&&t.a.createElement(ar,{active:Vn,identifier:bt,onClose:Er,onOk:Ci}),It===3&&t.a.createElement(ai,{btnShowStatus:Fn,onArticlesSkip:ji,detailsIndex:Gn,active:Vn,identifier:bt,onClose:Er,onOk:Br,onEdit:sr,onAssist:Mi,onDelete:Ui})))},tn=la,xn=z("VEzc"),fn=z.n(xn),Zn=function(st){var bt,At=st.visible,nn=st.onVisible,en=st.value,ht=st.onChange,ct=st.setIndex,Ft={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null},vt=Object(n.useState)(Ft),Yt=Object(d.a)(vt,2),Ot=Yt[0],Zt=Yt[1],jn=Object(n.useState)([]),Sn=Object(d.a)(jn,2),cn=Sn[0],Kn=Sn[1],_n=Object(n.useState)([]),wn=Object(d.a)(_n,2),kn=wn[0],mr=wn[1],Gn=Object(n.useState)(!1),qn=Object(d.a)(Gn,2),rr=qn[0],dr=qn[1],Vn=Object(n.useRef)([]),Qn=Object(n.useRef)(null),Dn=Object(v.i)();Object(n.useEffect)(function(){return Dn!=null&&Dn.id&&(Qn.current=setInterval(function(){Nt(30)},3e4)),function(){clearInterval(Qn.current)}},[]);var Nt=function(){var It=Object(h.a)(i.a.mark(function Ut(Ht){var dn;return i.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:return Pn.next=2,Object(m.r)(Dn==null?void 0:Dn.id,{practice_time:Ht});case 2:dn=Pn.sent;case 3:case"end":return Pn.stop()}},Ut)}));return function(Ht){return It.apply(this,arguments)}}();Object(n.useEffect)(function(){Bn(Ot),ir()},[]),Object(n.useEffect)(function(){return window.addEventListener("click",Hn),function(){window.removeEventListener("click",Hn)}},[Dn==null?void 0:Dn.save_identifier,At]),Object(n.useEffect)(function(){var It=Vn.current.findIndex(function(Pn){return Pn.identifier===(Dn==null?void 0:Dn.save_identifier)}),Ut=Vn.current[It-1],Ht=Vn.current[It+1],dn=document.getElementById("oj-prev"),qt=document.getElementById("oj-next");Ut?dn.style.display="block":dn.style.display="none",Ht?qt.style.display="block":qt.style.display="none"},[Dn==null?void 0:Dn.save_identifier,Vn.current]);var an=function(Ut,Ht){if(Ut.id===Ht)return Ut;for(var dn=0,qt=Ut;qt=qt.parentNode;dn++){if(qt.id===Ht)return qt;if(qt==document.documentElement)return!1}},Hn=function(){var It=Object(h.a)(i.a.mark(function Ut(Ht){var dn,qt,Pn;return i.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:if(!an(Ht.target,"oj-drawer")&&At&&nn(!1),dn=Vn.current.findIndex(function(pn){return pn.identifier===(Dn==null?void 0:Dn.save_identifier)}),qt=Vn.current[dn-1],Pn=Vn.current[dn+1],!(Ht.target.id==="oj-prev")){On.next=14;break}if(!(!qt||dn===-1)){On.next=8;break}return T.b.warn("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728"),On.abrupt("return");case 8:return Ht.target.style.pointerEvents="none",Ht.target.style.cursor="not-allowed",On.next=12,on(qt==null?void 0:qt.identifier);case 12:ct("0"),setTimeout(function(){Ht.target.style.pointerEvents="auto",Ht.target.style.cursor="pointer"},400);case 14:if(!(Ht.target.id==="oj-next"||Ht.target.id==="oj-modal-next")){On.next=24;break}if(!(!Pn||dn===-1)){On.next=18;break}return T.b.warn("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728"),On.abrupt("return");case 18:return Ht.target.style.pointerEvents="none",Ht.target.style.cursor="not-allowed",On.next=22,on(Pn==null?void 0:Pn.identifier);case 22:ct("0"),setTimeout(function(){Ht.target.style.pointerEvents="auto",Ht.target.style.cursor="pointer"},400);case 24:case"end":return On.stop()}},Ut)}));return function(Ht){return It.apply(this,arguments)}}();Object(n.useEffect)(function(){ht(Dn==null?void 0:Dn.save_identifier);var It=kn.findIndex(function(Ut){return Ut.some(function(Ht){return Ht.identifier===(Dn==null?void 0:Dn.save_identifier)})});It===-1?Zt(Object(a.a)(Object(a.a)({},Ot),{},{page:1})):Zt(Object(a.a)(Object(a.a)({},Ot),{},{page:It+1}))},[Dn==null?void 0:Dn.save_identifier,kn]);var Xn=function(Ut){Ot.page=1,Ot.tag_discipline_id=Ut,Zt(Object(a.a)({},Ot)),Bn(Ot)},ir=function(){var It=Object(h.a)(i.a.mark(function Ut(){var Ht;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Object(Oe.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});case 2:Ht=qt.sent,Kn(Ht.tag_disciplines||[]);case 4:case"end":return qt.stop()}},Ut)}));return function(){return It.apply(this,arguments)}}(),Fn=function(Ut){Ot.page=1,Ot.difficulty=typeof Ut=="number"?Ut:null,Zt(Object(a.a)({},Ot)),Bn(Ot)},Bn=function(){var It=Object(h.a)(i.a.mark(function Ut(Ht){var dn,qt,Pn,sn,On,pn;return i.a.wrap(function(Yn){for(;;)switch(Yn.prev=Yn.next){case 0:return dr(!0),Yn.next=3,Object(m.p)(Ht);case 3:if(dn=Yn.sent,dn!=null&&dn.practices_list){for(Pn=dn==null||((qt=dn.practices_list)===null||qt===void 0)?void 0:qt.length,sn=[],On=0;On<Pn;On+=Ot==null?void 0:Ot.per_page)sn.push(dn==null||((pn=dn.practices_list)===null||pn===void 0)?void 0:pn.slice(On,On+(Ot==null?void 0:Ot.per_page)));Zt(Object(a.a)(Object(a.a)({},Ot),{},{total:dn==null?void 0:dn.practices_count})),Vn.current=(dn==null?void 0:dn.practices_list)||[],mr(sn)}dr(!1);case 6:case"end":return Yn.stop()}},Ut)}));return function(Ht){return It.apply(this,arguments)}}(),on=function(){var It=Object(h.a)(i.a.mark(function Ut(Ht,dn){var qt;return i.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return sn.next=2,Object(Oe.a)("/api/practices/".concat(Ht,"/start"),{method:"get"});case 2:qt=sn.sent,(qt==null?void 0:qt.status)===0&&_.d.push("/problems/".concat(qt==null?void 0:qt.identifier,"/oj/").concat(Ht));case 4:case"end":return sn.stop()}},Ut)}));return function(Ht,dn){return It.apply(this,arguments)}}(),bn=function(Ut){Ot.page=Ut,Zt(Object(a.a)({},Ot))};return t.a.createElement("div",{className:fn.a.wrap,id:"oj-drawer",style:{left:At?0:-700}},t.a.createElement("div",{className:fn.a.head},t.a.createElement("div",{className:fn.a.title},"\u9898\u76EE\u5217\u8868"),t.a.createElement(J.a.Search,{value:Ot==null?void 0:Ot.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:178,marginLeft:"auto",marginRight:10},onChange:function(Ut){Ot.save_search=Ut.target.value,Zt(Object(a.a)({},Ot))},onSearch:function(){Ot.page=1,Ot.search=Ot.save_search,Zt(Object(a.a)({},Ot)),Bn(Ot)}}),t.a.createElement(w.a,{value:Ot==null?void 0:Ot.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:function(Ut){return Ut.parentNode},maxTagTextLength:2,maxTagCount:2,onChange:Xn},cn.map(function(It){return t.a.createElement(w.a.Option,{key:It.id,value:It.id},It.name)})),t.a.createElement(w.a,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:function(Ut){return Ut.parentNode},value:Ot==null?void 0:Ot.difficulty,onChange:Fn},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:fn.a.content},t.a.createElement(S.a,{spinning:rr},kn==null||((bt=kn[Ot.page-1])===null||bt===void 0)?void 0:bt.map(function(It){return t.a.createElement("div",{key:It.identifier,className:fn.a.list,onClick:function(Ht){return on(It.identifier,Ht)}},t.a.createElement("i",{style:{visibility:en===It.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),t.a.createElement("span",{style:{fontWeight:en===It.identifier?"bold":400,color:en===It.identifier?"#ffffff":"#bac4cd"},title:It==null?void 0:It.name},It.name),(It==null?void 0:It.difficulty)===1&&t.a.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(It==null?void 0:It.difficulty)===2&&t.a.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(It==null?void 0:It.difficulty)===3&&t.a.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))}))),t.a.createElement("div",{className:fn.a.footer},t.a.createElement(Le.a,{showTotal:function(Ut){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},Ut),"\u6761\u6570\u636E")},total:Ot.total,pageSize:Ot==null?void 0:Ot.per_page,current:Ot==null?void 0:Ot.page,showSizeChanger:!1,onChange:bn,showQuickJumper:!0,hideOnSinglePage:!0})))},nr=Zn,cr=function(at){var st,bt=at.hack,At=at.onTriggerPraise,nn=at.topicId,en=at.page,ht=at.onPageChange,ct=at.user,Ft=at.submitRecords,vt=at.submitting,Yt=at.submitResult,Ot=Object(v.h)(),Zt=Object(n.useState)((Ot==null||((st=Ot.query)===null||st===void 0)?void 0:st.tab)||"0"),jn=Object(d.a)(Zt,2),Sn=jn[0],cn=jn[1],Kn=Object(n.useState)(0),_n=Object(d.a)(Kn,2),wn=_n[0],kn=_n[1],mr=Object(n.useState)(0),Gn=Object(d.a)(mr,2),qn=Gn[0],rr=Gn[1],dr=Object(n.useState)(0),Vn=Object(d.a)(dr,2),Qn=Vn[0],Dn=Vn[1],Nt=Object(n.useState)(),an=Object(d.a)(Nt,2),Hn=an[0],Xn=an[1],ir=Object(n.useState)(!1),Fn=Object(d.a)(ir,2),Bn=Fn[0],on=Fn[1];function bn(Ut){var Ht=Ut.target.id;if(Sn==="3"&&Ht!==Sn&&(qn===1||qn===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(){cn(Ht)}});return}cn(Ht)}Object(n.useEffect)(function(){var Ut=Xe.a.subscribe("to-commit-info",function(){cn("1")});return Ut},[]);function It(){cn("2")}return t.a.createElement("div",{className:Ee.a["left-panel"]},t.a.createElement("ul",{className:"".concat(Ee.a["s-navs"]," ").concat(Ee.a["bg-white"]," ").concat(Ee.a.b1)},t.a.createElement("li",{className:"mr40 current"},t.a.createElement("img",{onClick:function(){return on(!0)},src:Ve.a})),t.a.createElement("li",{className:Ee.a["oj-mr"]},t.a.createElement("a",{className:Sn==="0"?Ee.a.active:"",id:"0",onClick:bn},"\u4EFB\u52A1\u63CF\u8FF0")),t.a.createElement("li",{className:Ee.a["oj-mr"]},t.a.createElement("a",{className:Sn==="3"?Ee.a.active:"",id:"3",onClick:bn},"\u9898\u89E3",Qn?"(".concat(Qn,")"):"")),t.a.createElement("li",{className:Ee.a["oj-mr"]},t.a.createElement("a",{className:Sn==="2"?Ee.a.active:"",id:"2",onClick:bn},"\u8BC4\u8BBA",wn?"(".concat(wn,")"):"")),t.a.createElement("li",null,t.a.createElement("a",{className:Sn==="1"?Ee.a.active:"",id:"1",onClick:bn},"\u63D0\u4EA4\u8BB0\u5F55"))),t.a.createElement("div",{className:"".concat(Ee.a["tab-panel-body"]," ").concat(Sn==="0"?"":"hide"),style:{padding:"0 0 0 16px"}},t.a.createElement(Me,{hack:bt,onTriggerPraise:At,toDiscuss:It})),t.a.createElement("div",{className:"".concat(Ee.a["tab-panel-body"]," ").concat(Sn==="1"?"":"hide")},Ft!=null&&Ft.records_count?t.a.createElement(ee,{page:en,onPageChange:ht,topicId:nn,submitting:vt,submitRecords:Ft,submitResult:Yt}):t.a.createElement(M.a,null)),t.a.createElement("div",{className:"".concat(Ee.a["tab-panel-body"]," ").concat(Sn==="2"?"":"hide"),style:{padding:0}},t.a.createElement(Ct,{setDiscussTotal:kn,user:ct,identifier:bt.identifier,hack:bt,onTriggerPraise:At})),t.a.createElement("div",{className:"".concat(Ee.a["tab-panel-body"]," ").concat(Sn==="3"?"":"hide"),style:{padding:0}},t.a.createElement(tn,{setListStatus:rr,setFilterListTotal:Dn,tabStatus:Sn,identifier:bt.identifier})),t.a.createElement(nr,{visible:Bn,setIndex:cn,onVisible:function(Ht){return on(Ht)},value:Hn,onChange:function(Ht){return Xn(Ht)}}))},hr=function(st){return String(st).length===1?"0".concat(st):st},pr=function(st){var bt=st.className,At=bt===void 0?"":bt,nn=st.onChange,en=Object(n.useState)(0),ht=Object(d.a)(en,2),ct=ht[0],Ft=ht[1];Object(n.useEffect)(function(){var Zt=setTimeout(function(){Ft(ct+1e3)},1e3);return nn(ct+1e3),function(){clearInterval(Zt)}},[ct]);var vt=parseInt(ct/(60*6e4))||"00",Yt=parseInt(ct%(60*6e4)/6e4)||"00",Ot=parseInt(ct%6e4/1e3)||"00";return t.a.createElement("div",{className:At},hr(vt),":",hr(Yt),":",hr(Ot))},kr=pr,oi=z("oFv4"),er=z.n(oi),_i=z("S/kP"),Fr=z.n(_i),Ti=z("t/PP"),fi=z.n(Ti),Pi=z("LvDl"),Ji=z.n(Pi),Pa=z("P5Jw"),Ma=s.a.Countdown,ya={Java:"java",C:"c",Python:"py","C++":"c"},Rn;(function(at){at[at.SET_LOADING=0]="SET_LOADING",at[at.GET_DATA=1]="GET_DATA",at[at.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",at[at.SET_DATA=3]="SET_DATA",at[at.SET_DEBUGING=4]="SET_DEBUGING",at[at.SET_SUBMITING=5]="SET_SUBMITING",at[at.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",at[at.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",at[at.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",at[at.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",at[at.SET_PAGE=10]="SET_PAGE",at[at.GET_LANGUAGE=11]="GET_LANGUAGE",at[at.GET_DRAWER=12]="GET_DRAWER"})(Rn||(Rn={}));function zi(){return new Date().getTime()}var ua={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 ba(at,st){switch(st.type){case Rn.GET_DATA:return Object(a.a)(Object(a.a)({},at),st.payload);case Rn.SET_DATA:return Object(a.a)(Object(a.a)({},at),{},{data:st.payload});case Rn.SET_LOADING:return Object(a.a)(Object(a.a)({},at),{},{loading:st.payload});case Rn.GET_LANGUAGE:return Object(a.a)(Object(a.a)({},at),{},{languageList:st.payload});case Rn.GET_DRAWER:return Object(a.a)(Object(a.a)({},at),{},{drawerData:st.payload});case Rn.SET_SHOW_NOTE:return Object(a.a)(Object(a.a)({},at),{},{showNote:st.payload});case Rn.SET_DEBUGING:return Object(a.a)(Object(a.a)({},at),{},{debuging:st.payload});case Rn.SET_SUBMITING:return Object(a.a)(Object(a.a)({},at),{},{submitting:st.payload});case Rn.GET_SUBMIT_RECORDS:return Object(a.a)(Object(a.a)({},at),{},{submitRecords:st.payload});case Rn.SET_PAGE:return Object(a.a)(Object(a.a)({},at),{},{submitRecordPage:st.payload});case Rn.SET_EXECUTE_MESSAGE:return Object(a.a)(Object(a.a)({},at),{},{executingMessage:st.payload});case Rn.SET_EXECUTE_RESULT:return Object(a.a)(Object(a.a)({},at),st.payload);case Rn.SET_SUBMIT_RESULT:return Object(a.a)(Object(a.a)({},at),st.payload);default:throw new Error}}var Yi=We.default=function(at){var st,bt,At=at.children,nn=Object(n.useReducer)(ba,ua),en=Object(d.a)(nn,2),ht=en[0],ct=en[1],Ft=Object(v.i)(),vt=Ft.id,Yt=Object(v.g)(),Ot=Object(v.h)(),Zt=ht.languageValue,jn=ht.languageList,Sn=ht.loading,cn=ht.data,Kn=ht.debugResult,_n=ht.submitResult,wn=ht.submitRecords,kn=ht.submitRecordPage,mr=ht.showNote,Gn=ht.debuging,qn=ht.submitting,rr=ht.executingMessage,dr=Object(n.useState)("#FFF"),Vn=Object(d.a)(dr,2),Qn=Vn[0],Dn=Vn[1],Nt=Object(n.useState)(null),an=Object(d.a)(Nt,2),Hn=an[0],Xn=an[1],ir=Object(n.useState)({}),Fn=Object(d.a)(ir,2),Bn=Fn[0],on=Fn[1],bn=Object(n.useState)(!1),It=Object(d.a)(bn,2),Ut=It[0],Ht=It[1],dn=Object(n.useRef)(null),qt=Object(n.useRef)(null),Pn=cn==null?void 0:cn.user,sn=cn==null?void 0:cn.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(Ut){var Mn,hn=document.getElementById("oj-next"),Un=document.getElementById("oj-modal-next");(hn==null||((Mn=hn.style)===null||Mn===void 0)?void 0:Mn.display)==="none"?Un.style.display="none":Un.style.display="block"}},[Ut]),Object(n.useEffect)(function(){function Mn(){return hn.apply(this,arguments)}function hn(){return hn=Object(h.a)(i.a.mark(function Un(){var zt,Tn,vr,Ir,Nr;return i.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:return rn.next=2,Object(m.m)(vt);case 2:zt=rn.sent,zt.status===401?document.location.href="/user/login":(zt.hack=zt.practice,zt.hack.code=C.Base64.decode(zt==null||((Tn=zt.hack)===null||Tn===void 0)?void 0:Tn.code),Nr="".concat(Pn==null?void 0:Pn.login,"-language"),localStorage.getItem(Nr)&&(zt.hack.language=localStorage.getItem(Nr)),qt.current=Ji.a.cloneDeep(zt),qt.current.language=zt==null||((vr=zt.hack)===null||vr===void 0)?void 0:vr.language,ct({type:Rn.GET_DATA,payload:{loading:!1,data:zt}}),ct({type:Rn.SET_SUBMIT_RESULT,payload:{languageValue:zt==null||((Ir=zt.hack)===null||Ir===void 0)?void 0:Ir.language}}));case 4:case"end":return rn.stop()}},Un)})),hn.apply(this,arguments)}vt&&Mn()},[vt]),Object(n.useEffect)(function(){ct({type:Rn.SET_SUBMIT_RESULT,payload:{debugResult:void 0}}),Yn(),Ht(!1)},[vt]),Object(n.useEffect)(function(){clearTimeout(dn.current)},[vt]),Object(n.useEffect)(function(){pn()},[vt,kn]);var On=function(){window.parent.postMessage("backExercise","*")};function pn(){return In.apply(this,arguments)}function In(){return In=Object(h.a)(i.a.mark(function Mn(){var hn;return i.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.prev=0,zt.next=3,Object(m.o)(vt,{limit:15,page:kn});case 3:hn=zt.sent,ct({type:Rn.GET_SUBMIT_RECORDS,payload:hn}),zt.next=10;break;case 7:zt.prev=7,zt.t0=zt.catch(0),console.log(zt.t0);case 10:case"end":return zt.stop()}},Mn,null,[[0,7]])})),In.apply(this,arguments)}function Yn(){return sr.apply(this,arguments)}function sr(){return sr=Object(h.a)(i.a.mark(function Mn(){var hn;return i.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.prev=0,zt.next=3,Object(m.w)(vt);case 3:hn=zt.sent,ct({type:Rn.GET_LANGUAGE,payload:hn==null?void 0:hn.data}),zt.next=10;break;case 7:zt.prev=7,zt.t0=zt.catch(0),console.log(zt.t0);case 10:case"end":return zt.stop()}},Mn,null,[[0,7]])})),sr.apply(this,arguments)}function Er(Mn){ct({type:Rn.SET_PAGE,payload:Mn})}function zr(Mn){return Ci.apply(this,arguments)}function Ci(){return Ci=Object(h.a)(i.a.mark(function Mn(hn){var Un,zt,Tn,vr,Ir,Nr;return i.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:return Ir=((Un=window)===null||Un===void 0||((zt=Un.location)===null||zt===void 0||((Tn=zt.pathname)===null||Tn===void 0||((vr=Tn.split("/"))===null||vr===void 0)))?void 0:vr[2])||vt,rn.next=3,Object(m.v)(Ir,hn||{code:C.Base64.encode(sn.code),language:Zt});case 3:return Nr=rn.sent,rn.abrupt("return",Nr);case 5:case"end":return rn.stop()}},Mn)})),Ci.apply(this,arguments)}function Br(){return Mi.apply(this,arguments)}function Mi(){return Mi=Object(h.a)(i.a.mark(function Mn(){var hn,Un,zt,Tn,vr,Ir,Nr;return i.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:if(!qn){rn.next=2;break}return rn.abrupt("return");case 2:return ct({type:Rn.SET_SUBMITING,payload:!0}),rn.prev=3,Xe.a.publish("to-commit-info"),rn.next=7,zr();case 7:if(hn=rn.sent,!(hn.status===0)){rn.next=21;break}return Nr=function(){return Nr=Object(h.a)(i.a.mark(function Zi(){var Bi,Ii,Wi,ea,ta,Vi;return i.a.wrap(function(wr){for(;;)switch(wr.prev=wr.next){case 0:return wr.next=2,Object(m.l)(vt,"submit");case 2:if(Bi=wr.sent,Ii=Bi.status,Wi=Bi.data,ea=zi(),ta=ea-vr>(Tn+3)*1e3,Ii!==0&&!ta&&setTimeout(Ir,1e3),!ta){wr.next=12;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),ct({type:Rn.SET_SUBMITING,payload:!1}),wr.abrupt("return");case 12:if(!(Ii===0)){wr.next=19;break}return Wi.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),wr.next=16,Object(m.o)(vt,{limit:15,page:kn});case 16:Vi=wr.sent,ct({type:Rn.SET_SUBMIT_RESULT,payload:Object(a.a)(Object(a.a)({},ht),{},{submitResult:Wi,submitting:!1,submitRecords:Vi})}),(Wi==null?void 0:Wi.status)===0&&Ht(!0);case 19:case"end":return wr.stop()}},Zi)})),Nr.apply(this,arguments)},Ir=function(){return Nr.apply(this,arguments)},Un={},rn.next=14,Object(m.s)(vt,Un);case 14:if(zt=rn.sent,!(zt.status===-1)){rn.next=18;break}return window.parent.location.href="/classrooms/".concat(Ot.query.coursesId,"/exercise/").concat(Ot.query.exercisesId,"/detail"),rn.abrupt("return");case 18:Tn=sn.time_limit,vr=zi(),Ir();case 21:rn.next=26;break;case 23:rn.prev=23,rn.t0=rn.catch(3),ct({type:Rn.SET_SUBMITING,payload:!1});case 26:case"end":return rn.stop()}},Mn,null,[[3,23]])})),Mi.apply(this,arguments)}function $i(){return Ui.apply(this,arguments)}function Ui(){return Ui=Object(h.a)(i.a.mark(function Mn(){var hn,Un,zt,Tn,vr,Ir,Nr;return i.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:return ht.debuging=!0,ct({type:Rn.SET_DEBUGING,payload:!0}),rn.prev=2,rn.next=5,zr();case 5:if(hn=rn.sent,!(hn.status===0)){rn.next=21;break}return Nr=function(){return Nr=Object(h.a)(i.a.mark(function Zi(){var Bi,Ii,Wi,ea,ta,Vi;return i.a.wrap(function(wr){for(;;)switch(wr.prev=wr.next){case 0:return wr.next=2,Object(m.l)(vt,"debug");case 2:if(Bi=wr.sent,Ii=Bi.status,Wi=Bi.message,ea=Bi.data,ta=zi(),Vi=ta-vr>(Un+3)*1e3,Ii!==0&&!Vi&&(ct({type:Rn.SET_EXECUTE_MESSAGE,payload:Wi}),setTimeout(Ir,1e3)),!Vi){wr.next=13;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),ct({type:Rn.SET_DEBUGING,payload:!1}),wr.abrupt("return");case 13:Ii===0&&(ct({type:Rn.SET_DEBUGING,payload:!1}),ea.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),ct({type:Rn.SET_EXECUTE_RESULT,payload:Object(a.a)(Object(a.a)({},ht),{},{debugResult:ea,debuging:!1})}));case 14:case"end":return wr.stop()}},Zi)})),Nr.apply(this,arguments)},Ir=function(){return Nr.apply(this,arguments)},Un=sn.time_limit,zt={input:encodeURIComponent(cn.test_case.input)},rn.next=13,Object(m.h)(vt,zt);case 13:if(Tn=rn.sent,!(Tn.status===-1)){rn.next=17;break}return window.parent.location.href="/classrooms/".concat(Ot.query.coursesId,"/exercise/").concat(Ot.query.exercisesId,"/detail"),rn.abrupt("return");case 17:vr=zi(),Ir(),rn.next=22;break;case 21:ct({type:Rn.SET_DEBUGING,payload:!1});case 22:rn.next=27;break;case 24:rn.prev=24,rn.t0=rn.catch(2),console.log(rn.t0);case 27:return rn.prev=27,rn.finish(27);case 29:case"end":return rn.stop()}},Mn,null,[[2,24,27,29]])})),Ui.apply(this,arguments)}function ti(Mn){var hn;clearTimeout(dn.current),dn.current=setTimeout(function(){var Un;zr({code:C.Base64.encode(Mn),language:qt==null||((Un=qt.current)===null||Un===void 0)?void 0:Un.language})},2e3),ct({type:Rn.SET_DATA,payload:Object(a.a)(Object(a.a)({},qt==null?void 0:qt.current),{},{hack:Object(a.a)(Object(a.a)({},qt==null||((hn=qt.current)===null||hn===void 0)?void 0:hn.hack),{},{code:Mn})})})}function ji(Mn){var hn=Mn.target.value;ct({type:Rn.SET_DATA,payload:Object(a.a)(Object(a.a)({},cn),{},{test_case:{input:hn}})})}var Nn=function(){var Mn=Object(h.a)(i.a.mark(function hn(Un){var zt,Tn,vr,Ir,Nr;return i.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:return ct({type:Rn.SET_LOADING,payload:!0}),rn.next=3,zr();case 3:if(zt=rn.sent,!(zt.status===0)){rn.next=14;break}return ct({type:Rn.SET_SUBMIT_RESULT,payload:{languageValue:Un}}),qt.current.language=Un,Tn="".concat(Pn==null?void 0:Pn.login,"-language"),localStorage.setItem(Tn,Un),rn.next=11,Object(m.w)(vt);case 11:vr=rn.sent,vr.status===0&&(Nr=vr==null||((Ir=vr.data)===null||Ir===void 0)?void 0:Ir.find(function(ki){return ki.language===Un}),ti(C.Base64.decode(Nr.code))),setTimeout(function(){ct({type:Rn.SET_LOADING,payload:!1})},300);case 14:case"end":return rn.stop()}},hn)}));return function(Un){return Mn.apply(this,arguments)}}();function gn(){return zn.apply(this,arguments)}function zn(){return zn=Object(h.a)(i.a.mark(function Mn(){var hn;return i.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.prev=0,zt.next=3,Object(m.q)(vt,{language:Zt});case 3:hn=zt.sent,hn.status===401?Yt.replace("/login",{from:Ot.pathname}):(ti(C.Base64.decode(hn.code)),Yn()),zt.next=10;break;case 7:zt.prev=7,zt.t0=zt.catch(0),console.log(zt.t0);case 10:case"end":return zt.stop()}},Mn,null,[[0,7]])})),zn.apply(this,arguments)}function $n(){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 hn(){var Un;return i.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return Tn.next=2,Object(m.t)(vt,{language:Zt});case 2:Un=Tn.sent,Un.status===401?Yt.replace("/login",{from:Ot.pathname}):ti(C.Base64.decode(Un.code));case 4:case"end":return Tn.stop()}},hn)}))()}})}function Dr(){ct({type:Rn.SET_SHOW_NOTE,payload:!0})}function Ln(){ct({type:Rn.SET_SHOW_NOTE,payload:!1})}function Yr(Mn){return Ar.apply(this,arguments)}function Ar(){return Ar=Object(h.a)(i.a.mark(function Mn(hn){return i.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.next=2,Object(m.b)(vt,hn);case 2:ct({type:Rn.GET_DATA,payload:{showNote:!1,data:Object(a.a)(Object(a.a)({},cn),{},{hack:Object(a.a)(Object(a.a)({},sn),{},{notes:hn.notes})})}});case 3:case"end":return zt.stop()}},Mn)})),Ar.apply(this,arguments)}var Wr={input:cn==null||((st=cn.test_case)===null||st===void 0)?void 0:st.input,language:sn==null?void 0:sn.language,code:sn==null?void 0:sn.code,title:"main."+ya[sn==null?void 0:sn.language],modify_code:sn==null?void 0:sn.modify_code,notes:sn==null?void 0:sn.notes,debugResult:Kn,debuging:Gn,submitting:qn,executingMessage:rr,id:vt,languageValue:Zt,languageList:jn,onChangeLanguage:Nn,onCancelNote:Ln,onAddNote:Yr,showNote:mr,onShowNote:Dr,onSubmitCode:Br,onChangeCode:ti,onChangeInput:ji,onDebugCode:$i,onResetCode:gn,onSyncCode:$n,onUpdateCode:zr};function hi(){return Oi.apply(this,arguments)}function Oi(){return Oi=Object(h.a)(i.a.mark(function Mn(){var hn,Un,zt;return i.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,Object(m.u)(sn.id,{container_type:"Hack",type:1});case 2:hn=vr.sent,Un=hn.praise_count,zt=Object(a.a)(Object(a.a)({},cn),{},{hack:Object(a.a)(Object(a.a)({},sn),{},{praises_count:Un,user_praise:!sn.user_praise})}),ct({type:Rn.SET_DATA,payload:zt});case 6:case"end":return vr.stop()}},Mn)})),Oi.apply(this,arguments)}var Fi={topicId:vt,submitResult:_n,submitRecords:wn,submitting:qn,page:kn,onPageChange:Er,hack:sn,user:cn==null?void 0:cn.user,onTriggerPraise:hi};return console.log(cn,qt==null?void 0:qt.current,"data--------"),t.a.createElement(t.a.Fragment,null,t.a.createElement(S.a,{className:"oj-custom-large-spin",size:"large",spinning:Sn},cn?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(Pn.image_url),alt:"user",width:30}),t.a.createElement("span",null,Pn.name)),t.a.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},t.a.createElement("div",null,sn.name),t.a.createElement(kr,{onChange:function(hn){},className:"font12 c-grey-999"})),t.a.createElement(Pa.CopyToClipboard,{text:"".concat((bt=window.location)===null||bt===void 0?void 0:bt.origin,"/problems/").concat(sn.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")),sn.edit_privilege?t.a.createElement(b.a,{className:D.a.btn_back,to:"/problems/".concat(sn.identifier,"/ojedit"),style:{marginRight:10}}," ",t.a.createElement(c.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(g.a,{hideResize:!0,className:"my-problems oj-problems",leftChild:t.a.createElement(cr,Fi),rightChild:t.a.createElement(ka,Wr)})):null),t.a.createElement(p.a,{centered:!0,closable:!1,width:680,footer:null,visible:Ut,className:"oj-modal"},t.a.createElement("section",{className:"oj-modal-content"},t.a.createElement("div",{className:"oj-modal-head"},t.a.createElement("img",{src:er.a,alt:""}),t.a.createElement("i",{onClick:function(){return Ht(!1)},className:"iconfont icon-guanbi1"})),t.a.createElement("aside",null,t.a.createElement("img",{className:"mr30",src:fi.a}),"\u8FD0\u884C\u65F6\u95F4:\xA0",t.a.createElement("span",{style:{color:"#75d6ba",marginRight:100}},_n==null?void 0:_n.execute_time,"s"),"\u4F18\u4E8E",t.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(_n==null?void 0:_n.time_better_than)||100,"%"),"\u7684\u7528\u6237"),t.a.createElement("aside",{className:"mb50"},t.a.createElement("img",{src:Fr.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"},_n==null?void 0:_n.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"}},(_n==null?void 0:_n.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(at){var st=at.languageValue,bt=at.languageList,At=at.onChangeLanguage,nn=at.title,en=at.modify_code,ht=at.onSyncCode,ct=at.onShowCodeSetting,Ft=at.onResetCode,vt=Object(v.h)(),Yt=function(){p.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:t.a.createElement(o.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:Ft})};return t.a.createElement("div",{className:"action-bar"},t.a.createElement(w.a,{className:"oj-select",value:st,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:At},bt==null?void 0:bt.map(function(Ot){return t.a.createElement(w.a.Option,{key:Ot.language,value:Ot.language},Ot.language)})),t.a.createElement("span",null),t.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Yt},t.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),t.a.createElement("a",{onClick:ct},t.a.createElement("i",{className:"iconfont icon-shezhi"})))}function ka(at){var st=at.id,bt=at.input,At=at.showNote,nn=at.onShowNote,en=at.notes,ht=at.onCancelNote,ct=at.onAddNote,Ft=at.debugResult,vt=at.language,Yt=at.debuging,Ot=at.submitting,Zt=at.executingMessage,jn=at.code,Sn=at.onSubmitCode,cn=at.onDebugCode,Kn=at.onChangeCode,_n=at.onChangeInput,wn=at.onUpdateCode,kn=Object(Z.a)(at,["id","input","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function mr(qn){return t.a.createElement(Gi,Object(ae.a)({},kn,{onShowCodeSetting:qn}))}var Gn={id:st,input:bt,debugResult:Ft,debuging:Yt,submitting:Ot,executingMessage:Zt,onDebugCode:cn,onChangeCode:Kn,onSubmitCode:Sn,onChangeInput:_n};return t.a.createElement("div",{className:"right-panel"},t.a.createElement(x.a,{language:vt,value:jn,onChange:Kn,ActionBarRender:mr}),t.a.createElement("div",{className:"note-form-area ".concat(At?"active":"")},t.a.createElement(ie,{onCancel:ht,notes:en,callback:ct})),t.a.createElement(F.b,Gn))}},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"),O=z("Ji7U"),T=z("LK+K"),l=z("q1tI"),p=z("TSYQ"),h=z.n(p),d=z("sboe"),a=z("OZM5"),u=function(b){var m=b.prefixCls,g=b.level,E=b.isStart,o=b.isEnd;if(!g)return null;for(var x="".concat(m,"-indent-unit"),C=[],A=0;A<g;A+=1){var D;C.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"),o[A+1]),Object(ae.a)(D,"".concat(x,"-end-first-level"),!A&&o[0]),D))}))}return l.createElement("span",{"aria-hidden":"true",className:"".concat(m,"-indent")},C)},s=u,f=z("815F"),i="open",n="close",t="---",c=function(_){Object(O.a)(m,_);var b=Object(T.a)(m);function m(){var g;return Object(w.a)(this,m),g=b.apply(this,arguments),g.state={dragNodeHighlight:!1},g.onSelectorClick=function(E){var o=g.props.context.onNodeClick;o(E,Object(f.b)(g.props)),g.isSelectable()?g.onSelect(E):g.onCheck(E)},g.onSelectorDoubleClick=function(E){var o=g.props.context.onNodeDoubleClick;o(E,Object(f.b)(g.props))},g.onSelect=function(E){if(g.isDisabled())return;var o=g.props.context.onNodeSelect;E.preventDefault(),o(E,Object(f.b)(g.props))},g.onCheck=function(E){if(g.isDisabled())return;var o=g.props,x=o.disableCheckbox,C=o.checked,A=g.props.context.onNodeCheck;if(!g.isCheckable()||x)return;E.preventDefault();var D=!C;A(E,Object(f.b)(g.props),D)},g.onMouseEnter=function(E){var o=g.props.context.onNodeMouseEnter;o(E,Object(f.b)(g.props))},g.onMouseLeave=function(E){var o=g.props.context.onNodeMouseLeave;o(E,Object(f.b)(g.props))},g.onContextMenu=function(E){var o=g.props.context.onNodeContextMenu;o(E,Object(f.b)(g.props))},g.onDragStart=function(E){var o=g.props.context.onNodeDragStart;E.stopPropagation(),g.setState({dragNodeHighlight:!0}),o(E,Object(S.a)(g));try{E.dataTransfer.setData("text/plain","")}catch(x){}},g.onDragEnter=function(E){var o=g.props.context.onNodeDragEnter;E.preventDefault(),E.stopPropagation(),o(E,Object(S.a)(g))},g.onDragOver=function(E){var o=g.props.context.onNodeDragOver;E.preventDefault(),E.stopPropagation(),o(E,Object(S.a)(g))},g.onDragLeave=function(E){var o=g.props.context.onNodeDragLeave;E.stopPropagation(),o(E,Object(S.a)(g))},g.onDragEnd=function(E){var o=g.props.context.onNodeDragEnd;E.stopPropagation(),g.setState({dragNodeHighlight:!1}),o(E,Object(S.a)(g))},g.onDrop=function(E){var o=g.props.context.onNodeDrop;E.preventDefault(),E.stopPropagation(),g.setState({dragNodeHighlight:!1}),o(E,Object(S.a)(g))},g.onExpand=function(E){var o=g.props.context.onNodeExpand;o(E,Object(f.b)(g.props))},g.setSelectHandle=function(E){g.selectHandle=E},g.getNodeState=function(){var E=g.props.expanded;return g.isLeaf()?null:E?i:n},g.hasChildren=function(){var E=g.props.eventKey,o=g.props.context.keyEntities,x=o[E]||{},C=x.children;return!!(C||[]).length},g.isLeaf=function(){var E=g.props,o=E.isLeaf,x=E.loaded,C=g.props.context.loadData,A=g.hasChildren();return o===!1?!1:o||!C&&!A||C&&x&&!A},g.isDisabled=function(){var E=g.props.disabled,o=g.props.context.disabled;return!!(o||E)},g.isCheckable=function(){var E=g.props.checkable,o=g.props.context.checkable;return!o||E===!1?!1:o},g.syncLoadData=function(E){var o=E.expanded,x=E.loading,C=E.loaded,A=g.props.context,D=A.loadData,I=A.onNodeLoad;if(x)return;D&&o&&!g.isLeaf()&&(!g.hasChildren()&&!C&&I(Object(f.b)(g.props)))},g.renderSwitcher=function(){var E=g.props,o=E.expanded,x=E.switcherIcon,C=g.props.context,A=C.prefixCls,D=C.switcherIcon,I=x||D;if(g.isLeaf())return l.createElement("span",{className:h()("".concat(A,"-switcher"),"".concat(A,"-switcher-noop"))},typeof I=="function"?I(Object(U.a)(Object(U.a)({},g.props),{},{isLeaf:!0})):I);var F=h()("".concat(A,"-switcher"),"".concat(A,"-switcher_").concat(o?i:n));return l.createElement("span",{onClick:g.onExpand,className:F},typeof I=="function"?I(Object(U.a)(Object(U.a)({},g.props),{},{isLeaf:!1})):I)},g.renderCheckbox=function(){var E=g.props,o=E.checked,x=E.halfChecked,C=E.disableCheckbox,A=g.props.context.prefixCls,D=g.isDisabled(),I=g.isCheckable();if(!I)return null;var F=typeof I!="boolean"?I:null;return l.createElement("span",{className:h()("".concat(A,"-checkbox"),o&&"".concat(A,"-checkbox-checked"),!o&&x&&"".concat(A,"-checkbox-indeterminate"),(D||C)&&"".concat(A,"-checkbox-disabled")),onClick:g.onCheck},F)},g.renderIcon=function(){var E=g.props.loading,o=g.props.context.prefixCls;return l.createElement("span",{className:h()("".concat(o,"-iconEle"),"".concat(o,"-icon__").concat(g.getNodeState()||"docu"),E&&"".concat(o,"-icon_loading"))})},g.renderSelector=function(){var E=g.state.dragNodeHighlight,o=g.props,x=o.title,C=o.selected,A=o.icon,D=o.loading,I=o.data,F=g.props.context,H=F.prefixCls,te=F.showIcon,j=F.icon,G=F.draggable,X=F.loadData,J=F.titleRender,B=g.isDisabled(),Q="".concat(H,"-node-content-wrapper"),ie;if(te){var oe=A||j;ie=oe?l.createElement("span",{className:h()("".concat(H,"-iconEle"),"".concat(H,"-icon__customize"))},typeof oe=="function"?oe(g.props):oe):g.renderIcon()}else X&&D&&(ie=g.renderIcon());var Ee;typeof x=="function"?Ee=x(I):J?Ee=J(I):Ee=x;var ye=l.createElement("span",{className:"".concat(H,"-title")},Ee);return l.createElement("span",{ref:g.setSelectHandle,title:typeof x=="string"?x:"",className:h()("".concat(Q),"".concat(Q,"-").concat(g.getNodeState()||"normal"),!B&&(C||E)&&"".concat(H,"-node-selected"),!B&&G&&"draggable"),draggable:!B&&G||void 0,"aria-grabbed":!B&&G||void 0,onMouseEnter:g.onMouseEnter,onMouseLeave:g.onMouseLeave,onContextMenu:g.onContextMenu,onClick:g.onSelectorClick,onDoubleClick:g.onSelectorDoubleClick,onDragStart:G?g.onDragStart:void 0},ie,ye)},g}return Object(P.a)(m,[{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,o=this.props.context.selectable;return typeof E=="boolean"?E:o}},{key:"render",value:function(){var E,o=this.props,x=o.eventKey,C=o.className,A=o.style,D=o.dragOver,I=o.dragOverGapTop,F=o.dragOverGapBottom,H=o.isLeaf,te=o.isStart,j=o.isEnd,G=o.expanded,X=o.selected,J=o.checked,B=o.halfChecked,Q=o.loading,ie=o.domRef,oe=o.active,Ee=o.onMouseMove,ye=Object(Z.a)(o,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Le=this.props.context,pe=Le.prefixCls,Ce=Le.filterTreeNode,Be=Le.draggable,Pe=Le.keyEntities,ke=this.isDisabled(),Ne=Object(a.f)(ye),he=Pe[x]||{},ue=he.level,Ie=j[j.length-1];return l.createElement("div",Object.assign({ref:ie,className:h()(C,"".concat(pe,"-treenode"),(E={},Object(ae.a)(E,"".concat(pe,"-treenode-disabled"),ke),Object(ae.a)(E,"".concat(pe,"-treenode-switcher-").concat(G?"open":"close"),!H),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"),Ie),Object(ae.a)(E,"drag-over",!ke&&D),Object(ae.a)(E,"drag-over-gap-top",!ke&&I),Object(ae.a)(E,"drag-over-gap-bottom",!ke&&F),Object(ae.a)(E,"filter-node",Ce&&Ce(Object(f.b)(this.props))),E)),style:A,onDragEnter:Be?this.onDragEnter:void 0,onDragOver:Be?this.onDragOver:void 0,onDragLeave:Be?this.onDragLeave:void 0,onDrop:Be?this.onDrop:void 0,onDragEnd:Be?this.onDragEnd:void 0,onMouseMove:Ee},Ne),l.createElement(s,{prefixCls:pe,level:ue,isStart:te,isEnd:j}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),m}(l.Component),y=function(b){return l.createElement(d.a.Consumer,null,function(m){return l.createElement(c,Object.assign({},b,{context:m}))})};y.displayName="TreeNode",y.defaultProps={title:t},y.isTreeNode=1;var v=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"),O=z.n(S),T=z("6cGi"),l=z("4IlW"),p=w.forwardRef(function(h,d){var a,u=h.prefixCls,s=u===void 0?"rc-switch":u,f=h.className,i=h.checked,n=h.defaultChecked,t=h.disabled,c=h.loadingIcon,y=h.checkedChildren,v=h.unCheckedChildren,_=h.onClick,b=h.onChange,m=h.onKeyDown,g=Object(U.a)(h,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),E=Object(T.a)(!1,{value:i,defaultValue:n}),o=Object(Z.a)(E,2),x=o[0],C=o[1];function A(H,te){var j=x;return t||(j=H,C(j),b==null||b(j,te)),j}function D(H){H.which===l.a.LEFT?A(!1,H):H.which===l.a.RIGHT&&A(!0,H),m==null||m(H)}function I(H){var te=A(!x,H);_==null||_(te,H)}var F=O()(s,f,(a={},Object(ae.a)(a,"".concat(s,"-checked"),x),Object(ae.a)(a,"".concat(s,"-disabled"),t),a));return w.createElement("button",Object.assign({},g,{type:"button",role:"switch","aria-checked":x,disabled:t,className:F,ref:d,onKeyDown:D,onClick:I}),c,w.createElement("span",{className:"".concat(s,"-inner")},x?y:v))});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"),O=z("VTBJ"),T=z("rePB"),l=z("Zm9Q"),p=z("Kwbf"),h=z("c+Xe"),d=z("m+aA"),a=z("bdgK"),u=new Map;function s(oe){oe.forEach(function(Ee){var ye,Le=Ee.target;(ye=u.get(Le))===null||ye===void 0||ye.forEach(function(pe){return pe(Le)})})}var f=new a.default(s),i=null,n=null;function t(oe,Ee){u.has(oe)||(u.set(oe,new Set),f.observe(oe)),u.get(oe).add(Ee)}function c(oe,Ee){u.has(oe)&&(u.get(oe).delete(Ee),u.get(oe).size||(f.unobserve(oe),u.delete(oe)))}var y=function(oe){Object(w.a)(ye,oe);var Ee=Object(P.a)(ye);function ye(){return Object(Z.a)(this,ye),Ee.apply(this,arguments)}return Object(U.a)(ye,[{key:"render",value:function(){return this.props.children}}]),ye}(S.Component),v=S.createContext(null);function _(oe){var Ee=oe.children,ye=oe.onBatchResize,Le=S.useRef(0),pe=S.useRef([]),Ce=S.useContext(v),Be=S.useCallback(function(Pe,ke,Ne){Le.current+=1;var he=Le.current;pe.current.push({size:Pe,element:ke,data:Ne}),Promise.resolve().then(function(){he===Le.current&&(ye==null||ye(pe.current),pe.current=[])}),Ce==null||Ce(Pe,ke,Ne)},[ye,Ce]);return S.createElement(v.Provider,{value:Be},Ee)}function b(oe){var Ee=oe.children,ye=oe.disabled,Le=S.useRef(null),pe=S.useRef(null),Ce=S.useContext(v),Be=S.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Pe=S.isValidElement(Ee)&&Object(h.c)(Ee),ke=Pe?Ee.ref:null,Ne=S.useMemo(function(){return Object(h.a)(ke,Le)},[ke,Le]),he=S.useRef(oe);he.current=oe;var ue=S.useCallback(function(Ie){var Ue=he.current,Ye=Ue.onResize,ee=Ue.data,M=Ie.getBoundingClientRect(),N=M.width,$=M.height,V=Ie.offsetWidth,Y=Ie.offsetHeight,me=Math.floor(N),Re=Math.floor($);if(Be.current.width!==me||Be.current.height!==Re||Be.current.offsetWidth!==V||Be.current.offsetHeight!==Y){var rt={width:me,height:Re,offsetWidth:V,offsetHeight:Y};Be.current=rt;var De=V===Math.round(N)?N:V,Me=Y===Math.round($)?$:Y,Xe=Object(O.a)(Object(O.a)({},rt),{},{offsetWidth:De,offsetHeight:Me});Ce==null||Ce(Xe,Ie,ee),Ye&&Promise.resolve().then(function(){Ye(Xe,Ie)})}},[]);return S.useEffect(function(){var Ie=Object(d.a)(Le.current)||Object(d.a)(pe.current);return Ie&&!ye&&t(Ie,ue),function(){return c(Ie,ue)}},[Le.current,ye]),S.createElement(y,{ref:pe},Pe?S.cloneElement(Ee,{ref:Ne}):Ee)}var m="rc-observer-key";function g(oe){var Ee=oe.children,ye=Object(l.a)(Ee);return ye.map(function(Le,pe){var Ce=(Le==null?void 0:Le.key)||"".concat(m,"-").concat(pe);return S.createElement(b,Object(ae.a)({},oe,{key:Ce}),Le)})}g.Collection=_;var E=g,o=z("bT9E"),x=z("TSYQ"),C=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 H(oe){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(Ee&&I[ye])return I[ye];var Le=window.getComputedStyle(oe),pe=Le.getPropertyValue("box-sizing")||Le.getPropertyValue("-moz-box-sizing")||Le.getPropertyValue("-webkit-box-sizing"),Ce=parseFloat(Le.getPropertyValue("padding-bottom"))+parseFloat(Le.getPropertyValue("padding-top")),Be=parseFloat(Le.getPropertyValue("border-bottom-width"))+parseFloat(Le.getPropertyValue("border-top-width")),Pe=D.map(function(Ne){return"".concat(Ne,":").concat(Le.getPropertyValue(Ne))}).join(";"),ke={sizingStyle:Pe,paddingSize:Ce,borderSize:Be,boxSizing:pe};return Ee&&ye&&(I[ye]=ke),ke}function te(oe){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Le=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=H(oe,Ee),Ce=pe.paddingSize,Be=pe.borderSize,Pe=pe.boxSizing,ke=pe.sizingStyle;F.setAttribute("style","".concat(ke,";").concat(A)),F.value=oe.value||oe.placeholder||"";var Ne=Number.MIN_SAFE_INTEGER,he=Number.MAX_SAFE_INTEGER,ue=F.scrollHeight,Ie;if(Pe==="border-box"?ue+=Be:Pe==="content-box"&&(ue-=Ce),ye!==null||Le!==null){F.value=" ";var Ue=F.scrollHeight-Ce;ye!==null&&(Ne=Ue*ye,Pe==="border-box"&&(Ne=Ne+Ce+Be),ue=Math.max(Ne,ue)),Le!==null&&(he=Ue*Le,Pe==="border-box"&&(he=he+Ce+Be),Ie=ue>he?"":"hidden",ue=Math.min(he,ue))}return{height:ue,minHeight:Ne,maxHeight:he,overflowY:Ie,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 Ee=Object(P.a)(ye);function ye(Le){var pe;return Object(Z.a)(this,ye),pe=Ee.call(this,Le),pe.nextFrameActionId=void 0,pe.resizeFrameId=void 0,pe.textArea=void 0,pe.saveTextArea=function(Ce){pe.textArea=Ce},pe.handleResize=function(Ce){var Be=pe.state.resizeStatus,Pe=pe.props,ke=Pe.autoSize,Ne=Pe.onResize;if(Be!==X.NONE)return;typeof Ne=="function"&&Ne(Ce),ke&&pe.resizeOnNextFrame()},pe.resizeOnNextFrame=function(){cancelAnimationFrame(pe.nextFrameActionId),pe.nextFrameActionId=requestAnimationFrame(pe.resizeTextarea)},pe.resizeTextarea=function(){var Ce=pe.props.autoSize;if(!Ce||!pe.textArea)return;var Be=Ce.minRows,Pe=Ce.maxRows,ke=te(pe.textArea,!1,Be,Pe);pe.setState({textareaStyles:ke,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 Ce=pe.props,Be=Ce.prefixCls,Pe=Be===void 0?"rc-textarea":Be,ke=Ce.autoSize,Ne=Ce.onResize,he=Ce.className,ue=Ce.disabled,Ie=pe.state,Ue=Ie.textareaStyles,Ye=Ie.resizeStatus,ee=Object(o.a)(pe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),M=C()(Pe,he,Object(T.a)({},"".concat(Pe,"-disabled"),ue));"value"in ee&&(ee.value=ee.value||"");var N=Object(O.a)(Object(O.a)(Object(O.a)({},pe.props.style),Ue),Ye===X.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return S.createElement(E,{onResize:pe.handleResize,disabled:!(ke||Ne)},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,Ce=this.textArea.selectionEnd;this.textArea.setSelectionRange(pe,Ce)}}catch(Be){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ye}(S.Component),B=J,Q=function(oe){Object(w.a)(ye,oe);var Ee=Object(P.a)(ye);function ye(Le){var pe;Object(Z.a)(this,ye),pe=Ee.call(this,Le),pe.resizableTextArea=void 0,pe.focus=function(){pe.resizableTextArea.textArea.focus()},pe.saveTextArea=function(Be){pe.resizableTextArea=Be},pe.handleChange=function(Be){var Pe=pe.props.onChange;pe.setValue(Be.target.value,function(){pe.resizableTextArea.resizeTextarea()}),Pe&&Pe(Be)},pe.handleKeyDown=function(Be){var Pe=pe.props,ke=Pe.onPressEnter,Ne=Pe.onKeyDown;Be.keyCode===13&&ke&&ke(Be),Ne&&Ne(Be)};var Ce=typeof Le.value=="undefined"||Le.value===null?Le.defaultValue:Le.value;return pe.state={value:Ce},pe}return Object(U.a)(ye,[{key:"setValue",value:function(pe,Ce){"value"in this.props||this.setState({value:pe},Ce)}},{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),O=z("lOMy"),T=z.n(O),l=w.a.Option;We.a=function(p){var h=p.onFontSizeChange,d=p.cmFontSize,a=p.cmCodeMode,u=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:a,onChange:u},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"),O=z("q1tI"),T=z.n(O),l=z("bdgK");function p(v,_,b,m,g){var E=_.getWordUntilPosition(b),o={startLineNumber:b.lineNumber,endLineNumber:b.lineNumber,startColumn:E.startColumn,endColumn:E.endColumn},x=m.map(function(C){return{label:C,kind:v.languages.CompletionItemKind.Keyword,insertText:C,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o}});return g.map(function(C){x.push(Object(ae.a)(Object(ae.a)({},C),{},{range:o}))}),x}var h=function(v){var _={label:"ifelse",kind:v.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`),insertTextRules:v.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"];v.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(o,x){var C=p(v,o,x,b,[_]);return{suggestions:C}}});var m=["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"];v.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(o,x){var C=[{label:"print",kind:v.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
|
`),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet}],A=p(v,o,x,m,C);return{suggestions:A}}});var g=["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"];v.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(o,x){var C=[_,{label:"main",kind:v.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:v.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
|
`),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet}],A=p(v,o,x,g,C);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",a=z("LvDl");function u(v){return/^\d+$/.test(v)?"".concat(v,"px"):v}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 v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=v;if(Array.isArray(v)){for(var b=0;b<v.length;b++){var m=i[v[b]];if(m)return m}return _[0]}return i[_]||_}var t=null,c=We.b=function(v){var _=v.width,b=_===void 0?"100%":_,m=v.height,g=m===void 0?"100%":m,E=v.value,o=v.language,x=o===void 0?"javascript":o,C=v.style,A=C===void 0?{}:C,D=v.options,I=D===void 0?{}:D,F=v.overrideServices,H=F===void 0?{}:F,te=v.theme,j=te===void 0?"vs-dark":te,G=v.onEditBlur,X=v.onSave,J=v.autoHeight,B=J===void 0?!1:J,Q=v.forbidCopy,ie=Q===void 0?!1:Q,oe=v.onChange,Ee=oe===void 0?s:oe,ye=v.editorDidMount,Le=ye===void 0?s:ye,pe=v.onFocus,Ce=pe===void 0?s:pe,Be=v.filename,Pe=Be===void 0?"educoder.txt":Be,ke=Object(S.a)(v,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Ne=Object(O.useRef)(),he=Object(O.useRef)({}),ue=Object(O.useRef)(),Ie=Object(O.useRef)(!1),Ue=Object(O.useRef)(),Ye=Object(O.useState)(!1),ee=Object(P.a)(Ye,2),M=ee[0],N=ee[1];function $(){var _e;return Ne.current&&(_e=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)&&he.current.instance.layout()}}catch(Dt){Ge.e(Dt)}finally{Ge.f()}}),_e.observe(Ne.current)),_e}function V(){U.b.warn(decodeURIComponent(d))}var Y=function(){var be=he.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(O.useEffect)(function(){ue.current&&clearTimeout(ue.current),ue.current=setTimeout(function(){Y()},500)},[E,M,he.current]);function me(){var _e=he.current.instance;if(_e){var be=_e.getSelection(),Ge=he.current.pastePos||{},qe=new t.Range(Ge.startLineNumber||be.endLineNumber,Ge.startColumn||be.endColumn,Ge.endLineNumber||be.endLineNumber,Ge.endColumn||be.endColumn);setTimeout(function(){_e.executeEdits("",[{range:qe,text:""}])},300)}}function Re(_e){(window.navigator.platform.match("Mac")?_e.metaKey:_e.ctrlKey)&&_e.keyCode==83&&(_e.preventDefault(),X())}var rt=function(){if(B&&he.current.instance){var be=he.current.instance.getContentHeight();fe(be<g?g:be)}else fe(g)};function De(_e){var be=document.createEvent("MouseEvents");be.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),_e.dispatchEvent(be)}function Me(_e,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=_e,De(pt)}Object(O.useEffect)(function(){rt()},[rt]),Object(O.useEffect)(function(){Ne.current&&!M&&z.e(27).then(z.t.bind(null,"M/lh",7)).then(function(_e){try{t=_e,he.current.instance=t.editor.create(Ne.current,{value:E,language:n(x),theme:j,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},H);var be=he.current.instance;if(Le(be,t),setTimeout(function(){rt(),he.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Me(Pe||"educoder.txt",be.getValue())}})},500),he.current.subscription=be.onDidChangeModelContent(function(qe){Ie.current?clearTimeout(Ue.current):(rt(),Ee(be.getValue(),qe)),Ue.current=setTimeout(function(){Ie.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())}),Ce&&be.onDidFocusEditorText(function(){Ce(be.getValue())}),ie){be.addCommand(t.KeyMod.CtrlCmd|t.KeyCode.KEY_V,function(){return V(),null}),be.onDidPaste(function(qe){he.current.pastePos=qe});try{window.addEventListener("paste",me)}catch(qe){}}var Ge=$();return N(!0),function(){var qe=he.current.instance;qe.dispose();var pt=qe.getModel();pt&&pt.dispose(),he.current.subscription&&he.current.subscription.dispose(),ie&&window.removeEventListener("paste",me),Ge.unobserve(Ne.current)}}catch(qe){}})},[]),Object(O.useEffect)(function(){var _e=he.current.instance;if(_e&&M)return document.addEventListener("keydown",Re,!1),function(){document.removeEventListener("keydown",Re)}},[X,M]),Object(O.useEffect)(function(){var _e=he.current.instance;if(_e&&M){var be=n(x);t.editor.setModelLanguage(_e.getModel(),be),console.log("language:",x,_e.getModel(),be)}},[x,M]),Object(O.useEffect)(function(){var _e=he.current.instance;_e&&M&&t.editor.setTheme(j)},[j,M]),Object(O.useEffect)(function(){var _e=he.current.instance;_e&&M&&(_e.updateOptions(Object(ae.a)({},I)),setTimeout(function(){_e.getModel().updateOptions(Object(ae.a)({},I))},200))},[JSON.stringify(I),M]),Object(O.useEffect)(function(){var _e=he.current.instance;_e&&M&&_e.layout()},[b,g,M]);var Xe=Object(O.useState)(u(b)),tt=Object(P.a)(Xe,2),Ve=tt[0],Ke=tt[1],we=Object(O.useState)(u(g)),Ae=Object(P.a)(we,2),Oe=Ae[0],fe=Ae[1],ge=Object(ae.a)(Object(ae.a)({},A),{},{width:Ve,height:Oe});return T.a.createElement("div",{className:"my-monaco-editor",ref:Ne,style:ge})};function y(v){var _=v.width,b=_===void 0?"100%":_,m=v.height,g=m===void 0?"100%":m,E=v.original,o=v.modified,x=v.language,C=v.options,A=C===void 0?{}:C,D=Object(O.useRef)(),I=Object(O.useState)(null),F=Object(P.a)(I,2),H=F[0],te=F[1];function j(B){var Q;return D.current&&(Q=new l.default(function(ie){var oe=Object(w.a)(ie),Ee;try{for(oe.s();!(Ee=oe.n()).done;){var ye=Ee.value;(ye.target.offsetHeight>0||ye.target.offsetWidth>0)&&B.layout()}}catch(Le){oe.e(Le)}finally{oe.f()}}),Q.observe(D.current)),Q}Object(O.useEffect)(function(){D.current&&z.e(27).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}));te(Q);var ie=j(Q);return function(){Q.dispose();var oe=Q.getModel();oe&&oe.dispose(),ie.unobserve(D.current)}})},[]),Object(O.useEffect)(function(){H&&H.setModel({original:t.editor.createModel(E,x),modified:t.editor.createModel(o,x)})},[E,o,x,H]);var G=u(b),X=u(g),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 a=getComputedStyle(h,null);return Z(a.overflowY,d)||Z(a.overflowX,d)||function(u){var s=function(f){if(!f.ownerDocument||!f.ownerDocument.defaultView)return null;try{return f.ownerDocument.defaultView.frameElement}catch(i){return null}}(u);return!!s&&(s.clientHeight<u.scrollHeight||s.clientWidth<u.scrollWidth)}(h)}return!1}function w(h,d,a,u,s,f,i,n){return f<h&&i>d||f>h&&i<d?0:f<=h&&n<=a||i>=d&&n>=a?f-h-u:i>d&&n<a||f<h&&n>a?i-d+s:0}var P=function(h,d){var a=window,u=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 c=document.scrollingElement||document.documentElement,y=[],v=h;ae(v)&&t(v);){if((v=v.parentElement)===c){y.push(v);break}v!=null&&v===document.body&&U(v)&&!U(document.documentElement)||v!=null&&U(v,n)&&y.push(v)}for(var _=a.visualViewport?a.visualViewport.width:innerWidth,b=a.visualViewport?a.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,E=h.getBoundingClientRect(),o=E.height,x=E.width,C=E.top,A=E.right,D=E.bottom,I=E.left,F=s==="start"||s==="nearest"?C:s==="end"?D:C+o/2,H=f==="center"?I+x/2:f==="end"?A:I,te=[],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,Ee=X.left;if(u==="if-needed"&&C>=0&&I>=0&&D<=b&&A<=_&&C>=Q&&D<=oe&&I>=Ee&&A<=ie)return te;var ye=getComputedStyle(G),Le=parseInt(ye.borderLeftWidth,10),pe=parseInt(ye.borderTopWidth,10),Ce=parseInt(ye.borderRightWidth,10),Be=parseInt(ye.borderBottomWidth,10),Pe=0,ke=0,Ne="offsetWidth"in G?G.offsetWidth-G.clientWidth-Le-Ce:0,he="offsetHeight"in G?G.offsetHeight-G.clientHeight-pe-Be:0;if(c===G)Pe=s==="start"?F:s==="end"?F-b:s==="nearest"?w(g,g+b,b,pe,Be,g+F,g+F+o,o):F-b/2,ke=f==="start"?H:f==="center"?H-_/2:f==="end"?H-_:w(m,m+_,_,Le,Ce,m+H,m+H+x,x),Pe=Math.max(0,Pe+g),ke=Math.max(0,ke+m);else{Pe=s==="start"?F-Q-pe:s==="end"?F-oe+Be+he:s==="nearest"?w(Q,oe,J,pe,Be+he,F,F+o,o):F-(Q+J/2)+he/2,ke=f==="start"?H-Ee-Le:f==="center"?H-(Ee+B/2)+Ne/2:f==="end"?H-ie+Ce+Ne:w(Ee,ie,B,Le,Ce+Ne,H,H+x,x);var ue=G.scrollLeft,Ie=G.scrollTop;F+=Ie-(Pe=Math.max(0,Math.min(Ie+Pe,G.scrollHeight-J+he))),H+=ue-(ke=Math.max(0,Math.min(ue+ke,G.scrollWidth-B+Ne)))}te.push({el:G,top:Pe,left:ke})}return te};function S(h){return h===Object(h)&&Object.keys(h).length!==0}function O(h,d){d===void 0&&(d="auto");var a="scrollBehavior"in document.body.style;h.forEach(function(u){var s=u.el,f=u.top,i=u.left;s.scroll&&a?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 a=!h.ownerDocument.documentElement.contains(h);if(S(d)&&typeof d.behavior=="function")return d.behavior(a?[]:P(h,d));if(a)return;var u=T(d);return O(P(h,u),u.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,O){var T=Z.a.get("__ec");T||(T={}),T[S]=O,Z.a.set("__ec",T)}function P(S,O){var T=Z.a.get("__ec");return T?T[S]===void 0?O:T[S]:O}},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 O=S.defaultX,T=O===void 0?"40%":O,l=S.leftChild,p=S.rightChild,h=S.className,d=S.hideResize,a=d===void 0?!1:d,u=Object(Z.useState)(T),s=Object(ae.a)(u,2),f=s[0],i=s[1],n=Object(Z.useRef)();function t(){n.current=!0}Object(Z.useEffect)(function(){function v(b){n.current&&i(b.pageX)}function _(){n.current=!1}return window.addEventListener("mousemove",v),window.addEventListener("mouseup",_),function(){window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",_)}},[]);var c=typeof f=="number"&&f!==.01?"".concat(f,"px"):T,y="calc(100% - ".concat(a?"0px":"4px"," - ").concat(c,")");return U.a.createElement("div",{className:"split-panel-container ".concat(h)},U.a.createElement("section",{style:{width:c,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"),O=z("foSv"),T=z("q1tI"),l=z.n(T),p=z("TSYQ"),h=z.n(p),d=z("4IlW");function a(o,x){var C=Object.keys(o);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(o);x&&(A=A.filter(function(D){return Object.getOwnPropertyDescriptor(o,D).enumerable})),C.push.apply(C,A)}return C}function u(o){for(var x=1;x<arguments.length;x++){var C=arguments[x]!=null?arguments[x]:{};x%2?a(Object(C),!0).forEach(function(A){Object(Z.a)(o,A,C[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(C)):a(Object(C)).forEach(function(A){Object.defineProperty(o,A,Object.getOwnPropertyDescriptor(C,A))})}return o}function s(o){var x=f();return function(){var A=Object(O.a)(o),D;if(x){var I=Object(O.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(o){return!1}}function i(){}function n(o){o.preventDefault()}var t=function(x){return x.replace(/[^\w.-]+/g,"")},c=200,y=600,v=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,_=function(x){return x!=null},b=function(x,C){return C===x||typeof C=="number"&&typeof x=="number"&&isNaN(C)&&isNaN(x)},m=function(o){Object(P.a)(C,o);var x=s(C);function C(A){var D;Object(U.a)(this,C),D=x.call(this,A),D.onKeyDown=function(H){var te=D.props,j=te.onKeyDown,G=te.onPressEnter;if(H.keyCode===d.a.UP){var X=D.getRatio(H);D.up(H,X,null),D.stop()}else if(H.keyCode===d.a.DOWN){var J=D.getRatio(H);D.down(H,J,null),D.stop()}else H.keyCode===d.a.ENTER&&G&&G(H);if(D.recordCursorPosition(),D.lastKeyCode=H.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,[H].concat(Q))}},D.onKeyUp=function(H){var te=D.props.onKeyUp;if(D.stop(),D.recordCursorPosition(),te){for(var j=arguments.length,G=new Array(j>1?j-1:0),X=1;X<j;X++)G[X-1]=arguments[X];te.apply(void 0,[H].concat(G))}},D.onChange=function(H){var te=D.props.onChange;D.state.focused&&(D.inputting=!0),D.rawInput=D.props.parser(D.getValueFromEvent(H)),D.setState({inputValue:D.rawInput}),te(D.toNumber(D.rawInput))},D.onMouseUp=function(){var H=D.props.onMouseUp;D.recordCursorPosition(),H&&H.apply(void 0,arguments)},D.onFocus=function(){var H;D.setState({focused:!0}),(H=D.props).onFocus.apply(H,arguments)},D.onBlur=function(){var H=D.props.onBlur;D.inputting=!1,D.setState({focused:!1});var te=D.getCurrentValidValue(D.state.inputValue),j=D.setValue(te,i);if(H){var G=D.input.value,X=D.getInputDisplayValue({focus:!1,value:j});D.input.value=X&&Number(X),H.apply(void 0,arguments),D.input.value=G}},D.getRatio=function(H){var te=1;return H.metaKey||H.ctrlKey?te=.1:H.shiftKey&&(te=10),te},D.getFullNum=function(H){return isNaN(H)?H:/e/i.test(String(H))?Number(H).toFixed(18).replace(/\.?0+$/,""):H},D.getPrecision=function(H){if(_(D.props.precision))return D.props.precision;var te=String(H);if(te.indexOf("e-")>=0)return parseInt(te.slice(te.indexOf("e-")+2),10);var j=0;return te.indexOf(".")>=0&&(j=te.length-te.indexOf(".")-1),j},D.getInputDisplayValue=function(H){var te=H||D.state,j=te.focused,G=te.inputValue,X=te.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(H){}},D.restoreByAfter=function(H){if(H===void 0)return!1;var te=D.input.value,j=te.lastIndexOf(H);if(j===-1)return!1;var G=D.cursorBefore.length;return D.lastKeyCode===d.a.DELETE&&D.cursorBefore.charAt(G-1)===H[0]?(D.fixCaret(G,G),!0):j+H.length===te.length?(D.fixCaret(j,j),!0):!1},D.partRestoreByAfter=function(H){return H===void 0?!1:Array.prototype.some.call(H,function(te,j){var G=H.substring(j);return D.restoreByAfter(G)})},D.isNotCompleteNumber=function(H){return isNaN(H)||H===""||H===null||H&&H.toString().indexOf(".")===H.toString().length-1},D.stop=function(){D.autoStepTimer&&clearTimeout(D.autoStepTimer)},D.down=function(H,te,j){D.pressingUpOrDown=!0,D.step("down",H,te,j)},D.up=function(H,te,j){D.pressingUpOrDown=!0,D.step("up",H,te,j)},D.saveInput=function(H){D.input=H};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=u(u({},D.state),{},{inputValue:D.toPrecisionAsStep(F),value:F}),D}return Object(w.a)(C,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(D){var I=this.props,F=I.value,H=I.onChange,te=I.max,j=I.min,G=this.state.focused;if(D){if(!b(D.value,F)||!b(D.max,te)||!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!==te&&typeof B=="number"&&B>te&&H&&H(te),"min"in this.props&&D.min!==j&&typeof B=="number"&&B<j&&H&&H(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,H=parseFloat(D);return isNaN(H)?D:(H<I&&(H=I),H>F&&(H=F),H)}},{key:"setValue",value:function(D,I){var F=this.props.precision,H=this.isNotCompleteNumber(parseFloat(D))?null:parseFloat(D),te=this.state.value,j=te===void 0?null:te,G=this.state.inputValue,X=G===void 0?null:G,J=typeof H=="number"?H.toFixed(F):"".concat(H),B=H!==j||J!=="".concat(X);return"value"in this.props?(X=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:X},I)):this.setState({value:H,inputValue:this.toPrecisionAsStep(D)},I),B&&this.props.onChange(H),H}},{key:"getMaxPrecision",value:function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.props,H=F.precision,te=F.step;if(_(H))return H;var j=this.getPrecision(I),G=this.getPrecision(te),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,H=D&&D.length>16&&F;return this.isNotCompleteNumber(D)||H?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,H=this.getPrecisionFactor(D,I),te=Math.abs(this.getMaxPrecision(D,I)),j=((H*D+H*F*I)/H).toFixed(te);return this.toNumber(j)}},{key:"downStep",value:function(D,I){var F=this.props.step,H=this.getPrecisionFactor(D,I),te=Math.abs(this.getMaxPrecision(D,I)),j=((H*D-H*F*I)/H).toFixed(te);return this.toNumber(j)}},{key:"step",value:function(D,I){var F=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,te=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,H),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,H,!0)},te?c: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,H=this.input.selectionEnd;(D!==F||I!==H)&&this.input.setSelectionRange(D,I)}catch(te){}}},{key:"render",value:function(){var D,I=this.props,F=I.prefixCls,H=I.disabled,te=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,Ee=I.title,ye=I.onMouseEnter,Le=I.onMouseLeave,pe=I.onMouseOver,Ce=I.onMouseOut,Be=I.required,Pe=I.onClick,ke=I.tabIndex,Ne=I.type,he=I.placeholder,ue=I.id,Ie=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,De=h()(F,(D={},Object(Z.a)(D,B,!!B),Object(Z.a)(D,"".concat(F,"-disabled"),H),Object(Z.a)(D,"".concat(F,"-focused"),rt),D)),Me={};Object.keys(Y).forEach(function(be){(be.substr(0,5)==="data-"||be.substr(0,5)==="aria-"||be==="role")&&(Me[be]=Y[be])});var Xe=!te&&!H,tt=this.getInputDisplayValue(null),Ve=(Re||Re===0)&&(isNaN(Re)||Number(Re)>=Q),Ke=(Re||Re===0)&&(isNaN(Re)||Number(Re)<=ie),we=Ve||H||te,Ae=Ke||H||te,Oe=h()("".concat(F,"-handler"),"".concat(F,"-handler-up"),Object(Z.a)({},"".concat(F,"-handler-up-disabled"),we)),fe=h()("".concat(F,"-handler"),"".concat(F,"-handler-down"),Object(Z.a)({},"".concat(F,"-handler-down-disabled"),Ae)),ge=j?{onTouchStart:we?i:this.up,onTouchEnd:this.stop}:{onMouseDown:we?i:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},_e=j?{onTouchStart:Ae?i:this.down,onTouchEnd:this.stop}:{onMouseDown:Ae?i:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return l.a.createElement("div",{className:De,style:oe,title:Ee,onMouseEnter:ye,onMouseLeave:Le,onMouseOver:pe,onMouseOut:Ce,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"},ge,{role:"button","aria-label":"Increase Value","aria-disabled":we,className:Oe}),X||l.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-up-inner"),onClick:n})),l.a.createElement("span",Object.assign({unselectable:"on"},_e,{role:"button","aria-label":"Decrease Value","aria-disabled":Ae,className:fe}),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:Be,type:Ne,placeholder:he,onPaste:$,onClick:Pe,onMouseUp:this.onMouseUp,className:"".concat(F,"-input"),tabIndex:ke,autoComplete:G,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Xe?this.onKeyDown:i,onKeyUp:Xe?this.onKeyUp:i,autoFocus:M,maxLength:ee,readOnly:te,disabled:H,max:Q,min:ie,step:Ye,name:N,title:Ee,id:ue,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(tt),pattern:Ue,inputMode:Ie,onInput:V},Me))))}}]),C}(l.a.Component);m.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:v,min:-v,step:1,style:{},onChange:i,onKeyDown:i,onPressEnter:i,onFocus:i,onBlur:i,parser:t,required:!1,autoComplete:"off"};var g=m,E=We.a=g},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"),O=z("1W/9"),T=z("q1tI"),l=z("rePB"),p=z("JX7q"),h=z("TSYQ"),d=z.n(h),a=z("qx4F"),u=z("4IlW");function s(H){return Array.isArray(H)?H:[H]}var f={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},i=Object.keys(f).filter(function(H){if(typeof document=="undefined")return!1;var te=document.getElementsByTagName("html")[0];return H in(te?te.style:{})})[0],n=f[i];function t(H,te,j,G){H.addEventListener?H.addEventListener(te,j,G):H.attachEvent&&H.attachEvent("on".concat(te),j)}function c(H,te,j,G){H.removeEventListener?H.removeEventListener(te,j,G):H.attachEvent&&H.detachEvent("on".concat(te),j)}function y(H,te){var j=typeof H=="function"?H(te):H;return Array.isArray(j)?j.length===2?j:[j[0],j[1]]:[j]}var v=function(te){return!isNaN(parseFloat(te))&&isFinite(te)},_=!(typeof window!="undefined"&&window.document&&window.document.createElement),b=function H(te,j,G,X){if(!j||j===document||j instanceof Document)return!1;if(j===te.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),Ee=oe.overflowY==="auto"||oe.overflowY==="scroll",ye=oe.overflowX==="auto"||oe.overflowX==="scroll",Le=Q&&Ee,pe=ie&&ye;return J&&(!Le||Le&&(j.scrollTop>=Q&&X<0||j.scrollTop<=0&&X>0))||B&&(!pe||pe&&(j.scrollLeft>=ie&&G<0||j.scrollLeft<=0&&G>0))?H(te,j.parentNode,G,X):!1};function m(H){var te=g();return function(){var G=Object(S.a)(H),X;if(te){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 g(){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(H){return!1}}var E={},o=function(H){Object(w.a)(j,H);var te=m(j);function j(G){var X;return Object(Z.a)(this,j),X=te.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;c(B,n,X.transitionEnd),B.style.transition=""},X.onKeyDown=function(J){if(J.keyCode===u.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(),Ee=oe.isHorizontal,ye=oe.placementName,Le=X.contentDom?X.contentDom.getBoundingClientRect()[Ee?"width":"height"]:0,pe=(Ee?Q:ie)||Le;X.setLevelAndScrolling(B,ye,pe)},X.setLevelTransform=function(J,B,Q,ie){var oe=X.props,Ee=oe.placement,ye=oe.levelMove,Le=oe.duration,pe=oe.ease,Ce=oe.showMask;X.levelDom.forEach(function(Be){Be.style.transition="transform ".concat(Le," ").concat(pe),t(Be,n,X.transitionEnd);var Pe=J?Q:0;if(ye){var ke=y(ye,{target:Be,open:J});Pe=J?ke[0]:ke[1]||0}var Ne=typeof Pe=="number"?"".concat(Pe,"px"):Pe,he=Ee==="left"||Ee==="top"?Ne:"-".concat(Ne);he=Ce&&Ee==="right"&&ie?"calc(".concat(he," + ").concat(ie,"px)"):he,Be.style.transform=Pe?"".concat(B,"(").concat(he,")"):""})},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(a.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,Ee=B.open,ye=ie&&ie(),Le=Q&&Q();if(ye&&ye.parentNode===document.body&&oe){var pe=["touchstart"],Ce=[document.body,X.maskDom,X.handlerDom,X.contentDom];Ee&&document.body.style.overflow!=="hidden"?(J&&X.addScrollingEffect(J),Le===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",Ce.forEach(function(Be,Pe){if(!Be)return;t(Be,pe[Pe]||"touchmove",Pe?X.removeMoveHandler:X.removeStartHandler,X.passive)})):X.getCurrentDrawerSome()&&(Le||(document.body.style.overflow=""),document.body.style.touchAction="",J&&X.remScrollingEffect(J),Ce.forEach(function(Be,Pe){if(!Be)return;c(Be,pe[Pe]||"touchmove",Pe?X.removeMoveHandler:X.removeStartHandler,X.passive)}))}},X.addScrollingEffect=function(J){var B=X.props,Q=B.placement,ie=B.duration,oe=B.ease,Ee=B.getOpenCount,ye=B.switchScrollingEffect,Le=Ee&&Ee();Le===1&&ye();var pe="width ".concat(ie," ").concat(oe),Ce="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(Ce,",").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,Ee=B.getOpenCount,ye=B.switchScrollingEffect,Le=Ee&&Ee();Le||ye(!0),i&&(document.body.style.overflowX="hidden"),X.dom.style.transition="none";var pe,Ce="width ".concat(ie," ").concat(oe),Be="transform ".concat(ie," ").concat(oe);switch(Q){case"left":{X.dom.style.width="100%",Ce="width 0s ".concat(oe," ").concat(ie);break}case"right":{X.dom.style.transform="translateX(".concat(J,"px)"),X.dom.style.width="100%",Ce="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(Be,",").concat(pe?"".concat(pe,","):"").concat(Ce),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 Ee=oe?Array.prototype.slice.call(oe.children):[];Ee.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(Le){X.levelDom.push(Le)})})},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(Ee){}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,Ee=B.width,ye=B.height,Le=B.defaultOpen,pe=B.open,Ce=B.prefixCls,Be=B.placement,Pe=B.level,ke=B.levelMove,Ne=B.ease,he=B.duration,ue=B.getContainer,Ie=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"]),De=this.dom?pe:!1,Me=d()(Ce,(X={},Object(l.a)(X,"".concat(Ce,"-").concat(Be),!0),Object(l.a)(X,"".concat(Ce,"-open"),De),Object(l.a)(X,Q||"",!!Q),Object(l.a)(X,"no-mask",!ee),X)),Xe=this.getHorizontalBoolAndPlacementName(),tt=Xe.placementName,Ve=Be==="left"||Be==="top"?"-100%":"100%",Ke=De?"":"".concat(tt,"(").concat(Ve,")"),we=Ie&&T.cloneElement(Ie,{onClick:function(Oe){Ie.props.onClick&&Ie.props.onClick(),V&&V(Oe)},ref:function(Oe){J.handlerDom=Oe}});return T.createElement("div",Object.assign({},rt,{tabIndex:-1,className:Me,style:oe,ref:function(Oe){J.dom=Oe},onKeyDown:De&&Y?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),ee&&T.createElement("div",{className:"".concat(Ce,"-mask"),onClick:M?$:void 0,style:N,ref:function(Oe){J.maskDom=Oe}}),T.createElement("div",{className:"".concat(Ce,"-content-wrapper"),style:{transform:Ke,msTransform:Ke,width:v(Ee)?"".concat(Ee,"px"):Ee,height:v(ye)?"".concat(ye,"px"):ye},ref:function(Oe){J.contentWrapper=Oe}},T.createElement("div",{className:"".concat(Ce,"-content"),ref:function(Oe){J.contentDom=Oe},onTouchStart:De&&ee?this.removeStartHandler:void 0,onTouchMove:De&&ee?this.removeMoveHandler:void 0},ie),we))}}],[{key:"getDerivedStateFromProps",value:function(X,J){var B=J.prevProps,Q=J._self,ie={prevProps:X};if(B!==void 0){var oe=X.placement,Ee=X.level;oe!==B.placement&&(Q.contentDom=null),Ee!==B.level&&Q.getLevelDom(X)}return ie}}]),j}(T.Component);o.defaultProps={switchScrollingEffect:function(){}};var x=o;function C(H){var te=A();return function(){var G=Object(S.a)(H),X;if(te){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(H){return!1}}var D=function(H){Object(w.a)(j,H);var te=C(j);function j(G){var X;Object(Z.a)(this,j),X=te.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 Ee=X.state.open;X.setState({open:!Ee})}},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,Ee=J.handler,ye=Object(ae.a)(J,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Le=this.state.open;if(!Q)return T.createElement("div",{className:ie,ref:function(Be){X.dom=Be}},T.createElement(x,Object.assign({},ye,{open:Le,handler:Ee,getContainer:function(){return X.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var pe=!!Ee||oe;return T.createElement(O.a,{visible:Le,forceRender:pe,getContainer:Q,wrapperClassName:ie},function(Ce){var Be=Ce.visible,Pe=Ce.afterClose,ke=Object(ae.a)(Ce,["visible","afterClose"]);return T.createElement(x,Object.assign({},ye,ke,{open:Be!==void 0?Be:Le,afterVisibleChange:Pe!==void 0?Pe:ye.afterVisibleChange,handler:Ee,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),O=z("TSYQ"),T=z.n(O),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 a(f,i){var n,t=f.prefixCls,c=f.className,y=f.record,v=f.index,_=f.dataIndex,b=f.render,m=f.children,g=f.component,E=g===void 0?"td":g,o=f.colSpan,x=f.rowSpan,C=f.fixLeft,A=f.fixRight,D=f.firstFixLeft,I=f.lastFixLeft,F=f.firstFixRight,H=f.lastFixRight,te=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,Ee;if(m)Ee=m;else{var ye=Object(p.b)(y,_);if(Ee=ye,b){var Le=b(ye,y,v);h(Le)?(Ee=Le.children,oe=Le.props):Ee=Le}}Object(w.a)(Ee)==="object"&&!Array.isArray(Ee)&&!P.isValidElement(Ee)&&(Ee=null),X&&(I||F)&&(Ee=P.createElement("span",{className:"".concat(ie,"-content")},Ee));var pe=oe||{},Ce=pe.colSpan,Be=pe.rowSpan,Pe=pe.style,ke=pe.className,Ne=Object(U.a)(pe,["colSpan","rowSpan","style","className"]),he=Ce!==void 0?Ce:o,ue=Be!==void 0?Be:x;if(he===0||ue===0)return null;var Ie={},Ue=typeof C=="number",Ye=typeof A=="number";Ue&&(Ie.position="sticky",Ie.left=C),Ye&&(Ie.position="sticky",Ie.right=A);var ee={};J&&(ee.textAlign=J);var M,N=X===!0?{showTitle:!0}:X;N&&(N.showTitle||B==="header")&&(typeof Ee=="string"||typeof Ee=="number"?M=Ee.toString():P.isValidElement(Ee)&&typeof Ee.props.children=="string"&&(M=Ee.props.children));var $=Object(Z.a)(Object(Z.a)(Object(Z.a)({title:M},Ne),G),{},{colSpan:he&&he!==1?he:null,rowSpan:ue&&ue!==1?ue:null,className:T()(ie,c,(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"),H),Object(ae.a)(n,"".concat(ie,"-ellipsis"),X),Object(ae.a)(n,"".concat(ie,"-with-append"),te),Object(ae.a)(n,"".concat(ie,"-fix-sticky"),(Ue||Ye)&&Q),n),G.className,ke),style:Object(Z.a)(Object(Z.a)(Object(Z.a)(Object(Z.a)({},G.style),ee),Ie),Pe),ref:d(E)?i:null});return P.createElement(E,Object.assign({},$),te,Ee)}var u=P.forwardRef(a);u.displayName="Cell";var s=P.memo(u,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(O){var T=O.expandable,l=Object(Z.a)(O,["expandable"]);return"expandable"in O?Object(ae.a)(Object(ae.a)({},l),T):l}function S(O){return Object.keys(O).reduce(function(T,l){return(l.substr(0,5)==="data-"||l.substr(0,5)==="aria-")&&(T[l]=O[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"),O=z.n(S),T=z("GUcZ"),l=z("ulZh"),p=z.n(l),h=z("xKgJ"),d=z("bntm"),a=z("4xil"),u=z.n(a);function s(t){if(isNaN(t))return{minutes:"00",seconds:"00"};var c=new Date(t*1e3).toISOString().substr(11,8);return{minutes:c.substr(3,2),seconds:c.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function f(t,c){return t-c}function i(t){t.sort(f);for(var c=0,y=0;y<t.length-1;y++){var v=Math.abs(t[y+1]-t[y]);v<21&&(c+=v)}return c}var n=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;We.a=Object(S.forwardRef)(function(t,c){var y,v,_,b=t.src,m=t.toLog,g=t.videoId,E=t.logWatchHistory,o=t.courseId,x=o===void 0?null:o,C=t.startTime,A=t.handlePause,D=A===void 0?function(){}:A,I=t.handlePlay,F=I===void 0?function(){}:I,H=t.handlePlayEnded,te=H===void 0?function(){}:H,j=t.videoSpeed,G=j===void 0?1:j;b=(y=b)===null||y===void 0?void 0:y.replace("http://","https://");var X=(v=b)===null||v===void 0||((_=v.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)(),Ee=Object(S.useRef)(),ye=Object(S.useRef)(),Le=Object(S.useRef)(),pe=Object(S.useRef)(),Ce=Object(S.useRef)(),Be=Object(S.useRef)(),Pe=Object(S.useRef)(),ke=Object(S.useRef)(),Ne=Object(S.useRef)(),he=Object(S.useRef)(),ue=navigator.userAgent.toLowerCase().match(n),Ie=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,De=[];Object(S.useImperativeHandle)(c,function(){return{getLastUpdatedTime:function(){return B.current.currentTime},getDuration:function(){return B.current.duration}}});var Me=Object(S.useCallback)(function(we){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe={point:B.current.currentTime};$?(Oe.log_id=$,Oe.watch_duration=i(De),Oe.total_duration=M):(x?(Oe.video_id=parseInt(g,10),Oe.course_id=x):Oe.video_id=g,Oe.duration=ee,Oe.device=Ie),Ae&&(Oe.ed="1");function fe(){return ge.apply(this,arguments)}function ge(){return ge=Object(U.a)(P.a.mark(function _e(){var be;return P.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return Re=!0,qe.next=3,E(Oe);case 3:be=qe.sent,$=be,Re=!1,we&&we();case 7:case"end":return qe.stop()}},_e)})),ge.apply(this,arguments)}fe()},[g,x]);Object(S.useEffect)(function(){var we;Z.b.destroy();var Ae=null;return T.a.isSupported&&J&&b&&((we=b)===null||we===void 0?void 0:we.indexOf(".m3u8"))<0?(Ae=T.a.createPlayer({type:"flv",volume:.8,cors:!0,url:b,muted:!1}),B.current&&(Ae.attachMediaElement(B.current),Ae.load())):B.current.setAttribute("src",b),tt(),function(){Ae&&(Ae.unload(),Ae.pause(),Ae.destroy(),Ae=null)}},[B,J,b]);function Xe(){B.current.paused?(oe.current.style.display="none",Ee.current.style.display="block"):(oe.current.style.display="block",Ee.current.style.display="none")}function tt(){Pe.current.style.display="none",Ne.current.style.display="none",ke.current.style.display="none",B.current.muted||B.current.volume===0?Pe.current.style.display="block":B.current.volume>0&&B.current.volume<=.5?Ne.current.style.display="block":ke.current.style.display="block"}Object(S.useEffect)(function(){var we=document.getElementById("play"),Ae=document.querySelectorAll(".playback-icons use");function Oe(){F(),C&&!Ue.current&&(B.current.currentTime=C),Ue.current=!0,De.push(B.current.currentTime),V||(V=!0,m&&Me())}function fe(){return ge.apply(this,arguments)}function ge(){return ge=Object(U.a)(P.a.mark(function Qe(){return P.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:Xe(),De.push(B.current.currentTime),m&&Me(function(){$=null,N=0,V=!1,Re=!1,rt=!1,De=[],M=0,me=1},!0);case 3:case"end":return je.stop()}},Qe)})),ge.apply(this,arguments)}function _e(){ye.current.value=Math.floor(B.current.currentTime),Le.current.value=Math.floor(B.current.currentTime)}function be(){var Qe=s(Math.round(B.current.currentTime));Ce.current.innerText="".concat(Qe.minutes,":").concat(Qe.seconds),Ce.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),Le.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),Le.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")),_e(),be();var je=Q.current.getBoundingClientRect(),dt=je.width,Ze=je.height,Tt=je.x,Ct=je.y;if(Tt<0||Ct<0||!dt)return;if(!rt){var ot=B.current.currentTime,gt=ot-N;Math.abs(gt)<10?(M+=Math.abs(gt),N=ot,Re||M-me*Y>=0&&(me++,De.push(N),m&&Me())):(N=ot,m&&Me())}}function pt(){rt=!0}function Dt(){B.current.playing&&De.push(B.current.currentTime,N),N=B.current.currentTime,rt=!1}function jt(){ee=B.current.duration,ee<=20&&(Y=ee/3),B.current.addEventListener("play",Oe)}function Rt(Qe){Qe.preventDefault(),Object(d.a)()?(B.current.style.width="100%",B.current.style.height="100%"):B.current.style.cssText=""}function Lt(){D()}function lt(Qe){var Te=Qe.target.dataset.seek?Qe.target.dataset.seek:Qe.target.value;B.current.currentTime=Te,Le.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);Be.current.textContent="".concat(je.minutes,":").concat(je.seconds);var dt=B.current.getBoundingClientRect();Be.current.style.left="".concat(Qe.pageX-dt.left,"px")}return ie.current.addEventListener(Object(d.c)(),Rt),B.current.addEventListener("canplay",jt),B.current.addEventListener("ended",fe),B.current.addEventListener("seeking",pt),B.current.addEventListener("seeked",Dt),B.current.addEventListener("loadedmetadata",Ge),ye.current.addEventListener("mousemove",ft),ye.current.addEventListener("input",lt),B.current.addEventListener("timeupdate",qe),B.current.addEventListener("pause",Lt),B.current.addEventListener("volumechange",tt),function(){B.current.removeEventListener("canplay",jt),B.current.removeEventListener("play",Oe),B.current.removeEventListener("ended",fe),B.current.removeEventListener("seeking",pt),B.current.removeEventListener("seeked",Dt),ye.current.removeEventListener("mousemove",ft),ye.current.removeEventListener("input",lt),B.current.removeEventListener("timeupdate",qe),B.current.removeEventListener("pause",Lt),B.current.removeEventListener("loadedmetadata",Ge),B.current.removeEventListener("volumechange",tt),B.current.playing&&(De.push(N,B.current.currentTime),m&&Me())}},[B,b]),Object(S.useEffect)(function(){var we;if(B.current.onended=function(){te(B)},B.current.oncontextmenu=function(){return!1},((we=b)===null||we===void 0?void 0:we.indexOf(".m3u8"))>-1){if(B.current.canPlayType("application/vnd.apple.mpegurl"))B.current.src=b;else if(p.a.isSupported()){var Ae=new p.a;Ae.loadSource(b),Ae.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?(he.current.setAttribute("data-volume",volume.value),he.current.value=0):he.current.value=he.current.dataset.volume}return O.a.createElement("div",{style:{position:"relative"},ref:ie},O.a.createElement("div",{ref:Q,className:"".concat(u.a.watermark," animated_alternate animate__animated_10s animate__infinite animate__stepstart ").concat(u.a.animate__loop)},Ye?Ye.login:" "),O.a.createElement("div",{className:u.a.container},O.a.createElement("div",{className:u.a["video-container"],id:"video-container"},O.a.createElement("div",{className:u.a["playback-animation"],id:"playback-animation"},O.a.createElement("svg",{className:u.a["playback-icons"]},O.a.createElement("use",{className:"hidden",href:"#play-icon"}),O.a.createElement("use",{href:"#pause"}))),O.a.createElement("video",{className:u.a.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:B,autoPlay:!1}),O.a.createElement("div",{className:"".concat(u.a["video-controls"]," "),id:"video-controls"},O.a.createElement("div",{className:u.a["bottom-controls"]},O.a.createElement("div",{className:u.a["left-controls"]},O.a.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Ve},O.a.createElement("svg",{className:u.a["playback-icons"]},O.a.createElement("use",{ref:Ee,href:"#play-icon"}),O.a.createElement("use",{ref:oe,style:{display:"none"},href:"#pause"}))),O.a.createElement("div",{className:u.a.time},O.a.createElement("time",{id:"time-elapsed",ref:Ce},"00:00"),O.a.createElement("span",null," / "),O.a.createElement("time",{id:"duration",ref:pe},"00:00"))),O.a.createElement("div",{className:u.a["right-controls"]},O.a.createElement("div",{className:u.a["volume-controls"]},O.a.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:u.a["volume-button"],id:"volume-button",onClick:Ke},O.a.createElement("svg",null,O.a.createElement("use",{ref:Pe,href:"#volume-mute"}),O.a.createElement("use",{ref:Ne,href:"#volume-low"}),O.a.createElement("use",{ref:ke,href:"#volume-high"}))),O.a.createElement("input",{className:u.a.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:he,style:{display:"none"},onClick:tt})),O.a.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:u.a["fullscreen-button"],onClick:function(){Object(d.a)()?Object(d.b)():Object(d.d)(ie.current)}},O.a.createElement("svg",null,O.a.createElement("use",{href:"#fullscreen"}),O.a.createElement("use",{href:"#fullscreen-exit",className:"hidden"}))))),O.a.createElement("div",{className:u.a["video-progress"]},O.a.createElement("progress",{ref:Le,value:"0",min:"0"}),O.a.createElement("input",{className:u.a.seek,ref:ye,value:"0",min:"0",type:"range",step:"1"}),O.a.createElement("div",{className:u.a["seek-tooltip"],ref:Be,id:"seek-tooltip"},"00:00"))))),O.a.createElement("svg",{style:{display:"none"}},O.a.createElement("defs",null,O.a.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},O.a.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),O.a.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},O.a.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),O.a.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},O.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"})),O.a.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},O.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"})),O.a.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},O.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"})),O.a.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},O.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"})),O.a.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},O.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"})),O.a.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},O.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"),O=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)(""),a=Object(U.a)(d,2),u=a[0],s=a[1],f=Object(w.useState)(0),i=Object(U.a)(f,2),n=i[0],t=i[1],c=Object(w.useRef)("");Object(w.useEffect)(function(){var b=T.a.subscribe("preview-image",function(m){s(m),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(){c.current=u},[u]);function y(b){b.keyCode==27&&c.current&&v()}function v(){document.body.style.overflow="auto",s("")}function _(){t(n+90)}return P.a.createElement(w.Fragment,null,u?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:u},"\u4E0B\u8F7D",P.a.createElement(p.a,null)),P.a.createElement(Z.a,{onClick:v},"\u5173\u95ED",P.a.createElement(h.a,null))),P.a.createElement("div",{className:"preview-wrp-group"},P.a.createElement("img",{className:"image-preview",src:u,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 O={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 O)O.hasOwnProperty(T)&&U.tokenTypeOverrides[T]&&(O[T]=U.tokenTypeOverrides[T]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,p=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,h=/^\[(x| )\](?=\s)/i,d=U.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,a=/^ {0,3}(?:\={1,}|-{2,})\s*$/,u=/^[^#!\[\]*_\\<>` "'(~:]+/,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 c(j,G,X){return G.f=G.block=X,X(j,G)}function y(j){return!j||!/\S/.test(j.string)}function v(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=o,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 Ee=G.indentation;if(G.indentationDiff===null&&(G.indentationDiff=G.indentation,ie)){for(G.list=null;Ee<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=Ee-G.listStack[G.listStack.length-1])}var ye=!J&&!Q&&!G.prevLine.header&&(!ie||!B)&&!G.prevLine.fencedCodeEnd,Le=(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,O.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,g(G);if(G.indentation<=oe&&j.eat(">"))return G.quote=X?1:G.quote+1,U.highlightFormatting&&(G.formatting="quote"),j.eatSpace(),g(G);if(!Le&&!G.setext&&X&&G.indentation<=oe&&(pe=j.match(p))){var Ce=pe[1]?"ol":"ul";return G.indentation=Ee+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-"+Ce]),g(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=m,U.highlightFormatting&&(G.formatting="code-block"),G.code=-1,g(G);if(G.setext||(!ye||!ie)&&!G.quote&&G.list===!1&&!G.code&&!Le&&!f.test(j.string)&&(pe=j.lookAhead(1))&&(pe=pe.match(a)))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,g(G);if(Le)return j.skipToEnd(),G.hr=!0,G.thisLine.hr=!0,O.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=o,G.block=_,G.htmlState=null)}return X}function m(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=g(G)),G.localMode=G.localState=null,G.block=_,G.f=o,G.fencedEndRE=null,G.code=0,G.thisLine.fencedCodeEnd=!0,J?c(j,G,G.block):Q}else return G.localMode?G.localMode.token(j,G.localState):(j.skipToEnd(),O.code)}function g(j){var G=[];if(j.formatting){G.push(O.formatting),typeof j.formatting=="string"&&(j.formatting=[j.formatting]);for(var X=0;X<j.formatting.length;X++)G.push(O.formatting+"-"+j.formatting[X]),j.formatting[X]==="header"&&G.push(O.formatting+"-"+j.formatting[X]+"-"+j.header),j.formatting[X]==="quote"&&(!U.maxBlockquoteDepth||U.maxBlockquoteDepth>=j.quote?G.push(O.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(O.linkHref,"url"):(j.strong&&G.push(O.strong),j.em&&G.push(O.em),j.strikethrough&&G.push(O.strikethrough),j.emoji&&G.push(O.emoji),j.linkText&&G.push(O.linkText),j.code&&G.push(O.code),j.image&&G.push(O.image),j.imageAltText&&G.push(O.imageAltText,"link"),j.imageMarker&&G.push(O.imageMarker)),j.header&&G.push(O.header,O.header+"-"+j.header),j.quote&&(G.push(O.quote),!U.maxBlockquoteDepth||U.maxBlockquoteDepth>=j.quote?G.push(O.quote+"-"+j.quote):G.push(O.quote+"-"+U.maxBlockquoteDepth)),j.list!==!1){var J=(j.listStack.length-1)%3;J?J===1?G.push(O.list2):G.push(O.list3):G.push(O.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(u,!0)?g(G):void 0}function o(j,G){var X=G.text(j,G);if(typeof X!="undefined")return X;if(G.list)return G.list=null,g(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,g(G)}if(G.taskOpen=!1,G.taskClosed=!1,G.header&&j.match(/^#+$/,!0))return U.highlightFormatting&&(G.formatting="header"),g(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 O.linkHref}if(B==="`"){var oe=G.formatting;U.highlightFormatting&&(G.formatting="code"),j.eatWhile("`");var Ee=j.current().length;if(G.code==0&&(!G.quote||Ee==1))return G.code=Ee,g(G);if(Ee==G.code){var ye=g(G);return G.code=0,ye}else return G.formatting=oe,g(G)}else if(G.code)return g(G);if(B==="\\"&&(j.next(),U.highlightFormatting)){var Le=g(G),pe=O.formatting+"-escape";return Le?Le+" "+pe:pe}if(B==="!"&&j.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return G.imageMarker=!0,G.image=!0,U.highlightFormatting&&(G.formatting="image"),g(G);if(B==="["&&G.imageMarker&&j.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return G.imageMarker=!1,G.imageAltText=!0,U.highlightFormatting&&(G.formatting="image"),g(G);if(B==="]"&&G.imageAltText){U.highlightFormatting&&(G.formatting="image");var Le=g(G);return G.imageAltText=!1,G.image=!1,G.inline=G.f=C,Le}if(B==="["&&!G.image)return G.linkText&&j.match(/^.*?\]/)||(G.linkText=!0,U.highlightFormatting&&(G.formatting="link")),g(G);if(B==="]"&&G.linkText){U.highlightFormatting&&(G.formatting="link");var Le=g(G);return G.linkText=!1,G.inline=G.f=j.match(/\(.*?\)| ?\[.*?\]/,!1)?C:o,Le}if(B==="<"&&j.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=x,U.highlightFormatting&&(G.formatting="link");var Le=g(G);return Le?Le+=" ":Le="",Le+O.linkInline}if(B==="<"&&j.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=x,U.highlightFormatting&&(G.formatting="link");var Le=g(G);return Le?Le+=" ":Le="",Le+O.linkEmail}if(U.xml&&B==="<"&&j.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ce=j.string.indexOf(">",j.pos);if(Ce!=-1){var Be=j.string.substring(j.start,Ce);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Be)&&(G.md_inside=!0)}return j.backUp(1),G.htmlState=ae.startState(w),c(j,G,b)}if(U.xml&&B==="<"&&j.match(/^\/\w*?>/))return G.md_inside=!1,"tag";if(B==="*"||B==="_"){for(var Pe=1,ke=j.pos==1?" ":j.string.charAt(j.pos-2);Pe<3&&j.eat(B);)Pe++;var Ne=j.peek()||" ",he=!/\s/.test(Ne)&&(!i.test(Ne)||/\s/.test(ke)||i.test(ke)),ue=!/\s/.test(ke)&&(!i.test(ke)||/\s/.test(Ne)||i.test(Ne)),Ie=null,Ue=null;if(Pe%2&&(!G.em&&he&&(B==="*"||!ue||i.test(ke))?Ie=!0:G.em==B&&ue&&(B==="*"||!he||i.test(Ne))&&(Ie=!1)),Pe>1&&(!G.strong&&he&&(B==="*"||!ue||i.test(ke))?Ue=!0:G.strong==B&&ue&&(B==="*"||!he||i.test(Ne))&&(Ue=!1)),Ue!=null||Ie!=null){U.highlightFormatting&&(G.formatting=Ie==null?"strong":Ue==null?"em":"strong em"),Ie===!0&&(G.em=B),Ue===!0&&(G.strong=B);var ye=g(G);return Ie===!1&&(G.em=!1),Ue===!1&&(G.strong=!1),ye}}else if(B===" "&&(j.eat("*")||j.eat("_"))){if(j.peek()===" ")return g(G);j.backUp(1)}if(U.strikethrough){if(B==="~"&&j.eatWhile(B)){if(G.strikethrough){U.highlightFormatting&&(G.formatting="strikethrough");var ye=g(G);return G.strikethrough=!1,ye}else if(j.match(/^[^\s]/,!1))return G.strikethrough=!0,U.highlightFormatting&&(G.formatting="strikethrough"),g(G)}else if(B===" "&&j.match(/^~~/,!0)){if(j.peek()===" ")return g(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=g(G);return G.emoji=!1,Ye}return B===" "&&(j.match(/^ +$/,!1)?G.trailingSpace++:G.trailingSpace&&(G.trailingSpaceNewLine=!0)),g(G)}function x(j,G){var X=j.next();if(X===">"){G.f=G.inline=o,U.highlightFormatting&&(G.formatting="link");var J=g(G);return J?J+=" ":J="",J+O.linkInline}return j.match(/^[^>]+/,!0),O.linkInline}function C(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,g(G)):"error"}var A={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function D(j){return function(G,X){var J=G.next();if(J===j){X.f=X.inline=o,U.highlightFormatting&&(X.formatting="link-string");var B=g(X);return X.linkHref=!1,B}return G.match(A[j]),X.linkHref=!0,g(X)}}function I(j,G){return j.match(/^([^\]\\]|\\.)*\]:/,!1)?(G.f=F,j.next(),U.highlightFormatting&&(G.formatting="link"),G.linkText=!0,g(G)):t(j,G,o)}function F(j,G){if(j.match(/^\]:/,!0)){G.f=G.inline=H,U.highlightFormatting&&(G.formatting="link");var X=g(G);return G.linkText=!1,X}return j.match(/^([^\]\\]|\\.)+/,!0),O.linkText}function H(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=o,O.linkHref+" url")}var te={startState:function(){return{f:_,prevLine:{stream:null},thisLine:{stream:null},block:_,htmlState:null,indentation:0,inline:o,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 v(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:te}},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:v,getType:g,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return te},"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,a=l.colSpan,u=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:a,rowSpan:u}}}},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 O=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 O(i,n,t,c){this.line=n,this.ch=t,this.cm=i,this.text=i.getLine(n),this.min=c?Math.max(c.from,i.firstLine()):i.firstLine(),this.max=c?Math.min(c.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),c=t>-1&&!/\S/.test(i.text.slice(t+1,n));return i.ch=n+1,c?"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 a(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 u(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),c=t>-1&&!/\S/.test(i.text.slice(t+1,n));return i.ch=n+1,c?"selfClose":"regular"}}function s(i,n){for(var t=[];;){var c=a(i),y,v=i.line,_=i.ch-(c?c[0].length:0);if(!c||!(y=h(i)))return;if(y=="selfClose")continue;if(c[1]){for(var b=t.length-1;b>=0;--b)if(t[b]==c[2]){t.length=b;break}if(b<0&&(!n||n==c[2]))return{tag:c[2],from:Z(v,_),to:Z(i.line,i.ch)}}else t.push(c[2])}}function f(i,n){for(var t=[];;){var c=u(i);if(!c)return;if(c=="selfClose"){d(i);continue}var y=i.line,v=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,v)}}}}ae.registerHelper("fold","xml",function(i,n){for(var t=new O(i,n.line,0);;){var c=a(t);if(!c||t.line!=n.line)return;var y=h(t);if(!y)return;if(!c[1]&&y!="selfClose"){var v=Z(t.line,t.ch),_=s(t,c[2]);return _&&U(_.from,v)>0?{from:v,to:_.from}:null}}}),ae.findMatchingTag=function(i,n,t){var c=new O(i,n.line,n.ch,t);if(c.text.indexOf(">")==-1&&c.text.indexOf("<")==-1)return;var y=h(c),v=y&&Z(c.line,c.ch),_=y&&d(c);if(!y||!_||U(c,n)>0)return;var b={from:Z(c.line,c.ch),to:v,tag:_[2]};return y=="selfClose"?{open:b,close:null,at:"open"}:_[1]?{open:f(c,_[2]),close:b,at:"close"}:(c=new O(i,v.line,v.ch,t),{open:b,close:s(c,_[2]),at:"open"})},ae.findEnclosingTag=function(i,n,t,c){for(var y=new O(i,n.line,n.ch,t);;){var v=f(y,c);if(!v)break;var _=new O(i,n.line,n.ch,t),b=s(_,v.tag);if(b)return{open:v,close:b}}},ae.scanForClosingTag=function(i,n,t,c){var y=new O(i,n.line,n.ch,c?{from:0,to:c}: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"),O=z("q1tI"),T=z.n(O),l=z("vHTk"),p=z.n(l),h=z("yEEn"),d=z("ZW9T"),a=z("1vsH");We.a=function(u){var s=u.name,f=u.data,i=u.theme,n=u.type,t=u.filename,c=u.monacoEditor,y=u.className,v=u.style,_=u.close,b=u.onClose,m=u.hasMask,g=Object(O.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)(g,2),o=E[0],x=E[1],C=Object(O.useState)(""),A=Object(S.a)(C,2),D=A[0],I=A[1],F=Object(O.useRef)();t&&(c.filename=t),Object(O.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 H=function(){if(f.startsWith("http")||f.startsWith("/")){te();return}Object(a.x)(t||"educoder",f,t)},te=function(){Object(a.v)(t||s,f)};return console.log("data:",f,"fileanme:",t," name:",s),T.a.createElement("div",{style:Object(P.a)({},v||{}),className:"".concat(m&&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:te},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,c)),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:H},T.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&T.a.createElement(Z.a,{type:"primary",size:"large",onClick:H},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,O){function T(h,d){if(!S[h]){if(!P[h]){var a=typeof Z=="function"&&Z;if(!d&&a)return Z(h,!0);if(l)return l(h,!0);var u=new Error("Cannot find module '"+h+"'");throw u.code="MODULE_NOT_FOUND",u}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,O)}return S[h].exports}for(var l=typeof Z=="function"&&Z,p=0;p<O.length;p++)T(O[p]);return T}return w}()({1:[function(w,P,S){"use strict";var O=w("./browser/client");O.Buffer=w("buffer").Buffer,O.co=w("co"),O.urllib=w("../shims/xhr"),O.version=w("./browser/version").version,P.exports=O},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(w,P,S){(function(O,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=o.parse(J);if(!Q.protocol){var ie=B?"https://":"http://";Q=o.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"),o.parse(ie+J+oe)}function a(){return document&&document.location&&document.location.protocol==="https:"}function u(J,B){if(!(this instanceof u))return new u(J,B);J&&J.inited?this.options=J:this.options=u.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"),c=w("./../../shims/crypto/crypto.js"),y=w("path"),v=w("copy-to"),_=w("mime"),b=w("xml2js"),m=w("humanize-ms"),g=w("agentkeepalive"),E=w("merge-descriptors"),o=w("url"),x=w("is-type-of"),C=w("platform"),A=w("utility"),D=w("urllib"),I=w("./version"),F=w("dateformat"),H=w("bowser"),te=w("../common/signUtils"),j=w("../common/utils"),G=new g;P.exports=u,u.initOptions=function(J){if(!J||!J.accessKeyId||!J.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var B=a(),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=m(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=u.prototype;E(X,w("./object")),E(X,w("./managed_upload")),E(X,w("../common/multipart")),E(X,w("../common/thunkpool.js")),u.Wrapper=w("./wrapper"),X.signature=function(J){return t("authorization stringToSign: %s",J),te.computeSignature(this.options.accessKeySecret,J)},X.authorization=function(J,B,Q,ie){var oe=te.buildCanonicalString(J.toUpperCase(),B,{headers:ie,parameters:Q});return te.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),v(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"]=c.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,Ee;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(Ee=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(Ee=ye.sent,Ee.code!=="RequestTimeTooSkewed"){ye.next=23;break}return this.options.amendTimeSkewed=+new Date(Ee.serverTime)-new Date,ye.next=22,this.request(B);case 22:return ye.abrupt("return",ye.sent);case 23:Ee.params=B,ye.next=30;break;case 26:if(!oe){ye.next=30;break}return ye.next=29,this.requestError(oe);case 29:Ee=ye.sent;case 30:if(!Ee){ye.next=32;break}throw Ee;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={};v(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 Ee={};if(J.query&&E(Ee,J.query),J.subres){var ye={};x.string(J.subres)?ye[J.subres]="":x.array(J.subres)?J.subres.forEach(function(Le){ye[Le]=""}):ye=J.subres,E(Ee,ye)}return B.query=Ee,o.format(B)},X._getUserAgent=function(){var J=O&&O.browser?"js":"nodejs",B="aliyun-sdk-"+J+"/"+I.version,Q=C.description;return!Q&&O&&(Q="Node.js "+O.version.slice(1)+" on "+O.platform+" "+O.arch),this._checkUserAgent(B+" "+Q)},X._checkUserAgent=function(J){return J.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},X.checkBrowserAndVersion=function(J,B){return H.name===J&&H.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,Ee;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:Ee=oe.Message||"unknow request error, status: "+B.status,oe.Condition&&(Ee+=" (condition: "+oe.Condition+")"),Q=new Error(Ee),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(O){"use strict";function T(v){return v&&v.__esModule?v:{default:v}}function l(v,_){if(!(this instanceof l))return new l(v,_);y.call(this,_),this.file=v,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"),a=T(d),u=w("is-type-of"),s=w("util"),f=w("path"),i=w("mime"),n=w("copy-to"),t=S;t.multipartUpload=a.default.mark(function v(_,b,m){var g,E,o,x,C,A,D,I,F;return a.default.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:if(this.resetCancelFlag(),m=m||{},!m.checkpoint||!m.checkpoint.uploadId){H.next=6;break}return H.next=5,this._resumeMultipart(m.checkpoint,m);case 5:return H.abrupt("return",H.sent);case 6:return g=102400,m.mime||(u.file(b)?m.mime=i.getType(f.extname(b.name)):u.blob(b)?m.mime=b.type:m.mime=i.getType(f.extname(b))),m.headers=m.headers||{},this._convertMetaToHeaders(m.meta,m.headers),H.next=12,this._getFileSize(b);case 12:if(!((E=H.sent)<g)){H.next=25;break}return o=this._createStream(b,0,E),m.contentLength=E,H.next=18,this.putStream(_,o,m);case 18:if(x=H.sent,!m||!m.progress){H.next=22;break}return H.next=22,m.progress(1);case 22:return C={res:x.res,bucket:this.options.bucket,name:_,etag:x.res.headers.etag},(m.headers&&m.headers["x-oss-callback"]||m.callback)&&(C.data=x.data),H.abrupt("return",C);case 25:if(!(m.partSize&&m.partSize<g)){H.next=27;break}throw new Error("partSize must not be smaller than "+g);case 27:return H.next=29,this.initMultipartUpload(_,m);case 29:if(A=H.sent,D=A.uploadId,I=this._getPartSize(E,m.partSize),F={file:b,name:_,fileSize:E,partSize:I,uploadId:D,doneParts:[]},!m||!m.progress){H.next=36;break}return H.next=36,m.progress(0,F,A.res);case 36:return H.next=38,this._resumeMultipart(F,m);case 38:return H.abrupt("return",H.sent);case 39:case"end":return H.stop()}},v,this)}),t._resumeMultipart=a.default.mark(function v(_,b){var m,g,E,o,x,C,A,D,I,F,H,te,j,G,X,J,B,Q,ie,oe,Ee;return a.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(m=_.file,g=_.fileSize,E=_.partSize,o=_.uploadId,x=_.doneParts,C=_.name,A=[],x.length>0&&n(x).to(A),D=this._divideParts(g,E),I=D.length,F=!1,H=a.default.mark(function Le(pe,Ce){var Be,Pe,ke;return a.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:if(pe.isCancel()){Ne.next=21;break}return Ne.prev=1,Be=D[Ce-1],Pe={stream:pe._createStream(m,Be.start,Be.end),size:Be.end-Be.start},Ne.next=6,pe._uploadPart(C,o,Ce,Pe);case 6:if(ke=Ne.sent,pe.isCancel()||F){Ne.next=13;break}if(_.doneParts.push({number:Ce,etag:ke.res.headers.etag}),A.push({number:Ce,etag:ke.res.headers.etag}),!b||!b.progress){Ne.next=13;break}return Ne.next=13,b.progress(x.length/I,_,ke.res);case 13:Ne.next=21;break;case 15:if(Ne.prev=15,Ne.t0=Ne.catch(1),pe.isCancel()){Ne.next=21;break}throw pe.cancel(),Ne.t0.partNum=Ce,Ne.t0;case 21:case"end":return Ne.stop()}},Le,this,[[1,15]])}),te=(0,h.default)(new Array(I),function(Le,pe){return pe+1}),j=A.map(function(Le){return Le.number}),G=te.filter(function(Le){return j.indexOf(Le)<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,H(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(H(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(),Ee=oe[0],Ee.message="Failed to upload some parts with error: "+Ee.toString()+" part_num: "+Ee.partNum,Ee;case 37:if(!this.isCancel()){ye.next=40;break}throw Q=null,this._makeCancelEvent();case 40:return ye.next=42,this.completeMultipartUpload(C,o,A,b);case 42:return ye.abrupt("return",ye.sent);case 43:case"end":return ye.stop()}},v,this)}),u.file=function(v){return typeof File!="undefined"&&v instanceof File},u.blob=function(v){return typeof Blob!="undefined"&&v instanceof Blob},t._getFileSize=a.default.mark(function v(_){var b;return a.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(!u.buffer(_)){m.next=4;break}return m.abrupt("return",_.length);case 4:if(!u.blob(_)&&!u.file(_)){m.next=6;break}return m.abrupt("return",_.size);case 6:if(!u.string(_)){m.next=11;break}return m.next=9,this._statFile(_);case 9:return b=m.sent,m.abrupt("return",b.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return m.stop()}},v,this)});var c=w("stream"),y=c.Readable;s.inherits(l,y),l.prototype.readFileAndPush=function(v){if(this.fileBuffer)for(var _=!0;_&&this.fileBuffer&&this.start<this.fileBuffer.length;){var b=this.start,m=b+v;m=m>this.fileBuffer.length?this.fileBuffer.length:m,this.start=m,_=this.push(this.fileBuffer.slice(b,m))}},l.prototype._read=function(v){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);v=v||16384;var _=this;this.reader.onload=function(b){_.fileBuffer=new O(new Uint8Array(b.target.result)),_.file=null,_.readFileAndPush(v)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(v)},t._createStream=function(v,_,b){if(u.blob(v)||u.file(v))return new l(v.slice(_,b));throw new Error("_createStream requires File/String.")},t._getPartSize=function(v,_){return _?Math.max(Math.ceil(v/1e4),_):1048576},t._divideParts=function(v,_){for(var b=Math.ceil(v/_),m=[],g=0;g<b;g++){var E=_*g,o=Math.min(E+_,v);m.push({start:E,end:o})}return m},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 O(_){return _&&_.__esModule?_:{default:_}}var T=w("babel-runtime/core-js/object/keys"),l=O(T),p=w("babel-runtime/regenerator"),h=O(p),d=w("debug")("ali-oss:object"),a=w("utility"),u=w("fs"),s=w("is-type-of"),f=w("url"),i=w("copy-to"),n=w("path"),t=w("mime"),c=w("../common/callback"),y=w("../common/signUtils"),v=S;v.append=h.default.mark(function _(b,m,g){var E;return h.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return g=g||{},g.position===void 0&&(g.position="0"),g.subres={append:"",position:g.position},g.method="POST",o.next=6,this.put(b,m,g);case 6:return E=o.sent,E.nextAppendPosition=E.res.headers["x-oss-next-append-position"],o.abrupt("return",E);case 9:case"end":return o.stop()}},_,this)}),v.put=h.default.mark(function _(b,m,g){var E,o,x,C,A,D;return h.default.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(E=void 0,g=g||{},!s.buffer(m)){I.next=6;break}E=m,I.next=18;break;case 6:if(!s.blob(m)&&!s.file(m)){I.next=17;break}return g.mime||(s.file(m)?g.mime=t.getType(n.extname(m.name)):g.mime=m.type),o=this._createStream(m,0,m.size),I.next=11,this._getFileSize(m);case 11:return g.contentLength=I.sent,I.next=14,this.putStream(b,o,g);case 14:return I.abrupt("return",I.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return g.headers=g.headers||{},this._convertMetaToHeaders(g.meta,g.headers),x=g.method||"PUT",C=this._objectRequestParams(x,b,g),c.encodeCallback(C,g),C.mime=g.mime,C.content=E,C.successStatuses=[200],I.next=28,this.request(C);case 28:return A=I.sent,D={name:b,url:this._objectUrl(b),res:A.res},C.headers&&C.headers["x-oss-callback"]&&(D.data=JSON.parse(A.data.toString())),I.abrupt("return",D);case 32:case"end":return I.stop()}},_,this)}),v.putStream=h.default.mark(function _(b,m,g){var E,o,x,C;return h.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return g=g||{},g.headers=g.headers||{},g.contentLength?g.headers["Content-Length"]=g.contentLength:g.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(g.meta,g.headers),E=g.method||"PUT",o=this._objectRequestParams(E,b,g),c.encodeCallback(o,g),o.mime=g.mime,o.stream=m,o.successStatuses=[200],A.next=12,this.request(o);case 12:return x=A.sent,C={name:b,url:this._objectUrl(b),res:x.res},o.headers&&o.headers["x-oss-callback"]&&(C.data=JSON.parse(x.data.toString())),A.abrupt("return",C);case 16:case"end":return A.stop()}},_,this)}),v.head=h.default.mark(function _(b,m){var g,E,o;return h.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return g=this._objectRequestParams("HEAD",b,m),g.successStatuses=[200,304],x.next=4,this.request(g);case 4:return E=x.sent,o={meta:null,res:E.res,status:E.status},E.status===200&&(0,l.default)(E.headers).forEach(function(C){C.indexOf("x-oss-meta-")===0&&(o.meta||(o.meta={}),o.meta[C.substring(11)]=E.headers[C])}),x.abrupt("return",o);case 8:case"end":return x.stop()}},_,this)}),v.get=h.default.mark(function _(b,m,g){var E,o,x,C;return h.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return E=null,o=!1,s.writableStream(m)?E=m:s.string(m)?(E=u.createWriteStream(m),o=!0):g=m,g=g||{},g.process&&(g.subres=g.subres||{},g.subres["x-oss-process"]=g.process),x=void 0,A.prev=6,C=this._objectRequestParams("GET",b,g),C.writeStream=E,C.successStatuses=[200,206,304],A.next=12,this.request(C);case 12:x=A.sent,o&&E.destroy(),A.next=24;break;case 16:if(A.prev=16,A.t0=A.catch(6),!o){A.next=23;break}return E.destroy(),d("get error: %s, delete the exists file %s",A.t0,m),A.next=23,this._deleteFileSafe(m);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]])}),v.getStream=h.default.mark(function _(b,m){var g,E;return h.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return m=m||{},g=this._objectRequestParams("GET",b,m),g.customResponse=!0,g.successStatuses=[200,206,304],o.next=6,this.request(g);case 6:return E=o.sent,o.abrupt("return",{stream:E.res,res:{status:E.status,headers:E.headers}});case 8:case"end":return o.stop()}},_,this)}),v.delete=h.default.mark(function _(b,m){var g,E;return h.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return g=this._objectRequestParams("DELETE",b,m),g.successStatuses=[204],o.next=4,this.request(g);case 4:return E=o.sent,o.abrupt("return",{res:E.res});case 6:case"end":return o.stop()}},_,this)}),v.deleteMulti=h.default.mark(function _(b,m){var g,E,o,x,C,A;return h.default.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:for(m=m||{},g=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<Delete>
|
|
|
`,m.quiet?g+=` <Quiet>true</Quiet>
|
|
|
`:g+=` <Quiet>false</Quiet>
|
|
|
`,E=0;E<b.length;E++)g+=" <Object><Key>"+a.escape(this._objectName(b[E]))+`</Key></Object>
|
|
|
`;return g+="</Delete>",d("delete multi objects: %s",g),m.subres="delete",o=this._objectRequestParams("POST","",m),o.mime="xml",o.content=g,o.xmlResponse=!0,o.successStatuses=[200],D.next=14,this.request(o);case 14:return x=D.sent,C=x.data,A=C&&C.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)}),v.copy=h.default.mark(function _(b,m,g){var E,o,x;return h.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return g=g||{},g.headers=g.headers||{},(0,l.default)(g.headers).forEach(function(A){g.headers["x-oss-copy-source-"+A.toLowerCase()]=g.headers[A]}),g.meta&&(g.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(g.meta,g.headers),m=m[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(m):"/"+encodeURIComponent(m.slice(1)),g.headers["x-oss-copy-source"]=m,E=this._objectRequestParams("PUT",b,g),E.xmlResponse=!0,E.successStatuses=[200,304],C.next=12,this.request(E);case 12:return o=C.sent,x=o.data,x&&(x={etag:x.ETag,lastModified:x.LastModified}),C.abrupt("return",{data:x,res:o.res});case 16:case"end":return C.stop()}},_,this)}),v.putMeta=h.default.mark(function _(b,m,g){return h.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,this.copy(b,b,{meta:m||{},timeout:g&&g.timeout,ctx:g&&g.ctx});case 2:return E.abrupt("return",E.sent);case 3:case"end":return E.stop()}},_,this)}),v.list=h.default.mark(function _(b,m){var g,E,o,x,C;return h.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return g=this._objectRequestParams("GET","",m),g.query=b,g.xmlResponse=!0,g.successStatuses=[200],A.next=6,this.request(g);case 6:return E=A.sent,o=E.data.Contents,x=this,o&&(Array.isArray(o)||(o=[o]),o=o.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}}})),C=E.data.CommonPrefixes||null,C&&(Array.isArray(C)||(C=[C]),C=C.map(function(D){return D.Prefix})),A.abrupt("return",{res:E.res,objects:o,prefixes:C,nextMarker:E.data.NextMarker||null,isTruncated:E.data.IsTruncated==="true"});case 13:case"end":return A.stop()}},_,this)}),v.putACL=h.default.mark(function _(b,m,g){var E,o;return h.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return g=g||{},g.subres="acl",g.headers=g.headers||{},g.headers["x-oss-object-acl"]=m,b=this._objectName(b),E=this._objectRequestParams("PUT",b,g),E.successStatuses=[200],x.next=9,this.request(E);case 9:return o=x.sent,x.abrupt("return",{res:o.res});case 11:case"end":return x.stop()}},_,this)}),v.getACL=h.default.mark(function _(b,m){var g,E;return h.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return m=m||{},m.subres="acl",b=this._objectName(b),g=this._objectRequestParams("GET",b,m),g.successStatuses=[200],g.xmlResponse=!0,o.next=8,this.request(g);case 8:return E=o.sent,o.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 o.stop()}},_,this)}),v.restore=h.default.mark(function _(b,m){var g,E;return h.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return m=m||{},m.subres="restore",g=this._objectRequestParams("POST",b,m),g.successStatuses=[202],o.next=6,this.request(g);case 6:return E=o.sent,o.abrupt("return",{res:E.res});case 8:case"end":return o.stop()}},_,this)}),v.signatureUrl=function(_,b){b=b||{},_=this._objectName(_),b.method=b.method||"GET";var m=a.timestamp()+(b.expires||1800),g={bucket:this.options.bucket,object:_},E=this._getResource(g);this.options.stsToken&&(b["security-token"]=this.options.stsToken);var o=y._signatureForURL(this.options.accessKeySecret,b,E,m),x=f.parse(this._getReqUrl(g));return x.query={OSSAccessKeyId:this.options.accessKeyId,Expires:m,Signature:o.Signature},i(o.subResource).to(x.query),x.format()},v.getObjectUrl=function(_,b){return b?b[b.length-1]!=="/"&&(b+="/"):b=this.options.endpoint.format(),b+this._escape(this._objectName(_))},v._objectUrl=function(_){return this._getReqUrl({bucket:this.options.bucket,object:_})},v.generateObjectUrl=function(_,b){if(b)b[b.length-1]!=="/"&&(b+="/");else{b=this.options.endpoint.format();var m=f.parse(b),g=this.options.bucket;m.hostname=g+"."+m.hostname,m.host=g+"."+m.host,b=m.format()}return b+this._escape(this._objectName(_))},v._objectRequestParams=function(_,b,m){if(!this.options.bucket)throw new Error("Please create a bucket first");m=m||{},b=this._objectName(b);var g={object:b,bucket:this.options.bucket,method:_,subres:m&&m.subres,timeout:m&&m.timeout,ctx:m&&m.ctx};return m.headers&&(g.headers={},i(m.headers).to(g.headers)),g},v._objectName=function(_){return _.replace(/^\/+/,"")},v._statFile=function(_){return function(b){u.stat(_,b)}},v._convertMetaToHeaders=function(_,b){_&&(0,l.default)(_).forEach(function(m){b["x-oss-meta-"+m]=_[m]})},v._deleteFileSafe=function(_){return function(b){u.exists(_,function(m){m?u.unlink(_,function(g){g&&d("unlink %j error: %s",_,g),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 O(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 c=new n(t),y=(0,s.default)(c),v=(0,s.default)((0,a.default)(c));y.concat(v).forEach(function(_){l(c[_])?this[_]=f.wrap(c[_]).bind(c):this[_]=c[_]},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"),a=O(d),u=w("babel-runtime/core-js/object/keys"),s=O(u),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(O){"use strict";function T(a){return a&&a.__esModule?a:{default:a}}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(a,u){if(a.headers=a.headers||{},!Object.prototype.hasOwnProperty.call(a.headers,"x-oss-callback")&&u.callback){var s={callbackUrl:encodeURI(u.callback.url),callbackBody:u.callback.body};u.callback.host&&(s.callbackHost=u.callback.host),u.callback.contentType&&(s.callbackBodyType=u.callback.contentType);var f=new O((0,d.default)(s)).toString("base64");if(a.headers["x-oss-callback"]=f,u.callback.customValue){var i={};(0,p.default)(u.callback.customValue).forEach(function(n){i["x:"+n]=u.callback.customValue[n]}),a.headers["x-oss-callback-var"]=new O((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 O=w("babel-runtime/regenerator"),T=function(d){return d&&d.__esModule?d:{default:d}}(O),l=w("copy-to"),p=w("./callback"),h=S;h.listUploads=T.default.mark(function d(a,u){var s,f,i,n;return T.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return u=u||{},s={},l(u).to(s),s.subres="uploads",f=this._objectRequestParams("GET","",s),f.query=a,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(c){return{name:c.Key,uploadId:c.UploadId,initiated:c.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(a,u,s,f){var i,n,t;return T.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return f=f||{},i={},l(f).to(i),i.subres={uploadId:u},n=this._objectRequestParams("GET",a,i),n.query=s,n.xmlResponse=!0,n.successStatuses=[200],c.next=10,this.request(n);case 10:return t=c.sent,c.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 c.stop()}},d,this)}),h.abortMultipartUpload=T.default.mark(function d(a,u,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:u},i=this._objectRequestParams("DELETE",a,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(a,u){var s,f,i;return T.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return u=u||{},s={},l(u).to(s),s.headers=s.headers||{},this._convertMetaToHeaders(u.meta,s.headers),s.subres="uploads",f=this._objectRequestParams("POST",a,s),f.mime=u.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(a,u,s,f,i,n,t){var c;return T.default.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c={stream:this._createStream(f,i,n),size:n-i},y.next=3,this._uploadPart(a,u,s,c,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(a,u,s,f){var i,n,t,c,y,v,_,b;return T.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:for(i=s.concat().sort(function(g,E){return g.number-E.number}).filter(function(g,E,o){return!E||g.number!==o[E-1].number}),n=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,t=0;t<i.length;t++)c=i[t],n+=`<Part>
|
|
|
`,n+="<PartNumber>"+c.number+`</PartNumber>
|
|
|
`,n+="<ETag>"+c.etag+`</ETag>
|
|
|
`,n+=`</Part>
|
|
|
`;return n+="</CompleteMultipartUpload>",f=f||{},y={},l(f).to(y),y.subres={uploadId:u},v=this._objectRequestParams("POST",a,y),p.encodeCallback(v,y),v.mime="xml",v.content=n,v.headers&&v.headers["x-oss-callback"]||(v.xmlResponse=!0),v.successStatuses=[200],m.next=16,this.request(v);case 16:return _=m.sent,b={res:_.res,bucket:v.bucket,name:a,etag:_.res.headers.etag},v.headers&&v.headers["x-oss-callback"]&&(b.data=JSON.parse(_.data.toString())),m.abrupt("return",b);case 20:case"end":return m.stop()}},d,this)}),h._uploadPart=T.default.mark(function d(a,u,s,f,i){var n,t,c;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:u},t=this._objectRequestParams("PUT",a,n),t.mime=n.mime,t.stream=f.stream,t.successStatuses=[200],y.next=11,this.request(t);case 11:return c=y.sent,f.stream=null,t.stream=null,y.abrupt("return",{name:a,etag:c.res.headers.etag,res:c.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(O){"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),a=w("./../../shims/crypto/crypto.js"),u=w("is-type-of");S.buildCanonicalizedResource=function(s,f){var i=""+s,n="?";if(u.string(f)&&f.trim()!=="")i+=n+f;else if(u.array(f))f.sort(),i+=n+f.join("&");else if(f){var t=function(y,v){return y[0]>v[0]?1:y[0]<v[0]?-1:0},c=function(y){i+=n+y,f[y]&&(i+="="+f[y]),n="&"};(0,d.default)(f).sort(t).forEach(c)}return i},S.buildCanonicalString=function(s,f,i,n){i=i||{};var t=i.headers||{},c=[],y={},v=[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(_){c.push(_+":"+y[_])}),v=v.concat(c),v.push(this.buildCanonicalizedResource(f,i.parameters)),v.join(`
|
|
|
`)},S.computeSignature=function(s,f){return a.createHmac("sha1",s).update(new O(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={},c={};if(f.process&&(c["x-oss-process"]=f.process),f.response&&(0,d.default)(f.response).forEach(function(b){var m="response-"+b.toLowerCase();c[m]=f.response[b]}),(0,d.default)(f).forEach(function(b){var m=b.toLowerCase(),g=f[b];m.indexOf("x-oss-")===0?t[m]=g:m.indexOf("content-md5")===0||m.indexOf("content-type")===0?t[b]=g:m!=="expires"&&m!=="response"&&m!=="process"&&m!=="method"&&(c[m]=g)}),Object.prototype.hasOwnProperty.call(f,"security-token")&&(c["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),c.callback=new O((0,p.default)(y)).toString("base64"),f.callback.customValue){var v={};(0,d.default)(f.callback.customValue).forEach(function(b){v["x:"+b]=f.callback.customValue[b]}),c["callback-var"]=new O((0,p.default)(v)).toString("base64")}}var _=this.buildCanonicalString(f.method,i,{headers:t,parameters:c},n.toString());return{Signature:this.computeSignature(s,_),subResource:c}}}).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 O=w("babel-runtime/regenerator"),T=function(a){return a&&a.__esModule?a:{default:a}}(O),l=w("co"),p=w("co-priority-queue"),h=w("any-promise"),d=S;d._thunkPool=function(a,u){function s(c,y){++n===c.length&&y(t)}function f(c,y){function v(){var o;return T.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:o=void 0;case 1:if(i.isCancel()){x.next=9;break}return x.next=4,m.next();case 4:return o=x.sent,x.next=7,o();case 7:x.next=1;break;case 9:g+=1,g===c&&(m.fns=[],m.buffer=[],y(t));case 11:case"end":return x.stop()}},b,this)}function _(o){console.error(o.stack)}for(var b=T.default.mark(v),m=new p,g=0,E=0;E<c;E++)l(v).catch(_);return function(o,x){return function(C){m.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=C,D.next=4,o;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),C(D.t2);case 11:case"end":return D.stop()}},A,this,[[0,8]])}),x)}}}var i=this,n=0,t=[];return new h(function(c){function y(g){return T.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,b(a[g]);case 2:s(a,c);case 3:case"end":return E.stop()}},_,this)}function v(g){t.push(g),s(a,c)}for(var _=T.default.mark(y),b=new f(u,c),m=0;m<a.length;m++)l(y(m)).catch(v)})},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(O){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(O)||l.test(O)}},{}],12:[function(w,P,S){function O(){}P.exports=O,P.exports.HttpsAgent=O},{}],13:[function(w,P,S){P.exports=w("./register")().Promise},{"./register":15}],14:[function(w,P,S){"use strict";var O=null;P.exports=function(T,l){return function(p,h){p=p||null,h=h||{};var d=h.global!==!1;if(O===null&&d&&(O=T["@@any-promise/REGISTRATION"]||null),O!==null&&p!==null&&O.implementation!==p)throw new Error('any-promise already defined as "'+O.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return O===null&&(O=p!==null&&h.Promise!==void 0?{Promise:h.Promise,implementation:p}:l(p),d&&(T["@@any-promise/REGISTRATION"]=O)),O}}},{}],15:[function(w,P,S){"use strict";function O(){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,O)},{"./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(O,T){if(!(O instanceof T))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(w,P,S){"use strict";S.__esModule=!0;var O=w("../core-js/object/define-property"),T=function(l){return l&&l.__esModule?l:{default:l}}(O);S.default=function(){function l(p,h){for(var d=0;d<h.length;d++){var a=h[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),(0,T.default)(p,a.key,a)}}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 O(a){return a&&a.__esModule?a:{default:a}}S.__esModule=!0;var T=w("../core-js/symbol/iterator"),l=O(T),p=w("../core-js/symbol"),h=O(p),d=typeof h.default=="function"&&typeof l.default=="symbol"?function(a){return typeof a}:function(a){return a&&typeof h.default=="function"&&a.constructor===h.default&&a!==h.default.prototype?"symbol":typeof a};S.default=typeof h.default=="function"&&d(l.default)==="symbol"?function(a){return a===void 0?"undefined":d(a)}:function(a){return a&&typeof h.default=="function"&&a.constructor===h.default&&a!==h.default.prototype?"symbol":a===void 0?"undefined":d(a)}},{"../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 O(c){var y=c.length;if(y%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=c.indexOf("=");return v===-1&&(v=y),[v,v===y?0:4-v%4]}function T(c){var y=O(c),v=y[0],_=y[1];return 3*(v+_)/4-_}function l(c,y,v){return 3*(y+v)/4-v}function p(c){for(var y,v=O(c),_=v[0],b=v[1],m=new f(l(c,_,b)),g=0,E=b>0?_-4:_,o=0;o<E;o+=4)y=s[c.charCodeAt(o)]<<18|s[c.charCodeAt(o+1)]<<12|s[c.charCodeAt(o+2)]<<6|s[c.charCodeAt(o+3)],m[g++]=y>>16&255,m[g++]=y>>8&255,m[g++]=255&y;return b===2&&(y=s[c.charCodeAt(o)]<<2|s[c.charCodeAt(o+1)]>>4,m[g++]=255&y),b===1&&(y=s[c.charCodeAt(o)]<<10|s[c.charCodeAt(o+1)]<<4|s[c.charCodeAt(o+2)]>>2,m[g++]=y>>8&255,m[g++]=255&y),m}function h(c){return u[c>>18&63]+u[c>>12&63]+u[c>>6&63]+u[63&c]}function d(c,y,v){for(var _,b=[],m=y;m<v;m+=3)_=(c[m]<<16&16711680)+(c[m+1]<<8&65280)+(255&c[m+2]),b.push(h(_));return b.join("")}function a(c){for(var y,v=c.length,_=v%3,b=[],m=0,g=v-_;m<g;m+=16383)b.push(d(c,m,m+16383>g?g:m+16383));return _===1?(y=c[v-1],b.push(u[y>>2]+u[y<<4&63]+"==")):_===2&&(y=(c[v-2]<<8)+c[v-1],b.push(u[y>>10]+u[y>>4&63]+u[y<<2&63]+"=")),b.join("")}S.byteLength=T,S.toByteArray=p,S.fromByteArray=a;for(var u=[],s=[],f=typeof Uint8Array!="undefined"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,t=i.length;n<t;++n)u[n]=i[n],s[i.charCodeAt(n)]=n;s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],35:[function(w,P,S){!function(O,T,l){P!==void 0&&P.exports?P.exports=l():typeof U=="function"&&U.amd?U("bowser",l):O.bowser=l()}(this,0,function(){function O(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(),c=/like android/i.test(s),y=!c&&/android/i.test(s),v=/nexus\s*[0-6]\s*/i.test(s),_=!v&&/nexus\s*[0-9]+/i.test(s),b=/CrOS/.test(s),m=/silk/i.test(s),g=/sailfish/i.test(s),E=/tizen/i.test(s),o=/(web|hpw)os/i.test(s),x=/windows phone/i.test(s),C=(/SamsungBrowser/i.test(s),!x&&/windows/i.test(s)),A=!t&&!m&&/macintosh/i.test(s),D=!y&&!g&&!E&&!o&&/linux/i.test(s),I=i(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),F=f(/version\/(\d+(\.\d+)?)/i),H=/tablet/i.test(s)&&!/tablet pc/i.test(s),te=!H&&/[^-]mobi/i.test(s),j=/xbox/i.test(s);/opera/i.test(s)?n={name:"Opera",opera:a,version:F||f(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(s)?n={name:"Opera",opera:a,version:f(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||F}:/SamsungBrowser/i.test(s)?n={name:"Samsung Internet for Android",samsungBrowser:a,version:F||f(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(s)?n={name:"Opera Coast",coast:a,version:F||f(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(s)?n={name:"Yandex Browser",yandexbrowser:a,version:F||f(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(s)?n={name:"UC Browser",ucbrowser:a,version:f(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(s)?n={name:"Maxthon",maxthon:a,version:f(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(s)?n={name:"Epiphany",epiphany:a,version:f(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(s)?n={name:"Puffin",puffin:a,version:f(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(s)?n={name:"Sleipnir",sleipnir:a,version:f(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(s)?n={name:"K-Meleon",kMeleon:a,version:f(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:x?(n={name:"Windows Phone",osname:"Windows Phone",windowsphone:a},I?(n.msedge=a,n.version=I):(n.msie=a,n.version=f(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(s)?n={name:"Internet Explorer",msie:a,version:f(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:b?n={name:"Chrome",osname:"Chrome OS",chromeos:a,chromeBook:a,chrome:a,version:f(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(s)?n={name:"Microsoft Edge",msedge:a,version:I}:/vivaldi/i.test(s)?n={name:"Vivaldi",vivaldi:a,version:f(/vivaldi\/(\d+(\.\d+)?)/i)||F}:g?n={name:"Sailfish",osname:"Sailfish OS",sailfish:a,version:f(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(s)?n={name:"SeaMonkey",seamonkey:a,version:f(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(s)?(n={name:"Firefox",firefox:a,version:f(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(s)&&(n.firefoxos=a,n.osname="Firefox OS")):m?n={name:"Amazon Silk",silk:a,version:f(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(s)?n={name:"PhantomJS",phantom:a,version:f(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(s)?n={name:"SlimerJS",slimer:a,version:f(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(s)||/rim\stablet/i.test(s)?n={name:"BlackBerry",osname:"BlackBerry OS",blackberry:a,version:F||f(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:o?(n={name:"WebOS",osname:"WebOS",webos:a,version:F||f(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(s)&&(n.touchpad=a)):/bada/i.test(s)?n={name:"Bada",osname:"Bada",bada:a,version:f(/dolfin\/(\d+(\.\d+)?)/i)}:E?n={name:"Tizen",osname:"Tizen",tizen:a,version:f(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||F}:/qupzilla/i.test(s)?n={name:"QupZilla",qupzilla:a,version:f(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||F}:/chromium/i.test(s)?n={name:"Chromium",chromium:a,version:f(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||F}:/chrome|crios|crmo/i.test(s)?n={name:"Chrome",chrome:a,version:f(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:y?n={name:"Android",version:F}:/safari|applewebkit/i.test(s)?(n={name:"Safari",safari:a},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:a,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=a):(n.name=n.name||"Webkit",n.webkit=a),!n.version&&F&&(n.version=F)):!n.opera&&/gecko\//i.test(s)&&(n.name=n.name||"Gecko",n.gecko=a,n.version=n.version||f(/gecko\/(\d+(\.\d+)?)/i)),n.windowsphone||!y&&!n.silk?!n.windowsphone&&t?(n[t]=a,n.ios=a,n.osname="iOS"):A?(n.mac=a,n.osname="macOS"):j?(n.xbox=a,n.osname="Xbox"):C?(n.windows=a,n.osname="Windows"):D&&(n.linux=a,n.osname="Linux"):(n.android=a,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 H||_||t=="ipad"||y&&(X==3||X>=4&&!te)||n.silk?n.tablet=a:(te||t=="iphone"||t=="ipod"||y||v||n.blackberry||n.webos||n.bada)&&(n.mobile=a),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=a: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=a:n.x=a,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(c){return new Array(20-c.length).join("0")+c}).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=u;typeof f=="string"&&(i=f,f=void 0),f===void 0&&(f=!1),i&&(n=O(i));var t=""+n.version;for(var c in s)if(s.hasOwnProperty(c)&&n[c]){if(typeof s[c]!="string")throw new Error("Browser version in the minVersion map should be a string: "+c+": "+String(s));return p([t,s[c]])<0}return f}function d(s,f,i){return!h(s,f,i)}var a=!0,u=O(typeof navigator!="undefined"&&navigator.userAgent||"");return u.test=function(s){for(var f=0;f<s.length;++f){var i=s[f];if(typeof i=="string"&&i in u)return!0}return!1},u.isUnsupportedBrowser=h,u.compareVersions=p,u.check=d,u._detect=O,u.detect=O,u})},{}],36:[function(w,P,S){},{}],37:[function(w,P,S){function O(u){if(u&&!d(u))throw new Error("Unknown encoding: "+u)}function T(u){return u.toString(this.encoding)}function l(u){this.charReceived=u.length%2,this.charLength=this.charReceived?2:0}function p(u){this.charReceived=u.length%3,this.charLength=this.charReceived?3:0}var h=w("buffer").Buffer,d=h.isEncoding||function(u){switch(u&&u.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}},a=S.StringDecoder=function(u){switch(this.encoding=(u||"utf8").toLowerCase().replace(/[-_]/,""),O(u),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};a.prototype.write=function(u){for(var s="";this.charLength;){var f=u.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:u.length;if(u.copy(this.charBuffer,this.charReceived,0,f),this.charReceived+=f,this.charReceived<this.charLength)return"";u=u.slice(f,u.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,u.length===0)return s;break}this.charLength+=this.surrogateSize,s=""}this.detectIncompleteChar(u);var i=u.length;this.charLength&&(u.copy(this.charBuffer,0,u.length-this.charReceived,i),i-=this.charReceived),s+=u.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),u.copy(this.charBuffer,0,0,t),s.substring(0,i)}return s},a.prototype.detectIncompleteChar=function(u){for(var s=u.length>=3?3:u.length;s>0;s--){var f=u[u.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},a.prototype.end=function(u){var s="";if(u&&u.length&&(s=this.write(u)),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(O){"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 u(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 a(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 u(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"||he(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 c(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 Ce(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*$;case"hex":return $>>>1;case"base64":return ke(M).length;default:if(V)return Ce(M).length;N=(""+N).toLowerCase(),V=!0}}function v(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 H(this,N,$);case"latin1":case"binary":return te(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:m(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,$):m(M,[N],$,V,Y);throw new TypeError("val must be string, number or Buffer")}function m(M,N,$,V,Y){function me(Ke,we){return Re===1?Ke[we]:Ke.readUInt16BE(we*Re)}var Re=1,rt=M.length,De=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,De/=2,$/=2}var Me;if(Y){var Xe=-1;for(Me=$;Me<rt;Me++)if(me(M,Me)===me(N,Xe===-1?0:Me-Xe)){if(Xe===-1&&(Xe=Me),Me-Xe+1===De)return Xe*Re}else Xe!==-1&&(Me-=Me-Xe),Xe=-1}else for($+De>rt&&($=rt-De),Me=$;Me>=0;Me--){for(var tt=!0,Ve=0;Ve<De;Ve++)if(me(M,Me+Ve)!==me(N,Ve)){tt=!1;break}if(tt)return Me}return-1}function g(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 Ne(Ce(N,M.length-$),M,$,V)}function o(M,N,$,V){return Ne(Be(N),M,$,V)}function x(M,N,$,V){return o(M,N,$,V)}function C(M,N,$,V){return Ne(ke(N),M,$,V)}function A(M,N,$,V){return Ne(Pe(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 De,Me,Xe,tt;switch(rt){case 1:me<128&&(Re=me);break;case 2:De=M[Y+1],(192&De)==128&&(tt=(31&me)<<6|63&De)>127&&(Re=tt);break;case 3:De=M[Y+1],Me=M[Y+2],(192&De)==128&&(192&Me)==128&&(tt=(15&me)<<12|(63&De)<<6|63&Me)>2047&&(tt<55296||tt>57343)&&(Re=tt);break;case 4:De=M[Y+1],Me=M[Y+2],Xe=M[Y+3],(192&De)==128&&(192&Me)==128&&(192&Xe)==128&&(tt=(15&me)<<18|(63&De)<<12|(63&Me)<<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 H(M,N,$){var V="";$=Math.min(M.length,$);for(var Y=N;Y<$;++Y)V+=String.fromCharCode(127&M[Y]);return V}function te(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),Ie.write(M,N,$,V,23,4),$+4}function Ee(M,N,$,V,Y){return Y||ie(M,N,$,8,17976931348623157e292,-17976931348623157e292),Ie.write(M,N,$,V,52,8),$+8}function ye(M){if(M=Le(M).replace(ee,""),M.length<2)return"";for(;M.length%4!=0;)M+="=";return M}function Le(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 Ce(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 Be(M){for(var N=[],$=0;$<M.length;++$)N.push(255&M.charCodeAt($));return N}function Pe(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 ke(M){return ue.toByteArray(ye(M))}function Ne(M,N,$,V){for(var Y=0;Y<V&&!(Y+$>=N.length||Y>=M.length);++Y)N[Y+$]=M[Y];return Y}function he(M){return M!==M}var ue=w("base64-js"),Ie=w("ieee754"),Ue=w("isarray");S.Buffer=p,S.SlowBuffer=c,S.INSPECT_MAX_BYTES=50,p.TYPED_ARRAY_SUPPORT=O.TYPED_ARRAY_SUPPORT!==void 0?O.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 a(null,M,N,$)},p.allocUnsafe=function(M){return u(null,M)},p.allocUnsafeSlow=function(M){return u(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):v.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),De=this.slice(V,Y),Me=M.slice(N,$),Xe=0;Xe<rt;++Xe)if(De[Xe]!==Me[Xe]){me=De[Xe],Re=Me[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 g(this,M,N,$);case"utf8":case"utf-8":return E(this,M,N,$);case"ascii":return o(this,M,N,$);case"latin1":case"binary":return x(this,M,N,$);case"base64":return C(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),Ie.read(this,M,!0,23,4)},p.prototype.readFloatBE=function(M,N){return N||X(M,4,this.length),Ie.read(this,M,!1,23,4)},p.prototype.readDoubleLE=function(M,N){return N||X(M,8,this.length),Ie.read(this,M,!0,52,8)},p.prototype.readDoubleBE=function(M,N){return N||X(M,8,this.length),Ie.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 Ee(this,M,N,!0,$)},p.prototype.writeDoubleBE=function(M,N,$){return Ee(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:Ce(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 O=function(){this.buffer=[],this.fns=[]};O.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(a){return a.priority});this.buffer.splice(d,0,h)},O.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,a=l?l.length:d;d<a;){var u=d+a>>>1;h(l[u])<p?d=u+1:a=u}return d};P.exports=O},{}],41:[function(w,P,S){function O(i){var n=this,t=f.call(arguments,1);return new Promise(function(c,y){function v(m){var g;try{g=i.next(m)}catch(E){return y(E)}b(g)}function _(m){var g;try{g=i.throw(m)}catch(E){return y(E)}b(g)}function b(m){if(m.done)return c(m.value);var g=T.call(n,m.value);return g&&d(g)?g.then(v,_):_(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(m.value)+'"'))}if(typeof i=="function"&&(i=i.apply(n,t)),!i||typeof i.next!="function")return c(i);v()})}function T(i){return i&&(d(i)?i:u(i)||a(i)?O.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,c){i.call(n,function(y,v){if(y)return c(y);arguments.length>2&&(v=f.call(arguments,1)),t(v)})})}function p(i){return Promise.all(i.map(T,this))}function h(i){for(var n=new i.constructor,t=Object.keys(i),c=[],y=0;y<t.length;y++){var v=t[y],_=T.call(this,i[v]);_&&d(_)?function(b,m){n[m]=void 0,c.push(b.then(function(g){n[m]=g}))}(_,v):n[v]=i[v]}return Promise.all(c).then(function(){return n})}function d(i){return typeof i.then=="function"}function a(i){return typeof i.next=="function"&&typeof i.throw=="function"}function u(i){var n=i.constructor;return!!n&&(n.name==="GeneratorFunction"||n.displayName==="GeneratorFunction"||a(n.prototype))}function s(i){return Object==i.constructor}var f=Array.prototype.slice;P.exports=O.default=O.co=O,O.wrap=function(i){function n(){return O.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 O(p,h){if(!(this instanceof O))return new O(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=O,O.prototype.withAccess=function(p){return this._withAccess=p!==!1,this},O.prototype.pick=function(p){return Array.isArray(p)||(p=l.call(arguments)),p.length&&(this.keys=p),this},O.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++)a=h[d],p[a]===void 0&&(p[a]=this.src[a]);return p}for(var d=0;d<h.length;d++){var a=h[d];if(T(p,a)){var u=this.src.__lookupGetter__(a),s=this.src.__lookupSetter__(a);u&&p.__defineGetter__(a,u),s&&p.__defineSetter__(a,s),u||s||(p[a]=this.src[a])}}return p},O.prototype.toCover=function(p){for(var h=this.keys||Object.keys(this.src),d=0;d<h.length;d++){var a=h[d];delete p[a];var u=this.src.__lookupGetter__(a),s=this.src.__lookupSetter__(a);u&&p.__defineGetter__(a,u),s&&p.__defineSetter__(a,s),u||s||(p[a]=this.src[a])}},O.prototype.override=O.prototype.toCover,O.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 O=w("../../modules/_core"),T=O.JSON||(O.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 O=w("../../modules/_core").Object;P.exports=function(T,l){return O.create(T,l)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(w,P,S){w("../../modules/es6.object.define-property");var O=w("../../modules/_core").Object;P.exports=function(T,l,p){return O.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 O=w("../../modules/_core").Object;P.exports=function(T){return O.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(O){if(typeof O!="function")throw TypeError(O+" is not a function!");return O}},{}],59:[function(w,P,S){P.exports=function(){}},{}],60:[function(w,P,S){P.exports=function(O,T,l,p){if(!(O instanceof T)||p!==void 0&&p in O)throw TypeError(l+": incorrect invocation!");return O}},{}],61:[function(w,P,S){var O=w("./_is-object");P.exports=function(T){if(!O(T))throw TypeError(T+" is not an object!");return T}},{"./_is-object":85}],62:[function(w,P,S){var O=w("./_to-iobject"),T=w("./_to-length"),l=w("./_to-absolute-index");P.exports=function(p){return function(h,d,a){var u,s=O(h),f=T(s.length),i=l(a,f);if(p&&d!=d){for(;f>i;)if((u=s[i++])!=u)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 O=w("./_cof"),T=w("./_wks")("toStringTag"),l=O(function(){return arguments}())=="Arguments",p=function(h,d){try{return h[d]}catch(a){}};P.exports=function(h){var d,a,u;return h===void 0?"Undefined":h===null?"Null":typeof(a=p(d=Object(h),T))=="string"?a:l?O(d):(u=O(d))=="Object"&&typeof d.callee=="function"?"Arguments":u}},{"./_cof":64,"./_wks":131}],64:[function(w,P,S){var O={}.toString;P.exports=function(T){return O.call(T).slice(8,-1)}},{}],65:[function(w,P,S){var O=P.exports={version:"2.5.7"};typeof __e=="number"&&(__e=O)},{}],66:[function(w,P,S){"use strict";var O=w("./_object-dp"),T=w("./_property-desc");P.exports=function(l,p,h){p in l?O.f(l,p,T(0,h)):l[p]=h}},{"./_object-dp":98,"./_property-desc":111}],67:[function(w,P,S){var O=w("./_a-function");P.exports=function(T,l,p){if(O(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,a){return T.call(l,h,d,a)}}return function(){return T.apply(l,arguments)}}},{"./_a-function":58}],68:[function(w,P,S){P.exports=function(O){if(O==null)throw TypeError("Can't call method on "+O);return O}},{}],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 O=w("./_is-object"),T=w("./_global").document,l=O(T)&&O(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 O=w("./_object-keys"),T=w("./_object-gops"),l=w("./_object-pie");P.exports=function(p){var h=O(p),d=T.f;if(d)for(var a,u=d(p),s=l.f,f=0;u.length>f;)s.call(p,a=u[f++])&&h.push(a);return h}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(w,P,S){var O=w("./_global"),T=w("./_core"),l=w("./_ctx"),p=w("./_hide"),h=w("./_has"),d=function(a,u,s){var f,i,n,t=a&d.F,c=a&d.G,y=a&d.S,v=a&d.P,_=a&d.B,b=a&d.W,m=c?T:T[u]||(T[u]={}),g=m.prototype,E=c?O:y?O[u]:(O[u]||{}).prototype;c&&(s=u);for(f in s)(i=!t&&E&&E[f]!==void 0)&&h(m,f)||(n=i?E[f]:s[f],m[f]=c&&typeof E[f]!="function"?s[f]:_&&i?l(n,O):b&&E[f]==n?function(o){var x=function(C,A,D){if(this instanceof o){switch(arguments.length){case 0:return new o;case 1:return new o(C);case 2:return new o(C,A)}return new o(C,A,D)}return o.apply(this,arguments)};return x.prototype=o.prototype,x}(n):v&&typeof n=="function"?l(Function.call,n):n,v&&((m.virtual||(m.virtual={}))[f]=n,a&d.R&&g&&!g[f]&&p(g,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(O){try{return!!O()}catch(T){return!0}}},{}],75:[function(w,P,S){var O=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"),a={},u={},S=P.exports=function(s,f,i,n,t){var c,y,v,_,b=t?function(){return s}:d(s),m=O(i,n,f?2:1),g=0;if(typeof b!="function")throw TypeError(s+" is not iterable!");if(l(b)){for(c=h(s.length);c>g;g++)if((_=f?m(p(y=s[g])[0],y[1]):m(s[g]))===a||_===u)return _}else for(v=b.call(s);!(y=v.next()).done;)if((_=T(v,m,y.value,f))===a||_===u)return _};S.BREAK=a,S.RETURN=u},{"./_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 O=P.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=O)},{}],77:[function(w,P,S){var O={}.hasOwnProperty;P.exports=function(T,l){return O.call(T,l)}},{}],78:[function(w,P,S){var O=w("./_object-dp"),T=w("./_property-desc");P.exports=w("./_descriptors")?function(l,p,h){return O.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 O=w("./_global").document;P.exports=O&&O.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(O,T,l){var p=l===void 0;switch(T.length){case 0:return p?O():O.call(l);case 1:return p?O(T[0]):O.call(l,T[0]);case 2:return p?O(T[0],T[1]):O.call(l,T[0],T[1]);case 3:return p?O(T[0],T[1],T[2]):O.call(l,T[0],T[1],T[2]);case 4:return p?O(T[0],T[1],T[2],T[3]):O.call(l,T[0],T[1],T[2],T[3])}return O.apply(l,T)}},{}],82:[function(w,P,S){var O=w("./_cof");P.exports=Object("z").propertyIsEnumerable(0)?Object:function(T){return O(T)=="String"?T.split(""):Object(T)}},{"./_cof":64}],83:[function(w,P,S){var O=w("./_iterators"),T=w("./_wks")("iterator"),l=Array.prototype;P.exports=function(p){return p!==void 0&&(O.Array===p||l[T]===p)}},{"./_iterators":91,"./_wks":131}],84:[function(w,P,S){var O=w("./_cof");P.exports=Array.isArray||function(T){return O(T)=="Array"}},{"./_cof":64}],85:[function(w,P,S){P.exports=function(O){return typeof O=="object"?O!==null:typeof O=="function"}},{}],86:[function(w,P,S){var O=w("./_an-object");P.exports=function(T,l,p,h){try{return h?l(O(p)[0],p[1]):l(p)}catch(a){var d=T.return;throw d!==void 0&&O(d.call(T)),a}}},{"./_an-object":61}],87:[function(w,P,S){"use strict";var O=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,a){h.prototype=O(p,{next:T(1,a)}),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 O=w("./_library"),T=w("./_export"),l=w("./_redefine"),p=w("./_hide"),h=w("./_iterators"),d=w("./_iter-create"),a=w("./_set-to-string-tag"),u=w("./_object-gpo"),s=w("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),i=function(){return this};P.exports=function(n,t,c,y,v,_,b){d(c,t,y);var m,g,E,o=function(j){if(!f&&j in D)return D[j];switch(j){case"keys":case"values":return function(){return new c(this,j)}}return function(){return new c(this,j)}},x=t+" Iterator",C=v=="values",A=!1,D=n.prototype,I=D[s]||D["@@iterator"]||v&&D[v],F=I||o(v),H=v?C?o("entries"):F:void 0,te=t=="Array"&&D.entries||I;if(te&&(E=u(te.call(new n)))!==Object.prototype&&E.next&&(a(E,x,!0),O||typeof E[s]=="function"||p(E,s,i)),C&&I&&I.name!=="values"&&(A=!0,F=function(){return I.call(this)}),O&&!b||!f&&!A&&D[s]||p(D,s,F),h[t]=F,h[x]=i,v)if(m={values:C?F:o("values"),keys:_?F:o("keys"),entries:H},b)for(g in m)g in D||l(D,g,m[g]);else T(T.P+T.F*(f||A),t,m);return m}},{"./_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 O=w("./_wks")("iterator"),T=!1;try{var l=[7][O]();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 a=[7],u=a[O]();u.next=function(){return{done:d=!0}},a[O]=function(){return u},p(a)}catch(s){}return d}},{"./_wks":131}],90:[function(w,P,S){P.exports=function(O,T){return{value:T,done:!!O}}},{}],91:[function(w,P,S){P.exports={}},{}],92:[function(w,P,S){P.exports=!0},{}],93:[function(w,P,S){var O=w("./_uid")("meta"),T=w("./_is-object"),l=w("./_has"),p=w("./_object-dp").f,h=0,d=Object.isExtensible||function(){return!0},a=!w("./_fails")(function(){return d(Object.preventExtensions({}))}),u=function(t){p(t,O,{value:{i:"O"+ ++h,w:{}}})},s=function(t,c){if(!T(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!l(t,O)){if(!d(t))return"F";if(!c)return"E";u(t)}return t[O].i},f=function(t,c){if(!l(t,O)){if(!d(t))return!0;if(!c)return!1;u(t)}return t[O].w},i=function(t){return a&&n.NEED&&d(t)&&!l(t,O)&&u(t),t},n=P.exports={KEY:O,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 O=w("./_global"),T=w("./_task").set,l=O.MutationObserver||O.WebKitMutationObserver,p=O.process,h=O.Promise,d=w("./_cof")(p)=="process";P.exports=function(){var a,u,s,f=function(){var c,y;for(d&&(c=p.domain)&&c.exit();a;){y=a.fn,a=a.next;try{y()}catch(v){throw a?s():u=void 0,v}}u=void 0,c&&c.enter()};if(d)s=function(){p.nextTick(f)};else if(!l||O.navigator&&O.navigator.standalone)if(h&&h.resolve){var i=h.resolve(void 0);s=function(){i.then(f)}}else s=function(){T.call(O,f)};else{var n=!0,t=document.createTextNode("");new l(f).observe(t,{characterData:!0}),s=function(){t.data=n=!n}}return function(c){var y={fn:c,next:void 0};u&&(u.next=y),a||(a=y,s()),u=y}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(w,P,S){"use strict";function O(l){var p,h;this.promise=new l(function(d,a){if(p!==void 0||h!==void 0)throw TypeError("Bad Promise constructor");p=d,h=a}),this.resolve=T(p),this.reject=T(h)}var T=w("./_a-function");P.exports.f=function(l){return new O(l)}},{"./_a-function":58}],96:[function(w,P,S){"use strict";var O=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 a={},u={},s=Symbol(),f="abcdefghijklmnopqrst";return a[s]=7,f.split("").forEach(function(i){u[i]=i}),d({},a)[s]!=7||Object.keys(d({},u)).join("")!=f})?function(a,u){for(var s=p(a),f=arguments.length,i=1,n=T.f,t=l.f;f>i;)for(var c,y=h(arguments[i++]),v=n?O(y).concat(n(y)):O(y),_=v.length,b=0;_>b;)t.call(y,c=v[b++])&&(s[c]=y[c]);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 O=w("./_an-object"),T=w("./_object-dps"),l=w("./_enum-bug-keys"),p=w("./_shared-key")("IE_PROTO"),h=function(){},d=function(){var a,u=w("./_dom-create")("iframe"),s=l.length;for(u.style.display="none",w("./_html").appendChild(u),u.src="javascript:",a=u.contentWindow.document,a.open(),a.write("<script>document.F=Object</script>"),a.close(),d=a.F;s--;)delete d.prototype[l[s]];return d()};P.exports=Object.create||function(a,u){var s;return a!==null?(h.prototype=O(a),s=new h,h.prototype=null,s[p]=a):s=d(),u===void 0?s:T(s,u)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(w,P,S){var O=w("./_an-object"),T=w("./_ie8-dom-define"),l=w("./_to-primitive"),p=Object.defineProperty;S.f=w("./_descriptors")?Object.defineProperty:function(h,d,a){if(O(h),d=l(d,!0),O(a),T)try{return p(h,d,a)}catch(u){}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(h[d]=a.value),h}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(w,P,S){var O=w("./_object-dp"),T=w("./_an-object"),l=w("./_object-keys");P.exports=w("./_descriptors")?Object.defineProperties:function(p,h){T(p);for(var d,a=l(h),u=a.length,s=0;u>s;)O.f(p,d=a[s++],h[d]);return p}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(w,P,S){var O=w("./_object-pie"),T=w("./_property-desc"),l=w("./_to-iobject"),p=w("./_to-primitive"),h=w("./_has"),d=w("./_ie8-dom-define"),a=Object.getOwnPropertyDescriptor;S.f=w("./_descriptors")?a:function(u,s){if(u=l(u),s=p(s,!0),d)try{return a(u,s)}catch(f){}if(h(u,s))return T(!O.f.call(u,s),u[s])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(w,P,S){var O=w("./_to-iobject"),T=w("./_object-gopn").f,l={}.toString,p=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(d){try{return T(d)}catch(a){return p.slice()}};P.exports.f=function(d){return p&&l.call(d)=="[object Window]"?h(d):T(O(d))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(w,P,S){var O=w("./_object-keys-internal"),T=w("./_enum-bug-keys").concat("length","prototype");S.f=Object.getOwnPropertyNames||function(l){return O(l,T)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(w,P,S){S.f=Object.getOwnPropertySymbols},{}],104:[function(w,P,S){var O=w("./_has"),T=w("./_to-object"),l=w("./_shared-key")("IE_PROTO"),p=Object.prototype;P.exports=Object.getPrototypeOf||function(h){return h=T(h),O(h,l)?h[l]:typeof h.constructor=="function"&&h instanceof h.constructor?h.constructor.prototype:h instanceof Object?p:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(w,P,S){var O=w("./_has"),T=w("./_to-iobject"),l=w("./_array-includes")(!1),p=w("./_shared-key")("IE_PROTO");P.exports=function(h,d){var a,u=T(h),s=0,f=[];for(a in u)a!=p&&O(u,a)&&f.push(a);for(;d.length>s;)O(u,a=d[s++])&&(~l(f,a)||f.push(a));return f}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(w,P,S){var O=w("./_object-keys-internal"),T=w("./_enum-bug-keys");P.exports=Object.keys||function(l){return O(l,T)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(w,P,S){S.f={}.propertyIsEnumerable},{}],108:[function(w,P,S){var O=w("./_export"),T=w("./_core"),l=w("./_fails");P.exports=function(p,h){var d=(T.Object||{})[p]||Object[p],a={};a[p]=h(d),O(O.S+O.F*l(function(){d(1)}),"Object",a)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(w,P,S){P.exports=function(O){try{return{e:!1,v:O()}}catch(T){return{e:!0,v:T}}}},{}],110:[function(w,P,S){var O=w("./_an-object"),T=w("./_is-object"),l=w("./_new-promise-capability");P.exports=function(p,h){if(O(p),T(h)&&h.constructor===p)return h;var d=l.f(p);return(0,d.resolve)(h),d.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(w,P,S){P.exports=function(O,T){return{enumerable:!(1&O),configurable:!(2&O),writable:!(4&O),value:T}}},{}],112:[function(w,P,S){var O=w("./_hide");P.exports=function(T,l,p){for(var h in l)p&&T[h]?T[h]=l[h]:O(T,h,l[h]);return T}},{"./_hide":78}],113:[function(w,P,S){P.exports=w("./_hide")},{"./_hide":78}],114:[function(w,P,S){"use strict";var O=w("./_global"),T=w("./_core"),l=w("./_object-dp"),p=w("./_descriptors"),h=w("./_wks")("species");P.exports=function(d){var a=typeof T[d]=="function"?T[d]:O[d];p&&a&&!a[h]&&l.f(a,h,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(w,P,S){var O=w("./_object-dp").f,T=w("./_has"),l=w("./_wks")("toStringTag");P.exports=function(p,h,d){p&&!T(p=d?p:p.prototype,l)&&O(p,l,{configurable:!0,value:h})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(w,P,S){var O=w("./_shared")("keys"),T=w("./_uid");P.exports=function(l){return O[l]||(O[l]=T(l))}},{"./_shared":117,"./_uid":127}],117:[function(w,P,S){var O=w("./_core"),T=w("./_global"),l=T["__core-js_shared__"]||(T["__core-js_shared__"]={});(P.exports=function(p,h){return l[p]||(l[p]=h!==void 0?h:{})})("versions",[]).push({version:O.version,mode:w("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(w,P,S){var O=w("./_an-object"),T=w("./_a-function"),l=w("./_wks")("species");P.exports=function(p,h){var d,a=O(p).constructor;return a===void 0||(d=O(a)[l])==null?h:T(d)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(w,P,S){var O=w("./_to-integer"),T=w("./_defined");P.exports=function(l){return function(p,h){var d,a,u=String(T(p)),s=O(h),f=u.length;return s<0||s>=f?l?"":void 0:(d=u.charCodeAt(s),d<55296||d>56319||s+1===f||(a=u.charCodeAt(s+1))<56320||a>57343?l?u.charAt(s):d:l?u.slice(s,s+2):a-56320+(d-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(w,P,S){var O,T,l,p=w("./_ctx"),h=w("./_invoke"),d=w("./_html"),a=w("./_dom-create"),u=w("./_global"),s=u.process,f=u.setImmediate,i=u.clearImmediate,n=u.MessageChannel,t=u.Dispatch,c=0,y={},v=function(){var b=+this;if(y.hasOwnProperty(b)){var m=y[b];delete y[b],m()}},_=function(b){v.call(b.data)};f&&i||(f=function(b){for(var m=[],g=1;arguments.length>g;)m.push(arguments[g++]);return y[++c]=function(){h(typeof b=="function"?b:Function(b),m)},O(c),c},i=function(b){delete y[b]},w("./_cof")(s)=="process"?O=function(b){s.nextTick(p(v,b,1))}:t&&t.now?O=function(b){t.now(p(v,b,1))}:n?(T=new n,l=T.port2,T.port1.onmessage=_,O=p(l.postMessage,l,1)):u.addEventListener&&typeof postMessage=="function"&&!u.importScripts?(O=function(b){u.postMessage(b+"","*")},u.addEventListener("message",_,!1)):O="onreadystatechange"in a("script")?function(b){d.appendChild(a("script")).onreadystatechange=function(){d.removeChild(this),v.call(b)}}:function(b){setTimeout(p(v,b,1),0)}),P.exports={set:f,clear:i}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(w,P,S){var O=w("./_to-integer"),T=Math.max,l=Math.min;P.exports=function(p,h){return p=O(p),p<0?T(p+h,0):l(p,h)}},{"./_to-integer":122}],122:[function(w,P,S){var O=Math.ceil,T=Math.floor;P.exports=function(l){return isNaN(l=+l)?0:(l>0?T:O)(l)}},{}],123:[function(w,P,S){var O=w("./_iobject"),T=w("./_defined");P.exports=function(l){return O(T(l))}},{"./_defined":68,"./_iobject":82}],124:[function(w,P,S){var O=w("./_to-integer"),T=Math.min;P.exports=function(l){return l>0?T(O(l),9007199254740991):0}},{"./_to-integer":122}],125:[function(w,P,S){var O=w("./_defined");P.exports=function(T){return Object(O(T))}},{"./_defined":68}],126:[function(w,P,S){var O=w("./_is-object");P.exports=function(T,l){if(!O(T))return T;var p,h;if(l&&typeof(p=T.toString)=="function"&&!O(h=p.call(T)))return h;if(typeof(p=T.valueOf)=="function"&&!O(h=p.call(T)))return h;if(!l&&typeof(p=T.toString)=="function"&&!O(h=p.call(T)))return h;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(w,P,S){var O=0,T=Math.random();P.exports=function(l){return"Symbol(".concat(l===void 0?"":l,")_",(++O+T).toString(36))}},{}],128:[function(w,P,S){var O=w("./_global"),T=O.navigator;P.exports=T&&T.userAgent||""},{"./_global":76}],129:[function(w,P,S){var O=w("./_global"),T=w("./_core"),l=w("./_library"),p=w("./_wks-ext"),h=w("./_object-dp").f;P.exports=function(d){var a=T.Symbol||(T.Symbol=l?{}:O.Symbol||{});d.charAt(0)=="_"||d in a||h(a,d,{value:p.f(d)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(w,P,S){S.f=w("./_wks")},{"./_wks":131}],131:[function(w,P,S){var O=w("./_shared")("wks"),T=w("./_uid"),l=w("./_global").Symbol,p=typeof l=="function";(P.exports=function(h){return O[h]||(O[h]=p&&l[h]||(p?l:T)("Symbol."+h))}).store=O},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(w,P,S){var O=w("./_classof"),T=w("./_wks")("iterator"),l=w("./_iterators");P.exports=w("./_core").getIteratorMethod=function(p){if(p!=null)return p[T]||p["@@iterator"]||l[O(p)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(w,P,S){"use strict";var O=w("./_ctx"),T=w("./_export"),l=w("./_to-object"),p=w("./_iter-call"),h=w("./_is-array-iter"),d=w("./_to-length"),a=w("./_create-property"),u=w("./core.get-iterator-method");T(T.S+T.F*!w("./_iter-detect")(function(s){Array.from(s)}),"Array",{from:function(s){var f,i,n,t,c=l(s),y=typeof this=="function"?this:Array,v=arguments.length,_=v>1?arguments[1]:void 0,b=_!==void 0,m=0,g=u(c);if(b&&(_=O(_,v>2?arguments[2]:void 0,2)),g==null||y==Array&&h(g))for(f=d(c.length),i=new y(f);f>m;m++)a(i,m,b?_(c[m],m):c[m]);else for(t=g.call(c),i=new y;!(n=t.next()).done;m++)a(i,m,b?p(t,_,[n.value,m],!0):n.value);return i.length=m,i}})},{"./_create-property":66,"./_ctx":67,"./_export":73,"./_is-array-iter":83,"./_iter-call":86,"./_iter-detect":89,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":132}],134:[function(w,P,S){"use strict";var O=w("./_add-to-unscopables"),T=w("./_iter-step"),l=w("./_iterators"),p=w("./_to-iobject");P.exports=w("./_iter-define")(Array,"Array",function(h,d){this._t=p(h),this._i=0,this._k=d},function(){var h=this._t,d=this._k,a=this._i++;return!h||a>=h.length?(this._t=void 0,T(1)):d=="keys"?T(0,a):d=="values"?T(0,h[a]):T(0,[a,h[a]])},"values"),l.Arguments=l.Array,O("keys"),O("values"),O("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(w,P,S){"use strict";var O=w("./_is-object"),T=w("./_object-gpo"),l=w("./_wks")("hasInstance"),p=Function.prototype;l in p||w("./_object-dp").f(p,l,{value:function(h){if(typeof this!="function"||!O(h))return!1;if(!O(this.prototype))return h instanceof this;for(;h=T(h);)if(this.prototype===h)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(w,P,S){var O=w("./_export");O(O.S+O.F,"Object",{assign:w("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(w,P,S){var O=w("./_export");O(O.S,"Object",{create:w("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(w,P,S){var O=w("./_export");O(O.S+O.F*!w("./_descriptors"),"Object",{defineProperty:w("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(w,P,S){w("./_object-sap")("getOwnPropertyNames",function(){return w("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(w,P,S){var O=w("./_to-object"),T=w("./_object-gpo");w("./_object-sap")("getPrototypeOf",function(){return function(l){return T(O(l))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(w,P,S){var O=w("./_to-object"),T=w("./_object-keys");w("./_object-sap")("keys",function(){return function(l){return T(O(l))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(w,P,S){arguments[4][36][0].apply(S,arguments)},{dup:36}],143:[function(w,P,S){"use strict";var O,T,l,p,h=w("./_library"),d=w("./_global"),a=w("./_ctx"),u=w("./_classof"),s=w("./_export"),f=w("./_is-object"),i=w("./_a-function"),n=w("./_an-instance"),t=w("./_for-of"),c=w("./_species-constructor"),y=w("./_task").set,v=w("./_microtask")(),_=w("./_new-promise-capability"),b=w("./_perform"),m=w("./_user-agent"),g=w("./_promise-resolve"),E=d.TypeError,o=d.process,x=o&&o.versions,C=x&&x.v8||"",A=d.Promise,D=u(o)=="process",I=function(){},F=T=_.f,H=!!function(){try{var ie=A.resolve(1),oe=(ie.constructor={})[w("./_wks")("species")]=function(Ee){Ee(I,I)};return(D||typeof PromiseRejectionEvent=="function")&&ie.then(I)instanceof oe&&C.indexOf("6.6")!==0&&m.indexOf("Chrome/66")===-1}catch(Ee){}}(),te=function(ie){var oe;return!(!f(ie)||typeof(oe=ie.then)!="function")&&oe},j=function(ie,oe){if(!ie._n){ie._n=!0;var Ee=ie._c;v(function(){for(var ye=ie._v,Le=ie._s==1,pe=0;Ee.length>pe;)!function(Ce){var Be,Pe,ke,Ne=Le?Ce.ok:Ce.fail,he=Ce.resolve,ue=Ce.reject,Ie=Ce.domain;try{Ne?(Le||(ie._h==2&&J(ie),ie._h=1),Ne===!0?Be=ye:(Ie&&Ie.enter(),Be=Ne(ye),Ie&&(Ie.exit(),ke=!0)),Be===Ce.promise?ue(E("Promise-chain cycle")):(Pe=te(Be))?Pe.call(Be,he,ue):he(Be)):ue(ye)}catch(Ue){Ie&&!ke&&Ie.exit(),ue(Ue)}}(Ee[pe++]);ie._c=[],ie._n=!1,oe&&!ie._h&&G(ie)})}},G=function(ie){y.call(d,function(){var oe,Ee,ye,Le=ie._v,pe=X(ie);if(pe&&(oe=b(function(){D?o.emit("unhandledRejection",Le,ie):(Ee=d.onunhandledrejection)?Ee({promise:ie,reason:Le}):(ye=d.console)&&ye.error&&ye.error("Unhandled promise rejection",Le)}),ie._h=D||X(ie)?2:1),ie._a=void 0,pe&&oe.e)throw oe.v})},X=function(ie){return ie._h!==1&&(ie._a||ie._c).length===0},J=function(ie){y.call(d,function(){var oe;D?o.emit("rejectionHandled",ie):(oe=d.onrejectionhandled)&&oe({promise:ie,reason:ie._v})})},B=function(ie){var oe=this;oe._d||(oe._d=!0,oe=oe._w||oe,oe._v=ie,oe._s=2,oe._a||(oe._a=oe._c.slice()),j(oe,!0))},Q=function(ie){var oe,Ee=this;if(!Ee._d){Ee._d=!0,Ee=Ee._w||Ee;try{if(Ee===ie)throw E("Promise can't be resolved itself");(oe=te(ie))?v(function(){var ye={_w:Ee,_d:!1};try{oe.call(ie,a(Q,ye,1),a(B,ye,1))}catch(Le){B.call(ye,Le)}}):(Ee._v=ie,Ee._s=1,j(Ee,!1))}catch(ye){B.call({_w:Ee,_d:!1},ye)}}};H||(A=function(ie){n(this,A,"Promise","_h"),i(ie),O.call(this);try{ie(a(Q,this,1),a(B,this,1))}catch(oe){B.call(this,oe)}},O=function(ie){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=w("./_redefine-all")(A.prototype,{then:function(ie,oe){var Ee=F(c(this,A));return Ee.ok=typeof ie!="function"||ie,Ee.fail=typeof oe=="function"&&oe,Ee.domain=D?o.domain:void 0,this._c.push(Ee),this._a&&this._a.push(Ee),this._s&&j(this,!1),Ee.promise},catch:function(ie){return this.then(void 0,ie)}}),l=function(){var ie=new O;this.promise=ie,this.resolve=a(Q,ie,1),this.reject=a(B,ie,1)},_.f=F=function(ie){return ie===A||ie===p?new l(ie):T(ie)}),s(s.G+s.W+s.F*!H,{Promise:A}),w("./_set-to-string-tag")(A,"Promise"),w("./_set-species")("Promise"),p=w("./_core").Promise,s(s.S+s.F*!H,"Promise",{reject:function(ie){var oe=F(this);return(0,oe.reject)(ie),oe.promise}}),s(s.S+s.F*(h||!H),"Promise",{resolve:function(ie){return g(h&&this===p?A:this,ie)}}),s(s.S+s.F*!(H&&w("./_iter-detect")(function(ie){A.all(ie).catch(I)})),"Promise",{all:function(ie){var oe=this,Ee=F(oe),ye=Ee.resolve,Le=Ee.reject,pe=b(function(){var Ce=[],Be=0,Pe=1;t(ie,!1,function(ke){var Ne=Be++,he=!1;Ce.push(void 0),Pe++,oe.resolve(ke).then(function(ue){he||(he=!0,Ce[Ne]=ue,--Pe||ye(Ce))},Le)}),--Pe||ye(Ce)});return pe.e&&Le(pe.v),Ee.promise},race:function(ie){var oe=this,Ee=F(oe),ye=Ee.reject,Le=b(function(){t(ie,!1,function(pe){oe.resolve(pe).then(Ee.resolve,ye)})});return Le.e&&ye(Le.v),Ee.promise}})},{"./_a-function":58,"./_an-instance":60,"./_classof":63,"./_core":65,"./_ctx":67,"./_export":73,"./_for-of":75,"./_global":76,"./_is-object":85,"./_iter-detect":89,"./_library":92,"./_microtask":94,"./_new-promise-capability":95,"./_perform":109,"./_promise-resolve":110,"./_redefine-all":112,"./_set-species":114,"./_set-to-string-tag":115,"./_species-constructor":118,"./_task":120,"./_user-agent":128,"./_wks":131}],144:[function(w,P,S){var O=w("./_export"),T=w("./_to-absolute-index"),l=String.fromCharCode,p=String.fromCodePoint;O(O.S+O.F*(!!p&&p.length!=1),"String",{fromCodePoint:function(h){for(var d,a=[],u=arguments.length,s=0;u>s;){if(d=+arguments[s++],T(d,1114111)!==d)throw RangeError(d+" is not a valid code point");a.push(d<65536?l(d):l(55296+((d-=65536)>>10),d%1024+56320))}return a.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(w,P,S){"use strict";var O=w("./_string-at")(!0);w("./_iter-define")(String,"String",function(T){this._t=String(T),this._i=0},function(){var T,l=this._t,p=this._i;return p>=l.length?{value:void 0,done:!0}:(T=O(l,p),this._i+=T.length,{value:T,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(w,P,S){"use strict";var O=w("./_global"),T=w("./_has"),l=w("./_descriptors"),p=w("./_export"),h=w("./_redefine"),d=w("./_meta").KEY,a=w("./_fails"),u=w("./_shared"),s=w("./_set-to-string-tag"),f=w("./_uid"),i=w("./_wks"),n=w("./_wks-ext"),t=w("./_wks-define"),c=w("./_enum-keys"),y=w("./_is-array"),v=w("./_an-object"),_=w("./_is-object"),b=w("./_to-iobject"),m=w("./_to-primitive"),g=w("./_property-desc"),E=w("./_object-create"),o=w("./_object-gopn-ext"),x=w("./_object-gopd"),C=w("./_object-dp"),A=w("./_object-keys"),D=x.f,I=C.f,F=o.f,H=O.Symbol,te=O.JSON,j=te&&te.stringify,G=i("_hidden"),X=i("toPrimitive"),J={}.propertyIsEnumerable,B=u("symbol-registry"),Q=u("symbols"),ie=u("op-symbols"),oe=Object.prototype,Ee=typeof H=="function",ye=O.QObject,Le=!ye||!ye.prototype||!ye.prototype.findChild,pe=l&&a(function(){return E(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a!=7})?function($,V,Y){var me=D(oe,V);me&&delete oe[V],I($,V,Y),me&&$!==oe&&I(oe,V,me)}:I,Ce=function($){var V=Q[$]=E(H.prototype);return V._k=$,V},Be=Ee&&typeof H.iterator=="symbol"?function($){return typeof $=="symbol"}:function($){return $ instanceof H},Pe=function($,V,Y){return $===oe&&Pe(ie,V,Y),v($),V=m(V,!0),v(Y),T(Q,V)?(Y.enumerable?(T($,G)&&$[G][V]&&($[G][V]=!1),Y=E(Y,{enumerable:g(0,!1)})):(T($,G)||I($,G,g(1,{})),$[G][V]=!0),pe($,V,Y)):I($,V,Y)},ke=function($,V){v($);for(var Y,me=c(V=b(V)),Re=0,rt=me.length;rt>Re;)Pe($,Y=me[Re++],V[Y]);return $},Ne=function($,V){return V===void 0?E($):ke(E($),V)},he=function($){var V=J.call(this,$=m($,!0));return!(this===oe&&T(Q,$)&&!T(ie,$))&&(!(V||!T(this,$)||!T(Q,$)||T(this,G)&&this[G][$])||V)},ue=function($,V){if($=b($),V=m(V,!0),$!==oe||!T(Q,V)||T(ie,V)){var Y=D($,V);return!Y||!T(Q,V)||T($,G)&&$[G][V]||(Y.enumerable=!0),Y}},Ie=function($){for(var V,Y=F(b($)),me=[],Re=0;Y.length>Re;)T(Q,V=Y[Re++])||V==G||V==d||me.push(V);return me},Ue=function($){for(var V,Y=$===oe,me=F(Y?ie:b($)),Re=[],rt=0;me.length>rt;)!T(Q,V=me[rt++])||Y&&!T(oe,V)||Re.push(Q[V]);return Re};Ee||(H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor!");var $=f(arguments.length>0?arguments[0]:void 0),V=function(Y){this===oe&&V.call(ie,Y),T(this,G)&&T(this[G],$)&&(this[G][$]=!1),pe(this,$,g(1,Y))};return l&&Le&&pe(oe,$,{configurable:!0,set:V}),Ce($)},h(H.prototype,"toString",function(){return this._k}),x.f=ue,C.f=Pe,w("./_object-gopn").f=o.f=Ie,w("./_object-pie").f=he,w("./_object-gops").f=Ue,l&&!w("./_library")&&h(oe,"propertyIsEnumerable",he,!0),n.f=function($){return Ce(i($))}),p(p.G+p.W+p.F*!Ee,{Symbol:H});for(var Ye="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Ye.length>ee;)i(Ye[ee++]);for(var M=A(i.store),N=0;M.length>N;)t(M[N++]);p(p.S+p.F*!Ee,"Symbol",{for:function($){return T(B,$+="")?B[$]:B[$]=H($)},keyFor:function($){if(!Be($))throw TypeError($+" is not a symbol!");for(var V in B)if(B[V]===$)return V},useSetter:function(){Le=!0},useSimple:function(){Le=!1}}),p(p.S+p.F*!Ee,"Object",{create:Ne,defineProperty:Pe,defineProperties:ke,getOwnPropertyDescriptor:ue,getOwnPropertyNames:Ie,getOwnPropertySymbols:Ue}),te&&p(p.S+p.F*(!Ee||a(function(){var $=H();return j([$])!="[null]"||j({a:$})!="{}"||j(Object($))!="{}"})),"JSON",{stringify:function($){for(var V,Y,me=[$],Re=1;arguments.length>Re;)me.push(arguments[Re++]);if(Y=V=me[1],(_(V)||$!==void 0)&&!Be($))return y(V)||(V=function(rt,De){if(typeof Y=="function"&&(De=Y.call(this,rt,De)),!Be(De))return De}),me[1]=V,j.apply(te,me)}}),H.prototype[X]||w("./_hide")(H.prototype,X,H.prototype.valueOf),s(H,"Symbol"),s(Math,"Math",!0),s(O.JSON,"JSON",!0)},{"./_an-object":61,"./_descriptors":69,"./_enum-keys":72,"./_export":73,"./_fails":74,"./_global":76,"./_has":77,"./_hide":78,"./_is-array":84,"./_is-object":85,"./_library":92,"./_meta":93,"./_object-create":97,"./_object-dp":98,"./_object-gopd":100,"./_object-gopn":102,"./_object-gopn-ext":101,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_property-desc":111,"./_redefine":113,"./_set-to-string-tag":115,"./_shared":117,"./_to-iobject":123,"./_to-primitive":126,"./_uid":127,"./_wks":131,"./_wks-define":129,"./_wks-ext":130}],147:[function(w,P,S){"use strict";var O=w("./_export"),T=w("./_core"),l=w("./_global"),p=w("./_species-constructor"),h=w("./_promise-resolve");O(O.P+O.R,"Promise",{finally:function(d){var a=p(this,T.Promise||l.Promise),u=typeof d=="function";return this.then(u?function(s){return h(a,d()).then(function(){return s})}:d,u?function(s){return h(a,d()).then(function(){throw s})}:d)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(w,P,S){"use strict";var O=w("./_export"),T=w("./_new-promise-capability"),l=w("./_perform");O(O.S,"Promise",{try:function(p){var h=T.f(this),d=l(p);return(d.e?h.reject:h.resolve)(d.v),h.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(w,P,S){w("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(w,P,S){w("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(w,P,S){w("./es6.array.iterator");for(var O=w("./_global"),T=w("./_hide"),l=w("./_iterators"),p=w("./_wks")("toStringTag"),h="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),d=0;d<h.length;d++){var a=h[d],u=O[a],s=u&&u.prototype;s&&!s[p]&&T(s,p,a),l[a]=l.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(w,P,S){var O=w("./_export"),T=w("./_task");O(O.G+O.B,{setImmediate:T.set,clearImmediate:T.clear})},{"./_export":73,"./_task":120}],153:[function(w,P,S){(function(O){"use strict";function T(m){return Array.isArray?Array.isArray(m):v(m)==="[object Array]"}function l(m){return typeof m=="boolean"}function p(m){return m===null}function h(m){return m==null}function d(m){return typeof m=="number"}function a(m){return typeof m=="string"}function u(m){return(m===void 0?"undefined":(0,b.default)(m))==="symbol"}function s(m){return m===void 0}function f(m){return v(m)==="[object RegExp]"}function i(m){return(m===void 0?"undefined":(0,b.default)(m))==="object"&&m!==null}function n(m){return v(m)==="[object Date]"}function t(m){return v(m)==="[object Error]"||m instanceof Error}function c(m){return typeof m=="function"}function y(m){return m===null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||(m===void 0?"undefined":(0,b.default)(m))==="symbol"||m===void 0}function v(m){return Object.prototype.toString.call(m)}var _=w("babel-runtime/helpers/typeof"),b=function(m){return m&&m.__esModule?m:{default:m}}(_);S.isArray=T,S.isBoolean=l,S.isNull=p,S.isNullOrUndefined=h,S.isNumber=d,S.isString=a,S.isSymbol=u,S.isUndefined=s,S.isRegExp=f,S.isObject=i,S.isDate=n,S.isError=t,S.isFunction=c,S.isPrimitive=y,S.isBuffer=O.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 O=w("babel-runtime/helpers/typeof"),T=function(l){return l&&l.__esModule?l:{default:l}}(O);!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 a(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 u=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,c,y){if(arguments.length!==1||a(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(u.masks[t]||t||u.masks.default);var v=t.slice(0,4);v!=="UTC:"&&v!=="GMT:"||(t=t.slice(4),c=!0,v==="GMT:"&&(y=!0));var _=c?"getUTC":"get",b=n[_+"Date"](),m=n[_+"Day"](),g=n[_+"Month"](),E=n[_+"FullYear"](),o=n[_+"Hours"](),x=n[_+"Minutes"](),C=n[_+"Seconds"](),A=n[_+"Milliseconds"](),D=c?0:n.getTimezoneOffset(),I=h(n),F=d(n),H={d:b,dd:p(b),ddd:u.i18n.dayNames[m],dddd:u.i18n.dayNames[m+7],m:g+1,mm:p(g+1),mmm:u.i18n.monthNames[g],mmmm:u.i18n.monthNames[g+12],yy:String(E).slice(2),yyyy:E,h:o%12||12,hh:p(o%12||12),H:o,HH:p(o),M:x,MM:p(x),s:C,ss:p(C),l:p(A,3),L:p(Math.round(A/10)),t:o<12?"a":"p",tt:o<12?"am":"pm",T:o<12?"A":"P",TT:o<12?"AM":"PM",Z:y?"GMT":c?"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(te){return te in H?H[te]:te.slice(1,te.length-1)})}}();u.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},u.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},typeof U=="function"&&U.amd?U(function(){return u}):(S===void 0?"undefined":(0,T.default)(S))==="object"?P.exports=u:l.dateFormat=u}(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(w,P,S){(function(O){function T(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function l(a){var u=this.useColors;if(a[0]=(u?"%c":"")+this.namespace+(u?" %c":" ")+a[0]+(u?"%c ":" ")+"+"+S.humanize(this.diff),u){var s="color: "+this.color;a.splice(1,0,s,"color: inherit");var f=0,i=0;a[0].replace(/%[a-zA-Z%]/g,function(n){n!=="%%"&&(f++,n==="%c"&&(i=f))}),a.splice(i,0,s)}}function p(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function h(a){try{a==null?S.storage.removeItem("debug"):S.storage.debug=a}catch(u){}}function d(){var a;try{a=S.storage.debug}catch(u){}return!a&&O!==void 0&&"env"in O&&(a=O.env.DEBUG),a}S=P.exports=w("./debug"),S.log=p,S.formatArgs=l,S.save=h,S.load=d,S.useColors=T,S.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(a){}}(),S.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],S.formatters.j=function(a){try{return JSON.stringify(a)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}},S.enable(d())}).call(this,w("_process"))},{"./debug":156,_process:173}],156:[function(w,P,S){function O(u){var s,f=0;for(s in u)f=(f<<5)-f+u.charCodeAt(s),f|=0;return S.colors[Math.abs(f)%S.colors.length]}function T(u){function s(){if(s.enabled){var f=s,i=+new Date,n=i-(a||i);f.diff=n,f.prev=a,f.curr=i,a=i;for(var t=new Array(arguments.length),c=0;c<t.length;c++)t[c]=arguments[c];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(v,_){if(v==="%%")return v;y++;var b=S.formatters[_];if(typeof b=="function"){var m=t[y];v=b.call(f,m),t.splice(y,1),y--}return v}),S.formatArgs.call(f,t),(s.log||S.log||console.log.bind(console)).apply(f,t)}}return s.namespace=u,s.enabled=S.enabled(u),s.useColors=S.useColors(),s.color=O(u),typeof S.init=="function"&&S.init(s),s}function l(u){S.save(u),S.names=[],S.skips=[];for(var s=(typeof u=="string"?u:"").split(/[\s,]+/),f=s.length,i=0;i<f;i++)s[i]&&(u=s[i].replace(/\*/g,".*?"),u[0]==="-"?S.skips.push(new RegExp("^"+u.substr(1)+"$")):S.names.push(new RegExp("^"+u+"$")))}function p(){S.enable("")}function h(u){var s,f;for(s=0,f=S.skips.length;s<f;s++)if(S.skips[s].test(u))return!1;for(s=0,f=S.names.length;s<f;s++)if(S.names[s].test(u))return!0;return!1}function d(u){return u instanceof Error?u.stack||u.message:u}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 a},{ms:169}],157:[function(w,P,S){"use strict";function O(l){var p=""+l,h=T.exec(p);if(!h)return p;var d,a="",u=0,s=0;for(u=h.index;u<p.length;u++){switch(p.charCodeAt(u)){case 34:d=""";break;case 38:d="&";break;case 39:d="'";break;case 60:d="<";break;case 62:d=">";break;default:continue}s!==u&&(a+=p.substring(s,u)),s=u+1,a+=d}return s!==u?a+p.substring(s,u):a}var T=/["'&<>]/;P.exports=O},{}],158:[function(w,P,S){function O(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function T(d){return typeof d=="function"}function l(d){return typeof d=="number"}function p(d){return typeof d=="object"&&d!==null}function h(d){return d===void 0}P.exports=O,O.EventEmitter=O,O.prototype._events=void 0,O.prototype._maxListeners=void 0,O.defaultMaxListeners=10,O.prototype.setMaxListeners=function(d){if(!l(d)||d<0||isNaN(d))throw TypeError("n must be a positive number");return this._maxListeners=d,this},O.prototype.emit=function(d){var a,u,s,f,i,n;if(this._events||(this._events={}),d==="error"&&(!this._events.error||p(this._events.error)&&!this._events.error.length)){if((a=arguments[1])instanceof Error)throw a;var t=new Error('Uncaught, unspecified "error" event. ('+a+")");throw t.context=a,t}if(u=this._events[d],h(u))return!1;if(T(u))switch(arguments.length){case 1:u.call(this);break;case 2:u.call(this,arguments[1]);break;case 3:u.call(this,arguments[1],arguments[2]);break;default:f=Array.prototype.slice.call(arguments,1),u.apply(this,f)}else if(p(u))for(f=Array.prototype.slice.call(arguments,1),n=u.slice(),s=n.length,i=0;i<s;i++)n[i].apply(this,f);return!0},O.prototype.addListener=function(d,a){var u;if(!T(a))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",d,T(a.listener)?a.listener:a),this._events[d]?p(this._events[d])?this._events[d].push(a):this._events[d]=[this._events[d],a]:this._events[d]=a,p(this._events[d])&&!this._events[d].warned&&(u=h(this._maxListeners)?O.defaultMaxListeners:this._maxListeners)&&u>0&&this._events[d].length>u&&(this._events[d].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[d].length),typeof console.trace=="function"&&console.trace()),this},O.prototype.on=O.prototype.addListener,O.prototype.once=function(d,a){function u(){this.removeListener(d,u),s||(s=!0,a.apply(this,arguments))}if(!T(a))throw TypeError("listener must be a function");var s=!1;return u.listener=a,this.on(d,u),this},O.prototype.removeListener=function(d,a){var u,s,f,i;if(!T(a))throw TypeError("listener must be a function");if(!this._events||!this._events[d])return this;if(u=this._events[d],f=u.length,s=-1,u===a||T(u.listener)&&u.listener===a)delete this._events[d],this._events.removeListener&&this.emit("removeListener",d,a);else if(p(u)){for(i=f;i-- >0;)if(u[i]===a||u[i].listener&&u[i].listener===a){s=i;break}if(s<0)return this;u.length===1?(u.length=0,delete this._events[d]):u.splice(s,1),this._events.removeListener&&this.emit("removeListener",d,a)}return this},O.prototype.removeAllListeners=function(d){var a,u;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[d]&&delete this._events[d],this;if(arguments.length===0){for(a in this._events)a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events={},this}if(u=this._events[d],T(u))this.removeListener(d,u);else if(u)for(;u.length;)this.removeListener(d,u[u.length-1]);return delete this._events[d],this},O.prototype.listeners=function(d){return this._events&&this._events[d]?T(this._events[d])?[this._events[d]]:this._events[d].slice():[]},O.prototype.listenerCount=function(d){if(this._events){var a=this._events[d];if(T(a))return 1;if(a)return a.length}return 0},O.listenerCount=function(d,a){return d.listenerCount(a)}},{}],159:[function(w,P,S){var O=w("http"),T=P.exports;for(var l in O)O.hasOwnProperty(l)&&(T[l]=O[l]);T.request=function(p,h){return p||(p={}),p.scheme="https",p.protocol="https:",O.request.call(this,p,h)}},{http:196}],160:[function(w,P,S){"use strict";var O=w("util"),T=w("ms");P.exports=function(l){if(typeof l=="number")return l;var p=T(l);if(p===void 0){var h=new Error(O.format("humanize-ms(%j) result undefined",l));console.warn(h.stack)}return p}},{ms:169,util:207}],161:[function(w,P,S){S.read=function(O,T,l,p,h){var d,a,u=8*h-p-1,s=(1<<u)-1,f=s>>1,i=-7,n=l?h-1:0,t=l?-1:1,c=O[T+n];for(n+=t,d=c&(1<<-i)-1,c>>=-i,i+=u;i>0;d=256*d+O[T+n],n+=t,i-=8);for(a=d&(1<<-i)-1,d>>=-i,i+=p;i>0;a=256*a+O[T+n],n+=t,i-=8);if(d===0)d=1-f;else{if(d===s)return a?NaN:1/0*(c?-1:1);a+=Math.pow(2,p),d-=f}return(c?-1:1)*a*Math.pow(2,d-p)},S.write=function(O,T,l,p,h,d){var a,u,s,f=8*d-h-1,i=(1<<f)-1,n=i>>1,t=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=p?0:d-1,y=p?1:-1,v=T<0||T===0&&1/T<0?1:0;for(T=Math.abs(T),isNaN(T)||T===1/0?(u=isNaN(T)?1:0,a=i):(a=Math.floor(Math.log(T)/Math.LN2),T*(s=Math.pow(2,-a))<1&&(a--,s*=2),T+=a+n>=1?t/s:t*Math.pow(2,1-n),T*s>=2&&(a++,s/=2),a+n>=i?(u=0,a=i):a+n>=1?(u=(T*s-1)*Math.pow(2,h),a+=n):(u=T*Math.pow(2,n-1)*Math.pow(2,h),a=0));h>=8;O[l+c]=255&u,c+=y,u/=256,h-=8);for(a=a<<h|u,f+=h;f>0;O[l+c]=255&a,c+=y,a/=256,f-=8);O[l+c-y]|=128*v}},{}],162:[function(w,P,S){typeof Object.create=="function"?P.exports=function(O,T){O.super_=T,O.prototype=Object.create(T.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}})}:P.exports=function(O,T){O.super_=T;var l=function(){};l.prototype=T.prototype,O.prototype=new l,O.prototype.constructor=O}},{}],163:[function(w,P,S){function O(l){return!!l.constructor&&typeof l.constructor.isBuffer=="function"&&l.constructor.isBuffer(l)}function T(l){return typeof l.readFloatLE=="function"&&typeof l.slice=="function"&&O(l.slice(0,0))}P.exports=function(l){return l!=null&&(O(l)||T(l)||!!l._isBuffer)}},{}],164:[function(w,P,S){!function(O){function T(h){return p.call(h).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function l(h){return typeof h=="function"&&(/^class(\s|\{\}$)/.test(p.call(h))||/^.*classCallCheck\(/.test(T(h)))}var p=Function.prototype.toString;S!==void 0?(P!==void 0&&P.exports&&(S=P.exports=l),S.isClass=l):typeof U=="function"&&U.amd?U([],function(){return l}):O.isClass=l}(this)},{}],165:[function(w,P,S){"use strict";function O(d){var a=d.slice(2);return a=a[0].toLowerCase()+a.slice(1)}var T=w("core-util-is"),l=w("isstream"),p=w("is-class");Object.keys(T).map(function(d){S[O(d)]=T[d]}),S.stream=l,S.readableStream=l.isReadable,S.writableStream=l.isWritable,S.duplexStream=l.isDuplex,S.class=p,S.finite=function(d){return Number.isFinite(d)},S.NaN=function(d){return Number.isNaN(d)},S.generator=function(d){return d&&typeof d.next=="function"&&typeof d.throw=="function"},S.generatorFunction=function(d){return d&&d.constructor&&d.constructor.name==="GeneratorFunction"},S.asyncFunction=function(d){return d&&d.constructor&&d.constructor.name==="AsyncFunction"},S.promise=function(d){return d&&typeof d.then=="function"};var h=Math.pow(2,31);S.int=function(d){return T.isNumber(d)&&d%1==0},S.int32=function(d){return S.int(d)&&d<h&&d>=-h},S.long=function(d){return S.int(d)&&(d>=h||d<-h)},S.Long=function(d){return S.object(d)&&S.number(d.high)&&S.number(d.low)},S.double=function(d){return T.isNumber(d)&&!isNaN(d)&&d%1!=0},S.date=function(d){return d instanceof Date},S.regExp=function(d){return d instanceof RegExp},S.regexp=S.regExp,S.error=function(d){return d instanceof Error},S.array=function(d){return Array.isArray(d)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(w,P,S){var O={}.toString;P.exports=Array.isArray||function(T){return O.call(T)=="[object Array]"}},{}],167:[function(w,P,S){function O(d){return d instanceof h.Stream}function T(d){return O(d)&&typeof d._read=="function"&&typeof d._readableState=="object"}function l(d){return O(d)&&typeof d._write=="function"&&typeof d._writableState=="object"}function p(d){return T(d)&&l(d)}var h=w("stream");P.exports=O,P.exports.isReadable=T,P.exports.isWritable=l,P.exports.isDuplex=p},{stream:195}],168:[function(w,P,S){"use strict";function O(l,p,h){if(!l)throw new TypeError("argument dest is required");if(!p)throw new TypeError("argument src is required");return h===void 0&&(h=!0),Object.getOwnPropertyNames(p).forEach(function(d){if(h||!T.call(l,d)){var a=Object.getOwnPropertyDescriptor(p,d);Object.defineProperty(l,d,a)}}),l}P.exports=O;var T=Object.prototype.hasOwnProperty},{}],169:[function(w,P,S){function O(f){if(f=String(f),!(f.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(f);if(i){var n=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*s;case"days":case"day":case"d":return n*u;case"hours":case"hour":case"hrs":case"hr":case"h":return n*a;case"minutes":case"minute":case"mins":case"min":case"m":return n*d;case"seconds":case"second":case"secs":case"sec":case"s":return n*h;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function T(f){return f>=u?Math.round(f/u)+"d":f>=a?Math.round(f/a)+"h":f>=d?Math.round(f/d)+"m":f>=h?Math.round(f/h)+"s":f+"ms"}function l(f){return p(f,u,"day")||p(f,a,"hour")||p(f,d,"minute")||p(f,h,"second")||f+" ms"}function p(f,i,n){if(!(f<i))return f<1.5*i?Math.floor(f/i)+" "+n:Math.ceil(f/i)+" "+n+"s"}var h=1e3,d=60*h,a=60*d,u=24*a,s=365.25*u;P.exports=function(f,i){i=i||{};var n=typeof f;if(n==="string"&&f.length>0)return O(f);if(n==="number"&&isNaN(f)===!1)return i.long?l(f):T(f);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(f))}},{}],170:[function(w,P,S){(function(O){function T(d,a){for(var u=0,s=d.length-1;s>=0;s--){var f=d[s];f==="."?d.splice(s,1):f===".."?(d.splice(s,1),u++):u&&(d.splice(s,1),u--)}if(a)for(;u--;u)d.unshift("..");return d}function l(d){typeof d!="string"&&(d+="");var a,u=0,s=-1,f=!0;for(a=d.length-1;a>=0;--a)if(d.charCodeAt(a)===47){if(!f){u=a+1;break}}else s===-1&&(f=!1,s=a+1);return s===-1?"":d.slice(u,s)}function p(d,a){if(d.filter)return d.filter(a);for(var u=[],s=0;s<d.length;s++)a(d[s],s,d)&&u.push(d[s]);return u}S.resolve=function(){for(var d="",a=!1,u=arguments.length-1;u>=-1&&!a;u--){var s=u>=0?arguments[u]:O.cwd();if(typeof s!="string")throw new TypeError("Arguments to path.resolve must be strings");s&&(d=s+"/"+d,a=s.charAt(0)==="/")}return d=T(p(d.split("/"),function(f){return!!f}),!a).join("/"),(a?"/":"")+d||"."},S.normalize=function(d){var a=S.isAbsolute(d),u=h(d,-1)==="/";return d=T(p(d.split("/"),function(s){return!!s}),!a).join("/"),d||a||(d="."),d&&u&&(d+="/"),(a?"/":"")+d},S.isAbsolute=function(d){return d.charAt(0)==="/"},S.join=function(){var d=Array.prototype.slice.call(arguments,0);return S.normalize(p(d,function(a,u){if(typeof a!="string")throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},S.relative=function(d,a){function u(y){for(var v=0;v<y.length&&y[v]==="";v++);for(var _=y.length-1;_>=0&&y[_]==="";_--);return v>_?[]:y.slice(v,_-v+1)}d=S.resolve(d).substr(1),a=S.resolve(a).substr(1);for(var s=u(d.split("/")),f=u(a.split("/")),i=Math.min(s.length,f.length),n=i,t=0;t<i;t++)if(s[t]!==f[t]){n=t;break}for(var c=[],t=n;t<s.length;t++)c.push("..");return c=c.concat(f.slice(n)),c.join("/")},S.sep="/",S.delimiter=":",S.dirname=function(d){if(typeof d!="string"&&(d+=""),d.length===0)return".";for(var a=d.charCodeAt(0),u=a===47,s=-1,f=!0,i=d.length-1;i>=1;--i)if((a=d.charCodeAt(i))===47){if(!f){s=i;break}}else f=!1;return s===-1?u?"/":".":u&&s===1?"/":d.slice(0,s)},S.basename=function(d,a){var u=l(d);return a&&u.substr(-1*a.length)===a&&(u=u.substr(0,u.length-a.length)),u},S.extname=function(d){typeof d!="string"&&(d+="");for(var a=-1,u=0,s=-1,f=!0,i=0,n=d.length-1;n>=0;--n){var t=d.charCodeAt(n);if(t!==47)s===-1&&(f=!1,s=n+1),t===46?a===-1?a=n:i!==1&&(i=1):a!==-1&&(i=-1);else if(!f){u=n+1;break}}return a===-1||s===-1||i===0||i===1&&a===s-1&&a===u+1?"":d.slice(a,s)};var h="ab".substr(-1)==="b"?function(d,a,u){return d.substr(a,u)}:function(d,a,u){return a<0&&(a=d.length+a),d.substr(a,u)}}).call(this,w("_process"))},{_process:173}],171:[function(w,P,S){(function(O){(function(){"use strict";function T(C){return C=String(C),C.charAt(0).toUpperCase()+C.slice(1)}function l(C,A,D){var I={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return A&&D&&/^Win/i.test(C)&&!/^Windows Phone /i.test(C)&&(I=I[/[\d.]+$/.exec(C)])&&(C="Windows "+I),C=String(C),A&&D&&(C=C.replace(RegExp(A,"i"),D)),C=h(C.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function p(C,A){var D=-1,I=C?C.length:0;if(typeof I=="number"&&I>-1&&I<=b)for(;++D<I;)A(C[D],D,C);else d(C,A)}function h(C){return C=i(C),/^(?:webOS|i(?:OS|P))/.test(C)?C:T(C)}function d(C,A){for(var D in C)E.call(C,D)&&A(C[D],D,C)}function a(C){return C==null?T(C):o.call(C).slice(8,-1)}function u(C,A){var D=C!=null?typeof C[A]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(D)||D=="object"&&!C[A])}function s(C){return String(C).replace(/([ -])(?!$)/g,"$1?")}function f(C,A){var D=null;return p(C,function(I,F){D=A(D,I,F,C)}),D}function i(C){return String(C).replace(/^ +| +$/g,"")}function n(C){function A($){return f($,function(V,Y){var me=Y.pattern||s(Y);return!V&&(V=RegExp("\\b"+me+" *\\d+[.\\w_]*","i").exec(C)||RegExp("\\b"+me+" *\\w+-[\\w]*","i").exec(C)||RegExp("\\b"+me+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(C))&&((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=c,F=C&&typeof C=="object"&&a(C)!="String";F&&(I=C,C=null);var H=I.navigator||{},te=H.userAgent||"";C||(C=te);var j,G,X=F?!!H.likeChrome:/\bChrome\b/.test(C)&&!/internal|\n/i.test(o.toString()),J=F?"Object":"ScriptBridgingProxyObject",B=F?"Object":"Environment",Q=F&&I.java?"JavaPackage":a(I.java),ie=F?"Object":"RuntimeObject",oe=/\bJava/.test(Q)&&I.java,Ee=oe&&a(I.environment)==B,ye=oe?"a":"\u4F2A",Le=oe?"b":"\u5C3E",pe=I.document||{},Ce=I.operamini||I.opera,Be=m.test(Be=F&&Ce?Ce["[[Class]]"]:a(Ce))?Be:Ce=null,Pe=C,ke=[],Ne=null,he=C==te,ue=he&&Ce&&typeof Ce.version=="function"&&Ce.version(),Ie=function($){return f($,function(V,Y){return V||RegExp("\\b"+(Y.pattern||s(Y))+"\\b","i").exec(C)&&(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(C)&&(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(C))&&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(C))&&(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(Ie&&(Ie=[Ie]),ee&&!Ye&&(Ye=A([ee])),(j=/\bGoogle TV\b/.exec(Ye))&&(Ye=j[0]),/\bSimulator\b/i.test(C)&&(Ye=(Ye?Ye+" ":"")+"Simulator"),Ue=="Opera Mini"&&/\bOPiOS\b/.test(C)&&ke.push("running in Turbo/Uncompressed mode"),Ue=="IE"&&/\blike iPhone OS\b/.test(C)?(j=n(C.replace(/like iPhone OS/,"")),ee=j.manufacturer,Ye=j.product):/^iP/.test(Ye)?(Ue||(Ue="Safari"),M="iOS"+((j=/ OS ([\d_]+)/i.exec(C))?" "+j[1].replace(/_/g,"."):"")):Ue!="Konqueror"||/buntu/i.test(M)?ee&&ee!="Google"&&(/Chrome/.test(Ue)&&!/\bMobile Safari\b/i.test(C)||/\bVita\b/.test(Ye))||/\bAndroid\b/.test(M)&&/^Chrome/.test(Ue)&&/\bVersion\//i.test(C)?(Ue="Android Browser",M=/\bAndroid\b/.test(M)?M:"Android"):Ue=="Silk"?(/\bMobi/i.test(C)||(M="Android",ke.unshift("desktop mode")),/Accelerated *= *true/i.test(C)&&ke.unshift("accelerated")):Ue=="PaleMoon"&&(j=/\bFirefox\/([\d.]+)\b/.exec(C))?ke.push("identifying as Firefox "+j[1]):Ue=="Firefox"&&(j=/\b(Mobile|Tablet|TV)\b/i.exec(C))?(M||(M="Firefox OS"),Ye||(Ye=j[1])):!Ue||(j=!/\bMinefield\b/i.test(C)&&/\b(?:Firefox|Safari)\b/.exec(Ue))?(Ue&&!Ye&&/[\/,]|^[^(]+?\)/.test(C.slice(C.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(C)||0)[1])&&ke.push("Chromium "+j):M="Kubuntu",ue||(ue=function($){return f($,function(V,Y){return V||(RegExp(Y+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(C)||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=Ie=="iCab"&&parseFloat(ue)>3&&"WebKit"||/\bOpera\b/.test(Ue)&&(/\bOPR\b/.test(C)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(C)&&!/^(?:Trident|EdgeHTML)$/.test(Ie)&&"WebKit"||!Ie&&/\bMSIE\b/i.test(C)&&(M=="Mac OS"?"Tasman":"Trident")||Ie=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ue)&&"NetFront")&&(Ie=[j]),Ue=="IE"&&(j=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(C)||0)[1])?(Ue+=" Mobile",M="Windows Phone "+(/\+$/.test(j)?j:j+".x"),ke.unshift("desktop mode")):/\bWPDesktop\b/i.test(C)?(Ue="IE Mobile",M="Windows Phone 8.x",ke.unshift("desktop mode"),ue||(ue=(/\brv:([\d.]+)/.exec(C)||0)[1])):Ue!="IE"&&Ie=="Trident"&&(j=/\brv:([\d.]+)/.exec(C))&&(Ue&&ke.push("identifying as "+Ue+(ue?" "+ue:"")),Ue="IE",ue=j[1]),he){if(u(I,"global"))if(oe&&(j=oe.lang.System,Pe=j.getProperty("os.arch"),M=M||j.getProperty("os.name")+" "+j.getProperty("os.version")),Ee){try{ue=I.require("ringo/engine").version.join("."),Ue="RingoJS"}catch($){(j=I.system)&&j.global.system==I.system&&(Ue="Narwhal",M||(M=j[0].os||null))}Ue||(Ue="Rhino")}else typeof I.process=="object"&&!I.process.browser&&(j=I.process)&&(typeof j.versions=="object"&&(typeof j.versions.electron=="string"?(ke.push("Node "+j.versions.node),Ue="Electron",ue=j.versions.electron):typeof j.versions.nw=="string"&&(ke.push("Chromium "+ue,"Node "+j.versions.node),Ue="NW.js",ue=j.versions.nw)),Ue||(Ue="Node.js",Pe=j.arch,M=j.platform,ue=/[\d.]+/.exec(j.version),ue=ue?ue[0]:null));else a(j=I.runtime)==J?(Ue="Adobe AIR",M=j.flash.system.Capabilities.os):a(j=I.phantom)==ie?(Ue="PhantomJS",ue=(j=j.version||null)&&j.major+"."+j.minor+"."+j.patch):typeof pe.documentMode=="number"&&(j=/\bTrident\/(\d+)/i.exec(C))?(ue=[ue,pe.documentMode],(j=+j[1]+4)!=ue[1]&&(ke.push("IE "+ue[1]+" mode"),Ie&&(Ie[1]=""),ue[1]=j),ue=Ue=="IE"?String(ue[1].toFixed(1)):ue[0]):typeof pe.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ue)&&(ke.push("masking as "+Ue+" "+ue),Ue="IE",ue="11.0",Ie=["Trident"],M="Windows");M=M&&h(M)}if(ue&&(j=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ue)||/(?:alpha|beta)(?: ?\d)?/i.exec(C+";"+(he&&H.appMinorVersion))||/\bMinefield\b/i.test(C)&&"a")&&(Ne=/b/i.test(j)?"beta":"alpha",ue=ue.replace(RegExp(j+"\\+?$"),"")+(Ne=="beta"?Le:ye)+(/\d+\+?/.exec(j)||"")),Ue=="Fennec"||Ue=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(M))Ue="Firefox Mobile";else if(Ue=="Maxthon"&&ue)ue=ue.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ye))Ye=="Xbox 360"&&(M=null),Ye=="Xbox 360"&&/\bIEMobile\b/.test(C)&&ke.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(Ue)&&(!Ue||Ye||/Browser|Mobi/.test(Ue))||M!="Windows CE"&&!/Mobi/i.test(C))if(Ue=="IE"&&he)try{I.external===null&&ke.unshift("platform preview")}catch($){ke.unshift("embedded")}else(/\bBlackBerry\b/.test(Ye)||/\bBB10\b/.test(C))&&(j=(RegExp(Ye.replace(/ +/g," *")+"/([.\\d]+)","i").exec(C)||0)[1]||ue)?(j=[j,/BB10/.test(C)],M=(j[1]?(Ye=null,ee="BlackBerry"):"Device Software")+" "+j[0],ue=null):this!=d&&Ye!="Wii"&&(he&&Ce||/Opera/.test(Ue)&&/\b(?:MSIE|Firefox)\b/i.test(C)||Ue=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(M)||Ue=="IE"&&(M&&!/^Win/.test(M)&&ue>5.5||/\bWindows XP\b/.test(M)&&ue>8||ue==8&&!/\bTrident\b/.test(C)))&&!m.test(j=n.call(d,C.replace(m,"")+";"))&&j.name&&(j="ing as "+j.name+((j=j.version)?" "+j:""),m.test(Ue)?(/\bIE\b/.test(j)&&M=="Mac OS"&&(M=null),j="identify"+j):(j="mask"+j,Ue=Be?h(Be.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(j)&&(M=null),he||(ue=null)),Ie=["Presto"],ke.push(j));else Ue+=" Mobile";(j=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(C)||0)[1])&&(j=[parseFloat(j.replace(/\.(\d)$/,".0$1")),j],Ue=="Safari"&&j[1].slice(-1)=="+"?(Ue="WebKit Nightly",Ne="alpha",ue=j[1].slice(0,-1)):ue!=j[1]&&ue!=(j[2]=(/\bSafari\/([\d.]+\+?)/i.exec(C)||0)[1])||(ue=null),j[1]=(/\bChrome\/([\d.]+)/i.exec(C)||0)[1],j[0]==537.36&&j[2]==537.36&&parseFloat(j[1])>=28&&Ie=="WebKit"&&(Ie=["Blink"]),he&&(X||j[1])?(Ie&&(Ie[1]="like Chrome"),j=j[1]||(j=j[0],j<530?1:j<532?2:j<532.05?3:j<533?4:j<534.03?5:j<534.07?6:j<534.1?7:j<534.13?8:j<534.16?9:j<534.24?10:j<534.3?11:j<535.01?12:j<535.02?"13+":j<535.07?15:j<535.11?16:j<535.19?17:j<536.05?18:j<536.1?19:j<537.01?20:j<537.11?"21+":j<537.13?23:j<537.18?24:j<537.24?25:j<537.36?26:Ie!="Blink"?"27":"28")):(Ie&&(Ie[1]="like Safari"),j=j[0],j=j<400?1:j<500?2:j<526?3:j<533?4:j<534?"4+":j<535?5:j<537?6:j<538?7:j<601?8:"8"),Ie&&(Ie[1]+=" "+(j+=typeof j=="number"?".x":/[.+]/.test(j)?"":"+")),Ue=="Safari"&&(!ue||parseInt(ue)>45)&&(ue=j)),Ue=="Opera"&&(j=/\bzbov|zvav$/.exec(M))?(Ue+=" ",ke.unshift("desktop mode"),j=="zvav"?(Ue+="Mini",ue=null):Ue+="Mobile",M=M.replace(RegExp(" *"+j+"$"),"")):Ue=="Safari"&&/\bChrome\b/.exec(Ie&&Ie[1])&&(ke.unshift("desktop mode"),Ue="Chrome Mobile",ue=null,/\bOS X\b/.test(M)?(ee="Apple",M="iOS 4.3+"):M=null),ue&&ue.indexOf(j=/[\d.]+$/.exec(M))==0&&C.indexOf("/"+j+"-")>-1&&(M=i(M.replace(j,""))),Ie&&!/\b(?:Avant|Nook)\b/.test(Ue)&&(/Browser|Lunascape|Maxthon/.test(Ue)||Ue!="Safari"&&/^iOS/.test(M)&&/\bSafari\b/.test(Ie[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Ue)&&Ie[1])&&(j=Ie[Ie.length-1])&&ke.push(j),ke.length&&(ke=["("+ke.join("; ")+")"]),ee&&Ye&&Ye.indexOf(ee)<0&&ke.push("on "+ee),Ye&&ke.push((/^on /.test(ke[ke.length-1])?"":"on ")+Ye),M&&(j=/ ([\d.+]+)$/.exec(M),G=j&&M.charAt(M.length-j[0].length-1)=="/",M={architecture:32,family:j&&!G?M.replace(j[0],""):M,version:j?j[1]:null,toString:function(){var $=this.version;return this.family+($&&!G?" "+$:"")+(this.architecture==64?" 64-bit":"")}}),(j=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Pe))&&!/\bi686\b/i.test(Pe)?(M&&(M.architecture=64,M.family=M.family.replace(RegExp(" *"+j),"")),Ue&&(/\bWOW64\b/i.test(C)||he&&/\w(?:86|32)$/.test(H.cpuClass||H.platform)&&!/\bWin64; x64\b/i.test(C))&&ke.unshift("32-bit")):M&&/^OS X/.test(M.family)&&Ue=="Chrome"&&parseFloat(ue)>=39&&(M.architecture=64),C||(C=null);var N={};return N.description=C,N.layout=Ie&&Ie[0],N.manufacturer=ee,N.name=Ue,N.prerelease=Ne,N.product=Ye,N.ua=C,N.version=Ue&&ue,N.os=M||{architecture:null,family:null,version:null,toString:function(){return"null"}},N.parse=n,N.toString=D,N.version&&ke.unshift(ue),N.name&&ke.unshift(Ue),M&&Ue&&(M!=String(M).split(" ")[0]||M!=Ue.split(" ")[0]&&!Ye)&&ke.push(Ye?"("+M+")":"on "+M),ke.length&&(N.description=ke.join(" ")),N}var t={function:!0,object:!0},c=t[typeof window]&&window||this,y=t[typeof S]&&S,v=t[typeof P]&&P&&!P.nodeType&&P,_=y&&v&&typeof O=="object"&&O;!_||_.global!==_&&_.window!==_&&_.self!==_||(c=_);var b=Math.pow(2,53)-1,m=/\bOpera/,g=Object.prototype,E=g.hasOwnProperty,o=g.toString,x=n();typeof U=="function"&&typeof U.amd=="object"&&U.amd?(c.platform=x,U(function(){return x})):y&&v?d(x,function(C,A){y[A]=C}):c.platform=x}).call(this)}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(w,P,S){(function(O){"use strict";function T(l,p,h,d){if(typeof l!="function")throw new TypeError('"callback" argument must be a function');var a,u,s=arguments.length;switch(s){case 0:case 1:return O.nextTick(l);case 2:return O.nextTick(function(){l.call(null,p)});case 3:return O.nextTick(function(){l.call(null,p,h)});case 4:return O.nextTick(function(){l.call(null,p,h,d)});default:for(a=new Array(s-1),u=0;u<a.length;)a[u++]=arguments[u];return O.nextTick(function(){l.apply(null,a)})}}!O.version||O.version.indexOf("v0.")===0||O.version.indexOf("v1.")===0&&O.version.indexOf("v1.8.")!==0?P.exports={nextTick:T}:P.exports=O}).call(this,w("_process"))},{_process:173}],173:[function(w,P,S){function O(){throw new Error("setTimeout has not been defined")}function T(){throw new Error("clearTimeout has not been defined")}function l(v){if(s===setTimeout)return setTimeout(v,0);if((s===O||!s)&&setTimeout)return s=setTimeout,setTimeout(v,0);try{return s(v,0)}catch(_){try{return s.call(null,v,0)}catch(b){return s.call(this,v,0)}}}function p(v){if(f===clearTimeout)return clearTimeout(v);if((f===T||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(v);try{return f(v)}catch(_){try{return f.call(null,v)}catch(b){return f.call(this,v)}}}function h(){c&&n&&(c=!1,n.length?t=n.concat(t):y=-1,t.length&&d())}function d(){if(!c){var v=l(h);c=!0;for(var _=t.length;_;){for(n=t,t=[];++y<_;)n&&n[y].run();y=-1,_=t.length}n=null,c=!1,p(v)}}function a(v,_){this.fun=v,this.array=_}function u(){}var s,f,i=P.exports={};!function(){try{s=typeof setTimeout=="function"?setTimeout:O}catch(v){s=O}try{f=typeof clearTimeout=="function"?clearTimeout:T}catch(v){f=T}}();var n,t=[],c=!1,y=-1;i.nextTick=function(v){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 a(v,_)),t.length!==1||c||l(d)},a.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=u,i.addListener=u,i.once=u,i.off=u,i.removeListener=u,i.removeAllListeners=u,i.emit=u,i.prependListener=u,i.prependOnceListener=u,i.listeners=function(v){return[]},i.binding=function(v){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(v){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],174:[function(w,P,S){(function(O){!function(T){function l(Q){throw new RangeError(G[Q])}function p(Q,ie){for(var oe=Q.length,Ee=[];oe--;)Ee[oe]=ie(Q[oe]);return Ee}function h(Q,ie){var oe=Q.split("@"),Ee="";return oe.length>1&&(Ee=oe[0]+"@",Q=oe[1]),Q=Q.replace(j,"."),Ee+p(Q.split("."),ie).join(".")}function d(Q){for(var ie,oe,Ee=[],ye=0,Le=Q.length;ye<Le;)ie=Q.charCodeAt(ye++),ie>=55296&&ie<=56319&&ye<Le?(oe=Q.charCodeAt(ye++),(64512&oe)==56320?Ee.push(((1023&ie)<<10)+(1023&oe)+65536):(Ee.push(ie),ye--)):Ee.push(ie);return Ee}function a(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 u(Q){return Q-48<10?Q-22:Q-65<26?Q-65:Q-97<26?Q-97:E}function s(Q,ie){return Q+22+75*(Q<26)-((ie!=0)<<5)}function f(Q,ie,oe){var Ee=0;for(Q=oe?J(Q/A):Q>>1,Q+=J(Q/ie);Q>X*x>>1;Ee+=E)Q=J(Q/X);return J(Ee+(X+1)*Q/(Q+C))}function i(Q){var ie,oe,Ee,ye,Le,pe,Ce,Be,Pe,ke,Ne=[],he=Q.length,ue=0,Ie=I,Ue=D;for(oe=Q.lastIndexOf(F),oe<0&&(oe=0),Ee=0;Ee<oe;++Ee)Q.charCodeAt(Ee)>=128&&l("not-basic"),Ne.push(Q.charCodeAt(Ee));for(ye=oe>0?oe+1:0;ye<he;){for(Le=ue,pe=1,Ce=E;ye>=he&&l("invalid-input"),Be=u(Q.charCodeAt(ye++)),(Be>=E||Be>J((g-ue)/pe))&&l("overflow"),ue+=Be*pe,Pe=Ce<=Ue?o:Ce>=Ue+x?x:Ce-Ue,!(Be<Pe);Ce+=E)ke=E-Pe,pe>J(g/ke)&&l("overflow"),pe*=ke;ie=Ne.length+1,Ue=f(ue-Le,ie,Le==0),J(ue/ie)>g-Ie&&l("overflow"),Ie+=J(ue/ie),ue%=ie,Ne.splice(ue++,0,Ie)}return a(Ne)}function n(Q){var ie,oe,Ee,ye,Le,pe,Ce,Be,Pe,ke,Ne,he,ue,Ie,Ue,Ye=[];for(Q=d(Q),he=Q.length,ie=I,oe=0,Le=D,pe=0;pe<he;++pe)(Ne=Q[pe])<128&&Ye.push(B(Ne));for(Ee=ye=Ye.length,ye&&Ye.push(F);Ee<he;){for(Ce=g,pe=0;pe<he;++pe)(Ne=Q[pe])>=ie&&Ne<Ce&&(Ce=Ne);for(ue=Ee+1,Ce-ie>J((g-oe)/ue)&&l("overflow"),oe+=(Ce-ie)*ue,ie=Ce,pe=0;pe<he;++pe)if(Ne=Q[pe],Ne<ie&&++oe>g&&l("overflow"),Ne==ie){for(Be=oe,Pe=E;ke=Pe<=Le?o:Pe>=Le+x?x:Pe-Le,!(Be<ke);Pe+=E)Ue=Be-ke,Ie=E-ke,Ye.push(B(s(ke+Ue%Ie,0))),Be=J(Ue/Ie);Ye.push(B(s(Be,0))),Le=f(oe,ue,Ee==ye),oe=0,++Ee}++oe,++ie}return Ye.join("")}function t(Q){return h(Q,function(ie){return H.test(ie)?i(ie.slice(4).toLowerCase()):ie})}function c(Q){return h(Q,function(ie){return te.test(ie)?"xn--"+n(ie):ie})}var y=typeof S=="object"&&S&&!S.nodeType&&S,v=typeof P=="object"&&P&&!P.nodeType&&P,_=typeof O=="object"&&O;_.global!==_&&_.window!==_&&_.self!==_||(T=_);var b,m,g=2147483647,E=36,o=1,x=26,C=38,A=700,D=72,I=128,F="-",H=/^xn--/,te=/[^\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-o,J=Math.floor,B=String.fromCharCode;if(b={version:"1.4.1",ucs2:{decode:d,encode:a},decode:i,encode:n,toASCII:c,toUnicode:t},typeof U=="function"&&typeof U.amd=="object"&&U.amd)U("punycode",function(){return b});else if(y&&v)if(P.exports==y)v.exports=b;else for(m in b)b.hasOwnProperty(m)&&(y[m]=b[m]);else T.punycode=b}(this)}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(w,P,S){"use strict";function O(l,p){return Object.prototype.hasOwnProperty.call(l,p)}P.exports=function(l,p,h,d){p=p||"&",h=h||"=";var a={};if(typeof l!="string"||l.length===0)return a;var u=/\+/g;l=l.split(p);var s=1e3;d&&typeof d.maxKeys=="number"&&(s=d.maxKeys);var f=l.length;s>0&&f>s&&(f=s);for(var i=0;i<f;++i){var n,t,c,y,v=l[i].replace(u,"%20"),_=v.indexOf(h);_>=0?(n=v.substr(0,_),t=v.substr(_+1)):(n=v,t=""),c=decodeURIComponent(n),y=decodeURIComponent(t),O(a,c)?T(a[c])?a[c].push(y):a[c]=[a[c],y]:a[c]=y}return a};var T=Array.isArray||function(l){return Object.prototype.toString.call(l)==="[object Array]"}},{}],176:[function(w,P,S){"use strict";function O(h,d){if(h.map)return h.map(d);for(var a=[],u=0;u<h.length;u++)a.push(d(h[u],u));return a}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,a,u){return d=d||"&",a=a||"=",h===null&&(h=void 0),typeof h=="object"?O(p(h),function(s){var f=encodeURIComponent(T(s))+a;return l(h[s])?O(h[s],function(i){return f+encodeURIComponent(T(i))}).join(d):f+encodeURIComponent(T(h[s]))}).join(d):u?encodeURIComponent(T(u))+a+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 a in h)Object.prototype.hasOwnProperty.call(h,a)&&d.push(a);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 O(c){if(!(this instanceof O))return new O(c);s.call(this,c),f.call(this,c),c&&c.readable===!1&&(this.readable=!1),c&&c.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,c&&c.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",T)}function T(){this.allowHalfOpen||this._writableState.ended||d.nextTick(l,this)}function l(c){c.end()}var p=w("babel-runtime/core-js/object/keys"),h=function(c){return c&&c.__esModule?c:{default:c}}(p),d=w("process-nextick-args"),a=h.default||function(c){var y=[];for(var v in c)y.push(v);return y};P.exports=O;var u=w("core-util-is");u.inherits=w("inherits");var s=w("./_stream_readable"),f=w("./_stream_writable");u.inherits(O,s);for(var i=a(f.prototype),n=0;n<i.length;n++){var t=i[n];O.prototype[t]||(O.prototype[t]=f.prototype[t])}Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(O.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),O.prototype._destroy=function(c,y){this.push(null),this.end(),d.nextTick(y,c)}},{"./_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 O(p){if(!(this instanceof O))return new O(p);T.call(this,p)}P.exports=O;var T=w("./_stream_transform"),l=w("core-util-is");l.inherits=w("inherits"),l.inherits(O,T),O.prototype._transform=function(p,h,d){d(null,p)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(w,P,S){(function(O,T){"use strict";function l(he){return oe.from(he)}function p(he){return oe.isBuffer(he)||he instanceof Ee}function h(he,ue,Ie){if(typeof he.prependListener=="function")return he.prependListener(ue,Ie);he._events&&he._events[ue]?B(he._events[ue])?he._events[ue].unshift(Ie):he._events[ue]=[Ie,he._events[ue]]:he.on(ue,Ie)}function d(he,ue){J=J||w("./_stream_duplex"),he=he||{};var Ie=ue instanceof J;this.objectMode=!!he.objectMode,Ie&&(this.objectMode=this.objectMode||!!he.readableObjectMode);var Ue=he.highWaterMark,Ye=he.readableHighWaterMark,ee=this.objectMode?16:16384;this.highWaterMark=Ue||Ue===0?Ue:Ie&&(Ye||Ye===0)?Ye:ee,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Be,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=he.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,he.encoding&&(Ce||(Ce=w("string_decoder/").StringDecoder),this.decoder=new Ce(he.encoding),this.encoding=he.encoding)}function a(he){if(J=J||w("./_stream_duplex"),!(this instanceof a))return new a(he);this._readableState=new d(he,this),this.readable=!0,he&&(typeof he.read=="function"&&(this._read=he.read),typeof he.destroy=="function"&&(this._destroy=he.destroy)),ie.call(this)}function u(he,ue,Ie,Ue,Ye){var ee=he._readableState;if(ue===null)ee.reading=!1,c(he,ee);else{var M;Ye||(M=f(ee,ue)),M?he.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?he.emit("error",new Error("stream.unshift() after end event")):s(he,ee,ue,!0):ee.ended?he.emit("error",new Error("stream.push() after EOF")):(ee.reading=!1,ee.decoder&&!Ie?(ue=ee.decoder.write(ue),ee.objectMode||ue.length!==0?s(he,ee,ue,!1):_(he,ee)):s(he,ee,ue,!1))):Ue||(ee.reading=!1)}return i(ee)}function s(he,ue,Ie,Ue){ue.flowing&&ue.length===0&&!ue.sync?(he.emit("data",Ie),he.read(0)):(ue.length+=ue.objectMode?1:Ie.length,Ue?ue.buffer.unshift(Ie):ue.buffer.push(Ie),ue.needReadable&&y(he)),_(he,ue)}function f(he,ue){var Ie;return p(ue)||typeof ue=="string"||ue===void 0||he.objectMode||(Ie=new TypeError("Invalid non-string/buffer chunk")),Ie}function i(he){return!he.ended&&(he.needReadable||he.length<he.highWaterMark||he.length===0)}function n(he){return he>=Ne?he=Ne:(he--,he|=he>>>1,he|=he>>>2,he|=he>>>4,he|=he>>>8,he|=he>>>16,he++),he}function t(he,ue){return he<=0||ue.length===0&&ue.ended?0:ue.objectMode?1:he!==he?ue.flowing&&ue.length?ue.buffer.head.data.length:ue.length:(he>ue.highWaterMark&&(ue.highWaterMark=n(he)),he<=ue.length?he:ue.ended?ue.length:(ue.needReadable=!0,0))}function c(he,ue){if(!ue.ended){if(ue.decoder){var Ie=ue.decoder.end();Ie&&Ie.length&&(ue.buffer.push(Ie),ue.length+=ue.objectMode?1:Ie.length)}ue.ended=!0,y(he)}}function y(he){var ue=he._readableState;ue.needReadable=!1,ue.emittedReadable||(pe("emitReadable",ue.flowing),ue.emittedReadable=!0,ue.sync?X.nextTick(v,he):v(he))}function v(he){pe("emit readable"),he.emit("readable"),x(he)}function _(he,ue){ue.readingMore||(ue.readingMore=!0,X.nextTick(b,he,ue))}function b(he,ue){for(var Ie=ue.length;!ue.reading&&!ue.flowing&&!ue.ended&&ue.length<ue.highWaterMark&&(pe("maybeReadMore read 0"),he.read(0),Ie!==ue.length);)Ie=ue.length;ue.readingMore=!1}function m(he){return function(){var ue=he._readableState;pe("pipeOnDrain",ue.awaitDrain),ue.awaitDrain&&ue.awaitDrain--,ue.awaitDrain===0&&Q(he,"data")&&(ue.flowing=!0,x(he))}}function g(he){pe("readable nexttick read 0"),he.read(0)}function E(he,ue){ue.resumeScheduled||(ue.resumeScheduled=!0,X.nextTick(o,he,ue))}function o(he,ue){ue.reading||(pe("resume read 0"),he.read(0)),ue.resumeScheduled=!1,ue.awaitDrain=0,he.emit("resume"),x(he),ue.flowing&&!ue.reading&&he.read(0)}function x(he){var ue=he._readableState;for(pe("flow",ue.flowing);ue.flowing&&he.read()!==null;);}function C(he,ue){if(ue.length===0)return null;var Ie;return ue.objectMode?Ie=ue.buffer.shift():!he||he>=ue.length?(Ie=ue.decoder?ue.buffer.join(""):ue.buffer.length===1?ue.buffer.head.data:ue.buffer.concat(ue.length),ue.buffer.clear()):Ie=A(he,ue.buffer,ue.decoder),Ie}function A(he,ue,Ie){var Ue;return he<ue.head.data.length?(Ue=ue.head.data.slice(0,he),ue.head.data=ue.head.data.slice(he)):Ue=he===ue.head.data.length?ue.shift():Ie?D(he,ue):I(he,ue),Ue}function D(he,ue){var Ie=ue.head,Ue=1,Ye=Ie.data;for(he-=Ye.length;Ie=Ie.next;){var ee=Ie.data,M=he>ee.length?ee.length:he;if(M===ee.length?Ye+=ee:Ye+=ee.slice(0,he),(he-=M)===0){M===ee.length?(++Ue,Ie.next?ue.head=Ie.next:ue.head=ue.tail=null):(ue.head=Ie,Ie.data=ee.slice(M));break}++Ue}return ue.length-=Ue,Ye}function I(he,ue){var Ie=oe.allocUnsafe(he),Ue=ue.head,Ye=1;for(Ue.data.copy(Ie),he-=Ue.data.length;Ue=Ue.next;){var ee=Ue.data,M=he>ee.length?ee.length:he;if(ee.copy(Ie,Ie.length-he,0,M),(he-=M)===0){M===ee.length?(++Ye,Ue.next?ue.head=Ue.next:ue.head=ue.tail=null):(ue.head=Ue,Ue.data=ee.slice(M));break}++Ye}return ue.length-=Ye,Ie}function F(he){var ue=he._readableState;if(ue.length>0)throw new Error('"endReadable()" called on non-empty stream');ue.endEmitted||(ue.ended=!0,X.nextTick(H,ue,he))}function H(he,ue){he.endEmitted||he.length!==0||(he.endEmitted=!0,ue.readable=!1,ue.emit("end"))}function te(he,ue){for(var Ie=0,Ue=he.length;Ie<Ue;Ie++)if(he[Ie]===ue)return Ie;return-1}var j=w("babel-runtime/core-js/object/get-prototype-of"),G=function(he){return he&&he.__esModule?he:{default:he}}(j),X=w("process-nextick-args");P.exports=a;var J,B=w("isarray");a.ReadableState=d;var Q=(w("events").EventEmitter,function(he,ue){return he.listeners(ue).length}),ie=w("./internal/streams/stream"),oe=w("safe-buffer").Buffer,Ee=T.Uint8Array||function(){},ye=w("core-util-is");ye.inherits=w("inherits");var Le=w("util"),pe=void 0;pe=Le&&Le.debuglog?Le.debuglog("stream"):function(){};var Ce,Be=w("./internal/streams/BufferList"),Pe=w("./internal/streams/destroy");ye.inherits(a,ie);var ke=["error","close","destroy","pause","resume"];Object.defineProperty(a.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(he){this._readableState&&(this._readableState.destroyed=he)}}),a.prototype.destroy=Pe.destroy,a.prototype._undestroy=Pe.undestroy,a.prototype._destroy=function(he,ue){this.push(null),ue(he)},a.prototype.push=function(he,ue){var Ie,Ue=this._readableState;return Ue.objectMode?Ie=!0:typeof he=="string"&&(ue=ue||Ue.defaultEncoding,ue!==Ue.encoding&&(he=oe.from(he,ue),ue=""),Ie=!0),u(this,he,ue,!1,Ie)},a.prototype.unshift=function(he){return u(this,he,null,!0,!1)},a.prototype.isPaused=function(){return this._readableState.flowing===!1},a.prototype.setEncoding=function(he){return Ce||(Ce=w("string_decoder/").StringDecoder),this._readableState.decoder=new Ce(he),this._readableState.encoding=he,this};var Ne=8388608;a.prototype.read=function(he){pe("read",he),he=parseInt(he,10);var ue=this._readableState,Ie=he;if(he!==0&&(ue.emittedReadable=!1),he===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((he=t(he,ue))===0&&ue.ended)return ue.length===0&&F(this),null;var Ue=ue.needReadable;pe("need readable",Ue),(ue.length===0||ue.length-he<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||(he=t(Ie,ue)));var Ye;return Ye=he>0?C(he,ue):null,Ye===null?(ue.needReadable=!0,he=0):ue.length-=he,ue.length===0&&(ue.ended||(ue.needReadable=!0),Ie!==he&&ue.ended&&F(this)),Ye!==null&&this.emit("data",Ye),Ye},a.prototype._read=function(he){this.emit("error",new Error("_read() is not implemented"))},a.prototype.pipe=function(he,ue){function Ie(tt,Ve){pe("onunpipe"),tt===Y&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,Ye())}function Ue(){pe("onend"),he.end()}function Ye(){pe("cleanup"),he.removeListener("close",N),he.removeListener("finish",$),he.removeListener("drain",De),he.removeListener("error",M),he.removeListener("unpipe",Ie),Y.removeListener("end",Ue),Y.removeListener("end",V),Y.removeListener("data",ee),Me=!0,!me.awaitDrain||he._writableState&&!he._writableState.needDrain||De()}function ee(tt){pe("ondata"),Xe=!1,he.write(tt)!==!1||Xe||((me.pipesCount===1&&me.pipes===he||me.pipesCount>1&&te(me.pipes,he)!==-1)&&!Me&&(pe("false write response, pause",Y._readableState.awaitDrain),Y._readableState.awaitDrain++,Xe=!0),Y.pause())}function M(tt){pe("onerror",tt),V(),he.removeListener("error",M),Q(he,"error")===0&&he.emit("error",tt)}function N(){he.removeListener("finish",$),V()}function $(){pe("onfinish"),he.removeListener("close",N),V()}function V(){pe("unpipe"),Y.unpipe(he)}var Y=this,me=this._readableState;switch(me.pipesCount){case 0:me.pipes=he;break;case 1:me.pipes=[me.pipes,he];break;default:me.pipes.push(he)}me.pipesCount+=1,pe("pipe count=%d opts=%j",me.pipesCount,ue);var Re=(!ue||ue.end!==!1)&&he!==O.stdout&&he!==O.stderr,rt=Re?Ue:V;me.endEmitted?X.nextTick(rt):Y.once("end",rt),he.on("unpipe",Ie);var De=m(Y);he.on("drain",De);var Me=!1,Xe=!1;return Y.on("data",ee),h(he,"error",M),he.once("close",N),he.once("finish",$),he.emit("pipe",Y),me.flowing||(pe("pipe resume"),Y.resume()),he},a.prototype.unpipe=function(he){var ue=this._readableState,Ie={hasUnpiped:!1};if(ue.pipesCount===0)return this;if(ue.pipesCount===1)return he&&he!==ue.pipes?this:(he||(he=ue.pipes),ue.pipes=null,ue.pipesCount=0,ue.flowing=!1,he&&he.emit("unpipe",this,Ie),this);if(!he){var Ue=ue.pipes,Ye=ue.pipesCount;ue.pipes=null,ue.pipesCount=0,ue.flowing=!1;for(var ee=0;ee<Ye;ee++)Ue[ee].emit("unpipe",this,Ie);return this}var M=te(ue.pipes,he);return M===-1?this:(ue.pipes.splice(M,1),ue.pipesCount-=1,ue.pipesCount===1&&(ue.pipes=ue.pipes[0]),he.emit("unpipe",this,Ie),this)},a.prototype.on=function(he,ue){var Ie=ie.prototype.on.call(this,he,ue);if(he==="data")this._readableState.flowing!==!1&&this.resume();else if(he==="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(g,this))}return Ie},a.prototype.addListener=a.prototype.on,a.prototype.resume=function(){var he=this._readableState;return he.flowing||(pe("resume"),he.flowing=!0,E(this,he)),this},a.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},a.prototype.wrap=function(he){var ue=this,Ie=this._readableState,Ue=!1;he.on("end",function(){if(pe("wrapped end"),Ie.decoder&&!Ie.ended){var M=Ie.decoder.end();M&&M.length&&ue.push(M)}ue.push(null)}),he.on("data",function(M){(pe("wrapped data"),Ie.decoder&&(M=Ie.decoder.write(M)),(!Ie.objectMode||M!=null)&&(Ie.objectMode||M&&M.length))&&(ue.push(M)||(Ue=!0,he.pause()))});for(var Ye in he)this[Ye]===void 0&&typeof he[Ye]=="function"&&(this[Ye]=function(M){return function(){return he[M].apply(he,arguments)}}(Ye));for(var ee=0;ee<ke.length;ee++)he.on(ke[ee],this.emit.bind(this,ke[ee]));return this._read=function(M){pe("wrapped _read",M),Ue&&(Ue=!1,he.resume())},this},Object.defineProperty(a.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),a._fromList=C}).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 O(a,u){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,u!=null&&this.push(u),f(a);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function T(a){if(!(this instanceof T))return new T(a);h.call(this,a),this._transformState={afterTransform:O.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,a&&(typeof a.transform=="function"&&(this._transform=a.transform),typeof a.flush=="function"&&(this._flush=a.flush)),this.on("prefinish",l)}function l(){var a=this;typeof this._flush=="function"?this._flush(function(u,s){p(a,u,s)}):p(this,null,null)}function p(a,u,s){if(u)return a.emit("error",u);if(s!=null&&a.push(s),a._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(a._transformState.transforming)throw new Error("Calling transform done when still transforming");return a.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(a,u){return this._transformState.needTransform=!1,h.prototype.push.call(this,a,u)},T.prototype._transform=function(a,u,s){throw new Error("_transform() is not implemented")},T.prototype._write=function(a,u,s){var f=this._transformState;if(f.writecb=s,f.writechunk=a,f.writeencoding=u,!f.transforming){var i=this._readableState;(f.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},T.prototype._read=function(a){var u=this._transformState;u.writechunk!==null&&u.writecb&&!u.transforming?(u.transforming=!0,this._transform(u.writechunk,u.writeencoding,u.afterTransform)):u.needTransform=!0},T.prototype._destroy=function(a,u){var s=this;h.prototype._destroy.call(this,a,function(f){u(f),s.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(w,P,S){(function(O,T){"use strict";function l(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}function p(Pe){var ke=this;this.next=null,this.entry=null,this.finish=function(){D(ke,Pe)}}function h(Pe){return Le.from(Pe)}function d(Pe){return Le.isBuffer(Pe)||Pe instanceof pe}function a(){}function u(Pe,ke){Q=Q||w("./_stream_duplex"),Pe=Pe||{};var Ne=ke instanceof Q;this.objectMode=!!Pe.objectMode,Ne&&(this.objectMode=this.objectMode||!!Pe.writableObjectMode);var he=Pe.highWaterMark,ue=Pe.writableHighWaterMark,Ie=this.objectMode?16:16384;this.highWaterMark=he||he===0?he:Ne&&(ue||ue===0)?ue:Ie,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=Pe.decodeStrings===!1;this.decodeStrings=!Ue,this.defaultEncoding=Pe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ye){_(ke,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(Pe){if(Q=Q||w("./_stream_duplex"),!(Be.call(s,this)||this instanceof Q))return new s(Pe);this._writableState=new u(Pe,this),this.writable=!0,Pe&&(typeof Pe.write=="function"&&(this._write=Pe.write),typeof Pe.writev=="function"&&(this._writev=Pe.writev),typeof Pe.destroy=="function"&&(this._destroy=Pe.destroy),typeof Pe.final=="function"&&(this._final=Pe.final)),ye.call(this)}function f(Pe,ke){var Ne=new Error("write after end");Pe.emit("error",Ne),B.nextTick(ke,Ne)}function i(Pe,ke,Ne,he){var ue=!0,Ie=!1;return Ne===null?Ie=new TypeError("May not write null values to stream"):typeof Ne=="string"||Ne===void 0||ke.objectMode||(Ie=new TypeError("Invalid non-string/buffer chunk")),Ie&&(Pe.emit("error",Ie),B.nextTick(he,Ie),ue=!1),ue}function n(Pe,ke,Ne){return Pe.objectMode||Pe.decodeStrings===!1||typeof ke!="string"||(ke=Le.from(ke,Ne)),ke}function t(Pe,ke,Ne,he,ue,Ie){if(!Ne){var Ue=n(ke,he,ue);he!==Ue&&(Ne=!0,ue="buffer",he=Ue)}var Ye=ke.objectMode?1:he.length;ke.length+=Ye;var ee=ke.length<ke.highWaterMark;if(ee||(ke.needDrain=!0),ke.writing||ke.corked){var M=ke.lastBufferedRequest;ke.lastBufferedRequest={chunk:he,encoding:ue,isBuf:Ne,callback:Ie,next:null},M?M.next=ke.lastBufferedRequest:ke.bufferedRequest=ke.lastBufferedRequest,ke.bufferedRequestCount+=1}else c(Pe,ke,!1,Ye,he,ue,Ie);return ee}function c(Pe,ke,Ne,he,ue,Ie,Ue){ke.writelen=he,ke.writecb=Ue,ke.writing=!0,ke.sync=!0,Ne?Pe._writev(ue,ke.onwrite):Pe._write(ue,Ie,ke.onwrite),ke.sync=!1}function y(Pe,ke,Ne,he,ue){--ke.pendingcb,Ne?(B.nextTick(ue,he),B.nextTick(C,Pe,ke),Pe._writableState.errorEmitted=!0,Pe.emit("error",he)):(ue(he),Pe._writableState.errorEmitted=!0,Pe.emit("error",he),C(Pe,ke))}function v(Pe){Pe.writing=!1,Pe.writecb=null,Pe.length-=Pe.writelen,Pe.writelen=0}function _(Pe,ke){var Ne=Pe._writableState,he=Ne.sync,ue=Ne.writecb;if(v(Ne),ke)y(Pe,Ne,he,ke,ue);else{var Ie=E(Ne);Ie||Ne.corked||Ne.bufferProcessing||!Ne.bufferedRequest||g(Pe,Ne),he?ie(b,Pe,Ne,Ie,ue):b(Pe,Ne,Ie,ue)}}function b(Pe,ke,Ne,he){Ne||m(Pe,ke),ke.pendingcb--,he(),C(Pe,ke)}function m(Pe,ke){ke.length===0&&ke.needDrain&&(ke.needDrain=!1,Pe.emit("drain"))}function g(Pe,ke){ke.bufferProcessing=!0;var Ne=ke.bufferedRequest;if(Pe._writev&&Ne&&Ne.next){var he=ke.bufferedRequestCount,ue=new Array(he),Ie=ke.corkedRequestsFree;Ie.entry=Ne;for(var Ue=0,Ye=!0;Ne;)ue[Ue]=Ne,Ne.isBuf||(Ye=!1),Ne=Ne.next,Ue+=1;ue.allBuffers=Ye,c(Pe,ke,!0,ke.length,ue,"",Ie.finish),ke.pendingcb++,ke.lastBufferedRequest=null,Ie.next?(ke.corkedRequestsFree=Ie.next,Ie.next=null):ke.corkedRequestsFree=new p(ke),ke.bufferedRequestCount=0}else{for(;Ne;){var ee=Ne.chunk,M=Ne.encoding,N=Ne.callback;if(c(Pe,ke,!1,ke.objectMode?1:ee.length,ee,M,N),Ne=Ne.next,ke.bufferedRequestCount--,ke.writing)break}Ne===null&&(ke.lastBufferedRequest=null)}ke.bufferedRequest=Ne,ke.bufferProcessing=!1}function E(Pe){return Pe.ending&&Pe.length===0&&Pe.bufferedRequest===null&&!Pe.finished&&!Pe.writing}function o(Pe,ke){Pe._final(function(Ne){ke.pendingcb--,Ne&&Pe.emit("error",Ne),ke.prefinished=!0,Pe.emit("prefinish"),C(Pe,ke)})}function x(Pe,ke){ke.prefinished||ke.finalCalled||(typeof Pe._final=="function"?(ke.pendingcb++,ke.finalCalled=!0,B.nextTick(o,Pe,ke)):(ke.prefinished=!0,Pe.emit("prefinish")))}function C(Pe,ke){var Ne=E(ke);return Ne&&(x(Pe,ke),ke.pendingcb===0&&(ke.finished=!0,Pe.emit("finish"))),Ne}function A(Pe,ke,Ne){ke.ending=!0,C(Pe,ke),Ne&&(ke.finished?B.nextTick(Ne):Pe.once("finish",Ne)),ke.ended=!0,Pe.writable=!1}function D(Pe,ke,Ne){var he=Pe.entry;for(Pe.entry=null;he;){var ue=he.callback;ke.pendingcb--,ue(Ne),he=he.next}ke.corkedRequestsFree?ke.corkedRequestsFree.next=Pe:ke.corkedRequestsFree=Pe}var I=w("babel-runtime/core-js/object/define-property"),F=l(I),H=w("babel-runtime/core-js/symbol/has-instance"),te=l(H),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=!O.browser&&["v0.10","v0.9."].indexOf(O.version.slice(0,5))>-1?J.default:B.nextTick;s.WritableState=u;var oe=w("core-util-is");oe.inherits=w("inherits");var Ee={deprecate:w("util-deprecate")},ye=w("./internal/streams/stream"),Le=w("safe-buffer").Buffer,pe=T.Uint8Array||function(){},Ce=w("./internal/streams/destroy");oe.inherits(s,ye),u.prototype.getBuffer=function(){for(var Pe=this.bufferedRequest,ke=[];Pe;)ke.push(Pe),Pe=Pe.next;return ke},function(){try{Object.defineProperty(u.prototype,"buffer",{get:Ee.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Pe){}}();var Be;typeof G.default=="function"&&te.default&&typeof Function.prototype[te.default]=="function"?(Be=Function.prototype[te.default],(0,F.default)(s,te.default,{value:function(Pe){return!!Be.call(this,Pe)||this===s&&Pe&&Pe._writableState instanceof u}})):Be=function(Pe){return Pe instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(Pe,ke,Ne){var he=this._writableState,ue=!1,Ie=!he.objectMode&&d(Pe);return Ie&&!Le.isBuffer(Pe)&&(Pe=h(Pe)),typeof ke=="function"&&(Ne=ke,ke=null),Ie?ke="buffer":ke||(ke=he.defaultEncoding),typeof Ne!="function"&&(Ne=a),he.ended?f(this,Ne):(Ie||i(this,he,Pe,Ne))&&(he.pendingcb++,ue=t(this,he,Ie,Pe,ke,Ne)),ue},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var Pe=this._writableState;Pe.corked&&(Pe.corked--,Pe.writing||Pe.corked||Pe.finished||Pe.bufferProcessing||!Pe.bufferedRequest||g(this,Pe))},s.prototype.setDefaultEncoding=function(Pe){if(typeof Pe=="string"&&(Pe=Pe.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Pe+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Pe);return this._writableState.defaultEncoding=Pe,this},Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),s.prototype._write=function(Pe,ke,Ne){Ne(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(Pe,ke,Ne){var he=this._writableState;typeof Pe=="function"?(Ne=Pe,Pe=null,ke=null):typeof ke=="function"&&(Ne=ke,ke=null),Pe!=null&&this.write(Pe,ke),he.corked&&(he.corked=1,this.uncork()),he.ending||he.finished||A(this,he,Ne)},Object.defineProperty(s.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Pe){this._writableState&&(this._writableState.destroyed=Pe)}}),s.prototype.destroy=Ce.destroy,s.prototype._undestroy=Ce.undestroy,s.prototype._destroy=function(Pe,ke){this.end(),ke(Pe)}}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(w,P,S){"use strict";function O(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}function T(h,d,a){h.copy(d,a)}var l=w("safe-buffer").Buffer,p=w("util");P.exports=function(){function h(){O(this,h),this.head=null,this.tail=null,this.length=0}return h.prototype.push=function(d){var a={data:d,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length},h.prototype.unshift=function(d){var a={data:d,next:this.head};this.length===0&&(this.tail=a),this.head=a,++this.length},h.prototype.shift=function(){if(this.length!==0){var d=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,d}},h.prototype.clear=function(){this.head=this.tail=null,this.length=0},h.prototype.join=function(d){if(this.length===0)return"";for(var a=this.head,u=""+a.data;a=a.next;)u+=d+a.data;return u},h.prototype.concat=function(d){if(this.length===0)return l.alloc(0);if(this.length===1)return this.head.data;for(var a=l.allocUnsafe(d>>>0),u=this.head,s=0;u;)T(u.data,a,s),s+=u.data.length,u=u.next;return a},h}(),p&&p.inspect&&p.inspect.custom&&(P.exports.prototype[p.inspect.custom]=function(){var h=p.inspect({length:this.length});return this.constructor.name+" "+h})},{"safe-buffer":193,util:36}],185:[function(w,P,S){"use strict";function O(h,d){var a=this,u=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return u||s?(d?d(h):!h||this._writableState&&this._writableState.errorEmitted||p.nextTick(l,this,h),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(f){!d&&f?(p.nextTick(l,a,f),a._writableState&&(a._writableState.errorEmitted=!0)):d&&d(f)}),this)}function T(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(h,d){h.emit("error",d)}var p=w("process-nextick-args");P.exports={destroy:O,undestroy:T}},{"process-nextick-args":172}],186:[function(w,P,S){"use strict";P.exports=w("events").EventEmitter},{events:158}],187:[function(w,P,S){P.exports=w("./readable").PassThrough},{"./readable":188}],188:[function(w,P,S){S=P.exports=w("./lib/_stream_readable.js"),S.Stream=S,S.Readable=S,S.Writable=w("./lib/_stream_writable.js"),S.Duplex=w("./lib/_stream_duplex.js"),S.Transform=w("./lib/_stream_transform.js"),S.PassThrough=w("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":179,"./lib/_stream_passthrough.js":180,"./lib/_stream_readable.js":181,"./lib/_stream_transform.js":182,"./lib/_stream_writable.js":183}],189:[function(w,P,S){P.exports=w("./readable").Transform},{"./readable":188}],190:[function(w,P,S){P.exports=w("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(w,P,S){var O=function(){return this}()||Function("return this")(),T=O.regeneratorRuntime&&Object.getOwnPropertyNames(O).indexOf("regeneratorRuntime")>=0,l=T&&O.regeneratorRuntime;if(O.regeneratorRuntime=void 0,P.exports=w("./runtime"),T)O.regeneratorRuntime=l;else try{delete O.regeneratorRuntime}catch(p){O.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(w,P,S){!function(O){"use strict";function T(J,B,Q,ie){var oe=B&&B.prototype instanceof p?B:p,Ee=Object.create(oe.prototype),ye=new t(ie||[]);return Ee._invoke=s(J,Q,ye),Ee}function l(J,B,Q){try{return{type:"normal",arg:J.call(B,Q)}}catch(ie){return{type:"throw",arg:ie}}}function p(){}function h(){}function d(){}function a(J){["next","throw","return"].forEach(function(B){J[B]=function(Q){return this._invoke(B,Q)}})}function u(J){function B(oe,Ee,ye,Le){var pe=l(J[oe],J,Ee);if(pe.type!=="throw"){var Ce=pe.arg,Be=Ce.value;return Be&&typeof Be=="object"&&b.call(Be,"__await")?Promise.resolve(Be.__await).then(function(Pe){B("next",Pe,ye,Le)},function(Pe){B("throw",Pe,ye,Le)}):Promise.resolve(Be).then(function(Pe){Ce.value=Pe,ye(Ce)},Le)}Le(pe.arg)}function Q(oe,Ee){function ye(){return new Promise(function(Le,pe){B(oe,Ee,Le,pe)})}return ie=ie?ie.then(ye,ye):ye()}var ie;this._invoke=Q}function s(J,B,Q){var ie=A;return function(oe,Ee){if(ie===I)throw new Error("Generator is already running");if(ie===F){if(oe==="throw")throw Ee;return y()}for(Q.method=oe,Q.arg=Ee;;){var ye=Q.delegate;if(ye){var Le=f(ye,Q);if(Le){if(Le===H)continue;return Le}}if(Q.method==="next")Q.sent=Q._sent=Q.arg;else if(Q.method==="throw"){if(ie===A)throw ie=F,Q.arg;Q.dispatchException(Q.arg)}else Q.method==="return"&&Q.abrupt("return",Q.arg);ie=I;var pe=l(J,B,Q);if(pe.type==="normal"){if(ie=Q.done?F:D,pe.arg===H)continue;return{value:pe.arg,done:Q.done}}pe.type==="throw"&&(ie=F,Q.method="throw",Q.arg=pe.arg)}}}function f(J,B){var Q=J.iterator[B.method];if(Q===v){if(B.delegate=null,B.method==="throw"){if(J.iterator.return&&(B.method="return",B.arg=v,f(J,B),B.method==="throw"))return H;B.method="throw",B.arg=new TypeError("The iterator does not provide a 'throw' method")}return H}var ie=l(Q,J.iterator,B.arg);if(ie.type==="throw")return B.method="throw",B.arg=ie.arg,B.delegate=null,H;var oe=ie.arg;return oe?oe.done?(B[J.resultName]=oe.value,B.next=J.nextLoc,B.method!=="return"&&(B.method="next",B.arg=v),B.delegate=null,H):oe:(B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,H)}function i(J){var B={tryLoc:J[0]};1 in J&&(B.catchLoc=J[1]),2 in J&&(B.finallyLoc=J[2],B.afterLoc=J[3]),this.tryEntries.push(B)}function n(J){var B=J.completion||{};B.type="normal",delete B.arg,J.completion=B}function t(J){this.tryEntries=[{tryLoc:"root"}],J.forEach(i,this),this.reset(!0)}function c(J){if(J){var B=J[g];if(B)return B.call(J);if(typeof J.next=="function")return J;if(!isNaN(J.length)){var Q=-1,ie=function oe(){for(;++Q<J.length;)if(b.call(J,Q))return oe.value=J[Q],oe.done=!1,oe;return oe.value=v,oe.done=!0,oe};return ie.next=ie}}return{next:y}}function y(){return{value:v,done:!0}}var v,_=Object.prototype,b=_.hasOwnProperty,m=typeof Symbol=="function"?Symbol:{},g=m.iterator||"@@iterator",E=m.asyncIterator||"@@asyncIterator",o=m.toStringTag||"@@toStringTag",x=typeof P=="object",C=O.regeneratorRuntime;if(C)return void(x&&(P.exports=C));C=O.regeneratorRuntime=x?P.exports:{},C.wrap=T;var A="suspendedStart",D="suspendedYield",I="executing",F="completed",H={},te={};te[g]=function(){return this};var j=Object.getPrototypeOf,G=j&&j(j(c([])));G&&G!==_&&b.call(G,g)&&(te=G);var X=d.prototype=p.prototype=Object.create(te);h.prototype=X.constructor=d,d.constructor=h,d[o]=h.displayName="GeneratorFunction",C.isGeneratorFunction=function(J){var B=typeof J=="function"&&J.constructor;return!!B&&(B===h||(B.displayName||B.name)==="GeneratorFunction")},C.mark=function(J){return Object.setPrototypeOf?Object.setPrototypeOf(J,d):(J.__proto__=d,o in J||(J[o]="GeneratorFunction")),J.prototype=Object.create(X),J},C.awrap=function(J){return{__await:J}},a(u.prototype),u.prototype[E]=function(){return this},C.AsyncIterator=u,C.async=function(J,B,Q,ie){var oe=new u(T(J,B,Q,ie));return C.isGeneratorFunction(B)?oe:oe.next().then(function(Ee){return Ee.done?Ee.value:oe.next()})},a(X),X[o]="Generator",X[g]=function(){return this},X.toString=function(){return"[object Generator]"},C.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}},C.values=c,t.prototype={constructor:t,reset:function(J){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(n),!J)for(var B in this)B.charAt(0)==="t"&&b.call(this,B)&&!isNaN(+B.slice(1))&&(this[B]=v)},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,Ce){return Ee.type="throw",Ee.arg=J,Q.next=pe,Ce&&(Q.method="next",Q.arg=v),!!Ce}if(this.done)throw J;for(var Q=this,ie=this.tryEntries.length-1;ie>=0;--ie){var oe=this.tryEntries[ie],Ee=oe.completion;if(oe.tryLoc==="root")return B("end");if(oe.tryLoc<=this.prev){var ye=b.call(oe,"catchLoc"),Le=b.call(oe,"finallyLoc");if(ye&&Le){if(this.prev<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(!Le)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 Ee=oe?oe.completion:{};return Ee.type=J,Ee.arg=B,oe?(this.method="next",this.next=oe.finallyLoc,H):this.complete(Ee)},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),H},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),H}},catch:function(J){for(var B=this.tryEntries.length-1;B>=0;--B){var Q=this.tryEntries[B];if(Q.tryLoc===J){var ie=Q.completion;if(ie.type==="throw"){var oe=ie.arg;n(Q)}return oe}}throw new Error("illegal catch attempt")},delegateYield:function(J,B,Q){return this.delegate={iterator:c(J),resultName:B,nextLoc:Q},this.method==="next"&&(this.arg=v),H}}}(function(){return this}()||Function("return this")())},{}],193:[function(w,P,S){function O(h,d){for(var a in h)d[a]=h[a]}function T(h,d,a){return p(h,d,a)}var l=w("buffer"),p=l.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?P.exports=l:(O(l,S),S.Buffer=T),O(p,T),T.from=function(h,d,a){if(typeof h=="number")throw new TypeError("Argument must not be a number");return p(h,d,a)},T.alloc=function(h,d,a){if(typeof h!="number")throw new TypeError("Argument must be a number");var u=p(h);return d!==void 0?typeof a=="string"?u.fill(d,a):u.fill(d):u.fill(0),u},T.allocUnsafe=function(h){if(typeof h!="number")throw new TypeError("Argument must be a number");return p(h)},T.allocUnsafeSlow=function(h){if(typeof h!="number")throw new TypeError("Argument must be a number");return l.SlowBuffer(h)}},{buffer:38}],194:[function(w,P,S){(function(O){"use strict";function T(y){return y&&y.__esModule?y:{default:y}}var l=w("babel-runtime/core-js/string/from-code-point"),p=T(l),h=w("babel-runtime/core-js/json/stringify"),d=T(h),a=w("babel-runtime/helpers/typeof"),u=T(a),s=w("babel-runtime/core-js/object/define-property"),f=T(s),i=w("babel-runtime/core-js/object/keys"),n=T(i),t=w("babel-runtime/core-js/object/create"),c=T(t);!function(y){function v(V,Y){if(!(this instanceof v))return new v(V,Y);var me=this;b(me),me.q=me.c="",me.bufferCheckPosition=y.MAX_BUFFER_LENGTH,me.opt=Y||{},me.opt.lowercase=me.opt.lowercase||me.opt.lowercasetags,me.looseCase=me.opt.lowercase?"toLowerCase":"toUpperCase",me.tags=[],me.closed=me.closedRoot=me.sawRoot=!1,me.tag=me.error=null,me.strict=!!V,me.noscript=!(!V&&!me.opt.noscript),me.state=N.BEGIN,me.strictEntities=me.opt.strictEntities,me.ENTITIES=me.strictEntities?(0,c.default)(y.XML_ENTITIES):(0,c.default)(y.ENTITIES),me.attribList=[],me.opt.xmlns&&(me.ns=(0,c.default)(Ie)),me.trackPosition=me.opt.position!==!1,me.trackPosition&&(me.position=me.line=me.column=0),I(me,"onready")}function _(V){for(var Y=Math.max(y.MAX_BUFFER_LENGTH,10),me=0,Re=0,rt=Ce.length;Re<rt;Re++){var De=V[Ce[Re]].length;if(De>Y)switch(Ce[Re]){case"textNode":H(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: "+Ce[Re])}me=Math.max(me,De)}var Me=y.MAX_BUFFER_LENGTH-me;V.bufferCheckPosition=Me+V.position}function b(V){for(var Y=0,me=Ce.length;Y<me;Y++)V[Ce[Y]]=""}function m(V){H(V),V.cdata!==""&&(F(V,"oncdata",V.cdata),V.cdata=""),V.script!==""&&(F(V,"onscript",V.script),V.script="")}function g(V,Y){return new E(V,Y)}function E(V,Y){if(!(this instanceof E))return new E(V,Y);Be.apply(this),this._parser=new v(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,Pe.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 o(V){return V===" "||V===`
|
|
|
`||V==="\r"||V===" "}function x(V){return V==='"'||V==="'"}function C(V){return V===">"||o(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&&H(V),I(V,Y,me)}function H(V){V.textNode=te(V.opt,V.textNode),V.textNode&&I(V,"ontext",V.textNode),V.textNode=""}function te(V,Y){return V.trim&&(Y=Y.trim()),V.normalize&&(Y=Y.replace(/\s+/g," ")),Y}function j(V,Y){return H(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"),H(V),V.c="",V.closed=!0,I(V,"onend"),v.call(V,V.strict,V.opt),V}function X(V,Y){if((V===void 0?"undefined":(0,u.default)(V))!=="object"||!(V instanceof v))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],De=Re[1];return Y&&V==="xmlns"&&(rt="xmlns",De=""),{prefix:rt,local:De}}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!==he)X(V,"xml: prefix must be bound to "+he+`
|
|
|
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,De=V.tags[V.tags.length-1]||V;rt.ns===De.ns&&(rt.ns=(0,c.default)(De.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(ge){F(V,"onopennamespace",{prefix:ge,uri:me.ns[ge]})});for(var De=0,Me=V.attribList.length;De<Me;De++){var Xe=V.attribList[De],tt=Xe[0],Ve=Xe[1],Ke=B(tt,!0),we=Ke.prefix,Ae=Ke.local,Oe=we===""?"":me.ns[we]||"",fe={name:tt,value:Ve,prefix:we,local:Ae,uri:Oe};we&&we!=="xmlns"&&!Oe&&(X(V,"Unbound namespace prefix: "+(0,d.default)(we)),fe.uri=we),V.tag.attributes[tt]=fe,F(V,"onattribute",fe)}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 De=V.tag=V.tags.pop();V.tagName=V.tag.name,F(V,"onclosetag",V.tagName);var Me={};for(var Xe in De.ns)Me[Xe]=De.ns[Xe];var tt=V.tags[V.tags.length-1]||V;V.opt.xmlns&&De.ns!==tt.ns&&(0,n.default)(De.ns).forEach(function(Ve){var Ke=De.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 Ee(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):o(Y)||(X(V,"Non-whitespace before first tag."),V.textNode=Y,V.state=N.TEXT)}function Le(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,u.default)(V))==="object"&&(V=V.toString());for(var me=0,Re="";!(Re=Le(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=Le(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?(o(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(!o(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 De=Y.position-Y.startTagPosition;Re=new Array(De).join(" ")+Re}Y.textNode+="<"+Re,Y.state=N.TEXT}continue;case N.SGML_DECL:(Y.sgmlDecl+Re).toUpperCase()===ke?(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()===Ne?(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=te(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:o(Re)?Y.state=N.PROC_INST_BODY:Y.procInstName+=Re;continue;case N.PROC_INST_BODY:if(!Y.procInstBody&&o(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:(o(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(o(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)):o(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(o(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(o(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:o(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(!C(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):(o(Re)||X(Y,"Invalid tagname in closing tag"),Y.state=N.CLOSE_TAG_SAW_WHITE);else{if(o(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(o(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 Me,Xe;switch(Y.state){case N.TEXT_ENTITY:Me=N.TEXT,Xe="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:Me=N.ATTRIB_VALUE_QUOTED,Xe="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:Me=N.ATTRIB_VALUE_UNQUOTED,Xe="attribValue"}Re===";"?(Y[Xe]+=Ee(Y),Y.entity="",Y.state=Me):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=Me);continue;default:throw new Error(Y,"Unknown state: "+Y.state)}return Y.position>=Y.bufferCheckPosition&&_(Y),Y}y.parser=function(V,Y){return new v(V,Y)},y.SAXParser=v,y.SAXStream=E,y.createStream=g,y.MAX_BUFFER_LENGTH=65536;var Ce=["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"],c.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}),v.prototype={end:function(){G(this)},write:pe,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){m(this)}};var Be;try{Be=w("stream").Stream}catch(V){Be=function(){}}var Pe=y.EVENTS.filter(function(V){return V!=="error"&&V!=="end"});E.prototype=(0,c.default)(Be.prototype,{constructor:{value:E}}),E.prototype.write=function(V){if(typeof O=="function"&&typeof O.isBuffer=="function"&&O.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]||Pe.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)}),Be.prototype.on.call(me,V,Y)};var ke="[CDATA[",Ne="DOCTYPE",he="http://www.w3.org/XML/1998/namespace",ue="http://www.w3.org/2000/xmlns/",Ie={xml:he,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,De=[],Me=-1,Xe=arguments.length;if(!Xe)return"";for(var tt="";++Me<Xe;){var Ve=Number(arguments[Me]);if(!isFinite(Ve)||Ve<0||Ve>1114111||Y(Ve)!==Ve)throw RangeError("Invalid code point: "+Ve);Ve<=65535?De.push(Ve):(Ve-=65536,Re=55296+(Ve>>10),rt=Ve%1024+56320,De.push(Re,rt)),(Me+1===Xe||De.length>16384)&&(tt+=V.apply(null,De),De.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 O(){T.call(this)}P.exports=O;var T=w("events").EventEmitter;w("inherits")(O,T),O.Readable=w("readable-stream/readable.js"),O.Writable=w("readable-stream/writable.js"),O.Duplex=w("readable-stream/duplex.js"),O.Transform=w("readable-stream/transform.js"),O.PassThrough=w("readable-stream/passthrough.js"),O.Stream=O,O.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 a(){n||(n=!0,l.end())}function u(){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",a),i.removeListener("close",u),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",a),i.on("close",u));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(O){var T=w("./lib/request"),l=w("./lib/response"),p=w("xtend"),h=w("builtin-status-codes"),d=w("url"),a=S;a.request=function(u,s){u=typeof u=="string"?d.parse(u):p(u);var f=O.location.protocol.search(/^https?:$/)===-1?"http:":"",i=u.protocol||f,n=u.hostname||u.host,t=u.port,c=u.path||"/";n&&n.indexOf(":")!==-1&&(n="["+n+"]"),u.url=(n?i+"//"+n:"")+(t?":"+t:"")+c,u.method=(u.method||"GET").toUpperCase(),u.headers=u.headers||{};var y=new T(u);return s&&y.on("response",s),y},a.get=function(u,s){var f=a.request(u,s);return f.end(),f},a.ClientRequest=T,a.IncomingMessage=l.IncomingMessage,a.Agent=function(){},a.Agent.defaultMaxSockets=4,a.globalAgent=new a.Agent,a.STATUS_CODES=h,a.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(O){"use strict";function T(){if(h!==void 0)return h;if(O.XMLHttpRequest){h=new O.XMLHttpRequest;try{h.open("GET",O.XDomainRequest?"/":"https://example.com")}catch(u){h=null}}else h=null;return h}function l(u){var s=T();if(!s)return!1;try{return s.responseType=u,s.responseType===u}catch(f){}return!1}function p(u){return typeof u=="function"}S.fetch=p(O.fetch)&&p(O.ReadableStream),S.writableStream=p(O.WritableStream),S.abortController=p(O.AbortController),S.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),S.blobConstructor=!0}catch(u){}var h,d=O.ArrayBuffer!==void 0,a=d&&p(O.ArrayBuffer.prototype.slice);S.arraybuffer=S.fetch||d&&l("arraybuffer"),S.msstream=!S.fetch&&a&&l("ms-stream"),S.mozchunkedarraybuffer=!S.fetch&&d&&l("moz-chunked-arraybuffer"),S.overrideMimeType=S.fetch||!!T()&&p(T().overrideMimeType),S.vbArray=p(O.VBArray),h=null}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(w,P,S){(function(O,T,l){"use strict";function p(_,b){return u.fetch&&b?"fetch":u.mozchunkedarraybuffer?"moz-chunked-arraybuffer":u.msstream?"ms-stream":u.arraybuffer&&_?"arraybuffer":u.vbArray&&_?"text:vbarray":"text"}function h(_){try{var b=_.status;return b!==null&&b!==0}catch(m){return!1}}var d=w("babel-runtime/core-js/object/keys"),a=function(_){return _&&_.__esModule?_:{default:_}}(d),u=w("./capability"),s=w("inherits"),f=w("./response"),i=w("readable-stream"),n=w("to-arraybuffer"),t=f.IncomingMessage,c=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,a.default)(_.headers).forEach(function(E){b.setHeader(E,_.headers[E])});var m,g=!0;if(_.mode==="disable-fetch"||"requestTimeout"in _&&!u.abortController)g=!1,m=!0;else if(_.mode==="prefer-streaming")m=!1;else if(_.mode==="allow-wrong-content-type")m=!u.overrideMimeType;else{if(_.mode&&_.mode!=="default"&&_.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");m=!0}b._mode=p(m,g),b._fetchTimer=null,b.on("finish",function(){b._onFinish()})};s(y,i.Writable),y.prototype.setHeader=function(_,b){var m=this,g=_.toLowerCase();v.indexOf(g)===-1&&(m._headers[g]={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,m=_._headers,g=null;b.method!=="GET"&&b.method!=="HEAD"&&(g=u.arraybuffer?n(l.concat(_._body)):u.blobConstructor?new T.Blob(_._body.map(function(A){return n(A)}),{type:(m["content-type"]||{}).value||""}):l.concat(_._body).toString());var E=[];if((0,a.default)(m).forEach(function(A){var D=m[A].name,I=m[A].value;Array.isArray(I)?I.forEach(function(F){E.push([D,F])}):E.push([D,I])}),_._mode==="fetch"){var o=null;if(u.abortController){var x=new AbortController;o=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:g||void 0,mode:"cors",credentials:b.withCredentials?"include":"same-origin",signal:o}).then(function(A){_._fetchResponse=A,_._connect()},function(A){T.clearTimeout(_._fetchTimer),_._destroyed||_.emit("error",A)})}else{var C=_._xhr=new T.XMLHttpRequest;try{C.open(_._opts.method,_._opts.url,!0)}catch(A){return void O.nextTick(function(){_.emit("error",A)})}"responseType"in C&&(C.responseType=_._mode.split(":")[0]),"withCredentials"in C&&(C.withCredentials=!!b.withCredentials),_._mode==="text"&&"overrideMimeType"in C&&C.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in b&&(C.timeout=b.requestTimeout,C.ontimeout=function(){_.emit("requestTimeout")}),E.forEach(function(A){C.setRequestHeader(A[0],A[1])}),_._response=null,C.onreadystatechange=function(){switch(C.readyState){case c.LOADING:case c.DONE:_._onXHRProgress()}},_._mode==="moz-chunked-arraybuffer"&&(C.onprogress=function(){_._onXHRProgress()}),C.onerror=function(){_._destroyed||_.emit("error",new Error("XHR error"))};try{C.send(g)}catch(A){return void O.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,m){this._body.push(_),m()},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,m){var g=this;typeof _=="function"&&(m=_,_=void 0),i.Writable.prototype.end.call(g,_,b,m)},y.prototype.flushHeaders=function(){},y.prototype.setTimeout=function(){},y.prototype.setNoDelay=function(){},y.prototype.setSocketKeepAlive=function(){};var v=["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(O,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"),a=w("inherits"),u=w("readable-stream"),s=S.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},f=S.IncomingMessage=function(i,n,t,c){var y=this;if(u.Readable.call(y),y._mode=t,y.headers={},y.rawHeaders=[],y.trailers={},y.rawTrailers=[],y.on("end",function(){O.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(g,E){y.headers[E.toLowerCase()]=g,y.rawHeaders.push(E,g)}),d.writableStream){var v=new WritableStream({write:function(g){return new h.default(function(E,o){y._destroyed?o():y.push(new l(g))?E():y._resumeFetch=E})},close:function(){T.clearTimeout(c),y._destroyed||y.push(null)},abort:function(g){y._destroyed||y.emit("error",g)}});try{return void n.body.pipeTo(v).catch(function(g){T.clearTimeout(c),y._destroyed||y.emit("error",g)})}catch(g){}}var _=n.body.getReader();!function g(){_.read().then(function(E){if(!y._destroyed){if(E.done)return T.clearTimeout(c),void y.push(null);y.push(new l(E.value)),g()}}).catch(function(E){T.clearTimeout(c),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(g){var E=g.match(/^([^:]+):\s*(.*)/);if(E){var o=E[1].toLowerCase();o==="set-cookie"?(y.headers[o]===void 0&&(y.headers[o]=[]),y.headers[o].push(E[2])):y.headers[o]!==void 0?y.headers[o]+=", "+E[2]:y.headers[o]=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 m=b.match(/;\s*charset=([^;])(;|$)/);m&&(y._charset=m[1].toLowerCase())}y._charset||(y._charset="utf-8")}};a(f,u.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 c=t.substr(i._pos);if(i._charset==="x-user-defined"){for(var y=new l(c.length),v=0;v<c.length;v++)y[v]=255&c.charCodeAt(v);i.push(y)}else i.push(c,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 O(b){if(!b)return"utf8";for(var m;;)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(m)return;b=(""+b).toLowerCase(),m=!0}}function T(b){var m=O(b);if(typeof m!="string"&&(v.isEncoding===_||!_(b)))throw new Error("Unknown encoding: "+b);return m||b}function l(b){this.encoding=T(b);var m;switch(this.encoding){case"utf16le":this.text=f,this.end=i,m=4;break;case"utf8":this.fillLast=a,m=4;break;case"base64":this.text=n,this.end=t,m=3;break;default:return this.write=c,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=v.allocUnsafe(m)}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,m,g){var E=m.length-1;if(E<g)return 0;var o=p(m[E]);return o>=0?(o>0&&(b.lastNeed=o-1),o):--E<g||o===-2?0:(o=p(m[E]))>=0?(o>0&&(b.lastNeed=o-2),o):--E<g||o===-2?0:(o=p(m[E]),o>=0?(o>0&&(o===2?o=0:b.lastNeed=o-3),o):0)}function d(b,m,g){if((192&m[0])!=128)return b.lastNeed=0,"\u951F\uFFFD";if(b.lastNeed>1&&m.length>1){if((192&m[1])!=128)return b.lastNeed=1,"\u951F\uFFFD";if(b.lastNeed>2&&m.length>2&&(192&m[2])!=128)return b.lastNeed=2,"\u951F\uFFFD"}}function a(b){var m=this.lastTotal-this.lastNeed,g=d(this,b,m);return g!==void 0?g:this.lastNeed<=b.length?(b.copy(this.lastChar,m,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(b.copy(this.lastChar,m,0,b.length),void(this.lastNeed-=b.length))}function u(b,m){var g=h(this,b,m);if(!this.lastNeed)return b.toString("utf8",m);this.lastTotal=g;var E=b.length-(g-this.lastNeed);return b.copy(this.lastChar,0,E),b.toString("utf8",m,E)}function s(b){var m=b&&b.length?this.write(b):"";return this.lastNeed?m+"\u951F\uFFFD":m}function f(b,m){if((b.length-m)%2==0){var g=b.toString("utf16le",m);if(g){var E=g.charCodeAt(g.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],g.slice(0,-1)}return g}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",m,b.length-1)}function i(b){var m=b&&b.length?this.write(b):"";if(this.lastNeed){var g=this.lastTotal-this.lastNeed;return m+this.lastChar.toString("utf16le",0,g)}return m}function n(b,m){var g=(b.length-m)%3;return g===0?b.toString("base64",m):(this.lastNeed=3-g,this.lastTotal=3,g===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",m,b.length-g))}function t(b){var m=b&&b.length?this.write(b):"";return this.lastNeed?m+this.lastChar.toString("base64",0,3-this.lastNeed):m}function c(b){return b.toString(this.encoding)}function y(b){return b&&b.length?this.write(b):""}var v=w("safe-buffer").Buffer,_=v.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 m,g;if(this.lastNeed){if((m=this.fillLast(b))===void 0)return"";g=this.lastNeed,this.lastNeed=0}else g=0;return g<b.length?m?m+this.text(b,g):this.text(b,g):m||""},l.prototype.end=s,l.prototype.text=u,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(O,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,a={},u=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 O=="function"?O:function(s){var f=u++,i=!(arguments.length<2)&&d.call(arguments,1);return a[f]=!0,p(function(){a[f]&&(i?s.apply(null,i):s.call(null),S.clearImmediate(f))}),f},S.clearImmediate=typeof T=="function"?T:function(s){delete a[s]}}).call(this,w("timers").setImmediate,w("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(w,P,S){var O=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(O.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 O(){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(o,x,C){if(o&&a.isObject(o)&&o instanceof O)return o;var A=new O;return A.parse(o,x,C),A}function l(o){return a.isString(o)&&(o=T(o)),o instanceof O?o.format():O.prototype.format.call(o)}function p(o,x){return T(o,!1,!0).resolve(x)}function h(o,x){return o?T(o,!1,!0).resolveObject(x):x}var d=w("punycode"),a=w("./util");S.parse=T,S.resolve=p,S.resolveObject=h,S.format=l,S.Url=O;var u=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],n=["{","}","|","\\","^","`"].concat(i),t=["'"].concat(n),c=["%","/","?",";","#"].concat(t),y=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=w("querystring");O.prototype.parse=function(o,x,C){if(!a.isString(o))throw new TypeError("Parameter 'url' must be a string, not "+typeof o);var A=o.indexOf("?"),D=A!==-1&&A<o.indexOf("#")?"?":"#",I=o.split(D),F=/\\/g;I[0]=I[0].replace(F,"/"),o=I.join(D);var H=o;if(H=H.trim(),!C&&o.split("#").length===1){var te=f.exec(H);if(te)return this.path=H,this.href=H,this.pathname=te[1],te[2]?(this.search=te[2],this.query=x?E.parse(this.search.substr(1)):this.search.substr(1)):x&&(this.search="",this.query={}),this}var j=u.exec(H);if(j){j=j[0];var G=j.toLowerCase();this.protocol=G,H=H.substr(j.length)}if(C||j||H.match(/^\/\/[^@\/]+@[^@\/]+/)){var X=H.substr(0,2)==="//";!X||j&&m[j]||(H=H.substr(2),this.slashes=!0)}if(!m[j]&&(X||j&&!g[j])){for(var J=-1,B=0;B<y.length;B++){var Q=H.indexOf(y[B]);Q!==-1&&(J===-1||Q<J)&&(J=Q)}var ie,oe;oe=J===-1?H.lastIndexOf("@"):H.lastIndexOf("@",J),oe!==-1&&(ie=H.slice(0,oe),H=H.slice(oe+1),this.auth=decodeURIComponent(ie)),J=-1;for(var B=0;B<c.length;B++){var Q=H.indexOf(c[B]);Q!==-1&&(J===-1||Q<J)&&(J=Q)}J===-1&&(J=H.length),this.host=H.slice(0,J),H=H.slice(J),this.parseHost(),this.hostname=this.hostname||"";var Ee=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Ee)for(var ye=this.hostname.split(/\./),B=0,Le=ye.length;B<Le;B++){var pe=ye[B];if(pe&&!pe.match(v)){for(var Ce="",Be=0,Pe=pe.length;Be<Pe;Be++)pe.charCodeAt(Be)>127?Ce+="x":Ce+=pe[Be];if(!Ce.match(v)){var ke=ye.slice(0,B),Ne=ye.slice(B+1),he=pe.match(_);he&&(ke.push(he[1]),Ne.unshift(he[2])),Ne.length&&(H="/"+Ne.join(".")+H),this.hostname=ke.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),Ee||(this.hostname=d.toASCII(this.hostname));var ue=this.port?":"+this.port:"",Ie=this.hostname||"";this.host=Ie+ue,this.href+=this.host,Ee&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),H[0]!=="/"&&(H="/"+H))}if(!b[G])for(var B=0,Le=t.length;B<Le;B++){var Ue=t[B];if(H.indexOf(Ue)!==-1){var Ye=encodeURIComponent(Ue);Ye===Ue&&(Ye=escape(Ue)),H=H.split(Ue).join(Ye)}}var ee=H.indexOf("#");ee!==-1&&(this.hash=H.substr(ee),H=H.slice(0,ee));var M=H.indexOf("?");if(M!==-1?(this.search=H.substr(M),this.query=H.substr(M+1),x&&(this.query=E.parse(this.query)),H=H.slice(0,M)):x&&(this.search="",this.query={}),H&&(this.pathname=H),g[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},O.prototype.format=function(){var o=this.auth||"";o&&(o=encodeURIComponent(o),o=o.replace(/%3A/i,":"),o+="@");var x=this.protocol||"",C=this.pathname||"",A=this.hash||"",D=!1,I="";this.host?D=o+this.host:this.hostname&&(D=o+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(D+=":"+this.port)),this.query&&a.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||g[x])&&D!==!1?(D="//"+(D||""),C&&C.charAt(0)!=="/"&&(C="/"+C)):D||(D=""),A&&A.charAt(0)!=="#"&&(A="#"+A),F&&F.charAt(0)!=="?"&&(F="?"+F),C=C.replace(/[?#]/g,function(H){return encodeURIComponent(H)}),F=F.replace("#","%23"),x+D+C+F+A},O.prototype.resolve=function(o){return this.resolveObject(T(o,!1,!0)).format()},O.prototype.resolveObject=function(o){if(a.isString(o)){var x=new O;x.parse(o,!1,!0),o=x}for(var C=new O,A=Object.keys(this),D=0;D<A.length;D++){var I=A[D];C[I]=this[I]}if(C.hash=o.hash,o.href==="")return C.href=C.format(),C;if(o.slashes&&!o.protocol){for(var F=Object.keys(o),H=0;H<F.length;H++){var te=F[H];te!=="protocol"&&(C[te]=o[te])}return g[C.protocol]&&C.hostname&&!C.pathname&&(C.path=C.pathname="/"),C.href=C.format(),C}if(o.protocol&&o.protocol!==C.protocol){if(!g[o.protocol]){for(var j=Object.keys(o),G=0;G<j.length;G++){var X=j[G];C[X]=o[X]}return C.href=C.format(),C}if(C.protocol=o.protocol,o.host||m[o.protocol])C.pathname=o.pathname;else{for(var Le=(o.pathname||"").split("/");Le.length&&!(o.host=Le.shift()););o.host||(o.host=""),o.hostname||(o.hostname=""),Le[0]!==""&&Le.unshift(""),Le.length<2&&Le.unshift(""),C.pathname=Le.join("/")}if(C.search=o.search,C.query=o.query,C.host=o.host||"",C.auth=o.auth,C.hostname=o.hostname||o.host,C.port=o.port,C.pathname||C.search){var J=C.pathname||"",B=C.search||"";C.path=J+B}return C.slashes=C.slashes||o.slashes,C.href=C.format(),C}var Q=C.pathname&&C.pathname.charAt(0)==="/",ie=o.host||o.pathname&&o.pathname.charAt(0)==="/",oe=ie||Q||C.host&&o.pathname,Ee=oe,ye=C.pathname&&C.pathname.split("/")||[],Le=o.pathname&&o.pathname.split("/")||[],pe=C.protocol&&!g[C.protocol];if(pe&&(C.hostname="",C.port=null,C.host&&(ye[0]===""?ye[0]=C.host:ye.unshift(C.host)),C.host="",o.protocol&&(o.hostname=null,o.port=null,o.host&&(Le[0]===""?Le[0]=o.host:Le.unshift(o.host)),o.host=null),oe=oe&&(Le[0]===""||ye[0]==="")),ie)C.host=o.host||o.host===""?o.host:C.host,C.hostname=o.hostname||o.hostname===""?o.hostname:C.hostname,C.search=o.search,C.query=o.query,ye=Le;else if(Le.length)ye||(ye=[]),ye.pop(),ye=ye.concat(Le),C.search=o.search,C.query=o.query;else if(!a.isNullOrUndefined(o.search)){if(pe){C.hostname=C.host=ye.shift();var Ce=!!(C.host&&C.host.indexOf("@")>0)&&C.host.split("@");Ce&&(C.auth=Ce.shift(),C.host=C.hostname=Ce.shift())}return C.search=o.search,C.query=o.query,a.isNull(C.pathname)&&a.isNull(C.search)||(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.href=C.format(),C}if(!ye.length)return C.pathname=null,C.search?C.path="/"+C.search:C.path=null,C.href=C.format(),C;for(var Be=ye.slice(-1)[0],Pe=(C.host||o.host||ye.length>1)&&(Be==="."||Be==="..")||Be==="",ke=0,Ne=ye.length;Ne>=0;Ne--)Be=ye[Ne],Be==="."?ye.splice(Ne,1):Be===".."?(ye.splice(Ne,1),ke++):ke&&(ye.splice(Ne,1),ke--);if(!oe&&!Ee)for(;ke--;ke)ye.unshift("..");!oe||ye[0]===""||ye[0]&&ye[0].charAt(0)==="/"||ye.unshift(""),Pe&&ye.join("/").substr(-1)!=="/"&&ye.push("");var he=ye[0]===""||ye[0]&&ye[0].charAt(0)==="/";if(pe){C.hostname=C.host=he?"":ye.length?ye.shift():"";var Ce=!!(C.host&&C.host.indexOf("@")>0)&&C.host.split("@");Ce&&(C.auth=Ce.shift(),C.host=C.hostname=Ce.shift())}return oe=oe||C.host&&ye.length,oe&&!he&&ye.unshift(""),ye.length?C.pathname=ye.join("/"):(C.pathname=null,C.path=null),a.isNull(C.pathname)&&a.isNull(C.search)||(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.auth=o.auth||C.auth,C.slashes=C.slashes||o.slashes,C.href=C.format(),C},O.prototype.parseHost=function(){var o=this.host,x=s.exec(o);x&&(x=x[0],x!==":"&&(this.port=x.substr(1)),o=o.substr(0,o.length-x.length)),o&&(this.hostname=o)}},{"./util":204,punycode:174,querystring:177}],204:[function(w,P,S){"use strict";P.exports={isString:function(O){return typeof O=="string"},isObject:function(O){return typeof O=="object"&&O!==null},isNull:function(O){return O===null},isNullOrUndefined:function(O){return O==null}}},{}],205:[function(w,P,S){(function(O){function T(p,h){function d(){if(!a){if(l("throwDeprecation"))throw new Error(h);l("traceDeprecation")?console.trace(h):console.warn(h),a=!0}return p.apply(this,arguments)}if(l("noDeprecation"))return p;var a=!1;return d}function l(p){try{if(!O.localStorage)return!1}catch(d){return!1}var h=O.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(O){return O&&typeof O=="object"&&typeof O.copy=="function"&&typeof O.fill=="function"&&typeof O.readUInt8=="function"}},{}],207:[function(w,P,S){(function(O,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]),c(Q)?ie.showHidden=Q:Q&&S._extend(ie,Q),g(ie.showHidden)&&(ie.showHidden=!1),g(ie.depth)&&(ie.depth=2),g(ie.colors)&&(ie.colors=!1),g(ie.customInspect)&&(ie.customInspect=!0),ie.colors&&(ie.stylize=p),a(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 a(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=a(B,oe,ie)),oe}var Ee=u(B,Q);if(Ee)return Ee;var ye=Object.keys(Q),Le=d(ye);if(B.showHidden&&(ye=Object.getOwnPropertyNames(Q)),C(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(C(Q))return s(Q)}var Ce="",Be=!1,Pe=["{","}"];if((t(Q)&&(Be=!0,Pe=["[","]"]),A(Q))&&(Ce=" [Function"+(Q.name?": "+Q.name:"")+"]"),E(Q)&&(Ce=" "+RegExp.prototype.toString.call(Q)),x(Q)&&(Ce=" "+Date.prototype.toUTCString.call(Q)),C(Q)&&(Ce=" "+s(Q)),ye.length===0&&(!Be||Q.length==0))return Pe[0]+Ce+Pe[1];if(ie<0)return E(Q)?B.stylize(RegExp.prototype.toString.call(Q),"regexp"):B.stylize("[Object]","special");B.seen.push(Q);var ke;return ke=Be?f(B,Q,ie,Le,ye):ye.map(function(Ne){return i(B,Q,ie,Le,Ne,Be)}),B.seen.pop(),n(ke,Ce,Pe)}function u(B,Q){if(g(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"):c(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,Ee){for(var ye=[],Le=0,pe=Q.length;Le<pe;++Le)te(Q,String(Le))?ye.push(i(B,Q,ie,oe,String(Le),!0)):ye.push("");return Ee.forEach(function(Ce){Ce.match(/^\d+$/)||ye.push(i(B,Q,ie,oe,Ce,!0))}),ye}function i(B,Q,ie,oe,Ee,ye){var Le,pe,Ce;if(Ce=Object.getOwnPropertyDescriptor(Q,Ee)||{value:Q[Ee]},Ce.get?pe=Ce.set?B.stylize("[Getter/Setter]","special"):B.stylize("[Getter]","special"):Ce.set&&(pe=B.stylize("[Setter]","special")),te(oe,Ee)||(Le="["+Ee+"]"),pe||(B.seen.indexOf(Ce.value)<0?(pe=y(ie)?a(B,Ce.value,null):a(B,Ce.value,ie-1),pe.indexOf(`
|
|
|
`)>-1&&(pe=ye?pe.split(`
|
|
|
`).map(function(Be){return" "+Be}).join(`
|
|
|
`).substr(2):`
|
|
|
`+pe.split(`
|
|
|
`).map(function(Be){return" "+Be}).join(`
|
|
|
`))):pe=B.stylize("[Circular]","special")),g(Le)){if(ye&&Ee.match(/^\d+$/))return pe;Le=JSON.stringify(""+Ee),Le.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Le=Le.substr(1,Le.length-2),Le=B.stylize(Le,"name")):(Le=Le.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Le=B.stylize(Le,"string"))}return Le+": "+pe}function n(B,Q,ie){var oe=0;return B.reduce(function(Ee,ye){return oe++,ye.indexOf(`
|
|
|
`)>=0&&oe++,Ee+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 c(B){return typeof B=="boolean"}function y(B){return B===null}function v(B){return B==null}function _(B){return typeof B=="number"}function b(B){return typeof B=="string"}function m(B){return typeof B=="symbol"}function g(B){return B===void 0}function E(B){return o(B)&&I(B)==="[object RegExp]"}function o(B){return typeof B=="object"&&B!==null}function x(B){return o(B)&&I(B)==="[object Date]"}function C(B){return o(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 H(){var B=new Date,Q=[F(B.getHours()),F(B.getMinutes()),F(B.getSeconds())].join(":");return[B.getDate(),J[B.getMonth()],Q].join(" ")}function te(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,Ee=oe.length,ye=String(B).replace(j,function(Ce){if(Ce==="%%")return"%";if(ie>=Ee)return Ce;switch(Ce){case"%s":return String(oe[ie++]);case"%d":return Number(oe[ie++]);case"%j":try{return JSON.stringify(oe[ie++])}catch(Be){return"[Circular]"}default:return Ce}}),Le=oe[ie];ie<Ee;Le=oe[++ie])y(Le)||!o(Le)?ye+=" "+Le:ye+=" "+l(Le);return ye},S.deprecate=function(B,Q){function ie(){if(!oe){if(O.throwDeprecation)throw new Error(Q);O.traceDeprecation?console.trace(Q):console.error(Q),oe=!0}return B.apply(this,arguments)}if(g(T.process))return function(){return S.deprecate(B,Q).apply(this,arguments)};if(O.noDeprecation===!0)return B;var oe=!1;return ie};var G,X={};S.debuglog=function(B){if(g(G)&&(G=O.env.NODE_DEBUG||""),B=B.toUpperCase(),!X[B])if(new RegExp("\\b"+B+"\\b","i").test(G)){var Q=O.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=c,S.isNull=y,S.isNullOrUndefined=v,S.isNumber=_,S.isString=b,S.isSymbol=m,S.isUndefined=g,S.isRegExp=E,S.isObject=o,S.isDate=x,S.isError=C,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",H(),S.format.apply(S,arguments))},S.inherits=w("inherits"),S._extend=function(B,Q){if(!Q||!o(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(O){return O[0]==="\uFEFF"?O.substring(1):O}}).call(void 0)},{}],209:[function(w,P,S){"use strict";function O(d){return d&&d.__esModule?d:{default:d}}var T=w("babel-runtime/helpers/typeof"),l=O(T),p=w("babel-runtime/core-js/object/keys"),h=O(p);(function(){var d,a,u,s,f,i={}.hasOwnProperty;d=w("xmlbuilder"),a=w("./defaults").defaults,s=function(n){return typeof n=="string"&&(n.indexOf("&")>=0||n.indexOf(">")>=0||n.indexOf("<")>=0)},f=function(n){return"<![CDATA["+u(n)+"]]>"},u=function(n){return n.replace("]]>","]]]]><![CDATA[>")},S.Builder=function(){function n(t){var c,y,v;this.options={},y=a[.2];for(c in y)i.call(y,c)&&(v=y[c],this.options[c]=v);for(c in t)i.call(t,c)&&(v=t[c],this.options[c]=v)}return n.prototype.buildObject=function(t){var c,y,v,_,b;return c=this.options.attrkey,y=this.options.charkey,(0,h.default)(t).length===1&&this.options.rootName===a[.2].rootName?(b=(0,h.default)(t)[0],t=t[b]):b=this.options.rootName,v=function(m){return function(g,E){var o,x,C,A,D,I;if((E===void 0?"undefined":(0,l.default)(E))!=="object")m.options.cdata&&s(E)?g.raw(f(E)):g.txt(E);else if(Array.isArray(E)){for(A in E)if(i.call(E,A)){x=E[A];for(D in x)C=x[D],g=v(g.ele(D),C).up()}}else for(D in E)if(i.call(E,D))if(x=E[D],D===c){if((x===void 0?"undefined":(0,l.default)(x))==="object")for(o in x)I=x[o],g=g.att(o,I)}else if(D===y)g=m.options.cdata&&s(x)?g.raw(f(x)):g.txt(x);else if(Array.isArray(x))for(A in x)i.call(x,A)&&(C=x[A],g=typeof C=="string"?m.options.cdata&&s(C)?g.ele(D).raw(f(C)).up():g.ele(D,C).up():v(g.ele(D),C).up());else(x===void 0?"undefined":(0,l.default)(x))==="object"?g=v(g.ele(D),x).up():typeof x=="string"&&m.options.cdata&&s(x)?g=g.ele(D).raw(f(x)).up():(x==null&&(x=""),g=g.ele(D,x.toString()).up());return g}}(this),_=d.create(b,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),v(_,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 O(u){return u&&u.__esModule?u:{default:u}}var T=w("babel-runtime/core-js/object/get-own-property-names"),l=O(T),p=w("babel-runtime/core-js/object/keys"),h=O(p),d=w("babel-runtime/helpers/typeof"),a=O(d);(function(){var u,s,f,i,n,t,c,y,v=function(m,g){return function(){return m.apply(g,arguments)}},_=function(m,g){function E(){this.constructor=m}for(var o in g)b.call(g,o)&&(m[o]=g[o]);return E.prototype=g.prototype,m.prototype=new E,m.__super__=g.prototype,m},b={}.hasOwnProperty;c=w("sax"),f=w("events"),u=w("./bom"),t=w("./processors"),y=w("timers").setImmediate,s=w("./defaults").defaults,i=function(m){return(m===void 0?"undefined":(0,a.default)(m))==="object"&&m!=null&&(0,h.default)(m).length===0},n=function(m,g,E){var o,x,C;for(o=0,x=m.length;o<x;o++)C=m[o],g=C(g,E);return g},S.Parser=function(m){function g(E){this.parseString=v(this.parseString,this),this.reset=v(this.reset,this),this.assignOrPush=v(this.assignOrPush,this),this.processAsync=v(this.processAsync,this);var o,x,C;if(!(this instanceof S.Parser))return new S.Parser(E);this.options={},x=s[.2];for(o in x)b.call(x,o)&&(C=x[o],this.options[o]=C);for(o in E)b.call(E,o)&&(C=E[o],this.options[o]=C);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 _(g,m),g.prototype.processAsync=function(){var E,o;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(o=x,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(o)}},g.prototype.assignOrPush=function(E,o,x){return o in E?(E[o]instanceof Array||(E[o]=[E[o]]),E[o].push(x)):this.options.explicitArray?E[o]=[x]:E[o]=x},g.prototype.reset=function(){var E,o,x,C;return this.removeAllListeners(),this.saxParser=c.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,C=[],E=this.options.attrkey,o=this.options.charkey,this.saxParser.onopentag=function(A){return function(D){var I,F,H,te,j;if(H={},H[o]="",!A.options.ignoreAttrs){j=D.attributes;for(I in j)b.call(j,I)&&(E in H||A.options.mergeAttrs||(H[E]={}),F=A.options.attrValueProcessors?n(A.options.attrValueProcessors,D.attributes[I],I):D.attributes[I],te=A.options.attrNameProcessors?n(A.options.attrNameProcessors,I):I,A.options.mergeAttrs?A.assignOrPush(H,te,F):H[E][te]=F)}return H["#name"]=A.options.tagNameProcessors?n(A.options.tagNameProcessors,D.name):D.name,A.options.xmlns&&(H[A.options.xmlnskey]={uri:D.uri,local:D.local}),C.push(H)}}(this),this.saxParser.onclosetag=function(A){return function(){var D,I,F,H,te,j,G,X,J,B;if(j=C.pop(),te=j["#name"],A.options.explicitChildren&&A.options.preserveChildrenOrder||delete j["#name"],j.cdata===!0&&(D=j.cdata,delete j.cdata),J=C[C.length-1],j[o].match(/^\s*$/)&&!D?(I=j[o],delete j[o]):(A.options.trim&&(j[o]=j[o].trim()),A.options.normalize&&(j[o]=j[o].replace(/\s{2,}/g," ").trim()),j[o]=A.options.valueProcessors?n(A.options.valueProcessors,j[o],te):j[o],(0,h.default)(j).length===1&&o in j&&!A.EXPLICIT_CHARKEY&&(j=j[o])),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=C.length;Q<ie;Q++)H=C[Q],oe.push(H["#name"]);return oe}().concat(te).join("/"),function(){var Q;try{j=A.options.validator(B,J&&J[te],j)}catch(ie){return Q=ie,A.emit("error",Q)}}()),A.options.explicitChildren&&!A.options.mergeAttrs&&(j===void 0?"undefined":(0,a.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&&o in j&&!A.EXPLICIT_CHARKEY&&(j=j[o])}}else H={},A.options.attrkey in j&&(H[A.options.attrkey]=j[A.options.attrkey],delete j[A.options.attrkey]),!A.options.charsAsChildren&&A.options.charkey in j&&(H[A.options.charkey]=j[A.options.charkey],delete j[A.options.charkey]),(0,l.default)(j).length>0&&(H[A.options.childkey]=j),j=H;return C.length>0?A.assignOrPush(J,te,j):(A.options.explicitRoot&&(X=j,j={},j[te]=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=C[C.length-1])return F[o]+=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[o]=D,A.options.normalize&&(I[o]=I[o].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}}()},g.prototype.parseString=function(E,o){var x;o!=null&&typeof o=="function"&&(this.on("end",function(C){return this.reset(),o(null,C)}),this.on("error",function(C){return this.reset(),o(C)}));try{return E=E.toString(),E.trim()===""?(this.emit("end",null),!0):(E=u.stripBOM(E),this.options.async?(this.remaining=E,y(this.processAsync),this.saxParser):this.saxParser.write(E).close())}catch(C){if(x=C,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",x),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw x}},g}(f.EventEmitter),S.parseString=function(m,g,E){var o,x,C;return E!=null?(typeof E=="function"&&(o=E),(g===void 0?"undefined":(0,a.default)(g))==="object"&&(x=g)):(typeof g=="function"&&(o=g),x={}),C=new S.Parser(x),C.parseString(m,o)}}).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 O;O=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(O,"")},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 O,T,l,p,h=function(a,u){function s(){this.constructor=a}for(var f in u)d.call(u,f)&&(a[f]=u[f]);return s.prototype=u.prototype,a.prototype=new s,a.__super__=u.prototype,a},d={}.hasOwnProperty;T=w("./defaults"),O=w("./builder"),l=w("./parser"),p=w("./processors"),S.defaults=T.defaults,S.processors=p,S.ValidationError=function(a){function u(s){this.message=s}return h(u,a),u}(Error),S.Builder=O.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 O(u){return u&&u.__esModule?u:{default:u}}var T=w("babel-runtime/core-js/object/get-prototype-of"),l=O(T),p=w("babel-runtime/helpers/typeof"),h=O(p),d=w("babel-runtime/core-js/object/assign"),a=O(d);(function(){var u,s,f,i,n,t,c=[].slice,y={}.hasOwnProperty;u=function(){var v,_,b,m,g,E;if(E=arguments[0],g=2<=arguments.length?c.call(arguments,1):[],i(a.default))a.default.apply(null,arguments);else for(v=0,b=g.length;v<b;v++)if((m=g[v])!=null)for(_ in m)y.call(m,_)&&(E[_]=m[_]);return E},i=function(v){return!!v&&Object.prototype.toString.call(v)==="[object Function]"},n=function(v){var _;return!!v&&((_=v===void 0?"undefined":(0,h.default)(v))==="function"||_==="object")},s=function(v){return i(Array.isArray)?Array.isArray(v):Object.prototype.toString.call(v)==="[object Array]"},f=function(v){var _;if(s(v))return!v.length;for(_ in v)if(y.call(v,_))return!1;return!0},t=function(v){var _,b;return n(v)&&(b=(0,l.default)(v))&&(_=b.constructor)&&typeof _=="function"&&_ instanceof _&&Function.prototype.toString.call(_)===Function.prototype.toString.call(Object)},P.exports.assign=u,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 O=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(O);(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 O=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(O);(function(){var l,p=function(d,a){function u(){this.constructor=d}for(var s in a)h.call(a,s)&&(d[s]=a[s]);return u.prototype=a.prototype,d.prototype=new u,d.__super__=a.prototype,d},h={}.hasOwnProperty;l=w("./XMLNode"),P.exports=function(d){function a(u,s){if(a.__super__.constructor.call(this,u),s==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(s)}return p(a,d),a.prototype.clone=function(){return(0,T.default)(this)},a.prototype.toString=function(u){return this.options.writer.set(u).cdata(this)},a}(l)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(w,P,S){"use strict";var O=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(O);(function(){var l,p=function(d,a){function u(){this.constructor=d}for(var s in a)h.call(a,s)&&(d[s]=a[s]);return u.prototype=a.prototype,d.prototype=new u,d.__super__=a.prototype,d},h={}.hasOwnProperty;l=w("./XMLNode"),P.exports=function(d){function a(u,s){if(a.__super__.constructor.call(this,u),s==null)throw new Error("Missing comment text");this.text=this.stringify.comment(s)}return p(a,d),a.prototype.clone=function(){return(0,T.default)(this)},a.prototype.toString=function(u){return this.options.writer.set(u).comment(this)},a}(l)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(w,P,S){"use strict";(function(){var O,T=function(p,h){function d(){this.constructor=p}for(var a in h)l.call(h,a)&&(p[a]=h[a]);return d.prototype=h.prototype,p.prototype=new d,p.__super__=h.prototype,p},l={}.hasOwnProperty;O=w("./XMLNode"),P.exports=function(p){function h(d,a,u,s,f,i){if(h.__super__.constructor.call(this,d),a==null)throw new Error("Missing DTD element name");if(u==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(a),this.attributeName=this.stringify.attName(u),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}(O)}).call(void 0)},{"./XMLNode":227}],219:[function(w,P,S){"use strict";(function(){var O,T=function(p,h){function d(){this.constructor=p}for(var a in h)l.call(h,a)&&(p[a]=h[a]);return d.prototype=h.prototype,p.prototype=new d,p.__super__=h.prototype,p},l={}.hasOwnProperty;O=w("./XMLNode"),P.exports=function(p){function h(d,a,u){if(h.__super__.constructor.call(this,d),a==null)throw new Error("Missing DTD element name");u||(u="(#PCDATA)"),Array.isArray(u)&&(u="("+u.join(",")+")"),this.name=this.stringify.eleName(a),this.value=this.stringify.dtdElementValue(u)}return T(h,p),h.prototype.toString=function(d){return this.options.writer.set(d).dtdElement(this)},h}(O)}).call(void 0)},{"./XMLNode":227}],220:[function(w,P,S){"use strict";(function(){var O,T,l=function(h,d){function a(){this.constructor=h}for(var u in d)p.call(d,u)&&(h[u]=d[u]);return a.prototype=d.prototype,h.prototype=new a,h.__super__=d.prototype,h},p={}.hasOwnProperty;T=w("./Utility").isObject,O=w("./XMLNode"),P.exports=function(h){function d(a,u,s,f){if(d.__super__.constructor.call(this,a),s==null)throw new Error("Missing entity name");if(f==null)throw new Error("Missing entity value");if(this.pe=!!u,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(a){return this.options.writer.set(a).dtdEntity(this)},d}(O)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(w,P,S){"use strict";(function(){var O,T=function(p,h){function d(){this.constructor=p}for(var a in h)l.call(h,a)&&(p[a]=h[a]);return d.prototype=h.prototype,p.prototype=new d,p.__super__=h.prototype,p},l={}.hasOwnProperty;O=w("./XMLNode"),P.exports=function(p){function h(d,a,u){if(h.__super__.constructor.call(this,d),a==null)throw new Error("Missing notation name");if(!u.pubID&&!u.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(a),u.pubID!=null&&(this.pubID=this.stringify.dtdPubID(u.pubID)),u.sysID!=null&&(this.sysID=this.stringify.dtdSysID(u.sysID))}return T(h,p),h.prototype.toString=function(d){return this.options.writer.set(d).dtdNotation(this)},h}(O)}).call(void 0)},{"./XMLNode":227}],222:[function(w,P,S){"use strict";(function(){var O,T,l=function(h,d){function a(){this.constructor=h}for(var u in d)p.call(d,u)&&(h[u]=d[u]);return a.prototype=d.prototype,h.prototype=new a,h.__super__=d.prototype,h},p={}.hasOwnProperty;T=w("./Utility").isObject,O=w("./XMLNode"),P.exports=function(h){function d(a,u,s,f){var i;d.__super__.constructor.call(this,a),T(u)&&(i=u,u=i.version,s=i.encoding,f=i.standalone),u||(u="1.0"),this.version=this.stringify.xmlVersion(u),s!=null&&(this.encoding=this.stringify.xmlEncoding(s)),f!=null&&(this.standalone=this.stringify.xmlStandalone(f))}return l(d,h),d.prototype.toString=function(a){return this.options.writer.set(a).declaration(this)},d}(O)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(w,P,S){"use strict";(function(){var O,T,l,p,h,d,a=function(s,f){function i(){this.constructor=s}for(var n in f)u.call(f,n)&&(s[n]=f[n]);return i.prototype=f.prototype,s.prototype=new i,s.__super__=f.prototype,s},u={}.hasOwnProperty;d=w("./Utility").isObject,h=w("./XMLNode"),O=w("./XMLDTDAttList"),l=w("./XMLDTDEntity"),T=w("./XMLDTDElement"),p=w("./XMLDTDNotation"),P.exports=function(s){function f(i,n,t){var c,y;f.__super__.constructor.call(this,i),this.documentObject=i,d(n)&&(c=n,n=c.pubID,t=c.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 a(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,c,y){var v;return v=new O(this,i,n,t,c,y),this.children.push(v),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,c,y){return this.attList(i,n,t,c,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 O,T,l,p,h=function(a,u){function s(){this.constructor=a}for(var f in u)d.call(u,f)&&(a[f]=u[f]);return s.prototype=u.prototype,a.prototype=new s,a.__super__=u.prototype,a},d={}.hasOwnProperty;p=w("./Utility").isPlainObject,O=w("./XMLNode"),l=w("./XMLStringifier"),T=w("./XMLStringWriter"),P.exports=function(a){function u(s){u.__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(u,a),u.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)},u.prototype.toString=function(s){return this.options.writer.set(s).document(this)},u}(O)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(w,P,S){"use strict";(function(){var O,T,l,p,h,d,a,u,s,f,i,n,t,c,y,v,_,b,m,g={}.hasOwnProperty;m=w("./Utility"),_=m.isObject,v=m.isFunction,b=m.isPlainObject,f=w("./XMLElement"),T=w("./XMLCData"),l=w("./XMLComment"),n=w("./XMLRaw"),y=w("./XMLText"),i=w("./XMLProcessingInstruction"),u=w("./XMLDeclaration"),s=w("./XMLDocType"),p=w("./XMLDTDAttList"),d=w("./XMLDTDEntity"),h=w("./XMLDTDElement"),a=w("./XMLDTDNotation"),O=w("./XMLAttribute"),c=w("./XMLStringifier"),t=w("./XMLStringWriter"),P.exports=function(){function E(o,x,C){var A;o||(o={}),o.writer?b(o.writer)&&(A=o.writer,o.writer=new t(A)):o.writer=new t(o),this.options=o,this.writer=o.writer,this.stringify=new c(o),this.onDataCallback=x||function(){},this.onEndCallback=C||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return E.prototype.node=function(o,x,C){var A;if(o==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(),o=o.valueOf(),x==null&&(x={}),x=x.valueOf(),_(x)||(A=[x,C],C=A[0],x=A[1]),this.currentNode=new f(this,o,x),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,C!=null&&this.text(C),this},E.prototype.element=function(o,x,C){return this.currentNode&&this.currentNode instanceof s?this.dtdElement.apply(this,arguments):this.node(o,x,C)},E.prototype.attribute=function(o,x){var C,A;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(o!=null&&(o=o.valueOf()),_(o))for(C in o)g.call(o,C)&&(A=o[C],this.attribute(C,A));else v(x)&&(x=x.apply()),this.options.skipNullAttributes&&x==null||(this.currentNode.attributes[o]=new O(this,o,x));return this},E.prototype.text=function(o){var x;return this.openCurrent(),x=new y(this,o),this.onData(this.writer.text(x,this.currentLevel+1)),this},E.prototype.cdata=function(o){var x;return this.openCurrent(),x=new T(this,o),this.onData(this.writer.cdata(x,this.currentLevel+1)),this},E.prototype.comment=function(o){var x;return this.openCurrent(),x=new l(this,o),this.onData(this.writer.comment(x,this.currentLevel+1)),this},E.prototype.raw=function(o){var x;return this.openCurrent(),x=new n(this,o),this.onData(this.writer.raw(x,this.currentLevel+1)),this},E.prototype.instruction=function(o,x){var C,A,D,I,F;if(this.openCurrent(),o!=null&&(o=o.valueOf()),x!=null&&(x=x.valueOf()),Array.isArray(o))for(C=0,I=o.length;C<I;C++)A=o[C],this.instruction(A);else if(_(o))for(A in o)g.call(o,A)&&(D=o[A],this.instruction(A,D));else v(x)&&(x=x.apply()),F=new i(this,o,x),this.onData(this.writer.processingInstruction(F,this.currentLevel+1));return this},E.prototype.declaration=function(o,x,C){var A;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return A=new u(this,o,x,C),this.onData(this.writer.declaration(A,this.currentLevel+1)),this},E.prototype.doctype=function(o,x,C){if(this.openCurrent(),o==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,C),this.currentNode.rootNodeName=o,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},E.prototype.dtdElement=function(o,x){var C;return this.openCurrent(),C=new h(this,o,x),this.onData(this.writer.dtdElement(C,this.currentLevel+1)),this},E.prototype.attList=function(o,x,C,A,D){var I;return this.openCurrent(),I=new p(this,o,x,C,A,D),this.onData(this.writer.dtdAttList(I,this.currentLevel+1)),this},E.prototype.entity=function(o,x){var C;return this.openCurrent(),C=new d(this,!1,o,x),this.onData(this.writer.dtdEntity(C,this.currentLevel+1)),this},E.prototype.pEntity=function(o,x){var C;return this.openCurrent(),C=new d(this,!0,o,x),this.onData(this.writer.dtdEntity(C,this.currentLevel+1)),this},E.prototype.notation=function(o,x){var C;return this.openCurrent(),C=new a(this,o,x),this.onData(this.writer.dtdNotation(C,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(o){if(!o.isOpen)return!this.root&&this.currentLevel===0&&o instanceof f&&(this.root=o),this.onData(this.writer.openNode(o,this.currentLevel)),o.isOpen=!0},E.prototype.closeNode=function(o){if(!o.isClosed)return this.onData(this.writer.closeNode(o,this.currentLevel)),o.isClosed=!0},E.prototype.onData=function(o){return this.documentStarted=!0,this.onDataCallback(o)},E.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},E.prototype.ele=function(){return this.element.apply(this,arguments)},E.prototype.nod=function(o,x,C){return this.node(o,x,C)},E.prototype.txt=function(o){return this.text(o)},E.prototype.dat=function(o){return this.cdata(o)},E.prototype.com=function(o){return this.comment(o)},E.prototype.ins=function(o,x){return this.instruction(o,x)},E.prototype.dec=function(o,x,C){return this.declaration(o,x,C)},E.prototype.dtd=function(o,x,C){return this.doctype(o,x,C)},E.prototype.e=function(o,x,C){return this.element(o,x,C)},E.prototype.n=function(o,x,C){return this.node(o,x,C)},E.prototype.t=function(o){return this.text(o)},E.prototype.d=function(o){return this.cdata(o)},E.prototype.c=function(o){return this.comment(o)},E.prototype.r=function(o){return this.raw(o)},E.prototype.i=function(o,x){return this.instruction(o,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(o,x){return this.entity(o,x)},E.prototype.pent=function(o,x){return this.pEntity(o,x)},E.prototype.not=function(o,x){return this.notation(o,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 O=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(O);(function(){var l,p,h,d,a,u=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;a=w("./Utility"),d=a.isObject,h=a.isFunction,p=w("./XMLNode"),l=w("./XMLAttribute"),P.exports=function(f){function i(n,t,c){if(i.__super__.constructor.call(this,n),t==null)throw new Error("Missing element name");this.name=this.stringify.eleName(t),this.attributes={},c!=null&&this.attribute(c),n.isDocument&&(this.isRoot=!0,this.documentObject=n,n.rootObject=this)}return u(i,f),i.prototype.clone=function(){var n,t,c,y;c=(0,T.default)(this),c.isRoot&&(c.documentObject=null),c.attributes={},y=this.attributes;for(t in y)s.call(y,t)&&(n=y[t],c.attributes[t]=n.clone());return c.children=[],this.children.forEach(function(v){var _;return _=v.clone(),_.parent=c,c.children.push(_)}),c},i.prototype.attribute=function(n,t){var c,y;if(n!=null&&(n=n.valueOf()),d(n))for(c in n)s.call(n,c)&&(y=n[c],this.attribute(c,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,c,y;if(n==null)throw new Error("Missing attribute name");if(n=n.valueOf(),Array.isArray(n))for(c=0,y=n.length;c<y;c++)t=n[c],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 O,T,l,p,h,d,a,u,s,f,i,n,t={}.hasOwnProperty;n=w("./Utility"),i=n.isObject,f=n.isFunction,s=n.isEmpty,h=null,O=null,T=null,l=null,p=null,a=null,u=null,d=null,P.exports=function(){function c(y){this.parent=y,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],h||(h=w("./XMLElement"),O=w("./XMLCData"),T=w("./XMLComment"),l=w("./XMLDeclaration"),p=w("./XMLDocType"),a=w("./XMLRaw"),u=w("./XMLText"),d=w("./XMLProcessingInstruction"))}return c.prototype.element=function(y,v,_){var b,m,g,E,o,x,C,A,D,I;if(x=null,v==null&&(v={}),v=v.valueOf(),i(v)||(D=[v,_],_=D[0],v=D[1]),y!=null&&(y=y.valueOf()),Array.isArray(y))for(g=0,C=y.length;g<C;g++)m=y[g],x=this.element(m);else if(f(y))x=this.element(y.apply());else if(i(y)){for(o in y)if(t.call(y,o))if(I=y[o],f(I)&&(I=I.apply()),i(I)&&s(I)&&(I=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&o.indexOf(this.stringify.convertAttKey)===0)x=this.attribute(o.substr(this.stringify.convertAttKey.length),I);else if(!this.options.separateArrayItems&&Array.isArray(I))for(E=0,A=I.length;E<A;E++)m=I[E],b={},b[o]=m,x=this.element(b);else i(I)?(x=this.element(o),x.element(I)):x=this.element(o,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,v,_);if(x==null)throw new Error("Could not create any elements with: "+y);return x},c.prototype.insertBefore=function(y,v,_){var b,m,g;if(this.isRoot)throw new Error("Cannot insert elements at root level");return m=this.parent.children.indexOf(this),g=this.parent.children.splice(m),b=this.parent.element(y,v,_),Array.prototype.push.apply(this.parent.children,g),b},c.prototype.insertAfter=function(y,v,_){var b,m,g;if(this.isRoot)throw new Error("Cannot insert elements at root level");return m=this.parent.children.indexOf(this),g=this.parent.children.splice(m+1),b=this.parent.element(y,v,_),Array.prototype.push.apply(this.parent.children,g),b},c.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},c.prototype.node=function(y,v,_){var b,m;return y!=null&&(y=y.valueOf()),v||(v={}),v=v.valueOf(),i(v)||(m=[v,_],_=m[0],v=m[1]),b=new h(this,y,v),_!=null&&b.text(_),this.children.push(b),b},c.prototype.text=function(y){var v;return v=new u(this,y),this.children.push(v),this},c.prototype.cdata=function(y){var v;return v=new O(this,y),this.children.push(v),this},c.prototype.comment=function(y){var v;return v=new T(this,y),this.children.push(v),this},c.prototype.commentBefore=function(y){var v,_;return v=this.parent.children.indexOf(this),_=this.parent.children.splice(v),this.parent.comment(y),Array.prototype.push.apply(this.parent.children,_),this},c.prototype.commentAfter=function(y){var v,_;return v=this.parent.children.indexOf(this),_=this.parent.children.splice(v+1),this.parent.comment(y),Array.prototype.push.apply(this.parent.children,_),this},c.prototype.raw=function(y){var v;return v=new a(this,y),this.children.push(v),this},c.prototype.instruction=function(y,v){var _,b,m,g,E;if(y!=null&&(y=y.valueOf()),v!=null&&(v=v.valueOf()),Array.isArray(y))for(g=0,E=y.length;g<E;g++)_=y[g],this.instruction(_);else if(i(y))for(_ in y)t.call(y,_)&&(b=y[_],this.instruction(_,b));else f(v)&&(v=v.apply()),m=new d(this,y,v),this.children.push(m);return this},c.prototype.instructionBefore=function(y,v){var _,b;return _=this.parent.children.indexOf(this),b=this.parent.children.splice(_),this.parent.instruction(y,v),Array.prototype.push.apply(this.parent.children,b),this},c.prototype.instructionAfter=function(y,v){var _,b;return _=this.parent.children.indexOf(this),b=this.parent.children.splice(_+1),this.parent.instruction(y,v),Array.prototype.push.apply(this.parent.children,b),this},c.prototype.declaration=function(y,v,_){var b,m;return b=this.document(),m=new l(b,y,v,_),b.children[0]instanceof l?b.children[0]=m:b.children.unshift(m),b.root()||b},c.prototype.doctype=function(y,v){var _,b,m,g,E,o,x,C,A,D;for(b=this.document(),m=new p(b,y,v),A=b.children,g=E=0,x=A.length;E<x;g=++E)if((_=A[g])instanceof p)return b.children[g]=m,m;for(D=b.children,g=o=0,C=D.length;o<C;g=++o)if(_=D[g],_.isRoot)return b.children.splice(g,0,m),m;return b.children.push(m),m},c.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},c.prototype.root=function(){var y;for(y=this;y;){if(y.isDocument)return y.rootObject;if(y.isRoot)return y;y=y.parent}},c.prototype.document=function(){var y;for(y=this;y;){if(y.isDocument)return y;y=y.parent}},c.prototype.end=function(y){return this.document().end(y)},c.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]},c.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]},c.prototype.importDocument=function(y){var v;return v=y.root().clone(),v.parent=this,v.isRoot=!1,this.children.push(v),this},c.prototype.ele=function(y,v,_){return this.element(y,v,_)},c.prototype.nod=function(y,v,_){return this.node(y,v,_)},c.prototype.txt=function(y){return this.text(y)},c.prototype.dat=function(y){return this.cdata(y)},c.prototype.com=function(y){return this.comment(y)},c.prototype.ins=function(y,v){return this.instruction(y,v)},c.prototype.doc=function(){return this.document()},c.prototype.dec=function(y,v,_){return this.declaration(y,v,_)},c.prototype.dtd=function(y,v){return this.doctype(y,v)},c.prototype.e=function(y,v,_){return this.element(y,v,_)},c.prototype.n=function(y,v,_){return this.node(y,v,_)},c.prototype.t=function(y){return this.text(y)},c.prototype.d=function(y){return this.cdata(y)},c.prototype.c=function(y){return this.comment(y)},c.prototype.r=function(y){return this.raw(y)},c.prototype.i=function(y,v){return this.instruction(y,v)},c.prototype.u=function(){return this.up()},c.prototype.importXMLBuilder=function(y){return this.importDocument(y)},c}()}).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 O=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(O);(function(){var l,p=function(d,a){function u(){this.constructor=d}for(var s in a)h.call(a,s)&&(d[s]=a[s]);return u.prototype=a.prototype,d.prototype=new u,d.__super__=a.prototype,d},h={}.hasOwnProperty;l=w("./XMLNode"),P.exports=function(d){function a(u,s,f){if(a.__super__.constructor.call(this,u),s==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(s),f&&(this.value=this.stringify.insValue(f))}return p(a,d),a.prototype.clone=function(){return(0,T.default)(this)},a.prototype.toString=function(u){return this.options.writer.set(u).processingInstruction(this)},a}(l)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(w,P,S){"use strict";var O=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(O);(function(){var l,p=function(d,a){function u(){this.constructor=d}for(var s in a)h.call(a,s)&&(d[s]=a[s]);return u.prototype=a.prototype,d.prototype=new u,d.__super__=a.prototype,d},h={}.hasOwnProperty;l=w("./XMLNode"),P.exports=function(d){function a(u,s){if(a.__super__.constructor.call(this,u),s==null)throw new Error("Missing raw text");this.value=this.stringify.raw(s)}return p(a,d),a.prototype.clone=function(){return(0,T.default)(this)},a.prototype.toString=function(u){return this.options.writer.set(u).raw(this)},a}(l)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(w,P,S){"use strict";(function(){var O,T,l,p,h,d,a,u,s,f,i,n,t,c=function(v,_){function b(){this.constructor=v}for(var m in _)y.call(_,m)&&(v[m]=_[m]);return b.prototype=_.prototype,v.prototype=new b,v.__super__=_.prototype,v},y={}.hasOwnProperty;a=w("./XMLDeclaration"),u=w("./XMLDocType"),O=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(v){function _(b,m){_.__super__.constructor.call(this,m),this.stream=b}return c(_,v),_.prototype.document=function(b){var m,g,E,o,x,C,A,D;for(C=b.children,g=0,o=C.length;g<o;g++)m=C[g],m.isLastRootNode=!1;for(b.children[b.children.length-1].isLastRootNode=!0,A=b.children,D=[],E=0,x=A.length;E<x;E++)switch(m=A[E],!1){case!(m instanceof a):D.push(this.declaration(m));break;case!(m instanceof u):D.push(this.docType(m));break;case!(m instanceof T):D.push(this.comment(m));break;case!(m instanceof f):D.push(this.processingInstruction(m));break;default:D.push(this.element(m))}return D},_.prototype.attribute=function(b){return this.stream.write(" "+b.name+'="'+b.value+'"')},_.prototype.cdata=function(b,m){return this.stream.write(this.space(m)+"<![CDATA["+b.text+"]]>"+this.endline(b))},_.prototype.comment=function(b,m){return this.stream.write(this.space(m)+"<!-- "+b.text+" -->"+this.endline(b))},_.prototype.declaration=function(b,m){return this.stream.write(this.space(m)),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,m){var g,E,o,x;if(m||(m=0),this.stream.write(this.space(m)),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,o=x.length;E<o;E++)switch(g=x[E],!1){case!(g instanceof l):this.dtdAttList(g,m+1);break;case!(g instanceof p):this.dtdElement(g,m+1);break;case!(g instanceof h):this.dtdEntity(g,m+1);break;case!(g instanceof d):this.dtdNotation(g,m+1);break;case!(g instanceof O):this.cdata(g,m+1);break;case!(g instanceof T):this.comment(g,m+1);break;case!(g instanceof f):this.processingInstruction(g,m+1);break;default:throw new Error("Unknown DTD node type: "+g.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(b))},_.prototype.element=function(b,m){var g,E,o,x,C,A,D,I;m||(m=0),I=this.space(m),this.stream.write(I+"<"+b.name),A=b.attributes;for(C in A)y.call(A,C)&&(g=A[C],this.attribute(g));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,o=0,x=D.length;o<x;o++)switch(E=D[o],!1){case!(E instanceof O):this.cdata(E,m+1);break;case!(E instanceof T):this.comment(E,m+1);break;case!(E instanceof s):this.element(E,m+1);break;case!(E instanceof i):this.raw(E,m+1);break;case!(E instanceof n):this.text(E,m+1);break;case!(E instanceof f):this.processingInstruction(E,m+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,m){return this.stream.write(this.space(m)+"<?"+b.target),b.value&&this.stream.write(" "+b.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(b))},_.prototype.raw=function(b,m){return this.stream.write(this.space(m)+b.value+this.endline(b))},_.prototype.text=function(b,m){return this.stream.write(this.space(m)+b.value+this.endline(b))},_.prototype.dtdAttList=function(b,m){return this.stream.write(this.space(m)+"<!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,m){return this.stream.write(this.space(m)+"<!ELEMENT "+b.name+" "+b.value),this.stream.write(this.spacebeforeslash+">"+this.endline(b))},_.prototype.dtdEntity=function(b,m){return this.stream.write(this.space(m)+"<!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,m){return this.stream.write(this.space(m)+"<!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 O,T,l,p,h,d,a,u,s,f,i,n,t,c=function(v,_){function b(){this.constructor=v}for(var m in _)y.call(_,m)&&(v[m]=_[m]);return b.prototype=_.prototype,v.prototype=new b,v.__super__=_.prototype,v},y={}.hasOwnProperty;a=w("./XMLDeclaration"),u=w("./XMLDocType"),O=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(v){function _(b){_.__super__.constructor.call(this,b)}return c(_,v),_.prototype.document=function(b){var m,g,E,o,x;for(this.textispresent=!1,o="",x=b.children,g=0,E=x.length;g<E;g++)m=x[g],o+=function(){switch(!1){case!(m instanceof a):return this.declaration(m);case!(m instanceof u):return this.docType(m);case!(m instanceof T):return this.comment(m);case!(m instanceof f):return this.processingInstruction(m);default:return this.element(m,0)}}.call(this);return this.pretty&&o.slice(-this.newline.length)===this.newline&&(o=o.slice(0,-this.newline.length)),o},_.prototype.attribute=function(b){return" "+b.name+'="'+b.value+'"'},_.prototype.cdata=function(b,m){return this.space(m)+"<![CDATA["+b.text+"]]>"+this.newline},_.prototype.comment=function(b,m){return this.space(m)+"<!-- "+b.text+" -->"+this.newline},_.prototype.declaration=function(b,m){var g;return g=this.space(m),g+='<?xml version="'+b.version+'"',b.encoding!=null&&(g+=' encoding="'+b.encoding+'"'),b.standalone!=null&&(g+=' standalone="'+b.standalone+'"'),g+=this.spacebeforeslash+"?>",g+=this.newline},_.prototype.docType=function(b,m){var g,E,o,x,C;if(m||(m=0),x=this.space(m),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,C=b.children,E=0,o=C.length;E<o;E++)g=C[E],x+=function(){switch(!1){case!(g instanceof l):return this.dtdAttList(g,m+1);case!(g instanceof p):return this.dtdElement(g,m+1);case!(g instanceof h):return this.dtdEntity(g,m+1);case!(g instanceof d):return this.dtdNotation(g,m+1);case!(g instanceof O):return this.cdata(g,m+1);case!(g instanceof T):return this.comment(g,m+1);case!(g instanceof f):return this.processingInstruction(g,m+1);default:throw new Error("Unknown DTD node type: "+g.constructor.name)}}.call(this);x+="]"}return x+=this.spacebeforeslash+">",x+=this.newline},_.prototype.element=function(b,m){var g,E,o,x,C,A,D,I,F,H,te,j,G;m||(m=0),G=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),j=this.space(m),I="",I+=j+"<"+b.name,F=b.attributes;for(D in F)y.call(F,D)&&(g=F[D],I+=this.attribute(g));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(H=b.children,o=0,C=H.length;o<C;o++)if(E=H[o],E.value!=null){this.textispresent++,G=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,j=this.space(m)),I+=">"+this.newline,te=b.children,x=0,A=te.length;x<A;x++)E=te[x],I+=function(){switch(!1){case!(E instanceof O):return this.cdata(E,m+1);case!(E instanceof T):return this.comment(E,m+1);case!(E instanceof s):return this.element(E,m+1);case!(E instanceof i):return this.raw(E,m+1);case!(E instanceof n):return this.text(E,m+1);case!(E instanceof f):return this.processingInstruction(E,m+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,m){var g;return g=this.space(m)+"<?"+b.target,b.value&&(g+=" "+b.value),g+=this.spacebeforeslash+"?>"+this.newline},_.prototype.raw=function(b,m){return this.space(m)+b.value+this.newline},_.prototype.text=function(b,m){return this.space(m)+b.value+this.newline},_.prototype.dtdAttList=function(b,m){var g;return g=this.space(m)+"<!ATTLIST "+b.elementName+" "+b.attributeName+" "+b.attributeType,b.defaultValueType!=="#DEFAULT"&&(g+=" "+b.defaultValueType),b.defaultValue&&(g+=' "'+b.defaultValue+'"'),g+=this.spacebeforeslash+">"+this.newline},_.prototype.dtdElement=function(b,m){return this.space(m)+"<!ELEMENT "+b.name+" "+b.value+this.spacebeforeslash+">"+this.newline},_.prototype.dtdEntity=function(b,m){var g;return g=this.space(m)+"<!ENTITY",b.pe&&(g+=" %"),g+=" "+b.name,b.value?g+=' "'+b.value+'"':(b.pubID&&b.sysID?g+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(g+=' SYSTEM "'+b.sysID+'"'),b.nData&&(g+=" NDATA "+b.nData)),g+=this.spacebeforeslash+">"+this.newline},_.prototype.dtdNotation=function(b,m){var g;return g=this.space(m)+"<!NOTATION "+b.name,b.pubID&&b.sysID?g+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.pubID?g+=' PUBLIC "'+b.pubID+'"':b.sysID&&(g+=' SYSTEM "'+b.sysID+'"'),g+=this.spacebeforeslash+">"+this.newline},_.prototype.openNode=function(b,m){var g,E,o,x;if(m||(m=0),b instanceof s){o=this.space(m)+"<"+b.name,x=b.attributes;for(E in x)y.call(x,E)&&(g=x[E],o+=this.attribute(g));return o+=(b.children?">":"/>")+this.newline}return o=this.space(m)+"<!DOCTYPE "+b.rootNodeName,b.pubID&&b.sysID?o+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(o+=' SYSTEM "'+b.sysID+'"'),o+=(b.children?" [":">")+this.newline},_.prototype.closeNode=function(b,m){switch(m||(m=0),!1){case!(b instanceof s):return this.space(m)+"</"+b.name+">"+this.newline;case!(b instanceof u):return this.space(m)+"]>"+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 O=function(l,p){return function(){return l.apply(p,arguments)}},T={}.hasOwnProperty;P.exports=function(){function l(p){this.assertLegalChar=O(this.assertLegalChar,this);var h,d,a;p||(p={}),this.noDoubleEncoding=p.noDoubleEncoding,d=p.stringify||{};for(h in d)T.call(d,h)&&(a=d[h],this[h]=a)}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,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},l.prototype.attEscape=function(p){var h;return h=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(h,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},l}()}).call(void 0)},{}],233:[function(w,P,S){"use strict";var O=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(O);(function(){var l,p=function(d,a){function u(){this.constructor=d}for(var s in a)h.call(a,s)&&(d[s]=a[s]);return u.prototype=a.prototype,d.prototype=new u,d.__super__=a.prototype,d},h={}.hasOwnProperty;l=w("./XMLNode"),P.exports=function(d){function a(u,s){if(a.__super__.constructor.call(this,u),s==null)throw new Error("Missing element text");this.value=this.stringify.eleText(s)}return p(a,d),a.prototype.clone=function(){return(0,T.default)(this)},a.prototype.toString=function(u){return this.options.writer.set(u).text(this)},a}(l)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(w,P,S){"use strict";(function(){var O={}.hasOwnProperty;P.exports=function(){function T(l){var p,h,d,a,u,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=(a=l.newline)!=null?a:`
|
|
|
`,this.offset=(u=l.offset)!=null?u: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)O.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)O.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 O,T,l,p,h,d,a;a=w("./Utility"),h=a.assign,d=a.isFunction,O=w("./XMLDocument"),T=w("./XMLDocumentCB"),p=w("./XMLStringWriter"),l=w("./XMLStreamWriter"),P.exports.create=function(u,s,f,i){var n,t;if(u==null)throw new Error("Root element needs a name");return i=h({},s,f,i),n=new O(i),t=n.element(u),i.headless||(n.declaration(i),i.pubID==null&&i.sysID==null||n.doctype(i)),t},P.exports.begin=function(u,s,f){var i;return d(u)&&(i=[u,s],s=i[0],f=i[1],u={}),s?new T(u,s,f):new O(u)},P.exports.stringWriter=function(u){return new p(u)},P.exports.streamWriter=function(u,s){return new l(u,s)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(w,P,S){function O(){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=O;var T=Object.prototype.hasOwnProperty},{}],237:[function(w,P,S){"use strict";function O(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 c=new p(s),y=new p(s),v=0;v<s;v++)c[v]=54^n[v],y[v]=92^n[v];var _=i(p.concat([c,t]));return i(p.concat([y,_]))}function T(i,n){i=i||"sha1";var t=u[i],c=[],y=0;return t||l("algorithm:",i,"is not yet supported"),{update:function(v){return p.isBuffer(v)||(v=new p(v)),c.push(v),y+=v.length,this},digest:function(v){var _=p.concat(c),b=n?O(t,n,_):t(_);return c=null,v?b.toString(v):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"),a=w("./md5"),u={sha1:h,sha256:d,md5:a},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 O(u,s){if(u.length%h!=0){var f=u.length+(h-u.length%h);u=p.concat([u,d],f)}for(var i=[],n=s?u.readInt32BE:u.readInt32LE,t=0;t<u.length;t+=h)i.push(n.call(u,t));return i}function T(u,s,f){for(var i=new p(s),n=f?i.writeInt32BE:i.writeInt32LE,t=0;t<u.length;t++)n.call(i,u[t],4*t,!0);return i}function l(u,s,f,i){return p.isBuffer(u)||(u=new p(u)),T(s(O(u,i),u.length*a),f,i)}var p=w("buffer").Buffer,h=4,d=new p(h);d.fill(0);var a=8;P.exports={hash:l}},{buffer:38}],239:[function(w,P,S){"use strict";function O(f,i){f[i>>5]|=128<<i%32,f[14+(i+64>>>9<<4)]=i;for(var n=1732584193,t=-271733879,c=-1732584194,y=271733878,v=0;v<f.length;v+=16){var _=n,b=t,m=c,g=y;n=l(n,t,c,y,f[v+0],7,-680876936),y=l(y,n,t,c,f[v+1],12,-389564586),c=l(c,y,n,t,f[v+2],17,606105819),t=l(t,c,y,n,f[v+3],22,-1044525330),n=l(n,t,c,y,f[v+4],7,-176418897),y=l(y,n,t,c,f[v+5],12,1200080426),c=l(c,y,n,t,f[v+6],17,-1473231341),t=l(t,c,y,n,f[v+7],22,-45705983),n=l(n,t,c,y,f[v+8],7,1770035416),y=l(y,n,t,c,f[v+9],12,-1958414417),c=l(c,y,n,t,f[v+10],17,-42063),t=l(t,c,y,n,f[v+11],22,-1990404162),n=l(n,t,c,y,f[v+12],7,1804603682),y=l(y,n,t,c,f[v+13],12,-40341101),c=l(c,y,n,t,f[v+14],17,-1502002290),t=l(t,c,y,n,f[v+15],22,1236535329),n=p(n,t,c,y,f[v+1],5,-165796510),y=p(y,n,t,c,f[v+6],9,-1069501632),c=p(c,y,n,t,f[v+11],14,643717713),t=p(t,c,y,n,f[v+0],20,-373897302),n=p(n,t,c,y,f[v+5],5,-701558691),y=p(y,n,t,c,f[v+10],9,38016083),c=p(c,y,n,t,f[v+15],14,-660478335),t=p(t,c,y,n,f[v+4],20,-405537848),n=p(n,t,c,y,f[v+9],5,568446438),y=p(y,n,t,c,f[v+14],9,-1019803690),c=p(c,y,n,t,f[v+3],14,-187363961),t=p(t,c,y,n,f[v+8],20,1163531501),n=p(n,t,c,y,f[v+13],5,-1444681467),y=p(y,n,t,c,f[v+2],9,-51403784),c=p(c,y,n,t,f[v+7],14,1735328473),t=p(t,c,y,n,f[v+12],20,-1926607734),n=h(n,t,c,y,f[v+5],4,-378558),y=h(y,n,t,c,f[v+8],11,-2022574463),c=h(c,y,n,t,f[v+11],16,1839030562),t=h(t,c,y,n,f[v+14],23,-35309556),n=h(n,t,c,y,f[v+1],4,-1530992060),y=h(y,n,t,c,f[v+4],11,1272893353),c=h(c,y,n,t,f[v+7],16,-155497632),t=h(t,c,y,n,f[v+10],23,-1094730640),n=h(n,t,c,y,f[v+13],4,681279174),y=h(y,n,t,c,f[v+0],11,-358537222),c=h(c,y,n,t,f[v+3],16,-722521979),t=h(t,c,y,n,f[v+6],23,76029189),n=h(n,t,c,y,f[v+9],4,-640364487),y=h(y,n,t,c,f[v+12],11,-421815835),c=h(c,y,n,t,f[v+15],16,530742520),t=h(t,c,y,n,f[v+2],23,-995338651),n=d(n,t,c,y,f[v+0],6,-198630844),y=d(y,n,t,c,f[v+7],10,1126891415),c=d(c,y,n,t,f[v+14],15,-1416354905),t=d(t,c,y,n,f[v+5],21,-57434055),n=d(n,t,c,y,f[v+12],6,1700485571),y=d(y,n,t,c,f[v+3],10,-1894986606),c=d(c,y,n,t,f[v+10],15,-1051523),t=d(t,c,y,n,f[v+1],21,-2054922799),n=d(n,t,c,y,f[v+8],6,1873313359),y=d(y,n,t,c,f[v+15],10,-30611744),c=d(c,y,n,t,f[v+6],15,-1560198380),t=d(t,c,y,n,f[v+13],21,1309151649),n=d(n,t,c,y,f[v+4],6,-145523070),y=d(y,n,t,c,f[v+11],10,-1120210379),c=d(c,y,n,t,f[v+2],15,718787259),t=d(t,c,y,n,f[v+9],21,-343485551),n=a(n,_),t=a(t,b),c=a(c,m),y=a(y,g)}return Array(n,t,c,y)}function T(f,i,n,t,c,y){return a(u(a(a(i,f),a(t,y)),c),n)}function l(f,i,n,t,c,y,v){return T(i&n|~i&t,f,i,c,y,v)}function p(f,i,n,t,c,y,v){return T(i&t|n&~t,f,i,c,y,v)}function h(f,i,n,t,c,y,v){return T(i^n^t,f,i,c,y,v)}function d(f,i,n,t,c,y,v){return T(n^(i|~t),f,i,c,y,v)}function a(f,i){var n=(65535&f)+(65535&i);return(f>>16)+(i>>16)+(n>>16)<<16|65535&n}function u(f,i){return f<<i|f>>>32-i}var s=w("./helpers");P.exports=function(f){return s.hash(f,O,16)}},{"./helpers":238}],240:[function(w,P,S){"use strict";function O(a,u){a[u>>5]|=128<<24-u%32,a[15+(u+64>>9<<4)]=u;for(var s=Array(80),f=1732584193,i=-271733879,n=-1732584194,t=271733878,c=-1009589776,y=0;y<a.length;y+=16){for(var v=f,_=i,b=n,m=t,g=c,E=0;E<80;E++){s[E]=E<16?a[y+E]:h(s[E-3]^s[E-8]^s[E-14]^s[E-16],1);var o=p(p(h(f,5),T(E,i,n,t)),p(p(c,s[E]),l(E)));c=t,t=n,n=h(i,30),i=f,f=o}f=p(f,v),i=p(i,_),n=p(n,b),t=p(t,m),c=p(c,g)}return Array(f,i,n,t,c)}function T(a,u,s,f){return a<20?u&s|~u&f:a<40?u^s^f:a<60?u&s|u&f|s&f:u^s^f}function l(a){return a<20?1518500249:a<40?1859775393:a<60?-1894007588:-899497514}function p(a,u){var s=(65535&a)+(65535&u);return(a>>16)+(u>>16)+(s>>16)<<16|65535&s}function h(a,u){return a<<u|a>>>32-u}var d=w("./helpers");P.exports=function(a){return d.hash(a,O,20,!0)}},{"./helpers":238}],241:[function(w,P,S){"use strict";var O=w("./helpers"),T=function(n,t){var c=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(c>>16)<<16|65535&c},l=function(n,t){return n>>>t|n<<32-t},p=function(n,t){return n>>>t},h=function(n,t,c){return n&t^~n&c},d=function(n,t,c){return n&t^n&c^t&c},a=function(n){return l(n,2)^l(n,13)^l(n,22)},u=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 c,y,v,_,b,m,g,E,o,x,C,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 o=0;o<n.length;o+=16){c=I[0],y=I[1],v=I[2],_=I[3],b=I[4],m=I[5],g=I[6],E=I[7];for(var x=0;x<64;x++)F[x]=x<16?n[x+o]:T(T(T(f(F[x-2]),F[x-7]),s(F[x-15])),F[x-16]),C=T(T(T(T(E,u(b)),h(b,m,g)),D[x]),F[x]),A=T(a(c),d(c,y,v)),E=g,g=m,m=b,b=T(_,C),_=v,v=y,y=c,c=T(C,A);I[0]=T(c,I[0]),I[1]=T(y,I[1]),I[2]=T(v,I[2]),I[3]=T(_,I[3]),I[4]=T(b,I[4]),I[5]=T(m,I[5]),I[6]=T(g,I[6]),I[7]=T(E,I[7])}return I};P.exports=function(n){return O.hash(n,i,32,!0)}},{"./helpers":238}],242:[function(w,P,S){(function(O){"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),a=w("babel-runtime/helpers/createClass"),u=T(a),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:O!==void 0?O:typeof self!="undefined"?self:this,n.mime=i()}}(function(){return function i(n,t,c){function y(b,m){if(!t[b]){if(!n[b]){var g=typeof w=="function"&&w;if(!m&&g)return g(b,!0);if(v)return v(b,!0);var E=new Error("Cannot find module '"+b+"'");throw E.code="MODULE_NOT_FOUND",E}var o=t[b]={exports:{}};n[b][0].call(o.exports,function(x){var C=n[b][1][x];return y(C||x)},o,o.exports,i,n,t,c)}return t[b].exports}for(var v=typeof w=="function"&&w,_=0;_<c.length;_++)y(c[_]);return y}({1:[function(i,n,t){var c=function(){function y(){(0,d.default)(this,y),this._types=(0,p.default)(null),this._extensions=(0,p.default)(null);for(var v=0;v<arguments.length;v++)this.define(arguments[v])}return(0,u.default)(y,[{key:"define",value:function(v,_){for(var b in v){for(var m=v[b],g=0;g<m.length;g++){var E=m[g];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]=m[0])}}},{key:"getType",value:function(v){v=String(v);var _=v.replace(/^.*[\/\\]/,"").toLowerCase(),b=_.replace(/^.*\./,"").toLowerCase(),m=_.length<v.length;return(b.length<_.length-1||!m)&&this._types[b]||null}},{key:"getExtension",value:function(v){return(v=/^\s*([^;\s]*)/.test(v)&&RegExp.$1)&&this._extensions[v.toLowerCase()]||null}}]),y}();n.exports=c},{}],2:[function(i,n,t){var c=i("./Mime");n.exports=new c(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(O){try{return encodeURIComponent(O)}catch(T){return O}},S.escape=w("escape-html"),S.timestamp=function(O){if(O){var T=O;return typeof T=="string"&&(T=Number(T)),String(O).length===10&&(T*=1e3),new Date(T)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(w,P,S){(function(O,T){"use strict";function l(E){return E&&E.__esModule?E:{default:E}}function p(E,o){return E===void 0?o:E}function h(E,o){return function(x,C,A){if(x)return o(x);E({data:C,status:A.statusCode,headers:A.headers,res:A})}}var d,a=w("babel-runtime/core-js/json/stringify"),u=l(a),s=w("babel-runtime/helpers/typeof"),f=l(s),i=w("util"),n=w("url"),t=w("http"),c=w("https"),y=w("debug")("urllib"),v=w("humanize-ms"),_=0,b=Math.pow(2,31)-10,m=/^https?:\/\//i;S.TIMEOUTS=[v("300s"),v("300s")];var g=["json","text"];S.request=function(E,o,x){return arguments.length===2&&typeof o=="function"&&(x=o,o=null),typeof x=="function"?S.requestWithCallback(E,o,x):(d||(d=w("any-promise")),new d(function(C,A){S.requestWithCallback(E,o,h(C,A))}))},S.requestWithCallback=function(E,o,x){function C(){Ye&&(clearTimeout(Ye),Ye=null)}function A(){ee&&(clearTimeout(ee),ee=null)}function D(Ke,we,Ae){if(A(),!x)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),X,O.pid,pe.method,E),void(Ke&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),X,O.pid,Ke.name,Ke.message,Ke.stack));var Oe=x;x=null;var fe={};if(Ae&&(Y=Ae.statusCode,fe=Ae.headers),Y===401&&fe["www-authenticate"]&&(!o.headers||!o.headers.Authorization)&&o.digestAuth){var ge=fe["www-authenticate"];if(ge.indexOf("Digest ")>=0)return y("Request#%d %s: got digest auth header WWW-Authenticate: %s",X,E,ge),o.headers=o.headers||{},o.headers.Authorization=digestAuthHeader(pe.method,pe.path,ge,o.digestAuth),y("Request#%d %s: auth with digest header: %s",X,E,o.headers.Authorization),Ae.headers["set-cookie"]&&(o.headers.Cookie=Ae.headers["set-cookie"].join(";")),S.requestWithCallback(E,o,Oe)}var _e=Date.now()-Q;De&&(De.contentDownload=_e),y("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",_e,V,Y,pe.method,pe.host,pe.path,$,De);var be={status:Y,statusCode:Y,headers:fe,size:V,aborted:me,rt:_e,keepAliveSocket:$,data:we,requestUrls:o.requestUrls,timing:De,remoteAddress:Re,remotePort:rt};if(Ke){var Ge="";ye&&typeof ye.getCurrentStatus=="function"&&(Ge=", agent status: "+(0,u.default)(ye.getCurrentStatus())),Ke.message+=", "+pe.method+" "+E+" "+Y+" (connected: "+N+", keepalive socket: "+$+Ge+`)
|
|
|
headers: `+(0,u.default)(fe),Ke.data=we,Ke.path=pe.path,Ke.status=Y,Ke.headers=fe,Ke.res=be}Oe(Ke,we,o.streaming?Ae:be),o.emitter&&(J.url=E,J.socket=Ve&&Ve.connection,J.options=pe,J.size=Ie,o.emitter.emit("response",{requestId:X,error:Ke,ctx:o.ctx,req:J,res:be}))}function I(Ke){var we=null;if(o.followRedirect&&statuses.redirect[Ke.statusCode]){o._followRedirectCount=(o._followRedirectCount||0)+1;var Ae=Ke.headers.location;if(Ae){if(!(o._followRedirectCount>o.maxRedirects)){var Oe=o.formatRedirectUrl?o.formatRedirectUrl(E,Ae):n.resolve(E,Ae);y("Request#%d %s: `redirected` from %s to %s",X,pe.path,E,Oe),A(),o.headers&&o.headers.Host&&m.test(Ae)&&(o.headers.Host=null);var fe=x;return x=null,S.requestWithCallback(Oe,o,fe),{redirect:!0,error:null}}we=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+E),we.name="MaxRedirectError"}else we=new Error("Got statusCode "+Ke.statusCode+" but cannot resolve next location from headers"),we.name="FollowRedirectError"}return{redirect:!1,error:we}}function F(Ke,we,Ae){return Ae(null,we,Ke.headers["content-encoding"])}function H(Ke){if(De&&(De.waiting=Date.now()-Q),y("Request#%d %s `req response` event emit: status %d, headers: %j",X,E,Ke.statusCode,Ke.headers),o.streaming){var we=I(Ke);return we.redirect?void Ke.resume():we.error?(Ke.resume(),D(we.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)}),Me){var we=I(Ke);return we.redirect?void Ke.resume():we.error?(Ke.resume(),Me.end(),D(we.error,null,Ke)):(o.consumeWriteStream===!1?Ke.on("end",D.bind(null,null,null,Ke)):isNode010||isNode012?first([[Me,"close"],[Ke,"aborted"]],function(fe,ge,_e){y("Request#%d %s: writeStream or res %s event emitted",X,E,_e),D(M||null,null,Ke)}):Me.on("close",function(){y("Request#%d %s: writeStream close event emitted",X,E),D(M||null,null,Ke)}),Ke.pipe(Me))}var Ae=[];Ke.on("data",function(Oe){y("Request#%d %s: `res data` event emit, size %d",X,E,Oe.length),V+=Oe.length,Ae.push(Oe)}),Ke.on("end",function(){var Oe=T.concat(Ae,V);if(y("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",X,E,V,Ke._dumped),M)return D(M,Oe,Ke);var fe=I(Ke);if(fe.error)return D(fe.error,Oe,Ke);fe.redirect||F(Ke,Oe,function(ge,_e,be){if(ge)return D(ge,Oe,Ke);if(!be&&g.indexOf(o.dataType)>=0){try{_e=decodeBodyByCharset(_e,Ke)}catch(qe){return y("decodeBodyByCharset error: %s",qe),D(null,_e,Ke)}if(o.dataType==="json")if(V===0)_e=null;else{var Ge=parseJSON(_e,Le);Ge.error?ge=Ge.error:_e=Ge.data}}me&&y("Request#%d %s: Remote socket was terminated before `response.end()` was called",X,E),D(ge,_e,Ke)})})}function te(){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 o=="function"&&(x=o,o=null),o=o||{},_>=b&&(_=0);var X=++_;o.requestUrls=o.requestUrls||[];var J={requestId:X,url:E,args:o,ctx:o.ctx};o.emitter&&o.emitter.emit("request",J),o.timeout=o.timeout||S.TIMEOUTS,o.maxRedirects=o.maxRedirects||10,o.streaming=o.streaming||o.customResponse;var B,Q=Date.now();typeof E=="string"?(m.test(E)||(E="http://"+E),B=n.parse(E)):B=E;var ie=(o.type||o.method||B.method||"GET").toUpperCase(),oe=B.port||80,Ee=t,ye=p(o.agent,S.agent),Le=o.fixJSONCtlChars;B.protocol==="https:"&&(Ee=c,ye=p(o.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:o.headers||{},lookup:o.lookup};Array.isArray(o.timeout)?pe.requestTimeout=o.timeout[o.timeout.length-1]:o.timeout!==void 0&&(pe.requestTimeout=o.timeout);for(var Ce=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],Be=0;Be<Ce.length;Be++){var Pe=Ce[Be];o.hasOwnProperty(Pe)&&(pe[Pe]=o[Pe])}pe.rejectUnauthorized!==!1||pe.hasOwnProperty("secureOptions")||(pe.secureOptions=w("constants").SSL_OP_NO_TLSv1_2);var ke=o.auth||B.auth;ke&&(pe.auth=ke);var Ne=o.content||o.data,he=ie==="GET"||ie==="HEAD"||o.dataAsQueryString;if(!o.content&&Ne&&typeof Ne!="string"&&!T.isBuffer(Ne))if(he)Ne=o.nestedQuerystring?qs.stringify(Ne):querystring.stringify(Ne);else{var ue=pe.headers["Content-Type"]||pe.headers["content-type"];ue||(ue=o.contentType==="json"?"application/json":"application/x-www-form-urlencoded",pe.headers["Content-Type"]=ue),Ne=parseContentType(ue).type==="application/json"?(0,u.default)(Ne):o.nestedQuerystring?qs.stringify(Ne):querystring.stringify(Ne)}he&&Ne&&(pe.path+=(B.query?"&":"?")+Ne,Ne=null);var Ie=0;if(Ne){var Ue=Ne.length;T.isBuffer(Ne)||(Ue=T.byteLength(Ne)),Ie=pe.headers["Content-Length"]=Ue}o.dataType==="json"&&(pe.headers.Accept="application/json"),typeof o.beforeRequest=="function"&&o.beforeRequest(pe);var Ye=null,ee=null,M=null,N=!1,$=!1,V=0,Y=-1,me=!1,Re="",rt="",De=null;o.timing&&(De={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),o.gzip&&(pe.headers["Accept-Encoding"]||pe.headers["accept-encoding"]||(pe.headers["Accept-Encoding"]="gzip"));var Me=o.writeStream;y("Request#%d %s %s with headers %j, options.path: %s",X,ie,E,pe.headers,pe.path),o.requestUrls.push(E);var Xe,tt;Array.isArray(o.timeout)?(Xe=v(o.timeout[0]),tt=v(o.timeout[1])):Xe=tt=v(o.timeout),y("ConnectTimeout: %d, ResponseTimeout: %d",Xe,tt);var Ve;try{Ve=Ee.request(pe,H)}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",we="ConnectionTimeoutError";Ve.socket||(we="SocketAssignTimeoutError",Ke+=", working sockets is full"),M=new Error(Ke),M.name=we,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()}),De&&Ve.on("finish",function(){De.requestSent=Date.now()-Q}),Ve.once("socket",function(Ke){De&&(De.queuing=Date.now()-Q),isNode010&&Ke.socket&&(Ke=Ke.socket);var we=Ke.readyState;if(we==="opening")return Ke.once("lookup",function(Ae,Oe,fe){y("Request#%d %s lookup: %s, %s, %s",X,E,Ae,Oe,fe),De&&(De.dnslookup=Date.now()-Q),Oe&&(Re=Oe)}),void Ke.once("connect",function(){De&&(De.connected=Date.now()-Q),C(),te(),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,we),N=!0,$=!0,Re||(Re=Ke.remoteAddress),rt=Ke.remotePort,C(),te()}),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)}),Me&&Me.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()}),o.stream?(o.stream.pipe(Ve),o.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(Ne),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 O=P[S]={i:S,l:!1,exports:{}};return U[S].call(O.exports,O,O.exports,w),O.l=!0,O.exports}var P={};w.m=U,w.c=P,w.d=function(S,O,T){w.o(S,O)||Object.defineProperty(S,O,{configurable:!1,enumerable:!0,get:T})},w.n=function(S){var O=S&&S.__esModule?function(){return S.default}:function(){return S};return w.d(O,"a",O),O},w.o=function(S,O){return Object.prototype.hasOwnProperty.call(S,O)},w.p="",w(w.s=12)}([function(U,w,P){!function(S,O){U.exports=w=O()}(0,function(){var S=S||function(O,T){var l=Object.create||function(){function c(){}return function(y){var v;return c.prototype=y,v=new c,c.prototype=null,v}}(),p={},h=p.lib={},d=h.Base=function(){return{extend:function(c){var y=l(this);return c&&y.mixIn(c),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 c=this.extend();return c.init.apply(c,arguments),c},init:function(){},mixIn:function(c){for(var y in c)c.hasOwnProperty(y)&&(this[y]=c[y]);c.hasOwnProperty("toString")&&(this.toString=c.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=h.WordArray=d.extend({init:function(c,y){c=this.words=c||[],this.sigBytes=y!=null?y:4*c.length},toString:function(c){return(c||s).stringify(this)},concat:function(c){var y=this.words,v=c.words,_=this.sigBytes,b=c.sigBytes;if(this.clamp(),_%4)for(var m=0;m<b;m++){var g=v[m>>>2]>>>24-m%4*8&255;y[_+m>>>2]|=g<<24-(_+m)%4*8}else for(var m=0;m<b;m+=4)y[_+m>>>2]=v[m>>>2];return this.sigBytes+=b,this},clamp:function(){var c=this.words,y=this.sigBytes;c[y>>>2]&=4294967295<<32-y%4*8,c.length=O.ceil(y/4)},clone:function(){var c=d.clone.call(this);return c.words=this.words.slice(0),c},random:function(c){for(var y,v=[],_=0;_<c;_+=4){var b=function(m){var m=m,g=987654321,E=4294967295;return function(){g=36969*(65535&g)+(g>>16)&E,m=18e3*(65535&m)+(m>>16)&E;var o=(g<<16)+m&E;return o/=4294967296,(o+=.5)*(O.random()>.5?1:-1)}}(4294967296*(y||O.random()));y=987654071*b(),v.push(4294967296*b()|0)}return new a.init(v,c)}}),u=p.enc={},s=u.Hex={stringify:function(c){for(var y=c.words,v=c.sigBytes,_=[],b=0;b<v;b++){var m=y[b>>>2]>>>24-b%4*8&255;_.push((m>>>4).toString(16)),_.push((15&m).toString(16))}return _.join("")},parse:function(c){for(var y=c.length,v=[],_=0;_<y;_+=2)v[_>>>3]|=parseInt(c.substr(_,2),16)<<24-_%8*4;return new a.init(v,y/2)}},f=u.Latin1={stringify:function(c){for(var y=c.words,v=c.sigBytes,_=[],b=0;b<v;b++){var m=y[b>>>2]>>>24-b%4*8&255;_.push(String.fromCharCode(m))}return _.join("")},parse:function(c){for(var y=c.length,v=[],_=0;_<y;_++)v[_>>>2]|=(255&c.charCodeAt(_))<<24-_%4*8;return new a.init(v,y)}},i=u.Utf8={stringify:function(c){try{return decodeURIComponent(escape(f.stringify(c)))}catch(y){throw new Error("Malformed UTF-8 data")}},parse:function(c){return f.parse(unescape(encodeURIComponent(c)))}},n=h.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(c){typeof c=="string"&&(c=i.parse(c)),this._data.concat(c),this._nDataBytes+=c.sigBytes},_process:function(c){var y=this._data,v=y.words,_=y.sigBytes,b=this.blockSize,m=4*b,g=_/m;g=c?O.ceil(g):O.max((0|g)-this._minBufferSize,0);var E=g*b,o=O.min(4*E,_);if(E){for(var x=0;x<E;x+=b)this._doProcessBlock(v,x);var C=v.splice(0,E);y.sigBytes-=o}return new a.init(C,o)},clone:function(){var c=d.clone.call(this);return c._data=this._data.clone(),c},_minBufferSize:0}),t=(h.Hasher=n.extend({cfg:d.extend(),init:function(c){this.cfg=this.cfg.extend(c),this.reset()},reset:function(){n.reset.call(this),this._doReset()},update:function(c){return this._append(c),this._process(),this},finalize:function(c){return c&&this._append(c),this._doFinalize()},blockSize:16,_createHelper:function(c){return function(y,v){return new c.init(v).finalize(y)}},_createHmacHelper:function(c){return function(y,v){return new t.HMAC.init(c,v).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 O=function(){function l(p,h){for(var d=0;d<h.length;d++){var a=h[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,h,d){return h&&l(p.prototype,h),d&&l(p,d),p}}(),T=function(){function l(){S(this,l)}return O(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,O){U.exports=w=O(P(0))}(0,function(S){return function(O){function T(t,c,y,v,_,b,m){var g=t+(c&y|~c&v)+_+m;return(g<<b|g>>>32-b)+c}function l(t,c,y,v,_,b,m){var g=t+(c&v|y&~v)+_+m;return(g<<b|g>>>32-b)+c}function p(t,c,y,v,_,b,m){var g=t+(c^y^v)+_+m;return(g<<b|g>>>32-b)+c}function h(t,c,y,v,_,b,m){var g=t+(y^(c|~v))+_+m;return(g<<b|g>>>32-b)+c}var d=S,a=d.lib,u=a.WordArray,s=a.Hasher,f=d.algo,i=[];!function(){for(var t=0;t<64;t++)i[t]=4294967296*O.abs(O.sin(t+1))|0}();var n=f.MD5=s.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,c){for(var y=0;y<16;y++){var v=c+y,_=t[v];t[v]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8)}var b=this._hash.words,m=t[c+0],g=t[c+1],E=t[c+2],o=t[c+3],x=t[c+4],C=t[c+5],A=t[c+6],D=t[c+7],I=t[c+8],F=t[c+9],H=t[c+10],te=t[c+11],j=t[c+12],G=t[c+13],X=t[c+14],J=t[c+15],B=b[0],Q=b[1],ie=b[2],oe=b[3];B=T(B,Q,ie,oe,m,7,i[0]),oe=T(oe,B,Q,ie,g,12,i[1]),ie=T(ie,oe,B,Q,E,17,i[2]),Q=T(Q,ie,oe,B,o,22,i[3]),B=T(B,Q,ie,oe,x,7,i[4]),oe=T(oe,B,Q,ie,C,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,H,17,i[10]),Q=T(Q,ie,oe,B,te,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,g,5,i[16]),oe=l(oe,B,Q,ie,A,9,i[17]),ie=l(ie,oe,B,Q,te,14,i[18]),Q=l(Q,ie,oe,B,m,20,i[19]),B=l(B,Q,ie,oe,C,5,i[20]),oe=l(oe,B,Q,ie,H,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,o,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,C,4,i[32]),oe=p(oe,B,Q,ie,I,11,i[33]),ie=p(ie,oe,B,Q,te,16,i[34]),Q=p(Q,ie,oe,B,X,23,i[35]),B=p(B,Q,ie,oe,g,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,H,23,i[39]),B=p(B,Q,ie,oe,G,4,i[40]),oe=p(oe,B,Q,ie,m,11,i[41]),ie=p(ie,oe,B,Q,o,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,m,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,C,21,i[51]),B=h(B,Q,ie,oe,j,6,i[52]),oe=h(oe,B,Q,ie,o,10,i[53]),ie=h(ie,oe,B,Q,H,15,i[54]),Q=h(Q,ie,oe,B,g,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,te,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,c=t.words,y=8*this._nDataBytes,v=8*t.sigBytes;c[v>>>5]|=128<<24-v%32;var _=O.floor(y/4294967296),b=y;c[15+(v+64>>>9<<4)]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8),c[14+(v+64>>>9<<4)]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8),t.sigBytes=4*(c.length+1),this._process();for(var m=this._hash,g=m.words,E=0;E<4;E++){var o=g[E];g[E]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}return m},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 O(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,c){for(var y=0;y<c.length;y++){var v=c[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(t,v.key,v)}}return function(t,c,y){return c&&n(t.prototype,c),y&&n(t,y),t}}(),l=P(5),p=S(l),h=P(25),d=S(h),a=P(6),u=S(a),s=P(7),f=S(s),i=function(){function n(t){O(this,n);var c=f.default.os.name,y=f.default.os.version||"",v=f.default.browser.name,_=f.default.browser.version||"",b=window.location.href,m="";b&&(m=f.default.getHost(b));var g="pc";f.default.os.ipad?g="pad":(f.default.os.iphone||f.default.os.android)&&(g="phone"),this._ri=p.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:u.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:n.getUuid(),os:c,ov:y,et:v,ev:_,uat:navigator.userAgent,app_n:m,tt:g,dm:"h5",ut:""}}return T(n,[{key:"log",value:function(t,c){c&&c.ri?(this._ri=c.ri,delete c.ri):this._ri=p.default.create(),c&&c.ut&&(this.initParam.ut=c.ut,delete c.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(c)for(var v in c)y.push(v+"="+c[v]);var _=y.join("&");this.initParam.args=encodeURIComponent(_==""?"0":_);var b=[];for(var v in this.initParam)b.push(v+"="+this.initParam[v]);var m=b.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(m):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+m}}],[{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 O=function(){function l(p,h){for(var d=0;d<h.length;d++){var a=h[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,h,d){return h&&l(p.prototype,h),d&&l(p,d),p}}(),T=function(){function l(){S(this,l)}return O(l,null,[{key:"create",value:function(p,h){var d,a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),u=[];if(h=h||a.length,p)for(d=0;d<p;d++)u[d]=a[0|Math.random()*h];else{var s;for(u[8]=u[13]=u[18]=u[23]="-",u[14]="4",d=0;d<36;d++)u[d]||(s=0|16*Math.random(),u[d]=a[d==19?3&s|8:s])}return u.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(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var O=function(){function a(u,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(u,i.key,i)}}return function(u,s,f){return s&&a(u.prototype,s),f&&a(u,f),u}}(),T=function(a){var u=navigator.userAgent,s="other";if(a.ios)return"iOS";if(a.android)return"android";if(u.indexOf("Baiduspider")>-1)return"Baiduspider";if(u.indexOf("PlayStation")>-1)return"PS4";var f=navigator.platform=="Win32"||navigator.platform=="Windows"||u.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 a=navigator.userAgent,u="";return(a.indexOf("Windows NT 5.0")>-1||a.indexOf("Windows 2000")>-1)&&(u="2000"),(a.indexOf("Windows NT 5.1")>-1||a.indexOf("Windows XP")>-1)&&(u="XP"),(a.indexOf("Windows NT 5.2")>-1||a.indexOf("Windows 2003")>-1)&&(u="2003"),(a.indexOf("Windows NT 6.0")>-1||a.indexOf("Windows Vista")>-1)&&(u="Vista"),(a.indexOf("Windows NT 6.1")>-1||a.indexOf("Windows 7")>-1)&&(u="7"),(a.indexOf("Windows NT 6.2")>-1||a.indexOf("Windows 8")>-1)&&(u="8"),(a.indexOf("Windows NT 6.3")>-1||a.indexOf("Windows 8.1")>-1)&&(u="8.1"),(a.indexOf("Windows NT 10")>-1||a.indexOf("Windows 10")>-1)&&(u="10"),u},p=function(a){var u=navigator.userAgent.toLowerCase();return a.chrome?"Chrome":a.firefox?"Firefox":a.safari?"Safari":a.webview?"webview":a.ie?/edge/.test(u)?"Edge":"IE":/baiduspider/.test(u)?"Baiduspider":/ucweb/.test(u)||/UCBrowser/.test(u)?"UC":/opera/.test(u)?"Opera":/ucweb/.test(u)?"UC":/360se/.test(u)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(u)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(u)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(u)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(u)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(u)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(u)?"PS4\u6D4F\u89C8\u5668":void 0},h=function(){var a={},u={},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 /),c=s.match(/(iPad).*OS\s([\d_]+)/),y=s.match(/(iPod)(.*OS\s([\d_]+))?/),v=!c&&s.match(/(iPhone\sOS)\s([\d_]+)/),_=s.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),b=/Win\d{2}|Windows/.test(f),m=s.match(/Windows Phone ([\d.]+)/),g=_&&s.match(/TouchPad/),E=s.match(/Kindle\/([\d.]+)/),o=s.match(/Silk\/([\d._]+)/),x=s.match(/(BlackBerry).*Version\/([\d.]+)/),C=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.]+)/),H=s.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),te=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((u.webkit=!!i)&&(u.version=i[1]),n&&(a.android=!0,a.version=n[2]),v&&!y&&(a.ios=a.iphone=!0,a.version=v[2].replace(/_/g,".")),c&&(a.ios=a.ipad=!0,a.version=c[2].replace(/_/g,".")),y&&(a.ios=a.ipod=!0,a.version=y[3]?y[3].replace(/_/g,"."):null),m&&(a.wp=!0,a.version=m[1]),_&&(a.webos=!0,a.version=_[2]),g&&(a.touchpad=!0),x&&(a.blackberry=!0,a.version=x[2]),C&&(a.bb10=!0,a.version=C[2]),A&&(a.rimtabletos=!0,a.version=A[2]),D&&(u.playbook=!0),E&&(a.kindle=!0,a.version=E[1]),o&&(u.silk=!0,u.version=o[1]),!o&&a.android&&s.match(/Kindle Fire/)&&(u.silk=!0),I&&(u.chrome=!0,u.version=I[1]),F&&(u.firefox=!0,u.version=F[1]),H&&(a.firefoxos=!0,a.version=H[1]),te&&(u.ie=!0,u.version=te[1]),G&&(t||a.ios||b||n)&&(u.safari=!0,a.ios||(u.version=G[1])),j&&(u.webview=!0),t){var X=s.match(/[\d]*_[\d]*_[\d]*/);X&&X.length>0&&X[0]&&(a.version=X[0].replace(/_/g,"."))}return a.tablet=!!(c||D||n&&!s.match(/Mobile/)||F&&s.match(/Tablet/)||te&&!s.match(/Phone/)&&s.match(/Touch/)),a.phone=!(a.tablet||a.ipod||!(n||v||_||x||C||I&&s.match(/Android/)||I&&s.match(/CriOS\/([\d.]+)/)||F&&s.match(/Mobile/)||te&&s.match(/Touch/))),a.pc=!a.tablet&&!a.phone,t?a.name="macOS":b?(a.name="windows",a.version=l()):a.name=T(a),u.name=p(u),{os:a,browser:u}}(),d=function(){function a(){S(this,a)}return O(a,null,[{key:"getHost",value:function(u){var s="";if(u===void 0||u==null||u=="")return"";var f=u.indexOf("//"),i=u;f>-1&&(i=u.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 u=h.browser;return u.name||(u.name=p()),u}}]),a}();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 O=function(){function l(p,h){for(var d=0;d<h.length;d++){var a=h[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,h,d){return h&&l(p.prototype,h),d&&l(p,d),p}}(),T=function(){function l(){S(this,l)}return O(l,null,[{key:"get",value:function(p,h,d,a,u){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{a===void 0&&(a=!0),s.open("GET",p,a),u&&(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 O=function(){function h(d,a){for(var u=0;u<a.length;u++){var s=a[u];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,s.key,s)}}return function(d,a,u){return a&&h(d.prototype,a),u&&h(d,u),d}}(),T=P(27),l=P(30),p=(P(10),function(){function h(){S(this,h)}return O(h,null,[{key:"randomUUID",value:function(){for(var d=[],a="0123456789abcdef",u=0;u<36;u++)d[u]=a.substr(Math.floor(16*Math.random()),1);return d[14]="4",d[19]=a.substr(3&d[19]|8,1),d[8]=d[13]=d[18]=d[23]="-",d.join("")}},{key:"aliyunEncodeURI",value:function(d){var a=encodeURIComponent(d);return a=a.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,a,u){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 c=h.aliyunEncodeURI(i[f]),y=h.aliyunEncodeURI(d[i[f]]);n==""?n=c+a+y:n+=u+c+a+y}return n}},{key:"makeChangeSiga",value:function(d,a){if(!d)throw new Error("PrismPlayer Error: vid should not be null!");return l.stringify(T("GET&"+h.aliyunEncodeURI("/")+"&"+h.aliyunEncodeURI(h.makeUTF8sort(d,"=","&")),a+"&"))}}]),h}());w.default=p},function(U,w,P){!function(S,O){U.exports=w=O(P(0))}(0,function(S){return S.enc.Utf8})},function(U,w,P){!function(S,O){U.exports=w=O(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,O,T=(typeof Symbol=="function"&&Symbol.iterator,P(14)),l=function(h){return h&&h.__esModule?h:{default:h}}(T),p={Vod:l.default};S=[],(O=function(){return p}.apply(w,S))!==void 0&&(U.exports=O),window.AliyunUpload=p,$e.exports=AliyunUpload},function(U,w,P){"use strict";function S(C){return C&&C.__esModule?C:{default:C}}function O(C,A){if(!(C instanceof A))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function C(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&&C(A.prototype,D),I&&C(A,I),A}}(),l=P(15),p=P(3),h=P(16),d=S(h),a=P(18),u=S(a),s=P(24),f=S(s),i=P(4),n=S(i),t=P(1),c=S(t),y=P(5),v=S(y),_=P(26),b=S(_),m=P(31),g=S(m),E=P(32),o=S(E),x=(P(2),function(){function C(A){O(this,C),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(C,[{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,H,te){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=c.default.isImage(A.name),!G.isImage&&this.options.enableUploadProgress){var X=this;o.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)}})})}H&&(G.videoInfo=H?JSON.parse(H).Vod:{},G.userData=u.default.encode(H)),G.ri=v.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(u.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 H="";return this._uploadList.length>this._curIndex&&(H=this._uploadList[this._curIndex]),H&&(this.init(A,D,I,F),this._state=l.VODSTATE.START,this._ossUpload=null,this._uploadCore(H,H.retry),H.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,H){if(!(D&&I&&F&&H))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var te=A;this.init(D,I,F,H),te.endpoint=te._endpoint,te.bucket=te._bucket,te.object=te._object,this._ossUpload=null,this._uploadCore(te,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 H=A.videoInfo,te={accessKeyId:D,securityToken:F,accessKeySecret:I,fileName:A.file.name,title:H.Title,requestId:A.ri,region:this.options.region};H.ImageType&&(te.imageType=H.ImageType),H.ImageExt&&(te.imageExt=H.ImageExt),H.FileSize&&(te.fileSize=H.FileSize),H.Description&&(te.description=H.Description),H.CateId&&(te.cateId=H.CateId),H.Tags&&(te.tags=H.Tags),H.TemplateGroupId&&(te.templateGroupId=H.TemplateGroupId),H.StorageLocation&&(te.storageLocation=H.StorageLocation),H.CoverURL&&(te.coverUrl=H.CoverURL),H.TransCodeMode&&(te.transCodeMode=H.TransCodeMode),H.UserData&&(te.userData=H.UserData);var j=this,G="getUploadAuth";A.videoId?(te.videoId=A.videoId,G="refreshUploadAuth"):A.isImage&&(G="getImageUploadAuth"),b.default[G](te,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 H=JSON.parse(u.default.decode(D));if(!(H.AccessKeyId&&H.AccessKeySecret&&H.SecurityToken&&H.Expiration))return console.error("uploadauth is invalid"),!1;var te={},j=A;if(I){if(te=JSON.parse(u.default.decode(I)),!te.Endpoint||!te.Bucket||!te.FileName)return console.error("uploadAddress is invalid"),!1}else te.Endpoint=j.endpoint,te.Bucket=j.bucket,te.FileName=j.object;this._ut="vod",this._uploadWay="vod",this.options.region=H.Region||this.options.region,this.init(H.AccessKeyId,H.AccessKeySecret,H.SecurityToken,H.Expiration),j.endpoint=j._endpoint?j._endpoint:te.Endpoint,j.bucket=j._bucket?j._bucket:te.Bucket,j.object=j._object?j._object:te.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 H={accessKeyId:D,securityToken:F,accessKeySecret:I,videoId:A.object,requestId:A.ri,region:this.options.region},te=this,j="refreshUploadAuth";A.isImage&&(j="getImageUploadAuth"),b.default[j](H,function(G){te.setUploadAuthAndAddress(A,G.UploadAuth,UploadAddress),te._state=l.VODSTATE.START},function(G){te._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(H){console.log(H)}}},{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=c.default.getFileType(A.file.name),F=this._getCheckoutpoint(A),H="",te="";F&&F.checkpoint&&(te=F.state,H=F.videoId,F=F.checkpoint),F&&H==A.videoId&&te!=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(te){console.log(te)}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=v.default.create(),this._findUploadIndex()!=-1){var H=this;this._state=l.VODSTATE.START,setTimeout(function(){H.nextUpload()},100)}}},{key:"_complete",value:function(A,D){if(A.state=l.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(A)}catch(H){console.log(H)}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,H=0;F&&(A.checkpoint=F,this._saveCheckoutpoint(A,F,l.UPLOADSTATE.UPLOADING),H=F.uploadId),this._retryCount=0;var te=this._getPortNumber(F),j=0;if(I&&I.headers&&(j=I.headers["x-oss-request-id"]),D.loaded!=0&&this._reportLog("20007",A,{pn:te,requestId:j}),D.loaded!=1&&this._reportLog("20005",A,{UploadId:H,pn:te+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;g.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),H=A.file,te={fileName:H.name,lastModified:H.lastModified,size:H.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(te))}}},{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};g.default.get(F,function(H){D(H)},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}}]),C}());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(a){return a&&a.__esModule?a:{default:a}}function O(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function a(u,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(u,i.key,i)}}return function(u,s,f){return s&&a(u.prototype,s),f&&a(u,f),u}}(),l=P(3),p=P(17),h=(S(p),P(1)),d=(S(h),function(){function a(u,s){if(O(this,a),u){this._config=u,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(a,[{key:"create",value:function(u){if(u.endpoint=u.endpoint||this._config.endpoint,u.bucket=u.bucket||this._config.bucket,!(u.AccessKeyId&&u.AccessKeySecret&&u.endpoint&&u.SecurityToken))throw new Error("AccessKeyId\u3001AccessKeySecret\u3001endpoint should not be null");var s={accessKeyId:u.AccessKeyId,accessKeySecret:u.AccessKeySecret,stsToken:u.SecurityToken,endpoint:u.endpoint||this._config.endpoint,bucket:u.bucket||this._config.bucket,secure:!0,cname:u.cname};u.timeout&&(s.timeout=u.timeout),this.oss=new OSS.Wrapper(s)}},{key:"abort",value:function(u){if(u.checkpoint){var s=u.checkpoint.uploadId;this.oss.abortMultipartUpload(u.object,s)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(u,s){this._uploadInfo=u;var f=this,i=function(t,c,y){return function(v){f._progress(t,c,y),v()}},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),u.checkpoint&&(n.checkpoint=u.checkpoint),u.bucket||(this.oss.options.bucket=u.bucket),u.endpoint||(this.oss.options.endpoint=u.endpoint),this.oss.multipartUpload(u.object,u.file,n).then(function(t,c){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(u,s,f){this.oss.get(u.object).then(function(i){s(i)}).catch(function(i){f(i)})}},{key:"_progress",value:function(u,s,f){this._callback.onprogress(this._uploadInfo,{loaded:u,total:this._uploadInfo.file.size,checkpoint:s},f)}},{key:"_error",value:function(u){this._callback.onerror(this._uploadInfo,u)}},{key:"_complete",value:function(u){this._callback.oncomplete(this._uploadInfo,u)}}]),a}());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 O=function(){function l(p,h){for(var d=0;d<h.length;d++){var a=h[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,h,d){return h&&l(p.prototype,h),d&&l(p,d),p}}(),T=function(){function l(){S(this,l)}return O(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 a=new RegExp("\\{"+(d-1)+"\\}","gm");h=h.replace(a,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 O(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 a=0;a<d.length;a++){var u=d[a];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(h,u.key,u)}}return function(h,d,a){return d&&p(h.prototype,d),a&&p(h,a),h}}(),l=function(){function p(){O(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 O(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function T(ee,M){if(O()<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 a(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"?u(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 a(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 u(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|c(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"||Ne(M.length)?T(ee,0):s(ee,M);if(M.type==="Buffer"&&Ie(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>=O())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O().toString(16)+" bytes");return 0|ee}function t(ee){return+ee!=ee&&(ee=0),l.alloc(+ee)}function c(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 Pe(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 te(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 H(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 v(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 De;if(V){var Me=-1;for(De=N;De<Re;De++)if(Y(ee,De)===Y(M,Me===-1?0:De-Me)){if(Me===-1&&(Me=De),De-Me+1===rt)return Me*me}else Me!==-1&&(De-=De-Me),Me=-1}else for(N+rt>Re&&(N=Re-rt),De=N;De>=0;De--){for(var Xe=!0,tt=0;tt<rt;tt++)if(Y(ee,De+tt)!==Y(M,tt)){Xe=!1;break}if(Xe)return De}return-1}function m(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 g(ee,M,N,$){return ke(pe(M,ee.length-N),ee,N,$)}function E(ee,M,N,$){return ke(Ce(M),ee,N,$)}function o(ee,M,N,$){return E(ee,M,N,$)}function x(ee,M,N,$){return ke(Pe(M),ee,N,$)}function C(ee,M,N,$){return ke(Be(M,ee.length-N),ee,N,$)}function A(ee,M,N){return M===0&&N===ee.length?he.fromByteArray(ee):he.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,De,Me,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],De=ee[V+2],(192&rt)==128&&(192&De)==128&&(Xe=(15&Y)<<12|(63&rt)<<6|63&De)>2047&&(Xe<55296||Xe>57343)&&(me=Xe);break;case 4:rt=ee[V+1],De=ee[V+2],Me=ee[V+3],(192&rt)==128&&(192&De)==128&&(192&Me)==128&&(Xe=(15&Y)<<18|(63&rt)<<12|(63&De)<<6|63&Me)>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 H(ee,M,N){var $="";N=Math.min(ee.length,N);for(var V=M;V<N;++V)$+=String.fromCharCode(ee[V]);return $}function te(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+=Le(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 Ee(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 Le(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 Ce(ee){for(var M=[],N=0;N<ee.length;++N)M.push(255&ee.charCodeAt(N));return M}function Be(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 Pe(ee){return he.toByteArray(Ee(ee))}function ke(ee,M,N,$){for(var V=0;V<$&&!(V+N>=M.length||V>=ee.length);++V)M[V+N]=ee[V];return V}function Ne(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 he=P(21),ue=P(22),Ie=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=O(),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 a(null,ee)},l.allocUnsafeSlow=function(ee){return a(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(!Ie(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=c,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)v(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)v(this,M,M+3),v(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)v(this,M,M+7),v(this,M+1,M+6),v(this,M+2,M+5),v(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),De=ee.slice(M,N),Me=0;Me<Re;++Me)if(rt[Me]!==De[Me]){Y=rt[Me],me=De[Me];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 m(this,ee,M,N);case"utf8":case"utf-8":return g(this,ee,M,N);case"ascii":return E(this,ee,M,N);case"latin1":case"binary":return o(this,ee,M,N);case"base64":return x(this,ee,M,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(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ⅇ++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ⅇ--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ⅇ++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ⅇ--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 O(n){return 3*n.length/4-S(n)}function T(n){var t,c,y,v,_,b=n.length;v=S(n),_=new u(3*b/4-v),c=v>0?b-4:b;var m=0;for(t=0;t<c;t+=4)y=a[n.charCodeAt(t)]<<18|a[n.charCodeAt(t+1)]<<12|a[n.charCodeAt(t+2)]<<6|a[n.charCodeAt(t+3)],_[m++]=y>>16&255,_[m++]=y>>8&255,_[m++]=255&y;return v===2?(y=a[n.charCodeAt(t)]<<2|a[n.charCodeAt(t+1)]>>4,_[m++]=255&y):v===1&&(y=a[n.charCodeAt(t)]<<10|a[n.charCodeAt(t+1)]<<4|a[n.charCodeAt(t+2)]>>2,_[m++]=y>>8&255,_[m++]=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,c){for(var y,v=[],_=t;_<c;_+=3)y=(n[_]<<16)+(n[_+1]<<8)+n[_+2],v.push(l(y));return v.join("")}function h(n){for(var t,c=n.length,y=c%3,v="",_=[],b=0,m=c-y;b<m;b+=16383)_.push(p(n,b,b+16383>m?m:b+16383));return y===1?(t=n[c-1],v+=d[t>>2],v+=d[t<<4&63],v+="=="):y===2&&(t=(n[c-2]<<8)+n[c-1],v+=d[t>>10],v+=d[t>>4&63],v+=d[t<<2&63],v+="="),_.push(v),_.join("")}w.byteLength=O,w.toByteArray=T,w.fromByteArray=h;for(var d=[],a=[],u=typeof Uint8Array!="undefined"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,i=s.length;f<i;++f)d[f]=s[f],a[s.charCodeAt(f)]=f;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(U,w){w.read=function(P,S,O,T,l){var p,h,d=8*l-T-1,a=(1<<d)-1,u=a>>1,s=-7,f=O?l-1:0,i=O?-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-u;else{if(p===a)return h?NaN:1/0*(n?-1:1);h+=Math.pow(2,T),p-=u}return(n?-1:1)*h*Math.pow(2,p-T)},w.write=function(P,S,O,T,l,p){var h,d,a,u=8*p-l-1,s=(1<<u)-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,c=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*(a=Math.pow(2,-h))<1&&(h--,a*=2),S+=h+f>=1?i/a:i*Math.pow(2,1-f),S*a>=2&&(h++,a/=2),h+f>=s?(d=0,h=s):h+f>=1?(d=(S*a-1)*Math.pow(2,l),h+=f):(d=S*Math.pow(2,f-1)*Math.pow(2,l),h=0));l>=8;P[O+n]=255&d,n+=t,d/=256,l-=8);for(h=h<<l|d,u+=l;u>0;P[O+n]=255&h,n+=t,h/=256,u-=8);P[O+n-t]|=128*c}},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 O=function(){function l(p,h){for(var d=0;d<h.length;d++){var a=h[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,h,d){return h&&l(p.prototype,h),d&&l(p,d),p}}(),T=function(){function l(){S(this,l)}return O(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 O=function(){function l(p,h){for(var d=0;d<h.length;d++){var a=h[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,h,d){return h&&l(p.prototype,h),d&&l(p,d),p}}(),T=function(){function l(){S(this,l)}return O(l,null,[{key:"get",value:function(p){for(var h=p+"",d=document.cookie.split(";"),a=0;a<d.length;a++){var u=d[a].trim();if(u.indexOf(h)==0)return unescape(u.substring(h.length+1,u.length))}return""}},{key:"set",value:function(p,h,d){var a=new Date;a.setTime(a.getTime()+24*d*60*60*1e3);var u="expires="+a.toGMTString();document.cookie=p+"="+escape(h)+"; "+u}}]),l}();w.default=T},function(U,w,P){"use strict";function S(u){return u&&u.__esModule?u:{default:u}}function O(u,s){if(!(u instanceof s))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function u(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&&u(s.prototype,f),i&&u(s,i),s}}(),l=P(8),p=S(l),h=P(9),d=S(h),a=function(){function u(){O(this,u)}return T(u,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},c=d.default.makeUTF8sort(t,"=","&")+"&Signature="+d.default.aliyunEncodeURI(d.default.makeChangeSiga(t,s.accessKeySecret)),y="https://vod."+s.region+".aliyuncs.com/?"+c;p.default.get(y,function(v){var v=JSON.parse(v);f&&f(v)},function(v){if(i){var _=JSON.parse(v);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 c=d.default.makeUTF8sort(t,"=","&")+"&Signature="+d.default.aliyunEncodeURI(d.default.makeChangeSiga(t,s.accessKeySecret)),y="https://vod."+s.region+".aliyuncs.com/?"+c;p.default.get(y,function(v){try{v=JSON.parse(v)}catch(_){if(i)return void i({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}f&&f(v)},function(v){if(i){var _={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{_=JSON.parse(v)}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 c=d.default.makeUTF8sort(t,"=","&")+"&Signature="+d.default.aliyunEncodeURI(d.default.makeChangeSiga(t,s.accessKeySecret)),y="https://vod."+s.region+".aliyuncs.com/?"+c;p.default.get(y,function(v){v=JSON.parse(v),f&&f(v)},function(v){if(i){var _=JSON.parse(v);i(_)}})}}]),u}();w.default=a},function(U,w,P){!function(S,O,T){U.exports=w=O(P(0),P(28),P(29))}(0,function(S){return S.HmacSHA1})},function(U,w,P){!function(S,O){U.exports=w=O(P(0))}(0,function(S){return function(){var O=S,T=O.lib,l=T.WordArray,p=T.Hasher,h=O.algo,d=[],a=h.SHA1=p.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(u,s){for(var f=this._hash.words,i=f[0],n=f[1],t=f[2],c=f[3],y=f[4],v=0;v<80;v++){if(v<16)d[v]=0|u[s+v];else{var _=d[v-3]^d[v-8]^d[v-14]^d[v-16];d[v]=_<<1|_>>>31}var b=(i<<5|i>>>27)+y+d[v];b+=v<20?1518500249+(n&t|~n&c):v<40?1859775393+(n^t^c):v<60?(n&t|n&c|t&c)-1894007588:(n^t^c)-899497514,y=c,c=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]+c|0,f[4]=f[4]+y|0},_doFinalize:function(){var u=this._data,s=u.words,f=8*this._nDataBytes,i=8*u.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,u.sigBytes=4*s.length,this._process(),this._hash},clone:function(){var u=p.clone.call(this);return u._hash=this._hash.clone(),u}});O.SHA1=p._createHelper(a),O.HmacSHA1=p._createHmacHelper(a)}(),S.SHA1})},function(U,w,P){!function(S,O){U.exports=w=O(P(0))}(0,function(S){!function(){var O=S,T=O.lib,l=T.Base,p=O.enc,h=p.Utf8,d=O.algo;d.HMAC=l.extend({init:function(a,u){a=this._hasher=new a.init,typeof u=="string"&&(u=h.parse(u));var s=a.blockSize,f=4*s;u.sigBytes>f&&(u=a.finalize(u)),u.clamp();for(var i=this._oKey=u.clone(),n=this._iKey=u.clone(),t=i.words,c=n.words,y=0;y<s;y++)t[y]^=1549556828,c[y]^=909522486;i.sigBytes=n.sigBytes=f,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var u=this._hasher,s=u.finalize(a);return u.reset(),u.finalize(this._oKey.clone().concat(s))}})}()})},function(U,w,P){!function(S,O){U.exports=w=O(P(0))}(0,function(S){return function(){function O(d,a,u){for(var s=[],f=0,i=0;i<a;i++)if(i%4){var n=u[d.charCodeAt(i-1)]<<i%4*2,t=u[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 a=d.words,u=d.sigBytes,s=this._map;d.clamp();for(var f=[],i=0;i<u;i+=3)for(var n=a[i>>>2]>>>24-i%4*8&255,t=a[i+1>>>2]>>>24-(i+1)%4*8&255,c=a[i+2>>>2]>>>24-(i+2)%4*8&255,y=n<<16|t<<8|c,v=0;v<4&&i+.75*v<u;v++)f.push(s.charAt(y>>>6*(3-v)&63));var _=s.charAt(64);if(_)for(;f.length%4;)f.push(_);return f.join("")},parse:function(d){var a=d.length,u=this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var f=0;f<u.length;f++)s[u.charCodeAt(f)]=f}var i=u.charAt(64);if(i){var n=d.indexOf(i);n!==-1&&(a=n)}return O(d,a,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),S.enc.Base64})},function(U,w,P){"use strict";function S(m){return m&&m.__esModule?m:{default:m}}function O(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function m(g,E){for(var o=0;o<E.length;o++){var x=E[o];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(g,x.key,x)}}return function(g,E,o){return E&&m(g.prototype,E),o&&m(g,o),g}}(),l=P(8),p=S(l),h=P(7),d=S(h),a=P(4),u=S(a),s=P(6),f=S(s),i=P(1),n=S(i),t=P(9),c=S(t),y=P(2),v=P(11),_=P(10),b=function(){function m(){O(this,m)}return T(m,null,[{key:"getAuthInfo",value:function(g,E,o){var x=g+"|f#Ylm&^1TppeRhLg|"+o;return E&&(x=g+"|"+E+"|f#Ylm&^1TppeRhLg|"+o),y(_.parse(x)).toString(v)}},{key:"upload",value:function(g,E,o){var x=n.default.ISODateString(new Date),C=Math.floor(new Date().valueOf()/1e3),A=u.default.getClientId();A=u.default.setClientId(A);var D=m.getAuthInfo(g.userId,A,C),I=c.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:C,Timestamp:x,AuthInfo:D,FileName:g.file.name,FileSize:g.file.size,FileCreateTime:g.file.lastModified,FileHash:g.fileHash,UploadId:g.checkpoint.checkpoint.uploadId,PartSize:g.checkpoint.checkpoint.partSize,DonePartsCount:g.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(g.checkpoint),UploadRatio:g.checkpoint.loaded,UserId:g.userId,VideoId:g.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:I};A&&(F.ClientId=A);var H=c.default.makeUTF8sort(F,"=","&")+"&Signature="+c.default.aliyunEncodeURI(c.default.makeChangeSiga(F,g.accessKeySecret)),te="https://vod."+g.region+".aliyuncs.com/?"+H;p.default.get(te,function(j){E&&E()},function(j){j&&(o(j),console.log(j))})}},{key:"get",value:function(g,E,o){var x=n.default.ISODateString(new Date),C=Math.floor(new Date().valueOf()/1e3),A=u.default.getClientId(),D=m.getAuthInfo(g.userId,A,C),I=c.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:C,Timestamp:x,AuthInfo:D,UserId:g.userId,UploadInfoList:JSON.stringify(g.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:I};A&&(F.ClientId=A);var H=c.default.makeUTF8sort(F,"=","&")+"&Signature="+c.default.aliyunEncodeURI(c.default.makeChangeSiga(F,g.accessKeySecret)),te="https://vod."+g.region+".aliyuncs.com/?"+H;p.default.get(te,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),u.default.setClientId(X),E&&E(G)},function(j){j&&(o(j),console.log(j))})}}]),m}();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 O=function(){function h(d,a){for(var u=0;u<a.length;u++){var s=a[u];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,s.key,s)}}return function(d,a,u){return a&&h(d.prototype,a),u&&h(d,u),d}}(),T=P(2),l=P(33),p=(P(11),function(){function h(){S(this,h)}return O(h,null,[{key:"getMd5",value:function(d,a,u){var s=new FileReader;s.onload=function(n){try{if(n&&n.target){var t=T(l.parse(n.target.result)),c=t.toString();a(c)}}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,O){U.exports=w=O(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,O=function(){};return{s:O,n:function(){return S>=U.length?{done:!0}:{done:!1,value:U[S++]}},e:function(d){throw d},f:O}}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,c){var y=Object.keys(t);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(t);c&&(v=v.filter(function(_){return Object.getOwnPropertyDescriptor(t,_).enumerable})),y.push.apply(y,v)}return y}function S(t){for(var c=1;c<arguments.length;c++){var y=arguments[c]!=null?arguments[c]:{};c%2?P(y,!0).forEach(function(v){i(t,v,y[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(y)):P(y).forEach(function(v){Object.defineProperty(t,v,Object.getOwnPropertyDescriptor(y,v))})}return t}function O(t,c){if(t==null)return{};var y=T(t,c),v,_;if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(t);for(_=0;_<b.length;_++){if(v=b[_],c.indexOf(v)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(t,v))continue;y[v]=t[v]}}return y}function T(t,c){if(t==null)return{};var y={},v=Object.keys(t),_,b;for(b=0;b<v.length;b++){if(_=v[b],c.indexOf(_)>=0)continue;y[_]=t[_]}return y}function l(t,c){if(!(t instanceof c))throw new TypeError("Cannot call a class as a function")}function p(t,c){for(var y=0;y<c.length;y++){var v=c[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(t,v.key,v)}}function h(t,c,y){return c&&p(t.prototype,c),y&&p(t,y),t}function d(t,c){return c&&(w(c)==="object"||typeof c=="function")?c:u(t)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},a(t)}function u(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(c&&c.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),c&&f(t,c)}function f(t,c){return f=Object.setPrototypeOf||function(v,_){return v.__proto__=_,v},f(t,c)}function i(t,c,y){return c in t?Object.defineProperty(t,c,{value:y,enumerable:!0,configurable:!0,writable:!0}):t[c]=y,t}var n=function(t){s(c,t);function c(){var y,v;l(this,c);for(var _=arguments.length,b=new Array(_),m=0;m<_;m++)b[m]=arguments[m];return v=d(this,(y=a(c)).call.apply(y,[this].concat(b))),i(u(v),"onClick",function(g){var E=v.props,o=E.text,x=E.onCopy,C=E.children,A=E.options,D=ae.default.Children.only(C),I=(0,Z.default)(o,A);x&&x(o,I),D&&D.props&&typeof D.props.onClick=="function"&&D.props.onClick(g)}),v}return h(c,[{key:"render",value:function(){var v=this.props,_=v.text,b=v.onCopy,m=v.options,g=v.children,E=O(v,["text","onCopy","options","children"]),o=ae.default.Children.only(g);return ae.default.cloneElement(o,S({},E,{onClick:this.onClick}))}}]),c}(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={"&":"&","<":"<",">":">",'"':""","'":"'"},P=m=>w[m];function S(m,g){if(g){if(z.test(m))return m.replace(ae,P)}else if(Z.test(m))return m.replace(U,P);return m}const O=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function T(m){return m.replace(O,(g,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(m,g){m=m.source||m,g=g||"";const E={replace:(o,x)=>(x=x.source||x,x=x.replace(l,"$1"),m=m.replace(o,x),E),getRegex:()=>new RegExp(m,g)};return E}const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function a(m,g,E){if(m){let o;try{o=decodeURIComponent(T(E)).replace(h,"").toLowerCase()}catch(x){return null}if(o.indexOf("javascript:")===0||o.indexOf("vbscript:")===0||o.indexOf("data:")===0)return null}g&&!d.test(E)&&(E=n(g,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(o){return null}return E}const u={},s=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,i=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(m,g){u[" "+m]||(s.test(m)?u[" "+m]=m+"/":u[" "+m]=v(m,"/",!0)),m=u[" "+m];const E=m.indexOf(":")===-1;return g.substring(0,2)==="//"?E?g:m.replace(f,"$1")+g:g.charAt(0)==="/"?E?g:m.replace(i,"$1")+g:m+g}const t={exec:function(){}};function c(m){let g=1,E,o;for(;g<arguments.length;g++){E=arguments[g];for(o in E)Object.prototype.hasOwnProperty.call(E,o)&&(m[o]=E[o])}return m}function y(m,g){const E=m.replace(/\|/g,(C,A,D)=>{let I=!1,F=A;for(;--F>=0&&D[F]==="\\";)I=!I;return I?"|":" |"}),o=E.split(/ \|/);let x=0;if(o.length>g)o.splice(g);else for(;o.length<g;)o.push("");for(;x<o.length;x++)o[x]=o[x].trim().replace(/\\\|/g,"|");return o}function v(m,g,E){const o=m.length;if(o===0)return"";let x=0;for(;x<o;){const C=m.charAt(o-x-1);if(C===g&&!E)x++;else if(C!==g&&E)x++;else break}return m.substr(0,o-x)}function _(m,g){if(m.indexOf(g[1])===-1)return-1;const E=m.length;let o=0,x=0;for(;x<E;x++)if(m[x]==="\\")x++;else if(m[x]===g[0])o++;else if(m[x]===g[1]&&(o--,o<0))return x;return-1}function b(m){m&&m.sanitize&&!m.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:a,resolveUrl:n,noopTest:t,merge:c,splitCells:y,rtrim:v,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:O,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 O(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 O});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 a=p[d];h=h[a]}return h}function P(T){var l=[],p={};return T.forEach(function(h){for(var d=h||{},a=d.key,u=d.dataIndex,s=a||U(u).join("-")||Z;p[s];)s="".concat(s,"_next");p[s]=!0,l.push(s)}),l}function S(){var T={};function l(a,u){u&&Object.keys(u).forEach(function(s){var f=u[s];f&&Object(ae.a)(f)==="object"?(a[s]=a[s]||{},l(a[s],f)):a[s]=f})}for(var p=arguments.length,h=new Array(p),d=0;d<p;d++)h[d]=arguments[d];return h.forEach(function(a){l(T,a)}),T}function O(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"),O=z.n(S),T=z("m+aA"),l=z("Zm9Q"),p=z("Kwbf"),h=z("c+Xe"),d=z("bdgK"),a="rc-observer-key",u=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 c=n.props.onResize,y=t[0].target,v=y.getBoundingClientRect(),_=v.width,b=v.height,m=y.offsetWidth,g=y.offsetHeight,E=Math.floor(_),o=Math.floor(b);if(n.state.width!==E||n.state.height!==o||n.state.offsetWidth!==m||n.state.offsetHeight!==g){var x={width:E,height:o,offsetWidth:m,offsetHeight:g};n.setState(x),c&&Promise.resolve().then(function(){c(Object(ae.a)(Object(ae.a)({},x),{},{offsetWidth:m,offsetHeight:g}))})}},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 c=Object(T.a)(this.childNode||this),y=c!==this.currentElement;y&&(this.destroyObserver(),this.currentElement=c),!this.resizeObserver&&c&&(this.resizeObserver=new d.default(this.onResize),this.resizeObserver.observe(c))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var t=this.props.children,c=Object(l.a)(t);if(c.length>1)Object(p.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(c.length===0)return Object(p.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var y=c[0];if(S.isValidElement(y)&&Object(h.c)(y)){var v=y.ref;c[0]=S.cloneElement(y,{ref:Object(h.a)(v,this.setChildNode)})}return c.length===1?c[0]:c.map(function(_,b){return!S.isValidElement(_)||"key"in _&&_.key!==null?_:S.cloneElement(_,{key:"".concat(a,"-").concat(b)})})}}]),i}(S.Component);u.displayName="ResizeObserver",We.a=u},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 O in w)U.d(S,O,function(T){return w[T]}.bind(null,O));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 O(h,d,a){this.fn=h,this.context=d,this.once=a||!1}function T(h,d,a,u,s){if(typeof a!="function")throw new TypeError("The listener must be a function");var f=new O(a,u||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=[],a,u;if(this._eventsCount===0)return d;for(u in a=this._events)w.call(a,u)&&d.push(P?u.slice(1):u);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(a)):d},p.prototype.listeners=function(d){var a=P?P+d:d,u=this._events[a];if(!u)return[];if(u.fn)return[u.fn];for(var s=0,f=u.length,i=new Array(f);s<f;s++)i[s]=u[s].fn;return i},p.prototype.listenerCount=function(d){var a=P?P+d:d,u=this._events[a];return u?u.fn?1:u.length:0},p.prototype.emit=function(d,a,u,s,f,i){var n=P?P+d:d;if(!this._events[n])return!1;var t=this._events[n],c=arguments.length,y,v;if(t.fn){t.once&&this.removeListener(d,t.fn,void 0,!0);switch(c){case 1:return t.fn.call(t.context),!0;case 2:return t.fn.call(t.context,a),!0;case 3:return t.fn.call(t.context,a,u),!0;case 4:return t.fn.call(t.context,a,u,s),!0;case 5:return t.fn.call(t.context,a,u,s,f),!0;case 6:return t.fn.call(t.context,a,u,s,f,i),!0}for(v=1,y=new Array(c-1);v<c;v++)y[v-1]=arguments[v];t.fn.apply(t.context,y)}else{var _=t.length,b;for(v=0;v<_;v++){t[v].once&&this.removeListener(d,t[v].fn,void 0,!0);switch(c){case 1:t[v].fn.call(t[v].context);break;case 2:t[v].fn.call(t[v].context,a);break;case 3:t[v].fn.call(t[v].context,a,u);break;case 4:t[v].fn.call(t[v].context,a,u,s);break;default:if(!y)for(b=1,y=new Array(c-1);b<c;b++)y[b-1]=arguments[b];t[v].fn.apply(t[v].context,y)}}}return!0},p.prototype.on=function(d,a,u){return T(this,d,a,u,!1)},p.prototype.once=function(d,a,u){return T(this,d,a,u,!0)},p.prototype.removeListener=function(d,a,u,s){var f=P?P+d:d;if(!this._events[f])return this;if(!a)return l(this,f),this;var i=this._events[f];if(i.fn)i.fn===a&&(!s||i.once)&&(!u||i.context===u)&&l(this,f);else{for(var n=0,t=[],c=i.length;n<c;n++)(i[n].fn!==a||s&&!i[n].once||u&&i[n].context!==u)&&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 a;return d?(a=P?P+d:d,this._events[a]&&l(this,a)):(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=/^([^\/?#]*)([^]*)$/,O=/(?:\/|^)\.(?=\/)/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 a=l.parseURL(p);if(!a)throw new Error("Error trying to parse base URL.");return a.path=l.normalizePath(a.path),l.buildURLFromParts(a)}var u=l.parseURL(h);if(!u)throw new Error("Error trying to parse relative URL.");if(u.scheme)return d.alwaysNormalize?(u.path=l.normalizePath(u.path),l.buildURLFromParts(u)):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:u.netLoc,path:null,params:u.params,query:u.query,fragment:u.fragment};if(!u.netLoc&&(i.netLoc=s.netLoc,u.path[0]!=="/"))if(!u.path)i.path=s.path,u.params||(i.params=s.params,u.query||(i.query=s.query));else{var n=s.path,t=n.substring(0,n.lastIndexOf("/")+1)+u.path;i.path=l.normalizePath(t)}return i.path===null&&(i.path=d.alwaysNormalize?l.normalizePath(u.path):u.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(O,"");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 a={};function u(f){if(a[f])return a[f].exports;var i=a[f]={i:f,l:!1,exports:{}};return d[f].call(i.exports,i,i.exports,u),i.l=!0,i.exports}u.m=d,u.c=a,u.i=function(f){return f},u.d=function(f,i,n){u.o(f,i)||Object.defineProperty(f,i,{configurable:!1,enumerable:!0,get:n})},u.r=function(f){Object.defineProperty(f,"__esModule",{value:!0})},u.n=function(f){var i=f&&f.__esModule?function(){return f.default}:function(){return f};return u.d(i,"a",i),i},u.o=function(f,i){return Object.prototype.hasOwnProperty.call(f,i)},u.p="/",u.oe=function(f){throw console.error(f),f};var s=u(u.s=ENTRY_MODULE);return s.default||s}var P="[\\.|\\-|\\+|\\w|/|@]+",S="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+P+").*?\\)";function O(d){return(d+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function T(d){return!isNaN(1*d)}function l(d,a,u){var s={};s[u]=[];var f=a.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)"+O(n)+S,"g"),c;c=t.exec(f);){if(c[3]==="dll-reference")continue;s[u].push(c[3])}for(t=new RegExp("\\("+O(n)+'\\("(dll-reference\\s('+P+'))"\\)\\)'+S,"g");c=t.exec(f);)d[c[2]]||(s[u].push(c[1]),d[c[2]]=U(c[1]).m),s[c[2]]=s[c[2]]||[],s[c[2]].push(c[4]);for(var y=Object.keys(s),v=0;v<y.length;v++)for(var _=0;_<s[y[v]].length;_++)T(s[y[v]][_])&&(s[y[v]][_]=1*s[y[v]][_]);return s}function p(d){var a=Object.keys(d);return a.reduce(function(u,s){return u||d[s].length>0},!1)}function h(d,a){for(var u={main:[a]},s={main:[]},f={main:{}};p(u);)for(var i=Object.keys(u),n=0;n<i.length;n++){var t=i[n],c=u[t],y=c.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 v=l(d,d[t][y],t),_=Object.keys(v),b=0;b<_.length;b++)u[_[b]]=u[_[b]]||[],u[_[b]]=u[_[b]].concat(v[_[b]])}return s}ae.exports=function(d,a){a=a||{};var u={main:U.m},s=a.all?{main:Object.keys(u.main)}:h(u,d),f="";Object.keys(s).filter(function(y){return y!=="main"}).forEach(function(y){for(var v=0;s[y][v];)v++;s[y].push(v),u[y][v]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",f=f+"var "+y+" = ("+w.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+s[y].map(function(_){return""+JSON.stringify(_)+": "+u[y][_].toString()}).join(",")+`});
|
|
|
`}),f=f+"new (("+w.toString().replace("ENTRY_MODULE",JSON.stringify(d))+")({"+s.main.map(function(y){return""+JSON.stringify(y)+": "+u.main[y].toString()}).join(",")+"}))(self);";var i=new window.Blob([f],{type:"text/javascript"});if(a.bare)return i;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,t=n.createObjectURL(i),c=new window.Worker(t);return c.objectURL=t,c}},"./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 g}),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"),O=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"),a=U("./src/controller/eme-controller.ts"),u=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 c(){return c=Object.assign||function(o){for(var x=1;x<arguments.length;x++){var C=arguments[x];for(var A in C)Object.prototype.hasOwnProperty.call(C,A)&&(o[A]=C[A])}return o},c.apply(this,arguments)}function y(o,x){var C=Object.keys(o);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(o);x&&(A=A.filter(function(D){return Object.getOwnPropertyDescriptor(o,D).enumerable})),C.push.apply(C,A)}return C}function v(o){for(var x=1;x<arguments.length;x++){var C=arguments[x]!=null?arguments[x]:{};x%2?y(Object(C),!0).forEach(function(A){_(o,A,C[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(C)):y(Object(C)).forEach(function(A){Object.defineProperty(o,A,Object.getOwnPropertyDescriptor(C,A))})}return o}function _(o,x,C){return x in o?Object.defineProperty(o,x,{value:C,enumerable:!0,configurable:!0,writable:!0}):o[x]=C,o}var b=v(v({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},m()),{},{subtitleStreamController:O.SubtitleStreamController,subtitleTrackController:T.default,timelineController:p.TimelineController,audioStreamController:P.default,audioTrackController:S.default,emeController:a.default,cmcdController:u.default});function m(){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 g(o,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 c({},o,x)}function E(o){var x=o.loader;if(x!==f.default&&x!==s.default)t.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),o.progressive=!1;else{var C=Object(f.fetchSupported)();C&&(o.loader=f.default,o.progressive=!0,o.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"),O=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(u,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(u,i.key,i)}}function d(u,s,f){return s&&h(u.prototype,s),f&&h(u,f),u}var a=function(){function u(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=u.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 c;this.fragCurrent=t,this.partCurrent=(c=n.part)!=null?c: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,c=t.autoLevelEnabled,y=t.config,v=t.media;if(!i||!v)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(!c||v.paused||!v.playbackRate||!v.readyState)return;var m=performance.now()-_.loading.start,g=Math.abs(v.playbackRate);if(m<=500*b/g)return;var E=t.levels,o=t.minAutoLevel,x=E[i.level],C=_.total||Math.max(_.loaded,Math.round(b*x.maxBitrate/8)),A=Math.max(1,_.bwEstimate?_.bwEstimate/8:_.loaded*1e3/m),D=(C-_.loaded)/A,I=v.currentTime,F=(O.BufferHelper.bufferInfo(v,I,y.maxBufferHole).end-I)/g;if(F>=2*b/g||D<=F)return;var H=Number.POSITIVE_INFINITY,te;for(te=i.level-1;te>o;te--){var j=E[te].maxBitrate;if(H=b*j/(8*.8*A),H<F)break}if(H>=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 "+te+`
|
|
|
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: `+H.toFixed(3)+` s
|
|
|
Time to underbuffer: `+F.toFixed(3)+" s"),t.nextLoadLevel=te,this.bwEstimator.sample(m,_.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,c=n.part;if(t.type===l.PlaylistLevelType.MAIN&&Object(w.isFiniteNumber)(t.sn)){var y=c?c.stats:t.stats,v=c?c.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,m=(_.loaded?_.loaded.duration:0)+v;_.loaded={bytes:b,duration:m},_.realBitrate=Math.round(8*b/m)}if(t.bitrateTest){var g={stats:y,frag:t,part:c,id:t.type};this.onFragBuffered(S.Events.FRAG_BUFFERED,g),t.bitrateTest=!1}}},s.onFragBuffered=function(i,n){var t=n.frag,c=n.part,y=c?c.stats:t.stats;if(y.aborted)return;if(t.type!==l.PlaylistLevelType.MAIN||t.sn==="initSegment")return;var v=y.parsing.end-y.loading.start;this.bwEstimator.sample(v,y.loaded),y.bwEstimate=this.bwEstimator.getEstimate(),t.bitrateTest?this.bitrateTestDelay=v/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,c=t.maxAutoLevel,y=t.config,v=t.minAutoLevel,_=t.media,b=n?n.duration:i?i.duration:0,m=_?_.currentTime:0,g=_&&_.playbackRate!==0?Math.abs(_.playbackRate):1,E=this.bwEstimator?this.bwEstimator.getEstimate():y.abrEwmaDefaultEstimate,o=(O.BufferHelper.bufferInfo(_,m,y.maxBufferHole).end-m)/g,x=this.findBestLevel(E,v,c,o,y.abrBandWidthFactor,y.abrBandWidthUpFactor);if(x>=0)return x;p.logger.trace((o?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var C=b?Math.min(b,y.maxStarvationDelay):y.maxStarvationDelay,A=y.abrBandWidthFactor,D=y.abrBandWidthUpFactor;if(!o){var I=this.bitrateTestDelay;if(I){var F=b?Math.min(b,y.maxLoadingDelay):y.maxLoadingDelay;C=F-I,p.logger.trace("bitrate test took "+Math.round(1e3*I)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*C)+" ms"),A=D=1}}return x=this.findBestLevel(E,v,c,o+C,A,D),Math.max(x,0)},s.findBestLevel=function(i,n,t,c,y,v){for(var _,b=this.fragCurrent,m=this.partCurrent,g=this.lastLoadedFragLevel,E=this.hls.levels,o=E[g],x=!!(o!=null&&(_=o.details)!==null&&_!==void 0&&_.live),C=o==null?void 0:o.codecSet,A=m?m.duration:b?b.duration:0,D=t;D>=n;D--){var I=E[D];if(!I||C&&I.codecSet!==C)continue;var F=I.details,H=(m?F==null?void 0:F.partTarget:F==null?void 0:F.averagetargetduration)||A,te=void 0;D<=g?te=y*i:te=v*i;var j=E[D].maxBitrate,G=j*H/te;if(p.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+D+"/"+Math.round(te)+"/"+j+"/"+H+"/"+c+"/"+G),te>j&&(!G||x&&!this.bitrateTestDelay||G<c))return D}return-1},d(u,[{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}}]),u}();Z.default=a},"./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"),O=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"),a=U("./src/demux/transmuxer-interface.ts"),u=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 m=1;m<arguments.length;m++){var g=arguments[m];for(var E in g)Object.prototype.hasOwnProperty.call(g,E)&&(b[E]=g[E])}return b},t.apply(this,arguments)}function c(b,m){b.prototype=Object.create(m.prototype),b.prototype.constructor=b,y(b,m)}function y(b,m){return y=Object.setPrototypeOf||function(E,o){return E.__proto__=o,E},y(b,m)}var v=100,_=function(b){c(m,b);function m(E,o){var x;return x=b.call(this,E,o,"[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 g=m.prototype;return g.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},g._registerListeners=function(){var o=this.hls;o.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.on(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),o.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),o.on(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.on(S.Events.ERROR,this.onError,this),o.on(S.Events.BUFFER_RESET,this.onBufferReset,this),o.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),o.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),o.on(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},g._unregisterListeners=function(){var o=this.hls;o.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.off(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),o.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),o.off(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.off(S.Events.ERROR,this.onError,this),o.off(S.Events.BUFFER_RESET,this.onBufferReset,this),o.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),o.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),o.off(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},g.onInitPtsFound=function(o,x){var C=x.frag,A=x.id,D=x.initPTS;if(A==="main"){var I=C.cc;this.initPTS[C.cc]=D,this.log("InitPTS for cc: "+I+" found from main: "+D),this.videoTrackCC=I,this.state===P.State.WAITING_INIT_PTS&&this.tick()}},g.startLoad=function(o){if(!this.levels){this.startPosition=o,this.state=P.State.STOPPED;return}var x=this.lastCurrentTime;this.stopLoad(),this.setInterval(v),this.fragLoadError=0,x>0&&o===-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=o,this.tick()},g.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_TRACK:{var o,x=this.levels,C=this.trackId,A=x==null||((o=x[C])===null||o===void 0)?void 0:o.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 H=this.waitingData;if(H){var te=H.frag,j=H.part,G=H.cache,X=H.complete;if(this.initPTS[te.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.FRAG_LOADING;var J=G.flush(),B={frag:te,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 ("+te.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var Q=this.getLoadPosition(),ie=O.BufferHelper.bufferInfo(this.mediaBuffer,Q,this.config.maxBufferHole),oe=Object(s.fragmentWithinToleranceTest)(ie.end,this.config.maxFragLookUpTolerance,te);oe<0&&(n.logger.log("Waiting fragment cc ("+te.cc+") @ "+te.start+" cancelled because another fragment at "+ie.end+" is needed"),this.clearWaitingFragment())}}else this.state=P.State.IDLE}}this.onTickEnd()},g.clearWaitingFragment=function(){var o=this.waitingData;o&&(this.fragmentTracker.removeFragment(o.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.IDLE)},g.onTickEnd=function(){var o=this.media;if(!o||!o.readyState)return;var x=this.mediaBuffer?this.mediaBuffer:o,C=x.buffered;!this.loadedmetadata&&C.length&&(this.loadedmetadata=!0),this.lastCurrentTime=o.currentTime},g.doTickIdle=function(){var o,x,C=this.hls,A=this.levels,D=this.media,I=this.trackId,F=C.config;if(!A||!A[I])return;if(!D&&(this.startFragRequested||!F.startFragPrefetch))return;var H=A[I],te=H.details;if(!te||te.live&&this.levelLastLoaded!==I||this.waitForCdnTuneIn(te)){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,te)){C.trigger(S.Events.BUFFER_EOS,{type:"audio"}),this.state=P.State.ENDED;return}var B=te.fragments,Q=B[0].start,ie=j.end;if(J){var oe=this.getLoadPosition();ie=oe,te.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 Ee=this.getNextFragment(ie,te);if(!Ee){this.bufferFlushed=!0;return}((o=Ee.decryptdata)===null||o===void 0?void 0:o.keyFormat)==="identity"&&!((x=Ee.decryptdata)!==null&&x!==void 0&&x.key)?this.loadKey(Ee,te):this.loadFragment(Ee,te,ie)},g.getMaxBufferLength=function(){var o=b.prototype.getMaxBufferLength.call(this),x=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,p.PlaylistLevelType.MAIN);return x===null?o:Math.max(o,x.len)},g.onMediaDetaching=function(){this.videoBuffer=null,b.prototype.onMediaDetaching.call(this)},g.onAudioTracksUpdated=function(o,x){var C=x.audioTracks;this.resetTransmuxer(),this.levels=C.map(function(A){return new l.Level(A)})},g.onAudioTrackSwitching=function(o,x){var C=!!x.url;this.trackId=x.id;var A=this.fragCurrent;A!=null&&A.loader&&A.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),C?this.setInterval(v):this.resetTransmuxer(),C?(this.audioSwitch=!0,this.state=P.State.IDLE):this.state=P.State.STOPPED,this.tick()},g.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},g.onLevelLoaded=function(o,x){this.mainDetails=x.details},g.onAudioTrackLoaded=function(o,x){var C,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],H=0;if(D.live||(C=F.details)!==null&&C!==void 0&&C.live){var te=this.mainDetails;if(D.fragments[0]||(D.deltaUpdateFailed=!0),D.deltaUpdateFailed||!te)return;!F.details&&D.hasProgramDateTime&&te.hasProgramDateTime?(Object(f.alignMediaPlaylistByPDT)(D,te),H=D.fragments[0].start):H=this.alignPlaylists(D,F.details)}F.details=D,this.levelLastLoaded=I,!this.startFragRequested&&(this.mainDetails||!D.live)&&this.setStartPosition(F.details,H),this.state===P.State.WAITING_TRACK&&!this.waitForCdnTuneIn(D)&&(this.state=P.State.IDLE),this.tick()},g._handleFragmentLoadProgress=function(o){var x,C=o.frag,A=o.part,D=o.payload,I=this.config,F=this.trackId,H=this.levels;if(!H){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+C.sn+" of level "+C.level+" will not be buffered");return}var te=H[F];console.assert(te,"Audio track is defined on fragment load progress");var j=te.details;console.assert(j,"Audio track details are defined on fragment load progress");var G=I.defaultAudioCodec||te.audioCodec||"mp4a.40.2",X=this.transmuxer;X||(X=this.transmuxer=new a.default(this.hls,p.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var J=this.initPTS[C.cc],B=(x=C.initSegment)===null||x===void 0?void 0:x.data;if(J!==void 0){var Q=!1,ie=A?A.index:-1,oe=ie!==-1,Ee=new u.ChunkMetadata(C.level,C.sn,C.stats.chunkCount,D.byteLength,ie,oe);X.push(D,B,G,"",C,A,j.totalduration,Q,Ee,J)}else{n.logger.log("Unknown video PTS for cc "+C.cc+", waiting for video PTS before demuxing audio frag "+C.sn+" of ["+j.startSN+" ,"+j.endSN+"],track "+F);var ye=this.waitingData=this.waitingData||{frag:C,part:A,cache:new d.default,complete:!1},Le=ye.cache;Le.push(new Uint8Array(D)),this.waitingVideoCC=this.videoTrackCC,this.state=P.State.WAITING_INIT_PTS}},g._handleFragmentLoadComplete=function(o){if(this.waitingData){this.waitingData.complete=!0;return}b.prototype._handleFragmentLoadComplete.call(this,o)},g.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},g.onBufferCreated=function(o,x){var C=x.tracks.audio;C&&(this.mediaBuffer=C.buffer),x.tracks.video&&(this.videoBuffer=x.tracks.video.buffer)},g.onFragBuffered=function(o,x){var C=x.frag,A=x.part;if(C.type!==p.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(C)){this.warn("Fragment "+C.sn+(A?" p: "+A.index:"")+" of level "+C.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}C.sn!=="initSegment"&&(this.fragPrevious=C,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(C,A)},g.onError=function(o,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 C=!0,A=this.getFwdBufferInfo(this.mediaBuffer,p.PlaylistLevelType.AUDIO);A&&A.len>.5&&(C=!this.reduceMaxBufferLength(A.len)),C&&(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}},g.onBufferFlushed=function(o,x){var C=x.type;C===h.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},g._handleTransmuxComplete=function(o){var x,C="audio",A=this.hls,D=o.remuxResult,I=o.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 H=F.frag,te=F.part,j=D.audio,G=D.text,X=D.id3,J=D.initSegment;if(this.fragContextChanged(H))return;if(this.state=P.State.PARSING,this.audioSwitch&&j&&this.completeAudioSwitch(),J!=null&&J.tracks&&(this._bufferInitSegment(J.tracks,H,I),A.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:C,tracks:J.tracks})),j){var B=j.startPTS,Q=j.endPTS,ie=j.startDTS,oe=j.endDTS;te&&(te.elementaryStreams[h.ElementaryStreamTypes.AUDIO]={startPTS:B,endPTS:Q,startDTS:ie,endDTS:oe}),H.setElementaryStreamInfo(h.ElementaryStreamTypes.AUDIO,B,Q,ie,oe),this.bufferFragmentData(j,H,te,I)}if(X!=null&&(x=X.samples)!==null&&x!==void 0&&x.length){var Ee=t({frag:H,id:C},X);A.trigger(S.Events.FRAG_PARSING_METADATA,Ee)}if(G){var ye=t({frag:H,id:C},G);A.trigger(S.Events.FRAG_PARSING_USERDATA,ye)}},g._bufferInitSegment=function(o,x,C){if(this.state!==P.State.PARSING)return;o.video&&delete o.video;var A=o.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,o);var D=A.initSegment;if(D!=null&&D.byteLength){var I={type:"audio",frag:x,part:null,chunkMeta:C,parent:x.type,data:D};this.hls.trigger(S.Events.BUFFER_APPENDING,I)}this.tick()},g.loadFragment=function(o,x,C){var A=this.fragmentTracker.getState(o);this.fragCurrent=o,(this.audioSwitch||A===T.FragmentState.NOT_LOADED||A===T.FragmentState.PARTIAL)&&(o.sn==="initSegment"?this._loadInitSegment(o):x.live&&!Object(w.isFiniteNumber)(this.initPTS[o.cc])?(this.log("Waiting for video PTS in continuity counter "+o.cc+" of live stream before loading audio fragment "+o.sn+" of level "+this.trackId),this.state=P.State.WAITING_INIT_PTS):(this.startFragRequested=!0,b.prototype.loadFragment.call(this,o,x,C)))},g.completeAudioSwitch=function(){var o=this.hls,x=this.media,C=this.trackId;x&&(this.log("Switching audio track : flushing all audio"),b.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,o.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:C})},m}(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"),O=U("./src/types/loader.ts");function T(a,u){for(var s=0;s<u.length;s++){var f=u[s];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(a,f.key,f)}}function l(a,u,s){return u&&T(a.prototype,u),s&&T(a,s),a}function p(a,u){a.prototype=Object.create(u.prototype),a.prototype.constructor=a,h(a,u)}function h(a,u){return h=Object.setPrototypeOf||function(f,i){return f.__proto__=i,f},h(a,u)}var d=function(a){p(u,a);function u(f){var i;return i=a.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=u.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,a.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,c=n.details,y=this.tracksInGroup[t];if(!y){this.warn("Invalid audio track id "+t);return}var v=y.details;y.details=n.details,this.log("audioTrack "+t+" loaded ["+c.startSN+"-"+c.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,n,v))},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 c=this.tracks.filter(function(v){return!t||v.groupId===t});this.selectDefaultTrack&&!c.some(function(v){return v.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=c;var y={audioTracks:c};this.log("Updating audio tracks, "+c.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(a.prototype.onError.call(this,i,n),n.fatal||!n.context)return;n.context.type===O.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 c=n[i],y=c.id,v=c.groupId,_=v===void 0?"":v,b=c.name,m=c.type,g=c.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:m,url:g}),c.details&&!c.details.live)return;var E=this.switchParams(c.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 c=n[t];if((!this.selectDefaultTrack||c.default)&&(!i||i===c.name))return c.id}return-1},s.loadPlaylist=function(i){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var t=n.id,c=n.groupId,y=n.url;if(i)try{y=i.addDirectives(y)}catch(v){this.warn("Could not construct new URL with HLS Delivery Directives: "+v)}this.log("loading audio-track playlist for id: "+t),this.clearTimer(),this.hls.trigger(w.Events.AUDIO_TRACK_LOADING,{url:y,id:t,groupId:c,deliveryDirectives:i||null})}},l(u,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(i){this.selectDefaultTrack=!1,this.setAudioTrack(i)}}]),u}(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"),O=U("./src/utils/logger.ts"),T=U("./src/errors.ts"),l=function(){function p(d,a){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=O.logger.log.bind(O.logger,a+":"),this.warn=O.logger.warn.bind(O.logger,a+":"),this.hls=d}var h=p.prototype;return h.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},h.onError=function(a,u){u.fatal&&u.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(a,u){var s=u==null?void 0:u.renditionReports;if(s)for(var f=0;f<s.length;f++){var i=s[f],n=""+i.URI;if(n===a.substr(-n.length)){var t=parseInt(i["LAST-MSN"]),c=parseInt(i["LAST-PART"]);if(u&&this.hls.config.lowLatencyMode){var y=Math.min(u.age-u.partTarget,u.targetduration);c!==void 0&&y>u.partTarget&&(c+=1)}if(Object(w.isFiniteNumber)(t))return new P.HlsUrlParameters(t,Object(w.isFiniteNumber)(c)?c:void 0,P.HlsSkip.No)}}},h.loadPlaylist=function(a){},h.shouldLoadTrack=function(a){return this.canLoad&&a&&!!a.url&&(!a.details||a.details.live)},h.playlistLoaded=function(a,u,s){var f=this,i=u.details,n=u.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 "+a+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),s&&i.fragments.length>0&&Object(S.mergeDetails)(s,i),!this.canLoad||!i.live)return;var c,y=void 0,v=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var _=this.hls.config.lowLatencyMode,b=i.lastPartSn,m=i.endSN,g=i.lastPartIndex,E=g!==-1,o=b===m,x=_?0:g;E?(y=o?m+1:b,v=o?x:g+1):y=m+1;var C=i.age,A=C+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,v!==void 0){var F=Math.round(D%i.targetduration/i.partTarget);v+=F}this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+C.toFixed(2)+"s goal: "+D+" skip sn "+I+" to part "+v)}i.tuneInGoal=D}if(c=this.getDeliveryDirectives(i,u.deliveryDirectives,y,v),_||!o){this.loadPlaylist(c);return}}else c=this.getDeliveryDirectives(i,u.deliveryDirectives,y,v);var H=Object(S.computeReloadInterval)(i,n);y!==void 0&&i.canBlockReload&&(H-=i.partTarget||1),this.log("reload live playlist "+a+" in "+Math.round(H)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(c)},H)}else this.clearTimer()},h.getDeliveryDirectives=function(a,u,s,f){var i=Object(P.getSkipValue)(a,s);return u!=null&&u.skip&&a.deltaUpdateFailed&&(s=u.msn,f=u.part,i=P.HlsSkip.No),new P.HlsUrlParameters(s,f,i)},h.retryLoadingOrFail=function(a){var u=this,s=this.hls.config,f=this.retryCount<s.levelLoadingMaxRetry;if(f){var i;if(this.retryCount++,a.details.indexOf("LoadTimeOut")>-1&&(i=a.context)!==null&&i!==void 0&&i.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+a.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*s.levelLoadingRetryDelay,s.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return u.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+a.details+'"')}}else this.warn('cannot recover from error "'+a.details+'"'),this.clearTimer(),a.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 m}),U.d(Z,"default",function(){return g});var w=U("./src/polyfills/number.ts"),P=U("./src/task-loop.ts"),S=U("./src/controller/fragment-tracker.ts"),O=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"),a=U("./src/utils/discontinuities.ts"),u=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 c(E,o){for(var x=0;x<o.length;x++){var C=o[x];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(E,C.key,C)}}function y(E,o,x){return o&&c(E.prototype,o),x&&c(E,x),E}function v(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function _(E,o){E.prototype=Object.create(o.prototype),E.prototype.constructor=E,b(E,o)}function b(E,o){return b=Object.setPrototypeOf||function(C,A){return C.__proto__=A,C},b(E,o)}var m={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"},g=function(E){_(o,E);function o(C,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=m.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=C,I.fragmentLoader=new f.default(C.config),I.fragmentTracker=A,I.config=C.config,I.decrypter=new i.default(C,C.config),C.on(l.Events.KEY_LOADED,I.onKeyLoaded,v(I)),I}var x=o.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=m.STOPPED},x._streamEnded=function(A,D){var I=this.fragCurrent,F=this.fragmentTracker;if(!D.live&&I&&I.sn===D.endSN&&!A.nextStart){var H=F.getState(I);return H===S.FragmentState.PARTIAL||H===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===m.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,H=this.state,te=I?I.currentTime:0,j=O.BufferHelper.bufferInfo(F||I,te,A.maxBufferHole);if(this.log("media seeking to "+(Object(w.isFiniteNumber)(te)?te.toFixed(3):te)+", state: "+H),H===m.ENDED)this.resetLoadingState();else if(D&&!j.len){var G=A.maxFragLookUpTolerance,X=D.start-G,J=D.start+D.duration+G,B=te>J;(te<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=te),!this.loadedmetadata&&!j.len&&(this.nextLoadPosition=this.startPosition=te),this.tickImmediate()},x.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},x.onKeyLoaded=function(A,D){if(this.state!==m.KEY_LOADING||D.frag!==this.fragCurrent||!this.levels)return;this.state=m.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=m.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=m.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,H=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,H).then(function(te){if(!te)return;F.fragLoadError=0;var j=F.state;if(F.fragContextChanged(A)){(j===m.FRAG_LOADING||j===m.BACKTRACKING||!F.fragCurrent&&j===m.PARSING)&&(F.fragmentTracker.removeFragment(A),F.state=m.IDLE);return}if("payload"in te&&(F.log("Loaded fragment "+A.sn+" of level "+A.level),F.hls.trigger(l.Events.FRAG_LOADED,te),F.state===m.BACKTRACKING)){F.fragmentTracker.backtrack(A,te),F.resetFragmentLoading(A);return}F._handleFragmentLoadComplete(te)}).catch(function(te){F.warn(te),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,H=I.payload,te=A.decryptdata;if(H&&H.byteLength>0&&te&&te.key&&te.iv&&te.method==="AES-128"){var j=self.performance.now();return D.decrypter.webCryptoDecrypt(new Uint8Array(H),te.key.buffer,te.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,H=D.hls,te=D.levels;if(!te)throw new Error("init load aborted, missing levels");var j=te[A.level].details;console.assert(j,"Level details are defined when init segment is loaded");var G=A.stats;D.state=m.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&&H.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(O.BufferHelper.getBuffered(I))),this.state=m.IDLE,this.tick()},x._handleFragmentLoadComplete=function(A){var D=this.transmuxer;if(!D)return;var I=A.frag,F=A.part,H=A.partsLoaded,te=!H||H.length===0||H.some(function(G){return!G}),j=new h.ChunkMetadata(I.level,I.sn,I.stats.chunkCount+1,0,F?F.index:-1,!te);D.flush(j)},x._handleFragmentLoadProgress=function(A){},x._doFragLoad=function(A,D,I,F){var H=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 te=D.partList;if(te&&F){I>A.end&&D.fragmentHint&&(A=D.fragmentHint);var j=this.getNextPart(te,A,I);if(j>-1){var G=te[j];return this.log("Loading part sn: "+A.sn+" p: "+G.index+" cc: "+A.cc+" of playlist ["+D.startSN+"-"+D.endSN+"] parts [0-"+j+"-"+(te.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+A.level+", target: "+parseFloat(I.toFixed(3))),this.nextLoadPosition=G.start+G.duration,this.state=m.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:A,part:te[j],targetBufferTime:I}),this.doFragPartsLoad(A,te,j,F).catch(function(X){return H.handleFragLoadError(X)})}else if(!A.url||this.loadedEndOfParts(te,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=m.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:A,targetBufferTime:I}),this.fragmentLoader.load(A,F).catch(function(X){return H.handleFragLoadError(X)})},x.doFragPartsLoad=function(A,D,I,F){var H=this;return new Promise(function(te,j){var G=[],X=function J(B){var Q=D[B];H.fragmentLoader.loadPart(A,Q,F).then(function(ie){G[Q.index]=ie;var oe=ie.part;H.hls.trigger(l.Events.FRAG_LOADED,ie);var Ee=D[B+1];if(Ee&&Ee.fragment===A)J(B+1);else return te({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!==m.PARSING){this.fragCurrent||(this.state=m.IDLE);return}var I=D.frag,F=D.part,H=D.level,te=self.performance.now();I.stats.parsing.end=te,F&&(F.stats.parsing.end=te),this.updateLevelTiming(I,F,H,A.partial)},x.getCurrentContext=function(A){var D=this.levels,I=A.level,F=A.sn,H=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 te=D[I],j=H>-1?Object(s.getPartWith)(te,F,H):null,G=j?j.fragment:Object(s.getFragmentWithSN)(te,F,this.fragCurrent);return G?{frag:G,part:j,level:te}:null},x.bufferFragmentData=function(A,D,I,F){if(!A||this.state!==m.PARSING)return;var H=A.data1,te=A.data2,j=H;if(H&&te&&(j=Object(d.appendUint8Array)(H,te)),!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(!O.BufferHelper.isBuffered(D,D.currentTime)){this.flushMainBuffer(0,A.start);return}var I=D.currentTime,F=O.BufferHelper.bufferInfo(D,I,0),H=A.duration,te=Math.min(this.config.maxFragLookUpTolerance*2,H*.25),j=Math.max(Math.min(A.start-te,F.end-te),I+te);A.start-j>te&&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 H=O.BufferHelper.bufferInfo(A,F,I.maxBufferHole);if(H.len===0&&H.nextStart!==void 0){var te=this.fragmentTracker.getBufferedFrag(F,D);if(te&&H.nextStart<te.end)return O.BufferHelper.bufferInfo(A,F,Math.max(H.nextStart,I.maxBufferHole))}return H},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,H=D.fragments,te=H.length;if(!te)return null;var j=this.config,G=H[0].start,X;if(D.live){var J=j.initialLiveManifestSize;if(te<J)return this.warn("Not enough fragments to start playback (have: "+te+", need: "+J+")"),null;!D.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(X=this.getInitialLiveFragment(D,H),this.startPosition=X?this.hls.liveSyncPosition||X.start:A)}else A<=G&&(X=H[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,H=!1,te=!0,j=0,G=A.length;j<G;j++){var X=A[j];if(te=te&&!X.independent,F>-1&&I<X.start)break;var J=X.loaded;!J&&(H||X.independent||te)&&X.fragment===D&&(F=j),H=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(u.findFragmentByPDT)(D,I.endProgramDateTime,this.config.maxFragLookUpTolerance)),!F){var H=I.sn+1;if(H>=A.startSN&&H<=A.endSN){var te=D[H-A.startSN];I.cc===te.cc&&(F=te,this.log("Live playlist, switching playlist, load frag with next SN: "+F.sn))}F||(F=Object(u.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,H=this.fragPrevious,te=I.fragments,j=I.endSN,G=I.fragmentHint,X=F.maxFragLookUpTolerance,J=!!(F.lowLatencyMode&&I.partList&&G);J&&G&&!this.bitrateTest&&(te=te.concat(G),j=G.sn);var B;if(A<D){var Q=A>D-X?0:X;B=Object(u.findFragmentByPTS)(H,te,A,Q)}else B=te[te.length-1];if(B){var ie=B.sn-I.startSN,oe=H&&B.level===H.level,Ee=te[ie+1],ye=this.fragmentTracker.getState(B);if(ye===S.FragmentState.BACKTRACKED){B=null;for(var Le=ie;te[Le]&&this.fragmentTracker.getState(te[Le])===S.FragmentState.BACKTRACKED;)H?B=te[Le--]:B=te[--Le];B||(B=Ee)}else H&&B.sn===H.sn&&!J&&(oe&&(B.sn<j&&this.fragmentTracker.getState(Ee)!==S.FragmentState.OK?(this.log("SN "+B.sn+" just loaded, load next one: "+Ee.sn),B=Ee):B=null))}return B},x.synchronizeToLiveEdge=function(A){var D=this.config,I=this.media;if(!I)return;var F=this.hls.liveSyncPosition,H=I.currentTime,te=A.fragments[0].start,j=A.edge,G=H>=te-D.maxFragLookUpTolerance&&H<=j;if(F!==null&&I.duration>F&&(H<F||!G)){var X=D.liveMaxLatencyDuration!==void 0?D.liveMaxLatencyDuration:D.liveMaxLatencyDurationCount*A.targetduration;(!G&&I.readyState<4||H<j-X)&&(this.loadedmetadata||(this.nextLoadPosition=F),I.readyState&&(this.warn("Playback: "+H.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,H=this.fragPrevious,te=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(a.alignStream)(H,te,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: "+(H?H.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=m.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 H=this.config;if(this.fragLoadError+1<=H.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(I.level))return;var te=Math.min(Math.pow(2,this.fragLoadError)*H.fragLoadingRetryDelay,H.fragLoadingMaxRetryTimeout);this.warn("Fragment "+I.sn+" of "+A+" "+I.level+" failed to load, retrying in "+te+"ms"),this.retryDate=self.performance.now()+te,this.fragLoadError++,this.state=m.FRAG_LOADING_WAITING_RETRY}else D.levelRetry?(A===t.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=m.IDLE):(T.logger.error(D.details+" reaches max retry, redispatch as fatal ..."),D.fatal=!0,this.hls.stopLoad(),this.state=m.ERROR)},x.afterBufferFlushed=function(A,D,I){if(!A)return;var F=O.BufferHelper.getBuffered(A);this.fragmentTracker.detectEvictedFragments(D,F,I),this.state===m.ENDED&&this.resetLoadingState()},x.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=m.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 H=this,te=I.details;console.assert(!!te,"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 H.warn("Could not parse fragment "+A.sn+" "+X+" duration reliably ("+B+") resetting transmuxer to fallback to playlist timing"),H.resetTransmuxer(),G||!1;var Q=F?0:Object(s.updateFragPTSDTS)(te,A,J.startPTS,J.endPTS,J.startDTS,J.endDTS);return H.hls.trigger(l.Events.LEVEL_PTS_UPDATED,{details:te,level:I,drift:Q,type:X,frag:A,start:J.startPTS,end:J.endPTS}),!0}return G},!1);j?(this.state=m.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(o,[{key:"state",get:function(){return this._state},set:function(A){var D=this._state;D!==A&&(this._state=A,this.log(D+"->"+A))}}]),o}(P.default)},"./src/controller/buffer-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return u});var w=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),S=U("./src/utils/logger.ts"),O=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)(),a=/([ha]vc.)(?:\.[^.,]+)+/,u=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,c=n.media,y=n.mediaSource;S.logger.log("[buffer-controller]: Media source opened"),c&&(n.updateMediaElementDuration(),t.trigger(P.Events.MEDIA_ATTACHED,{media:c})),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 c=2;(t.audio&&!t.video||!t.altAudio)&&(c=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=c,this.details=null,S.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(n,t){var c=this.media=t.media;if(c&&d){var y=this.mediaSource=new d;y.addEventListener("sourceopen",this._onMediaSourceOpen),y.addEventListener("sourceended",this._onMediaSourceEnded),y.addEventListener("sourceclose",this._onMediaSourceClose),c.src=self.URL.createObjectURL(y),this._objectUrl=c.src}},f.onMediaDetaching=function(){var n=this.media,t=this.mediaSource,c=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&&(c&&self.URL.revokeObjectURL(c),n.src===c?(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 c=n.sourceBuffer[t];try{c&&(n.removeBufferListeners(t),n.mediaSource&&n.mediaSource.removeSourceBuffer(c),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 c=this,y=this.getSourceBufferTypes().length;if(Object.keys(t).forEach(function(v){if(y){var _=c.tracks[v];if(_&&typeof _.buffer.changeType=="function"){var b=t[v],m=b.codec,g=b.levelCodec,E=b.container,o=(_.levelCodec||_.codec).replace(a,"$1"),x=(g||m).replace(a,"$1");if(o!==x){var C=E+";codecs="+(g||m);c.appendChangeType(v,C)}}}else c.pendingTracks[v]=t[v]}),y)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},f.appendChangeType=function(n,t){var c=this,y=this.operationQueue,v={execute:function(){var b=c.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(v,n)},f.onBufferAppending=function(n,t){var c=this,y=this.hls,v=this.operationQueue,_=this.tracks,b=t.data,m=t.type,g=t.frag,E=t.part,o=t.chunkMeta,x=o.buffering[m],C=self.performance.now();x.start=C;var A=g.stats.buffering,D=E?E.stats.buffering:null;A.start===0&&(A.start=C),D&&D.start===0&&(D.start=C);var I=_.audio,F=m==="audio"&&o.id===1&&(I==null?void 0:I.container)==="audio/mpeg",H={execute:function(){if(x.executeStart=self.performance.now(),F){var j=c.sourceBuffer[m];if(j){var G=g.start-j.timestampOffset;Math.abs(G)>=.1&&(S.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+g.start+" (delta: "+G+") sn: "+g.sn+")"),j.timestampOffset=g.start)}}c.appendExecutor(b,m)},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=c.sourceBuffer,X={};for(var J in G)X[J]=T.BufferHelper.getBuffered(G[J]);c.appendError=0,c.hls.trigger(P.Events.BUFFER_APPENDED,{type:m,frag:g,part:E,chunkMeta:o,parent:g.type,timeRanges:X})},onError:function(j){S.logger.error("[buffer-controller]: Error encountered while trying to append to the "+m+" SourceBuffer",j);var G={type:O.ErrorTypes.MEDIA_ERROR,parent:g.type,details:O.ErrorDetails.BUFFER_APPEND_ERROR,err:j,fatal:!1};j.code===DOMException.QUOTA_EXCEEDED_ERR?G.details=O.ErrorDetails.BUFFER_FULL_ERROR:(c.appendError++,G.details=O.ErrorDetails.BUFFER_APPEND_ERROR,c.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)}};v.append(H,m)},f.onBufferFlushing=function(n,t){var c=this,y=this.operationQueue,v=function(b){return{execute:c.removeExecutor.bind(c,b,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){c.hls.trigger(P.Events.BUFFER_FLUSHED,{type:b})},onError:function(g){S.logger.warn("[buffer-controller]: Failed to remove from "+b+" SourceBuffer",g)}}};t.type?y.append(v(t.type),t.type):this.getSourceBufferTypes().forEach(function(_){y.append(v(_),_)})},f.onFragParsed=function(n,t){var c=this,y=t.frag,v=t.part,_=[],b=v?v.elementaryStreams:y.elementaryStreams;b[p.ElementaryStreamTypes.AUDIOVIDEO]?_.push("audiovideo"):(b[p.ElementaryStreamTypes.AUDIO]&&_.push("audio"),b[p.ElementaryStreamTypes.VIDEO]&&_.push("video"));var m=function(){var E=self.performance.now();y.stats.buffering.end=E,v&&(v.stats.buffering.end=E);var o=v?v.stats:y.stats;c.hls.trigger(P.Events.FRAG_BUFFERED,{frag:y,part:v,stats:o,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(m,_)},f.onFragChanged=function(n,t){this.flushBackBuffer()},f.onBufferEos=function(n,t){var c=this,y=this.getSourceBufferTypes().reduce(function(v,_){var b=c.sourceBuffer[_];return(!t.type||t.type===_)&&(b&&!b.ended&&(b.ended=!0,S.logger.log("[buffer-controller]: "+_+" sourceBuffer now EOS"))),v&&!!(!b||b.ended)},!0);y&&this.blockBuffers(function(){var v=c.mediaSource;if(!v||v.readyState!=="open")return;v.endOfStream()})},f.onLevelUpdated=function(n,t){var c=t.details;if(!c.fragments.length)return;this.details=c,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},f.flushBackBuffer=function(){var n=this.hls,t=this.details,c=this.media,y=this.sourceBuffer;if(!c||t===null)return;var v=this.getSourceBufferTypes();if(!v.length)return;var _=t.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(w.isFiniteNumber)(_)||_<0)return;var b=c.currentTime,m=t.levelTargetDuration,g=Math.max(_,m),E=Math.floor(b/m)*m-g;v.forEach(function(o){var x=y[o];if(x){var C=T.BufferHelper.getBuffered(x);C.length>0&&E>C.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:o}))}})},f.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,t=this.hls,c=this.media,y=this.mediaSource,v=n.fragments[0].start+n.totalduration,_=c.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)):(v>b&&v>_||!Object(w.isFiniteNumber)(_))&&(S.logger.log("[buffer-controller]: Updating Media Source duration to "+v.toFixed(3)),y.duration=v)},f.updateSeekableRange=function(n){var t=this.mediaSource,c=n.fragments,y=c.length;if(y&&n.live&&t!==null&&t!==void 0&&t.setLiveSeekableRange){var v=Math.max(0,c[0].start),_=Math.max(v,v+n.totalduration);t.setLiveSeekableRange(v,_)}},f.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,t=this.operationQueue,c=this.pendingTracks,y=Object.keys(c).length;if(y&&!n||y===2){this.createSourceBuffers(c),this.pendingTracks={};var v=this.getSourceBufferTypes();if(v.length===0){this.hls.trigger(P.Events.ERROR,{type:O.ErrorTypes.MEDIA_ERROR,details:O.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}v.forEach(function(_){t.executeNext(_)})}},f.createSourceBuffers=function(n){var t=this.sourceBuffer,c=this.mediaSource;if(!c)throw Error("createSourceBuffers called when mediaSource was null");var y=0;for(var v in n)if(!t[v]){var _=n[v];if(!_)throw Error("source buffer exists for track "+v+", however track does not");var b=_.levelCodec||_.codec,m=_.container+";codecs="+b;S.logger.log("[buffer-controller]: creating sourceBuffer("+m+")");try{var g=t[v]=c.addSourceBuffer(m),E=v;this.addBufferListener(E,"updatestart",this._onSBUpdateStart),this.addBufferListener(E,"updateend",this._onSBUpdateEnd),this.addBufferListener(E,"error",this._onSBUpdateError),this.tracks[v]={buffer:g,codec:b,container:_.container,levelCodec:_.levelCodec,id:_.id},y++}catch(o){S.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+o.message),this.hls.trigger(P.Events.ERROR,{type:O.ErrorTypes.MEDIA_ERROR,details:O.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:o,mimeType:m})}}y&&this.hls.trigger(P.Events.BUFFER_CREATED,{tracks:this.tracks})},f._onSBUpdateStart=function(n){var t=this.operationQueue,c=t.current(n);c.onStart()},f._onSBUpdateEnd=function(n){var t=this.operationQueue,c=t.current(n);c.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:O.ErrorTypes.MEDIA_ERROR,details:O.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var c=this.operationQueue.current(n);c&&c.onError(t)},f.removeExecutor=function(n,t,c){var y=this.media,v=this.mediaSource,_=this.operationQueue,b=this.sourceBuffer,m=b[n];if(!y||!v||!m){S.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),_.shiftAndExecuteNext(n);return}var g=Object(w.isFiniteNumber)(y.duration)?y.duration:Infinity,E=Object(w.isFiniteNumber)(v.duration)?v.duration:Infinity,o=Math.max(0,t),x=Math.min(c,g,E);x>o?(S.logger.log("[buffer-controller]: Removing ["+o+","+x+"] from the "+n+" SourceBuffer"),console.assert(!m.updating,n+" sourceBuffer must not be updating"),m.remove(o,x)):_.shiftAndExecuteNext(n)},f.appendExecutor=function(n,t){var c=this.operationQueue,y=this.sourceBuffer,v=y[t];if(!v){S.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),c.shiftAndExecuteNext(t);return}v.ended=!1,console.assert(!v.updating,t+" sourceBuffer must not be updating"),v.appendBuffer(n)},f.blockBuffers=function(n,t){var c=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,v=t.map(function(_){return y.appendBlocker(_)});Promise.all(v).then(function(){n(),t.forEach(function(_){var b=c.sourceBuffer[_];(!b||!b.updating)&&y.shiftAndExecuteNext(_)})})},f.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},f.addBufferListener=function(n,t,c){var y=this.sourceBuffer[n];if(!y)return;var v=c.bind(this,n);this.listeners[n].push({event:t,listener:v}),y.addEventListener(t,v)},f.removeBufferListeners=function(n){var t=this.sourceBuffer[n];if(!t)return;this.listeners[n].forEach(function(c){t.removeEventListener(c.event,c.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 O=S.prototype;return O.append=function(l,p){var h=this.queues[p];h.push(l),h.length===1&&this.buffers[p]&&this.executeNext(p)},O.insertAbort=function(l,p){var h=this.queues[p];h.unshift(l),this.executeNext(p)},O.appendBlocker=function(l){var p,h=new Promise(function(a){p=a}),d={execute:p,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(d,l),h},O.executeNext=function(l){var p=this.buffers,h=this.queues,d=p[l],a=h[l];if(a.length){var u=a[0];try{u.execute()}catch(s){w.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),u.onError(s),(!d||!d.updating)&&(a.shift(),this.executeNext(l))}}},O.shiftAndExecuteNext=function(l){this.queues[l].shift(),this.executeNext(l)},O.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 O=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 a=this.hls;this.restrictedLevels=[],this.firstLevel=d.firstLevel,a.config.capLevelToPlayerSize&&d.video&&this.startCapping()},l.onBufferCodecs=function(h,d){var a=this.hls;a.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,a=this.hls.levels;if(!a.length)return-1;var u=a.filter(function(s,f){return T.isLevelAllowed(f,d.restrictedLevels)&&f<=h});return this.clientRect=null,T.getMaxLevelByMediaSize(u,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 a=h.getBoundingClientRect();d.width=a.width,d.height=a.height,!d.width&&!d.height&&(d.width=a.right-a.left||h.width||0,d.height=a.bottom-a.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,a){if(!h||!h.length)return-1;for(var u=function(t,c){return c?t.width!==c.width||t.height!==c.height:!0},s=h.length-1,f=0;f<h.length;f+=1){var i=h[f];if((i.width>=d||i.height>=a)&&u(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=O},"./src/controller/cmcd-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return u});var w=U("./src/events.ts"),P=U("./src/types/cmcd.ts"),S=U("./src/utils/buffer-helper.ts"),O=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 a(){return a=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},a.apply(this,arguments)}var u=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(v){O.logger.warn("Could not generate manifest CMCD data.",v)}},this.applyFragmentData=function(y){try{var v=y.frag,_=n.hls.levels[v.level],b=n.getObjectType(v),m={d:v.duration*1e3,ot:b};(b===P.CMCDObjectType.VIDEO||b===P.CMCDObjectType.AUDIO||b==P.CMCDObjectType.MUXED)&&(m.br=_.bitrate/1e3,m.tb=n.getTopBandwidth(b),m.bl=n.getBufferLength(b)),n.apply(y,m)}catch(g){O.logger.warn("Could not generate segment CMCD data.",g)}},this.hls=i;var t=this.config=i.config,c=t.cmcd;c!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=c.sessionId||s.uuid(),this.cid=c.contentId,this.useHeaders=c.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 c,y;this.audioBuffer=(c=t.tracks.audio)===null||c===void 0?void 0:c.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={}),a(t,this.createData());var c=t.ot===P.CMCDObjectType.INIT||t.ot===P.CMCDObjectType.VIDEO||t.ot===P.CMCDObjectType.MUXED;if(this.starved&&c&&(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={}),a(n.headers,y)}else{var v=s.toQuery(t);if(!v)return;n.url=s.appendQueryToUri(n.url,v)}},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,c=n===P.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,y=p(c),v;!(v=y()).done;){var _=v.value;_.bitrate>t&&(t=_.bitrate)}return t>0?t:NaN},f.getBufferLength=function(n){var t=this.hls.media,c=n===P.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!c||!t)return NaN;var y=S.BufferHelper.bufferInfo(c,t.currentTime,this.config.maxBufferHole);return y.len*1e3},f.createPlaylistLoader=function(){var n=this.config.pLoader,t=this.applyPlaylistData,c=n||this.config.loader;return function(){function y(_){this.loader=void 0,this.loader=new c(_)}var v=y.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(b,m,g){t(b),this.loader.load(b,m,g)},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,c=n||this.config.loader;return function(){function y(_){this.loader=void 0,this.loader=new c(_)}var v=y.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(b,m,g){t(b),this.loader.load(b,m,g)},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=[],c=function(F){return!Number.isNaN(F)&&F!=null&&F!==""&&F!==!1},y=function(F){return Math.round(F)},v=function(F){return y(F/100)*100},_=function(F){return encodeURIComponent(F)},b={br:y,d:y,bl:v,dl:v,mtp:v,nor:_,rtp:v,tb:y},m=Object.keys(n||{}).sort(),g=p(m),E;!(E=g()).done;){var o=E.value,x=n[o];if(!c(x))continue;if(o==="v"&&x===1)continue;if(o=="pr"&&x===1)continue;var C=b[o];C&&(x=C(x));var A=typeof x,D=void 0;o==="ot"||o==="sf"||o==="st"?D=o+"="+x:A==="boolean"?D=o:A==="number"?D=o+"="+x:D=o+"="+JSON.stringify(x),t.push(D)}return t.join(",")},s.toHeaders=function(n){for(var t=Object.keys(n),c={},y=["Object","Request","Session","Status"],v=[{},{},{},{}],_={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,m=t;b<m.length;b++){var g=m[b],E=_[g]!=null?_[g]:1;v[E][g]=n[g]}for(var o=0;o<v.length;o++){var x=s.serialize(v[o]);x&&(c["CMCD-"+y[o]]=x)}return c},s.toQuery=function(n){return"CMCD="+encodeURIComponent(s.serialize(n))},s.appendQueryToUri=function(n,t){if(!t)return n;var c=n.includes("?")?"&":"?";return""+n+c+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"),O=U("./src/utils/mediakeys-helper.ts");function T(u,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(u,i.key,i)}}function l(u,s,f){return s&&T(u.prototype,s),f&&T(u,f),u}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 O.KeySystems.WIDEVINE:return h(f,i,n);default:throw new Error("Unknown key-system: "+s)}},a=function(){function u(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=u.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 O.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 c=this,y=d(i,n,t,this._drmSystemOptions);S.logger.log("Requesting encrypted media key-system access");var v=this.requestMediaKeySystemAccess(i,y);this.mediaKeysPromise=v.then(function(_){return c._onMediaKeySystemAccessObtained(i,_)}),v.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 c={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:i};this._mediaKeysList.push(c);var y=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(v){return c.mediaKeys=v,S.logger.log('Media-keys created for key-system "'+i+'"'),t._onMediaKeysCreated(),v});return y.catch(function(v){S.logger.error("Failed to create media-keys:",v)}),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,c=this._mediaKeysList[0];if(!c){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(c.mediaKeysSessionInitialized){S.logger.warn("Key-Session already initialized but requested again");return}var y=c.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'),c.mediaKeysSessionInitialized=!0,y.generateRequest(i,n).then(function(){S.logger.debug("Key-session generation succeeded")}).catch(function(v){S.logger.error("Error generating key-session request:",v),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 c=new XMLHttpRequest;c.responseType="arraybuffer",c.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,c,i,n,t);var y=this._licenseXhrSetup;if(y)try{y.call(this.hls,c,i),y=void 0}catch(v){S.logger.error(v)}try{c.readyState||c.open("POST",i,!0),y&&y.call(this.hls,c,i)}catch(v){throw new Error("issue setting up KeySystem license XHR "+v)}return c},s._onLicenseRequestReadyStageChange=function(i,n,t,c){switch(i.readyState){case 4:if(i.status===200){this._requestLicenseFailureCount=0,S.logger.log("License request succeeded");var y=i.response,v=this._licenseResponseCallback;if(v)try{y=v.call(this.hls,i,n)}catch(b){S.logger.error(b)}c(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,c)}break}},s._generateLicenseRequestChallenge=function(i,n){switch(i.mediaKeySystemDomain){case O.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 c=this.getLicenseServerUrl(t.mediaKeySystemDomain),y=this._createLicenseXhr(c,i,n);S.logger.log("Sending license request to URL: "+c);var v=this._generateLicenseRequestChallenge(t,i);y.send(v)}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}),c=n.levels.map(function(y){return y.videoCodec}).filter(function(y){return!!y});this._attemptKeySystemAccess(O.KeySystems.WIDEVINE,t,c)},l(u,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),u}();Z.default=a},"./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 O(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=O.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 a=h.media instanceof self.HTMLVideoElement?h.media:null;this.media=a,a&&typeof a.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 a=performance.now();if(h){if(this.lastTime){var u=a-this.lastTime,s=d-this.lastDroppedFrames,f=h-this.lastDecodedFrames,i=1e3*s/u,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=a,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)},O}();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 O}),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,a){if(d===null||!Array.isArray(h)||!h.length||!Object(w.isFiniteNumber)(d))return null;var u=h[0].programDateTime;if(d<(u||0))return null;var s=h[h.length-1].endProgramDateTime;if(d>=(s||0))return null;a=a||0;for(var f=0;f<h.length;++f){var i=h[f];if(l(d,a,i))return i}return null}function O(h,d,a,u){a===void 0&&(a=0),u===void 0&&(u=0);var s=null;if(h?s=d[h.sn-d[0].sn+1]||null:a===0&&d[0].start===0&&(s=d[0]),s&&T(a,u,s)===0)return s;var f=P.default.search(d,T.bind(null,a,u));return f||s}function T(h,d,a){h===void 0&&(h=0),d===void 0&&(d=0);var u=Math.min(d,a.duration+(a.deltaPTS?a.deltaPTS:0));return a.start+a.duration-u<=h?1:a.start-u>h&&a.start?-1:0}function l(h,d,a){var u=Math.min(d,a.duration+(a.deltaPTS?a.deltaPTS:0))*1e3,s=a.endProgramDateTime||0;return s-u>h}function p(h,d){return P.default.search(h,function(a){return a.cc<d?1:a.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 O});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 O=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 a=this.hls;a.on(w.Events.BUFFER_APPENDED,this.onBufferAppended,this),a.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.on(w.Events.FRAG_LOADED,this.onFragLoaded,this)},h._unregisterListeners=function(){var a=this.hls;a.off(w.Events.BUFFER_APPENDED,this.onBufferAppended,this),a.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.off(w.Events.FRAG_LOADED,this.onFragLoaded,this)},h.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},h.getAppendedFrag=function(a,u){if(u===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<=a&&t!==void 0&&a<=t)return i>9&&(this.activeParts=f.slice(i-9)),n}else if(s.start<=a&&s.appendedPTS!==void 0&&a<=s.appendedPTS)return s}return this.getBufferedFrag(a,u)},h.getBufferedFrag=function(a,u){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)===u&&n.buffered){var t=n.body;if(t.start<=a&&a<=t.end)return t}}return null},h.detectEvictedFragments=function(a,u,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[a];if(!t)return;t.time.some(function(c){var y=!f.isTimeBuffered(c.startPTS,c.endPTS,u);return y&&f.removeFragment(n.body),y})})},h.detectPartialFragments=function(a){var u=this,s=this.timeRanges,f=a.frag,i=a.part;if(!s||f.sn==="initSegment")return;var n=l(f),t=this.fragments[n];if(!t)return;Object.keys(s).forEach(function(c){var y=f.elementaryStreams[c];if(!y)return;var v=s[c],_=i!==null||y.partial===!0;t.range[c]=u.getBufferedTimes(f,i,_,v)}),t.backtrack=t.loaded=null,Object.keys(t.range).length?t.buffered=!0:this.removeFragment(t.body)},h.fragBuffered=function(a){var u=l(a),s=this.fragments[u];s&&(s.backtrack=s.loaded=null,s.buffered=!0)},h.getBufferedTimes=function(a,u,s,f){for(var i={time:[],partial:s},n=u?u.start:a.start,t=u?u.end:a.end,c=a.minEndPTS||t,y=a.maxStartPTS||n,v=0;v<f.length;v++){var _=f.start(v)-this.bufferPadding,b=f.end(v)+this.bufferPadding;if(y>=_&&c<=b){i.time.push({startPTS:Math.max(n,f.start(v)),endPTS:Math.min(t,f.end(v))});break}else if(n<b&&t>_)i.partial=!0,i.time.push({startPTS:Math.max(n,f.start(v)),endPTS:Math.min(t,f.end(v))});else if(t<=_)break}return i},h.getPartialFragment=function(a){var u=null,s,f,i,n=0,t=this.bufferPadding,c=this.fragments;return Object.keys(c).forEach(function(y){var v=c[y];if(!v)return;T(v)&&(f=v.body.start-t,i=v.body.end+t,a>=f&&a<=i&&(s=Math.min(a-f,i-a),n<=s&&(u=v.body,n=s)))}),u},h.getState=function(a){var u=l(a),s=this.fragments[u];return s?s.buffered?T(s)?S.PARTIAL:S.OK:s.backtrack?S.BACKTRACKED:S.APPENDING:S.NOT_LOADED},h.backtrack=function(a,u){var s=l(a),f=this.fragments[s];if(!f||f.backtrack)return null;var i=f.backtrack=u||f.loaded;return f.loaded=null,i},h.getBacktrackData=function(a){var u=l(a),s=this.fragments[u];if(s){var f,i=s.backtrack;if(i!=null&&(f=i.payload)!==null&&f!==void 0&&f.byteLength)return i;this.removeFragment(a)}return null},h.isTimeBuffered=function(a,u,s){for(var f,i,n=0;n<s.length;n++){if(f=s.start(n)-this.bufferPadding,i=s.end(n)+this.bufferPadding,a>=f&&u<=i)return!0;if(u<=f)return!1}return!1},h.onFragLoaded=function(a,u){var s=u.frag,f=u.part;if(s.sn==="initSegment"||s.bitrateTest||f)return;var i=l(s);this.fragments[i]={body:s,loaded:u,backtrack:null,buffered:!1,range:Object.create(null)}},h.onBufferAppended=function(a,u){var s=this,f=u.frag,i=u.part,n=u.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(c){var y=n[c];if(s.detectEvictedFragments(c,y),!i)for(var v=0;v<y.length;v++)f.appendedPTS=Math.max(y.end(v),f.appendedPTS||0)})},h.onFragBuffered=function(a,u){this.detectPartialFragments(u)},h.hasFragment=function(a){var u=l(a);return!!this.fragments[u]},h.removeFragmentsInRange=function(a,u,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<u&&t.end>a&&f.removeFragment(t)}})},h.removeFragment=function(a){var u=l(a);a.stats.loaded=0,a.clearElementaryStreamInfo(),delete this.fragments[u]},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"),O=U("./src/utils/logger.ts"),T=250,l=2,p=.1,h=.05,d=function(){function a(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 u=a.prototype;return u.destroy=function(){this.hls=this.fragmentTracker=this.media=null},u.poll=function(f){var i=this.config,n=this.media,t=this.stalled,c=n.currentTime,y=n.seeking,v=this.seeking&&!y,_=!this.seeking&&y;if(this.seeking=y,c!==f){if(this.moved=!0,t!==null){if(this.stallReported){var b=self.performance.now()-t;O.logger.warn("playback not stuck anymore @"+c+", after "+Math.round(b)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((_||v)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!w.BufferHelper.getBuffered(n).length)return;var m=w.BufferHelper.bufferInfo(n,c,0),g=m.len>0,E=m.nextStart||0;if(!g&&!E)return;if(y){var o=m.len>l,x=!E||E-c>l&&!this.fragmentTracker.getPartialFragment(c);if(o||x)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var C,A=Math.max(E,m.start||0)-c,D=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,I=D==null||((C=D.details)===null||C===void 0)?void 0:C.live,F=I?D.details.targetduration*2:l;if(A>0&&A<=F){this._trySkipBufferHole(null);return}}var H=self.performance.now();if(t===null){this.stalled=H;return}var te=H-t;!y&&te>=T&&this._reportStall(m.len);var j=w.BufferHelper.bufferInfo(n,c,i.maxBufferHole);this._tryFixBufferStall(j,te)},u._tryFixBufferStall=function(f,i){var n=this.config,t=this.fragmentTracker,c=this.media,y=c.currentTime,v=t.getPartialFragment(y);if(v){var _=this._trySkipBufferHole(v);if(_)return}f.len>n.maxBufferHole&&i>n.highBufferWatchdogPeriod*1e3&&(O.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},u._reportStall=function(f){var i=this.hls,n=this.media,t=this.stallReported;t||(this.stallReported=!0,O.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}))},u._trySkipBufferHole=function(f){for(var i=this.config,n=this.hls,t=this.media,c=t.currentTime,y=0,v=w.BufferHelper.getBuffered(t),_=0;_<v.length;_++){var b=v.start(_);if(c+i.maxBufferHole>=y&&c<b){var m=Math.max(b+h,t.currentTime+p);return O.logger.warn("skipping hole, adjusting currentTime from "+c+" to "+m),this.moved=!0,this.stalled=null,t.currentTime=m,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 "+c+" to "+m,frag:f}),m}y=v.end(_)}return 0},u._tryNudgeBuffer=function(){var f=this.config,i=this.hls,n=this.media,t=n.currentTime,c=(this.nudgeRetry||0)+1;if(this.nudgeRetry=c,c<f.nudgeMaxRetry){var y=t+c*f.nudgeOffset;O.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 O.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})},a}()},"./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"),O=.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,a){this.media=a.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 a=0;a<d.length;a++){var u=d[a];if(u.kind==="metadata"&&u.label==="id3")return Object(P.sendAddTrackEvent)(u,this.media),u}return this.media.addTextTrack("metadata","id3")},p.onFragParsingMetadata=function(d,a){if(!this.media)return;var u=a.frag,s=a.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,c=i<s.length-1?s[i+1].pts:u.end,y=c-t;y<=0&&(c=t+O);for(var v=0;v<n.length;v++){var _=n[v];if(!S.isTimeStampFrame(_)){var b=new f(t,c,"");b.value=_,this.id3Track.addCue(b)}}}}},p.onBufferFlushing=function(d,a){var u=a.startOffset,s=a.endOffset,f=a.type;if(!f||f==="audio"){var i=this.id3Track;i&&Object(P.removeCuesInRange)(i,u,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 O(p,h){for(var d=0;d<h.length;d++){var a=h[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}function T(p,h,d){return h&&O(p.prototype,h),d&&O(p,d),p}var l=function(){function p(d){var a=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 a.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(a,u){this.media=u.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(a,u){var s=u.details;this.levelDetails=s,s.advanced&&this.timeupdate(),!s.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},h.onError=function(a,u){if(u.details!==w.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,S.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},h.timeupdate=function(){var a=this.media,u=this.levelDetails;if(!a||!u)return;this.currentTime=a.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 c=s-t,y=Math.min(this.maxLatency,t+u.targetduration),v=c<y;if(u.live&&v&&c>.05&&this.forwardBufferLength>1){var _=Math.min(2,Math.max(1,n)),b=Math.round(2/(1+Math.exp(-.75*c-this.edgeStalled))*20)/20;a.playbackRate=Math.min(_,Math.max(1,b))}else a.playbackRate!==1&&a.playbackRate!==0&&(a.playbackRate=1)},h.estimateLiveEdge=function(){var a=this.levelDetails;return a===null?null:a.edge+a.age},h.computeLatency=function(){var a=this.estimateLiveEdge();return a===null?null:a-this.currentTime},T(p,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var a=this.config,u=this.levelDetails;return a.liveMaxLatencyDuration!==void 0?a.liveMaxLatencyDuration:u?a.liveMaxLatencyDurationCount*u.targetduration:0}},{key:"targetLatency",get:function(){var a=this.levelDetails;if(a===null)return null;var u=a.holdBack,s=a.partHoldBack,f=a.targetduration,i=this.config,n=i.liveSyncDuration,t=i.liveSyncDurationCount,c=i.lowLatencyMode,y=this.hls.userConfig,v=c&&s||u;(y.liveSyncDuration||y.liveSyncDurationCount||v===0)&&(v=n!==void 0?n:t*f);var _=f,b=1;return v+Math.min(this.stallCount*b,_)}},{key:"liveSyncPosition",get:function(){var a=this.estimateLiveEdge(),u=this.targetLatency,s=this.levelDetails;if(a===null||u===null||s===null)return null;var f=s.edge,i=a-u-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 a=this.levelDetails;return a===null?1:a.drift}},{key:"edgeStalled",get:function(){var a=this.levelDetails;if(a===null)return 0;var u=(this.config.lowLatencyMode&&a.partTarget||a.targetduration)*3;return Math.max(a.age-u,0)}},{key:"forwardBufferLength",get:function(){var a=this.media,u=this.levelDetails;if(!a||!u)return 0;var s=a.buffered.length;return s?a.buffered.end(s-1):u.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"),O=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 c=arguments[t];for(var y in c)Object.prototype.hasOwnProperty.call(c,y)&&(n[y]=c[y])}return n},h.apply(this,arguments)}function d(n,t){for(var c=0;c<t.length;c++){var y=t[c];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(n,y.key,y)}}function a(n,t,c){return t&&d(n.prototype,t),c&&d(n,c),n}function u(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,v){return y.__proto__=v,y},s(n,t)}var f=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),i=function(n){u(t,n);function t(y){var v;return v=n.call(this,y,"[level-controller]")||this,v._levels=[],v._firstLevel=-1,v._startLevel=void 0,v.currentLevelIndex=-1,v.manualLevelIndex=-1,v.onParsedComplete=void 0,v._registerListeners(),v}var c=t.prototype;return c._registerListeners=function(){var v=this.hls;v.on(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.on(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.on(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.on(P.Events.FRAG_LOADED,this.onFragLoaded,this),v.on(P.Events.ERROR,this.onError,this)},c._unregisterListeners=function(){var v=this.hls;v.off(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.off(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.off(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.off(P.Events.FRAG_LOADED,this.onFragLoaded,this),v.off(P.Events.ERROR,this.onError,this)},c.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},c.startLoad=function(){var v=this._levels;v.forEach(function(_){_.loadError=0}),n.prototype.startLoad.call(this)},c.onManifestLoaded=function(v,_){var b=[],m=[],g=[],E,o={},x,C=!1,A=!1,D=!1;if(_.levels.forEach(function(te){var j=te.attrs;C=C||!!(te.width&&te.height),A=A||!!te.videoCodec,D=D||!!te.audioCodec,f&&te.audioCodec&&te.audioCodec.indexOf("mp4a.40.34")!==-1&&(te.audioCodec=void 0);var G=te.bitrate+"-"+te.attrs.RESOLUTION+"-"+te.attrs.CODECS;x=o[G],x?x.url.push(te.url):(x=new w.Level(te),o[G]=x,b.push(x)),j&&(j.AUDIO&&Object(T.addGroupId)(x,"audio",j.AUDIO),j.SUBTITLES&&Object(T.addGroupId)(x,"text",j.SUBTITLES))}),(C||A)&&D&&(b=b.filter(function(te){var j=te.videoCodec,G=te.width,X=te.height;return!!j||!!(G&&X)})),b=b.filter(function(te){var j=te.audioCodec,G=te.videoCodec;return(!j||Object(O.isCodecSupportedInMp4)(j,"audio"))&&(!G||Object(O.isCodecSupportedInMp4)(G,"video"))}),_.audioTracks&&(m=_.audioTracks.filter(function(te){return!te.audioCodec||Object(O.isCodecSupportedInMp4)(te.audioCodec,"audio")}),Object(T.assignTrackIdsByGroup)(m)),_.subtitles&&(g=_.subtitles,Object(T.assignTrackIdsByGroup)(g)),b.length>0){E=b[0].bitrate,b.sort(function(te,j){return te.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,H={levels:b,audioTracks:m,subtitleTracks:g,firstLevel:this._firstLevel,stats:_.stats,audio:D,video:A,altAudio:!F&&m.some(function(te){return!!te.url})};this.hls.trigger(P.Events.MANIFEST_PARSED,H),(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"})},c.onError=function(v,_){if(n.prototype.onError.call(this,v,_),_.fatal)return;var b=_.context,m=this._levels[this.currentLevelIndex];if(b&&(b.type===p.PlaylistContextType.AUDIO_TRACK&&m.audioGroupIds&&b.groupId===m.audioGroupIds[m.urlId]||b.type===p.PlaylistContextType.SUBTITLE_TRACK&&m.textGroupIds&&b.groupId===m.textGroupIds[m.urlId])){this.redundantFailover(this.currentLevelIndex);return}var g=!1,E=!0,o;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&&(o=_.frag.level)):o=_.frag.level}break;case S.ErrorDetails.LEVEL_LOAD_ERROR:case S.ErrorDetails.LEVEL_LOAD_TIMEOUT:b&&(b.deliveryDirectives&&(E=!1),o=b.level),g=!0;break;case S.ErrorDetails.REMUX_ALLOC_ERROR:o=_.level,g=!0;break}o!==void 0&&this.recoverLevel(_,o,g,E)},c.recoverLevel=function(v,_,b,m){var g=v.details,E=this._levels[_];if(E.loadError++,b){var o=this.retryLoadingOrFail(v);if(o)v.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(m){var x=E.url.length;if(x>1&&E.loadError<x)v.levelRetry=!0,this.redundantFailover(_);else if(this.manualLevelIndex===-1){var C=_===0?this._levels.length-1:_-1;this.currentLevelIndex!==C&&this._levels[C].loadError===0&&(this.warn(g+": switch to "+C),v.levelRetry=!0,this.hls.nextAutoLevel=C)}}},c.redundantFailover=function(v){var _=this._levels[v],b=_.url.length;if(b>1){var m=(_.urlId+1)%b;this.warn("Switching to redundant URL-id "+m),this._levels.forEach(function(g){g.urlId=m}),this.level=v}},c.onFragLoaded=function(v,_){var b=_.frag;if(b!==void 0&&b.type===p.PlaylistLevelType.MAIN){var m=this._levels[b.level];m!==void 0&&(m.fragmentError=0,m.loadError=0)}},c.onLevelLoaded=function(v,_){var b,m=_.level,g=_.details,E=this._levels[m];if(!E){var o;this.warn("Invalid level index "+m),(o=_.deliveryDirectives)!==null&&o!==void 0&&o.skip&&(g.deltaUpdateFailed=!0);return}m===this.currentLevelIndex?(E.fragmentError===0&&(E.loadError=0,this.retryCount=0),this.playlistLoaded(m,_,E.details)):(b=_.deliveryDirectives)!==null&&b!==void 0&&b.skip&&(g.deltaUpdateFailed=!0)},c.onAudioTrackSwitched=function(v,_){var b=this.hls.levels[this.currentLevelIndex];if(!b)return;if(b.audioGroupIds){for(var m=-1,g=this.hls.audioTracks[_.id].groupId,E=0;E<b.audioGroupIds.length;E++)if(b.audioGroupIds[E]===g){m=E;break}m!==b.urlId&&(b.urlId=m,this.startLoad())}},c.loadPlaylist=function(v){var _=this.currentLevelIndex,b=this._levels[_];if(this.canLoad&&b&&b.url.length>0){var m=b.urlId,g=b.url[m];if(v)try{g=v.addDirectives(g)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Attempt loading level index "+_+(v?" at sn "+v.msn+" part "+v.part:"")+" with URL-id "+m+" "+g),this.clearTimer(),this.hls.trigger(P.Events.LEVEL_LOADING,{url:g,level:_,id:m,deliveryDirectives:v||null})}},c.removeLevel=function(v,_){var b=function(E,o){return o!==_},m=this._levels.filter(function(g,E){return E!==v?!0:g.url.length>1&&_!==void 0?(g.url=g.url.filter(b),g.audioGroupIds&&(g.audioGroupIds=g.audioGroupIds.filter(b)),g.textGroupIds&&(g.textGroupIds=g.textGroupIds.filter(b)),g.urlId=0,!0):!1}).map(function(g,E){var o=g.details;return o!=null&&o.fragments&&o.fragments.forEach(function(x){x.level=E}),g});this._levels=m,this.hls.trigger(P.Events.LEVELS_UPDATED,{levels:m})},a(t,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(v){var _,b=this._levels;if(b.length===0)return;if(this.currentLevelIndex===v&&(_=b[v])!==null&&_!==void 0&&_.details)return;if(v<0||v>=b.length){var m=v<0;if(this.hls.trigger(P.Events.ERROR,{type:S.ErrorTypes.OTHER_ERROR,details:S.ErrorDetails.LEVEL_SWITCH_ERROR,level:v,fatal:m,reason:"invalid level idx"}),m)return;v=Math.min(v,b.length-1)}this.clearTimer();var g=this.currentLevelIndex,E=b[g],o=b[v];this.log("switching to level "+v+" from "+g),this.currentLevelIndex=v;var x=h({},o,{level:v,maxBitrate:o.maxBitrate,uri:o.uri,urlId:o.urlId});delete x._urlId,this.hls.trigger(P.Events.LEVEL_SWITCHING,x);var C=o.details;if(!C||C.live){var A=this.switchParams(o.uri,E==null?void 0:E.details);this.loadPlaylist(A)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(v){this.manualLevelIndex=v,this._startLevel===void 0&&(this._startLevel=v),v!==-1&&(this.level=v)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(v){this._firstLevel=v}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var v=this.hls.config.startLevel;return v!==void 0?v:this._firstLevel}else return this._startLevel},set:function(v){this._startLevel=v}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(v){this.level=v,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=v)}}]),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 O}),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 a}),U.d(Z,"adjustSliding",function(){return u}),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,c,y){switch(c){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(y);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(y);break}}function O(t){var c={};t.forEach(function(y){var v=y.groupId||"";y.id=c[v]=c[v]||0,c[v]++})}function T(t,c,y){var v=t[c],_=t[y];l(v,_)}function l(t,c){var y=c.startPTS;if(Object(w.isFiniteNumber)(y)){var v=0,_;c.sn>t.sn?(v=y-t.start,_=t):(v=t.start-y,_=c),_.duration!==v&&(_.duration=v)}else if(c.sn>t.sn){var b=t.cc===c.cc;b&&t.minEndPTS?c.start=t.start+(t.minEndPTS-t.start):c.start=t.start+t.duration}else c.start=Math.max(t.start-c.duration,0)}function p(t,c,y,v,_,b){var m=v-y;m<=0&&(P.logger.warn("Fragment should have a positive duration",c),v=y+c.duration,b=_+c.duration);var g=y,E=v,o=c.startPTS,x=c.endPTS;if(Object(w.isFiniteNumber)(o)){var C=Math.abs(o-y);Object(w.isFiniteNumber)(c.deltaPTS)?c.deltaPTS=Math.max(C,c.deltaPTS):c.deltaPTS=C,g=Math.max(y,o),y=Math.min(y,o),_=Math.min(_,c.startDTS),E=Math.min(v,x),v=Math.max(v,x),b=Math.max(b,c.endDTS)}c.duration=v-y;var A=y-c.start;c.appendedPTS=v,c.start=c.startPTS=y,c.maxStartPTS=g,c.startDTS=_,c.endPTS=v,c.minEndPTS=E,c.endDTS=b;var D=c.sn;if(!t||D<t.startSN||D>t.endSN)return 0;var I,F=D-t.startSN,H=t.fragments;for(H[F]=c,I=F;I>0;I--)l(H[I],H[I-1]);for(I=F;I<H.length-1;I++)l(H[I],H[I+1]);return t.fragmentHint&&l(H[H.length-1],t.fragmentHint),t.PTSKnown=t.alignedSliding=!0,A}function h(t,c){for(var y=null,v=t.fragments,_=v.length-1;_>=0;_--){var b=v[_].initSegment;if(b){y=b;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var m=0,g;if(a(t,c,function(I,F){I.relurl&&(m=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&&(g=F),c.PTSKnown=c.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=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.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(c.skippedSegments&&(c.deltaUpdateFailed=c.fragments.some(function(I){return!I}),c.deltaUpdateFailed)){P.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var o=c.skippedSegments;o--;)c.fragments.shift();c.startSN=c.fragments[0].sn,c.startCC=c.fragments[0].cc}var x=c.fragments;if(m){P.logger.warn("discontinuity sliding from playlist, take drift into account");for(var C=0;C<x.length;C++)x[C].cc+=m}c.skippedSegments&&(c.startCC=c.fragments[0].cc),d(t.partList,c.partList,function(I,F){F.elementaryStreams=I.elementaryStreams,F.stats=I.stats}),g?p(c,g,g.startPTS,g.endPTS,g.startDTS,g.endDTS):u(t,c),x.length&&(c.totalduration=c.edge-x[0].start),c.driftStartTime=t.driftStartTime,c.driftStart=t.driftStart;var A=c.advancedDateTime;if(c.advanced&&A){var D=c.edge;c.driftStart||(c.driftStartTime=A,c.driftStart=D),c.driftEndTime=A,c.driftEnd=D}else c.driftEndTime=t.driftEndTime,c.driftEnd=t.driftEnd,c.advancedDateTime=t.advancedDateTime}function d(t,c,y){if(t&&c)for(var v=0,_=0,b=t.length;_<=b;_++){var m=t[_],g=c[_+v];m&&g&&m.index===g.index&&m.fragment.sn===g.fragment.sn?y(m,g):v--}}function a(t,c,y){for(var v=c.skippedSegments,_=Math.max(t.startSN,c.startSN)-c.startSN,b=(t.fragmentHint?1:0)+(v?c.endSN:Math.min(t.endSN,c.endSN))-c.startSN,m=c.startSN-t.startSN,g=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments,E=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,o=_;o<=b;o++){var x=E[m+o],C=g[o];v&&!C&&o<v&&(C=c.fragments[o]=x),x&&C&&y(x,C)}}function u(t,c){var y=c.startSN+c.skippedSegments-t.startSN,v=t.fragments;if(y<0||y>=v.length)return;s(c,v[y].start)}function s(t,c){if(c){for(var y=t.fragments,v=t.skippedSegments;v<y.length;v++)y[v].start+=c;t.fragmentHint&&(t.fragmentHint.start+=c)}}function f(t,c){var y=1e3*t.levelTargetDuration,v=y/2,_=t.age,b=_>0&&_<y*3,m=c.loading.end-c.loading.start,g,E=t.availabilityDelay;if(t.updated===!1)if(b){var o=333*t.misses;g=Math.max(Math.min(v,m*2),o),t.availabilityDelay=(t.availabilityDelay||0)+g}else g=v;else b?(E=Math.min(E||y/2,_),t.availabilityDelay=E,g=E+y-_):g=y-m;return Math.round(g)}function i(t,c,y){if(!t||!t.details)return null;var v=t.details,_=v.fragments[c-v.startSN];return _||(_=v.fragmentHint,_&&_.sn===c?_:c<v.startSN&&y&&y.sn===c?y:null)}function n(t,c,y){if(!t||!t.details)return null;var v=t.details.partList;if(v)for(var _=v.length;_--;){var b=v[_];if(b.index===y&&b.fragment.sn===c)return b}return null}},"./src/controller/stream-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return v});var w=U("./src/polyfills/number.ts"),P=U("./src/controller/base-stream-controller.ts"),S=U("./src/is-supported.ts"),O=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"),a=U("./src/types/transmuxer.ts"),u=U("./src/controller/gap-controller.ts"),s=U("./src/errors.ts"),f=U("./src/utils/logger.ts");function i(_,b){for(var m=0;m<b.length;m++){var g=b[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(_,g.key,g)}}function n(_,b,m){return b&&i(_.prototype,b),m&&i(_,m),_}function t(_,b){_.prototype=Object.create(b.prototype),_.prototype.constructor=_,c(_,b)}function c(_,b){return c=Object.setPrototypeOf||function(g,E){return g.__proto__=E,g},c(_,b)}var y=100,v=function(_){t(b,_);function b(g,E){var o;return o=_.call(this,g,E,"[stream-controller]")||this,o.audioCodecSwap=!1,o.gapController=null,o.level=-1,o._forceStartLoad=!1,o.altAudio=!1,o.audioOnly=!1,o.fragPlaying=null,o.onvplaying=null,o.onvseeked=null,o.fragLastKbps=0,o.stalled=!1,o.couldBacktrack=!1,o.audioCodecSwitch=!1,o.videoBuffer=null,o._registerListeners(),o}var m=b.prototype;return m._registerListeners=function(){var E=this.hls;E.on(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(O.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.on(O.Events.LEVEL_LOADING,this.onLevelLoading,this),E.on(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(O.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.on(O.Events.ERROR,this.onError,this),E.on(O.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.on(O.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.on(O.Events.BUFFER_CREATED,this.onBufferCreated,this),E.on(O.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.on(O.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.on(O.Events.FRAG_BUFFERED,this.onFragBuffered,this)},m._unregisterListeners=function(){var E=this.hls;E.off(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(O.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.off(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(O.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.off(O.Events.ERROR,this.onError,this),E.off(O.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.off(O.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.off(O.Events.BUFFER_CREATED,this.onBufferCreated,this),E.off(O.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.off(O.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.off(O.Events.FRAG_BUFFERED,this.onFragBuffered,this)},m.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},m.startLoad=function(E){if(this.levels){var o=this.lastCurrentTime,x=this.hls;if(this.stopLoad(),this.setInterval(y),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var C=x.startLevel;C===-1&&(x.config.testBandwidth?(C=0,this.bitrateTest=!0):C=x.nextAutoLevel),this.level=x.nextLoadLevel=C,this.loadedmetadata=!1}o>0&&E===-1&&(this.log("Override startPosition with lastCurrentTime @"+o.toFixed(3)),E=o),this.state=P.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()}else this._forceStartLoad=!0,this.state=P.State.STOPPED},m.stopLoad=function(){this._forceStartLoad=!1,_.prototype.stopLoad.call(this)},m.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_LEVEL:{var E,o=this.levels,x=this.level,C=o==null||((E=o[x])===null||E===void 0)?void 0:E.details;if(C&&(!C.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(C))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()},m.onTickEnd=function(){_.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},m.doTickIdle=function(){var E,o,x=this.hls,C=this.levelLastLoaded,A=this.levels,D=this.media,I=x.config,F=x.nextLoadLevel;if(C===null||!D&&(this.startFragRequested||!I.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!A||!A[F])return;var H=A[F];this.level=x.nextLoadLevel=F;var te=H.details;if(!te||this.state===P.State.WAITING_LEVEL||te.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(H.maxBitrate);if(G>=X)return;if(this._streamEnded(j,te)){var J={};this.altAudio&&(J.type="video"),this.hls.trigger(O.Events.BUFFER_EOS,J),this.state=P.State.ENDED;return}var B=j.end,Q=this.getNextFragment(B,te);if(this.couldBacktrack&&!this.fragPrevious&&Q&&Q.sn!=="initSegment"){var ie=Q.sn-te.startSN;ie>1&&(Q=te.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,te)}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"&&!((o=Q.decryptdata)!==null&&o!==void 0&&o.key)?this.loadKey(Q,te):this.loadFragment(Q,te,B)},m.loadFragment=function(E,o,x){var C,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,o,x)):A===l.FragmentState.APPENDING?this.reduceMaxBufferLength(E.duration)&&this.fragmentTracker.removeFragment(E):((C=this.media)===null||C===void 0?void 0:C.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},m.getAppendedFrag=function(E){var o=this.fragmentTracker.getAppendedFrag(E,p.PlaylistLevelType.MAIN);return o&&"fragment"in o?o.fragment:o},m.getBufferedFrag=function(E){return this.fragmentTracker.getBufferedFrag(E,p.PlaylistLevelType.MAIN)},m.followingBufferedFrag=function(E){return E?this.getBufferedFrag(E.end+.5):null},m.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},m.nextLevelSwitch=function(){var E=this.levels,o=this.media;if(o!=null&&o.readyState){var x,C=this.getAppendedFrag(o.currentTime);if(C&&C.start>1&&this.flushMainBuffer(0,C.start-1),!o.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(o.currentTime+x);if(F){var H=this.followingBufferedFrag(F);if(H){this.abortCurrentFrag();var te=H.maxStartPTS?H.maxStartPTS:H.start,j=H.duration,G=Math.max(F.end,te+Math.min(Math.max(j-this.config.maxFragLookUpTolerance,j*.5),j*.75));this.flushMainBuffer(G,Number.POSITIVE_INFINITY)}}}},m.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()},m.flushMainBuffer=function(E,o){_.prototype.flushMainBuffer.call(this,E,o,this.altAudio?"video":null)},m.onMediaAttached=function(E,o){_.prototype.onMediaAttached.call(this,E,o);var x=o.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 u.default(this.config,x,this.fragmentTracker,this.hls)},m.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)},m.onMediaPlaying=function(){this.tick()},m.onMediaSeeked=function(){var E=this.media,o=E?E.currentTime:null;Object(w.isFiniteNumber)(o)&&this.log("Media seeked to "+o.toFixed(3)),this.tick()},m.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(O.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},m.onManifestParsed=function(E,o){var x=!1,C=!1,A;o.levels.forEach(function(D){A=D.audioCodec,A&&(A.indexOf("mp4a.40.2")!==-1&&(x=!0),A.indexOf("mp4a.40.5")!==-1&&(C=!0))}),this.audioCodecSwitch=x&&C&&!Object(S.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=o.levels,this.startFragRequested=!1},m.onLevelLoading=function(E,o){var x=this.levels;if(!x||this.state!==P.State.IDLE)return;var C=x[o.level];(!C.details||C.details.live&&this.levelLastLoaded!==o.level||this.waitForCdnTuneIn(C.details))&&(this.state=P.State.WAITING_LEVEL)},m.onLevelLoaded=function(E,o){var x,C=this.levels,A=o.level,D=o.details,I=D.totalduration;if(!C){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!==o.level&&F.loader&&(this.state=P.State.IDLE,F.loader.abort()));var H=C[A],te=0;if(D.live||(x=H.details)!==null&&x!==void 0&&x.live){if(D.fragments[0]||(D.deltaUpdateFailed=!0),D.deltaUpdateFailed)return;te=this.alignPlaylists(D,H.details)}if(H.details=D,this.levelLastLoaded=A,this.hls.trigger(O.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,te),this.tick()},m._handleFragmentLoadProgress=function(E){var o,x=E.frag,C=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 H=I.videoCodec,te=F.PTSKnown||!F.live,j=(o=x.initSegment)===null||o===void 0?void 0:o.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=C?C.index:-1,B=J!==-1,Q=new a.ChunkMetadata(x.level,x.sn,x.stats.chunkCount,A.byteLength,J,B),ie=this.initPTS[x.cc];X.push(A,j,G,H,x,C,F.totalduration,te,Q,ie)},m.onAudioTrackSwitching=function(E,o){var x=this.altAudio,C=!!o.url,A=o.id;if(!C){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var 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(O.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),I.trigger(O.Events.AUDIO_TRACK_SWITCHED,{id:A})}},m.onAudioTrackSwitched=function(E,o){var x=o.id,C=!!this.hls.audioTracks[x].url;if(C){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=C,this.tick()},m.onBufferCreated=function(E,o){var x=o.tracks,C,A,D=!1;for(var I in x){var F=x[I];if(F.id==="main"){if(A=I,C=F,I==="video"){var H=x[I];H&&(this.videoBuffer=H.buffer)}}else D=!0}D&&C?(this.log("Alternate track found, use "+A+".buffered to schedule main fragment loading"),this.mediaBuffer=C.buffer):this.mediaBuffer=this.media},m.onFragBuffered=function(E,o){var x=o.frag,C=o.part;if(x&&x.type!==p.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(x)){this.warn("Fragment "+x.sn+(C?" p: "+C.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=C?C.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,C)},m.onError=function(E,o){switch(o.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,o);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==P.State.ERROR&&(o.fatal?(this.warn(""+o.details),this.state=P.State.ERROR):!o.levelRetry&&this.state===P.State.WAITING_LEVEL&&(this.state=P.State.IDLE));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(o.parent==="main"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var x=!0,C=this.getFwdBufferInfo(this.media,p.PlaylistLevelType.MAIN);C&&C.len>.5&&(x=!this.reduceMaxBufferLength(C.len)),x&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},m.checkBuffer=function(){var E=this.media,o=this.gapController;if(!E||!o||!E.readyState)return;var x=T.BufferHelper.getBuffered(E);!this.loadedmetadata&&x.length?(this.loadedmetadata=!0,this.seekToStartPos()):o.poll(this.lastCurrentTime),this.lastCurrentTime=E.currentTime},m.onFragLoadEmergencyAborted=function(){this.state=P.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},m.onBufferFlushed=function(E,o){var x=o.type;if(x!==h.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var C=(x===h.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(C,x,p.PlaylistLevelType.MAIN)}},m.onLevelsUpdated=function(E,o){this.levels=o.levels},m.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},m.seekToStartPos=function(){var E=this.media,o=E.currentTime,x=this.startPosition;if(x>=0&&o<x){if(E.seeking){f.logger.log("could not seek to "+x+", already seeking at "+o);return}var C=T.BufferHelper.getBuffered(E),A=C.length?C.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 "+o),E.currentTime=x}},m._getAudioCodec=function(E){var o=this.config.defaultAudioCodec||E.audioCodec;return this.audioCodecSwap&&o&&(this.log("Swapping audio codec"),o.indexOf("mp4a.40.5")!==-1?o="mp4a.40.2":o="mp4a.40.5"),o},m._loadBitrateTestFrag=function(E){var o=this;this._doFragLoad(E).then(function(x){var C=o.hls;if(!x||C.nextLoadLevel||o.fragContextChanged(E))return;o.fragLoadError=0,o.state=P.State.IDLE,o.startFragRequested=!1,o.bitrateTest=!1;var A=E.stats;A.parsing.start=A.parsing.end=A.buffering.start=A.buffering.end=self.performance.now(),C.trigger(O.Events.FRAG_LOADED,x)})},m._handleTransmuxComplete=function(E){var o,x="main",C=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,H=I.part,te=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(te,J.tracks,F,D),C.trigger(O.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,C.trigger(O.Events.INIT_PTS_FOUND,{frag:F,id:x,initPTS:Q,timescale:ie}))}if(j&&A.independent!==!1){if(te.details){var oe=j.startPTS,Ee=j.endPTS,ye=j.startDTS,Le=j.endDTS;if(H)H.elementaryStreams[j.type]={startPTS:oe,endPTS:Ee,startDTS:ye,endDTS:Le};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,Ee,F.start,Le,!0)}F.setElementaryStreamInfo(j.type,oe,Ee,ye,Le),this.bufferFragmentData(j,F,H,D)}}else if(A.independent===!1){this.backtrack(F);return}if(B){var Ce=B.startPTS,Be=B.endPTS,Pe=B.startDTS,ke=B.endDTS;H&&(H.elementaryStreams[h.ElementaryStreamTypes.AUDIO]={startPTS:Ce,endPTS:Be,startDTS:Pe,endDTS:ke}),F.setElementaryStreamInfo(h.ElementaryStreamTypes.AUDIO,Ce,Be,Pe,ke),this.bufferFragmentData(B,F,H,D)}if(X!=null&&(o=X.samples)!==null&&o!==void 0&&o.length){var Ne={frag:F,id:x,samples:X.samples};C.trigger(O.Events.FRAG_PARSING_METADATA,Ne)}if(G){var he={frag:F,id:x,samples:G.samples};C.trigger(O.Events.FRAG_PARSING_USERDATA,he)}},m._bufferInitSegment=function(E,o,x,C){var A=this;if(this.state!==P.State.PARSING)return;this.audioOnly=!!o.audio&&!o.video,this.altAudio&&!this.audioOnly&&delete o.audio;var D=o.audio,I=o.video,F=o.audiovideo;if(D){var H=E.audioCodec,te=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(H&&(H.indexOf("mp4a.40.5")!==-1?H="mp4a.40.2":H="mp4a.40.5"),D.metadata.channelCount!==1&&te.indexOf("firefox")===-1&&(H="mp4a.40.5")),te.indexOf("android")!==-1&&D.container!=="audio/mpeg"&&(H="mp4a.40.2",this.log("Android: force audio codec to "+H)),E.audioCodec&&E.audioCodec!==H&&this.log('Swapping manifest audio codec "'+E.audioCodec+'" for "'+H+'"'),D.levelCodec=H,D.id="main",this.log("Init audio buffer, container:"+D.container+", codecs[selected/level/parsed]=["+(H||"")+"/"+(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(O.Events.BUFFER_CODECS,o),Object.keys(o).forEach(function(j){var G=o[j],X=G.initSegment;X!=null&&X.byteLength&&A.hls.trigger(O.Events.BUFFER_APPENDING,{type:j,data:X,frag:x,part:null,chunkMeta:C,parent:x.type})}),this.tick()},m.backtrack=function(E){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(E);var o=this.fragmentTracker.backtrack(E);this.fragPrevious=null,this.nextLoadPosition=E.start,o?this.resetFragmentLoading(E):this.state=P.State.BACKTRACKING},m.checkFragmentChanged=function(){var E=this.media,o=null;if(E&&E.readyState>1&&E.seeking===!1){var x=E.currentTime;if(T.BufferHelper.isBuffered(E,x)?o=this.getAppendedFrag(x):T.BufferHelper.isBuffered(E,x+.1)&&(o=this.getAppendedFrag(x+.1)),o){var C=this.fragPlaying,A=o.level;(!C||o.sn!==C.sn||C.level!==A||o.urlId!==C.urlId)&&(this.hls.trigger(O.Events.FRAG_CHANGED,{frag:o}),(!C||C.level!==A)&&this.hls.trigger(O.Events.LEVEL_SWITCHED,{level:A}),this.fragPlaying=o)}}},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 o=this.getAppendedFrag(E.currentTime);if(o)return o.level}return-1}},{key:"nextBufferedFrag",get:function(){var E=this.media;if(E){var o=this.getAppendedFrag(E.currentTime);return this.followingBufferedFrag(o)}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"),O=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"),a=U("./src/types/level.ts");function u(c,y){for(var v=0;v<y.length;v++){var _=y[v];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(c,_.key,_)}}function s(c,y,v){return y&&u(c.prototype,y),v&&u(c,v),c}function f(c,y){c.prototype=Object.create(y.prototype),c.prototype.constructor=c,i(c,y)}function i(c,y){return i=Object.setPrototypeOf||function(_,b){return _.__proto__=b,_},i(c,y)}var n=500,t=function(c){f(y,c);function y(_,b){var m;return m=c.call(this,_,b,"[subtitle-stream-controller]")||this,m.levels=[],m.currentTrackId=-1,m.tracksBuffered=[],m.mainDetails=null,m._registerListeners(),m}var v=y.prototype;return v.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},v._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)},v._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)},v.startLoad=function(){this.stopLoad(),this.state=h.State.IDLE,this.setInterval(n),this.tick()},v.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},v.onLevelLoaded=function(b,m){this.mainDetails=m.details},v.onSubtitleFragProcessed=function(b,m){var g=m.frag,E=m.success;if(this.fragPrevious=g,this.state=h.State.IDLE,!E)return;var o=this.tracksBuffered[this.currentTrackId];if(!o)return;for(var x,C=g.start,A=0;A<o.length;A++)if(C>=o[A].start&&C<=o[A].end){x=o[A];break}var D=g.start+g.duration;x?x.end=D:(x={start:C,end:D},o.push(x)),this.fragmentTracker.fragBuffered(g)},v.onBufferFlushing=function(b,m){var g=m.startOffset,E=m.endOffset;if(g===0&&E!==Number.POSITIVE_INFINITY){var o=this.currentTrackId,x=this.levels;if(!x.length||!x[o]||!x[o].details)return;var C=x[o].details,A=C.targetduration,D=E-A;if(D<=0)return;m.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(g,D,d.PlaylistLevelType.SUBTITLE)}},v.onError=function(b,m){var g,E=m.frag;if(!E||E.type!==d.PlaylistLevelType.SUBTITLE)return;(g=this.fragCurrent)!==null&&g!==void 0&&g.loader&&this.fragCurrent.loader.abort(),this.state=h.State.IDLE},v.onSubtitleTracksUpdated=function(b,m){var g=this,E=m.subtitleTracks;this.tracksBuffered=[],this.levels=E.map(function(o){return new a.Level(o)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(o){g.tracksBuffered[o.id]=[]}),this.mediaBuffer=null},v.onSubtitleTrackSwitch=function(b,m){if(this.currentTrackId=m.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var g=this.levels[this.currentTrackId];g!=null&&g.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,g&&this.setInterval(n)},v.onSubtitleTrackLoaded=function(b,m){var g,E=m.details,o=m.id,x=this.currentTrackId,C=this.levels;if(!C.length)return;var A=C[x];if(o>=C.length||o!==x||!A)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,E.live||(g=A.details)!==null&&g!==void 0&&g.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=o,this.tick(),E.live&&!this.fragCurrent&&this.media&&this.state===h.State.IDLE){var H=Object(O.findFragmentByPTS)(null,E.fragments,this.media.currentTime,0);H||(this.warn("Subtitle playlist not aligned with playback"),A.details=void 0)}},v._handleFragmentLoadComplete=function(b){var m=b.frag,g=b.payload,E=m.decryptdata,o=this.hls;if(this.fragContextChanged(m))return;if(g&&g.byteLength>0&&E&&E.key&&E.iv&&E.method==="AES-128"){var x=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(g),E.key.buffer,E.iv.buffer).then(function(C){var A=performance.now();o.trigger(w.Events.FRAG_DECRYPTED,{frag:m,payload:C,stats:{tstart:x,tdecrypt:A}})})}},v.doTick=function(){if(!this.media){this.state=h.State.IDLE;return}if(this.state===h.State.IDLE){var b,m=this.currentTrackId,g=this.levels;if(!g.length||!g[m]||!g[m].details)return;var E=g[m].details,o=E.targetduration,x=this.config,C=this.media,A=S.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,C.currentTime-o,x.maxBufferHole),D=A.end,I=A.len,F=this.getMaxBufferLength()+o;if(I>F)return;console.assert(E,"Subtitle track details are defined on idle subtitle stream controller tick");var H=E.fragments,te=H.length,j=E.edge,G,X=this.fragPrevious;if(D<j){var J=x.maxFragLookUpTolerance;X&&E.hasProgramDateTime&&(G=Object(O.findFragmentByPDT)(H,X.endProgramDateTime,J)),G||(G=Object(O.findFragmentByPTS)(X,H,D,J),!G&&X&&X.start<H[0].start&&(G=H[0]))}else G=H[te-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)}},v.loadFragment=function(b,m,g){this.fragCurrent=b,c.prototype.loadFragment.call(this,b,m,g)},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"),O=U("./src/types/loader.ts");function T(u,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(u,i.key,i)}}function l(u,s,f){return s&&T(u.prototype,s),f&&T(u,f),u}function p(u,s){u.prototype=Object.create(s.prototype),u.prototype.constructor=u,h(u,s)}function h(u,s){return h=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},h(u,s)}var d=function(u){p(s,u);function s(i){var n;return n=u.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,u.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=a(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 c=t.id,y=t.details,v=this.trackId,_=this.tracksInGroup[v];if(!_){this.warn("Invalid subtitle track id "+c);return}var b=_.details;_.details=t.details,this.log("subtitle track "+c+" loaded ["+y.startSN+"-"+y.endSN+"]"),c===this.trackId&&(this.retryCount=0,this.playlistLoaded(c,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 c=t.textGroupIds[t.urlId];if(this.groupId!==c){var y=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,v=this.tracks.filter(function(m){return!c||m.groupId===c});this.tracksInGroup=v;var _=this.findTrackId(y==null?void 0:y.name)||this.findTrackId();this.groupId=c;var b={subtitleTracks:v};this.log("Updating subtitle tracks, "+v.length+' track(s) found in "'+c+'" group-id'),this.hls.trigger(w.Events.SUBTITLE_TRACKS_UPDATED,b),_!==-1&&this.setSubtitleTrack(_,y)}},f.findTrackId=function(n){for(var t=this.tracksInGroup,c=0;c<t.length;c++){var y=t[c];if((!this.selectDefaultTrack||y.default)&&(!n||n===y.name))return y.id}return-1},f.onError=function(n,t){if(u.prototype.onError.call(this,n,t),t.fatal||!t.context)return;t.context.type===O.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 c=t.id,y=t.groupId,v=t.url;if(n)try{v=n.addDirectives(v)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("Loading subtitle playlist for id "+c),this.hls.trigger(w.Events.SUBTITLE_TRACK_LOADING,{url:v,id:c,groupId:y,deliveryDirectives:n||null})}},f.toggleTrackModes=function(n){var t=this,c=this.media,y=this.subtitleDisplay,v=this.trackId;if(!c)return;var _=a(c.textTracks),b=_.filter(function(E){return E.groupId===t.groupId});if(n===-1)[].slice.call(_).forEach(function(E){E.mode="disabled"});else{var m=b[v];m&&(m.mode="disabled")}var g=b[n];g&&(g.mode=y?"showing":"hidden")},f.setSubtitleTrack=function(n,t){var c,y=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(c=y[n])!==null&&c!==void 0&&c.details)||n<-1||n>=y.length)return;this.clearTimer();var v=y[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,v){var _=v.id,b=v.groupId,m=b===void 0?"":b,g=v.name,E=v.type,o=v.url;this.hls.trigger(w.Events.SUBTITLE_TRACK_SWITCH,{id:_,groupId:m,name:g,type:E,url:o});var x=this.switchParams(v.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=a(this.media.textTracks),c=0;c<t.length;c++)if(t[c].mode==="hidden")n=c;else if(t[c].mode==="showing"){n=c;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 a(u){for(var s=[],f=0;f<u.length;f++){var i=u[f];i.kind==="subtitles"&&i.label&&s.push(u[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 a});var w=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),S=U("./src/utils/cea-608-parser.ts"),O=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"),a=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 c=new O.default(this,"textTrack1"),y=new O.default(this,"textTrack2"),v=new O.default(this,"textTrack3"),_=new O.default(this,"textTrack4");this.cea608Parser1=new S.default(1,c,y),this.cea608Parser2=new S.default(3,v,_)}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 c=this.hls;c.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),c.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),c.off(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),c.off(P.Events.FRAG_LOADING,this.onFragLoading,this),c.off(P.Events.FRAG_LOADED,this.onFragLoaded,this),c.off(P.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),c.off(P.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),c.off(P.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),c.off(P.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),c.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(c,y,v,_,b){for(var m=!1,g=b.length;g--;){var E=b[g],o=s(E[0],E[1],y,v);if(o>=0&&(E[0]=Math.min(E[0],y),E[1]=Math.max(E[1],v),m=!0,o/(v-y)>.5))return}if(m||b.push([y,v]),this.config.renderTextTracksNatively){var x=this.captionsTracks[c];this.Cues.newCue(x,y,v,_)}else{var C=this.Cues.newCue(null,y,v,_);this.hls.trigger(P.Events.CUES_PARSED,{type:"captions",cues:C,track:c})}},n.onInitPtsFound=function(c,y){var v=this,_=y.frag,b=y.id,m=y.initPTS,g=y.timescale,E=this.unparsedVttFrags;b==="main"&&(this.initPTS[_.cc]=m,this.timescale[_.cc]=g),E.length&&(this.unparsedVttFrags=[],E.forEach(function(o){v.onFragLoaded(P.Events.FRAG_LOADED,o)}))},n.getExistingTrack=function(c){var y=this.media;if(y)for(var v=0;v<y.textTracks.length;v++){var _=y.textTracks[v];if(_[c])return _}return null},n.createCaptionsTrack=function(c){this.config.renderTextTracksNatively?this.createNativeTrack(c):this.createNonNativeTrack(c)},n.createNativeTrack=function(c){if(this.captionsTracks[c])return;var y=this.captionsProperties,v=this.captionsTracks,_=this.media,b=y[c],m=b.label,g=b.languageCode,E=this.getExistingTrack(c);if(E)v[c]=E,Object(l.clearCurrentCues)(v[c]),Object(l.sendAddTrackEvent)(v[c],_);else{var o=this.createTextTrack("captions",m,g);o&&(o[c]=!0,v[c]=o)}},n.createNonNativeTrack=function(c){if(this.nonNativeCaptionsTracks[c])return;var y=this.captionsProperties[c];if(!y)return;var v=y.label,_={_id:c,label:v,kind:"captions",default:y.media?!!y.media.default:!1,closedCaptions:y.media};this.nonNativeCaptionsTracks[c]=_,this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[_]})},n.createTextTrack=function(c,y,v){var _=this.media;return _?_.addTextTrack(c,y,v):void 0},n.onMediaAttaching=function(c,y){this.media=y.media,this._cleanTracks()},n.onMediaDetaching=function(){var c=this.captionsTracks;Object.keys(c).forEach(function(y){Object(l.clearCurrentCues)(c[y]),delete c[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 c=this.media;if(!c)return;var y=c.textTracks;if(y)for(var v=0;v<y.length;v++)Object(l.clearCurrentCues)(y[v])},n.onSubtitleTracksUpdated=function(c,y){var v=this;this.textTracks=[];var _=y.subtitleTracks||[],b=_.some(function(o){return o.textCodec===p.IMSC1_CODEC});if(this.config.enableWebVTT||b&&this.config.enableIMSC1){var m=this.tracks&&_&&this.tracks.length===_.length;if(this.tracks=_||[],this.config.renderTextTracksNatively){var g=this.media?this.media.textTracks:[];this.tracks.forEach(function(o,x){var C;if(x<g.length){for(var A=null,D=0;D<g.length;D++)if(u(g[D],o)){A=g[D];break}A&&(C=A)}C?Object(l.clearCurrentCues)(C):(C=v.createTextTrack("subtitles",o.name,o.lang),C&&(C.mode="disabled")),C&&(C.groupId=o.groupId,v.textTracks.push(C))})}else if(!m&&this.tracks&&this.tracks.length){var E=this.tracks.map(function(o){return{label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}});this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:E})}}},n.onManifestLoaded=function(c,y){var v=this;this.config.enableCEA708Captions&&y.captions&&y.captions.forEach(function(_){var b=/(?:CC|SERVICE)([1-4])/.exec(_.instreamId);if(!b)return;var m="textTrack"+b[1],g=v.captionsProperties[m];if(!g)return;g.label=_.name,_.lang&&(g.languageCode=_.lang),g.media=_})},n.onFragLoading=function(c,y){var v=this.cea608Parser1,_=this.cea608Parser2,b=this.lastSn,m=this.lastPartIndex;if(!this.enabled||!(v&&_))return;if(y.frag.type===h.PlaylistLevelType.MAIN){var g,E,o=y.frag.sn,x=(g=y==null||((E=y.part)===null||E===void 0)?void 0:E.index)!=null?g:-1;o===b+1||o===b&&x===m+1||(v.reset(),_.reset()),this.lastSn=o,this.lastPartIndex=x}},n.onFragLoaded=function(c,y){var v=y.frag,_=y.payload,b=this.initPTS,m=this.unparsedVttFrags;if(v.type===h.PlaylistLevelType.SUBTITLE)if(_.byteLength){if(!Object(w.isFiniteNumber)(b[v.cc])){m.push(y),b.length&&this.hls.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Missing initial subtitle PTS")});return}var g=v.decryptdata;if(g==null||g.key==null||g.method!=="AES-128"){var E=this.tracks[v.level],o=this.vttCCs;o[v.cc]||(o[v.cc]={start:v.start,prevCC:this.prevCC,new:!0},this.prevCC=v.cc),E&&E.textCodec===p.IMSC1_CODEC?this._parseIMSC1(v,_):this._parseVTTs(v,_,o)}}else this.hls.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(c,y){var v=this,_=this.hls;Object(p.parseIMSC1)(y,this.initPTS[c.cc],this.timescale[c.cc],function(b){v._appendCues(b,c.level),_.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:c})},function(b){d.logger.log("Failed to parse IMSC1: "+b),_.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:c,error:b})})},n._parseVTTs=function(c,y,v){var _=this,b=this.hls;Object(T.parseWebVTT)(y,this.initPTS[c.cc],this.timescale[c.cc],v,c.cc,c.start,function(m){_._appendCues(m,c.level),b.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:c})},function(m){_._fallbackToIMSC1(c,y),d.logger.log("Failed to parse VTT cue: "+m),b.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:c,error:m})})},n._fallbackToIMSC1=function(c,y){var v=this,_=this.tracks[c.level];_.textCodec||Object(p.parseIMSC1)(y,this.initPTS[c.cc],this.timescale[c.cc],function(){_.textCodec=p.IMSC1_CODEC,v._parseIMSC1(c,y)},function(){_.textCodec="wvtt"})},n._appendCues=function(c,y){var v=this.hls;if(this.config.renderTextTracksNatively){var _=this.textTracks[y];if(_.mode==="disabled")return;c.forEach(function(g){return Object(l.addCueToTrack)(_,g)})}else{var b=this.tracks[y],m=b.default?"default":"subtitles"+y;v.trigger(P.Events.CUES_PARSED,{type:"subtitles",cues:c,track:m})}},n.onFragDecrypted=function(c,y){var v=y.frag;if(v.type===h.PlaylistLevelType.SUBTITLE){if(!Object(w.isFiniteNumber)(this.initPTS[v.cc])){this.unparsedVttFrags.push(y);return}this.onFragLoaded(P.Events.FRAG_LOADED,y)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(c,y){var v=this.cea608Parser1,_=this.cea608Parser2;if(!this.enabled||!(v&&_))return;for(var b=0;b<y.samples.length;b++){var m=y.samples[b].bytes;if(m){var g=this.extractCea608Data(m);v.addData(y.samples[b].pts,g[0]),_.addData(y.samples[b].pts,g[1])}}},n.onBufferFlushing=function(c,y){var v=y.startOffset,_=y.endOffset,b=y.endOffsetSubtitles,m=y.type,g=this.media;if(!g||g.currentTime<_)return;if(!m||m==="video"){var E=this.captionsTracks;Object.keys(E).forEach(function(x){return Object(l.removeCuesInRange)(E[x],v,_)})}if(this.config.renderTextTracksNatively&&(v===0&&b!==void 0)){var o=this.textTracks;Object.keys(o).forEach(function(x){return Object(l.removeCuesInRange)(o[x],v,b)})}},n.extractCea608Data=function(c){for(var y=c[0]&31,v=2,_=[[],[]],b=0;b<y;b++){var m=c[v++],g=127&c[v++],E=127&c[v++],o=(4&m)!==0,x=3&m;if(g===0&&E===0)continue;o&&((x===0||x===1)&&(_[x].push(g),_[x].push(E)))}return _},i}();function u(i,n){return i&&i.label===n.name&&!(i.textTrack1||i.textTrack2)}function s(i,n,t,c){return Math.min(n,c)-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(O,T){this.subtle=void 0,this.aesIV=void 0,this.subtle=O,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(O){var T=O.byteLength,l=T&&new DataView(O.buffer).getUint8(T-1);return l?Object(w.sliceUint8)(O,0,T-l):O}var S=function(){function O(){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=O.prototype;return T.uint8ArrayToUint32Array_=function(p){for(var h=new DataView(p),d=new Uint32Array(4),a=0;a<4;a++)d[a]=h.getUint32(a*4);return d},T.initTable=function(){var p=this.sBox,h=this.invSBox,d=this.subMix,a=d[0],u=d[1],s=d[2],f=d[3],i=this.invSubMix,n=i[0],t=i[1],c=i[2],y=i[3],v=new Uint32Array(256),_=0,b=0,m=0;for(m=0;m<256;m++)m<128?v[m]=m<<1:v[m]=m<<1^283;for(m=0;m<256;m++){var g=b^b<<1^b<<2^b<<3^b<<4;g=g>>>8^g&255^99,p[_]=g,h[g]=_;var E=v[_],o=v[E],x=v[o],C=v[g]*257^g*16843008;a[_]=C<<24|C>>>8,u[_]=C<<16|C>>>16,s[_]=C<<8|C>>>24,f[_]=C,C=x*16843009^o*65537^E*257^_*16843008,n[g]=C<<24|C>>>8,t[g]=C<<16|C>>>16,c[g]=C<<8|C>>>24,y[g]=C,_?(_=E^v[v[v[x^E]]],b^=v[v[b]]):_=b=1}},T.expandKey=function(p){for(var h=this.uint8ArrayToUint32Array_(p),d=!0,a=0;a<h.length&&d;)d=h[a]===this.key[a],a++;if(d)return;this.key=h;var u=this.keySize=h.length;if(u!==4&&u!==6&&u!==8)throw new Error("Invalid aes key size="+u);var s=this.ksRows=(u+6+1)*4,f,i,n=this.keySchedule=new Uint32Array(s),t=this.invKeySchedule=new Uint32Array(s),c=this.sBox,y=this.rcon,v=this.invSubMix,_=v[0],b=v[1],m=v[2],g=v[3],E,o;for(f=0;f<s;f++){if(f<u){E=n[f]=h[f];continue}o=E,f%u===0?(o=o<<8|o>>>24,o=c[o>>>24]<<24|c[o>>>16&255]<<16|c[o>>>8&255]<<8|c[o&255],o^=y[f/u|0]<<24):u>6&&f%u===4&&(o=c[o>>>24]<<24|c[o>>>16&255]<<16|c[o>>>8&255]<<8|c[o&255]),n[f]=E=(n[f-u]^o)>>>0}for(i=0;i<s;i++)f=s-i,i&3?o=n[f]:o=n[f-4],i<4||f<=4?t[i]=o:t[i]=_[c[o>>>24]]^b[c[o>>>16&255]]^m[c[o>>>8&255]]^g[c[o&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 a=this.keySize+6,u=this.invKeySchedule,s=this.invSBox,f=this.invSubMix,i=f[0],n=f[1],t=f[2],c=f[3],y=this.uint8ArrayToUint32Array_(d),v=y[0],_=y[1],b=y[2],m=y[3],g=new Int32Array(p),E=new Int32Array(g.length),o,x,C,A,D,I,F,H,te,j,G,X,J,B,Q=this.networkToHostOrderSwap;h<g.length;){for(te=Q(g[h]),j=Q(g[h+1]),G=Q(g[h+2]),X=Q(g[h+3]),D=te^u[0],I=X^u[1],F=G^u[2],H=j^u[3],J=4,B=1;B<a;B++)o=i[D>>>24]^n[I>>16&255]^t[F>>8&255]^c[H&255]^u[J],x=i[I>>>24]^n[F>>16&255]^t[H>>8&255]^c[D&255]^u[J+1],C=i[F>>>24]^n[H>>16&255]^t[D>>8&255]^c[I&255]^u[J+2],A=i[H>>>24]^n[D>>16&255]^t[I>>8&255]^c[F&255]^u[J+3],D=o,I=x,F=C,H=A,J=J+4;o=s[D>>>24]<<24^s[I>>16&255]<<16^s[F>>8&255]<<8^s[H&255]^u[J],x=s[I>>>24]<<24^s[F>>16&255]<<16^s[H>>8&255]<<8^s[D&255]^u[J+1],C=s[F>>>24]<<24^s[H>>16&255]<<16^s[D>>8&255]<<8^s[I&255]^u[J+2],A=s[H>>>24]<<24^s[D>>16&255]<<16^s[I>>8&255]<<8^s[F&255]^u[J+3],E[h]=Q(o^v),E[h+1]=Q(A^_),E[h+2]=Q(C^b),E[h+3]=Q(x^m),v=te,_=j,b=G,m=X,h=h+4}return E.buffer},O}()},"./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"),O=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(u,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=u,this.config=s,this.removePKCS7Padding=t,t)try{var c=self.crypto;c&&(this.subtle=c.subtle||c.webkitSubtle)}catch(y){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var a=d.prototype;return a.destroy=function(){this.observer=null},a.isSync=function(){return this.config.enableSoftwareAES},a.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},a.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},a.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)},a.softwareDecrypt=function(s,f,i){var n=this.currentIV,t=this.currentResult,c=this.remainderData;this.logOnce("JS AES decrypt"),c&&(s=Object(T.appendUint8Array)(c,s),this.remainderData=null);var y=this.getValidChunk(s);if(!y.length)return null;n&&(i=n);var v=this.softwareDecrypter;v||(v=this.softwareDecrypter=new S.default),v.expandKey(f);var _=t;return this.currentResult=v.decrypt(y.buffer,0,i),this.currentIV=Object(l.sliceUint8)(y,-16).buffer,_||null},a.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(c){if(!t)return Promise.reject(new Error("web crypto not initialized"));var y=new w.default(t,i);return y.decrypt(s.buffer,c)}).catch(function(c){return n.onWebCryptoError(c,s,f,i)})},a.onWebCryptoError=function(s,f,i,n){return O.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",s),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(f,i,n)},a.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},a.logOnce=function(s){if(!this.logEnabled)return;O.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(O,T){this.subtle=void 0,this.key=void 0,this.subtle=O,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"),O=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(u,s){return u.__proto__=s,u},l(h,d)}var p=function(h){T(d,h);function d(u,s){var f;return f=h.call(this)||this,f.observer=void 0,f.config=void 0,f.observer=u,f.config=s,f}var a=d.prototype;return a.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=O.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},a.canParse=function(s,f){return P.canParse(s,f)},a.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 O}),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 a}),U.d(Z,"probe",function(){return u}),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 O(t,c,y,v){var _,b,m,g,E=navigator.userAgent.toLowerCase(),o=v,x=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];_=((c[y+2]&192)>>>6)+1;var C=(c[y+2]&60)>>>2;if(C>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:"+C});return}return m=(c[y+2]&1)<<2,m|=(c[y+3]&192)>>>6,w.logger.log("manifest codec:"+v+", ADTS type:"+_+", samplingIndex:"+C),/firefox/i.test(E)?C>=6?(_=5,g=new Array(4),b=C-3):(_=2,g=new Array(2),b=C):E.indexOf("android")!==-1?(_=2,g=new Array(2),b=C):(_=5,g=new Array(4),v&&(v.indexOf("mp4a.40.29")!==-1||v.indexOf("mp4a.40.5")!==-1)||!v&&C>=6?b=C-3:((v&&v.indexOf("mp4a.40.2")!==-1&&(C>=6&&m===1||/vivaldi/i.test(E))||!v&&m===1)&&(_=2,g=new Array(2)),b=C)),g[0]=_<<3,g[0]|=(C&14)>>1,g[1]|=(C&1)<<7,g[1]|=m<<3,_===5&&(g[1]|=(b&14)>>1,g[2]=(b&1)<<7,g[2]|=2<<2,g[3]=0),{config:g,samplerate:x[C],channelCount:m,codec:"mp4a.40."+_,manifestCodec:o}}function T(t,c){return t[c]===255&&(t[c+1]&246)===240}function l(t,c){return t[c+1]&1?7:9}function p(t,c){return(t[c+3]&3)<<11|t[c+4]<<3|(t[c+5]&224)>>>5}function h(t,c){return c+5<t.length}function d(t,c){return c+1<t.length&&T(t,c)}function a(t,c){return h(t,c)&&T(t,c)&&p(t,c)<=t.length-c}function u(t,c){if(d(t,c)){var y=l(t,c);if(c+y>=t.length)return!1;var v=p(t,c);if(v<=y)return!1;var _=c+v;return _===t.length||d(t,_)}return!1}function s(t,c,y,v,_){if(!t.samplerate){var b=O(c,y,v,_);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,c,y,v,_){var b=l(t,c),m=p(t,c);if(m-=b,m>0){var g=y+v*_;return{headerLength:b,frameLength:m,stamp:g}}}function n(t,c,y,v,_){var b=f(t.samplerate),m=i(c,y,v,_,b);if(m){var g=m.frameLength,E=m.headerLength,o=m.stamp,x=E+g,C=Math.max(0,y+x-c.length),A;C?(A=new Uint8Array(x-E),A.set(c.subarray(y+E,c.length),0)):A=c.subarray(y+E,y+x);var D={unit:A,pts:o};return C||t.samples.push(D),{sample:D,length:x,missing:C}}}},"./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"),O=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(u,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(u,s){return!1},d.appendFrame=function(u,s,f){},d.demux=function(u,s){this.cachedData&&(u=Object(O.appendUint8Array)(this.cachedData,u),this.cachedData=null);var f=P.getID3Data(u,0),i=f?f.length:0,n,t,c=this._audioTrack,y=this._id3Track,v=f?P.getTimeStamp(f):void 0,_=u.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=p(v,s)),f&&f.length>0&&y.samples.push({pts:this.initPTS,dts:this.initPTS,data:f}),t=this.initPTS;i<_;){if(this.canParse(u,i)){var b=this.appendFrame(c,u,i);b?(this.frameIndex++,t=b.sample.pts,i+=b.length,n=i):i=_}else P.canParse(u,i)?(f=P.getID3Data(u,i),y.samples.push({pts:t,dts:t,data:f}),i+=f.length,n=i):i++;if(i===_&&n!==_){var m=Object(T.sliceUint8)(u,n);this.cachedData?this.cachedData=Object(O.appendUint8Array)(this.cachedData,m):this.cachedData=m}}return{audioTrack:c,avcTrack:Object(S.dummyTrack)(),id3Track:y,textTrack:Object(S.dummyTrack)()}},d.demuxSampleAes=function(u,s,f){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},d.flush=function(u){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,a){return Object(w.isFiniteNumber)(d)?d*90:a*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 O=S.prototype;return O.push=function(l){this.chunks.push(l),this.dataLength+=l.length},O.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},O.reset=function(){this.chunks.length=0,this.dataLength=0},S}();function P(S,O){for(var T=new Uint8Array(O),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 O=S.prototype;return O.loadWord=function(){var l=this.data,p=this.bytesAvailable,h=l.byteLength-p,d=new Uint8Array(4),a=Math.min(4,p);if(a===0)throw new Error("no bytes available");d.set(l.subarray(h,h+a)),this.word=new DataView(d.buffer).getUint32(0),this.bitsAvailable=a*8,this.bytesAvailable-=a},O.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)},O.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},O.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()},O.skipUEG=function(){this.skipBits(1+this.skipLZ())},O.skipEG=function(){this.skipBits(1+this.skipLZ())},O.readUEG=function(){var l=this.skipLZ();return this.readBits(l+1)-1},O.readEG=function(){var l=this.readUEG();return 1&l?1+l>>>1:-1*(l>>>1)},O.readBoolean=function(){return this.readBits(1)===1},O.readUByte=function(){return this.readBits(8)},O.readUShort=function(){return this.readBits(16)},O.readUInt=function(){return this.readBits(32)},O.skipScalingList=function(l){for(var p=8,h=8,d,a=0;a<l;a++)h!==0&&(d=this.readEG(),h=(p+d+256)%256),p=h===0?p:h},O.readSPS=function(){var l=0,p=0,h=0,d=0,a,u,s,f=this.readUByte.bind(this),i=this.readBits.bind(this),n=this.readUEG.bind(this),t=this.readBoolean.bind(this),c=this.skipBits.bind(this),y=this.skipEG.bind(this),v=this.skipUEG.bind(this),_=this.skipScalingList.bind(this);f();var b=f();if(i(5),c(3),f(),v(),b===100||b===110||b===122||b===244||b===44||b===83||b===86||b===118||b===128){var m=n();if(m===3&&c(1),v(),v(),c(1),t())for(u=m!==3?8:12,s=0;s<u;s++)t()&&(s<6?_(16):_(64))}v();var g=n();if(g===0)n();else if(g===1)for(c(1),y(),y(),a=n(),s=0;s<a;s++)y();v(),c(1);var E=n(),o=n(),x=i(1);x===0&&c(1),c(1),t()&&(l=n(),p=n(),h=n(),d=n());var C=[1,1];if(t()&&t()){var A=f();switch(A){case 1:C=[1,1];break;case 2:C=[12,11];break;case 3:C=[10,11];break;case 4:C=[16,11];break;case 5:C=[40,33];break;case 6:C=[24,11];break;case 7:C=[20,11];break;case 8:C=[32,11];break;case 9:C=[80,33];break;case 10:C=[18,11];break;case 11:C=[15,11];break;case 12:C=[64,33];break;case 13:C=[160,99];break;case 14:C=[4,3];break;case 15:C=[3,2];break;case 16:C=[2,1];break;case 255:{C=[f()<<8|f(),f()<<8|f()];break}}}return{width:Math.ceil((E+1)*16-l*2-p*2),height:(2-x)*(o+1)*16-(x?2:4)*(h+d),pixelRatio:C}},O.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 a}),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 m=b,g=0;w(_,b);){g+=10;var E=O(_,b+6);g+=E,P(_,b+10)&&(g+=10),b+=g}return g>0?_.subarray(m,m+g):void 0},O=function(_,b){var m=0;return m=(_[b]&127)<<21,m|=(_[b+1]&127)<<14,m|=(_[b+2]&127)<<7,m|=_[b+3]&127,m},T=function(_,b){return w(_,b)&&O(_,b+6)+10<=_.length-b},l=function(_){for(var b=d(_),m=0;m<b.length;m++){var g=b[m];if(p(g))return i(g)}return},p=function(_){return _&&_.key==="PRIV"&&_.info==="com.apple.streaming.transportStreamTimestamp"},h=function(_){var b=String.fromCharCode(_[0],_[1],_[2],_[3]),m=O(_,4),g=10;return{type:b,size:m,data:_.subarray(g,g+m)}},d=function(_){for(var b=0,m=[];w(_,b);){var g=O(_,b+6);b+=10;for(var E=b+g;b+8<E;){var o=h(_.subarray(b)),x=a(o);x&&m.push(x),b+=o.size+10}P(_,b)&&(b+=10)}return m},a=function(_){return _.type==="PRIV"?u(_):_.type[0]==="W"?f(_):s(_)},u=function(_){if(_.size<2)return;var b=n(_.data,!0),m=new Uint8Array(_.data.subarray(b.length+1));return{key:_.type,info:b,data:m.buffer}},s=function(_){if(_.size<2)return;if(_.type==="TXXX"){var b=1,m=n(_.data.subarray(b),!0);b+=m.length+1;var g=n(_.data.subarray(b));return{key:_.type,info:m,data:g}}var E=n(_.data.subarray(1));return{key:_.type,data:E}},f=function(_){if(_.type==="WXXX"){if(_.size<2)return;var b=1,m=n(_.data.subarray(b),!0);b+=m.length+1;var g=n(_.data.subarray(b));return{key:_.type,info:m,data:g}}var E=n(_.data);return{key:_.type,data:E}},i=function(_){if(_.data.byteLength===8){var b=new Uint8Array(_.data),m=b[3]&1,g=(b[4]<<23)+(b[5]<<15)+(b[6]<<7)+b[7];return g/=45,m&&(g+=4772185884e-2),Math.round(g)}return},n=function(_,b){b===void 0&&(b=!1);var m=y();if(m){var g=m.decode(_);if(b){var E=g.indexOf("\0");return E!==-1?g.substring(0,E):g}return g.replace(/\0/g,"")}for(var o=_.length,x,C,A,D="",I=0;I<o;){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:C=_[I++],D+=String.fromCharCode((x&31)<<6|C&63);break;case 14:C=_[I++],A=_[I++],D+=String.fromCharCode((x&15)<<12|(C&63)<<6|(A&63)<<0);break;default:}}return D},t={decodeTextFrame:s},c;function y(){return!c&&typeof self.TextDecoder!="undefined"&&(c=new self.TextDecoder("utf-8")),c}},"./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"),O=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(u,s){return u.__proto__=s,u},l(h,d)}var p=function(h){T(d,h);function d(){return h.apply(this,arguments)||this}var a=d.prototype;return a.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(O.probe(s,i))return S.logger.log("MPEG Audio sync word found !"),!0;return!1},a.canParse=function(s,f){return O.canParse(s,f)},a.appendFrame=function(s,f,i){return this.initPTS===null?void 0:O.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 O(l,p){this.remainderData=null,this.config=void 0,this.config=p}var T=O.prototype;return T.resetTimeStamp=function(){},T.resetInitSegment=function(){},T.resetContiguity=function(){},O.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 a=Object(w.segmentValidRange)(h);this.remainderData=a.remainder,d.samples=a.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(){},O}();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 a}),U.d(Z,"probe",function(){return u});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],O=[[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 c=p(f,i);if(c&&i+c.frameLength<=f.length){var y=c.samplesPerFrame*9e4/c.sampleRate,v=n+t*y,_={unit:f.subarray(i,i+c.frameLength),pts:v,dts:v};return s.config=[],s.channelCount=c.channelCount,s.samplerate=c.sampleRate,s.samples.push(_),{sample:_,length:c.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,c=s[f+2]>>2&3;if(i!==1&&t!==0&&t!==15&&c!==3){var y=s[f+2]>>1&1,v=s[f+3]>>6,_=i===3?3-n:n===3?3:4,b=P[_*14+t-1]*1e3,m=i===3?0:i===2?1:2,g=S[m*3+c],E=v===3?1:2,o=O[i][n],x=T[n],C=o*8*x,A=Math.floor(o*b/g+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&&v===0&&(s[f+3]=s[f+3]|128),{sampleRate:g,channelCount:E,frameLength:A,samplesPerFrame:C}}}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 a(s,f){var i=4;return h(s,f)&&i<=s.length-f}function u(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 c=f+t;return c===s.length||d(s,c)}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 O(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=O.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,a){var u=p[h].unit,s=u.subarray(16,u.length-u.length%16),f=s.buffer.slice(s.byteOffset,s.byteOffset+s.length),i=this;this.decryptBuffer(f,function(n){var t=new Uint8Array(n);u.set(t,16),a||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 a=this.decrypter.isSync();if(this.decryptAacSample(p,h,d,a),!a)return}},T.getAvcEncryptedData=function(p){for(var h=Math.floor((p.length-48)/160)*16+16,d=new Int8Array(h),a=0,u=32;u<=p.length-16;u+=160,a+=16)d.set(p.subarray(u,u+16),a);return d},T.getAvcDecryptedUnit=function(p,h){for(var d=new Uint8Array(h),a=0,u=32;u<=p.length-16;u+=160,a+=16)p.set(d.subarray(a,a+16),u);return p},T.decryptAvcSample=function(p,h,d,a,u,s){var f=Object(P.discardEPB)(u.data),i=this.getAvcEncryptedData(f),n=this;this.decryptBuffer(i.buffer,function(t){u.data=n.getAvcDecryptedUnit(f,t),s||n.decryptAvcSamples(p,h,d+1,a)})},T.decryptAvcSamples=function(p,h,d,a){if(p instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;h++,d=0){if(h>=p.length){a();return}for(var u=p[h].units;!(d>=u.length);d++){var s=u[d];if(s.data.length<=48||s.type!==1&&s.type!==5)continue;var f=this.decrypter.isSync();if(this.decryptAvcSample(p,h,d,a,s,f),!f)return}}},O}();Z.default=S},"./src/demux/transmuxer-interface.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return u});var w=U("./node_modules/webworkify-webpack/index.js"),P=U.n(w),S=U("./src/events.ts"),O=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),a=Object(p.getMediaSource)()||{isTypeSupported:function(){return!1}},u=function(){function s(i,n,t,c){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=c;var v=i.config,_=function(o,x){x=x||{},x.frag=y.frag,x.id=y.id,i.trigger(o,x)};this.observer=new h.EventEmitter,this.observer.on(S.Events.FRAG_DECRYPTED,_),this.observer.on(S.Events.ERROR,_);var b={mp4:a.isTypeSupported("video/mp4"),mpeg:a.isTypeSupported("audio/mpeg"),mp3:a.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(v.enableWorker&&typeof Worker!="undefined"){T.logger.log("demuxing in webworker");var g;try{g=this.worker=w("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.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+")")})},g.postMessage({cmd:"init",typeSupported:b,vendor:m,id:n,config:JSON.stringify(v)})}catch(E){T.logger.warn("Error in worker:",E),T.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new O.default(this.observer,b,v,m,n),this.worker=null}}else this.transmuxer=new O.default(this.observer,b,v,m,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 c=this.observer;c&&c.removeAllListeners(),this.observer=null},f.push=function(n,t,c,y,v,_,b,m,g,E){var o=this;g.transmuxing.start=self.performance.now();var x=this.transmuxer,C=this.worker,A=_?_.start:v.start,D=v.decryptdata,I=this.frag,F=!(I&&v.cc===I.cc),H=!(I&&g.level===I.level),te=I?g.sn-I.sn:-1,j=this.part?g.part-this.part.index:1,G=!H&&(te===1||te===0&&j===1),X=self.performance.now();(H||te||v.stats.parsing.start===0)&&(v.stats.parsing.start=X),_&&(j||!G)&&(_.stats.parsing.start=X);var J=new O.TransmuxState(F,G,m,H,A);if(!G||F){T.logger.log("[transmuxer-interface, "+v.type+"]: Starting new transmux session for sn: "+g.sn+" p: "+g.part+" level: "+g.level+" id: "+g.id+`
|
|
|
discontinuity: `+F+`
|
|
|
trackSwitch: `+H+`
|
|
|
contiguous: `+G+`
|
|
|
accurateTimeOffset: `+m+`
|
|
|
timeOffset: `+A);var B=new O.TransmuxConfig(c,y,t,b,E);this.configureTransmuxer(B)}if(this.frag=v,this.part=_,C)C.postMessage({cmd:"demux",data:n,decryptdata:D,chunkMeta:g,state:J},n instanceof ArrayBuffer?[n]:[]);else if(x){var Q=x.push(n,D,g,J);Object(O.isPromise)(Q)?Q.then(function(ie){o.handleTransmuxComplete(ie)}):this.handleTransmuxComplete(Q)}},f.flush=function(n){var t=this;n.transmuxing.start=self.performance.now();var c=this.transmuxer,y=this.worker;if(y)y.postMessage({cmd:"flush",chunkMeta:n});else if(c){var v=c.flush(n);Object(O.isPromise)(v)?v.then(function(_){t.handleFlushResult(_,n)}):this.handleFlushResult(v,n)}},f.handleFlushResult=function(n,t){var c=this;n.forEach(function(y){c.handleTransmuxComplete(y)}),this.onFlush(t)},f.onWorkerMessage=function(n){var t=n.data,c=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,c.trigger(t.event,t.data);break}}},f.configureTransmuxer=function(n){var t=this.worker,c=this.transmuxer;t?t.postMessage({cmd:"configure",config:n}):c&&c.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"),O=U("./node_modules/eventemitter3/index.js"),T=U.n(O);function l(u){var s=new O.EventEmitter,f=function(n,t){u.postMessage({event:n,data:t})};s.on(P.Events.FRAG_DECRYPTED,f),s.on(P.Events.ERROR,f),u.addEventListener("message",function(i){var n=i.data;switch(n.cmd){case"init":{var t=JSON.parse(n.config);u.transmuxer=new w.default(s,n.typeSupported,t,n.vendor,n.id),Object(S.enableLogs)(t.debug),f("init",null);break}case"configure":{u.transmuxer.configure(n.config);break}case"demux":{var c=u.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(w.isPromise)(c)?c.then(function(_){p(u,_)}):p(u,c);break}case"flush":{var y=n.chunkMeta,v=u.transmuxer.flush(y);Object(w.isPromise)(v)?v.then(function(_){d(u,_,y)}):d(u,v,y);break}default:break}})}function p(u,s){if(a(s.remuxResult))return;var f=[],i=s.remuxResult,n=i.audio,t=i.video;n&&h(f,n),t&&h(f,t),u.postMessage({event:"transmuxComplete",data:s},f)}function h(u,s){s.data1&&u.push(s.data1.buffer),s.data2&&u.push(s.data2.buffer)}function d(u,s,f){s.forEach(function(i){p(u,i)}),u.postMessage({event:"flush",data:f})}function a(u){return!u.audio&&!u.video&&!u.text&&!u.id3&&!u.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 v}),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"),O=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"),a=U("./src/demux/chunk-cache.ts"),u=U("./src/utils/mp4-tools.ts"),s=U("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(m){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:O.default,remux:h.default},{demux:p.default,remux:h.default}],n=1024;i.forEach(function(m){var g=m.demux;n=Math.max(n,g.minProbeByteLength)});var t=function(){function m(E,o,x,C,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 a.default,this.observer=E,this.typeSupported=o,this.config=x,this.vendor=C,this.id=A}var g=m.prototype;return g.configure=function(o){this.transmuxConfig=o,this.decrypter&&this.decrypter.reset()},g.push=function(o,x,C,A){var D=this,I=C.transmuxing;I.executeStart=f();var F=new Uint8Array(o),H=this.cache,te=this.config,j=this.currentTransmuxState,G=this.transmuxConfig;A&&(this.currentTransmuxState=A);var X=c(F,x);if(X&&X.method==="AES-128"){var J=this.getDecrypter();if(te.enableSoftwareAES){var B=J.softwareDecrypt(F,X.key.buffer,X.iv.buffer);if(!B)return I.executeEnd=f(),y(C);F=new Uint8Array(B)}else return this.decryptionPromise=J.webCryptoDecrypt(F,X.key.buffer,X.iv.buffer).then(function(Ie){var Ue=D.push(Ie,null,C);return D.decryptionPromise=null,Ue}),this.decryptionPromise}var Q=A||j,ie=Q.contiguous,oe=Q.discontinuity,Ee=Q.trackSwitch,ye=Q.accurateTimeOffset,Le=Q.timeOffset,pe=G.audioCodec,Ce=G.videoCodec,Be=G.defaultInitPts,Pe=G.duration,ke=G.initSegmentData;if((oe||Ee)&&this.resetInitSegment(ke,pe,Ce,Pe),oe&&this.resetInitialTimestamp(Be),ie||this.resetContiguity(),this.needsProbing(F,oe,Ee)){if(H.dataLength){var Ne=H.flush();F=Object(u.appendUint8Array)(Ne,F)}this.configureTransmuxer(F,G)}var he=this.transmux(F,X,Le,ye,C),ue=this.currentTransmuxState;return ue.contiguous=!0,ue.discontinuity=!1,ue.trackSwitch=!1,I.executeEnd=f(),he},g.flush=function(o){var x=this,C=o.transmuxing;C.executeStart=f();var A=this.decrypter,D=this.cache,I=this.currentTransmuxState,F=this.decryptionPromise;if(F)return F.then(function(){return x.flush(o)});var H=[],te=I.timeOffset;if(A){var j=A.flush();j&&H.push(this.push(j,null,o))}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"}),C.executeEnd=f(),[y(o)];var B=X.flush(te);return v(B)?B.then(function(Q){return x.flushRemux(H,Q,o),H}):(this.flushRemux(H,B,o),H)},g.flushRemux=function(o,x,C){var A=x.audioTrack,D=x.avcTrack,I=x.id3Track,F=x.textTrack,H=this.currentTransmuxState,te=H.accurateTimeOffset,j=H.timeOffset;s.logger.log("[transmuxer.ts]: Flushed fragment "+C.sn+(C.part>-1?" p: "+C.part:"")+" of level "+C.level);var G=this.remuxer.remux(A,D,I,F,j,te,!0,this.id);o.push({remuxResult:G,chunkMeta:C}),C.transmuxing.executeEnd=f()},g.resetInitialTimestamp=function(o){var x=this.demuxer,C=this.remuxer;if(!x||!C)return;x.resetTimeStamp(o),C.resetTimeStamp(o)},g.resetContiguity=function(){var o=this.demuxer,x=this.remuxer;if(!o||!x)return;o.resetContiguity(),x.resetNextTimestamp()},g.resetInitSegment=function(o,x,C,A){var D=this.demuxer,I=this.remuxer;if(!D||!I)return;D.resetInitSegment(x,C,A),I.resetInitSegment(o,x,C)},g.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},g.transmux=function(o,x,C,A,D){var I;return x&&x.method==="SAMPLE-AES"?I=this.transmuxSampleAes(o,x,C,A,D):I=this.transmuxUnencrypted(o,C,A,D),I},g.transmuxUnencrypted=function(o,x,C,A){var D=this.demuxer.demux(o,x,!1,!this.config.progressive),I=D.audioTrack,F=D.avcTrack,H=D.id3Track,te=D.textTrack,j=this.remuxer.remux(I,F,H,te,x,C,!1,this.id);return{remuxResult:j,chunkMeta:A}},g.transmuxSampleAes=function(o,x,C,A,D){var I=this;return this.demuxer.demuxSampleAes(o,x,C).then(function(F){var H=I.remuxer.remux(F.audioTrack,F.avcTrack,F.id3Track,F.textTrack,C,A,!1,I.id);return{remuxResult:H,chunkMeta:D}})},g.configureTransmuxer=function(o,x){for(var C=this.config,A=this.observer,D=this.typeSupported,I=this.vendor,F=x.audioCodec,H=x.defaultInitPts,te=x.duration,j=x.initSegmentData,G=x.videoCodec,X,J=0,B=i.length;J<B;J++)if(i[J].demux.probe(o)){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,Ee=X.demux;(!ie||!(ie instanceof oe))&&(this.remuxer=new oe(A,C,D,I)),(!Q||!(Q instanceof Ee))&&(this.demuxer=new Ee(A,C,D),this.probe=Ee.probe),this.resetInitSegment(j,F,G,te),this.resetInitialTimestamp(H)},g.needsProbing=function(o,x,C){return!this.demuxer||!this.remuxer||x||C},g.getDecrypter=function(){var o=this.decrypter;return o||(o=this.decrypter=new S.default(this.observer,this.config)),o},m}();function c(m,g){var E=null;return m.byteLength>0&&g!=null&&g.key!=null&&g.iv!==null&&g.method!=null&&(E=g),E}var y=function(g){return{remuxResult:{},chunkMeta:g}};function v(m){return"then"in m&&m.then instanceof Function}var _=function(g,E,o,x,C){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=g,this.videoCodec=E,this.initSegmentData=o,this.duration=x,this.defaultInitPts=C},b=function(g,E,o,x,C){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=g,this.contiguous=E,this.accurateTimeOffset=o,this.trackSwitch=x,this.timeOffset=C}},"./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"),O=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"),a={video:1,audio:2,id3:3,text:4},u=function(){function v(b,m,g){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=m,this.typeSupported=g}v.probe=function(m){var g=v.syncOffset(m);return g<0?!1:(g&&h.logger.warn("MPEG2-TS detected but first sync word found @ offset "+g+", junk ahead ?"),!0)},v.syncOffset=function(m){for(var g=Math.min(1e3,m.length-3*188),E=0;E<g;){if(m[E]===71&&m[E+188]===71&&m[E+2*188]===71)return E;E++}return-1},v.createTrack=function(m,g){return{container:m==="video"||m==="audio"?"video/mp2t":void 0,type:m,id:a[m],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:m==="audio"?g:void 0}};var _=v.prototype;return _.resetInitSegment=function(m,g,E){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=v.createTrack("video",E),this._audioTrack=v.createTrack("audio",E),this._id3Track=v.createTrack("id3",E),this._txtTrack=v.createTrack("text",E),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=m,this.videoCodec=g,this._duration=E},_.resetTimeStamp=function(){},_.resetContiguity=function(){var m=this._audioTrack,g=this._avcTrack,E=this._id3Track;m&&(m.pesData=null),g&&(g.pesData=null),E&&(E.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},_.demux=function(m,g,E,o){E===void 0&&(E=!1),o===void 0&&(o=!1),E||(this.sampleAes=null);var x,C=this._avcTrack,A=this._audioTrack,D=this._id3Track,I=C.pid,F=C.pesData,H=A.pid,te=D.pid,j=A.pesData,G=D.pesData,X=!1,J=this.pmtParsed,B=this._pmtId,Q=m.length;if(this.remainderData&&(m=Object(p.appendUint8Array)(this.remainderData,m),Q=m.length,this.remainderData=null),Q<188&&!o)return this.remainderData=m,{audioTrack:A,avcTrack:C,id3Track:D,textTrack:this._txtTrack};var ie=Math.max(0,v.syncOffset(m));Q-=(Q+ie)%188,Q<m.byteLength&&!o&&(this.remainderData=new Uint8Array(m.buffer,Q,m.buffer.byteLength-Q));for(var oe=ie;oe<Q;oe+=188)if(m[oe]===71){var Ee=!!(m[oe+1]&64),ye=((m[oe+1]&31)<<8)+m[oe+2],Le=(m[oe+3]&48)>>4,pe=void 0;if(Le>1){if(pe=oe+5+m[oe+4],pe===oe+188)continue}else pe=oe+4;switch(ye){case I:Ee&&(F&&(x=n(F))&&this.parseAVCPES(x,!1),F={data:[],size:0}),F&&(F.data.push(m.subarray(pe,oe+188)),F.size+=oe+188-pe);break;case H:Ee&&(j&&(x=n(j))&&(A.isAAC?this.parseAACPES(x):this.parseMPEGPES(x)),j={data:[],size:0}),j&&(j.data.push(m.subarray(pe,oe+188)),j.size+=oe+188-pe);break;case te:Ee&&(G&&(x=n(G))&&this.parseID3PES(x),G={data:[],size:0}),G&&(G.data.push(m.subarray(pe,oe+188)),G.size+=oe+188-pe);break;case 0:Ee&&(pe+=m[pe]+1),B=this._pmtId=f(m,pe);break;case B:{Ee&&(pe+=m[pe]+1);var Ce=i(m,pe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,E);I=Ce.avc,I>0&&(C.pid=I),H=Ce.audio,H>0&&(A.pid=H,A.isAAC=Ce.isAAC),te=Ce.id3,te>0&&(D.pid=te),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"});C.pesData=F,A.pesData=j,D.pesData=G;var Be={audioTrack:A,avcTrack:C,id3Track:D,textTrack:this._txtTrack};return o&&this.extractRemainingSamples(Be),Be},_.flush=function(){var m=this.remainderData;this.remainderData=null;var g;return m?g=this.demux(m,-1,!1,!0):g={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(g),this.sampleAes?this.decrypt(g,this.sampleAes):g},_.extractRemainingSamples=function(m){var g=m.audioTrack,E=m.avcTrack,o=m.id3Track,x=E.pesData,C=g.pesData,A=o.pesData,D;x&&(D=n(x))?(this.parseAVCPES(D,!0),E.pesData=null):E.pesData=x,C&&(D=n(C))?(g.isAAC?this.parseAACPES(D):this.parseMPEGPES(D),g.pesData=null):(C!=null&&C.size&&h.logger.log("last AAC PES packet truncated,might overlap between fragments"),g.pesData=C),A&&(D=n(A))?(this.parseID3PES(D),o.pesData=null):o.pesData=A},_.demuxSampleAes=function(m,g,E){var o=this.demux(m,E,!0,!this.config.progressive),x=this.sampleAes=new T.default(this.observer,this.config,g);return this.decrypt(o,x)},_.decrypt=function(m,g){return new Promise(function(E){var o=m.audioTrack,x=m.avcTrack;o.samples&&o.isAAC?g.decryptAacSamples(o.samples,0,function(){x.samples?g.decryptAvcSamples(x.samples,0,0,function(){E(m)}):E(m)}):x.samples&&g.decryptAvcSamples(x.samples,0,0,function(){E(m)})})},_.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},_.parseAVCPES=function(m,g){var E=this,o=this._avcTrack,x=this.parseAVCNALu(m.data),C=!1,A=this.avcSample,D,I=!1;m.data=null,A&&x.length&&!o.audFound&&(t(A,o),A=this.avcSample=s(!1,m.pts,m.dts,"")),x.forEach(function(F){switch(F.type){case 1:{D=!0,A||(A=E.avcSample=s(!0,m.pts,m.dts,"")),C&&(A.debug+="NDR "),A.frame=!0;var H=F.data;if(I&&H.length>4){var te=new S.default(H).readSliceType();(te===2||te===4||te===7||te===9)&&(A.key=!0)}break}case 5:D=!0,A||(A=E.avcSample=s(!0,m.pts,m.dts,"")),C&&(A.debug+="IDR "),A.key=!0,A.frame=!0;break;case 6:{D=!0,C&&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 Ee=j.readUByte();if(Ee===3){for(var ye=j.readUByte(),Le=j.readUByte(),pe=31&ye,Ce=[ye,Le],Be=0;Be<pe;Be++)Ce.push(j.readUByte()),Ce.push(j.readUByte()),Ce.push(j.readUByte());c(E._txtTrack.samples,{type:3,pts:m.pts,bytes:Ce})}}}}}else if(G===5&&j.bytesAvailable!==0){if(J=!0,X>16){for(var Pe=[],ke=0;ke<16;ke++)Pe.push(j.readUByte().toString(16)),(ke===3||ke===5||ke===7||ke===9)&&Pe.push("-");for(var Ne=X-16,he=new Uint8Array(Ne),ue=0;ue<Ne;ue++)he[ue]=j.readUByte();c(E._txtTrack.samples,{pts:m.pts,payloadType:G,uuid:Pe.join(""),userData:Object(O.utf8ArrayToStr)(he),userDataBytes:he})}}else if(X<j.bytesAvailable)for(var Ie=0;Ie<X;Ie++)j.readUByte()}break}case 7:if(D=!0,I=!0,C&&A&&(A.debug+="SPS "),!o.sps){var Ue=new S.default(F.data),Ye=Ue.readSPS();o.width=Ye.width,o.height=Ye.height,o.pixelRatio=Ye.pixelRatio,o.sps=[F.data],o.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+=$}o.codec=M}break;case 8:D=!0,C&&A&&(A.debug+="PPS "),o.pps||(o.pps=[F.data]);break;case 9:D=!1,o.audFound=!0,A&&t(A,o),A=E.avcSample=s(!1,m.pts,m.dts,C?"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)}}),g&&A&&(t(A,o),this.avcSample=null)},_.getLastNalUnit=function(){var m,g=this.avcSample,E;if(!g||g.units.length===0){var o=this._avcTrack.samples;g=o[o.length-1]}if((m=g)!==null&&m!==void 0&&m.units){var x=g.units;E=x[x.length-1]}return E},_.parseAVCNALu=function(m){var g=m.byteLength,E=this._avcTrack,o=E.naluState||0,x=o,C=[],A=0,D,I,F,H=-1,te=0;for(o===-1&&(H=0,te=m[0]&31,o=0,A=1);A<g;){if(D=m[A++],!o){o=D?0:1;continue}if(o===1){o=D?0:2;continue}if(!D)o=3;else if(D===1){if(H>=0){var j={data:m.subarray(H,A-o-1),type:te};C.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-o-1,I>0)){var X=new Uint8Array(G.data.byteLength+I);X.set(G.data,0),X.set(m.subarray(0,I),G.data.byteLength),G.data=X,G.state=0}}A<g?(F=m[A]&31,H=A,te=F,o=0):o=-1}else o=0}if(H>=0&&o>=0){var J={data:m.subarray(H,g),type:te,state:o};C.push(J)}if(C.length===0){var B=this.getLastNalUnit();if(B){var Q=new Uint8Array(B.data.byteLength+m.byteLength);Q.set(B.data,0),Q.set(m,B.data.byteLength),B.data=Q}}return E.naluState=o,C},_.parseAACPES=function(m){var g=0,E=this._audioTrack,o=this.aacOverFlow,x=m.data;if(o){this.aacOverFlow=null;var C=o.sample.unit.byteLength,A=Math.min(o.missing,C),D=C-A;o.sample.unit.set(x.subarray(0,A),D),E.samples.push(o.sample),g=o.missing}var I,F;for(I=g,F=x.length;I<F-1&&!w.isHeader(x,I);I++);if(I!==g){var H,te;if(I<F-1?(H="AAC PES did not start with ADTS header,offset:"+I,te=!1):(H="no ADTS header found in AAC PES",te=!0),h.logger.warn("parsing error:"+H),this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:te,reason:H}),te)return}w.initTrackConfig(E,this.observer,x,I,this.audioCodec);var j;if(m.pts!==void 0)j=m.pts;else if(o){var G=w.getFrameDuration(E.samplerate);j=o.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(m){var g=m.data,E=g.length,o=0,x=0,C=m.pts;if(C===void 0){h.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;x<E;)if(P.isHeader(g,x)){var A=P.appendFrame(this._audioTrack,g,x,C,o);if(A)x+=A.length,o++;else break}else x++},_.parseID3PES=function(m){if(m.pts===void 0){h.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(m)},v}();u.minProbeByteLength=188;function s(v,_,b,m){return{key:v,frame:!1,pts:_,dts:b,units:[],debug:m,length:0}}function f(v,_){return(v[_+10]&31)<<8|v[_+11]}function i(v,_,b,m){var g={audio:-1,avc:-1,id3:-1,isAAC:!0},E=(v[_+1]&15)<<8|v[_+2],o=_+3+E-4,x=(v[_+10]&15)<<8|v[_+11];for(_+=12+x;_<o;){var C=(v[_+1]&31)<<8|v[_+2];switch(v[_]){case 207:if(!m){h.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:g.audio===-1&&(g.audio=C);break;case 21:g.id3===-1&&(g.id3=C);break;case 219:if(!m){h.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:g.avc===-1&&(g.avc=C);break;case 3:case 4:b?g.audio===-1&&(g.audio=C,g.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}_+=((v[_+3]&15)<<8|v[_+4])+5}return g}function n(v){var _=0,b,m,g,E,o,x=v.data;if(!v||v.size===0)return null;for(;x[0].length<19&&x.length>1;){var C=new Uint8Array(x[0].length+x[1].length);C.set(x[0]),C.set(x[1],x[0].length),x[0]=C,x.splice(1,1)}b=x[0];var A=(b[0]<<16)+(b[1]<<8)+b[2];if(A===1){if(m=(b[4]<<8)+b[5],m&&m>v.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?(o=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,E-o>60*9e4&&(h.logger.warn(Math.round((E-o)/9e4)+"s delta between PTS and DTS, align them"),E=o)):o=E),g=b[8];var I=g+9;if(v.size<=I)return null;v.size-=I;for(var F=new Uint8Array(v.size),H=0,te=x.length;H<te;H++){b=x[H];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 m&&(m-=g+3),{data:F,pts:E,dts:o,len:m}}return null}function t(v,_){if(v.units.length&&v.frame){if(v.pts===void 0){var b=_.samples,m=b.length;if(m){var g=b[m-1];v.pts=g.pts,v.dts=g.dts}else{_.dropped++;return}}_.samples.push(v)}v.debug.length&&h.logger.log(v.pts+"/"+v.dts+":"+v.debug)}function c(v,_){var b=v.length;if(b>0){if(_.pts>=v[b-1].pts)v.push(_);else for(var m=b-1;m>=0;m--)if(_.pts<v[m].pts){v.splice(m,0,_);break}}else v.push(_)}function y(v){for(var _=v.byteLength,b=[],m=1;m<_-2;)v[m]===0&&v[m+1]===0&&v[m+2]===3?(b.push(m+2),m+=2):m++;if(b.length===0)return v;var g=_-b.length,E=new Uint8Array(g),o=0;for(m=0;m<g;o++,m++)o===b[0]&&(o++,b.shift()),E[m]=v[o];return E}Z.default=u},"./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 v});var w=U("./node_modules/url-toolkit/src/url-toolkit.js"),P=U.n(w),S=U("./src/loader/playlist-loader.ts"),O=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"),a=U("./src/is-supported.ts"),u=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 c(_,b){for(var m=0;m<b.length;m++){var g=b[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(_,g.key,g)}}function y(_,b,m){return b&&c(_.prototype,b),m&&c(_,m),_}var v=function(){_.isSupported=function(){return Object(a.isSupported)()};function _(m){m===void 0&&(m={}),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 g=this.config=Object(s.mergeConfig)(_.DefaultConfig,m);this.userConfig=m,Object(u.enableLogs)(g.debug),this._autoLevelCapping=-1,g.progressive&&Object(s.enableStreamingMode)(g);var E=g.abrController,o=g.bufferController,x=g.capLevelController,C=g.fpsController,A=this.abrController=new E(this),D=this.bufferController=new o(this),I=this.capLevelController=new x(this),F=new C(this),H=new S.default(this),te=new O.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=[H,te,A,D,I,F,j,X];this.audioTrackController=this.createController(g.audioTrackController,null,B),this.createController(g.audioStreamController,X,B),this.subtitleTrackController=this.createController(g.subtitleTrackController,null,B),this.createController(g.subtitleStreamController,X,B),this.createController(g.timelineController,null,Q),this.emeController=this.createController(g.emeController,null,Q),this.cmcdController=this.createController(g.cmcdController,null,Q),this.latencyController=this.createController(l.default,null,Q),this.coreComponents=Q}var b=_.prototype;return b.createController=function(g,E,o){if(g){var x=E?new g(this,E):new g(this);return o&&o.push(x),x}return null},b.on=function(g,E,o){o===void 0&&(o=this),this._emitter.on(g,E,o)},b.once=function(g,E,o){o===void 0&&(o=this),this._emitter.once(g,E,o)},b.removeAllListeners=function(g){this._emitter.removeAllListeners(g)},b.off=function(g,E,o,x){o===void 0&&(o=this),this._emitter.off(g,E,o,x)},b.listeners=function(g){return this._emitter.listeners(g)},b.emit=function(g,E,o){return this._emitter.emit(g,E,o)},b.trigger=function(g,E){if(this.config.debug)return this.emit(g,g,E);try{return this.emit(g,g,E)}catch(o){u.logger.error("An internal error happened while handling event "+g+'. Error message: "'+o.message+'". Here is a stacktrace:',o),this.trigger(n.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:g,error:o})}return!1},b.listenerCount=function(g){return this._emitter.listenerCount(g)},b.destroy=function(){u.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(g){return g.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(g){return g.destroy()}),this.coreComponents.length=0},b.attachMedia=function(g){u.logger.log("attachMedia"),this._media=g,this.trigger(n.Events.MEDIA_ATTACHING,{media:g})},b.detachMedia=function(){u.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},b.loadSource=function(g){this.stopLoad();var E=this.media,o=this.url,x=this.url=w.buildAbsoluteURL(self.location.href,g,{alwaysNormalize:!0});u.logger.log("loadSource:"+x),E&&o&&o!==x&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(E)),this.trigger(n.Events.MANIFEST_LOADING,{url:g})},b.startLoad=function(g){g===void 0&&(g=-1),u.logger.log("startLoad("+g+")"),this.networkControllers.forEach(function(E){E.startLoad(g)})},b.stopLoad=function(){u.logger.log("stopLoad"),this.networkControllers.forEach(function(g){g.stopLoad()})},b.swapAudioCodec=function(){u.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},b.recoverMediaError=function(){u.logger.log("recoverMediaError");var g=this._media;this.detachMedia(),g&&this.attachMedia(g)},b.removeLevel=function(g,E){E===void 0&&(E=0),this.levelController.removeLevel(g,E)},y(_,[{key:"levels",get:function(){var g=this.levelController.levels;return g||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(g){u.logger.log("set currentLevel:"+g),this.loadLevel=g,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(g){u.logger.log("set nextLevel:"+g),this.levelController.manualLevel=g,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(g){u.logger.log("set loadLevel:"+g),this.levelController.manualLevel=g}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(g){this.levelController.nextLoadLevel=g}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(g){u.logger.log("set firstLevel:"+g),this.levelController.firstLevel=g}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(g){u.logger.log("set startLevel:"+g),g!==-1&&(g=Math.max(g,this.minAutoLevel)),this.levelController.startLevel=g}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(g){var E=!!g;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(g){this._autoLevelCapping!==g&&(u.logger.log("set autoLevelCapping:"+g),this._autoLevelCapping=g)}},{key:"bandwidthEstimate",get:function(){var g=this.abrController.bwEstimator;return g?g.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var g=this.levels,E=this.config.minAutoBitrate;if(!g)return 0;for(var o=g.length,x=0;x<o;x++)if(g[x].maxBitrate>E)return x;return 0}},{key:"maxAutoLevel",get:function(){var g=this.levels,E=this.autoLevelCapping,o;return E===-1&&g&&g.length?o=g.length-1:o=E,o}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(g){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,g)}},{key:"audioTracks",get:function(){var g=this.audioTrackController;return g?g.audioTracks:[]}},{key:"audioTrack",get:function(){var g=this.audioTrackController;return g?g.audioTrack:-1},set:function(g){var E=this.audioTrackController;E&&(E.audioTrack=g)}},{key:"subtitleTracks",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTrack:-1},set:function(g){var E=this.subtitleTrackController;E&&(E.subtitleTrack=g)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var g=this.subtitleTrackController;return g?g.subtitleDisplay:!1},set:function(g){var E=this.subtitleTrackController;E&&(E.subtitleDisplay=g)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(g){this.config.lowLatencyMode=g}},{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(g){_.defaultConfig=g}}]),_}();v.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 O});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 O(){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 u}),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 O(i){var n=typeof Map=="function"?new Map:void 0;return O=function(c){if(c===null||!p(c))return c;if(typeof c!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(c))return n.get(c);n.set(c,y)}function y(){return T(c,arguments,d(this).constructor)}return y.prototype=Object.create(c.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),h(y,c)},O(i)}function T(i,n,t){return l()?T=Reflect.construct:T=function(y,v,_){var b=[null];b.push.apply(b,v);var m=Function.bind.apply(y,b),g=new m;return _&&h(g,_.prototype),g},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(c,y){return c.__proto__=y,c},h(i,n)}function d(i){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(i)}var a=Math.pow(2,17),u=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(c,y){var v=this,_=c.url;if(!_)return Promise.reject(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,networkDetails:null},"Fragment does not have a "+(_?"part list":"url")));this.abort();var b=this.config,m=b.fLoader,g=b.loader;return new Promise(function(E,o){v.loader&&v.loader.destroy();var x=v.loader=c.loader=m?new m(b):new g(b),C=s(c),A={timeout:b.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:b.fragLoadingMaxRetryTimeout,highWaterMark:a};c.stats=x.stats,x.load(C,A,{onSuccess:function(I,F,H,te){v.resetLoader(c,x),E({frag:c,part:null,payload:I.data,networkDetails:te})},onError:function(I,F,H){v.resetLoader(c,x),o(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,response:I,networkDetails:H}))},onAbort:function(I,F,H){v.resetLoader(c,x),o(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:c,networkDetails:H}))},onTimeout:function(I,F,H){v.resetLoader(c,x),o(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c,networkDetails:H}))},onProgress:function(I,F,H,te){y&&y({frag:c,part:null,payload:H,networkDetails:te})}})})},n.loadPart=function(c,y,v){var _=this;this.abort();var b=this.config,m=b.fLoader,g=b.loader;return new Promise(function(E,o){_.loader&&_.loader.destroy();var x=_.loader=c.loader=m?new m(b):new g(b),C=s(c,y),A={timeout:b.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:b.fragLoadingMaxRetryTimeout,highWaterMark:a};y.stats=x.stats,x.load(C,A,{onSuccess:function(I,F,H,te){_.resetLoader(c,x),_.updateStatsFromPart(c,y);var j={frag:c,part:y,payload:I.data,networkDetails:te};v(j),E(j)},onError:function(I,F,H){_.resetLoader(c,x),o(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,part:y,response:I,networkDetails:H}))},onAbort:function(I,F,H){c.stats.aborted=y.stats.aborted,_.resetLoader(c,x),o(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:c,part:y,networkDetails:H}))},onTimeout:function(I,F,H){_.resetLoader(c,x),o(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c,part:y,networkDetails:H}))}})})},n.updateStatsFromPart=function(c,y){var v=c.stats,_=y.stats,b=_.total;if(v.loaded+=_.loaded,b){var m=Math.round(c.duration/y.duration),g=Math.min(Math.round(v.loaded/b),m),E=m-g,o=E*Math.round(v.loaded/g);v.total=v.loaded+o}else v.total=Math.max(v.loaded,v.total);var x=v.loading,C=_.loading;x.start?x.first+=C.first-C.start:(x.start=C.start,x.first=C.first),x.end=C.end},n.resetLoader=function(c,y){c.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,c={frag:i,part:n,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},y=t.byteRangeStartOffset,v=t.byteRangeEndOffset;return Object(w.isFiniteNumber)(y)&&Object(w.isFiniteNumber)(v)&&(c.rangeStart=y,c.rangeEnd=v),c}var f=function(i){S(n,i);function n(t){for(var c,y=arguments.length,v=new Array(y>1?y-1:0),_=1;_<y;_++)v[_-1]=arguments[_];return c=i.call.apply(i,[this].concat(v))||this,c.data=void 0,c.data=t,c}return n}(O(Error))},"./src/loader/fragment.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"ElementaryStreamTypes",function(){return u}),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),O=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,v){return y.__proto__=v,y},h(n,t)}function d(n,t){for(var c=0;c<t.length;c++){var y=t[c];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(n,y.key,y)}}function a(n,t,c){return t&&d(n.prototype,t),c&&d(n,c),n}var u;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(u||(u={}));var s=function(){function n(c){var y;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(y={},y[u.AUDIO]=null,y[u.VIDEO]=null,y[u.AUDIOVIDEO]=null,y),this.baseurl=c}var t=n.prototype;return t.setByteRange=function(y,v){var _=y.split("@",2),b=[];_.length===1?b[0]=v?v.byteRangeEndOffset:0:b[0]=parseInt(_[1]),b[1]=parseInt(_[0])+b[0],this._byteRange=b},a(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,v){var _;return _=n.call(this,v)||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 c=t.prototype;return c.createInitializationVector=function(v){for(var _=new Uint8Array(16),b=12;b<16;b++)_[b]=v>>8*(15-b)&255;return _},c.setDecryptDataFromLevelKey=function(v,_){var b=v;return(v==null?void 0:v.method)==="AES-128"&&v.uri&&!v.iv&&(b=T.LevelKey.fromURI(v.uri),b.method=v.method,b.iv=this.createInitializationVector(_),b.keyFormat="identity"),b},c.setElementaryStreamInfo=function(v,_,b,m,g,E){E===void 0&&(E=!1);var o=this.elementaryStreams,x=o[v];if(!x){o[v]={startPTS:_,endPTS:b,startDTS:m,endDTS:g,partial:E};return}x.startPTS=Math.min(x.startPTS,_),x.endPTS=Math.max(x.endPTS,b),x.startDTS=Math.min(x.startDTS,m),x.endDTS=Math.max(x.endDTS,g)},c.clearElementaryStreamInfo=function(){var v=this.elementaryStreams;v[u.AUDIO]=null,v[u.VIDEO]=null,v[u.AUDIOVIDEO]=null},a(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var v=this.sn;typeof v!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&O.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),v=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,v)}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 v=Object(w.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+v*1e3}},{key:"encrypted",get:function(){var v;return!!((v=this.decryptdata)!==null&&v!==void 0&&v.keyFormat&&this.decryptdata.uri)}}]),t}(s),i=function(n){p(t,n);function t(c,y,v,_,b){var m;m=n.call(this,v)||this,m.fragOffset=0,m.duration=0,m.gap=!1,m.independent=!1,m.relurl=void 0,m.fragment=void 0,m.index=void 0,m.stats=new l.LoadStats,m.duration=c.decimalFloatingPoint("DURATION"),m.gap=c.bool("GAP"),m.independent=c.bool("INDEPENDENT"),m.relurl=c.enumeratedString("URI"),m.fragment=y,m.index=_;var g=c.enumeratedString("BYTERANGE");return g&&m.setByteRange(g,b),b&&(m.fragOffset=b.fragOffset+b.duration),m}return a(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 O});var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/utils/logger.ts"),O=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 a=d.frag,u=a.type,s=this.loaders[u];if(!a.decryptdata){S.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=a.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:"+u),s.abort()),!f){S.logger.warn("key uri is falsy");return}var n=i.loader,t=a.loader=this.loaders[u]=new n(i);this.decrypturl=f,this.decryptkey=null;var c={url:f,frag:a,responseType:"arraybuffer"},y={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:i.fragLoadingRetryDelay,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:0},v={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};t.load(c,y,v)}else this.decryptkey&&(a.decryptdata.key=this.decryptkey,this.hls.trigger(w.Events.KEY_LOADED,{frag:a}))},l.loadsuccess=function(h,d,a){var u=a.frag;if(!u.decryptdata){S.logger.error("after key load, decryptdata unset");return}this.decryptkey=u.decryptdata.key=new Uint8Array(h.data),u.loader=null,delete this.loaders[u.type],this.hls.trigger(w.Events.KEY_LOADED,{frag:u})},l.loaderror=function(h,d){var a=d.frag,u=a.loader;u&&u.abort(),delete this.loaders[a.type],this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:a,response:h})},l.loadtimeout=function(h,d){var a=d.frag,u=a.loader;u&&u.abort(),delete this.loaders[a.type],this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:a})},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 O=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 a=this.lastPartSn-d.lastPartSn,u=this.lastPartIndex-d.lastPartIndex;this.updated=this.endSN!==d.endSN||!!u||!!a,this.advanced=this.endSN>d.endSN||a>0||a===0&&u>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||O}},{key:"drift",get:function(){var d=this.driftEndTime-this.driftStartTime;if(d>0){var a=this.driftEnd-this.driftStart;return a*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 O(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 O(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),O=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"),a=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,u=/#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 m,g;return i.test((m=(g=P.parseURL(b))===null||g===void 0?void 0:g.path)!=null?m:"")}var t=function(){function b(){}return b.findGroup=function(g,E){for(var o=0;o<g.length;o++){var x=g[o];if(x.id===E)return x}},b.convertAVC1ToAVCOTI=function(g){var E=g.split(".");if(E.length>2){var o=E.shift()+".";return o+=parseInt(E.shift()).toString(16),o+=("000"+parseInt(E.shift()).toString(16)).substr(-4),o}return g},b.resolve=function(g,E){return P.buildAbsoluteURL(E,g,{alwaysNormalize:!0})},b.parseMasterPlaylist=function(g,E){var o=[],x={},C=!1;a.lastIndex=0;for(var A;(A=a.exec(g))!=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),c((D.CODECS||"").split(/[ ,]+/).filter(function(te){return te}),I),I.videoCodec&&I.videoCodec.indexOf("avc1")!==-1&&(I.videoCodec=b.convertAVC1ToAVCOTI(I.videoCodec)),o.push(I)}else if(A[3]){var H=new p.AttrList(A[3]);H["DATA-ID"]&&(C=!0,x[H["DATA-ID"]]=H)}return{levels:o,sessionData:C?x:null}},b.parseMasterPlaylistMedia=function(g,E,o,x){x===void 0&&(x=[]);var C,A=[],D=0;for(u.lastIndex=0;(C=u.exec(g))!==null;){var I=new p.AttrList(C[1]);if(I.TYPE===o){var F={attrs:I,bitrate:0,id:D++,groupId:I["GROUP-ID"],instreamId:I["INSTREAM-ID"],name:I.NAME||I.LANGUAGE||"",type:o,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 H=b.findGroup(x,F.groupId)||x[0];y(F,H,"audioCodec"),y(F,H,"textCodec")}A.push(F)}}return A},b.parseLevelPlaylist=function(g,E,o,x,C){var A=new T.LevelDetails(E),D=A.fragments,I=null,F=0,H=0,te=0,j=0,G=null,X=new O.Fragment(x,E),J,B,Q,ie=-1,oe=!1;for(s.lastIndex=0,A.m3u8=g;(J=s.exec(g))!==null;){oe&&(oe=!1,X=new O.Fragment(x,E),X.start=te,X.sn=F,X.cc=j,X.level=o,I&&(X.initSegment=I,X.rawProgramDateTime=I.rawProgramDateTime));var Ee=J[1];if(Ee){X.duration=parseFloat(Ee);var ye=(" "+J[2]).slice(1);X.title=ye||null,X.tagList.push(ye?["INF",Ee,ye]:["INF",Ee])}else if(J[3])Object(w.isFiniteNumber)(X.duration)&&(X.start=te,Q&&(X.levelkey=Q),X.sn=F,X.level=o,X.cc=j,X.urlId=C,D.push(X),X.relurl=(" "+J[3]).slice(1),_(X,G),G=X,te+=X.duration,F++,H=0,oe=!0);else if(J[4]){var Le=(" "+J[4]).slice(1);G?X.setByteRange(Le,G):X.setByteRange(Le)}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),Ce=(" "+J[B+1]).slice(1),Be=J[B+2]?(" "+J[B+2]).slice(1):"";switch(pe){case"PLAYLIST-TYPE":A.type=Ce.toUpperCase();break;case"MEDIA-SEQUENCE":F=A.startSN=parseInt(Ce);break;case"SKIP":{var Pe=new p.AttrList(Ce),ke=Pe.decimalInteger("SKIPPED-SEGMENTS");if(Object(w.isFiniteNumber)(ke)){A.skippedSegments=ke;for(var Ne=ke;Ne--;)D.unshift(null);F+=ke}var he=Pe.enumeratedString("RECENTLY-REMOVED-DATERANGES");he&&(A.recentlyRemovedDateranges=he.split(" "));break}case"TARGETDURATION":A.targetduration=parseFloat(Ce);break;case"VERSION":A.version=parseInt(Ce);break;case"EXTM3U":break;case"ENDLIST":A.live=!1;break;case"#":(Ce||Be)&&X.tagList.push(Be?[Ce,Be]:[Ce]);break;case"DIS":j++;case"GAP":X.tagList.push([pe]);break;case"BITRATE":X.tagList.push([pe,Ce]);break;case"DISCONTINUITY-SEQ":j=parseInt(Ce);break;case"KEY":{var ue,Ie=new p.AttrList(Ce),Ue=Ie.enumeratedString("METHOD"),Ye=Ie.URI,ee=Ie.hexadecimalInteger("IV"),M=Ie.enumeratedString("KEYFORMATVERSIONS"),N=Ie.enumeratedString("KEYID"),$=(ue=Ie.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(Ce),me=Y.decimalFloatingPoint("TIME-OFFSET");Object(w.isFiniteNumber)(me)&&(A.startTimeOffset=me);break}case"MAP":{var Re=new p.AttrList(Ce);X.relurl=Re.URI,Re.BYTERANGE&&X.setByteRange(Re.BYTERANGE),X.level=o,X.sn="initSegment",Q&&(X.levelkey=Q),X.initSegment=null,I=X,oe=!0;break}case"SERVER-CONTROL":{var rt=new p.AttrList(Ce);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 De=new p.AttrList(Ce);A.partTarget=De.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Me=A.partList;Me||(Me=A.partList=[]);var Xe=H>0?Me[Me.length-1]:void 0,tt=H++,Ve=new O.Part(new p.AttrList(Ce),X,E,tt,Xe);Me.push(Ve),X.duration+=Ve.duration;break}case"PRELOAD-HINT":{var Ke=new p.AttrList(Ce);A.preloadHint=Ke;break}case"RENDITION-REPORT":{var we=new p.AttrList(Ce);A.renditionReports=A.renditionReports||[],A.renditionReports.push(we);break}default:h.logger.warn("line parsed but not handled: "+J);break}}}G&&!G.relurl?(D.pop(),te-=G.duration,A.partList&&(A.fragmentHint=G)):A.partList&&(_(X,G),X.cc=j,A.fragmentHint=X);var Ae=D.length,Oe=D[0],fe=D[Ae-1];if(te+=A.skippedSegments*A.targetduration,te>0&&Ae&&fe){A.averagetargetduration=te/Ae;var ge=fe.sn;A.endSN=ge!=="initSegment"?ge:0,Oe&&(A.startCC=Oe.cc,Oe.initSegment||A.fragments.every(function(_e){return _e.relurl&&n(_e.relurl)})&&(h.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),X=new O.Fragment(x,E),X.relurl=fe.relurl,X.level=o,X.sn="initSegment",Oe.initSegment=X,A.needSidxRanges=!0))}else A.endSN=0,A.startCC=0;return A.fragmentHint&&(te+=A.fragmentHint.duration),A.totalduration=te,A.endCC=j,ie>0&&v(D,ie),A},b}();function c(b,m){["video","audio","text"].forEach(function(g){var E=b.filter(function(x){return Object(d.isCodecType)(x,g)});if(E.length){var o=E.filter(function(x){return x.lastIndexOf("avc1",0)===0||x.lastIndexOf("mp4a",0)===0});m[g+"Codec"]=o.length>0?o[0]:E[0],b=b.filter(function(x){return E.indexOf(x)===-1})}}),m.unknownCodecs=b}function y(b,m,g){var E=m[g];E&&(b[g]=E)}function v(b,m){for(var g=b[m],E=m;E--;){var o=b[E];if(!o)return;o.programDateTime=g.programDateTime-o.duration*1e3,g=o}}function _(b,m){b.rawProgramDateTime?b.programDateTime=Date.parse(b.rawProgramDateTime):m!=null&&m.programDateTime&&(b.programDateTime=m.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"),O=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 a(s,f){var i=s.url;return(i===void 0||i.indexOf("data:")===0)&&(i=f.url),i}var u=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,c=t.pLoader,y=t.loader,v=c||y,_=new v(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 c=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:p.PlaylistContextType.MANIFEST,url:c,deliveryDirectives:null})},f.onLevelLoading=function(n,t){var c=t.id,y=t.level,v=t.url,_=t.deliveryDirectives;this.load({id:c,groupId:null,level:y,responseType:"text",type:p.PlaylistContextType.LEVEL,url:v,deliveryDirectives:_})},f.onAudioTrackLoading=function(n,t){var c=t.id,y=t.groupId,v=t.url,_=t.deliveryDirectives;this.load({id:c,groupId:y,level:null,responseType:"text",type:p.PlaylistContextType.AUDIO_TRACK,url:v,deliveryDirectives:_})},f.onSubtitleTrackLoading=function(n,t){var c=t.id,y=t.groupId,v=t.url,_=t.deliveryDirectives;this.load({id:c,groupId:y,level:null,responseType:"text",type:p.PlaylistContextType.SUBTITLE_TRACK,url:v,deliveryDirectives:_})},f.load=function(n){var t,c=this.hls.config,y=this.getInternalLoader(n);if(y){var v=y.context;if(v&&v.url===n.url){O.logger.trace("[playlist-loader]: playlist request ongoing");return}O.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),y.abort()}var _,b,m,g;switch(n.type){case p.PlaylistContextType.MANIFEST:_=c.manifestLoadingMaxRetry,b=c.manifestLoadingTimeOut,m=c.manifestLoadingRetryDelay,g=c.manifestLoadingMaxRetryTimeout;break;case p.PlaylistContextType.LEVEL:case p.PlaylistContextType.AUDIO_TRACK:case p.PlaylistContextType.SUBTITLE_TRACK:_=0,b=c.levelLoadingTimeOut;break;default:_=c.levelLoadingMaxRetry,b=c.levelLoadingTimeOut,m=c.levelLoadingRetryDelay,g=c.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 o=E.partTarget,x=E.targetduration;o&&x&&(b=Math.min(Math.max(o*3,x*.8)*1e3,b))}}var C={timeout:b,maxRetry:_,retryDelay:m,maxRetryDelay:g,highWaterMark:0},A={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};y.load(n,C,A)},f.loadsuccess=function(n,t,c,y){if(y===void 0&&(y=null),c.isSidxRequest){this.handleSidxRequest(n,c),this.handlePlaylistLoaded(n,t,c,y);return}this.resetInternalLoader(c.type);var v=n.data;if(v.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,c,"no EXTM3U delimiter",y);return}t.parsing.start=performance.now(),v.indexOf("#EXTINF:")>0||v.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,t,c,y):this.handleMasterPlaylist(n,t,c,y)},f.loaderror=function(n,t,c){c===void 0&&(c=null),this.handleNetworkError(t,c,!1,n)},f.loadtimeout=function(n,t,c){c===void 0&&(c=null),this.handleNetworkError(t,c,!0)},f.handleMasterPlaylist=function(n,t,c,y){var v=this.hls,_=n.data,b=a(n,c),m=l.default.parseMasterPlaylist(_,b),g=m.levels,E=m.sessionData;if(!g.length){this.handleManifestParsingError(n,c,"no level found in manifest",y);return}var o=g.map(function(F){return{id:F.attrs.AUDIO,audioCodec:F.audioCodec}}),x=g.map(function(F){return{id:F.attrs.SUBTITLES,textCodec:F.textCodec}}),C=l.default.parseMasterPlaylistMedia(_,b,"AUDIO",o),A=l.default.parseMasterPlaylistMedia(_,b,"SUBTITLES",x),D=l.default.parseMasterPlaylistMedia(_,b,"CLOSED-CAPTIONS");if(C.length){var I=C.some(function(F){return!F.url});!I&&g[0].audioCodec&&!g[0].attrs.AUDIO&&(O.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),C.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new h.AttrList({}),bitrate:0,url:""}))}v.trigger(P.Events.MANIFEST_LOADED,{levels:g,audioTracks:C,subtitles:A,captions:D,url:b,stats:t,networkDetails:y,sessionData:E})},f.handleTrackOrLevelPlaylist=function(n,t,c,y){var v=this.hls,_=c.id,b=c.level,m=c.type,g=a(n,c),E=Object(w.isFiniteNumber)(_)?_:0,o=Object(w.isFiniteNumber)(b)?b:E,x=d(c),C=l.default.parseLevelPlaylist(n.data,g,o,x,E);if(!C.fragments.length){v.trigger(P.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:typeof c.level=="number"?c.level:void 0});return}if(m===p.PlaylistContextType.MANIFEST){var A={attrs:new h.AttrList({}),bitrate:0,details:C,name:"",url:g};v.trigger(P.Events.MANIFEST_LOADED,{levels:[A],audioTracks:[],url:g,stats:t,networkDetails:y,sessionData:null})}if(t.parsing.end=performance.now(),C.needSidxRanges){var D,I=(D=C.fragments[0].initSegment)===null||D===void 0?void 0:D.url;this.load({url:I,isSidxRequest:!0,type:m,level:b,levelDetails:C,id:_,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}c.levelDetails=C,this.handlePlaylistLoaded(n,t,c,y)},f.handleSidxRequest=function(n,t){var c=Object(T.parseSegmentIndex)(new Uint8Array(n.data));if(!c)return;var y=c.references,v=t.levelDetails;y.forEach(function(_,b){var m=_.info,g=v.fragments[b];g.byteRange.length===0&&g.setByteRange(String(1+m.end-m.start)+"@"+String(m.start)),g.initSegment&&g.initSegment.setByteRange(String(c.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(n,t,c,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:c,response:n,context:t,networkDetails:y})},f.handleNetworkError=function(n,t,c,y){c===void 0&&(c=!1),O.logger.warn("[playlist-loader]: A network "+(c?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var v=S.ErrorDetails.UNKNOWN,_=!1,b=this.getInternalLoader(n);switch(n.type){case p.PlaylistContextType.MANIFEST:v=c?S.ErrorDetails.MANIFEST_LOAD_TIMEOUT:S.ErrorDetails.MANIFEST_LOAD_ERROR,_=!0;break;case p.PlaylistContextType.LEVEL:v=c?S.ErrorDetails.LEVEL_LOAD_TIMEOUT:S.ErrorDetails.LEVEL_LOAD_ERROR,_=!1;break;case p.PlaylistContextType.AUDIO_TRACK:v=c?S.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:S.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,_=!1;break;case p.PlaylistContextType.SUBTITLE_TRACK:v=c?S.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:S.ErrorDetails.SUBTITLE_LOAD_ERROR,_=!1;break}b&&this.resetInternalLoader(n.type);var m={type:S.ErrorTypes.NETWORK_ERROR,details:v,fatal:_,url:n.url,loader:b,context:n,networkDetails:t};y&&(m.response=y),this.hls.trigger(P.Events.ERROR,m)},f.handlePlaylistLoaded=function(n,t,c,y){var v=c.type,_=c.level,b=c.id,m=c.groupId,g=c.loader,E=c.levelDetails,o=c.deliveryDirectives;if(!(E!=null&&E.targetduration)){this.handleManifestParsingError(n,c,"invalid target duration",y);return}if(!g)return;E.live&&(g.getCacheAge&&(E.ageHeader=g.getCacheAge()||0),(!g.getCacheAge||isNaN(E.ageHeader))&&(E.ageHeader=0));switch(v){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:o});break;case p.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(P.Events.AUDIO_TRACK_LOADED,{details:E,id:b||0,groupId:m||"",stats:t,networkDetails:y,deliveryDirectives:o});break;case p.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(P.Events.SUBTITLE_TRACK_LOADED,{details:E,id:b||0,groupId:m||"",stats:t,networkDetails:y,deliveryDirectives:o});break}},s}();Z.default=u},"./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(O,T){switch(O){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 a=new Uint8Array([105,115,111,109]),u=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);S.FTYP=S.box(S.types.ftyp,a,s,a,u),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 a=h.length,u=a;a--;)l+=h[a].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),a=0,l=8;a<u;a++)s.set(h[a],l),l+=h[a].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,a;for(h=0;h<T.sps.length;h++)d=T.sps[h],a=d.byteLength,l.push(a>>>8&255),l.push(a&255),l=l.concat(Array.prototype.slice.call(d));for(h=0;h<T.pps.length;h++)d=T.pps[h],a=d.byteLength,p.push(a>>>8&255),p.push(a&255),p=p.concat(Array.prototype.slice.call(d));var u=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]),u,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,a=Math.floor(p/(w+1)),u=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,a>>24,a>>16&255,a>>8&255,a&255,u>>24,u>>16&255,u>>8&255,u&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)),a=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,a>>24,a>>16&255,a>>8&255,a&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,a=new Uint8Array(d),u,s,f,i,n,t;for(l+=8+d,a.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),u=0;u<h;u++)s=p[u],f=s.duration,i=s.size,n=s.flags,t=s.cts,a.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*u);return S.box(S.types.trun,a)},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 c});var w=U("./src/polyfills/number.ts"),P=U("./src/remux/aac-helper.ts"),S=U("./src/remux/mp4-generator.ts"),O=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 m=1;m<arguments.length;m++){var g=arguments[m];for(var E in g)Object.prototype.hasOwnProperty.call(g,E)&&(b[E]=g[E])}return b},d.apply(this,arguments)}var a=10*1e3,u=1024,s=1152,f=null,i=null,n=!1,t=function(){function b(g,E,o,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=g,this.config=E,this.typeSupported=o,this.ISGenerated=!1,f===null){var C=navigator.userAgent||"",A=C.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 m=b.prototype;return m.destroy=function(){},m.resetTimeStamp=function(E){l.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=E},m.resetNextTimestamp=function(){l.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},m.resetInitSegment=function(){l.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},m.getVideoStartPts=function(E){var o=!1,x=E.reduce(function(C,A){var D=A.pts-C;return D<-4294967296?(o=!0,c(C,A.pts)):D>0?C:A.pts},E[0].pts);return o&&l.logger.debug("PTS rollover detected"),x},m.remux=function(E,o,x,C,A,D,I,F){var H,te,j,G,X,J,B=A,Q=A,ie=E.pid>-1,oe=o.pid>-1,Ee=o.samples.length,ye=E.samples.length>0,Le=Ee>1,pe=(!ie||ye)&&(!oe||Le)||this.ISGenerated||I;if(pe){this.ISGenerated||(j=this.generateIS(E,o,A));var Ce=this.isVideoContiguous,Be=-1;if(Le&&(Be=y(o.samples),!Ce&&this.config.forceKeyFrameOnDiscontinuity))if(J=!0,Be>0){l.logger.warn("[mp4-remuxer]: Dropped "+Be+" out of "+Ee+" video samples due to a missing keyframe");var Pe=this.getVideoStartPts(o.samples);o.samples=o.samples.slice(Be),o.dropped+=Be,Q+=(o.samples[0].pts-Pe)/(o.timescale||9e4)}else Be===-1&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+Ee+" video samples"),J=!1);if(this.ISGenerated){if(ye&&Le){var ke=this.getVideoStartPts(o.samples),Ne=c(E.samples[0].pts,ke)-ke,he=Ne/o.inputTimeScale;B+=Math.max(0,he),Q+=Math.max(0,-he)}if(ye){if(E.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),j=this.generateIS(E,o,A)),te=this.remuxAudio(E,B,this.isAudioContiguous,D,oe||Le||F===p.PlaylistLevelType.AUDIO?Q:void 0),Le){var ue=te?te.endPTS-te.startPTS:0;o.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),j=this.generateIS(E,o,A)),H=this.remuxVideo(o,Q,Ce,ue)}}else Le&&(H=this.remuxVideo(o,Q,Ce,0));H&&(H.firstKeyFrame=Be,H.independent=Be!==-1)}}return this.ISGenerated&&(x.samples.length&&(X=this.remuxID3(x,A)),C.samples.length&&(G=this.remuxText(C,A))),{audio:te,video:H,initSegment:j,independent:J,text:G,id3:X}},m.generateIS=function(E,o,x){var C=E.samples,A=o.samples,D=this.typeSupported,I={},F=!Object(w.isFiniteNumber)(this._initPTS),H="audio/mp4",te,j,G;if(F&&(te=j=Infinity),E.config&&C.length&&(E.timescale=E.samplerate,E.isAAC||(D.mpeg?(H="audio/mpeg",E.codec=""):D.mp3&&(E.codec="mp3")),I.audio={id:"audio",container:H,codec:E.codec,initSegment:!E.isAAC&&D.mpeg?new Uint8Array(0):S.default.initSegment([E]),metadata:{channelCount:E.channelCount}},F&&(G=E.inputTimeScale,te=j=C[0].pts-Math.round(G*x))),o.sps&&o.pps&&A.length&&(o.timescale=o.inputTimeScale,I.video={id:"main",container:"video/mp4",codec:o.codec,initSegment:S.default.initSegment([o]),metadata:{width:o.width,height:o.height}},F)){G=o.inputTimeScale;var X=this.getVideoStartPts(A),J=Math.round(G*x);j=Math.min(j,c(A[0].dts,X)-J),te=Math.min(te,X-J)}if(Object.keys(I).length)return this.ISGenerated=!0,F&&(this._initPTS=te,this._initDTS=j),{tracks:I,initPTS:te,timescale:G}},m.remuxVideo=function(E,o,x,C){var A=E.inputTimeScale,D=E.samples,I=[],F=D.length,H=this._initPTS,te=this.nextAvcDts,j=8,G,X,J,B=Number.POSITIVE_INFINITY,Q=Number.NEGATIVE_INFINITY,ie=0,oe=!1;if(!x||te===null){var Ee=o*A,ye=D[0].pts-c(D[0].dts,D[0].pts);te=Ee-ye}for(var Le=0;Le<F;Le++){var pe=D[Le];if(pe.pts=c(pe.pts-H,te),pe.dts=c(pe.dts-H,te),pe.dts>pe.pts){var Ce=9e4*.2;ie=Math.max(Math.min(ie,pe.pts-pe.dts),-1*Ce)}pe.dts<D[Le>0?Le-1:Le].dts&&(oe=!0)}oe&&D.sort(function(Lt,lt){var ft=Lt.dts-lt.dts,Qe=Lt.pts-lt.pts;return ft||Qe}),X=D[0].dts,J=D[D.length-1].dts;var Be=Math.round((J-X)/(F-1));if(ie<0){if(ie<Be*-2){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(h.toMsFromMpegTsClock)(-Be,!0)+" ms");for(var Pe=ie,ke=0;ke<F;ke++)D[ke].dts=Pe=Math.max(Pe,D[ke].pts-Be),D[ke].pts=Math.max(Pe,D[ke].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 Ne=0;Ne<F;Ne++)D[Ne].dts=D[Ne].dts+ie}X=D[0].dts}if(x){var he=X-te,ue=he>Be,Ie=he<-1;if(ue||Ie){ue?l.logger.warn("AVC: "+Object(h.toMsFromMpegTsClock)(he,!0)+" ms ("+he+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(h.toMsFromMpegTsClock)(-he,!0)+" ms ("+he+"dts) overlapping between fragments detected"),X=te;var Ue=D[0].pts-he;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)(he,!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(Lt){this.observer.emit(O.Events.ERROR,O.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 De=new DataView(rt.buffer);De.setUint32(0,Re),rt.set(S.default.types.mdat,4);for(var Me=0;Me<F;Me++){for(var Xe=D[Me],tt=Xe.units,Ve=0,Ke=0,we=tt.length;Ke<we;Ke++){var Ae=tt[Ke],Oe=Ae.data,fe=Ae.data.byteLength;De.setUint32(j,fe),j+=4,rt.set(Oe,j),j+=fe,Ve+=4+fe}if(Me<F-1)G=D[Me+1].dts-Xe.dts;else{var ge=this.config,_e=Xe.dts-D[Me>0?Me-1:Me].dts;if(ge.stretchShortVideoTrack&&this.nextAudioPts!==null){var be=Math.floor(ge.maxBufferHole*A),Ge=(C?B+C*A:this.nextAudioPts)-Xe.pts;Ge>be?(G=Ge-_e,G<0&&(G=_e),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=_e}else G=_e}var qe=Math.round(Xe.pts-Xe.dts);I.push(new v(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=te=J+G,this.isVideoContiguous=!0;var Dt=S.default.moof(E.sequenceNumber++,X,d({},E,{samples:I})),jt="video",Rt={data1:Dt,data2:rt,startPTS:B/A,endPTS:(Q+G)/A,startDTS:X/A,endDTS:te/A,type:jt,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"),Rt},m.remuxAudio=function(E,o,x,C,A){var D=E.inputTimeScale,I=E.samplerate?E.samplerate:D,F=D/I,H=E.isAAC?u:s,te=H*F,j=this._initPTS,G=!E.isAAC&&this.typeSupported.mpeg,X=[],J=E.samples,B=G?0:8,Q=this.nextAudioPts||-1,ie=o*D;if(this.isAudioContiguous=x=x||J.length&&Q>0&&(C&&Math.abs(ie-Q)<9e3||Math.abs(c(J[0].pts-j,ie)-Q)<20*te),J.forEach(function(Oe){Oe.pts=c(Oe.pts-j,ie)}),!x||Q<0){if(J=J.filter(function(Oe){return Oe.pts>=0}),!J.length)return;A===0?Q=0:C?Q=Math.max(0,ie):Q=J[0].pts}if(E.isAAC)for(var oe=A!==void 0,Ee=this.config.maxAudioFramesDrift,ye=0,Le=Q;ye<J.length;ye++){var pe=J[ye],Ce=pe.pts,Be=Ce-Le,Pe=Math.abs(1e3*Be/D);if(Be<=-Ee*te&&oe)ye===0&&(l.logger.warn("Audio frame @ "+(Ce/D).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Be/D)+" ms."),this.nextAudioPts=Q=Le=Ce);else if(Be>=Ee*te&&Pe<a&&oe){var ke=Math.round(Be/te);Le=Ce-ke*te,Le<0&&(ke--,Le+=te),ye===0&&(this.nextAudioPts=Q=Le),l.logger.warn("[mp4-remuxer]: Injecting "+ke+" audio frame @ "+(Le/D).toFixed(3)+"s due to "+Math.round(1e3*Be/D)+" ms gap.");for(var Ne=0;Ne<ke;Ne++){var he=Math.max(Le,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:he}),Le+=te,ye++}}pe.pts=Le,Le+=te}for(var Ie=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),Ie=me,ee>0){ee+=B;try{Ye=new Uint8Array(ee)}catch(Oe){this.observer.emit(O.Events.ERROR,O.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 De=Y.byteLength;B+=De,X.push(new v(!0,H,De,0)),Ue=me}var Me=X.length;if(!Me)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++,Ie/F,d({},E,{samples:X}));E.samples=[];var Ve=Ie/D,Ke=Q/D,we="audio",Ae={data1:tt,data2:Ye,startPTS:Ve,endPTS:Ke,startDTS:Ve,endDTS:Ke,type:we,hasAudio:!0,hasVideo:!1,nb:Me};return this.isAudioContiguous=!0,console.assert(Ye.length,"MDAT length must not be zero"),Ae},m.remuxEmptyAudio=function(E,o,x,C){var A=E.inputTimeScale,D=E.samplerate?E.samplerate:A,I=A/D,F=this.nextAudioPts,H=(F!==null?F:C.startDTS*A)+this._initDTS,te=C.endDTS*A+this._initDTS,j=I*u,G=Math.ceil((te-H)/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=H+B*j;J.push({unit:X,pts:Q,dts:Q})}return E.samples=J,this.remuxAudio(E,o,x,!1)},m.remuxID3=function(E,o){var x=E.samples.length;if(!x)return;for(var C=E.inputTimeScale,A=this._initPTS,D=this._initDTS,I=0;I<x;I++){var F=E.samples[I];F.pts=c(F.pts-A,o*C)/C,F.dts=c(F.dts-D,o*C)/C}var H=E.samples;return E.samples=[],{samples:H}},m.remuxText=function(E,o){var x=E.samples.length;if(!x)return;for(var C=E.inputTimeScale,A=this._initPTS,D=0;D<x;D++){var I=E.samples[D];I.pts=c(I.pts-A,o*C)/C}E.samples.sort(function(H,te){return H.pts-te.pts});var F=E.samples;return E.samples=[],{samples:F}},b}();function c(b,m){var g;if(m===null)return b;for(m<b?g=-8589934592:g=8589934592;Math.abs(b-m)>4294967296;)b+=g;return b}function y(b){for(var m=0;m<b.length;m++)if(b[m].key)return m;return-1}var v=function(m,g,E,o){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=g,this.size=E,this.cts=o,this.flags=new _(m)},_=function(m){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=m?2:1,this.isNonSync=m?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"),O=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(u){this.initPTS=u,this.lastEndDTS=null},d.resetNextTimestamp=function(){this.lastEndDTS=null},d.resetInitSegment=function(u,s,f){this.audioCodec=s,this.videoCodec=f,this.generateInitSegment(u),this.emitInitSegment=!0},d.generateInitSegment=function(u){var s=this.audioCodec,f=this.videoCodec;if(!u||!u.byteLength){this.initTracks=void 0,this.initData=void 0;return}var i=this.initData=Object(P.parseInitSegment)(u);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:u,id:"main"}:i.audio?n.audio={container:"audio/mp4",codec:s,initSegment:u,id:"audio"}:i.video?n.video={container:"video/mp4",codec:f,initSegment:u,id:"main"}:O.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},d.remux=function(u,s,f,i,n){var t=this.initPTS,c=this.lastEndDTS,y={audio:void 0,video:void 0,text:i,id3:f,initSegment:void 0};Object(w.isFiniteNumber)(c)||(c=this.lastEndDTS=n||0);var v=s.samples;if(!v||!v.length)return y;var _={initPTS:void 0,timescale:1},b=this.initData;if((!b||!b.length)&&(this.generateInitSegment(v),b=this.initData),!b||!b.length)return O.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,v,c));var m=Object(P.getDuration)(v,b),g=c,E=m+g;Object(P.offsetStartDTS)(b,v,t),m>0?this.lastEndDTS=E:(O.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var o=!!b.audio,x=!!b.video,C="";o&&(C+="audio"),x&&(C+="video");var A={data1:v,startPTS:g,startDTS:g,endPTS:E,endDTS:E,type:C,hasAudio:o,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,a,u){return Object(P.getStartDTS)(d,a)-u};function p(h,d){var a=h==null?void 0:h.codec;return a&&a.length>4?a:a==="hvc1"?"hvc1.1.c.L120.90":a==="av01"?"av01.0.04M.08":a==="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 O});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 O;(function(T){T.VOD="v",T.LIVE="l"})(O||(O={}))},"./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 O}),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 a=h[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}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 O(p,h){var d=p.canSkipUntil,a=p.canSkipDateRanges,u=p.endSN,s=h!==void 0?h-u:0;return d&&s<d?a?S.v2:S.Yes:S.No}var T=function(){function p(d,a,u){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=d,this.part=a,this.skip=u}var h=p.prototype;return h.addDirectives=function(a){var u=new self.URL(a);return this.msn!==void 0&&u.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&u.searchParams.set("_HLS_part",this.part.toString()),this.skip&&u.searchParams.set("_HLS_skip",this.skip),u.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 a=d%this.url.length;this._urlId!==a&&(this.details=void 0,this._urlId=a)}}]),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(O,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=O,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 O(l){typeof l=="string"&&(l=O.parseAttrList(l));for(var p in l)l.hasOwnProperty(p)&&(this[p]=l[p])}var T=O.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),a=0;a<h.length/2;a++)d[a]=parseInt(h.slice(a*2,a*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)}},O.parseAttrList=function(p){var h,d={},a='"';for(P.lastIndex=0;(h=P.exec(p))!==null;){var u=h[2];u.indexOf(a)===0&&u.lastIndexOf(a)===u.length-1&&(u=u.slice(1,-1)),d[h[1]]=u}return d},O}()},"./src/utils/binary-search.ts":function(ae,Z,U){"use strict";U.r(Z);var w={search:function(S,O){for(var T=0,l=S.length-1,p=null,h=null;T<=l;){p=(T+l)/2|0,h=S[p];var d=O(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 O(){}return O.isBuffered=function(l,p){try{if(l){for(var h=O.getBuffered(l),d=0;d<h.length;d++)if(p>=h.start(d)&&p<=h.end(d))return!0}}catch(a){}return!1},O.bufferInfo=function(l,p,h){try{if(l){var d=O.getBuffered(l),a=[],u;for(u=0;u<d.length;u++)a.push({start:d.start(u),end:d.end(u)});return this.bufferedInfo(a,p,h)}}catch(s){}return{len:0,start:p,end:p,nextStart:void 0}},O.bufferedInfo=function(l,p,h){p=Math.max(0,p),l.sort(function(_,b){var m=_.start-b.start;return m||b.end-_.end});var d=[];if(h)for(var a=0;a<l.length;a++){var u=d.length;if(u){var s=d[u-1].end;l[a].start-s<h?l[a].end>s&&(d[u-1].end=l[a].end):d.push(l[a])}else d.push(l[a])}else d=l;for(var f=0,i,n=p,t=p,c=0;c<d.length;c++){var y=d[c].start,v=d[c].end;if(p+h>=y&&p<v)n=y,t=v,f=t-p;else if(p+h<y){i=y;break}}return{len:f,start:n||0,end:t||0,nextStart:i}},O.getBuffered=function(l){try{return l.buffered}catch(p){return w.logger.log("failed to get media.buffered",p),P}},O}()},"./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 c});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 o=E;return P.hasOwnProperty(E)&&(o=P[E]),String.fromCharCode(o)},O=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},a=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],u;(function(g){g[g.ERROR=0]="ERROR",g[g.TEXT=1]="TEXT",g[g.WARNING=2]="WARNING",g[g.INFO=2]="INFO",g[g.DEBUG=3]="DEBUG",g[g.DATA=3]="DATA"})(u||(u={}));var s=function(){function g(){this.time=null,this.verboseLevel=u.ERROR}var E=g.prototype;return E.log=function(x,C){this.verboseLevel>=x&&w.logger.log(this.time+" ["+x+"] "+C)},g}(),f=function(E){for(var o=[],x=0;x<E.length;x++)o.push(E[x].toString(16));return o},i=function(){function g(o,x,C,A,D){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=o||"white",this.underline=x||!1,this.italics=C||!1,this.background=A||"black",this.flash=D||!1}var E=g.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 C=["foreground","underline","italics","background","flash"],A=0;A<C.length;A++){var D=C[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},g}(),n=function(){function g(o,x,C,A,D,I){this.uchar=void 0,this.penState=void 0,this.uchar=o||" ",this.penState=new i(x,C,A,D,I)}var E=g.prototype;return E.reset=function(){this.uchar=" ",this.penState.reset()},E.setChar=function(x,C){this.uchar=x,this.penState.copy(C)},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()},g}(),t=function(){function g(o){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=o,this.pos=0,this.currPenState=new i}var E=g.prototype;return E.equals=function(x){for(var C=!0,A=0;A<T;A++)if(!this.chars[A].equals(x.chars[A])){C=!1;break}return C},E.copy=function(x){for(var C=0;C<T;C++)this.chars[C].copy(x.chars[C])},E.isEmpty=function(){for(var x=!0,C=0;C<T;C++)if(!this.chars[C].isEmpty()){x=!1;break}return x},E.setCursor=function(x){this.pos!==x&&(this.pos=x),this.pos<0?(this.logger.log(u.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>T&&(this.logger.log(u.DEBUG,"Too large cursor position "+this.pos),this.pos=T)},E.moveCursor=function(x){var C=this.pos+x;if(x>1)for(var A=this.pos+1;A<C+1;A++)this.chars[A].setPenState(this.currPenState);this.setCursor(C)},E.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},E.insertChar=function(x){x>=144&&this.backSpace();var C=S(x);if(this.pos>=T){this.logger.log(u.ERROR,"Cannot insert "+x.toString(16)+" ("+C+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(C,this.currPenState),this.moveCursor(1)},E.clearFromPos=function(x){var C;for(C=x;C<T;C++)this.chars[C].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=[],C=!0,A=0;A<T;A++){var D=this.chars[A].uchar;D!==" "&&(C=!1),x.push(D)}return C?"":x.join("")},E.setPenStyles=function(x){this.currPenState.setStyles(x);var C=this.chars[this.pos];C.setPenState(this.currPenState)},g}(),c=function(){function g(o){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<O;x++)this.rows.push(new t(o));this.logger=o,this.currRow=O-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var E=g.prototype;return E.reset=function(){for(var x=0;x<O;x++)this.rows[x].clear();this.currRow=O-1},E.equals=function(x){for(var C=!0,A=0;A<O;A++)if(!this.rows[A].equals(x.rows[A])){C=!1;break}return C},E.copy=function(x){for(var C=0;C<O;C++)this.rows[C].copy(x.rows[C])},E.isEmpty=function(){for(var x=!0,C=0;C<O;C++)if(!this.rows[C].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 C=this.rows[this.currRow];C.insertChar(x)},E.setPen=function(x){var C=this.rows[this.currRow];C.setPenStyles(x)},E.moveCursor=function(x){var C=this.rows[this.currRow];C.moveCursor(x)},E.setCursor=function(x){this.logger.log(u.INFO,"setCursor: "+x);var C=this.rows[this.currRow];C.setCursor(x)},E.setPAC=function(x){this.logger.log(u.INFO,"pacData = "+JSON.stringify(x));var C=x.row-1;if(this.nrRollUpRows&&C<this.nrRollUpRows-1&&(C=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==C){for(var A=0;A<O;A++)this.rows[A].clear();var D=this.currRow+1-this.nrRollUpRows,I=this.lastOutputScreen;if(I){var F=I.rows[D].cueStartTime,H=this.logger.time;if(F&&H!==null&&F<H)for(var te=0;te<this.nrRollUpRows;te++)this.rows[C-this.nrRollUpRows+te+1].copy(I.rows[D+te])}}this.currRow=C;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(u.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(u.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(u.TEXT,this.getDisplayText());var x=this.currRow+1-this.nrRollUpRows,C=this.rows.splice(x,1)[0];C.clear(),this.rows.splice(this.currRow,0,C),this.logger.log(u.INFO,"Rolling up")},E.getDisplayText=function(x){x=x||!1;for(var C=[],A="",D=-1,I=0;I<O;I++){var F=this.rows[I].getTextString();F&&(D=I+1,x?C.push("Row "+D+": '"+F+"'"):C.push(F.trim()))}return C.length>0&&(x?A="["+C.join(" | ")+"]":A=C.join(`
|
|
|
`)),A},E.getTextAndFormat=function(){return this.rows},g}(),y=function(){function g(o,x,C){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=o,this.outputFilter=x,this.mode=null,this.verbose=0,this.displayedMemory=new c(C),this.nonDisplayedMemory=new c(C),this.lastOutputScreen=new c(C),this.currRollUpRow=this.displayedMemory.rows[O-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=C}var E=g.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[O-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(u.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 C=0;C<x.length;C++)this.writeScreen.insertChar(x[C]);var A=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(u.INFO,A+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(u.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},E.ccRCL=function(){this.logger.log(u.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},E.ccBS=function(){if(this.logger.log(u.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(u.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},E.ccRU=function(x){this.logger.log(u.INFO,"RU("+x+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(x)},E.ccFON=function(){this.logger.log(u.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},E.ccRDC=function(){this.logger.log(u.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},E.ccTR=function(){this.logger.log(u.INFO,"TR"),this.setMode("MODE_TEXT")},E.ccRTD=function(){this.logger.log(u.INFO,"RTD"),this.setMode("MODE_TEXT")},E.ccEDM=function(){this.logger.log(u.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},E.ccCR=function(){this.logger.log(u.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},E.ccENM=function(){this.logger.log(u.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},E.ccEOC=function(){if(this.logger.log(u.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(u.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},E.ccTO=function(x){this.logger.log(u.INFO,"TO("+x+") - Tab Offset"),this.writeScreen.moveCursor(x)},E.ccMIDROW=function(x){var C={flash:!1};if(C.underline=x%2===1,C.italics=x>=46,C.italics)C.foreground="white";else{var A=Math.floor(x/2)-16,D=["white","green","blue","cyan","red","yellow","magenta"];C.foreground=D[A]}this.logger.log(u.INFO,"MIDROW: "+JSON.stringify(C)),this.writeScreen.setPen(C)},E.outputDataUpdate=function(x){x===void 0&&(x=!1);var C=this.logger.time;if(C===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=C:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,C,this.lastOutputScreen),x&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:C),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))},g}(),v=function(){function g(o,x,C){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var A=new s;this.channels=[null,new y(o,x,A),new y(o+1,C,A)],this.cmdHistory=m(),this.logger=A}var E=g.prototype;return E.getHandler=function(x){return this.channels[x].getHandler()},E.setHandler=function(x,C){this.channels[x].setHandler(C)},E.addData=function(x,C){var A,D,I,F=!1;this.logger.time=x;for(var H=0;H<C.length;H+=2){if(D=C[H]&127,I=C[H+1]&127,D===0&&I===0)continue;if(this.logger.log(u.DATA,"["+f([C[H],C[H+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 te=this.currentChannel;if(te&&te>0){var j=this.channels[te];j.insertChars(F)}else this.logger.log(u.WARNING,"No channel found yet. TEXT-MODE?")}!A&&!F&&this.logger.log(u.WARNING,"Couldn't parse cleaned data "+f([D,I])+" orig: "+f([C[H],C[H+1]]))}},E.parseCmd=function(x,C){var A=this.cmdHistory,D=(x===20||x===28||x===21||x===29)&&C>=32&&C<=47,I=(x===23||x===31)&&C>=33&&C<=35;if(!(D||I))return!1;if(b(x,C,A))return _(null,null,A),this.logger.log(u.DEBUG,"Repeated command ("+f([x,C])+") is dropped"),!0;var F=x===20||x===21||x===23?1:2,H=this.channels[F];return x===20||x===21||x===28||x===29?C===32?H.ccRCL():C===33?H.ccBS():C===34?H.ccAOF():C===35?H.ccAON():C===36?H.ccDER():C===37?H.ccRU(2):C===38?H.ccRU(3):C===39?H.ccRU(4):C===40?H.ccFON():C===41?H.ccRDC():C===42?H.ccTR():C===43?H.ccRTD():C===44?H.ccEDM():C===45?H.ccCR():C===46?H.ccENM():C===47&&H.ccEOC():H.ccTO(C-32),_(x,C,A),this.currentChannel=F,!0},E.parseMidrow=function(x,C){var A=0;if((x===17||x===25)&&C>=32&&C<=47){if(x===17?A=1:A=2,A!==this.currentChannel)return this.logger.log(u.ERROR,"Mismatch channel in midrow parsing"),!1;var D=this.channels[A];return D?(D.ccMIDROW(C),this.logger.log(u.DEBUG,"MIDROW ("+f([x,C])+")"),!0):!1}return!1},E.parsePAC=function(x,C){var A,D=this.cmdHistory,I=(x>=17&&x<=23||x>=25&&x<=31)&&C>=64&&C<=127,F=(x===16||x===24)&&C>=64&&C<=95;if(!(I||F))return!1;if(b(x,C,D))return _(null,null,D),!0;var H=x<=23?1:2;C>=64&&C<=95?A=H===1?l[x]:h[x]:A=H===1?p[x]:d[x];var te=this.channels[H];return te?(te.setPAC(this.interpretPAC(A,C)),_(x,C,D),this.currentChannel=H,!0):!1},E.interpretPAC=function(x,C){var A,D={color:null,italics:!1,indent:null,underline:!1,row:x};return C>95?A=C-96:A=C-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,C){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=C+80:I===18?F=C+112:F=C+144,this.logger.log(u.INFO,"Special char '"+S(F)+"' in channel "+A),D=[F]}else x>=32&&x<=127&&(D=C===0?[x]:[x,C]);if(D){var H=f(D);this.logger.log(u.DEBUG,"Char codes = "+H.join(",")),_(x,C,this.cmdHistory)}return D},E.parseBackgroundAttributes=function(x,C){var A=(x===16||x===24)&&C>=32&&C<=47,D=(x===23||x===31)&&C>=45&&C<=47;if(!(A||D))return!1;var I,F={};x===16||x===24?(I=Math.floor((C-32)/2),F.background=a[I],C%2===1&&(F.background=F.background+"_semi")):C===45?F.background="transparent":(F.foreground="black",C===47&&(F.underline=!0));var H=x<=23?1:2,te=this.channels[H];return te.setBkgData(F),_(x,C,this.cmdHistory),!0},E.reset=function(){for(var x=0;x<Object.keys(this.channels).length;x++){var C=this.channels[x];C&&C.reset()}this.cmdHistory=m()},E.cueSplitAtTime=function(x){for(var C=0;C<this.channels.length;C++){var A=this.channels[C];A&&A.cueSplitAtTime(x)}},g}();function _(g,E,o){o.a=g,o.b=E}function b(g,E,o){return o.a===g&&o.b===E}function m(){return{a:null,b:null}}Z.default=v},"./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(O,T){var l=w[T];return!!l&&l[O.slice(0,4)]===!0}function S(O,T){return MediaSource.isTypeSupported((T||"video")+'/mp4;codecs="'+O+'"')}},"./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"),O=/\s/,T={newCue:function(p,h,d,a){for(var u=[],s,f,i,n,t,c=self.VTTCue||self.TextTrackCue,y=0;y<a.rows.length;y++)if(s=a.rows[y],i=!0,n=0,t="",!s.isEmpty()){for(var v=0;v<s.chars.length;v++)O.test(s.chars[v].uchar)&&i?n++:(t+=s.chars[v].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 c(h,d,_),f.id=b,f.line=y+1,f.align="left",f.position=10+Math.min(80,Math.floor(n*8/32)*10),u.push(f))}return p&&u.length&&(u.sort(function(m,g){return m.line==="auto"||g.line==="auto"?0:m.line>8&&g.line>8?g.line-m.line:m.line-g.line}),u.forEach(function(m){return Object(S.addCueToTrack)(p,m)})),u}};Z.default=T},"./src/utils/discontinuities.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"findFirstFragWithCC",function(){return O}),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 u}),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 O(i,n){for(var t=null,c=0,y=i.length;c<y;c++){var v=i[c];if(v&&v.cc===n){t=v;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,c=n.fragments;if(!c.length||!t.length){P.logger.log("No fragments to align");return}var y=O(t,c[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,c=0,y=t.length;c<y;c++)p(t[c],i);n.fragmentHint&&p(n.fragmentHint,i),n.alignedSliding=!0}function d(i,n,t){if(!n)return;a(i,t,n),!t.alignedSliding&&n.details&&u(t,n.details),!t.alignedSliding&&n.details&&!t.skippedSegments&&Object(S.adjustSliding)(n.details,t)}function a(i,n,t){if(T(i,t,n)){var c=l(t.details,n);c&&Object(w.isFiniteNumber)(c.start)&&(P.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),h(c.start,n))}}function u(i,n){if(!n.fragments.length||!i.hasProgramDateTime||!n.hasProgramDateTime)return;var t=n.fragments[0].programDateTime,c=i.fragments[0].programDateTime,y=(c-t)/1e3+n.fragments[0].start;y&&Object(w.isFiniteNumber)(y)&&(P.logger.log("Adjusting PTS using programDateTime delta "+(c-t)+"ms, sliding:"+y.toFixed(3)+" "+i.url+" "),h(y,i))}function s(i,n){var t=i.programDateTime;if(!t)return;var c=(t-n)/1e3;i.start=i.startPTS=c,i.endPTS=c+i.duration}function f(i,n){if(!n.fragments.length||!i.hasProgramDateTime||!n.hasProgramDateTime)return;var t=n.fragments[0].programDateTime,c=n.fragments[0].start,y=t-c*1e3;i.fragments.forEach(function(v){s(v,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 O=S.prototype;return O.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()))},O.sample=function(l,p){l=Math.max(l,this.minDelayMs_);var h=8*p,d=l/1e3,a=h/d;this.fast_.sample(d,a),this.slow_.sample(d,a)},O.canEstimate=function(){var l=this.fast_;return l&&l.getTotalWeight()>=this.minWeight_},O.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},O.destroy=function(){},S}();Z.default=P},"./src/utils/ewma.ts":function(ae,Z,U){"use strict";U.r(Z);var w=function(){function P(O,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=O,this.alpha_=O?Math.exp(Math.log(.5)/O):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 O(c,y){c.prototype=Object.create(y.prototype),c.prototype.constructor=c,d(c,y)}function T(c){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,a(this).constructor)}return b.prototype=Object.create(_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),d(b,_)},T(c)}function l(c,y,v){return p()?l=Reflect.construct:l=function(b,m,g){var E=[null];E.push.apply(E,m);var o=Function.bind.apply(b,E),x=new o;return g&&d(x,g.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(c){return!1}}function h(c){return Function.toString.call(c).indexOf("[native code]")!==-1}function d(c,y){return d=Object.setPrototypeOf||function(_,b){return _.__proto__=b,_},d(c,y)}function a(c){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},a(c)}function u(){return u=Object.assign||function(c){for(var y=1;y<arguments.length;y++){var v=arguments[y];for(var _ in v)Object.prototype.hasOwnProperty.call(v,_)&&(c[_]=v[_])}return c},u.apply(this,arguments)}function s(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(c){}return!1}var f=function(){function c(v){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=v.fetchSetup||n,this.controller=new self.AbortController,this.stats=new P.LoadStats}var y=c.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,m){var g=this,E=this.stats;if(E.loading.start)throw new Error("Loader can only be used once.");E.loading.start=self.performance.now();var o=i(_,this.controller.signal),x=m.onProgress,C=_.responseType==="arraybuffer",A=C?"byteLength":"length";this.context=_,this.config=b,this.callbacks=m,this.request=this.fetchSetup(_,o),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){g.abortInternal(),m.onTimeout(E,_,g.response)},b.timeout),self.fetch(this.request).then(function(D){if(g.response=g.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)?g.loadProgressively(D,E,_,b.highWaterMark,x):C?D.arrayBuffer():D.text()}).then(function(D){var I=g.response;self.clearTimeout(g.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),m.onSuccess(F,E,_,I)}).catch(function(D){if(self.clearTimeout(g.requestTimeout),E.aborted)return;var I=D.code||0;m.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,m,g,E){g===void 0&&(g=0);var o=new S.default,x=_.body.getReader(),C=function A(){return x.read().then(function(D){if(D.done)return o.dataLength&&E(b,m,o.flush(),_),Promise.resolve(new ArrayBuffer(0));var I=D.value,F=I.length;return b.loaded+=F,F<g||o.dataLength?(o.push(I),o.dataLength>=g&&E(b,m,o.flush(),_)):E(b,m,I,_),A()}).catch(function(){return Promise.reject()})};return C()},c}();function i(c,y){var v={method:"GET",mode:"cors",credentials:"same-origin",signal:y,headers:new self.Headers(u({},c.headers))};return c.rangeEnd&&v.headers.set("Range","bytes="+c.rangeStart+"-"+String(c.rangeEnd-1)),v}function n(c,y){return new self.Request(c.url,y)}var t=function(c){O(y,c);function y(v,_,b){var m;return m=c.call(this,v)||this,m.code=void 0,m.details=void 0,m.code=_,m.details=b,m}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"),O=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(g){for(var E=1;E<arguments.length;E++){var o=arguments[E];for(var x in o)Object.prototype.hasOwnProperty.call(o,x)&&(g[x]=o[x])}return g},p.apply(this,arguments)}var h="stpp.ttml.im1t",d=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,a=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,u={left:"start",center:"center",right:"end",start:"start",end:"end"};function s(g,E,o,x,C){var A=Object(w.findBox)(new Uint8Array(g),["mdat"]);if(A.length===0){C(new Error("Could not parse IMSC1 mdat"));return}var D=A[0],I=Object(O.utf8ArrayToStr)(new Uint8Array(g,D.start,D.end-D.start)),F=Object(T.toTimescaleFromScale)(E,1,o);try{x(f(I,F))}catch(H){C(H)}}function f(g,E){var o=new DOMParser,x=o.parseFromString(g,"text/xml"),C=x.getElementsByTagName("tt")[0];if(!C)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]=C.getAttribute("ttp:"+G)||A[G],j},{}),I=C.getAttribute("xml:space")!=="preserve",F=n(i(C,"styling","style")),H=n(i(C,"layout","region")),te=i(C,"body","[begin]");return[].map.call(te,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 v(j);if(B===null){if(J===null)throw v(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=H[j.getAttribute("region")],oe=F[j.getAttribute("style")];Q.position=10,Q.size=80;var Ee=c(ie,oe),ye=Ee.textAlign;if(ye){var Le=u[ye];Le&&(Q.lineAlign=Le),Q.align=ye}return p(Q,Ee),Q}).filter(function(j){return j!==null})}function i(g,E,o){var x=g.getElementsByTagName(E)[0];return x?[].slice.call(x.querySelectorAll(o)):[]}function n(g){return g.reduce(function(E,o){var x=o.getAttribute("xml:id");return x&&(E[x]=o),E},{})}function t(g,E){return[].slice.call(g.childNodes).reduce(function(o,x,C){var A;return x.nodeName==="br"&&C?o+`
|
|
|
`:(A=x.childNodes)!==null&&A!==void 0&&A.length?t(x,E):E?o+x.textContent.trim().replace(/\s+/g," "):o+x.textContent},"")}function c(g,E){var o="http://www.w3.org/ns/ttml#styling",x=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return x.reduce(function(C,A){var D=y(E,o,A)||y(g,o,A);return D&&(C[A]=D),C},{})}function y(g,E,o){return g.hasAttributeNS(E,o)?g.getAttributeNS(E,o):null}function v(g){return new Error("Could not parse ttml timestamp "+g)}function _(g,E){if(!g)return null;var o=Object(P.parseTimeStamp)(g);return o===null&&(d.test(g)?o=b(g,E):a.test(g)&&(o=m(g,E))),o}function b(g,E){var o=d.exec(g),x=(o[4]|0)+(o[5]|0)/E.subFrameRate;return(o[1]|0)*3600+(o[2]|0)*60+(o[3]|0)+x/E.frameRate}function m(g,E){var o=a.exec(g),x=Number(o[1]),C=o[2];switch(C){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 O(h){var d=self.console[h];return d?d.bind(self.console,"["+h+"] >"):w}function T(h){for(var d=arguments.length,a=new Array(d>1?d-1:0),u=1;u<d;u++)a[u-1]=arguments[u];a.forEach(function(s){S[s]=h[s]?h[s].bind(h):O(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 a}),U.d(Z,"parseInitSegment",function(){return u}),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 c});var w=U("./src/utils/typed-array.ts"),P=U("./src/loader/fragment.ts"),S=Math.pow(2,32)-1,O=[].push;function T(y){return String.fromCharCode.apply(null,y)}function l(y,v){"data"in y&&(v+=y.start,y=y.data);var _=y[v]<<8|y[v+1];return _<0?65536+_:_}function p(y,v){"data"in y&&(v+=y.start,y=y.data);var _=y[v]<<24|y[v+1]<<16|y[v+2]<<8|y[v+3];return _<0?4294967296+_:_}function h(y,v,_){"data"in y&&(v+=y.start,y=y.data),y[v]=_>>24,y[v+1]=_>>16&255,y[v+2]=_>>8&255,y[v+3]=_&255}function d(y,v){var _=[];if(!v.length)return _;var b,m,g;"data"in y?(b=y.data,m=y.start,g=y.end):(b=y,m=0,g=b.byteLength);for(var E=m;E<g;){var o=p(b,E),x=T(b.subarray(E+4,E+8)),C=o>1?E+o:g;if(x===v[0])if(v.length===1)_.push({data:b,start:E+8,end:C});else{var A=d({data:b,start:E+8,end:C},v.slice(1));A.length&&O.apply(_,A)}E=C}return _}function a(y){var v=d(y,["moov"]),_=v[0],b=_?_.end:null,m=d(y,["sidx"]);if(!m||!m[0])return null;var g=[],E=m[0],o=E.data[0],x=o===0?8:16,C=p(E,x);x+=4;var A=0,D=0;o===0?x+=8:x+=16,x+=2;var I=E.end+D,F=l(E,x);x+=2;for(var H=0;H<F;H++){var te=x,j=p(E,te);te+=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,te);te+=4,g.push({referenceSize:G,subsegmentDuration:J,info:{duration:J/C,start:I,end:I+G-1}}),I+=G,te+=4,x=te}return{earliestPresentationTime:A,timescale:C,version:o,referencesCount:F,references:g,moovEndOffset:b}}function u(y){for(var v=[],_=d(y,["moov","trak"]),b=0;b<_.length;b++){var m=_[b],g=d(m,["tkhd"])[0];if(g){var E=g.data[g.start],o=E===0?12:20,x=p(g,o),C=d(m,["mdia","mdhd"])[0];if(C){E=C.data[C.start],o=E===0?12:20;var A=p(C,o),D=d(m,["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 H=d(m,["mdia","minf","stbl","stsd"])[0],te=void 0;H&&(te=T(H.data.subarray(H.start+12,H.start+16))),v[x]={timescale:A,type:F},v[F]={timescale:A,id:x,codec:te}}}}}}var j=d(y,["moov","mvex","trex"]);return j.forEach(function(G){var X=p(G,4),J=v[X];J&&(J.default={duration:p(G,12),flags:p(G,20)})}),v}function s(y,v){return d(v,["moof","traf"]).reduce(function(_,b){var m=d(b,["tfdt"])[0],g=m.data[m.start],E=d(b,["tfhd"]).reduce(function(o,x){var C=p(x,4),A=y[C];if(A){var D=p(m,4);g===1&&(D*=Math.pow(2,32),D+=p(m,8));var I=A.timescale||9e4,F=D/I;if(isFinite(F)&&(o===null||F<o))return F}return o},null);return E!==null&&isFinite(E)&&(_===null||E<_)?E:_},null)||0}function f(y,v){for(var _=0,b=0,m=0,g=d(y,["moof","traf"]),E=0;E<g.length;E++){var o=g[E],x=d(o,["tfhd"])[0],C=p(x,4),A=v[C];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 H=A.timescale||9e4,te=d(o,["trun"]),j=0;j<te.length;j++){if(F){var G=p(te[j],4);_=F*G}else _=i(te[j]);A.type===P.ElementaryStreamTypes.VIDEO?b+=_/H:A.type===P.ElementaryStreamTypes.AUDIO&&(m+=_/H)}}if(b===0&&m===0){var X=a(y);if(X!=null&&X.references)return X.references.reduce(function(J,B){return J+B.info.duration||0},0)}return b||m}function i(y){var v=p(y,0),_=8;v&1&&(_+=4),v&4&&(_+=4);for(var b=0,m=p(y,4),g=0;g<m;g++){if(v&256){var E=p(y,_);b+=E,_+=4}v&512&&(_+=4),v&1024&&(_+=4),v&2048&&(_+=4)}return b}function n(y,v,_){d(v,["moof","traf"]).forEach(function(b){d(b,["tfhd"]).forEach(function(m){var g=p(m,4),E=y[g];if(!E)return;var o=E.timescale||9e4;d(b,["tfdt"]).forEach(function(x){var C=x.data[x.start],A=p(x,4);if(C===0)h(x,4,A-_*o);else{A*=Math.pow(2,32),A+=p(x,8),A-=_*o,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 v={valid:null,remainder:null},_=d(y,["moof"]);if(_){if(_.length<2)return v.remainder=y,v}else return v;var b=_[_.length-1];return v.valid=Object(w.sliceUint8)(y,0,b.start-8),v.remainder=Object(w.sliceUint8)(y,b.start-8),v}function c(y,v){var _=new Uint8Array(y.length+v.length);return _.set(y),_.set(v,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(O,T){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=O,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 O}),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 a;try{a=new Event("addtrack")}catch(u){a=document.createEvent("Event"),a.initEvent("addtrack",!1,!1)}a.track=h,d.dispatchEvent(a)}function S(h,d){var a=h.mode;if(a==="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 u=new self.TextTrackCue(d.startTime,d.endTime,d.text);u.id=d.id,h.addCue(u)}a==="disabled"&&(h.mode=a)}function O(h){var d=h.mode;if(d==="disabled"&&(h.mode="hidden"),h.cues)for(var a=h.cues.length;a--;)h.removeCue(h.cues[a]);d==="disabled"&&(h.mode=d)}function T(h,d,a){var u=h.mode;if(u==="disabled"&&(h.mode="hidden"),h.cues&&h.cues.length>0)for(var s=p(h.cues,d,a),f=0;f<s.length;f++)h.removeCue(s[f]);u==="disabled"&&(h.mode=u)}function l(h,d){if(d<h[0].startTime)return 0;var a=h.length-1;if(d>h[a].endTime)return-1;for(var u=0,s=a;u<=s;){var f=Math.floor((s+u)/2);if(d<h[f].startTime)s=f-1;else if(d>h[f].startTime&&u<a)u=f+1;else return f}return h[u].startTime-d<d-h[s].startTime?u:s}function p(h,d,a){var u=[],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<=a)u.push(n);else if(n.startTime>a)return u}return u}},"./src/utils/time-ranges.ts":function(ae,Z,U){"use strict";U.r(Z);var w={toString:function(S){for(var O="",T=S.length,l=0;l<T;l++)O+="["+S.start(l).toFixed(3)+","+S.end(l).toFixed(3)+"]";return O}};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 O}),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 a=l*p*h;return d?Math.round(a):a}function S(l,p,h,d){return h===void 0&&(h=1),d===void 0&&(d=!1),P(l,p,1/h,d)}function O(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,O){return Uint8Array.prototype.slice?P.slice(S,O):new Uint8Array(Array.prototype.slice.call(P,S,O))}},"./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 a=d.toLowerCase();return~h.indexOf(a)?a:!1}function O(h){return S(w,h)}function T(h){return S(P,h)}function l(h){for(var d=arguments.length,a=new Array(d>1?d-1:0),u=1;u<d;u++)a[u-1]=arguments[u];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,a){var u=this,s={enumerable:!0};u.hasBeenReset=!1;var f="",i=!1,n=h,t=d,c=a,y=null,v="",_=!0,b="auto",m="start",g=50,E="middle",o=50,x="middle";Object.defineProperty(u,"id",l({},s,{get:function(){return f},set:function(A){f=""+A}})),Object.defineProperty(u,"pauseOnExit",l({},s,{get:function(){return i},set:function(A){i=!!A}})),Object.defineProperty(u,"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(u,"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(u,"text",l({},s,{get:function(){return c},set:function(A){c=""+A,this.hasBeenReset=!0}})),Object.defineProperty(u,"region",l({},s,{get:function(){return y},set:function(A){y=A,this.hasBeenReset=!0}})),Object.defineProperty(u,"vertical",l({},s,{get:function(){return v},set:function(A){var D=O(A);if(D===!1)throw new SyntaxError("An invalid or illegal string was specified.");v=D,this.hasBeenReset=!0}})),Object.defineProperty(u,"snapToLines",l({},s,{get:function(){return _},set:function(A){_=!!A,this.hasBeenReset=!0}})),Object.defineProperty(u,"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(u,"lineAlign",l({},s,{get:function(){return m},set:function(A){var D=T(A);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");m=D,this.hasBeenReset=!0}})),Object.defineProperty(u,"position",l({},s,{get:function(){return g},set:function(A){if(A<0||A>100)throw new Error("Position must be between 0 and 100.");g=A,this.hasBeenReset=!0}})),Object.defineProperty(u,"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(u,"size",l({},s,{get:function(){return o},set:function(A){if(A<0||A>100)throw new Error("Size must be between 0 and 100.");o=A,this.hasBeenReset=!0}})),Object.defineProperty(u,"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}})),u.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 a});var w=U("./src/utils/vttcue.ts"),P=function(){function u(){}var s=u.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))},u}();function S(u){function s(i,n,t,c){return(i|0)*3600+(n|0)*60+(t|0)+parseFloat(c||0)}var f=u.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 O=function(){function u(){this.values=Object.create(null)}var s=u.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 c=0;c<t.length;++c)if(n===t[c]){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},u}();function T(u,s,f,i){var n=i?u.split(i):[u];for(var t in n){if(typeof n[t]!="string")continue;var c=n[t].split(f);if(c.length!==2)continue;var y=c[0],v=c[1];s(y,v)}}var l=new w.default(0,0,""),p=l.align==="middle"?"middle":"center";function h(u,s,f){var i=u;function n(){var y=S(u);if(y===null)throw new Error("Malformed timestamp: "+i);return u=u.replace(/^[^\sa-zA-Z-]+/,""),y}function t(y,v){var _=new O;T(y,function(g,E){var o;switch(g){case"region":for(var x=f.length-1;x>=0;x--)if(f[x].id===E){_.set(g,f[x].region);break}break;case"vertical":_.alt(g,E,["rl","lr"]);break;case"line":o=E.split(","),_.integer(g,o[0]),_.percent(g,o[0])&&_.set("snapToLines",!1),_.alt(g,o[0],["auto"]),o.length===2&&_.alt("lineAlign",o[1],["start",p,"end"]);break;case"position":o=E.split(","),_.percent(g,o[0]),o.length===2&&_.alt("positionAlign",o[1],["start",p,"end","line-left","line-right","auto"]);break;case"size":_.percent(g,E);break;case"align":_.alt(g,E,["start",p,"end","left","right"]);break}},/:/,/\s/),v.region=_.get("region",null),v.vertical=_.get("vertical","");var b=_.get("line","auto");b==="auto"&&l.line===-1&&(b=-1),v.line=b,v.lineAlign=_.get("lineAlign","start"),v.snapToLines=_.get("snapToLines",!0),v.size=_.get("size",100),v.align=_.get("align",p);var m=_.get("position","auto");m==="auto"&&l.position===50&&(m=v.align==="start"||v.align==="left"?0:v.align==="end"||v.align==="right"?100:50),v.position=m}function c(){u=u.replace(/^\s+/,"")}if(c(),s.startTime=n(),c(),u.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+i);u=u.substr(3),c(),s.endTime=n(),c(),t(u,s)}function d(u){return u.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}var a=function(){function u(){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=u.prototype;return s.parse=function(i){var n=this;i&&(n.buffer+=n.decoder.decode(i,{stream:!0}));function t(){var m=n.buffer,g=0;for(m=d(m);g<m.length&&m[g]!=="\r"&&m[g]!==`
|
|
|
`;)++g;var E=m.substr(0,g);return m[g]==="\r"&&++g,m[g]===`
|
|
|
`&&++g,n.buffer=m.substr(g),E}function c(m){T(m,function(g,E){},/:/)}try{var y="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;y=t();var v=y.match(/^()?WEBVTT([ \t].*)?$/);if(!v||!v[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)?c(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(m){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(m){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},u}()},"./src/utils/webvtt-parser.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"generateCueId",function(){return a}),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"),O=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)),c=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)(c)||!Object(w.isFiniteNumber)(y))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+i);return n+=1e3*t,n+=60*1e3*c,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 a(f,i,n){return d(f.toString())+d(i.toString())+d(n)}var u=function(i,n,t){var c=i[n],y=i[c.prevCC];if(!y||!y.new&&c.new){i.ccOffset=i.presentationOffset=c.start,c.new=!1;return}for(;(v=y)!==null&&v!==void 0&&v.new;){var v;i.ccOffset+=c.start-y.start,c.new=!1,c=y,y=i[c.prevCC]}i.presentationOffset=t};function s(f,i,n,t,c,y,v,_){var b=new P.VTTParser,m=Object(S.utf8ArrayToStr)(new Uint8Array(f)).trim().replace(l,`
|
|
|
`).split(`
|
|
|
`),g=[],E=Object(O.toMpegTsClockFromTimescale)(i,n),o="00:00.000",x=0,C=0,A,D=!0,I=!1;b.oncue=function(F){var H=t[c],te=t.ccOffset,j=(x-E)/9e4;if(H!=null&&H.new&&(C!==void 0?te=t.ccOffset=H.start:u(t,c,j)),j&&(te=j-t.presentationOffset),I){var G=F.endTime-F.startTime,X=Object(T.normalizePts)((F.startTime+te-C)*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=a(F.startTime,F.endTime,J)),F.endTime>0&&g.push(F)},b.onparsingerror=function(F){A=F},b.onflush=function(){if(A){_(A);return}v(g)},m.forEach(function(F){if(D)if(p(F,"X-TIMESTAMP-MAP=")){D=!1,I=!0,F.substr(16).split(",").forEach(function(H){p(H,"LOCAL:")?o=H.substr(6):p(H,"MPEGTS:")&&(x=parseInt(H.substr(7)))});try{C=h(o)/1e3}catch(H){I=!1,A=H}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,O=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,a){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=a,this.retryDelay=d.retryDelay,this.loadInternal()},l.loadInternal=function(){var h=this.config,d=this.context;if(!h)return;var a=this.loader=new self.XMLHttpRequest,u=this.stats;u.loading.first=0,u.loaded=0;var s=this.xhrSetup;try{if(s)try{s(a,d.url)}catch(n){a.open("GET",d.url,!0),s(a,d.url)}a.readyState||a.open("GET",d.url,!0);var f=this.context.headers;if(f)for(var i in f)a.setRequestHeader(i,f[i])}catch(n){this.callbacks.onError({code:a.status,text:n.message},d,a);return}d.rangeEnd&&a.setRequestHeader("Range","bytes="+d.rangeStart+"-"+(d.rangeEnd-1)),a.onreadystatechange=this.readystatechange.bind(this),a.onprogress=this.loadprogress.bind(this),a.responseType=d.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.timeout),a.send()},l.readystatechange=function(){var h=this.context,d=this.loader,a=this.stats;if(!h||!d)return;var u=d.readyState,s=this.config;if(a.aborted)return;if(u>=2)if(self.clearTimeout(this.requestTimeout),a.loading.first===0&&(a.loading.first=Math.max(self.performance.now(),a.loading.start)),u===4){d.onreadystatechange=null,d.onprogress=null;var f=d.status;if(f>=200&&f<300){a.loading.end=Math.max(self.performance.now(),a.loading.first);var i,n;if(h.responseType==="arraybuffer"?(i=d.response,n=i.byteLength):(i=d.responseText,n=i.length),a.loaded=a.total=n,!this.callbacks)return;var t=this.callbacks.onProgress;if(t&&t(a,h,i,d),!this.callbacks)return;var c={url:d.responseURL,data:i};this.callbacks.onSuccess(c,a,h,d)}else a.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),a.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=O}}).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"),O=z("TSYQ"),T=z.n(O),l=z("Gytx"),p=z.n(l),h=z("Kwbf"),d=z("t23M"),a=z("qx4F"),u=z("6eGT"),s=z("IBYe"),f=z("Ff2n"),i=z("c+Xe"),n=z("fyJ8"),t=z("biw7");function c(De,Me,Xe,tt,Ve){var Ke=Xe[De]||{},we=Xe[Me]||{},Ae,Oe;Ke.fixed==="left"?Ae=tt.left[De]:we.fixed==="right"&&(Oe=tt.right[Me]);var fe=!1,ge=!1,_e=!1,be=!1,Ge=Xe[Me+1],qe=Xe[De-1];if(Ve==="rtl"){if(Ae!==void 0){var pt=qe&&qe.fixed==="left";be=!pt}else if(Oe!==void 0){var Dt=Ge&&Ge.fixed==="right";_e=!Dt}}else if(Ae!==void 0){var jt=Ge&&Ge.fixed==="left";fe=!jt}else if(Oe!==void 0){var Rt=qe&&qe.fixed==="right";ge=!Rt}return{fixLeft:Ae,fixRight:Oe,lastFixLeft:fe,firstFixRight:ge,lastFixRight:_e,firstFixLeft:be,isSticky:tt.isSticky}}var y=z("sR1s");function v(De){var Me=De.cells,Xe=De.stickyOffsets,tt=De.flattenColumns,Ve=De.rowComponent,Ke=De.cellComponent,we=De.onHeaderRow,Ae=De.index,Oe=S.useContext(t.a),fe=Oe.prefixCls,ge=Oe.direction,_e;we&&(_e=we(Me.map(function(Ge){return Ge.column}),Ae));var be=Object(y.a)(Me.map(function(Ge){return Ge.column}));return S.createElement(Ve,Object.assign({},_e),Me.map(function(Ge,qe){var pt=Ge.column,Dt=c(Ge.colStart,Ge.colEnd,tt,Xe,ge),jt;return pt&&pt.onHeaderCell&&(jt=Ge.column.onHeaderCell(pt)),S.createElement(n.a,Object.assign({},Ge,{ellipsis:pt.ellipsis,align:pt.align,component:Ke,prefixCls:fe,key:be[qe]},Dt,{additionalProps:jt,rowType:"header"}))}))}v.displayName="HeaderRow";var _=v;function b(De){var Me=[];function Xe(we,Ae){var Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Me[Oe]=Me[Oe]||[];var fe=Ae,ge=we.filter(Boolean).map(function(_e){var be={key:_e.key,className:_e.className||"",children:_e.title,column:_e,colStart:fe},Ge=1,qe=_e.children;return qe&&qe.length>0&&(Ge=Xe(qe,fe,Oe+1).reduce(function(pt,Dt){return pt+Dt},0),be.hasSubColumns=!0),"colSpan"in _e&&(Ge=_e.colSpan),"rowSpan"in _e&&(be.rowSpan=_e.rowSpan),be.colSpan=Ge,be.colEnd=be.colStart+Ge-1,Me[Oe].push(be),fe+=Ge,Ge});return ge}Xe(De,0);for(var tt=Me.length,Ve=function(Ae){Me[Ae].forEach(function(Oe){!("rowSpan"in Oe)&&!Oe.hasSubColumns&&(Oe.rowSpan=tt-Ae)})},Ke=0;Ke<tt;Ke+=1)Ve(Ke);return Me}function m(De){var Me=De.stickyOffsets,Xe=De.columns,tt=De.flattenColumns,Ve=De.onHeaderRow,Ke=S.useContext(t.a),we=Ke.prefixCls,Ae=Ke.getComponent,Oe=S.useMemo(function(){return b(Xe)},[Xe]),fe=Ae(["header","wrapper"],"thead"),ge=Ae(["header","row"],"tr"),_e=Ae(["header","cell"],"th");return S.createElement(fe,{className:"".concat(we,"-thead")},Oe.map(function(be,Ge){var qe=S.createElement(_,{key:Ge,flattenColumns:tt,cells:be,stickyOffsets:Me,rowComponent:ge,cellComponent:_e,onHeaderRow:Ve,index:Ge});return qe}))}var g=m,E=z("hW8S");function o(De){for(var Me=De.colWidths,Xe=De.columns,tt=De.columCount,Ve=[],Ke=tt||Xe.length,we=!1,Ae=Ke-1;Ae>=0;Ae-=1){var Oe=Me[Ae],fe=Xe&&Xe[Ae],ge=fe&&fe[E.a];(Oe||ge||we)&&(Ve.unshift(S.createElement("col",Object.assign({key:Ae,style:{width:Oe,minWidth:Oe}},ge))),we=!0)}return S.createElement("colgroup",null,Ve)}var x=o;function C(De,Me){return Object(S.useMemo)(function(){for(var Xe=[],tt=0;tt<Me;tt+=1){var Ve=De[tt];if(Ve!==void 0)Xe[tt]=Ve;else return null}return Xe},[De.join("_"),Me])}var A=S.forwardRef(function(De,Me){var Xe=De.noData,tt=De.columns,Ve=De.flattenColumns,Ke=De.colWidths,we=De.columCount,Ae=De.stickyOffsets,Oe=De.direction,fe=De.fixHeader,ge=De.offsetHeader,_e=De.stickyClassName,be=De.onScroll,Ge=Object(f.a)(De,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),qe=S.useContext(t.a),pt=qe.prefixCls,Dt=qe.scrollbarSize,jt=qe.isSticky,Rt=jt&&!fe?0:Dt,Lt=S.useRef(null),lt=S.useCallback(function(Tt){Object(i.b)(Me,Tt),Object(i.b)(Lt,Tt)},[]);S.useEffect(function(){var Tt;function Ct(ot){var gt=ot.currentTarget,kt=ot.deltaX;kt&&(be({currentTarget:gt,scrollLeft:gt.scrollLeft+kt}),ot.preventDefault())}return(Tt=Lt.current)===null||Tt===void 0||Tt.addEventListener("wheel",Ct),function(){var ot;(ot=Lt.current)===null||ot===void 0||ot.removeEventListener("wheel",Ct)}},[]);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 Rt?[].concat(Object(U.a)(tt),[Qe]):tt},[Rt,tt]),je=Object(S.useMemo)(function(){return Rt?[].concat(Object(U.a)(Ve),[Qe]):Ve},[Rt,Ve]),dt=Object(S.useMemo)(function(){var Tt=Ae.right,Ct=Ae.left;return Object(Z.a)(Object(Z.a)({},Ae),{},{left:Oe==="rtl"?[].concat(Object(U.a)(Ct.map(function(ot){return ot+Rt})),[0]):Ct,right:Oe==="rtl"?Tt:[].concat(Object(U.a)(Tt.map(function(ot){return ot+Rt})),[0]),isSticky:jt})},[Rt,Ae,jt]),Ze=C(Ke,we);return S.createElement("div",{style:Object(Z.a)({overflow:"hidden"},jt?{top:ge}:{}),ref:lt,className:T()("".concat(pt,"-header"),Object(ae.a)({},_e,!!_e))},S.createElement("table",{style:{tableLayout:"fixed",visibility:Xe||Ze?null:"hidden"}},S.createElement(x,{colWidths:Ze?[].concat(Object(U.a)(Ze),[Rt]):[],columCount:we+1,columns:je}),S.createElement(g,Object.assign({},Ge,{stickyOffsets:dt,columns:Te,flattenColumns:je}))))});A.displayName="FixedHeader";var D=A,I=S.createContext(null),F=I;function H(De){var Me=De.prefixCls,Xe=De.children,tt=De.component,Ve=De.cellComponent,Ke=De.fixHeader,we=De.fixColumn,Ae=De.horizonScroll,Oe=De.className,fe=De.expanded,ge=De.componentWidth,_e=De.colSpan,be=S.useContext(t.a),Ge=be.scrollbarSize;return S.useMemo(function(){var qe=Xe;return we&&(qe=S.createElement("div",{style:{width:ge-(Ke?Ge:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Me,"-expanded-row-fixed")},qe)),S.createElement(tt,{className:Oe,style:{display:fe?null:"none"}},S.createElement(n.a,{component:Ve,prefixCls:Me,colSpan:_e},qe))},[Xe,tt,Ke,Ae,Oe,fe,ge,_e,Ge])}var te=H;function j(De){var Me=De.className,Xe=De.style,tt=De.record,Ve=De.index,Ke=De.rowKey,we=De.getRowKey,Ae=De.rowExpandable,Oe=De.expandedKeys,fe=De.onRow,ge=De.indent,_e=ge===void 0?0:ge,be=De.rowComponent,Ge=De.cellComponent,qe=De.childrenColumnName,pt=S.useContext(t.a),Dt=pt.prefixCls,jt=pt.fixedInfoList,Rt=S.useContext(F),Lt=Rt.fixHeader,lt=Rt.fixColumn,ft=Rt.horizonScroll,Qe=Rt.componentWidth,Te=Rt.flattenColumns,je=Rt.expandableType,dt=Rt.expandRowByClick,Ze=Rt.onTriggerExpand,Tt=Rt.rowClassName,Ct=Rt.expandedRowClassName,ot=Rt.indentSize,gt=Rt.expandIcon,kt=Rt.expandedRowRender,Kt=Rt.expandIconColumnIndex,Gt=S.useState(!1),Se=Object(P.a)(Gt,2),de=Se[0],W=Se[1],q=Oe&&Oe.has(De.recordKey);S.useEffect(function(){q&&W(!0)},[q]);var ne=je==="row"&&(!Ae||Ae(tt)),se=je==="nest",xe=qe&&tt&&tt[qe],He=ne||se,Je;fe&&(Je=fe(tt,Ve));var Et=function(mt){if(dt&&He&&Ze(tt,mt),Je&&Je.onClick){for(var Cn,En=arguments.length,Jt=new Array(En>1?En-1:0),un=1;un<En;un++)Jt[un-1]=arguments[un];(Cn=Je).onClick.apply(Cn,[mt].concat(Jt))}},St;typeof Tt=="string"?St=Tt:typeof Tt=="function"&&(St=Tt(tt,Ve,_e));var nt=Object(y.a)(Te),xt=S.createElement(be,Object.assign({},Je,{"data-row-key":Ke,className:T()(Me,"".concat(Dt,"-row"),"".concat(Dt,"-row-level-").concat(_e),St,Je&&Je.className),style:Object(Z.a)(Object(Z.a)({},Xe),Je?Je.style:null),onClick:Et}),Te.map(function(Mt,mt){var Cn=Mt.render,En=Mt.dataIndex,Jt=Mt.className,un=nt[mt],Jn=jt[mt],ar;mt===(Kt||0)&&se&&(ar=S.createElement(S.Fragment,null,S.createElement("span",{style:{paddingLeft:"".concat(ot*_e,"px")},className:"".concat(Dt,"-row-indent indent-level-").concat(_e)}),gt({prefixCls:Dt,expanded:q,expandable:xe,record:tt,onExpand:Ze})));var mn;return Mt.onCell&&(mn=Mt.onCell(tt,Ve)),S.createElement(n.a,Object.assign({className:Jt,ellipsis:Mt.ellipsis,align:Mt.align,component:Ge,prefixCls:Dt,key:un,record:tt,index:Ve,dataIndex:En,render:Cn,shouldCellUpdate:Mt.shouldCellUpdate},Jn,{appendNode:ar,additionalProps:mn}))})),ut;if(ne&&(de||q)){var _t=kt(tt,Ve,_e+1,q),Qt=Ct&&Ct(tt,Ve,_e);ut=S.createElement(te,{expanded:q,className:T()("".concat(Dt,"-expanded-row"),"".concat(Dt,"-expanded-row-level-").concat(_e+1),Qt),prefixCls:Dt,fixHeader:Lt,fixColumn:lt,horizonScroll:ft,component:be,componentWidth:Qe,cellComponent:Ge,colSpan:Te.length},_t)}var Xt;return xe&&q&&(Xt=(tt[qe]||[]).map(function(Mt,mt){var Cn=we(Mt,mt);return S.createElement(j,Object.assign({},De,{key:Cn,rowKey:Cn,record:Mt,recordKey:Cn,index:mt,indent:_e+1}))})),S.createElement(S.Fragment,null,xt,ut,Xt)}j.displayName="BodyRow";var G=j,X=S.createContext(null),J=X;function B(De){var Me=De.columnKey,Xe=De.onColumnResize,tt=S.useRef();return S.useEffect(function(){tt.current&&Xe(Me,tt.current.offsetWidth)},[]),S.createElement(d.a,{onResize:function(Ke){var we=Ke.offsetWidth;Xe(Me,we)}},S.createElement("td",{ref:tt,style:{padding:0,border:0,height:0}},S.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Q(De){var Me=De.data,Xe=De.getRowKey,tt=De.measureColumnWidth,Ve=De.expandedKeys,Ke=De.onRow,we=De.rowExpandable,Ae=De.emptyNode,Oe=De.childrenColumnName,fe=S.useContext(J),ge=fe.onColumnResize,_e=S.useContext(t.a),be=_e.prefixCls,Ge=_e.getComponent,qe=S.useContext(F),pt=qe.fixHeader,Dt=qe.horizonScroll,jt=qe.flattenColumns,Rt=qe.componentWidth;return S.useMemo(function(){var Lt=Ge(["body","wrapper"],"tbody"),lt=Ge(["body","row"],"tr"),ft=Ge(["body","cell"],"td"),Qe;Me.length?Qe=Me.map(function(je,dt){var Ze=Xe(je,dt);return S.createElement(G,{key:Ze,rowKey:Ze,record:je,recordKey:Ze,index:dt,rowComponent:lt,cellComponent:ft,expandedKeys:Ve,onRow:Ke,getRowKey:Xe,rowExpandable:we,childrenColumnName:Oe})}):Qe=S.createElement(te,{expanded:!0,className:"".concat(be,"-placeholder"),prefixCls:be,fixHeader:pt,fixColumn:Dt,horizonScroll:Dt,component:lt,componentWidth:Rt,cellComponent:ft,colSpan:jt.length},Ae);var Te=Object(y.a)(jt);return S.createElement(Lt,{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:ge})})),Qe)},[Me,be,Ke,tt,Ve,Xe,Ge,Rt,Ae,jt])}var ie=S.memo(Q);ie.displayName="Body";var oe=ie,Ee=z("wRmb"),ye=z("xEkU"),Le=z.n(ye);function pe(De){var Me=Object(S.useRef)(De),Xe=Object(S.useState)({}),tt=Object(P.a)(Xe,2),Ve=tt[1],Ke=Object(S.useRef)(null),we=Object(S.useRef)([]);function Ae(Oe){Ke.current===null&&(we.current=[],Ke.current=Le()(function(){we.current.forEach(function(fe){Me.current=fe(Me.current)}),Ke.current=null,Ve({})})),we.current.push(Oe)}return Object(S.useEffect)(function(){return function(){Le.a.cancel(Ke.current)}},[]),[Me.current,Ae]}function Ce(De){var Me=Object(S.useRef)(De),Xe=Object(S.useRef)(null);function tt(){window.clearTimeout(Xe.current)}function Ve(we){Me.current=we,tt(),Xe.current=window.setTimeout(function(){Me.current=null,Xe.current=null},100)}function Ke(){return Me.current}return Object(S.useEffect)(function(){return tt},[]),[Ve,Ke]}function Be(De,Me,Xe){var tt=Object(S.useMemo)(function(){for(var Ve=[],Ke=[],we=0,Ae=0,Oe=0;Oe<Me;Oe+=1)if(Xe==="rtl"){Ke[Oe]=Ae,Ae+=De[Oe]||0;var fe=Me-Oe-1;Ve[fe]=we,we+=De[fe]||0}else{Ve[Oe]=we,we+=De[Oe]||0;var ge=Me-Oe-1;Ke[ge]=Ae,Ae+=De[ge]||0}return{left:Ve,right:Ke}},[De,Me,Xe]);return tt}var Pe=Be;function ke(De){var Me=De.className,Xe=De.children;return S.createElement("div",{className:Me},Xe)}var Ne=ke,he=z("n6Qo");function ue(De){var Me,Xe=De.prefixCls,tt=De.record,Ve=De.onExpand,Ke=De.expanded,we=De.expandable,Ae="".concat(Xe,"-row-expand-icon");if(!we)return S.createElement("span",{className:T()(Ae,"".concat(Xe,"-row-spaced"))});var Oe=function(ge){Ve(tt,ge),ge.stopPropagation()};return S.createElement("span",{className:T()(Ae,(Me={},Object(ae.a)(Me,"".concat(Xe,"-row-expanded"),Ke),Object(ae.a)(Me,"".concat(Xe,"-row-collapsed"),!Ke),Me)),onClick:Oe})}function Ie(De,Me,Xe){var tt=[];function Ve(Ke){(Ke||[]).forEach(function(we,Ae){tt.push(Me(we,Ae)),Ve(we[Xe])})}return Ve(De),tt}var Ue=z("zT1h"),Ye=z("y0+3"),ee=function(Me,Xe){var tt,Ve,Ke=Me.scrollBodyRef,we=Me.onScroll,Ae=Me.offsetScroll,Oe=S.useContext(t.a),fe=Oe.prefixCls,ge=((tt=Ke.current)===null||tt===void 0?void 0:tt.scrollWidth)||0,_e=((Ve=Ke.current)===null||Ve===void 0?void 0:Ve.clientWidth)||0,be=ge&&_e*(_e/ge),Ge=S.useRef(),qe=pe({scrollLeft:0,isHiddenScrollBar:!1}),pt=Object(P.a)(qe,2),Dt=pt[0],jt=pt[1],Rt=S.useRef({delta:0,x:0}),Lt=S.useState(!1),lt=Object(P.a)(Lt,2),ft=lt[0],Qe=lt[1],Te=function(){Qe(!1)},je=function(ot){ot.persist(),Rt.current.delta=ot.pageX-Dt.scrollLeft,Rt.current.x=0,Qe(!0),ot.preventDefault()},dt=function(ot){var gt,kt=ot||((gt=window)===null||gt===void 0?void 0:gt.event),Kt=kt.buttons;if(!ft||Kt===0){ft&&Qe(!1);return}var Gt=Rt.current.x+ot.pageX-Rt.current.x-Rt.current.delta;Gt<=0&&(Gt=0),Gt+be>=_e&&(Gt=_e-be),we({scrollLeft:Gt/_e*(ge+2)}),Rt.current.x=ot.pageX},Ze=function(){var ot=Object(Ye.b)(Ke.current).top,gt=ot+Ke.current.offsetHeight,kt=document.documentElement.scrollTop+window.innerHeight;gt-Object(a.a)()<=kt||ot>=kt-Ae?jt(function(Kt){return Object(Z.a)(Object(Z.a)({},Kt),{},{isHiddenScrollBar:!0})}):jt(function(Kt){return Object(Z.a)(Object(Z.a)({},Kt),{},{isHiddenScrollBar:!1})})},Tt=function(ot){jt(function(gt){return Object(Z.a)(Object(Z.a)({},gt),{},{scrollLeft:ot/ge*_e||0})})};return S.useImperativeHandle(Xe,function(){return{setScrollLeft:Tt}}),S.useEffect(function(){var Ct=Object(Ue.a)(document.body,"mouseup",Te,!1),ot=Object(Ue.a)(document.body,"mousemove",dt,!1);return Ze(),function(){Ct.remove(),ot.remove()}},[be,ft]),S.useEffect(function(){var Ct=Object(Ue.a)(window,"scroll",Ze,!1),ot=Object(Ue.a)(window,"resize",Ze,!1);return function(){Ct.remove(),ot.remove()}},[]),S.useEffect(function(){Dt.isHiddenScrollBar||jt(function(Ct){var ot,gt;return Object(Z.a)(Object(Z.a)({},Ct),{},{scrollLeft:Ke.current.scrollLeft/((ot=Ke.current)===null||ot===void 0?void 0:ot.scrollWidth)*((gt=Ke.current)===null||gt===void 0?void 0:gt.clientWidth)})})},[Dt.isHiddenScrollBar]),ge<=_e||!be||Dt.isHiddenScrollBar?null:S.createElement("div",{style:{height:Object(a.a)(),width:_e,bottom:Ae},className:"".concat(fe,"-sticky-scroll")},S.createElement("div",{onMouseDown:je,ref:Ge,className:T()("".concat(fe,"-sticky-scroll-bar"),Object(ae.a)({},"".concat(fe,"-sticky-scroll-bar-active"),ft)),style:{width:"".concat(be,"px"),transform:"translate3d(".concat(Dt.scrollLeft,"px, 0, 0)")}}))},M=S.forwardRef(ee);function N(De,Me){return S.useMemo(function(){var Xe=!!De;return{isSticky:Xe,stickyClassName:Xe?"".concat(Me,"-sticky-header"):"",offsetHeader:Object(w.a)(De)==="object"&&De.offsetHeader||0,offsetScroll:Object(w.a)(De)==="object"&&De.offsetScroll||0}},[De,Me])}var $=[],V={},Y="rc-table-internal-hook",me=S.memo(function(De){var Me=De.children;return Me},function(De,Me){return p()(De.props,Me.props)?De.pingLeft!==Me.pingLeft||De.pingRight!==Me.pingRight:!1});function Re(De){var Me,Xe=De.prefixCls,tt=De.className,Ve=De.rowClassName,Ke=De.style,we=De.data,Ae=De.rowKey,Oe=De.scroll,fe=De.tableLayout,ge=De.direction,_e=De.title,be=De.footer,Ge=De.summary,qe=De.id,pt=De.showHeader,Dt=De.components,jt=De.emptyText,Rt=De.onRow,Lt=De.onHeaderRow,lt=De.internalHooks,ft=De.transformColumns,Qe=De.internalRefs,Te=De.sticky,je=we||$,dt=!!je.length,Ze=S.useState(0),Tt=Object(P.a)(Ze,2),Ct=Tt[0],ot=Tt[1];S.useEffect(function(){ot(Object(a.a)())});var gt=S.useMemo(function(){return Object(y.c)(Dt,{})},[Dt]),kt=S.useCallback(function(st,bt){return Object(y.b)(gt,st)||bt},[gt]),Kt=S.useMemo(function(){return typeof Ae=="function"?Ae:function(st){var bt=st&&st[Ae];return bt}},[Ae]),Gt=Object(E.c)(De),Se=Gt.expandIcon,de=Gt.expandedRowKeys,W=Gt.defaultExpandedRowKeys,q=Gt.defaultExpandAllRows,ne=Gt.expandedRowRender,se=Gt.onExpand,xe=Gt.onExpandedRowsChange,He=Gt.expandRowByClick,Je=Gt.rowExpandable,Et=Gt.expandIconColumnIndex,St=Gt.expandedRowClassName,nt=Gt.childrenColumnName,xt=Gt.indentSize,ut=Se||ue,_t=nt||"children",Qt=S.useMemo(function(){return ne?"row":De.expandable&<===Y&&De.expandable.__PARENT_RENDER_ICON__||je.some(function(st){return st&&Object(w.a)(st)==="object"&&st[_t]})?"nest":!1},[!!ne,je]),Xt=S.useState(function(){return W||(q?Ie(je,Kt,_t):[])}),Mt=Object(P.a)(Xt,2),mt=Mt[0],Cn=Mt[1],En=S.useMemo(function(){return new Set(de||mt||[])},[de,mt]),Jt=S.useCallback(function(st){var bt=Kt(st,je.indexOf(st)),At,nn=En.has(bt);nn?(En.delete(bt),At=Object(U.a)(En)):At=[].concat(Object(U.a)(En),[bt]),Cn(At),se&&se(!nn,st),xe&&xe(At)},[Kt,En,je,se,xe]),un=S.useState(0),Jn=Object(P.a)(un,2),ar=Jn[0],mn=Jn[1],gr=Object(Ee.b)(Object(Z.a)(Object(Z.a)(Object(Z.a)({},De),Gt),{},{expandable:!!ne,expandedKeys:En,getRowKey:Kt,onTriggerExpand:Jt,expandIcon:ut,expandIconColumnIndex:Et,direction:ge}),lt===Y?ft:null),Rr=Object(P.a)(gr,2),vn=Rr[0],An=Rr[1],_r=S.useMemo(function(){return{columns:vn,flattenColumns:An}},[vn,An]),Zr=S.useRef(),jr=S.useRef(),tr=S.useRef(),ur=S.useState(!1),yi=Object(P.a)(ur,2),xr=yi[0],Cr=yi[1],Sr=S.useState(!1),Vr=Object(P.a)(Sr,2),Mr=Vr[0],Si=Vr[1],Or=pe(new Map),ei=Object(P.a)(Or,2),ri=ei[0],Xr=ei[1],ui=Object(y.a)(An),Ri=ui.map(function(st){return ri.get(st)}),bi=S.useMemo(function(){return Ri},[Ri.join("_")]),ii=Pe(bi,An.length,ge),yr=Oe&&Object(y.d)(Oe.y),or=Oe&&Object(y.d)(Oe.x),ai=or&&An.some(function(st){var bt=st.fixed;return bt}),Di=S.useRef(),Ni=N(Te,Xe),wi=Ni.isSticky,ga=Ni.offsetHeader,la=Ni.offsetScroll,tn=Ni.stickyClassName,xn,fn,Zn;yr&&(fn={overflowY:"scroll",maxHeight:Oe.y}),or&&(xn={overflowX:"auto"},yr||(fn={overflowY:"hidden"}),Zn={width:Oe.x===!0?"auto":Oe.x,minWidth:"100%"});var nr=S.useCallback(function(st,bt){Xr(function(At){var nn=new Map(At);return nn.set(st,bt),nn})},[]),cr=Ce(null),hr=Object(P.a)(cr,2),pr=hr[0],kr=hr[1];function oi(st,bt){if(!bt)return;typeof bt=="function"?bt(st):bt.scrollLeft!==st&&(bt.scrollLeft=st)}var er=function(bt){var At=bt.currentTarget,nn=bt.scrollLeft,en=typeof nn=="number"?nn:At.scrollLeft,ht=At||V;if(!kr()||kr()===ht){var ct;pr(ht),oi(en,jr.current),oi(en,tr.current),oi(en,(ct=Di.current)===null||ct===void 0?void 0:ct.setScrollLeft)}if(At){var Ft=At.scrollWidth,vt=At.clientWidth;Cr(en>0),Si(en<Ft-vt)}},_i=function(){tr.current&&er({currentTarget:tr.current})},Fr=function(bt){var At=bt.width;_i(),mn(Zr.current?Zr.current.offsetWidth:At)};S.useEffect(function(){return _i},[]),S.useEffect(function(){or&&_i()},[or]),S.useEffect(function(){lt===Y&&Qe&&(Qe.body.current=tr.current)});var Ti=kt(["table"],"table"),fi=S.useMemo(function(){return fe||(ai?Oe.x==="max-content"?"auto":"fixed":yr||An.some(function(st){var bt=st.ellipsis;return bt})?"fixed":"auto")},[yr,ai,An,fe]),Pi,Ji={colWidths:bi,columCount:An.length,stickyOffsets:ii,onHeaderRow:Lt,fixHeader:yr},Pa=S.useMemo(function(){return dt?null:typeof jt=="function"?jt():jt},[dt,jt]),Ma=S.createElement(oe,{data:je,measureColumnWidth:yr||or||wi,expandedKeys:En,rowExpandable:Je,getRowKey:Kt,onRow:Rt,emptyNode:Pa,childrenColumnName:_t}),ya=S.createElement(x,{colWidths:An.map(function(st){var bt=st.width;return bt}),columns:An}),Rn=Ge&&S.createElement(he.b,null,Ge(je)),zi=kt(["body"]);if(yr||wi){var ua;typeof zi=="function"?(ua=zi(je,{scrollbarSize:Ct,ref:tr,onScroll:er}),Ji.colWidths=An.map(function(st,bt){var At=st.width,nn=bt===vn.length-1?At-Ct:At;return typeof nn=="number"&&!Number.isNaN(nn)?nn:(Object(h.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):ua=S.createElement("div",{style:Object(Z.a)(Object(Z.a)({},xn),fn),onScroll:er,ref:tr,className:T()("".concat(Xe,"-body"))},S.createElement(Ti,{style:Object(Z.a)(Object(Z.a)({},Zn),{},{tableLayout:fi})},ya,Ma,Rn),wi&&S.createElement(M,{ref:Di,offsetScroll:la,scrollBodyRef:tr,onScroll:er})),Pi=S.createElement(S.Fragment,null,pt!==!1&&S.createElement(D,Object.assign({noData:!je.length},Ji,_r,{direction:ge,offsetHeader:ga,stickyClassName:tn,ref:jr,onScroll:er})),ua)}else Pi=S.createElement("div",{style:Object(Z.a)(Object(Z.a)({},xn),fn),className:T()("".concat(Xe,"-content")),onScroll:er,ref:tr},S.createElement(Ti,{style:Object(Z.a)(Object(Z.a)({},Zn),{},{tableLayout:fi})},ya,pt!==!1&&S.createElement(g,Object.assign({},Ji,_r)),Ma,Rn));var ba=Object(E.b)(De),Yi=S.createElement("div",Object.assign({className:T()(Xe,tt,(Me={},Object(ae.a)(Me,"".concat(Xe,"-rtl"),ge==="rtl"),Object(ae.a)(Me,"".concat(Xe,"-ping-left"),xr),Object(ae.a)(Me,"".concat(Xe,"-ping-right"),Mr),Object(ae.a)(Me,"".concat(Xe,"-layout-fixed"),fe==="fixed"),Object(ae.a)(Me,"".concat(Xe,"-fixed-header"),yr),Object(ae.a)(Me,"".concat(Xe,"-fixed-column"),ai),Object(ae.a)(Me,"".concat(Xe,"-scroll-horizontal"),or),Object(ae.a)(Me,"".concat(Xe,"-has-fix-left"),An[0]&&An[0].fixed),Object(ae.a)(Me,"".concat(Xe,"-has-fix-right"),An[An.length-1]&&An[An.length-1].fixed==="right"),Me)),style:Ke,id:qe,ref:Zr},ba),S.createElement(me,{pingLeft:xr,pingRight:Mr,props:Object(Z.a)(Object(Z.a)({},De),{},{stickyOffsets:ii,mergedExpandedKeys:En})},_e&&S.createElement(Ne,{className:"".concat(Xe,"-title")},_e(je)),S.createElement("div",{className:"".concat(Xe,"-container")},Pi),be&&S.createElement(Ne,{className:"".concat(Xe,"-footer")},be(je))));or&&(Yi=S.createElement(d.a,{onResize:Fr},Yi));var Gi=S.useMemo(function(){return{prefixCls:Xe,getComponent:kt,scrollbarSize:Ct,direction:ge,fixedInfoList:An.map(function(st,bt){return c(bt,bt,An,ii,ge)}),isSticky:wi}},[Xe,kt,Ct,ge,An,ii,ge,wi]),ka=S.useMemo(function(){return Object(Z.a)(Object(Z.a)({},_r),{},{tableLayout:fi,rowClassName:Ve,expandedRowClassName:St,componentWidth:ar,fixHeader:yr,fixColumn:ai,horizonScroll:or,expandIcon:ut,expandableType:Qt,expandRowByClick:He,expandedRowRender:ne,onTriggerExpand:Jt,expandIconColumnIndex:Et,indentSize:xt})},[_r,fi,Ve,St,ar,yr,ai,or,ut,Qt,He,ne,Jt,Et,xt]),at=S.useMemo(function(){return{onColumnResize:nr}},[nr]);return S.createElement(t.a.Provider,{value:Gi},S.createElement(F.Provider,{value:ka},S.createElement(J.Provider,{value:at},Yi)))}Re.Column=s.a,Re.ColumnGroup=u.a,Re.Summary=he.a,Re.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var rt=We.b=Re},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),O=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,c=Object(w.a)(n,["children"]),y=Object(U.a)({key:i},c);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,c=i.children;return c&&c.length>0?[].concat(Object(Z.a)(f),Object(Z.a)(h(c).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(O.a)(!1,"Index ".concat(i-1," of `columns` missing `fixed='left'` prop."));break}}for(var t=!0,c=s.length-1;c>=0;c-=1){var y=s[c];if(t&&y.fixed!=="right")t=!1;else if(!t&&y.fixed==="right"){Object(O.a)(!1,"Index ".concat(c+1," of `columns` missing `fixed='right'` prop."));break}}}function a(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 u(s,f){var i=s.prefixCls,n=s.columns,t=s.children,c=s.expandable,y=s.expandedKeys,v=s.getRowKey,_=s.onTriggerExpand,b=s.expandIcon,m=s.rowExpandable,g=s.expandIconColumnIndex,E=s.direction,o=s.expandRowByClick,x=P.useMemo(function(){return n||p(t)},[n,t]),C=P.useMemo(function(){if(c){var I,F=g||0,H=x[F],te=(I={},Object(ae.a)(I,l.a,{className:"".concat(i,"-expand-icon-col")}),Object(ae.a)(I,"title",""),Object(ae.a)(I,"fixed",H?H.fixed:null),Object(ae.a)(I,"className","".concat(i,"-row-expand-icon-cell")),Object(ae.a)(I,"render",function(X,J,B){var Q=v(J,B),ie=y.has(Q),oe=m?m(J):!0,Ee=b({prefixCls:i,expanded:ie,expandable:oe,record:J,onExpand:_});return o?P.createElement("span",{onClick:function(Le){return Le.stopPropagation()}},Ee):Ee}),I),j=x.slice();return F>=0&&j.splice(F,0,te),j}return x},[c,x,v,y,b,E]),A=P.useMemo(function(){var I=C;return f&&(I=f(I)),I.length||(I=[{render:function(){return null}}]),I},[f,C,E]),D=P.useMemo(function(){return E==="rtl"?a(h(A)):h(A)},[A,E]);return[A,D]}We.b=u},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 a});var ae=/margin|padding|width|height|max|min|offset/,Z={left:!0,top:!0},U={cssFloat:1,styleFloat:1,float:1};function w(u){return u.nodeType===1?u.ownerDocument.defaultView.getComputedStyle(u,null):{}}function P(u,s,f){if(s=s.toLowerCase(),f==="auto"){if(s==="height")return u.offsetHeight;if(s==="width")return u.offsetWidth}return s in Z||(Z[s]=ae.test(s)),Z[s]?parseFloat(f)||0:f}function S(u,s){var f=arguments.length,i=w(u);return s=U[s]?"cssFloat"in u.style?"cssFloat":"styleFloat":s,f===1?i:P(u,s,i[s]||u.style[s])}function O(u,s,f){var i=arguments.length;if(s=U[s]?"cssFloat"in u.style?"cssFloat":"styleFloat":s,i===3)return typeof f=="number"&&ae.test(s)&&(f="".concat(f,"px")),u.style[s]=f,f;for(var n in s)s.hasOwnProperty(n)&&O(u,n,s[n]);return w(u)}function T(u){return u===document.body?document.documentElement.clientWidth:u.offsetWidth}function l(u){return u===document.body?window.innerHeight||document.documentElement.clientHeight:u.offsetHeight}function p(){var u=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),s=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:u,height:s}}function h(){var u=document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return{width:u,height:s}}function d(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function a(u){var s=u.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:O,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 O(l){return U.removeItem(l)}function T(){S(function(l,p){delete U[l]})}}}]);
|