|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[117,5,6,7,8,10,13,16],{"+NIl":function(j,Q,k){(function(L){L(k("VrN/"))})(function(L){"use strict";L.defineMode("stex",function(h,C){"use strict";function D(c,g){c.cmdState.push(g)}function u(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function f(c){var g=c.cmdState.pop();g&&g.closeBracket()}function w(c){for(var g=c.cmdState,v=g.length-1;v>=0;v--){var x=g[v];if(x.name=="DEFAULT")continue;return x}return{styleIdentifier:function(){return null}}}function d(c,g,v){return function(){this.name=c,this.bracketNo=0,this.style=g,this.styles=v,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var o={};o.importmodule=d("importmodule","tag",["string","builtin"]),o.documentclass=d("documentclass","tag",["","atom"]),o.usepackage=d("usepackage","tag",["atom"]),o.begin=d("begin","tag",["atom"]),o.end=d("end","tag",["atom"]),o.label=d("label","tag",["atom"]),o.ref=d("ref","tag",["atom"]),o.eqref=d("eqref","tag",["atom"]),o.cite=d("cite","tag",["atom"]),o.bibitem=d("bibitem","tag",["atom"]),o.Bibitem=d("Bibitem","tag",["atom"]),o.RBibitem=d("RBibitem","tag",["atom"]),o.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function l(c,g){c.f=g}function a(c,g){var v;if(c.match(/^\\[a-zA-Z@]+/)){var x=c.current().slice(1);return v=o.hasOwnProperty(x)?o[x]:o.DEFAULT,v=new v,D(g,v),l(g,m),v.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return l(g,function(i,t){return _(i,t,"\\]")}),"keyword";if(c.match("\\("))return l(g,function(i,t){return _(i,t,"\\)")}),"keyword";if(c.match("$$"))return l(g,function(i,t){return _(i,t,"$$")}),"keyword";if(c.match("$"))return l(g,function(i,t){return _(i,t,"$")}),"keyword";var n=c.next();if(n=="%")return c.skipToEnd(),"comment";if(n=="}"||n=="]"){if(v=u(g),v)v.closeBracket(n),l(g,m);else return"error";return"bracket"}else return n=="{"||n=="["?(v=o.DEFAULT,v=new v,D(g,v),"bracket"):/\d/.test(n)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),v=w(g),v.name=="begin"&&(v.argument=c.current()),v.styleIdentifier())}function _(c,g,v){if(c.eatSpace())return null;if(v&&c.match(v))return l(g,a),"keyword";if(c.match(/^\\[a-zA-Z@]+/))return"tag";if(c.match(/^[a-zA-Z]+/))return"variable-2";if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";if(c.match(/^[\^_&]/))return"tag";if(c.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(c.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var x=c.next();return x=="{"||x=="}"||x=="["||x=="]"||x=="("||x==")"?"bracket":x=="%"?(c.skipToEnd(),"comment"):"error"}function m(c,g){var v=c.peek(),x;return v=="{"||v=="["?(x=u(g),x.openBracket(v),c.eat(v),l(g,a),"bracket"):/[ \t\r]/.test(v)?(c.eat(v),null):(l(g,a),f(g),a(c,g))}return{startState:function(){var c=C.inMathMode?function(g,v){return _(g,v)}:a;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,g){return g.f(c,g)},blankLine:function(c){c.f=a,c.cmdState.length=0},lineComment:"%"}}),L.defineMIME("text/x-stex","stex"),L.defineMIME("text/x-latex","stex")})},"19Vz":function(j,Q,k){(function(L){L(k("VrN/"))})(function(L){L.defineOption("placeholder","",function(d,o,l){var a=l&&l!=L.Init;if(o&&!a)d.on("blur",u),d.on("change",f),d.on("swapDoc",f),L.on(d.getInputField(),"compositionupdate",d.state.placeholderCompose=function(){D(d)}),f(d);else if(!o&&a){d.off("blur",u),d.off("change",f),d.off("swapDoc",f),L.off(d.getInputField(),"compositionupdate",d.state.placeholderCompose),h(d);var _=d.getWrapperElement();_.className=_.className.replace(" CodeMirror-empty","")}o&&!d.hasFocus()&&u(d)});function h(d){d.state.placeholder&&(d.state.placeholder.parentNode.removeChild(d.state.placeholder),d.state.placeholder=null)}function C(d){h(d);var o=d.state.placeholder=document.createElement("pre");o.style.cssText="height: 0; overflow: visible",o.style.direction=d.getOption("direction"),o.className="CodeMirror-placeholder CodeMirror-line-like";var l=d.getOption("placeholder");typeof l=="string"&&(l=document.createTextNode(l)),o.appendChild(l),d.display.lineSpace.insertBefore(o,d.display.lineSpace.firstChild)}function D(d){setTimeout(function(){var o=!1,l=d.getInputField();l.nodeName=="TEXTAREA"?o=!l.value:d.lineCount()==1&&(o=!/[^\u200b]/.test(l.querySelector(".CodeMirror-line").textContent)),o?C(d):h(d)},20)}function u(d){w(d)&&C(d)}function f(d){var o=d.getWrapperElement(),l=w(d);o.className=o.className.replace(" CodeMirror-empty","")+(l?" CodeMirror-empty":""),l?C(d):h(d)}function w(d){return d.lineCount()===1&&d.getLine(0)===""}})},"1ZF9":function(j,Q,k){j.exports=k.p+"static/Authorize.cc9c212f.png"},"1eCo":function(j,Q,k){(function(L){L(k("VrN/"))})(function(L){"use strict";var h={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},C={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};L.defineMode("xml",function(D,u){var f=D.indentUnit,w={},d=u.htmlMode?h:C;for(var o in d)w[o]=d[o];for(var o in u)w[o]=u[o];var l,a;function _(T,M){function N(H){return M.tokenize=H,H(T,M)}var I=T.next();if(I=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?N(g("atom","]]>")):null:T.match("--")?N(g("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),N(v(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),M.tokenize=g("meta","?>"),"meta"):(l=T.eat("/")?"closeTag":"openTag",M.tokenize=m,"tag bracket");if(I=="&"){var K;return T.eat("#")?T.eat("x")?K=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):K=T.eatWhile(/[\d]/)&&T.eat(";"):K=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),K?"atom":"error"}else return T.eatWhile(/[^&<]/),null}_.isInText=!0;function m(T,M){var N=T.next();if(N==">"||N=="/"&&T.eat(">"))return M.tokenize=_,l=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return l="equals",null;if(N=="<"){M.tokenize=_,M.state=t,M.tagName=M.tagStart=null;var I=M.tokenize(T,M);return I?I+" tag error":"tag error"}else return/[\'\"]/.test(N)?(M.tokenize=c(N),M.stringStartCol=T.column(),M.tokenize(T,M)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(T){var M=function(N,I){for(;!N.eol();)if(N.next()==T){I.tokenize=m;break}return"string"};return M.isInAttribute=!0,M}function g(T,M){return function(N,I){for(;!N.eol();){if(N.match(M)){I.tokenize=_;break}N.next()}return T}}function v(T){return function(M,N){for(var I;(I=M.next())!=null;){if(I=="<")return N.tokenize=v(T+1),N.tokenize(M,N);if(I==">")if(T==1){N.tokenize=_;break}else return N.tokenize=v(T-1),N.tokenize(M,N)}return"meta"}}function x(T,M,N){this.prev=T.context,this.tagName=M,this.indent=T.indented,this.startOfLine=N,(w.doNotIndent.hasOwnProperty(M)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function n(T){T.context&&(T.context=T.context.prev)}function i(T,M){for(var N;;){if(!T.context)return;if(N=T.context.tagName,!w.contextGrabbers.hasOwnProperty(N)||!w.contextGrabbers[N].hasOwnProperty(M))return;n(T)}}function t(T,M,N){return T=="openTag"?(N.tagStart=M.column(),S):T=="closeTag"?E:t}function S(T,M,N){return T=="word"?(N.tagName=M.current(),a="tag",O):w.allowMissingTagName&&T=="endTag"?(a="tag bracket",O(T,M,N)):(a="error",S)}function E(T,M,N){if(T=="word"){var I=M.current();return N.context&&N.context.tagName!=I&&w.implicitlyClosed.hasOwnProperty(N.context.tagName)&&n(N),N.context&&N.context.tagName==I||w.matchClosing===!1?(a="tag",s):(a="tag error",P)}else return w.allowMissingTagName&&T=="endTag"?(a="tag bracket",s(T,M,N)):(a="error",P)}function s(T,M,N){return T!="endTag"?(a="error",s):(n(N),t)}function P(T,M,N){return a="error",s(T,M,N)}function O(T,M,N){if(T=="word")return a="attribute",b;if(T=="endTag"||T=="selfcloseTag"){var I=N.tagName,K=N.tagStart;return N.tagName=N.tagStart=null,T=="selfcloseTag"||w.autoSelfClosers.hasOwnProperty(I)?i(N,I):(i(N,I),N.context=new x(N,I,K==N.indented)),t}return a="error",O}function b(T,M,N){return T=="equals"?y:(w.allowMissing||(a="error"),O(T,M,N))}function y(T,M,N){return T=="string"?p:T=="word"&&w.allowUnquoted?(a="string",O):(a="error",O(T,M,N))}function p(T,M,N){return T=="string"?p:O(T,M,N)}return{startState:function(T){var M={tokenize:_,state:t,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(M.baseIndent=T),M},token:function(T,M){if(!M.tagName&&T.sol()&&(M.indented=T.indentation()),T.eatSpace())return null;l=null;var N=M.tokenize(T,M);return(N||l)&&N!="comment"&&(a=null,M.state=M.state(l||N,T,M),a&&(N=a=="error"?N+" error":a)),N},indent:function(T,M,N){var I=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+f;if(I&&I.noIndent)return L.Pass;if(T.tokenize!=m&&T.tokenize!=_)return N?N.match(/^(\s*)/)[0].length:0;if(T.tagName)return w.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+f*(w.multilineTagIndentFactor||1);if(w.alignCDATA&&/<!\[CDATA\[/.test(M))return 0;var K=M&&/^<(\/)?([\w_:\.-]*)/.exec(M);if(K&&K[1])for(;I;)if(I.tagName==K[2]){I=I.prev;break}else if(w.implicitlyClosed.hasOwnProperty(I.tagName))I=I.prev;else break;else if(K)for(;I;){var H=w.contextGrabbers[I.tagName];if(H&&H.hasOwnProperty(K[2]))I=I.prev;else break}for(;I&&I.prev&&!I.startOfLine;)I=I.prev;return I?I.indent+f:T.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(T){T.state==y&&(T.state=O)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var M=[],N=T.context;N;N=N.prev)N.tagName&&M.push(N.tagName);return M.reverse()}}}),L.defineMIME("text/xml","xml"),L.defineMIME("application/xml","xml"),L.mimeModes.hasOwnProperty("text/html")||L.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("MlIO"))})(this,function(L){return function(){var h=L,C=h.lib,D=C.Hasher,u=h.x64,f=u.Word,w=u.WordArray,d=h.algo;function o(){return f.create.apply(f,arguments)}var l=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],a=[];(function(){for(var m=0;m<80;m++)a[m]=o()})();var _=d.SHA512=D.extend({_doReset:function(){this._hash=new w.init([new f.init(1779033703,4089235720),new f.init(3144134277,2227873595),new f.init(1013904242,4271175723),new f.init(2773480762,1595750129),new f.init(1359893119,2917565137),new f.init(2600822924,725511199),new f.init(528734635,4215389547),new f.init(1541459225,327033209)])},_doProcessBlock:function(m,c){for(var g=this._hash.words,v=g[0],x=g[1],n=g[2],i=g[3],t=g[4],S=g[5],E=g[6],s=g[7],P=v.high,O=v.low,b=x.high,y=x.low,p=n.high,T=n.low,M=i.high,N=i.low,I=t.high,K=t.low,H=S.high,W=S.low,z=E.high,U=E.low,B=s.high,G=s.low,q=P,ae=O,se=b,we=y,Se=p,de=T,xe=M,he=N,ne=I,oe=K,te=H,le=W,Y=z,Z=U,ge=B,ee=G,$=0;$<80;$++){var X,J,me=a[$];if($<16)J=me.high=m[c+$*2]|0,X=me.low=m[c+$*2+1]|0;else{var ue=a[$-15],_e=ue.high,He=ue.low,$e=(_e>>>1|He<<31)^(_e>>>8|He<<24)^_e>>>7,Ye=(He>>>1|_e<<31)^(He>>>8|_e<<24)^(He>>>7|_e<<25),tt=a[$-2],nt=tt.high,it=tt.low,Me=(nt>>>19|it<<13)^(nt<<3|it>>>29)^nt>>>6,Ce=(it>>>19|nt<<13)^(it<<3|nt>>>29)^(it>>>6|nt<<26),Je=a[$-7],rt=Je.high,ze=Je.low,et=a[$-16],ke=et.high,Re=et.low;X=Ye+ze,J=$e+rt+(X>>>0<Ye>>>0?1:0),X=X+Ce,J=J+Me+(X>>>0<Ce>>>0?1:0),X=X+Re,J=J+ke+(X>>>0<Re>>>0?1:0),me.high=J,me.low=X}var Te=ne&te^~ne&Y,fe=oe&le^~oe&Z,ye=q&se^q&Se^se&Se,Ee=ae&we^ae&de^we&de,Oe=(q>>>28|ae<<4)^(q<<30|ae>>>2)^(q<<25|ae>>>7),We=(ae>>>28|q<<4)^(ae<<30|q>>>2)^(ae<<25|q>>>7),Ve=(ne>>>14|oe<<18)^(ne>>>18|oe<<14)^(ne<<23|oe>>>9),ut=(oe>>>14|ne<<18)^(oe>>>18|ne<<14)^(oe<<23|ne>>>9),ft=l[$],Dt=ft.high,Mt=ft.low,lr=ee+ut,dr=ge+Ve+(lr>>>0<ee>>>0?1:0),lr=lr+fe,dr=dr+Te+(lr>>>0<fe>>>0?1:0),lr=lr+Mt,dr=dr+Dt+(lr>>>0<Mt>>>0?1:0),lr=lr+X,dr=dr+J+(lr>>>0<X>>>0?1:0),Tt=We+Ee,$r=Oe+ye+(Tt>>>0<We>>>0?1:0);ge=Y,ee=Z,Y=te,Z=le,te=ne,le=oe,oe=he+lr|0,ne=xe+dr+(oe>>>0<he>>>0?1:0)|0,xe=Se,he=de,Se=se,de=we,se=q,we=ae,ae=lr+Tt|0,q=dr+$r+(ae>>>0<lr>>>0?1:0)|0}O=v.low=O+ae,v.high=P+q+(O>>>0<ae>>>0?1:0),y=x.low=y+we,x.high=b+se+(y>>>0<we>>>0?1:0),T=n.low=T+de,n.high=p+Se+(T>>>0<de>>>0?1:0),N=i.low=N+he,i.high=M+xe+(N>>>0<he>>>0?1:0),K=t.low=K+oe,t.high=I+ne+(K>>>0<oe>>>0?1:0),W=S.low=W+le,S.high=H+te+(W>>>0<le>>>0?1:0),U=E.low=U+Z,E.high=z+Y+(U>>>0<Z>>>0?1:0),G=s.low=G+ee,s.high=B+ge+(G>>>0<ee>>>0?1:0)},_doFinalize:function(){var m=this._data,c=m.words,g=this._nDataBytes*8,v=m.sigBytes*8;c[v>>>5]|=128<<24-v%32,c[(v+128>>>10<<5)+30]=Math.floor(g/4294967296),c[(v+128>>>10<<5)+31]=g,m.sigBytes=c.length*4,this._process();var x=this._hash.toX32();return x},clone:function(){var m=D.clone.call(this);return m._hash=this._hash.clone(),m},blockSize:1024/32});h.SHA512=D._createHelper(_),h.HmacSHA512=D._createHmacHelper(_)}(),L.SHA512})},"3y9D":function(j,Q,k){(function(L,h){j.exports=Q=h(k("Ib8C"))})(this,function(L){return function(){var h=L,C=h.lib,D=C.WordArray,u=C.Hasher,f=h.algo,w=[],d=f.SHA1=u.extend({_doReset:function(){this._hash=new D.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(o,l){for(var a=this._hash.words,_=a[0],m=a[1],c=a[2],g=a[3],v=a[4],x=0;x<80;x++){if(x<16)w[x]=o[l+x]|0;else{var n=w[x-3]^w[x-8]^w[x-14]^w[x-16];w[x]=n<<1|n>>>31}var i=(_<<5|_>>>27)+v+w[x];x<20?i+=(m&c|~m&g)+1518500249:x<40?i+=(m^c^g)+1859775393:x<60?i+=(m&c|m&g|c&g)-1894007588:i+=(m^c^g)-899497514,v=g,g=c,c=m<<30|m>>>2,m=_,_=i}a[0]=a[0]+_|0,a[1]=a[1]+m|0,a[2]=a[2]+c|0,a[3]=a[3]+g|0,a[4]=a[4]+v|0},_doFinalize:function(){var o=this._data,l=o.words,a=this._nDataBytes*8,_=o.sigBytes*8;return l[_>>>5]|=128<<24-_%32,l[(_+64>>>9<<4)+14]=Math.floor(a/4294967296),l[(_+64>>>9<<4)+15]=a,o.sigBytes=l.length*4,this._process(),this._hash},clone:function(){var o=u.clone.call(this);return o._hash=this._hash.clone(),o}});h.SHA1=u._createHelper(d),h.HmacSHA1=u._createHmacHelper(d)}(),L.SHA1})},4:function(j,Q){},"55Ip":function(j,Q,k){"use strict";k.d(Q,"a",function(){return i});var L=k("Ty5D"),h=k("dI71"),C=k("q1tI"),D=k.n(C),u=k("YS25"),f=k("17x9"),w=k.n(f),d=k("wx14"),o=k("zLVn"),l=k("9R94"),a=function(y){Object(h.a)(p,y);function p(){for(var M,N=arguments.length,I=new Array(N),K=0;K<N;K++)I[K]=arguments[K];return M=y.call.apply(y,[this].concat(I))||this,M.history=Object(u.a)(M.props),M}var T=p.prototype;return T.render=function(){return D.a.createElement(L.c,{history:this.history,children:this.props.children})},p}(D.a.Component),_=function(y){Object(h.a)(p,y);function p(){for(var M,N=arguments.length,I=new Array(N),K=0;K<N;K++)I[K]=arguments[K];return M=y.call.apply(y,[this].concat(I))||this,M.history=Object(u.b)(M.props),M}var T=p.prototype;return T.render=function(){return D.a.createElement(L.c,{history:this.history,children:this.props.children})},p}(D.a.Component),m=function(p,T){return typeof p=="function"?p(T):p},c=function(p,T){return typeof p=="string"?Object(u.c)(p,null,null,T):p},g=function(p){return p},v=D.a.forwardRef;typeof v=="undefined"&&(v=g);function x(y){return!!(y.metaKey||y.altKey||y.ctrlKey||y.shiftKey)}var n=v(function(y,p){var T=y.innerRef,M=y.navigate,N=y.onClick,I=Object(o.a)(y,["innerRef","navigate","onClick"]),K=I.target,H=Object(d.a)({},I,{onClick:function(z){try{N&&N(z)}catch(U){throw z.preventDefault(),U}!z.defaultPrevented&&z.button===0&&(!K||K==="_self")&&!x(z)&&(z.preventDefault(),M())}});return g!==v?H.ref=p||T:H.ref=T,D.a.createElement("a",H)}),i=v(function(y,p){var T=y.component,M=T===void 0?n:T,N=y.replace,I=y.to,K=y.innerRef,H=Object(o.a)(y,["component","replace","to","innerRef"]);return D.a.createElement(L.e.Consumer,null,function(W){W||Object(l.a)(!1);var z=W.history,U=c(m(I,W.location),W.location),B=U?z.createHref(U):"",G=Object(d.a)({},H,{href:B,navigate:function(){var ae=m(I,W.location),se=N?z.replace:z.push;se(ae)}});return g!==v?G.ref=p||K:G.innerRef=K,D.a.createElement(M,G)})});if(!1)var t,S;var E=function(p){return p},s=D.a.forwardRef;typeof s=="undefined"&&(s=E);function P(){for(var y=arguments.length,p=new Array(y),T=0;T<y;T++)p[T]=arguments[T];return p.filter(function(M){return M}).join(" ")}var O=s(function(y,p){var T=y["aria-current"],M=T===void 0?"page":T,N=y.activeClassName,I=N===void 0?"active":N,K=y.activeStyle,H=y.className,W=y.exact,z=y.isActive,U=y.location,B=y.sensitive,G=y.strict,q=y.style,ae=y.to,se=y.innerRef,we=Object(o.a)(y,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return D.a.createElement(L.e.Consumer,null,function(Se){Se||Object(l.a)(!1);var de=U||Se.location,xe=c(m(ae,de),de),he=xe.pathname,ne=he&&he.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),oe=ne?Object(L.f)(de.pathname,{path:ne,exact:W,sensitive:B,strict:G}):null,te=!!(z?z(oe,de):oe),le=te?P(H,I):H,Y=te?Object(d.a)({},q,{},K):q,Z=Object(d.a)({"aria-current":te&&M||null,className:le,style:Y,to:xe},we);return E!==s?Z.ref=p||se:Z.innerRef=se,D.a.createElement(i,Z)})});if(!1)var b},"5hvy":function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("MlIO"))})(this,function(L){return function(h){var C=L,D=C.lib,u=D.WordArray,f=D.Hasher,w=C.x64,d=w.Word,o=C.algo,l=[],a=[],_=[];(function(){for(var g=1,v=0,x=0;x<24;x++){l[g+5*v]=(x+1)*(x+2)/2%64;var n=v%5,i=(2*g+3*v)%5;g=n,v=i}for(var g=0;g<5;g++)for(var v=0;v<5;v++)a[g+5*v]=v+(2*g+3*v)%5*5;for(var t=1,S=0;S<24;S++){for(var E=0,s=0,P=0;P<7;P++){if(t&1){var O=(1<<P)-1;O<32?s^=1<<O:E^=1<<O-32}t&128?t=t<<1^113:t<<=1}_[S]=d.create(E,s)}})();var m=[];(function(){for(var g=0;g<25;g++)m[g]=d.create()})();var c=o.SHA3=f.extend({cfg:f.cfg.extend({outputLength:512}),_doReset:function(){for(var g=this._state=[],v=0;v<25;v++)g[v]=new d.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(g,v){for(var x=this._state,n=this.blockSize/2,i=0;i<n;i++){var t=g[v+2*i],S=g[v+2*i+1];t=(t<<8|t>>>24)&16711935|(t<<24|t>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var E=x[i];E.high^=S,E.low^=t}for(var s=0;s<24;s++){for(var P=0;P<5;P++){for(var O=0,b=0,y=0;y<5;y++){var E=x[P+5*y];O^=E.high,b^=E.low}var p=m[P];p.high=O,p.low=b}for(var P=0;P<5;P++)for(var T=m[(P+4)%5],M=m[(P+1)%5],N=M.high,I=M.low,O=T.high^(N<<1|I>>>31),b=T.low^(I<<1|N>>>31),y=0;y<5;y++){var E=x[P+5*y];E.high^=O,E.low^=b}for(var K=1;K<25;K++){var O,b,E=x[K],H=E.high,W=E.low,z=l[K];z<32?(O=H<<z|W>>>32-z,b=W<<z|H>>>32-z):(O=W<<z-32|H>>>64-z,b=H<<z-32|W>>>64-z);var U=m[a[K]];U.high=O,U.low=b}var B=m[0],G=x[0];B.high=G.high,B.low=G.low;for(var P=0;P<5;P++)for(var y=0;y<5;y++){var K=P+5*y,E=x[K],q=m[K],ae=m[(P+1)%5+5*y],se=m[(P+2)%5+5*y];E.high=q.high^~ae.high&se.high,E.low=q.low^~ae.low&se.low}var E=x[0],we=_[s];E.high^=we.high,E.low^=we.low}},_doFinalize:function(){var g=this._data,v=g.words,x=this._nDataBytes*8,n=g.sigBytes*8,i=this.blockSize*32;v[n>>>5]|=1<<24-n%32,v[(h.ceil((n+1)/i)*i>>>5)-1]|=128,g.sigBytes=v.length*4,this._process();for(var t=this._state,S=this.cfg.outputLength/8,E=S/8,s=[],P=0;P<E;P++){var O=t[P],b=O.high,y=O.low;b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,s.push(y),s.push(b)}return new u.init(s,S)},clone:function(){for(var g=f.clone.call(this),v=g._state=this._state.slice(0),x=0;x<25;x++)v[x]=v[x].clone();return g}});C.SHA3=f._createHelper(c),C.HmacSHA3=f._createHmacHelper(c)}(Math),L.SHA3})},"6+eU":function(j,Q,k){"use strict";k.d(Q,"a",function(){return s});var L=k("wx14"),h=k("rePB"),C=k("VTBJ"),D=k("1OyB"),u=k("vuIU"),f=k("Ji7U"),w=k("LK+K"),d=k("q1tI"),o=k.n(d),l=k("TSYQ"),a=k.n(l),_=function(O){var b,y="".concat(O.rootPrefixCls,"-item"),p=a()(y,"".concat(y,"-").concat(O.page),(b={},Object(h.a)(b,"".concat(y,"-active"),O.active),Object(h.a)(b,O.className,!!O.className),Object(h.a)(b,"".concat(y,"-disabled"),!O.page),b)),T=function(){O.onClick(O.page)},M=function(I){O.onKeyPress(I,O.onClick,O.page)};return o.a.createElement("li",{title:O.showTitle?O.page:null,className:p,onClick:T,onKeyPress:M,tabIndex:"0"},O.itemRender(O.page,"page",o.a.createElement("a",{rel:"nofollow"},O.page)))},m=_,c={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},g=function(P){Object(f.a)(b,P);var O=Object(w.a)(b);function b(){var y;Object(D.a)(this,b);for(var p=arguments.length,T=new Array(p),M=0;M<p;M++)T[M]=arguments[M];return y=O.call.apply(O,[this].concat(T)),y.state={goInputText:""},y.buildOptionText=function(N){return"".concat(N," ").concat(y.props.locale.items_per_page)},y.changeSize=function(N){y.props.changeSize(Number(N))},y.handleChange=function(N){y.setState({goInputText:N.target.value})},y.handleBlur=function(N){var I=y.props,K=I.goButton,H=I.quickGo,W=I.rootPrefixCls,z=y.state.goInputText;if(K||z==="")return;if(N.relatedTarget&&(N.relatedTarget.className.indexOf("".concat(W,"-prev"))>=0||N.relatedTarget.className.indexOf("".concat(W,"-next"))>=0))return;y.setState({goInputText:""}),H(y.getValidValue())},y.go=function(N){var I=y.state.goInputText;if(I==="")return;(N.keyCode===c.ENTER||N.type==="click")&&(y.setState({goInputText:""}),y.props.quickGo(y.getValidValue()))},y}return Object(u.a)(b,[{key:"getValidValue",value:function(){var p=this.state,T=p.goInputText,M=p.current;return!T||isNaN(T)?M:Number(T)}},{key:"getPageSizeOptions",value:function(){var p=this.props,T=p.pageSize,M=p.pageSizeOptions;return M.some(function(N){return N.toString()===T.toString()})?M:M.concat([T.toString()]).sort(function(N,I){var K=isNaN(Number(N))?0:Number(N),H=isNaN(Number(I))?0:Number(I);return K-H})}},{key:"render",value:function(){var p=this,T=this.props,M=T.pageSize,N=T.locale,I=T.rootPrefixCls,K=T.changeSize,H=T.quickGo,W=T.goButton,z=T.selectComponentClass,U=T.buildOptionText,B=T.selectPrefixCls,G=T.disabled,q=this.state.goInputText,ae="".concat(I,"-options"),se=z,we=null,Se=null,de=null;if(!K&&!H)return null;var xe=this.getPageSizeOptions();if(K&&se){var he=xe.map(function(ne,oe){return o.a.createElement(se.Option,{key:oe,value:ne.toString()},(U||p.buildOptionText)(ne))});we=o.a.createElement(se,{disabled:G,prefixCls:B,showSearch:!1,className:"".concat(ae,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(M||xe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(oe){return oe.parentNode}},he)}return H&&(W&&(de=typeof W=="boolean"?o.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:G,className:"".concat(ae,"-quick-jumper-button")},N.jump_to_confirm):o.a.createElement("span",{onClick:this.go,onKeyUp:this.go},W)),Se=o.a.createElement("div",{className:"".concat(ae,"-quick-jumper")},N.jump_to,o.a.createElement("input",{disabled:G,type:"text",value:q,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),N.page,de)),o.a.createElement("li",{className:"".concat(ae)},we,Se)}}]),b}(o.a.Component);g.defaultProps={pageSizeOptions:["10","20","50","100"]};var v=g,x=k("N2Kk");function n(){}function i(P){return typeof P=="number"&&isFinite(P)&&Math.floor(P)===P}function t(P,O,b){return b}function S(P,O,b){var y=typeof P=="undefined"?O.pageSize:P;return Math.floor((b.total-1)/y)+1}var E=function(P){Object(f.a)(b,P);var O=Object(w.a)(b);function b(y){var p;Object(D.a)(this,b),p=O.call(this,y),p.getJumpPrevPage=function(){return Math.max(1,p.state.current-(p.props.showLessItems?3:5))},p.getJumpNextPage=function(){return Math.min(S(void 0,p.state,p.props),p.state.current+(p.props.showLessItems?3:5))},p.getItemIcon=function(K,H){var W=p.props.prefixCls,z=K||o.a.createElement("button",{type:"button","aria-label":H,className:"".concat(W,"-item-link")});return typeof K=="function"&&(z=o.a.createElement(K,Object(C.a)({},p.props))),z},p.savePaginationNode=function(K){p.paginationNode=K},p.isValid=function(K){return i(K)&&K!==p.state.current},p.shouldDisplayQuickJumper=function(){var K=p.props,H=K.showQuickJumper,W=K.pageSize,z=K.total;return z<=W?!1:H},p.handleKeyDown=function(K){(K.keyCode===c.ARROW_UP||K.keyCode===c.ARROW_DOWN)&&K.preventDefault()},p.handleKeyUp=function(K){var H=p.getValidValue(K),W=p.state.currentInputValue;H!==W&&p.setState({currentInputValue:H}),K.keyCode===c.ENTER?p.handleChange(H):K.keyCode===c.ARROW_UP?p.handleChange(H-1):K.keyCode===c.ARROW_DOWN&&p.handleChange(H+1)},p.changePageSize=function(K){var H=p.state.current,W=S(K,p.state,p.props);H=H>W?W:H,W===0&&(H=p.state.current),typeof K=="number"&&("pageSize"in p.props||p.setState({pageSize:K}),"current"in p.props||p.setState({current:H,currentInputValue:H})),p.props.onShowSizeChange(H,K),"onChange"in p.props&&p.props.onChange&&p.props.onChange(H,K)},p.handleChange=function(K){var H=p.props.disabled,W=K;if(p.isValid(W)&&!H){var z=S(void 0,p.state,p.props);W>z?W=z:W<1&&(W=1),"current"in p.props||p.setState({current:W,currentInputValue:W});var U=p.state.pageSize;return p.props.onChange(W,U),W}return p.state.current},p.prev=function(){p.hasPrev()&&p.handleChange(p.state.current-1)},p.next=function(){p.hasNext()&&p.handleChange(p.state.current+1)},p.jumpPrev=function(){p.handleChange(p.getJumpPrevPage())},p.jumpNext=function(){p.handleChange(p.getJumpNextPage())},p.hasPrev=function(){return p.state.current>1},p.hasNext=function(){return p.state.current<S(void 0,p.state,p.props)},p.runIfEnter=function(K,H){if(K.key==="Enter"||K.charCode===13){for(var W=arguments.length,z=new Array(W>2?W-2:0),U=2;U<W;U++)z[U-2]=arguments[U];H.apply(void 0,z)}},p.runIfEnterPrev=function(K){p.runIfEnter(K,p.prev)},p.runIfEnterNext=function(K){p.runIfEnter(K,p.next)},p.runIfEnterJumpPrev=function(K){p.runIfEnter(K,p.jumpPrev)},p.runIfEnterJumpNext=function(K){p.runIfEnter(K,p.jumpNext)},p.handleGoTO=function(K){(K.keyCode===c.ENTER||K.type==="click")&&p.handleChange(p.state.currentInputValue)};var T=y.onChange!==n,M="current"in y;M&&!T&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var N=y.defaultCurrent;"current"in y&&(N=y.current);var I=y.defaultPageSize;return"pageSize"in y&&(I=y.pageSize),N=Math.min(N,S(I,void 0,y)),p.state={current:N,currentInputValue:N,pageSize:I},p}return Object(u.a)(b,[{key:"componentDidUpdate",value:function(p,T){var M=this.props.prefixCls;if(T.current!==this.state.current&&this.paginationNode){var N=this.paginationNode.querySelector(".".concat(M,"-item-").concat(T.current));N&&document.activeElement===N&&N.blur()}}},{key:"getValidValue",value:function(p){var T=p.target.value,M=S(void 0,this.state,this.props),N=this.state.currentInputValue,I;return T===""?I=T:isNaN(Number(T))?I=N:T>=M?I=M:I=Number(T),I}},{key:"getShowSizeChanger",value:function(){var p=this.props,T=p.showSizeChanger,M=p.total,N=p.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:M>N}},{key:"renderPrev",value:function(p){var T=this.props,M=T.prevIcon,N=T.itemRender,I=N(p,"prev",this.getItemIcon(M,"prev page")),K=!this.hasPrev();return Object(d.isValidElement)(I)?Object(d.cloneElement)(I,{disabled:K}):I}},{key:"renderNext",value:function(p){var T=this.props,M=T.nextIcon,N=T.itemRender,I=N(p,"next",this.getItemIcon(M,"next page")),K=!this.hasNext();return Object(d.isValidElement)(I)?Object(d.cloneElement)(I,{disabled:K}):I}},{key:"render",value:function(){var p=this,T=this.props,M=T.prefixCls,N=T.className,I=T.style,K=T.disabled,H=T.hideOnSinglePage,W=T.total,z=T.locale,U=T.showQuickJumper,B=T.showLessItems,G=T.showTitle,q=T.showTotal,ae=T.simple,se=T.itemRender,we=T.showPrevNextJumpers,Se=T.jumpPrevIcon,de=T.jumpNextIcon,xe=T.selectComponentClass,he=T.selectPrefixCls,ne=T.pageSizeOptions,oe=this.state,te=oe.current,le=oe.pageSize,Y=oe.currentInputValue;if(H===!0&&W<=le)return null;var Z=S(void 0,this.state,this.props),ge=[],ee=null,$=null,X=null,J=null,me=null,ue=U&&U.goButton,_e=B?1:2,He=te-1>0?te-1:0,$e=te+1<Z?te+1:Z,Ye=Object.keys(this.props).reduce(function(fe,ye){return(ye.substr(0,5)==="data-"||ye.substr(0,5)==="aria-"||ye==="role")&&(fe[ye]=p.props[ye]),fe},{});if(ae)return ue&&(typeof ue=="boolean"?me=o.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},z.jump_to_confirm):me=o.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ue),me=o.a.createElement("li",{title:G?"".concat(z.jump_to).concat(te,"/").concat(Z):null,className:"".concat(M,"-simple-pager")},me)),o.a.createElement("ul",Object(L.a)({className:a()(M,"".concat(M,"-simple"),Object(h.a)({},"".concat(M,"-disabled"),K),N),style:I,ref:this.savePaginationNode},Ye),o.a.createElement("li",{title:G?z.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:a()("".concat(M,"-prev"),Object(h.a)({},"".concat(M,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(He)),o.a.createElement("li",{title:G?"".concat(te,"/").concat(Z):null,className:"".concat(M,"-simple-pager")},o.a.createElement("input",{type:"text",value:Y,disabled:K,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),o.a.createElement("span",{className:"".concat(M,"-slash")},"/"),Z),o.a.createElement("li",{title:G?z.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:a()("".concat(M,"-next"),Object(h.a)({},"".concat(M,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext($e)),me);if(Z<=3+_e*2){var tt={locale:z,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:G,itemRender:se};Z||ge.push(o.a.createElement(m,Object(L.a)({},tt,{key:"noPager",page:Z,className:"".concat(M,"-disabled")})));for(var nt=1;nt<=Z;nt+=1){var it=te===nt;ge.push(o.a.createElement(m,Object(L.a)({},tt,{key:nt,page:nt,active:it})))}}else{var Me=B?z.prev_3:z.prev_5,Ce=B?z.next_3:z.next_5;we&&(ee=o.a.createElement("li",{title:G?Me:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:a()("".concat(M,"-jump-prev"),Object(h.a)({},"".concat(M,"-jump-prev-custom-icon"),!!Se))},se(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Se,"prev page"))),$=o.a.createElement("li",{title:G?Ce:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:a()("".concat(M,"-jump-next"),Object(h.a)({},"".concat(M,"-jump-next-custom-icon"),!!de))},se(this.getJumpNextPage(),"jump-next",this.getItemIcon(de,"next page")))),J=o.a.createElement(m,{locale:z,last:!0,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Z,page:Z,active:!1,showTitle:G,itemRender:se}),X=o.a.createElement(m,{locale:z,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:G,itemRender:se});var Je=Math.max(1,te-_e),rt=Math.min(te+_e,Z);te-1<=_e&&(rt=1+_e*2),Z-te<=_e&&(Je=Z-_e*2);for(var ze=Je;ze<=rt;ze+=1){var et=te===ze;ge.push(o.a.createElement(m,{locale:z,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ze,page:ze,active:et,showTitle:G,itemRender:se}))}te-1>=_e*2&&te!==1+2&&(ge[0]=Object(d.cloneElement)(ge[0],{className:"".concat(M,"-item-after-jump-prev")}),ge.unshift(ee)),Z-te>=_e*2&&te!==Z-2&&(ge[ge.length-1]=Object(d.cloneElement)(ge[ge.length-1],{className:"".concat(M,"-item-before-jump-next")}),ge.push($)),Je!==1&&ge.unshift(X),rt!==Z&&ge.push(J)}var ke=null;q&&(ke=o.a.createElement("li",{className:"".concat(M,"-total-text")},q(W,[W===0?0:(te-1)*le+1,te*le>W?W:te*le])));var Re=!this.hasPrev()||!Z,Te=!this.hasNext()||!Z;return o.a.createElement("ul",Object(L.a)({className:a()(M,N,Object(h.a)({},"".concat(M,"-disabled"),K)),style:I,unselectable:"unselectable",ref:this.savePaginationNode},Ye),ke,o.a.createElement("li",{title:G?z.prev_page:null,onClick:this.prev,tabIndex:Re?null:0,onKeyPress:this.runIfEnterPrev,className:a()("".concat(M,"-prev"),Object(h.a)({},"".concat(M,"-disabled"),Re)),"aria-disabled":Re},this.renderPrev(He)),ge,o.a.createElement("li",{title:G?z.next_page:null,onClick:this.next,tabIndex:Te?null:0,onKeyPress:this.runIfEnterNext,className:a()("".concat(M,"-next"),Object(h.a)({},"".concat(M,"-disabled"),Te)),"aria-disabled":Te},this.renderNext($e)),o.a.createElement(v,{disabled:K,locale:z,rootPrefixCls:M,selectComponentClass:xe,selectPrefixCls:he,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:te,pageSize:le,pageSizeOptions:ne,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ue}))}}],[{key:"getDerivedStateFromProps",value:function(p,T){var M={};if("current"in p&&(M.current=p.current,p.current!==T.current&&(M.currentInputValue=M.current)),"pageSize"in p&&p.pageSize!==T.pageSize){var N=T.current,I=S(p.pageSize,T,p);N=N>I?I:N,"current"in p||(M.current=N,M.currentInputValue=N),M.pageSize=p.pageSize}return M}}]),b}(o.a.Component);E.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:x.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var s=E},"6RRn":function(j,Q,k){"use strict";var L=k("wCXF"),h=k("n6Qo");k.d(Q,"b",function(){return h.a});var C=k("IBYe"),D=k("6eGT"),u=k("hW8S");k.d(Q,"a",function(){return u.a}),Q.c=L.b},"6eGT":function(j,Q,k){"use strict";function L(h){return null}Q.a=L},"7Cbv":function(j,Q,k){"use strict";var L=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),h=new Uint8Array(16);function C(){if(!L)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return L(h)}var D=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function u(m){return typeof m=="string"&&D.test(m)}for(var f=u,w=[],d=0;d<256;++d)w.push((d+256).toString(16).substr(1));function o(m){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,g=(w[m[c+0]]+w[m[c+1]]+w[m[c+2]]+w[m[c+3]]+"-"+w[m[c+4]]+w[m[c+5]]+"-"+w[m[c+6]]+w[m[c+7]]+"-"+w[m[c+8]]+w[m[c+9]]+"-"+w[m[c+10]]+w[m[c+11]]+w[m[c+12]]+w[m[c+13]]+w[m[c+14]]+w[m[c+15]]).toLowerCase();if(!f(g))throw TypeError("Stringified UUID is invalid");return g}var l=o;function a(m,c,g){m=m||{};var v=m.random||(m.rng||C)();if(v[6]=v[6]&15|64,v[8]=v[8]&63|128,c){g=g||0;for(var x=0;x<16;++x)c[g+x]=v[x];return c}return l(v)}var _=Q.a=a},"7ahc":function(j,Q,k){"use strict";k.d(Q,"a",function(){return S});var L=k("k1fw"),h=k("0Owb"),C=k("+L6B"),D=k("2/Rp"),u=k("y8nQ"),f=k("Vl3Y"),w=k("tJVT"),d=k("OaEy"),o=k("2fM7"),l=k("q1tI"),a=k.n(l),_=k("VrN/"),m=k.n(_),c=k("p77/"),g=k.n(c),v=k("c5Ni"),x=k.n(v),n=o.a.Option,i={labelCol:{span:4},wrapperCol:{span:20}},t={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"]};Q.b=function(E){var s=E.callback,P=E.onCancel,O=Object(l.useState)("python"),b=Object(w.a)(O,2),y=b[0],p=b[1];function T(N){p(t[N][1])}function M(N){s(N)}return a.a.createElement(f.a,Object(h.a)({},i,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:M}),a.a.createElement(f.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},a.a.createElement(o.a,{onChange:T},Object.keys(t).map(function(N){return a.a.createElement(n,{key:N,value:N},t[N][0])}))),a.a.createElement(f.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},a.a.createElement(S,{mode:y})),a.a.createElement("div",{className:"flex-container flex-end"},a.a.createElement(D.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),a.a.createElement(D.a,{type:"ghost",onClick:P},"\u53D6\u6D88")))};function S(E){var s=E.value,P=E.onChange,O=E.mode,b=E.options,y=b===void 0?{}:b,p=Object(l.useRef)(),T=Object(l.useState)(),M=Object(w.a)(T,2),N=M[0],I=M[1];return Object(l.useEffect)(function(){if(N){function K(H){var W=H.getValue();P&&P(W)}return N.on("change",K),function(){N.off("change",K)}}},[N,P]),Object(l.useEffect)(function(){N&&N.setOption("mode",O)},[N,O]),Object(l.useEffect)(function(){N&&((s!==N.getValue()||s==="")&&setTimeout(function(){N.setValue(s||" ")},300))},[N,s]),Object(l.useEffect)(function(){if(p.current&&!N){var K=m.a.fromTextArea(p.current,Object(L.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},y));I(K)}},[p.current,N]),a.a.createElement("div",{className:"my-codemirror-container"},a.a.createElement("textarea",{ref:p}))}},"815F":function(j,Q,k){"use strict";k.d(Q,"e",function(){return w}),k.d(Q,"c",function(){return o}),k.d(Q,"d",function(){return l}),k.d(Q,"a",function(){return _}),k.d(Q,"f",function(){return m}),k.d(Q,"b",function(){return c});var L=k("KQm4"),h=k("VTBJ"),C=k("Ff2n"),D=k("Zm9Q"),u=k("Kwbf"),f=k("OZM5");function w(g,v){return g!=null?g:v}function d(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],v=new Map;function x(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(t){var S=t.key,E=t.children;Object(u.a)(S!=null,"Tree node must have a certain key: [".concat(i).concat(S,"]"));var s=String(S);Object(u.a)(!v.has(s)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(s)),v.set(s,!0),x(E,"".concat(i).concat(s," > "))})}x(g)}function o(g){function v(x){var n=Object(D.a)(x);return n.map(function(i){if(!Object(f.i)(i))return Object(u.a)(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var t=i.key,S=i.props,E=S.children,s=Object(C.a)(S,["children"]),P=Object(h.a)({key:t},s),O=v(E);return O.length&&(P.children=O),P}).filter(function(i){return i})}return v(g)}function l(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],x=new Set(v===!0?[]:v),n=[];function i(t){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(E,s){var P=Object(f.h)(S?S.pos:"0",s),O=w(E.key,P),b=Object(h.a)(Object(h.a)({},E),{},{parent:S,pos:P,children:null,data:E,isStart:[].concat(Object(L.a)(S?S.isStart:[]),[s===0]),isEnd:[].concat(Object(L.a)(S?S.isEnd:[]),[s===t.length-1])});return n.push(b),v===!0||x.has(O)?b.children=i(E.children||[],b):b.children=[],b})}return i(g),n}function a(g,v,x){var n;x?typeof x=="string"?n=function(S){return S[x]}:typeof x=="function"&&(n=function(S){return x(S)}):n=function(S,E){return w(S.key,E)};function i(t,S,E){var s=t?t.children:g,P=t?Object(f.h)(E.pos,S):"0";if(t){var O=n(t,P),b={node:t,index:S,pos:P,key:O,parentPos:E.node?E.pos:null,level:E.level+1};v(b)}s&&s.forEach(function(y,p){i(y,p,{node:t,pos:P,level:E?E.level+1:-1})})}i(null)}function _(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=v.initWrapper,n=v.processEntity,i=v.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,S={},E={},s={posEntities:S,keyEntities:E};return x&&(s=x(s)||s),a(g,function(P){var O=P.node,b=P.index,y=P.pos,p=P.key,T=P.parentPos,M=P.level,N={node:O,index:b,key:p,pos:y,level:M},I=w(p,y);S[y]=N,E[I]=N,N.parent=S[T],N.parent&&(N.parent.children=N.parent.children||[],N.parent.children.push(N)),n&&n(N,s)},t),i&&i(s),s}function m(g,v){var x=v.expandedKeys,n=v.selectedKeys,i=v.loadedKeys,t=v.loadingKeys,S=v.checkedKeys,E=v.halfCheckedKeys,s=v.dragOverNodeKey,P=v.dropPosition,O=v.keyEntities,b=O[g],y={eventKey:g,expanded:x.indexOf(g)!==-1,selected:n.indexOf(g)!==-1,loaded:i.indexOf(g)!==-1,loading:t.indexOf(g)!==-1,checked:S.indexOf(g)!==-1,halfChecked:E.indexOf(g)!==-1,pos:String(b?b.pos:""),dragOver:s===g&&P===0,dragOverGapTop:s===g&&P===-1,dragOverGapBottom:s===g&&P===1};return y}function c(g){var v=g.data,x=g.expanded,n=g.selected,i=g.checked,t=g.loaded,S=g.loading,E=g.halfChecked,s=g.dragOver,P=g.dragOverGapTop,O=g.dragOverGapBottom,b=g.pos,y=g.active,p=Object(h.a)(Object(h.a)({},v),{},{expanded:x,selected:n,checked:i,loaded:t,loading:S,halfChecked:E,dragOver:s,dragOverGapTop:P,dragOverGapBottom:O,pos:b,active:y});return"props"in p||Object.defineProperty(p,"props",{get:function(){return Object(u.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),g}}),p}},"8EBN":function(j,Q,k){(function(L){L(k("VrN/"))})(function(L){"use strict";L.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 h=0;h<L.modeInfo.length;h++){var C=L.modeInfo[h];C.mimes&&(C.mime=C.mimes[0])}L.findModeByMIME=function(D){D=D.toLowerCase();for(var u=0;u<L.modeInfo.length;u++){var f=L.modeInfo[u];if(f.mime==D)return f;if(f.mimes){for(var w=0;w<f.mimes.length;w++)if(f.mimes[w]==D)return f}}if(/\+xml$/.test(D))return L.findModeByMIME("application/xml");if(/\+json$/.test(D))return L.findModeByMIME("application/json")},L.findModeByExtension=function(D){D=D.toLowerCase();for(var u=0;u<L.modeInfo.length;u++){var f=L.modeInfo[u];if(f.ext){for(var w=0;w<f.ext.length;w++)if(f.ext[w]==D)return f}}},L.findModeByFileName=function(D){for(var u=0;u<L.modeInfo.length;u++){var f=L.modeInfo[u];if(f.file&&f.file.test(D))return f}var w=D.lastIndexOf("."),d=w>-1&&D.substring(w+1,D.length);if(d)return L.findModeByExtension(d)},L.findModeByName=function(D){D=D.toLowerCase();for(var u=0;u<L.modeInfo.length;u++){var f=L.modeInfo[u];if(f.name.toLowerCase()==D)return f;if(f.alias){for(var w=0;w<f.alias.length;w++)if(f.alias[w].toLowerCase()==D)return f}}}})},"9Bee":function(j,Q,k){"use strict";var L=k("k1fw"),h=k("tJVT"),C=k("q1tI"),D=k.n(C),u=k("vg9a"),f=k("DlQD"),w=k.n(f),d=k("rUJ1");function o(G,q){var ae=G.match(/^(\s+)(?:```)/);if(ae===null)return q;var se=ae[1];return q.split(`
|
|
|
`).map(function(we){var Se=we.match(/^\s+/);if(Se===null)return we;var de=Object(h.a)(Se,1),xe=de[0];return xe.length>=se.length?we.slice(se.length):we}).join(`
|
|
|
`)}var l=[],a=["<ul>"],_=new w.a.Renderer,m=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function c(){l.length=0,a=["<ul>"]}var g={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function v(G,q,ae,se){if(q>=G.length||G[q].level<=ae)return q;var we=G[q];se.push("<li><a href='#"+we.anchor+"'>"+we.text+"</a>"),q++;var Se=[];return q=v(G,q,we.level,Se),Se.length>0&&(se.push("<ul>"),Se.forEach(function(de){se.push(de)}),se.push("</ul>")),se.push("</li>"),q=v(G,q,ae,se),q}function x(){return v(l,0,0,a),a.push("</ul>"),a.join("")}var n={heading:function(q){var ae=m.exec(q);if(ae)return{type:"heading",raw:ae[0],depth:ae[1].length,text:ae[2]}},fences:function(q){var ae=this.rules.block.fences.exec(q);if(ae){var se=ae[0],we=o(se,ae[3]||""),Se=ae[2]?ae[2].trim():ae[2];if(["latex","katex","math"].indexOf(Se)>=0){var de=S(),xe=we;we=de,E[de]={type:"block",expression:xe}}return{type:"code",raw:se,lang:Se,text:we}}}},i=/(?:\${2})([^\n`]+?)(?:\${2})/gi,t=0,S=function(){return"__special_katext_id_".concat(t++,"__")},E={};function s(){return E}function P(){t=0,E={}}function O(G){return G=G.replace(i,function(q,ae){var se=S();return E[se]={type:"inline",expression:ae},se}),G}var b=_.listitem;_.listitem=function(G){return b(O(G))};var y=_.paragraph;_.paragraph=function(G){return y(O(G))};var p=_.tablecell;_.tablecell=function(G,q){return p(O(G),q)},_.code=function(G,q,ae){var se=(q||"").match(/\S*/)[0];return se?["latex","katex","math"].indexOf(se)>=0?"<p class='editormd-tex'>".concat(G,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(q,'">').concat(ae?G:Object(d.escape)(G,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(ae?G:Object(d.escape)(G,!0))+"</code></pre>"},_.heading=function(G,q,ae){var se=this.options.headerPrefix+ae.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return l.push({anchor:se,level:q,text:G}),"<h"+q+' id="'+se+'">'+G+"</h"+q+">"},w.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),w.a.use({tokenizer:n,renderer:_});var T=w.a,M=k("SJMd"),N=k("ulZh"),I=k.n(N),K=k("m3rI"),H=k("Oy/b"),W=k("p5ED"),z=/<pre[^>]*>/g;function U(G){var q=document.createElement("div");return q.innerHTML=G,q.childNodes.length===0?"":q.childNodes[0].nodeValue}var B=Q.a=function(G){var q,ae=G.value,se=ae===void 0?"":ae,we=G.className,Se=G.showTextOnly,de=G.showLines,xe=G.style,he=xe===void 0?{}:xe,ne=G.stylesPrev,oe=ne===void 0?{}:ne,te=(q=String(se))===null||q===void 0?void 0:q.replace(/<script.*?>|<\/script>/gi,"").replace(/on\w+="[^"]*"/gi,""),le=Object(C.useState)(""),Y=Object(h.a)(le,2),Z=Y[0],ge=Y[1],ee=Object(C.useMemo)(function(){try{var me=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ue=/\"\/api\/attachments\/|\"\/attachments\/download\//g,_e=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;te=te.replace(me,"("+K.a.API_SERVER+"/api/attachments/").replace(ue,'"'+K.a.API_SERVER+"/api/attachments/").replace(_e,'"'+K.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
|
|
|
`),te=te.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
|
`)}catch(tt){}var He=T(te),$e=s();if(te.match(/\[TOC\]/)&&(He=He.replace("<p>[TOC]</p>",x()),c()),He=He.replace(/(__special_katext_id_\d+__)/g,function(tt,nt){var it=$e[nt],Me=it.type,Ce=it.expression;return Object(H.renderToString)(U(Ce)||"",{displayMode:Me==="block",throwOnError:!1,output:"html"})}),He=He.replace(/▁/g,"\u2581\u2581\u2581"),P(),Se){var Ye=document.createElement("div");return Ye.innerHTML=He,Ye.innerText}return setTimeout(function(){return J()},500),He},[te]),$=Object(C.useRef)();g.WebkitLineClamp=de,de&&(he=Object(L.a)(Object(L.a)({},he),g));function X(me){var ue=me.target;if(ue.tagName.toUpperCase()==="A"){var _e=ue.getAttribute("href");if(_e.indexOf("office")>-1)me.preventDefault(),ge(_e);else if(_e.startsWith("#")){me.preventDefault();var He=document.getElementById(_e.replace("#",""));He&&He.scrollIntoView(!0)}}}var J=function(){var ue,_e=(ue=$.current)===null||ue===void 0?void 0:ue.querySelectorAll("video");_e==null||_e.forEach(function(He){if(He.oncontextmenu=function(){return!1},He.src.indexOf(".m3u8")>-1&&!He.canPlayType("application/vnd.apple.mpegurl")){if(I.a.isSupported()){var $e=new I.a;$e.loadSource(He.src),$e.attachMedia(He)}}})};return Object(C.useEffect)(function(){if($.current&&ee&&(ee.match(z)&&window.PR.prettyPrint()),$.current)return $.current.addEventListener("click",X),function(){$.current.removeEventListener("click",X),P(),c()}},[ee,$.current,X]),D.a.createElement(D.a.Fragment,null,D.a.createElement("div",{ref:$,style:Object(L.a)({},he),className:"".concat(we||""," markdown-body "),dangerouslySetInnerHTML:{__html:ee}}),D.a.createElement(W.a,{close:!0,data:Z,type:Z!=null&&Z.length?"office":"",style:Object(L.a)({},oe),onClose:function(){return ge("")}}))}},"9OqN":function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("OLod"))})(this,function(L){return L.mode.CTR=function(){var h=L.lib.BlockCipherMode.extend(),C=h.Encryptor=h.extend({processBlock:function(D,u){var f=this._cipher,w=f.blockSize,d=this._iv,o=this._counter;d&&(o=this._counter=d.slice(0),this._iv=void 0);var l=o.slice(0);f.encryptBlock(l,0),o[w-1]=o[w-1]+1|0;for(var a=0;a<w;a++)D[u+a]^=l[a]}});return h.Decryptor=C,h}(),L.mode.CTR})},"9VGf":function(j,Q,k){"use strict";k.d(Q,"a",function(){return C});var L=k("q1tI"),h=k.n(L);function C(D,u){var f=Object(L.useRef)();Object(L.useEffect)(function(){f.current=D}),Object(L.useEffect)(function(){function w(){f.current()}if(u!==null){var d=setInterval(w,u);return function(){return clearInterval(d)}}},[u])}},ALsQ:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("OLod"))})(this,function(L){return L.mode.CFB=function(){var h=L.lib.BlockCipherMode.extend();h.Encryptor=h.extend({processBlock:function(D,u){var f=this._cipher,w=f.blockSize;C.call(this,D,u,w,f),this._prevBlock=D.slice(u,u+w)}}),h.Decryptor=h.extend({processBlock:function(D,u){var f=this._cipher,w=f.blockSize,d=D.slice(u,u+w);C.call(this,D,u,w,f),this._prevBlock=d}});function C(D,u,f,w){var d,o=this._iv;o?(d=o.slice(0),this._iv=void 0):d=this._prevBlock,w.encryptBlock(d,0);for(var l=0;l<f;l++)D[u+l]^=d[l]}return h}(),L.mode.CFB})},BJfS:function(j,Q){var k=function(L){return L.replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()}).toLowerCase()};j.exports=k},BU3w:function(j,Q,k){"use strict";k.d(Q,"a",function(){return f});var L=k("MNnm"),h="rc-util-key";function C(w){if(w.attachTo)return w.attachTo;var d=document.querySelector("head");return d||document.body}function D(w){var d,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(L.a)())return null;var l=document.createElement("style");if((d=o.csp)===null||d===void 0?void 0:d.nonce){var a;l.nonce=(a=o.csp)===null||a===void 0?void 0:a.nonce}l.innerHTML=w;var _=C(o),m=_.firstChild;return o.prepend&&_.prepend?_.prepend(l):o.prepend&&m?_.insertBefore(l,m):_.appendChild(l),l}var u=new Map;function f(w,d){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=C(o);if(!u.has(l)){var a=D("",o),_=a.parentNode;u.set(l,_),_.removeChild(a)}var m=Array.from(u.get(l).children).find(function(n){return n.tagName==="STYLE"&&n[h]===d});if(m){var c,g;if(((c=o.csp)===null||c===void 0?void 0:c.nonce)&&m.nonce!==((g=o.csp)===null||g===void 0?void 0:g.nonce)){var v;m.nonce=(v=o.csp)===null||v===void 0?void 0:v.nonce}return m.innerHTML!==w&&(m.innerHTML=w),m}var x=D(w,o);return x[h]=d,x}},Bd2K:function(j,Q,k){(function(L){L(k("VrN/"),k("osHv"))})(function(L){L.defineOption("autoCloseTags",!1,function(o,l,a){if(a!=L.Init&&a&&o.removeKeyMap("autoCloseTags"),!l)return;var _={name:"autoCloseTags"};(typeof l!="object"||l.whenClosing!==!1)&&(_["'/'"]=function(m){return f(m)}),(typeof l!="object"||l.whenOpening!==!1)&&(_["'>'"]=function(m){return D(m)}),o.addKeyMap(_)});var h=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],C=["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 D(o){if(o.getOption("disableInput"))return L.Pass;for(var l=o.listSelections(),a=[],_=o.getOption("autoCloseTags"),m=0;m<l.length;m++){if(!l[m].empty())return L.Pass;var c=l[m].head,g=o.getTokenAt(c),v=L.innerMode(o.getMode(),g.state),x=v.state,n=v.mode.xmlCurrentTag&&v.mode.xmlCurrentTag(x),i=n&&n.name;if(!i)return L.Pass;var t=v.mode.configuration=="html",S=typeof _=="object"&&_.dontCloseTags||t&&h,E=typeof _=="object"&&_.indentTags||t&&C;g.end>c.ch&&(i=i.slice(0,i.length-g.end+c.ch));var s=i.toLowerCase();if(!i||g.type=="string"&&(g.end!=c.ch||!/[\"\']/.test(g.string.charAt(g.string.length-1))||g.string.length==1)||g.type=="tag"&&n.close||g.string.indexOf("/")==c.ch-g.start-1||S&&w(S,s)>-1||d(o,v.mode.xmlCurrentContext&&v.mode.xmlCurrentContext(x)||[],i,c,!0))return L.Pass;var P=typeof _=="object"&&_.emptyTags;if(P&&w(P,i)>-1){a[m]={text:"/>",newPos:L.Pos(c.line,c.ch+2)};continue}var O=E&&w(E,s)>-1;a[m]={indent:O,text:">"+(O?`
|
|
|
|
|
|
`:"")+"</"+i+">",newPos:O?L.Pos(c.line+1,0):L.Pos(c.line,c.ch+1)}}for(var b=typeof _=="object"&&_.dontIndentOnAutoClose,m=l.length-1;m>=0;m--){var y=a[m];o.replaceRange(y.text,l[m].head,l[m].anchor,"+insert");var p=o.listSelections().slice(0);p[m]={head:y.newPos,anchor:y.newPos},o.setSelections(p),!b&&y.indent&&(o.indentLine(y.newPos.line,null,!0),o.indentLine(y.newPos.line+1,null,!0))}}function u(o,l){for(var a=o.listSelections(),_=[],m=l?"/":"</",c=o.getOption("autoCloseTags"),g=typeof c=="object"&&c.dontIndentOnSlash,v=0;v<a.length;v++){if(!a[v].empty())return L.Pass;var x=a[v].head,n=o.getTokenAt(x),i=L.innerMode(o.getMode(),n.state),t=i.state;if(l&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=x.ch-1))return L.Pass;var S,E=i.mode.name!="xml"&&o.getMode().name=="htmlmixed";if(E&&i.mode.name=="javascript")S=m+"script";else if(E&&i.mode.name=="css")S=m+"style";else{var s=i.mode.xmlCurrentContext&&i.mode.xmlCurrentContext(t);if(!s||s.length&&d(o,s,s[s.length-1],x))return L.Pass;S=m+s[s.length-1]}o.getLine(x.line).charAt(n.end)!=">"&&(S+=">"),_[v]=S}if(o.replaceSelections(_),a=o.listSelections(),!g)for(var v=0;v<a.length;v++)(v==a.length-1||a[v].head.line<a[v+1].head.line)&&o.indentLine(a[v].head.line)}function f(o){return o.getOption("disableInput")?L.Pass:u(o,!0)}L.commands.closeTag=function(o){return u(o)};function w(o,l){if(o.indexOf)return o.indexOf(l);for(var a=0,_=o.length;a<_;++a)if(o[a]==l)return a;return-1}function d(o,l,a,_,m){if(!L.scanForClosingTag)return!1;var c=Math.min(o.lastLine()+1,_.line+500),g=L.scanForClosingTag(o,_,null,c);if(!g||g.tag!=a)return!1;for(var v=m?1:0,x=l.length-1;x>=0&&l[x]==a;x--)++v;_=g.to;for(var x=1;x<v;x++){var n=L.scanForClosingTag(o,_,null,c);if(!n||n.tag!=a)return!1;_=n.to}return!0}})},BjJ7:function(j,Q,k){"use strict";k.d(Q,"d",function(){return h}),k.d(Q,"c",function(){return C}),k.d(Q,"e",function(){return D}),k.d(Q,"b",function(){return u}),k.d(Q,"a",function(){return w});var L=k("m3rI");function h(d){var o=!0;if(d.length>0){for(var l=0;l<d.length;l++)if(d[l].compile_success==0||!d[l].compile_success){o=!1;break}}else o=!1;return o}function C(d){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",l=[],a=0;a<d.length;a++){var _=d[a],m=o?"".concat(o,"/").concat(_.name):"".concat(_.name);l.push({title:_.name,isLeaf:!(_.type==="tree"),key:m})}return l}function D(d,o,l){for(var a=0;a<d.length;a++){var _=d[a];if(_.key===o){_.children=l;break}_.children&&D(_.children,o,l)}return d}function u(d,o,l){var a;return function(){var _=this,m=arguments,c=function(){a=null,l||d.apply(_,m)},g=l&&!a;clearTimeout(a),a=setTimeout(c,o),g&&d.apply(_,m)}}var f=!0,w=L.a.API_SERVER},"C+DQ":function(j,Q,k){},Dgm7:function(j,Q,k){j.exports=k.p+"static/auth.ea067b42.png"},DlQD:function(j,Q,k){(function(L,h){j.exports=h()})(this,function(){"use strict";function L(ke,Re){for(var Te=0;Te<Re.length;Te++){var fe=Re[Te];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(ke,fe.key,fe)}}function h(ke,Re,Te){return Re&&L(ke.prototype,Re),Te&&L(ke,Te),ke}function C(ke,Re){if(!ke)return;if(typeof ke=="string")return D(ke,Re);var Te=Object.prototype.toString.call(ke).slice(8,-1);if(Te==="Object"&&ke.constructor&&(Te=ke.constructor.name),Te==="Map"||Te==="Set")return Array.from(ke);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return D(ke,Re)}function D(ke,Re){(Re==null||Re>ke.length)&&(Re=ke.length);for(var Te=0,fe=new Array(Re);Te<Re;Te++)fe[Te]=ke[Te];return fe}function u(ke,Re){var Te;if(typeof Symbol=="undefined"||ke[Symbol.iterator]==null){if(Array.isArray(ke)||(Te=C(ke))||Re&&ke&&typeof ke.length=="number"){Te&&(ke=Te);var fe=0;return function(){return fe>=ke.length?{done:!0}:{done:!1,value:ke[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 Te=ke[Symbol.iterator](),Te.next.bind(Te)}function f(ke,Re){return Re={exports:{}},ke(Re,Re.exports),Re.exports}var w=f(function(ke){function Re(){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 Te(fe){ke.exports.defaults=fe}ke.exports={defaults:Re(),getDefaults:Re,changeDefaults:Te}}),d=w.defaults,o=w.getDefaults,l=w.changeDefaults,a=/[&<>"']/,_=/[&<>"']/g,m=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,g={"&":"&","<":"<",">":">",'"':""","'":"'"},v=function(Re){return g[Re]};function x(ke,Re){if(Re){if(a.test(ke))return ke.replace(_,v)}else if(m.test(ke))return ke.replace(c,v);return ke}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function i(ke){return ke.replace(n,function(Re,Te){return Te=Te.toLowerCase(),Te==="colon"?":":Te.charAt(0)==="#"?Te.charAt(1)==="x"?String.fromCharCode(parseInt(Te.substring(2),16)):String.fromCharCode(+Te.substring(1)):""})}var t=/(^|[^\[])\^/g;function S(ke,Re){ke=ke.source||ke,Re=Re||"";var Te={replace:function(ye,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(t,"$1"),ke=ke.replace(ye,Ee),Te},getRegex:function(){return new RegExp(ke,Re)}};return Te}var E=/[^\w:]/g,s=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function P(ke,Re,Te){if(ke){var fe;try{fe=decodeURIComponent(i(Te)).replace(E,"").toLowerCase()}catch(ye){return null}if(fe.indexOf("javascript:")===0||fe.indexOf("vbscript:")===0||fe.indexOf("data:")===0)return null}Re&&!s.test(Te)&&(Te=T(Re,Te));try{Te=encodeURI(Te).replace(/%25/g,"%")}catch(ye){return null}return Te}var O={},b=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,p=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(ke,Re){O[" "+ke]||(b.test(ke)?O[" "+ke]=ke+"/":O[" "+ke]=K(ke,"/",!0)),ke=O[" "+ke];var Te=ke.indexOf(":")===-1;return Re.substring(0,2)==="//"?Te?Re:ke.replace(y,"$1")+Re:Re.charAt(0)==="/"?Te?Re:ke.replace(p,"$1")+Re:ke+Re}var M={exec:function(){}};function N(ke){for(var Re=1,Te,fe;Re<arguments.length;Re++){Te=arguments[Re];for(fe in Te)Object.prototype.hasOwnProperty.call(Te,fe)&&(ke[fe]=Te[fe])}return ke}function I(ke,Re){var Te=ke.replace(/\|/g,function(Ee,Oe,We){for(var Ve=!1,ut=Oe;--ut>=0&&We[ut]==="\\";)Ve=!Ve;return Ve?"|":" |"}),fe=Te.split(/ \|/),ye=0;if(fe.length>Re)fe.splice(Re);else for(;fe.length<Re;)fe.push("");for(;ye<fe.length;ye++)fe[ye]=fe[ye].trim().replace(/\\\|/g,"|");return fe}function K(ke,Re,Te){var fe=ke.length;if(fe===0)return"";for(var ye=0;ye<fe;){var Ee=ke.charAt(fe-ye-1);if(Ee===Re&&!Te)ye++;else if(Ee!==Re&&Te)ye++;else break}return ke.substr(0,fe-ye)}function H(ke,Re){if(ke.indexOf(Re[1])===-1)return-1;for(var Te=ke.length,fe=0,ye=0;ye<Te;ye++)if(ke[ye]==="\\")ye++;else if(ke[ye]===Re[0])fe++;else if(ke[ye]===Re[1]&&(fe--,fe<0))return ye;return-1}function W(ke){ke&&ke.sanitize&&!ke.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 z={escape:x,unescape:i,edit:S,cleanUrl:P,resolveUrl:T,noopTest:M,merge:N,splitCells:I,rtrim:K,findClosingBracket:H,checkSanitizeDeprecation:W},U=w.defaults,B=z.rtrim,G=z.splitCells,q=z.escape,ae=z.findClosingBracket;function se(ke,Re,Te){var fe=Re.href,ye=Re.title?q(Re.title):null,Ee=ke[1].replace(/\\([\[\]])/g,"$1");return ke[0].charAt(0)!=="!"?{type:"link",raw:Te,href:fe,title:ye,text:Ee}:{type:"image",raw:Te,href:fe,title:ye,text:q(Ee)}}function we(ke,Re){var Te=ke.match(/^(\s+)(?:```)/);if(Te===null)return Re;var fe=Te[1];return Re.split(`
|
|
|
`).map(function(ye){var Ee=ye.match(/^\s+/);if(Ee===null)return ye;var Oe=Ee[0];return Oe.length>=fe.length?ye.slice(fe.length):ye}).join(`
|
|
|
`)}var Se=function(){function ke(Te){this.options=Te||U}var Re=ke.prototype;return Re.space=function(fe){var ye=this.rules.block.newline.exec(fe);if(ye)return ye[0].length>1?{type:"space",raw:ye[0]}:{raw:`
|
|
|
`}},Re.code=function(fe,ye){var Ee=this.rules.block.code.exec(fe);if(Ee){var Oe=ye[ye.length-1];if(Oe&&Oe.type==="paragraph")return{raw:Ee[0],text:Ee[0].trimRight()};var We=Ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?We:B(We,`
|
|
|
`)}}},Re.fences=function(fe){var ye=this.rules.block.fences.exec(fe);if(ye){var Ee=ye[0],Oe=we(Ee,ye[3]||"");return{type:"code",raw:Ee,lang:ye[2]?ye[2].trim():ye[2],text:Oe}}},Re.heading=function(fe){var ye=this.rules.block.heading.exec(fe);if(ye)return{type:"heading",raw:ye[0],depth:ye[1].length,text:ye[2]}},Re.nptable=function(fe){var ye=this.rules.block.nptable.exec(fe);if(ye){var Ee={type:"table",header:G(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:ye[0]};if(Ee.header.length===Ee.align.length){var Oe=Ee.align.length,We;for(We=0;We<Oe;We++)/^ *-+: *$/.test(Ee.align[We])?Ee.align[We]="right":/^ *:-+: *$/.test(Ee.align[We])?Ee.align[We]="center":/^ *:-+ *$/.test(Ee.align[We])?Ee.align[We]="left":Ee.align[We]=null;for(Oe=Ee.cells.length,We=0;We<Oe;We++)Ee.cells[We]=G(Ee.cells[We],Ee.header.length);return Ee}}},Re.hr=function(fe){var ye=this.rules.block.hr.exec(fe);if(ye)return{type:"hr",raw:ye[0]}},Re.blockquote=function(fe){var ye=this.rules.block.blockquote.exec(fe);if(ye){var Ee=ye[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ye[0],text:Ee}}},Re.list=function(fe){var ye=this.rules.block.list.exec(fe);if(ye){for(var Ee=ye[0],Oe=ye[2],We=Oe.length>1,Ve=Oe[Oe.length-1]===")",ut={type:"list",raw:Ee,ordered:We,start:We?+Oe.slice(0,-1):"",loose:!1,items:[]},ft=ye[0].match(this.rules.block.item),Dt=!1,Mt,lr,dr,Tt,$r,Ur,Br,ln=ft.length,br=0;br<ln;br++)Mt=ft[br],Ee=Mt,lr=Mt.length,Mt=Mt.replace(/^ *([*+-]|\d+[.)]) */,""),~Mt.indexOf(`
|
|
|
`)&&(lr-=Mt.length,Mt=this.options.pedantic?Mt.replace(/^ {1,4}/gm,""):Mt.replace(new RegExp("^ {1,"+lr+"}","gm"),"")),br!==ln-1&&(dr=this.rules.block.bullet.exec(ft[br+1])[0],(We?dr.length===1||!Ve&&dr[dr.length-1]===")":dr.length>1||this.options.smartLists&&dr!==Oe)&&(Tt=ft.slice(br+1).join(`
|
|
|
`),ut.raw=ut.raw.substring(0,ut.raw.length-Tt.length),br=ln-1)),$r=Dt||/\n\n(?!\s*$)/.test(Mt),br!==ln-1&&(Dt=Mt.charAt(Mt.length-1)===`
|
|
|
`,$r||($r=Dt)),$r&&(ut.loose=!0),Ur=/^\[[ xX]\] /.test(Mt),Br=void 0,Ur&&(Br=Mt[1]!==" ",Mt=Mt.replace(/^\[[ xX]\] +/,"")),ut.items.push({type:"list_item",raw:Ee,task:Ur,checked:Br,loose:$r,text:Mt});return ut}},Re.html=function(fe){var ye=this.rules.block.html.exec(fe);if(ye)return{type:this.options.sanitize?"paragraph":"html",raw:ye[0],pre:!this.options.sanitizer&&(ye[1]==="pre"||ye[1]==="script"||ye[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):q(ye[0]):ye[0]}},Re.def=function(fe){var ye=this.rules.block.def.exec(fe);if(ye){ye[3]&&(ye[3]=ye[3].substring(1,ye[3].length-1));var Ee=ye[1].toLowerCase().replace(/\s+/g," ");return{tag:Ee,raw:ye[0],href:ye[2],title:ye[3]}}},Re.table=function(fe){var ye=this.rules.block.table.exec(fe);if(ye){var Ee={type:"table",header:G(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(Ee.header.length===Ee.align.length){Ee.raw=ye[0];var Oe=Ee.align.length,We;for(We=0;We<Oe;We++)/^ *-+: *$/.test(Ee.align[We])?Ee.align[We]="right":/^ *:-+: *$/.test(Ee.align[We])?Ee.align[We]="center":/^ *:-+ *$/.test(Ee.align[We])?Ee.align[We]="left":Ee.align[We]=null;for(Oe=Ee.cells.length,We=0;We<Oe;We++)Ee.cells[We]=G(Ee.cells[We].replace(/^ *\| *| *\| *$/g,""),Ee.header.length);return Ee}}},Re.lheading=function(fe){var ye=this.rules.block.lheading.exec(fe);if(ye)return{type:"heading",raw:ye[0],depth:ye[2].charAt(0)==="="?1:2,text:ye[1]}},Re.paragraph=function(fe){var ye=this.rules.block.paragraph.exec(fe);if(ye)return{type:"paragraph",raw:ye[0],text:ye[1].charAt(ye[1].length-1)===`
|
|
|
`?ye[1].slice(0,-1):ye[1]}},Re.text=function(fe,ye){var Ee=this.rules.block.text.exec(fe);if(Ee){var Oe=ye[ye.length-1];return Oe&&Oe.type==="text"?{raw:Ee[0],text:Ee[0]}:{type:"text",raw:Ee[0],text:Ee[0]}}},Re.escape=function(fe){var ye=this.rules.inline.escape.exec(fe);if(ye)return{type:"escape",raw:ye[0],text:q(ye[1])}},Re.tag=function(fe,ye,Ee){var Oe=this.rules.inline.tag.exec(fe);if(Oe)return!ye&&/^<a /i.test(Oe[0])?ye=!0:ye&&/^<\/a>/i.test(Oe[0])&&(ye=!1),!Ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(Oe[0])?Ee=!0:Ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Oe[0])&&(Ee=!1),{type:this.options.sanitize?"text":"html",raw:Oe[0],inLink:ye,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):q(Oe[0]):Oe[0]}},Re.link=function(fe){var ye=this.rules.inline.link.exec(fe);if(ye){var Ee=ae(ye[2],"()");if(Ee>-1){var Oe=ye[0].indexOf("!")===0?5:4,We=Oe+ye[1].length+Ee;ye[2]=ye[2].substring(0,Ee),ye[0]=ye[0].substring(0,We).trim(),ye[3]=""}var Ve=ye[2],ut="";if(this.options.pedantic){var ft=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ve);ft?(Ve=ft[1],ut=ft[3]):ut=""}else ut=ye[3]?ye[3].slice(1,-1):"";Ve=Ve.trim().replace(/^<([\s\S]*)>$/,"$1");var Dt=se(ye,{href:Ve&&Ve.replace(this.rules.inline._escapes,"$1"),title:ut&&ut.replace(this.rules.inline._escapes,"$1")},ye[0]);return Dt}},Re.reflink=function(fe,ye){var Ee;if((Ee=this.rules.inline.reflink.exec(fe))||(Ee=this.rules.inline.nolink.exec(fe))){var Oe=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(Oe=ye[Oe.toLowerCase()],!Oe||!Oe.href){var We=Ee[0].charAt(0);return{type:"text",raw:We,text:We}}var Ve=se(Ee,Oe,Ee[0]);return Ve}},Re.strong=function(fe,ye,Ee){Ee===void 0&&(Ee="");var Oe=this.rules.inline.strong.start.exec(fe);if(Oe&&(!Oe[1]||Oe[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ye=ye.slice(-1*fe.length);var We=Oe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;We.lastIndex=0;for(var Ve;(Oe=We.exec(ye))!=null;)if(Ve=this.rules.inline.strong.middle.exec(ye.slice(0,Oe.index+3)),Ve)return{type:"strong",raw:fe.slice(0,Ve[0].length),text:fe.slice(2,Ve[0].length-2)}}},Re.em=function(fe,ye,Ee){Ee===void 0&&(Ee="");var Oe=this.rules.inline.em.start.exec(fe);if(Oe&&(!Oe[1]||Oe[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ye=ye.slice(-1*fe.length);var We=Oe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;We.lastIndex=0;for(var Ve;(Oe=We.exec(ye))!=null;)if(Ve=this.rules.inline.em.middle.exec(ye.slice(0,Oe.index+2)),Ve)return{type:"em",raw:fe.slice(0,Ve[0].length),text:fe.slice(1,Ve[0].length-1)}}},Re.codespan=function(fe){var ye=this.rules.inline.code.exec(fe);if(ye){var Ee=ye[2].replace(/\n/g," "),Oe=/[^ ]/.test(Ee),We=Ee.startsWith(" ")&&Ee.endsWith(" ");return Oe&&We&&(Ee=Ee.substring(1,Ee.length-1)),Ee=q(Ee,!0),{type:"codespan",raw:ye[0],text:Ee}}},Re.br=function(fe){var ye=this.rules.inline.br.exec(fe);if(ye)return{type:"br",raw:ye[0]}},Re.del=function(fe){var ye=this.rules.inline.del.exec(fe);if(ye)return{type:"del",raw:ye[0],text:ye[1]}},Re.autolink=function(fe,ye){var Ee=this.rules.inline.autolink.exec(fe);if(Ee){var Oe,We;return Ee[2]==="@"?(Oe=q(this.options.mangle?ye(Ee[1]):Ee[1]),We="mailto:"+Oe):(Oe=q(Ee[1]),We=Oe),{type:"link",raw:Ee[0],text:Oe,href:We,tokens:[{type:"text",raw:Oe,text:Oe}]}}},Re.url=function(fe,ye){var Ee;if(Ee=this.rules.inline.url.exec(fe)){var Oe,We;if(Ee[2]==="@")Oe=q(this.options.mangle?ye(Ee[0]):Ee[0]),We="mailto:"+Oe;else{var Ve;do Ve=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while(Ve!==Ee[0]);Oe=q(Ee[0]),Ee[1]==="www."?We="http://"+Oe:We=Oe}return{type:"link",raw:Ee[0],text:Oe,href:We,tokens:[{type:"text",raw:Oe,text:Oe}]}}},Re.inlineText=function(fe,ye,Ee){var Oe=this.rules.inline.text.exec(fe);if(Oe){var We;return ye?We=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):q(Oe[0]):Oe[0]:We=q(this.options.smartypants?Ee(Oe[0]):Oe[0]),{type:"text",raw:Oe[0],text:We}}},ke}(),de=z.noopTest,xe=z.edit,he=z.merge,ne={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:de,table:de,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ne._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ne._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ne.def=xe(ne.def).replace("label",ne._label).replace("title",ne._title).getRegex(),ne.bullet=/(?:[*+-]|\d{1,9}[.)])/,ne.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ne.item=xe(ne.item,"gm").replace(/bull/g,ne.bullet).getRegex(),ne.list=xe(ne.list).replace(/bull/g,ne.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ne.def.source+")").getRegex(),ne._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",ne._comment=/<!--(?!-?>)[\s\S]*?-->/,ne.html=xe(ne.html,"i").replace("comment",ne._comment).replace("tag",ne._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ne.paragraph=xe(ne._paragraph).replace("hr",ne.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",ne._tag).getRegex(),ne.blockquote=xe(ne.blockquote).replace("paragraph",ne.paragraph).getRegex(),ne.normal=he({},ne),ne.gfm=he({},ne.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*|$)"}),ne.gfm.nptable=xe(ne.gfm.nptable).replace("hr",ne.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",ne._tag).getRegex(),ne.gfm.table=xe(ne.gfm.table).replace("hr",ne.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",ne._tag).getRegex(),ne.pedantic=he({},ne.normal,{html:xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ne._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:de,paragraph:xe(ne.normal._paragraph).replace("hr",ne.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",ne.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var oe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:de,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:de,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};oe._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",oe.punctuation=xe(oe.punctuation).replace(/punctuation/g,oe._punctuation).getRegex(),oe._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",oe._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",oe.em.start=xe(oe.em.start).replace(/punctuation/g,oe._punctuation).getRegex(),oe.em.middle=xe(oe.em.middle).replace(/punctuation/g,oe._punctuation).replace(/overlapSkip/g,oe._overlapSkip).getRegex(),oe.em.endAst=xe(oe.em.endAst,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.em.endUnd=xe(oe.em.endUnd,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.strong.start=xe(oe.strong.start).replace(/punctuation/g,oe._punctuation).getRegex(),oe.strong.middle=xe(oe.strong.middle).replace(/punctuation/g,oe._punctuation).replace(/blockSkip/g,oe._blockSkip).getRegex(),oe.strong.endAst=xe(oe.strong.endAst,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.strong.endUnd=xe(oe.strong.endUnd,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.blockSkip=xe(oe._blockSkip,"g").getRegex(),oe.overlapSkip=xe(oe._overlapSkip,"g").getRegex(),oe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,oe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,oe._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,oe.autolink=xe(oe.autolink).replace("scheme",oe._scheme).replace("email",oe._email).getRegex(),oe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,oe.tag=xe(oe.tag).replace("comment",ne._comment).replace("attribute",oe._attribute).getRegex(),oe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,oe._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,oe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,oe.link=xe(oe.link).replace("label",oe._label).replace("href",oe._href).replace("title",oe._title).getRegex(),oe.reflink=xe(oe.reflink).replace("label",oe._label).getRegex(),oe.reflinkSearch=xe(oe.reflinkSearch,"g").replace("reflink",oe.reflink).replace("nolink",oe.nolink).getRegex(),oe.normal=he({},oe),oe.pedantic=he({},oe.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:xe(/^!?\[(label)\]\((.*?)\)/).replace("label",oe._label).getRegex(),reflink:xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",oe._label).getRegex()}),oe.gfm=he({},oe.normal,{escape:xe(oe.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),oe.gfm.url=xe(oe.gfm.url,"i").replace("email",oe.gfm._extended_email).getRegex(),oe.breaks=he({},oe.gfm,{br:xe(oe.br).replace("{2,}","*").getRegex(),text:xe(oe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var te={block:ne,inline:oe},le=w.defaults,Y=te.block,Z=te.inline;function ge(ke){return ke.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 ee(ke){var Re="",Te,fe,ye=ke.length;for(Te=0;Te<ye;Te++)fe=ke.charCodeAt(Te),Math.random()>.5&&(fe="x"+fe.toString(16)),Re+="&#"+fe+";";return Re}var $=function(){function ke(Te){this.tokens=[],this.tokens.links=Object.create(null),this.options=Te||le,this.options.tokenizer=this.options.tokenizer||new Se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var fe={block:Y.normal,inline:Z.normal};this.options.pedantic?(fe.block=Y.pedantic,fe.inline=Z.pedantic):this.options.gfm&&(fe.block=Y.gfm,this.options.breaks?fe.inline=Z.breaks:fe.inline=Z.gfm),this.tokenizer.rules=fe}ke.lex=function(fe,ye){var Ee=new ke(ye);return Ee.lex(fe)};var Re=ke.prototype;return Re.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},Re.blockTokens=function(fe,ye,Ee){ye===void 0&&(ye=[]),Ee===void 0&&(Ee=!0),fe=fe.replace(/^ +$/gm,"");for(var Oe,We,Ve,ut;fe;){if(Oe=this.tokenizer.space(fe)){fe=fe.substring(Oe.raw.length),Oe.type&&ye.push(Oe);continue}if(Oe=this.tokenizer.code(fe,ye)){fe=fe.substring(Oe.raw.length),Oe.type?ye.push(Oe):(ut=ye[ye.length-1],ut.raw+=`
|
|
|
`+Oe.raw,ut.text+=`
|
|
|
`+Oe.text);continue}if(Oe=this.tokenizer.fences(fe)){fe=fe.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.heading(fe)){fe=fe.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.nptable(fe)){fe=fe.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.hr(fe)){fe=fe.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.blockquote(fe)){fe=fe.substring(Oe.raw.length),Oe.tokens=this.blockTokens(Oe.text,[],Ee),ye.push(Oe);continue}if(Oe=this.tokenizer.list(fe)){for(fe=fe.substring(Oe.raw.length),Ve=Oe.items.length,We=0;We<Ve;We++)Oe.items[We].tokens=this.blockTokens(Oe.items[We].text,[],!1);ye.push(Oe);continue}if(Oe=this.tokenizer.html(fe)){fe=fe.substring(Oe.raw.length),ye.push(Oe);continue}if(Ee&&(Oe=this.tokenizer.def(fe))){fe=fe.substring(Oe.raw.length),this.tokens.links[Oe.tag]||(this.tokens.links[Oe.tag]={href:Oe.href,title:Oe.title});continue}if(Oe=this.tokenizer.table(fe)){fe=fe.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.lheading(fe)){fe=fe.substring(Oe.raw.length),ye.push(Oe);continue}if(Ee&&(Oe=this.tokenizer.paragraph(fe))){fe=fe.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.text(fe,ye)){fe=fe.substring(Oe.raw.length),Oe.type?ye.push(Oe):(ut=ye[ye.length-1],ut.raw+=`
|
|
|
`+Oe.raw,ut.text+=`
|
|
|
`+Oe.text);continue}if(fe){var ft="Infinite loop on byte: "+fe.charCodeAt(0);if(this.options.silent){console.error(ft);break}else throw new Error(ft)}}return ye},Re.inline=function(fe){var ye,Ee,Oe,We,Ve,ut,ft=fe.length;for(ye=0;ye<ft;ye++){ut=fe[ye];switch(ut.type){case"paragraph":case"text":case"heading":{ut.tokens=[],this.inlineTokens(ut.text,ut.tokens);break}case"table":{for(ut.tokens={header:[],cells:[]},We=ut.header.length,Ee=0;Ee<We;Ee++)ut.tokens.header[Ee]=[],this.inlineTokens(ut.header[Ee],ut.tokens.header[Ee]);for(We=ut.cells.length,Ee=0;Ee<We;Ee++)for(Ve=ut.cells[Ee],ut.tokens.cells[Ee]=[],Oe=0;Oe<Ve.length;Oe++)ut.tokens.cells[Ee][Oe]=[],this.inlineTokens(Ve[Oe],ut.tokens.cells[Ee][Oe]);break}case"blockquote":{this.inline(ut.tokens);break}case"list":{for(We=ut.items.length,Ee=0;Ee<We;Ee++)this.inline(ut.items[Ee].tokens);break}}}return fe},Re.inlineTokens=function(fe,ye,Ee,Oe,We){ye===void 0&&(ye=[]),Ee===void 0&&(Ee=!1),Oe===void 0&&(Oe=!1),We===void 0&&(We="");var Ve,ut=fe,ft;if(this.tokens.links){var Dt=Object.keys(this.tokens.links);if(Dt.length>0)for(;(ft=this.tokenizer.rules.inline.reflinkSearch.exec(ut))!=null;)Dt.includes(ft[0].slice(ft[0].lastIndexOf("[")+1,-1))&&(ut=ut.slice(0,ft.index)+"["+"a".repeat(ft[0].length-2)+"]"+ut.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ft=this.tokenizer.rules.inline.blockSkip.exec(ut))!=null;)ut=ut.slice(0,ft.index)+"["+"a".repeat(ft[0].length-2)+"]"+ut.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;fe;){if(Ve=this.tokenizer.escape(fe)){fe=fe.substring(Ve.raw.length),ye.push(Ve);continue}if(Ve=this.tokenizer.tag(fe,Ee,Oe)){fe=fe.substring(Ve.raw.length),Ee=Ve.inLink,Oe=Ve.inRawBlock,ye.push(Ve);continue}if(Ve=this.tokenizer.link(fe)){fe=fe.substring(Ve.raw.length),Ve.type==="link"&&(Ve.tokens=this.inlineTokens(Ve.text,[],!0,Oe)),ye.push(Ve);continue}if(Ve=this.tokenizer.reflink(fe,this.tokens.links)){fe=fe.substring(Ve.raw.length),Ve.type==="link"&&(Ve.tokens=this.inlineTokens(Ve.text,[],!0,Oe)),ye.push(Ve);continue}if(Ve=this.tokenizer.strong(fe,ut,We)){fe=fe.substring(Ve.raw.length),Ve.tokens=this.inlineTokens(Ve.text,[],Ee,Oe),ye.push(Ve);continue}if(Ve=this.tokenizer.em(fe,ut,We)){fe=fe.substring(Ve.raw.length),Ve.tokens=this.inlineTokens(Ve.text,[],Ee,Oe),ye.push(Ve);continue}if(Ve=this.tokenizer.codespan(fe)){fe=fe.substring(Ve.raw.length),ye.push(Ve);continue}if(Ve=this.tokenizer.br(fe)){fe=fe.substring(Ve.raw.length),ye.push(Ve);continue}if(Ve=this.tokenizer.del(fe)){fe=fe.substring(Ve.raw.length),Ve.tokens=this.inlineTokens(Ve.text,[],Ee,Oe),ye.push(Ve);continue}if(Ve=this.tokenizer.autolink(fe,ee)){fe=fe.substring(Ve.raw.length),ye.push(Ve);continue}if(!Ee&&(Ve=this.tokenizer.url(fe,ee))){fe=fe.substring(Ve.raw.length),ye.push(Ve);continue}if(Ve=this.tokenizer.inlineText(fe,Oe,ge)){fe=fe.substring(Ve.raw.length),We=Ve.raw.slice(-1),ye.push(Ve);continue}if(fe){var Mt="Infinite loop on byte: "+fe.charCodeAt(0);if(this.options.silent){console.error(Mt);break}else throw new Error(Mt)}}return ye},h(ke,null,[{key:"rules",get:function(){return{block:Y,inline:Z}}}]),ke}(),X=w.defaults,J=z.cleanUrl,me=z.escape,ue=function(){function ke(Te){this.options=Te||X}var Re=ke.prototype;return Re.code=function(fe,ye,Ee){var Oe=(ye||"").match(/\S*/)[0];if(this.options.highlight){var We=this.options.highlight(fe,Oe);We!=null&&We!==fe&&(Ee=!0,fe=We)}return Oe?'<pre><code class="'+this.options.langPrefix+me(Oe,!0)+'">'+(Ee?fe:me(fe,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(Ee?fe:me(fe,!0))+`</code></pre>
|
|
|
`},Re.blockquote=function(fe){return`<blockquote>
|
|
|
`+fe+`</blockquote>
|
|
|
`},Re.html=function(fe){return fe},Re.heading=function(fe,ye,Ee,Oe){return this.options.headerIds?"<h"+ye+' id="'+this.options.headerPrefix+Oe.slug(Ee)+'">'+fe+"</h"+ye+`>
|
|
|
`:"<h"+ye+">"+fe+"</h"+ye+`>
|
|
|
`},Re.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Re.list=function(fe,ye,Ee){var Oe=ye?"ol":"ul",We=ye&&Ee!==1?' start="'+Ee+'"':"";return"<"+Oe+We+`>
|
|
|
`+fe+"</"+Oe+`>
|
|
|
`},Re.listitem=function(fe){return"<li>"+fe+`</li>
|
|
|
`},Re.checkbox=function(fe){return"<input "+(fe?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Re.paragraph=function(fe){return"<p>"+fe+`</p>
|
|
|
`},Re.table=function(fe,ye){return ye&&(ye="<tbody>"+ye+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+fe+`</thead>
|
|
|
`+ye+`</table>
|
|
|
`},Re.tablerow=function(fe){return`<tr>
|
|
|
`+fe+`</tr>
|
|
|
`},Re.tablecell=function(fe,ye){var Ee=ye.header?"th":"td",Oe=ye.align?"<"+Ee+' align="'+ye.align+'">':"<"+Ee+">";return Oe+fe+"</"+Ee+`>
|
|
|
`},Re.strong=function(fe){return"<strong>"+fe+"</strong>"},Re.em=function(fe){return"<em>"+fe+"</em>"},Re.codespan=function(fe){return"<code>"+fe+"</code>"},Re.br=function(){return this.options.xhtml?"<br/>":"<br>"},Re.del=function(fe){return"<del>"+fe+"</del>"},Re.link=function(fe,ye,Ee){if(fe=J(this.options.sanitize,this.options.baseUrl,fe),fe===null)return Ee;var Oe='<a href="'+me(fe)+'"';return ye&&(Oe+=' title="'+ye+'"'),Oe+=">"+Ee+"</a>",Oe},Re.image=function(fe,ye,Ee){if(fe=J(this.options.sanitize,this.options.baseUrl,fe),fe===null)return Ee;var Oe='<img src="'+fe+'" alt="'+Ee+'"';return ye&&(Oe+=' title="'+ye+'"'),Oe+=this.options.xhtml?"/>":">",Oe},Re.text=function(fe){return fe},ke}(),_e=function(){function ke(){}var Re=ke.prototype;return Re.strong=function(fe){return fe},Re.em=function(fe){return fe},Re.codespan=function(fe){return fe},Re.del=function(fe){return fe},Re.html=function(fe){return fe},Re.text=function(fe){return fe},Re.link=function(fe,ye,Ee){return""+Ee},Re.image=function(fe,ye,Ee){return""+Ee},Re.br=function(){return""},ke}(),He=function(){function ke(){this.seen={}}var Re=ke.prototype;return Re.slug=function(fe){var ye=fe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ye)){var Ee=ye;do this.seen[Ee]++,ye=Ee+"-"+this.seen[Ee];while(this.seen.hasOwnProperty(ye))}return this.seen[ye]=0,ye},ke}(),$e=w.defaults,Ye=z.unescape,tt=function(){function ke(Te){this.options=Te||$e,this.options.renderer=this.options.renderer||new ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new _e,this.slugger=new He}ke.parse=function(fe,ye){var Ee=new ke(ye);return Ee.parse(fe)};var Re=ke.prototype;return Re.parse=function(fe,ye){ye===void 0&&(ye=!0);var Ee="",Oe,We,Ve,ut,ft,Dt,Mt,lr,dr,Tt,$r,Ur,Br,ln,br,Zr,qr,Pr,fn=fe.length;for(Oe=0;Oe<fn;Oe++){Tt=fe[Oe];switch(Tt.type){case"space":continue;case"hr":{Ee+=this.renderer.hr();continue}case"heading":{Ee+=this.renderer.heading(this.parseInline(Tt.tokens),Tt.depth,Ye(this.parseInline(Tt.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ee+=this.renderer.code(Tt.text,Tt.lang,Tt.escaped);continue}case"table":{for(lr="",Mt="",ut=Tt.header.length,We=0;We<ut;We++)Mt+=this.renderer.tablecell(this.parseInline(Tt.tokens.header[We]),{header:!0,align:Tt.align[We]});for(lr+=this.renderer.tablerow(Mt),dr="",ut=Tt.cells.length,We=0;We<ut;We++){for(Dt=Tt.tokens.cells[We],Mt="",ft=Dt.length,Ve=0;Ve<ft;Ve++)Mt+=this.renderer.tablecell(this.parseInline(Dt[Ve]),{header:!1,align:Tt.align[Ve]});dr+=this.renderer.tablerow(Mt)}Ee+=this.renderer.table(lr,dr);continue}case"blockquote":{dr=this.parse(Tt.tokens),Ee+=this.renderer.blockquote(dr);continue}case"list":{for($r=Tt.ordered,Ur=Tt.start,Br=Tt.loose,ut=Tt.items.length,dr="",We=0;We<ut;We++)br=Tt.items[We],Zr=br.checked,qr=br.task,ln="",br.task&&(Pr=this.renderer.checkbox(Zr),Br?br.tokens.length>0&&br.tokens[0].type==="text"?(br.tokens[0].text=Pr+" "+br.tokens[0].text,br.tokens[0].tokens&&br.tokens[0].tokens.length>0&&br.tokens[0].tokens[0].type==="text"&&(br.tokens[0].tokens[0].text=Pr+" "+br.tokens[0].tokens[0].text)):br.tokens.unshift({type:"text",text:Pr}):ln+=Pr),ln+=this.parse(br.tokens,Br),dr+=this.renderer.listitem(ln,qr,Zr);Ee+=this.renderer.list(dr,$r,Ur);continue}case"html":{Ee+=this.renderer.html(Tt.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(Tt.tokens));continue}case"text":{for(dr=Tt.tokens?this.parseInline(Tt.tokens):Tt.text;Oe+1<fn&&fe[Oe+1].type==="text";)Tt=fe[++Oe],dr+=`
|
|
|
`+(Tt.tokens?this.parseInline(Tt.tokens):Tt.text);Ee+=ye?this.renderer.paragraph(dr):dr;continue}default:{var bn='Token with "'+Tt.type+'" type was not found.';if(this.options.silent){console.error(bn);return}else throw new Error(bn)}}}return Ee},Re.parseInline=function(fe,ye){ye=ye||this.renderer;var Ee="",Oe,We,Ve=fe.length;for(Oe=0;Oe<Ve;Oe++){We=fe[Oe];switch(We.type){case"escape":{Ee+=ye.text(We.text);break}case"html":{Ee+=ye.html(We.text);break}case"link":{Ee+=ye.link(We.href,We.title,this.parseInline(We.tokens,ye));break}case"image":{Ee+=ye.image(We.href,We.title,We.text);break}case"strong":{Ee+=ye.strong(this.parseInline(We.tokens,ye));break}case"em":{Ee+=ye.em(this.parseInline(We.tokens,ye));break}case"codespan":{Ee+=ye.codespan(We.text);break}case"br":{Ee+=ye.br();break}case"del":{Ee+=ye.del(this.parseInline(We.tokens,ye));break}case"text":{Ee+=ye.text(We.text);break}default:{var ut='Token with "'+We.type+'" type was not found.';if(this.options.silent){console.error(ut);return}else throw new Error(ut)}}}return Ee},ke}(),nt=z.merge,it=z.checkSanitizeDeprecation,Me=z.escape,Ce=w.getDefaults,Je=w.changeDefaults,rt=w.defaults;function ze(ke,Re,Te){if(typeof ke=="undefined"||ke===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ke!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ke)+", string expected");if(typeof Re=="function"&&(Te=Re,Re=null),Re=nt({},ze.defaults,Re||{}),it(Re),Te){var fe=Re.highlight,ye;try{ye=$.lex(ke,Re)}catch(Ve){return Te(Ve)}var Ee=function(ut){var ft;if(!ut)try{ft=tt.parse(ye,Re)}catch(Dt){ut=Dt}return Re.highlight=fe,ut?Te(ut):Te(null,ft)};if(!fe||fe.length<3)return Ee();if(delete Re.highlight,!ye.length)return Ee();var Oe=0;ze.walkTokens(ye,function(Ve){Ve.type==="code"&&(Oe++,setTimeout(function(){fe(Ve.text,Ve.lang,function(ut,ft){if(ut)return Ee(ut);ft!=null&&ft!==Ve.text&&(Ve.text=ft,Ve.escaped=!0),Oe--,Oe===0&&Ee()})},0))}),Oe===0&&Ee();return}try{var We=$.lex(ke,Re);return Re.walkTokens&&ze.walkTokens(We,Re.walkTokens),tt.parse(We,Re)}catch(Ve){if(Ve.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Re.silent)return"<p>An error occurred:</p><pre>"+Me(Ve.message+"",!0)+"</pre>";throw Ve}}ze.options=ze.setOptions=function(ke){return nt(ze.defaults,ke),Je(ze.defaults),ze},ze.getDefaults=Ce,ze.defaults=rt,ze.use=function(ke){var Re=nt({},ke);if(ke.renderer&&function(){var fe=ze.defaults.renderer||new ue,ye=function(We){var Ve=fe[We];fe[We]=function(){for(var ut=arguments.length,ft=new Array(ut),Dt=0;Dt<ut;Dt++)ft[Dt]=arguments[Dt];var Mt=ke.renderer[We].apply(fe,ft);return Mt===!1&&(Mt=Ve.apply(fe,ft)),Mt}};for(var Ee in ke.renderer)ye(Ee);Re.renderer=fe}(),ke.tokenizer&&function(){var fe=ze.defaults.tokenizer||new Se,ye=function(We){var Ve=fe[We];fe[We]=function(){for(var ut=arguments.length,ft=new Array(ut),Dt=0;Dt<ut;Dt++)ft[Dt]=arguments[Dt];var Mt=ke.tokenizer[We].apply(fe,ft);return Mt===!1&&(Mt=Ve.apply(fe,ft)),Mt}};for(var Ee in ke.tokenizer)ye(Ee);Re.tokenizer=fe}(),ke.walkTokens){var Te=ze.defaults.walkTokens;Re.walkTokens=function(fe){ke.walkTokens(fe),Te&&Te(fe)}}ze.setOptions(Re)},ze.walkTokens=function(ke,Re){for(var Te=u(ke),fe;!(fe=Te()).done;){var ye=fe.value;Re(ye);switch(ye.type){case"table":{for(var Ee=u(ye.tokens.header),Oe;!(Oe=Ee()).done;){var We=Oe.value;ze.walkTokens(We,Re)}for(var Ve=u(ye.tokens.cells),ut;!(ut=Ve()).done;)for(var ft=ut.value,Dt=u(ft),Mt;!(Mt=Dt()).done;){var lr=Mt.value;ze.walkTokens(lr,Re)}break}case"list":{ze.walkTokens(ye.items,Re);break}default:ye.tokens&&ze.walkTokens(ye.tokens,Re)}}},ze.Parser=tt,ze.parser=tt.parse,ze.Renderer=ue,ze.TextRenderer=_e,ze.Lexer=$,ze.lexer=$.lex,ze.Tokenizer=Se,ze.Slugger=He,ze.parse=ze;var et=ze;return et})},E4JC:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var h=L,C=h.lib,D=C.StreamCipher,u=h.algo,f=[],w=[],d=[],o=u.Rabbit=D.extend({_doReset:function(){for(var a=this._key.words,_=this.cfg.iv,m=0;m<4;m++)a[m]=(a[m]<<8|a[m]>>>24)&16711935|(a[m]<<24|a[m]>>>8)&4278255360;var c=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],g=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[0]&65535];this._b=0;for(var m=0;m<4;m++)l.call(this);for(var m=0;m<8;m++)g[m]^=c[m+4&7];if(_){var v=_.words,x=v[0],n=v[1],i=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,t=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,S=i>>>16|t&4294901760,E=t<<16|i&65535;g[0]^=i,g[1]^=S,g[2]^=t,g[3]^=E,g[4]^=i,g[5]^=S,g[6]^=t,g[7]^=E;for(var m=0;m<4;m++)l.call(this)}},_doProcessBlock:function(a,_){var m=this._X;l.call(this),f[0]=m[0]^m[5]>>>16^m[3]<<16,f[1]=m[2]^m[7]>>>16^m[5]<<16,f[2]=m[4]^m[1]>>>16^m[7]<<16,f[3]=m[6]^m[3]>>>16^m[1]<<16;for(var c=0;c<4;c++)f[c]=(f[c]<<8|f[c]>>>24)&16711935|(f[c]<<24|f[c]>>>8)&4278255360,a[_+c]^=f[c]},blockSize:128/32,ivSize:64/32});function l(){for(var a=this._X,_=this._C,m=0;m<8;m++)w[m]=_[m];_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0<w[0]>>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0<w[1]>>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0<w[2]>>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0<w[3]>>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0<w[4]>>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0<w[5]>>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0<w[6]>>>0?1:0)|0,this._b=_[7]>>>0<w[7]>>>0?1:0;for(var m=0;m<8;m++){var c=a[m]+_[m],g=c&65535,v=c>>>16,x=((g*g>>>17)+g*v>>>15)+v*v,n=((c&4294901760)*c|0)+((c&65535)*c|0);d[m]=x^n}a[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,a[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,a[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,a[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,a[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,a[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,a[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,a[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}h.Rabbit=D._createHelper(o)}(),L.Rabbit})},ELLl:function(j,Q,k){(function(L){L(k("VrN/"))})(function(L){var h={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},C=L.Pos;L.defineOption("autoCloseBrackets",!1,function(g,v,x){x&&x!=L.Init&&(g.removeKeyMap(u),g.state.closeBrackets=null),v&&(f(D(v,"pairs")),g.state.closeBrackets=v,g.addKeyMap(u))});function D(g,v){return v=="pairs"&&typeof g=="string"?g:typeof g=="object"&&g[v]!=null?g[v]:h[v]}var u={Backspace:o,Enter:l};function f(g){for(var v=0;v<g.length;v++){var x=g.charAt(v),n="'"+x+"'";u[n]||(u[n]=w(x))}}f(h.pairs+"`");function w(g){return function(v){return _(v,g)}}function d(g){var v=g.state.closeBrackets;if(!v||v.override)return v;var x=g.getModeAt(g.getCursor());return x.closeBrackets||v}function o(g){var v=d(g);if(!v||g.getOption("disableInput"))return L.Pass;for(var x=D(v,"pairs"),n=g.listSelections(),i=0;i<n.length;i++){if(!n[i].empty())return L.Pass;var t=m(g,n[i].head);if(!t||x.indexOf(t)%2!=0)return L.Pass}for(var i=n.length-1;i>=0;i--){var S=n[i].head;g.replaceRange("",C(S.line,S.ch-1),C(S.line,S.ch+1),"+delete")}}function l(g){var v=d(g),x=v&&D(v,"explode");if(!x||g.getOption("disableInput"))return L.Pass;for(var n=g.listSelections(),i=0;i<n.length;i++){if(!n[i].empty())return L.Pass;var t=m(g,n[i].head);if(!t||x.indexOf(t)%2!=0)return L.Pass}g.operation(function(){var S=g.lineSeparator()||`
|
|
|
`;g.replaceSelection(S+S,null),g.execCommand("goCharLeft"),n=g.listSelections();for(var E=0;E<n.length;E++){var s=n[E].head.line;g.indentLine(s,null,!0),g.indentLine(s+1,null,!0)}})}function a(g){var v=L.cmpPos(g.anchor,g.head)>0;return{anchor:new C(g.anchor.line,g.anchor.ch+(v?-1:1)),head:new C(g.head.line,g.head.ch+(v?1:-1))}}function _(g,v){var x=d(g);if(!x||g.getOption("disableInput"))return L.Pass;var n=D(x,"pairs"),i=n.indexOf(v);if(i==-1)return L.Pass;for(var t=D(x,"closeBefore"),S=D(x,"triples"),E=n.charAt(i+1)==v,s=g.listSelections(),P=i%2==0,O,b=0;b<s.length;b++){var y=s[b],p=y.head,T,M=g.getRange(p,C(p.line,p.ch+1));if(P&&!y.empty())T="surround";else if((E||!P)&&M==v)E&&c(g,p)?T="both":S.indexOf(v)>=0&&g.getRange(p,C(p.line,p.ch+3))==v+v+v?T="skipThree":T="skip";else if(E&&p.ch>1&&S.indexOf(v)>=0&&g.getRange(C(p.line,p.ch-2),p)==v+v){if(p.ch>2&&/\bstring/.test(g.getTokenTypeAt(C(p.line,p.ch-2))))return L.Pass;T="addFour"}else if(E){var N=p.ch==0?" ":g.getRange(C(p.line,p.ch-1),p);if(!L.isWordChar(M)&&N!=v&&!L.isWordChar(N))T="both";else return L.Pass}else if(P&&(M.length===0||/\s/.test(M)||t.indexOf(M)>-1))T="both";else return L.Pass;if(!O)O=T;else if(O!=T)return L.Pass}var I=i%2?n.charAt(i-1):v,K=i%2?v:n.charAt(i+1);g.operation(function(){if(O=="skip")g.execCommand("goCharRight");else if(O=="skipThree")for(var H=0;H<3;H++)g.execCommand("goCharRight");else if(O=="surround"){for(var W=g.getSelections(),H=0;H<W.length;H++)W[H]=I+W[H]+K;g.replaceSelections(W,"around"),W=g.listSelections().slice();for(var H=0;H<W.length;H++)W[H]=a(W[H]);g.setSelections(W)}else O=="both"?(g.replaceSelection(I+K,null),g.triggerElectric(I+K),g.execCommand("goCharLeft")):O=="addFour"&&(g.replaceSelection(I+I+I+I,"before"),g.execCommand("goCharRight"))})}function m(g,v){var x=g.getRange(C(v.line,v.ch-1),C(v.line,v.ch+1));return x.length==2?x:null}function c(g,v){var x=g.getTokenAt(C(v.line,v.ch+1));return/\bstring/.test(x.type)&&x.start==v.ch&&(v.ch==0||!/\bstring/.test(g.getTokenTypeAt(v)))}})},ELcG:function(j,Q,k){(function(L,h){j.exports=Q=h(k("Ib8C"))})(this,function(L){/** @preserve
|
|
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
|
|
|
|
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
|
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
*/return function(h){var C=L,D=C.lib,u=D.WordArray,f=D.Hasher,w=C.algo,d=u.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=u.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=u.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),a=u.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),_=u.create([0,1518500249,1859775393,2400959708,2840853838]),m=u.create([1352829926,1548603684,1836072691,2053994217,0]),c=w.RIPEMD160=f.extend({_doReset:function(){this._hash=u.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(S,E){for(var s=0;s<16;s++){var P=E+s,O=S[P];S[P]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var b=this._hash.words,y=_.words,p=m.words,T=d.words,M=o.words,N=l.words,I=a.words,K,H,W,z,U,B,G,q,ae,se;B=K=b[0],G=H=b[1],q=W=b[2],ae=z=b[3],se=U=b[4];for(var we,s=0;s<80;s+=1)we=K+S[E+T[s]]|0,s<16?we+=g(H,W,z)+y[0]:s<32?we+=v(H,W,z)+y[1]:s<48?we+=x(H,W,z)+y[2]:s<64?we+=n(H,W,z)+y[3]:we+=i(H,W,z)+y[4],we=we|0,we=t(we,N[s]),we=we+U|0,K=U,U=z,z=t(W,10),W=H,H=we,we=B+S[E+M[s]]|0,s<16?we+=i(G,q,ae)+p[0]:s<32?we+=n(G,q,ae)+p[1]:s<48?we+=x(G,q,ae)+p[2]:s<64?we+=v(G,q,ae)+p[3]:we+=g(G,q,ae)+p[4],we=we|0,we=t(we,I[s]),we=we+se|0,B=se,se=ae,ae=t(q,10),q=G,G=we;we=b[1]+W+ae|0,b[1]=b[2]+z+se|0,b[2]=b[3]+U+B|0,b[3]=b[4]+K+G|0,b[4]=b[0]+H+q|0,b[0]=we},_doFinalize:function(){var S=this._data,E=S.words,s=this._nDataBytes*8,P=S.sigBytes*8;E[P>>>5]|=128<<24-P%32,E[(P+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,S.sigBytes=(E.length+1)*4,this._process();for(var O=this._hash,b=O.words,y=0;y<5;y++){var p=b[y];b[y]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}return O},clone:function(){var S=f.clone.call(this);return S._hash=this._hash.clone(),S}});function g(S,E,s){return S^E^s}function v(S,E,s){return S&E|~S&s}function x(S,E,s){return(S|~E)^s}function n(S,E,s){return S&s|E&~s}function i(S,E,s){return S^(E|~s)}function t(S,E){return S<<E|S>>>32-E}C.RIPEMD160=f._createHelper(c),C.HmacRIPEMD160=f._createHmacHelper(c)}(Math),L.RIPEMD160})},ETIr:function(j,Q,k){(function(L,h){j.exports=Q=h(k("Ib8C"))})(this,function(L){return function(){var h=L,C=h.lib,D=C.WordArray,u=h.enc,f=u.Base64={stringify:function(d){var o=d.words,l=d.sigBytes,a=this._map;d.clamp();for(var _=[],m=0;m<l;m+=3)for(var c=o[m>>>2]>>>24-m%4*8&255,g=o[m+1>>>2]>>>24-(m+1)%4*8&255,v=o[m+2>>>2]>>>24-(m+2)%4*8&255,x=c<<16|g<<8|v,n=0;n<4&&m+n*.75<l;n++)_.push(a.charAt(x>>>6*(3-n)&63));var i=a.charAt(64);if(i)for(;_.length%4;)_.push(i);return _.join("")},parse:function(d){var o=d.length,l=this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var _=0;_<l.length;_++)a[l.charCodeAt(_)]=_}var m=l.charAt(64);if(m){var c=d.indexOf(m);c!==-1&&(o=c)}return w(d,o,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function w(d,o,l){for(var a=[],_=0,m=0;m<o;m++)if(m%4){var c=l[d.charCodeAt(m-1)]<<m%4*2,g=l[d.charCodeAt(m)]>>>6-m%4*2,v=c|g;a[_>>>2]|=v<<24-_%4*8,_++}return D.create(a,_)}}(),L.enc.Base64})},"F+F2":function(j,Q,k){(function(L,h){j.exports=Q=h(k("Ib8C"))})(this,function(L){return function(){if(typeof ArrayBuffer!="function")return;var h=L,C=h.lib,D=C.WordArray,u=D.init,f=D.init=function(w){if(w instanceof ArrayBuffer&&(w=new Uint8Array(w)),(w instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&w instanceof Uint8ClampedArray||w instanceof Int16Array||w instanceof Uint16Array||w instanceof Int32Array||w instanceof Uint32Array||w instanceof Float32Array||w instanceof Float64Array)&&(w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength)),w instanceof Uint8Array){for(var d=w.byteLength,o=[],l=0;l<d;l++)o[l>>>2]|=w[l]<<24-l%4*8;u.call(this,o,d)}else u.apply(this,arguments)};f.prototype=D}(),L.lib.WordArray})},GRO8:function(j,Q,k){"use strict";k.r(Q);var L=k("k1fw"),h=k("2qtc"),C=k("kLXV"),D=k("lUTK"),u=k("BvKs"),f=k("+L6B"),w=k("2/Rp"),d=k("T2oS"),o=k("W9HT"),l=k("sPJy"),a=k("bE4q"),_=k("miYZ"),m=k("tsqr"),c=k("9og8"),g=k("tJVT"),v=k("PpiC"),x=k("WmNS"),n=k.n(x),i=k("q1tI"),t=k.n(i),S=k("Ty5D"),E=k("55Ip"),s=k("9kvl"),P=k("KeDT"),O=k.n(P),b=k("zrhs"),y=k("DZo9"),p=k("8z0m"),T=k("LtfV"),M=k("KhGG"),N=p.a.Dragger,I=function(Ze){var dt=Ze.user,Et=Ze.dispatch,Ut=Ze.classroomList,Pt=Ze.shixunsDetail,Zt=Ze.getResults,kt=Object(S.i)(),lt=Object(i.useState)(),mt=Object(g.a)(lt,2),xt=mt[0],_t=mt[1],wt=Object(i.useState)([]),yt=Object(g.a)(wt,2),Ct=yt[0],At=yt[1],jt=Object(i.useState)(!1),Vt=Object(g.a)(jt,2),Xe=Vt[0],qt=Vt[1],sr={onRemove:function(){At([])},beforeUpload:function(Bt){if(console.log(Bt),(Bt==null?void 0:Bt.size)>1024*1024*500)return m.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var Nt=[];return Nt.push(Bt),At([].concat(Nt)),!1},fileList:Ct};return t.a.createElement(C.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:Pt.actionTabs.key==="md-tab",confirmLoading:Xe,onOk:Object(c.a)(n.a.mark(function er(){var Bt,Nt,$t;return n.a.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:if(!((Ct==null?void 0:Ct.length)<=0)){Sr.next=3;break}return m.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),Sr.abrupt("return");case 3:return qt(!0),Sr.next=6,Object(M.c)(Ct[0],{login:(Bt=dt.userInfo)===null||Bt===void 0?void 0:Bt.login,container_type:"Competition",container_id:Pt.actionTabs.params.id,stage_type:Pt.actionTabs.params.value,file_name:(Nt=Ct[0])===null||Nt===void 0?void 0:Nt.name});case 6:$t=Sr.sent,($t==null?void 0:$t.status)===0?(m.b.info("\u63D0\u4EA4\u6210\u529F"),Et({type:"shixunsDetail/setActionTabs",payload:{key:""}}),qt(!1),At([]),Zt(Pt.actionTabs.params.value)):(qt(!1),m.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return Sr.stop()}},er)})),onCancel:function(){At([]),Et({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},t.a.createElement(N,sr,t.a.createElement("p",{className:"ant-upload-drag-icon"},t.a.createElement(T.a,null)),t.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},K=Object(s.a)(function(ht){var Ze=ht.user,dt=ht.classroomList,Et=ht.shixunsDetail;return{user:Ze,classroomList:dt,shixunsDetail:Et}})(I),H=k("14J3"),W=k("BMrR"),z=k("5NDa"),U=k("5rEg"),B=k("9Bee"),G=k("m3rI"),q=k("ErOA"),ae=k("NLgs"),se=k("fV52"),we=k("3I+P"),Se=k("OaEy"),de=k("2fM7"),xe=k("5bA4"),he=k("UESt"),ne=de.a.Option;function oe(ht){var Ze=ht.rewarddata,dt=ht.getlistdatas,Et=ht.is_signed,Ut=ht.dispatch,Pt=ht.userlist,Zt=Object(i.useRef)(null),kt=Object(i.useState)(!1),lt=Object(g.a)(kt,2),mt=lt[0],xt=lt[1],_t=Object(i.useState)(void 0),wt=Object(g.a)(_t,2),yt=wt[0],Ct=wt[1],At=Object(i.useState)(""),jt=Object(g.a)(At,2),Vt=jt[0],Xe=jt[1],qt=Object(i.useState)(void 0),sr=Object(g.a)(qt,2),er=sr[0],Bt=sr[1],Nt=Object(i.useState)(void 0),$t=Object(g.a)(Nt,2),Ft=$t[0],Sr=$t[1],Ar=Object(i.useState)(void 0),Yr=Object(g.a)(Ar,2),vn=Yr[0],Jr=Yr[1];function Kt(_r){return st.apply(this,arguments)}function st(){return st=Object(c.a)(n.a.mark(function _r(fr){var gr;return n.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:if(!fr.user_received){zt.next=3;break}return window.open(fr.click_info),zt.abrupt("return");case 3:if(Object(ae.g)(Ut)){zt.next=5;break}return zt.abrupt("return");case 5:if(!(Et===!1)){zt.next=8;break}return m.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),zt.abrupt("return");case 8:if(!(fr.click_event==="Pop")){zt.next=14;break}return Xe(fr.id),xt(!0),zt.abrupt("return");case 14:Ct(void 0);case 15:return zt.next=17,Ut({type:"competitions/Reward",payload:{competition_module_setting_id:fr.id}});case 17:gr=zt.sent,gr&&gr.status===0&&(dt(),fr.click_event==="Link"?(m.b.info("\u9886\u53D6\u6210\u529F"),window.open(fr.click_info)):m.b.info(fr.click_info));case 19:case"end":return zt.stop()}},_r)})),st.apply(this,arguments)}function rn(){return gn.apply(this,arguments)}function gn(){return gn=Object(c.a)(n.a.mark(function _r(){var fr;return n.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:if(!(Pt&&!Pt.real_name)){Gt.next=4;break}if(er){Gt.next=4;break}return m.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),Gt.abrupt("return");case 4:if(!(Pt&&!Pt.email)){Gt.next=8;break}if(Ft){Gt.next=8;break}return m.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),Gt.abrupt("return");case 8:if(!(Pt&&!Pt.phone)){Gt.next=12;break}if(vn){Gt.next=12;break}return m.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),Gt.abrupt("return");case 12:if(yt){Gt.next=15;break}return m.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),Gt.abrupt("return");case 15:return Gt.next=17,Ut({type:"competitions/Reward",payload:{competition_module_setting_id:Vt,className:yt,name:er,mail:Ft,phone:vn}});case 17:fr=Gt.sent,fr&&fr.status===0&&(xt(!1),dt(),m.b.info("HCIA\u8BA4\u8BC1\u8003\u8BD5\u4EE3\u91D1\u52B5\u5C06\u7531\u542F\u667A\u5E73\u53F0\u7EDF\u4E00\u53D1\u653E\uFF0C\u8BF7\u53CA\u65F6\u5173\u6CE8\u90AE\u7BB1\u6216\u7AD9\u5185\u77ED\u4FE1\u67E5\u6536"));case 19:case"end":return Gt.stop()}},_r)})),gn.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement(C.a,{visible:mt,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return xt(!1)},onOk:function(){rn()}},t.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",t.a.createElement(U.a,{className:Pt&&Pt.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:Pt&&Pt.phone?"":"#ffffff!important"},value:Pt&&Pt.real_name||er,disabled:Pt&&Pt.real_name||!1,onChange:function(fr){return Bt(fr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",t.a.createElement(U.a,{className:Pt&&Pt.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:Pt&&Pt.phone?"":"#ffffff!important"},value:Pt&&Pt.email||Ft,disabled:Pt&&Pt.email||!1,onChange:function(fr){return Sr(fr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",t.a.createElement(U.a,{style:{width:"300px"},className:Pt&&Pt.phone?"":"bkfff",value:Pt&&Pt.phone||vn,disabled:Pt&&Pt.phone||!1,onChange:function(fr){return Jr(fr.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",t.a.createElement(de.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(fr){Ct(fr)}},t.a.createElement(ne,{value:"\u5927\u4E00"},"\u5927\u4E00"),t.a.createElement(ne,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),t.a.createElement(ne,{value:"\u5927\u4E09"},"\u5927\u4E09"),t.a.createElement(ne,{value:"\u5927\u56DB"},"\u5927\u56DB"),t.a.createElement(ne,{value:"\u5927\u4E94"},"\u5927\u4E94"),t.a.createElement(ne,{value:"\u7855\u4E00"},"\u7855\u4E00"),t.a.createElement(ne,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),t.a.createElement(ne,{value:"\u7855\u4E09"},"\u7855\u4E09"),t.a.createElement(ne,{value:"\u535A\u4E00"},"\u535A\u4E00"),t.a.createElement(ne,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),t.a.createElement(ne,{value:"\u535A\u4E09"},"\u535A\u4E09"),t.a.createElement(ne,{value:"\u535A\u56DB"},"\u535A\u56DB"),t.a.createElement(ne,{value:"\u535A\u4E94"},"\u535A\u4E94")),t.a.createElement("p",{style:{marginTop:"1em"}},"\u63D0\u9192\uFF1A\u5982\u65E0\u534E\u4E3A\u4E91\u8D26\u53F7\uFF0C\u8BF7\u5C3D\u5FEB\u6CE8\u518C\u534E\u4E3A\u4E91\uFF01")),Ze&&Ze.length>3?t.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},t.a.createElement("span",{className:O.a.spanprev,onClick:function(){Zt.current.prev()}},t.a.createElement(xe.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),t.a.createElement(we.a,{ref:Zt,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},Ze&&Ze.map(function(_r,fr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:G.a.IMG_SERVER+"/".concat(_r.image_url)}),_r.user_received===!1||_r.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return Kt(_r)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})),t.a.createElement("span",{className:O.a.spannext,onClick:function(){Zt.current.next()}},t.a.createElement(he.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):t.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},Ze&&Ze.map(function(_r,fr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:G.a.IMG_SERVER+"/".concat(_r.image_url)}),_r.user_received===!1||_r.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return Kt(_r)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var te=oe,le=function(Ze,dt){var Et=Ze.StaffDetail,Ut=Ze.HeaderDetail,Pt=Ze.ItemData,Zt=Ze.setIssee,kt=Ze.ModelType,lt=Ze.dispatch,mt=Ze.userinfo,xt=Ze.Editable,_t=Ze.qs,wt=Object(i.useState)(!1),yt=Object(g.a)(wt,2),Ct=yt[0],At=yt[1],jt=Object(i.useState)([]),Vt=Object(g.a)(jt,2),Xe=Vt[0],qt=Vt[1],sr=Object(i.useState)(""),er=Object(g.a)(sr,2),Bt=er[0],Nt=er[1],$t=Object(i.useState)(""),Ft=Object(g.a)($t,2),Sr=Ft[0],Ar=Ft[1],Yr=Object(i.useState)(!1),vn=Object(g.a)(Yr,2),Jr=vn[0],Kt=vn[1],st=Object(S.i)(),rn=st.identifier,gn=Object(i.useRef)(null),_r=Object(i.useRef)(null);gn.current=Et==null?void 0:Et.enrolled,Object(i.useEffect)(function(){var zt;return(zt=_r.current)===null||zt===void 0||zt.addEventListener("click",fr),function(){var Mr;(Mr=_r.current)===null||Mr===void 0||Mr.removeEventListener("click",fr)}},[]);var fr=function(Mr){var tr;if((Mr==null||((tr=Mr.target)===null||tr===void 0)?void 0:tr.id)==="modal-upload"){if(!Object(ae.f)(lt))return;if(!gn.current){C.a.info({title:"\u63D0\u793A",centered:!0,okText:"\u6211\u77E5\u9053\u4E86",content:"\u8BF7\u5148\u62A5\u540D\uFF0C\u518D\u63D0\u4EA4\u4F5C\u54C1"});return}At(!0)}};Object(i.useEffect)(function(){if(Ut!=null&&Ut.upload_file){var zt,Mr,tr;qt([{name:Ut==null||((zt=Ut.upload_file)===null||zt===void 0)?void 0:zt.title,status:"done",uid:"123456789"}]),Ar(Ut==null?void 0:Ut.upload_file_url),Nt(Ut==null||((Mr=Ut.upload_file)===null||Mr===void 0||((tr=Mr.url)===null||tr===void 0))?void 0:tr.split("/")[3])}},[Ut==null?void 0:Ut.upload_file]);var gr={name:"file",multiple:!1,withCredentials:!0,action:G.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:Xe,onChange:function(Mr){var tr=Mr.file.status,pt=[Object(L.a)({},Mr.file)];if(qt(pt),Mr.file.status==="uploading"&&Kt(!0),tr==="done"){var Lt,vt;Nt((Lt=pt[0])===null||Lt===void 0||((vt=Lt.response)===null||vt===void 0)?void 0:vt.id),Kt(!1)}tr==="error"&&(qt([]),Kt(!1))},beforeUpload:function(Mr){var tr=Mr.size/1024/1024<1e3;return tr?Promise.resolve():(m.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Gt=function(){At(!0)};return Object(i.useImperativeHandle)(dt,function(){return{handleVisible:Gt}}),t.a.createElement("div",{ref:_r},kt==="reward"?t.a.createElement(te,{userlist:mt,dispatch:lt,rewarddata:Pt.reward_setting,is_signed:Pt.is_signed}):null,t.a.createElement("div",{style:{textAlign:"right"}},((mt==null?void 0:mt.admin)||(mt==null?void 0:mt.business)||xt)&&t.a.createElement(w.a,{onClick:function(){return Zt(!1)}},_t.\u7F16\u8F91)),t.a.createElement(B.a,{value:_t.isChinese?Pt.md_content:Pt.md_english_content}),Pt&&Pt.attachments&&Pt.attachments.map(function(zt,Mr){return t.a.createElement("div",null,t.a.createElement("a",{href:(G.a===null||G.a===void 0?void 0:G.a.API_SERVER)+zt.url,target:"_self",download:zt.title},t.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),t.a.createElement("span",{style:{color:"#000000"}},zt.title),t.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},zt.filesize)))}),t.a.createElement(C.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:Ct,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:Jr,onCancel:function(){return At(!1)},onOk:Object(c.a)(n.a.mark(function zt(){var Mr;return n.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:if(!(!Bt&&!Sr)){pt.next=3;break}return At(!1),pt.abrupt("return");case 3:return Kt(!0),pt.next=6,Object(q.a)("/api/competitions/".concat(rn,"/upload_file.json"),{method:"post",body:{attachment_id:Bt,upload_file_url:Sr}});case 6:Mr=pt.sent,Mr.status===0&&(At(!1),Kt(!1));case 8:case"end":return pt.stop()}},zt)}))},t.a.createElement("div",null,t.a.createElement(W.a,{align:"middle",className:"mb20"},t.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),t.a.createElement(U.a,{style:{width:416},value:Sr,onChange:function(Mr){var tr;return Ar((tr=Mr.target)===null||tr===void 0?void 0:tr.value)}})),t.a.createElement(W.a,{align:"top"},t.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),t.a.createElement(p.a,gr,t.a.createElement(w.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},Y=Object(i.forwardRef)(le),Z=k("Ot1p"),ge=k("hJwl");function ee(ht){var Ze=ht.ItemData,dt=ht.setIssee,Et=ht.MenuItem,Ut=ht.dispatch,Pt=ht.identifier,Zt=ht.ModelType,kt=ht.userinfo,lt=ht.getrightdatas,mt=ht.qs,xt=Object(i.useState)([]),_t=Object(g.a)(xt,2),wt=_t[0],yt=_t[1],Ct=Object(i.useState)(mt.isChinese?Ze.md_content:Ze.md_english_content),At=Object(g.a)(Ct,2),jt=At[0],Vt=At[1];Object(i.useEffect)(function(){var Nt,$t=[];Ze==null||((Nt=Ze.attachments)===null||Nt===void 0)||Nt.map(function(Ft){var Sr={uid:Ft.id,name:Ft.title,response:{id:Ft.id}};$t.push(Sr)}),yt($t)},[Ze==null?void 0:Ze.attachments]);function Xe(){var Nt,$t=[];return Ze==null||((Nt=Ze.attachments)===null||Nt===void 0)||Nt.map(function(Ft){var Sr={uid:Ft==null?void 0:Ft.id,name:Ft.title,response:{id:Ft.id}};$t.push(Sr)}),$t}var qt={name:"file",multiple:!0,withCredentials:!0,action:G.a.API_SERVER+"/api/attachments.json",defaultFileList:Xe(),onRemove:function($t){var Ft;if($t!=null&&(Ft=$t.response)!==null&&Ft!==void 0&&Ft.id){var Sr;Object(ge.D)({id:$t==null||((Sr=$t.response)===null||Sr===void 0)?void 0:Sr.id})}},onChange:function($t){var Ft=$t.file.status;Ft!=="uploading",Ft==="removed"&&yt($t.fileList),Ft==="done"?(yt($t.fileList),m.b.success("".concat($t.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):Ft==="error"&&m.b.error("".concat($t.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function($t){var Ft=$t.size/1024/1024<150;return Ft||m.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),Ft}};console.log(qt);function sr(){return er.apply(this,arguments)}function er(){return er=Object(c.a)(n.a.mark(function Nt(){var $t,Ft;return n.a.wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:if(jt){Ar.next=3;break}return m.b.warn(mt.\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A),Ar.abrupt("return");case 3:return $t={attachment_ids:Bt(wt),competition_module_id:Ze.id,md_content_id:Ze.md_id,identifier:Pt},mt.isChinese?$t.content=jt:$t.english_content=jt,Ar.next=7,Ut({type:"competitions/updateMdContent",payload:$t});case 7:Ft=Ar.sent,Ft&&(m.b.info(mt.\u63D0\u4EA4\u6210\u529F),dt(!0),lt(Et));case 9:case"end":return Ar.stop()}},Nt)})),er.apply(this,arguments)}function Bt(Nt){var $t=[];return Nt&&Nt.map(function(Ft){$t.push(Ft.response.id)}),$t}return t.a.createElement("div",null,Zt==="reward"?t.a.createElement(te,{userlist:kt,dispatch:Ut,rewarddata:Ze.reward_setting,is_signed:Ze.is_signed}):null,t.a.createElement(Z.a,{defaultValue:jt,onChange:function($t){return Vt($t)}}),t.a.createElement(p.a,qt,t.a.createElement(w.a,{className:"uploadBtn"},mt.\u4E0A\u4F20\u9644\u4EF6),mt["(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"]),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return sr()}},mt.\u63D0\u4EA4),t.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return dt(!0)}},mt.\u53D6\u6D88)))}var $=ee,X=k("g9YV"),J=k("wCAj"),me=k("Znn+"),ue=k("ZTPi");function _e(){return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement("img",{src:G.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),t.a.createElement("p",null,"\u8981\u6293\u4F4F\u4E00\u5207\u673A\u4F1A\uFF0C\u5411\u6240\u6709\u4EBA\u8BC1\u660E\u81EA\u5DF1\uFF0C\u8BC1\u660E\u4F60\u80FD\u591F\u8FCE\u63A5\u8363\u8000")))}var He=_e,$e=k("5Dmo"),Ye=k("3S7+"),tt=k("jCWc"),nt=k("kPKH"),it=k("IzEo"),Me=k("bx4M");function Ce(ht){var Ze=ht.oneItem,dt=ht.towItem,Et=ht.threeItem;return t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement(W.a,{gutter:16,style:{justifyContent:"center"}},t.a.createElement(nt.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},t.a.createElement(Me.a,{title:t.a.createElement("div",{className:O.a.towtop},t.a.createElement("img",{style:{marginTop:"20px"},src:G.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(E.a,{to:"/users/".concat(dt==null?void 0:dt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(dt==null?void 0:dt.user_image)}),(dt==null?void 0:dt.competition_prize)&&t.a.createElement("p",{className:O.a.prize},dt==null?void 0:dt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},dt==null?void 0:dt.record_user_name)))),className:O.a.towdiv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},dt==null?void 0:dt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},dt==null?void 0:dt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(dt==null?void 0:dt.extra_score)+parseFloat(dt==null?void 0:dt.score),"\u5206"))),t.a.createElement(nt.a,{span:6},t.a.createElement(Me.a,{title:t.a.createElement("div",{className:O.a.onetop},t.a.createElement("img",{style:{marginTop:"20px"},src:G.a.IMG_SERVER+"/images/educoder/huangguan.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(E.a,{to:"/users/".concat(Ze==null?void 0:Ze.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(Ze==null?void 0:Ze.user_image)}),(Ze==null?void 0:Ze.competition_prize)&&t.a.createElement("p",{className:O.a.prize},Ze==null?void 0:Ze.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},Ze==null?void 0:Ze.record_user_name)))),className:O.a.onediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},Ze==null?void 0:Ze.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},Ze==null?void 0:Ze.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(Ze==null?void 0:Ze.extra_score)+parseFloat(Ze==null?void 0:Ze.score),"\u5206"))),t.a.createElement(nt.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},t.a.createElement(Me.a,{title:t.a.createElement("div",{className:O.a.threetop},t.a.createElement("img",{style:{marginTop:"20px"},src:G.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(E.a,{to:"/users/".concat(Et==null?void 0:Et.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(Et==null?void 0:Et.user_image)}),(Et==null?void 0:Et.competition_prize)&&t.a.createElement("p",{className:O.a.prize},Et==null?void 0:Et.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},Et==null?void 0:Et.record_user_name)))),className:O.a.threediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},Et==null?void 0:Et.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},Et==null?void 0:Et.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(Et==null?void 0:Et.extra_score)+parseFloat(Et==null?void 0:Et.score),"\u5206")))))}var Je=Ce;function rt(ht){var Ze,dt,Et,Ut,Pt,Zt,kt,lt,mt,xt,_t,wt,yt,Ct,At,jt,Vt,Xe,qt,sr,er,Bt,Nt,$t,Ft,Sr,Ar,Yr,vn,Jr,Kt=ht.ItemData;return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement(Je,{oneItem:Kt==null?void 0:Kt.teams[0],towItem:Kt==null?void 0:Kt.teams[1],threeItem:Kt==null?void 0:Kt.teams[2]}),(Kt==null||((Ze=Kt.user_ranks)===null||Ze===void 0)?void 0:Ze.length)>0&&t.a.createElement("div",{className:O.a.myTeam},(Kt==null||((dt=Kt.user_ranks)===null||dt===void 0||((Et=dt[0])===null||Et===void 0))?void 0:Et.success)===!1?t.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u664B\u7EA7\uFF1A",t.a.createElement("span",{style:{color:(Kt==null||((Ut=Kt.user_ranks)===null||Ut===void 0||((Pt=Ut[0])===null||Pt===void 0))?void 0:Pt.success)===!1?"red":"green"}},(Kt==null||((Zt=Kt.user_ranks)===null||Zt===void 0||((kt=Zt[0])===null||kt===void 0))?void 0:kt.success)===!1?"\u5426":Kt!=null&&(lt=Kt.user_ranks)!==null&<!==void 0&&(mt=lt[0])!==null&&mt!==void 0&&mt.success?"\u662F":"")),(Kt==null||((xt=Kt.user_ranks)===null||xt===void 0||((_t=xt[0])===null||_t===void 0))?void 0:_t.awards)&&t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u83B7\u5956\uFF1A",t.a.createElement("span",null,(Kt==null||((wt=Kt.user_ranks)===null||wt===void 0||((yt=wt[0])===null||yt===void 0))?void 0:yt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(Kt==null||((Ct=Kt.user_ranks)===null||Ct===void 0||((At=Ct[0])===null||At===void 0))?void 0:At.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):t.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",Kt==null||((jt=Kt.user_ranks)===null||jt===void 0||((Vt=jt[0])===null||Vt===void 0))?void 0:Vt.rank),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Ye.a,{title:"\u6218\u961F\u540D"},Kt==null||((Xe=Kt.user_ranks)===null||Xe===void 0||((qt=Xe[0])===null||qt===void 0))?void 0:qt.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Ye.a,{title:"\u65F6\u95F4"},Kt==null||((sr=Kt.user_ranks)===null||sr===void 0||((er=sr[0])===null||er===void 0))?void 0:er.cost_time)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(Ye.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},Kt==null||((Bt=Kt.user_ranks)===null||Bt===void 0||((Nt=Bt[0])===null||Nt===void 0))?void 0:Nt.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Ye.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},Kt==null||(($t=Kt.user_ranks)===null||$t===void 0||((Ft=$t[0])===null||Ft===void 0))?void 0:Ft.score)),t.a.createElement("span",null,t.a.createElement(Ye.a,{title:"\u603B\u5206"},parseFloat(Kt==null||((Sr=Kt.user_ranks)===null||Sr===void 0||((Ar=Sr[0])===null||Ar===void 0))?void 0:Ar.extra_score)+parseFloat(Kt==null||((Yr=Kt.user_ranks)===null||Yr===void 0||((vn=Yr[0])===null||vn===void 0))?void 0:vn.score)||0))),Kt==null||((Jr=Kt.teams)===null||Jr===void 0)?void 0:Jr.map(function(st,rn){return t.a.createElement("div",{className:O.a.bottomItem},t.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},rn+1),t.a.createElement(E.a,{to:"/users/".concat(st==null?void 0:st.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(st==null?void 0:st.user_image)}),(st==null?void 0:st.competition_prize)&&t.a.createElement("span",{className:O.a.spanrightradius},st==null?void 0:st.competition_prize)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Ye.a,{title:"\u6218\u961F\u540D"},st==null?void 0:st.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Ye.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},st.school_name)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(Ye.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},st.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Ye.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},st.score)),t.a.createElement("span",{style:{color:"#0152d9"}},t.a.createElement(Ye.a,{title:"\u603B\u5206"},parseFloat(st.extra_score)+parseFloat(st.score))))}))}var ze=rt,et=ue.a.TabPane;function ke(ht){var Ze,dt,Et,Ut,Pt,Zt,kt=ht.ChartRules,lt=ht.ItemData,mt=ht.getCharts,xt=ht.Selectkey,_t=ht.getChartRules,wt=ht.userinfo,yt=ht.Editable,Ct=ht.HeaderDetail,At=ht.qs,jt=Object(i.useState)(!1),Vt=Object(g.a)(jt,2),Xe=Vt[0],qt=Vt[1],sr=Object(i.useState)(""),er=Object(g.a)(sr,2),Bt=er[0],Nt=er[1],$t=Object(i.useState)(!0),Ft=Object(g.a)($t,2),Sr=Ft[0],Ar=Ft[1],Yr=Object(i.useState)(),vn=Object(g.a)(Yr,2),Jr=vn[0],Kt=vn[1],st=Object(i.useState)(),rn=Object(g.a)(st,2),gn=rn[0],_r=rn[1],fr=Object(S.i)(),gr=fr.identifier;Object(i.useEffect)(function(){if(Sr){var tr,pt=kt==null||((tr=kt.stages)===null||tr===void 0)?void 0:tr[0];if(Kt(pt),pt!=null&&pt.id){var Lt,vt,ct;((Ct==null?void 0:Ct.task)==="mAP"||(Ct==null?void 0:Ct.task)==="dog")&&mt(pt==null?void 0:pt.id),Nt(((Lt=kt.rule_contents)===null||Lt===void 0||((vt=Lt.filter(function(yr){return parseInt(yr.competition_stage_id)===parseInt(pt==null?void 0:pt.id)}))===null||vt===void 0||((ct=vt[0])===null||ct===void 0))?void 0:ct.content)||"")}else{var Xt,Cr,Vr;(Ct==null?void 0:Ct.task)==="mAP"||(Ct==null?void 0:Ct.task)==="dog",Nt(((Xt=kt.rule_contents)===null||Xt===void 0||((Cr=Xt.filter(function(yr){return parseInt(yr.competition_stage_id)===0}))===null||Cr===void 0||((Vr=Cr[0])===null||Vr===void 0))?void 0:Vr.content)||"")}}},[kt]);function Gt(){return zt.apply(this,arguments)}function zt(){return zt=Object(c.a)(n.a.mark(function tr(){var pt,Lt,vt,ct,Xt,Cr,Vr,yr,Or;return n.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:if(Bt){Rr.next=3;break}return m.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Rr.abrupt("return");case 3:if(Ar(!1),pt=Jr==null?void 0:Jr.id,!pt){Rr.next=12;break}return Rr.next=8,Object(q.a)("/api/competitions/".concat(gr,"/update_md_content.json"),{method:"post",body:{competition_module_id:xt,content:Bt,md_content_id:(Lt=kt.rule_contents)===null||Lt===void 0||((vt=Lt.filter(function(Wr){return parseInt(Wr.competition_stage_id)===parseInt(pt)}))===null||vt===void 0||((ct=vt[0])===null||ct===void 0))?void 0:ct.id,stage_id:Jr==null?void 0:Jr.id}});case 8:Xt=Rr.sent,Xt.status===0&&(m.b.info("\u66F4\u65B0\u6210\u529F"),qt(!1),_t()),Rr.next=16;break;case 12:return Rr.next=14,Object(q.a)("/api/competitions/".concat(gr,"/update_md_content.json"),{method:"post",body:{competition_module_id:xt,content:Bt,md_content_id:(Cr=kt.rule_contents)===null||Cr===void 0||((Vr=Cr.filter(function(Wr){return parseInt(Wr.competition_stage_id)===0}))===null||Vr===void 0||((yr=Vr[0])===null||yr===void 0))?void 0:yr.id,stage_id:Jr==null?void 0:Jr.id}});case 14:Or=Rr.sent,Or.status===0&&(m.b.info("\u66F4\u65B0\u6210\u529F"),qt(!1),_t());case 16:case"end":return Rr.stop()}},tr)})),zt.apply(this,arguments)}var Mr=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(pt,Lt,vt){return t.a.createElement("span",null,vt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(pt){return t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(pt)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(pt){return t.a.createElement("span",{title:pt},pt&&(pt==null?void 0:pt.length)>=15?(pt==null?void 0:pt.substr(0,15))+"...":pt||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(pt){return t.a.createElement("span",null,pt||"--")}},{title:(Ct==null?void 0:Ct.task)==="mAP"?"mAP\u6307\u6807":(Ct==null?void 0:Ct.task)==="Jittor-3"?"\u603B\u5206":"top1\u6307\u6807",dataIndex:"score",key:"score",render:function(pt){return t.a.createElement("span",null,pt||"--")}}];return t.a.createElement("div",null,(kt==null||((Ze=kt.stages)===null||Ze===void 0)?void 0:Ze.length)>0?null:t.a.createElement(He,null),(kt==null||((dt=kt.stages)===null||dt===void 0)?void 0:dt.length)>0&&t.a.createElement(ue.a,{animated:!0,tabBarExtraContent:((wt==null?void 0:wt.admin)||(wt==null?void 0:wt.business)||yt)&&t.a.createElement(w.a,{onClick:function(){qt(!0)}},At.\u7F16\u8F91),onChange:function(pt){var Lt,vt,ct,Xt,Cr;qt(!1);var Vr=kt==null||((Lt=kt.stages)===null||Lt===void 0)?void 0:Lt.filter(function(Or){return parseInt(pt)===parseInt(Or==null?void 0:Or.id)})[0];Kt(Vr);var yr=Vr==null||((vt=Vr.children)===null||vt===void 0)?void 0:vt[0];_r(yr),Nt(((ct=kt.rule_contents)===null||ct===void 0||((Xt=ct.filter(function(Or){return parseInt(Or.competition_stage_id)===parseInt(Vr==null?void 0:Vr.id)}))===null||Xt===void 0||((Cr=Xt[0])===null||Cr===void 0))?void 0:Cr.content)||""),mt((yr==null?void 0:yr.id)||pt)}},kt&&kt.stages.map(function(tr,pt){return t.a.createElement(et,{tab:tr.name,key:tr.id===null?0:tr.id},Xe===!1&&kt&&kt.rule_contents.map(function(Lt,vt){if(tr.id===Lt.competition_stage_id)return t.a.createElement(B.a,{key:vt,value:Lt.content===void 0||Lt.content===null?"":Lt.content});if(tr.id===null&&Lt.competition_stage_id===0)return t.a.createElement(B.a,{key:vt,value:Lt.content===void 0||Lt.content===null?"":Lt.content})}))})),(Jr==null||((Et=Jr.children)===null||Et===void 0)?void 0:Et.length)>0&&t.a.createElement(ue.a,{activeKey:(gn==null?void 0:gn.id)+"",onChange:function(pt){var Lt,vt=Jr==null||((Lt=Jr.children)===null||Lt===void 0)?void 0:Lt.filter(function(ct){return parseInt(pt)===parseInt(ct==null?void 0:ct.id)})[0];_r(vt),mt(pt)}},Jr==null||((Ut=Jr.children)===null||Ut===void 0)?void 0:Ut.map(function(tr,pt){return t.a.createElement(et,{tab:tr.name,key:tr.id===null?0:tr.id})})),Xe&&t.a.createElement("div",null,t.a.createElement(Z.a,{defaultValue:Bt,onChange:function(pt){Nt(pt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return Gt()}},At.\u63D0\u4EA4),t.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return qt(!1)}},At.\u53D6\u6D88))),(lt==null||((Pt=lt.teams)===null||Pt===void 0)?void 0:Pt.length)>0&&((Ct==null?void 0:Ct.task)==="mAP"||(Ct==null?void 0:Ct.task)==="dog"||(Ct==null?void 0:Ct.task)==="Jittor-3")?t.a.createElement(J.a,{dataSource:lt==null?void 0:lt.teams,columns:Mr,pagination:!1}):(lt==null||((Zt=lt.teams)===null||Zt===void 0)?void 0:Zt.length)>0&&t.a.createElement(ze,{ItemData:lt}))}var Re=ke,Te=k("/zsF"),fe=k("PArb");function ye(ht){var Ze,dt,Et,Ut,Pt,Zt,kt,lt=ht.Prize,mt=Object(S.i)(),xt=Object(i.useState)([{type:1,name:"\u56E2\u4F53\u5956\u8BC1\u4E66"},{type:2,name:"\u4E2A\u4EBA\u5956\u8BC1\u4E66"},{type:3,name:"\u4F18\u79C0\u6307\u5BFC\u6559\u5E08\u8BC1\u4E66"}]),_t=Object(g.a)(xt,2),wt=_t[0],yt=_t[1],Ct=function(){var At=Object(c.a)(n.a.mark(function jt(Vt){var Xe;return n.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:return sr.next=2,Object(ge.G)({type:Vt.type,id:mt.identifier});case 2:Xe=sr.sent,(Xe==null?void 0:Xe.status)===0&&(location.href="/competitions/exports?id=".concat(mt.identifier,"&type=").concat(Vt.type));case 4:case"end":return sr.stop()}},jt)}));return function(Vt){return At.apply(this,arguments)}}();return t.a.createElement("div",null,t.a.createElement("p",{className:O.a.downloadpdf},"\u6E29\u99A8\u63D0\u793A\uFF1A\u586B\u5199\u7684\u4E2A\u4EBA\u4FE1\u606F\u7ECF\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u4E2A\u4EBA\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\uFF1B\u56E2\u961F\u961F\u5458\u4FE1\u606F\u5168\u90E8\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u56E2\u961F\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\u3002"),t.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"\u8BC1\u4E66\u60C5\u51B5"),(lt==null||((Ze=lt.personal_certifications)===null||Ze===void 0)?void 0:Ze.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:G.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:G.a.API_SERVER+"".concat(lt==null||((dt=lt.personal_certifications[0])===null||dt===void 0)?void 0:dt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210"),t.a.createElement("span",{style:{marginLeft:"20px"}},"\u539F\u56E0\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u7EC4\u59D4\u4F1A\u672A\u5B8C\u6210\u8BC1\u4E66\u5BA1\u6279\uFF0C\u8BF7\u7A0D\u540E")),(lt==null||((Et=lt.team_certifications)===null||Et===void 0)?void 0:Et.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:G.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:G.a.API_SERVER+"".concat(lt==null||((Ut=lt.team_certifications[0])===null||Ut===void 0)?void 0:Ut.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210")),t.a.createElement(fe.a,null),(lt==null||((Pt=lt.teams)===null||Pt===void 0)?void 0:Pt.length)>0?t.a.createElement("div",null,t.a.createElement("p",null,(lt==null?void 0:lt.teams)&&(lt==null||((Zt=lt.teams[0])===null||Zt===void 0)?void 0:Zt.name),"\u6218\u961F\u4FE1\u606F\u586B\u62A5\u6982\u51B5"),t.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},t.a.createElement("span",{style:{width:"5%"}},"\u89D2\u8272"),t.a.createElement("span",{style:{width:"5%"}},"\u59D3\u540D"),t.a.createElement("span",{style:{width:"10%"}},"\u5B9E\u540D\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u804C\u4E1A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u624B\u673A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},"\u90AE\u7BB1\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7\u4FE1\u606F\uFF08\u961F\u957F\u586B\u5199\uFF09")),(lt==null?void 0:lt.teams)&&(lt==null||((kt=lt.teams[0])===null||kt===void 0)?void 0:kt.team_members.map(function(At,jt){var Vt,Xe,qt,sr,er,Bt;return t.a.createElement("p",{className:O.a.teamItem},t.a.createElement("span",{style:{width:"5%"}},At==null?void 0:At.role),t.a.createElement("span",{style:{width:"5%"}},At==null?void 0:At.name),t.a.createElement("span",{style:{width:"10%"}},(At==null?void 0:At.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(At==null?void 0:At.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},(At==null?void 0:At.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(At==null?void 0:At.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},At!=null&&At.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},At!=null&&At.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(At==null?void 0:At.role)==="\u961F\u957F"?t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(lt==null?void 0:lt.teams)&&(lt==null||((Vt=lt.teams[0])===null||Vt===void 0||((Xe=Vt.bank_account)===null||Xe===void 0))?void 0:Xe.bank),(lt==null?void 0:lt.teams)&&(lt==null||((qt=lt.teams[0])===null||qt===void 0||((sr=qt.bank_account)===null||sr===void 0))?void 0:sr.second_bank),(lt==null?void 0:lt.teams)&&(lt==null||((er=lt.teams[0])===null||er===void 0||((Bt=er.bank_account)===null||Bt===void 0))?void 0:Bt.card_no)):t.a.createElement("span",{style:{width:"50%"}}))}))):null,t.a.createElement(W.a,{gutter:[20,20]},wt.map(function(At,jt){return t.a.createElement(nt.a,{key:jt},t.a.createElement(w.a,{type:"primary",onClick:function(){return Ct(At)}},At.name))})))}var Ee=ye,Oe=k("0Owb"),We=k("7Kak"),Ve=k("9yH6"),ut=k("y8nQ"),ft=k("Vl3Y"),Dt=k("1vsH"),Mt=k("Dgm7"),lr=k.n(Mt),dr=k("NnUe"),Tt=k.n(dr),$r=p.a.Dragger,Ur=10,Br=function(Ze){var dt=Ze.user,Et=Ze.account,Ut=Ze.globalSetting,Pt=Ze.loading,Zt=Ze.dispatch,kt=Object(v.a)(Ze,["user","account","globalSetting","loading","dispatch"]),lt=ft.a.useForm(),mt=Object(g.a)(lt,1),xt=mt[0],_t=Object(i.useState)({}),wt=Object(g.a)(_t,2),yt=wt[0],Ct=wt[1],At=Object(i.useState)(!0),jt=Object(g.a)(At,2),Vt=jt[0],Xe=jt[1],qt=Object(i.useState)(),sr=Object(g.a)(qt,2),er=sr[0],Bt=sr[1],Nt=Object(i.useState)(),$t=Object(g.a)(Nt,2),Ft=$t[0],Sr=$t[1],Ar=Object(i.useState)(),Yr=Object(g.a)(Ar,2),vn=Yr[0],Jr=Yr[1],Kt=Object(i.useState)(),st=Object(g.a)(Kt,2),rn=st[0],gn=st[1];Object(i.useEffect)(function(){if(!Et.basicInfo)return;var tr=Et.basicInfo,pt={name:tr.show_realname?tr.name:Object(Dt.G)(tr.name),gender:tr.gender};Bt(tr.name),Xe(tr.show_realname),xt.setFieldsValue(pt),Ct(pt)},[Et.basicInfo]);var _r=function(pt){if(pt.file.status==="uploading"){gn(!0);return}if(pt.file.status==="done"){var Lt;console.log(pt.file,pt.file.response),Jr((Lt=pt.file.response)===null||Lt===void 0?void 0:Lt.id),Object(Dt.D)(pt.file.originFileObj,function(vt){Sr(vt),gn(!1)})}},fr=function(pt){Ct(Object(L.a)({},xt.getFieldsValue())),"name"in pt&&Bt(pt.name)},gr=function(){var pt=!Vt;Xe(pt);var Lt=pt?er:Object(Dt.G)(er);xt.setFieldsValue({name:Lt})},Gt=function(){var tr=Object(c.a)(n.a.mark(function pt(Lt){var vt,ct,Xt,Cr,Vr,yr,Or,jr;return n.a.wrap(function(Wr){for(;;)switch(Wr.prev=Wr.next){case 0:if(Xt=Lt||{},Cr=Xt.name,Vr=Xt.gender,yr=Xt.idNumber,Ft){Wr.next=4;break}return m.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Wr.abrupt("return");case 4:return Wr.next=6,Zt({type:"account/applyRealNameAuth",payload:{id:((vt=Et.basicInfo)===null||vt===void 0?void 0:vt.id)||((ct=dt.userInfo)===null||ct===void 0?void 0:ct.login),name:Cr,gender:Vr,id_number:yr,show_realname:Vt,attachment_ids:[vn]}});case 6:Or=Wr.sent,zt(),Or&&(m.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Zt({type:"account/getBasicInfo",payload:{login:(jr=dt.userInfo)===null||jr===void 0?void 0:jr.login}}));case 9:case"end":return Wr.stop()}},pt)}));return function(Lt){return tr.apply(this,arguments)}}(),zt=function(){Zt({type:"account/setActionTabs",payload:{}})},Mr={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(G.a.API_SERVER,"/api/attachments.json"),className:Tt.a.uploader,onChange:_r,beforeUpload:function(pt){var Lt=pt.type==="image/jpeg"||pt.type==="image/png"||pt.type==="image/jpg"||pt.type==="image/bmp";return Lt||m.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),Lt}};return t.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Et.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},t.a.createElement(o.a,{spinning:!!rn},t.a.createElement(ft.a,{className:Tt.a.formWrap,form:xt,layout:"horizontal",onValuesChange:fr,onFinish:Gt},t.a.createElement(ft.a.Item,{label:"\u59D3\u540D",name:"name",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Ur,"\u4E2A\u5B57\u7B26")},{validator:Dt.J}],extra:t.a.createElement("span",null,Vt?"\uFF08\u663E\u793A\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u60A8\u7684\u771F\u5B9E\u59D3\u540D\uFF09":"\uFF08\u9690\u85CF\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u4F60\u7684\u6635\u79F0\uFF09")},t.a.createElement(U.a,{disabled:!Vt,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Ur,"\u4E2A\u5B57\u7B26"),maxLength:Ur,addonAfter:t.a.createElement("i",{className:"iconfont ".concat(Vt?"icon-xianshi":"icon-yincang"," font18 ").concat(Tt.a.color0152d9),onClick:gr})})),t.a.createElement(ft.a.Item,{label:"\u6027\u522B\uFF1A",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},t.a.createElement(Ve.a.Group,null,t.a.createElement(Ve.a,{value:0},"\u7537"),t.a.createElement(Ve.a,{value:1},"\u5973"))),t.a.createElement(ft.a.Item,{label:"\u8BC1\u4EF6\u53F7\uFF1A",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"}]},t.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),t.a.createElement(ft.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},t.a.createElement("div",{className:Tt.a.flexRow},t.a.createElement("div",{className:"".concat(Tt.a.flexColumn," ").concat(Tt.a.example)},t.a.createElement("span",{className:Tt.a.exampleImg},t.a.createElement("img",{src:lr.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(Tt.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:Tt.a.flexColumn},t.a.createElement($r,Object(Oe.a)({},Mr,{accept:".png,.jpg,.bmp,.jpeg"}),Ft?t.a.createElement("img",{src:Ft,className:Tt.a.uploadImg}):t.a.createElement("div",{className:Tt.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(Tt.a.uploadTipIcon)})),t.a.createElement("p",{className:Tt.a.uploadTip},t.a.createElement("a",{className:Tt.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:Tt.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:Tt.a.footerWrap},t.a.createElement(ft.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:zt},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Pt["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:Tt.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u4F60\u9700\u8981\u51C6\u5907\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u6B63\u9762\uFF08\u4EBA\u50CF\u9762\uFF09\u7684\u8BC1\u4EF6\u7167\u7167\u7247\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u7247\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u8BA4\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B"),t.a.createElement("p",null,"4.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u8BC1\u4EF6\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u5B9E\u540D\u8BA4\u8BC1\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3\u542F\u667A\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u63D0\u4EA4\u5B9E\u540D\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))))},ln=Object(s.a)(function(ht){var Ze=ht.user,dt=ht.account,Et=ht.loading,Ut=ht.globalSetting;return{user:Ze,account:dt,globalSetting:Ut,loading:Et.effects}})(Br),br=k("O3gP"),Zr=k("lrIw"),qr=k("KXlV"),Pr=k.n(qr),fn=k("Sjjz"),bn=k.n(fn),Gn=U.a.TextArea,hn=function(Ze){var dt=Ze.account,Et=Ze.globalSetting,Ut=Ze.loading,Pt=Ze.dispatch,Zt=Ze.schoolName,kt=Ze.departmentName,lt=Ze.visible,mt=Ze.onClose,xt=mt===void 0?function(){}:mt,_t=Ze.onSuccess,wt=_t===void 0?function(){}:_t,yt=Object(v.a)(Ze,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),Ct=ft.a.useForm(),At=Object(g.a)(Ct,1),jt=At[0],Vt=Object(i.useRef)();Object(i.useEffect)(function(){Vt.current=yt.schoolId},[yt.schoolId]),Object(i.useEffect)(function(){jt.setFieldsValue({department:kt})},[kt]);var Xe=function(){var qt=Object(c.a)(n.a.mark(function sr(er){var Bt,Nt,$t,Ft;return n.a.wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:return Bt=er||{},Nt=Bt.department,$t=Bt.remarks,Ar.next=3,Pt({type:"account/appplyDepartment",payload:{school_id:Vt.current,name:Nt,remarks:$t}});case 3:Ft=Ar.sent,xt(),Ft&&(m.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),wt(Nt));case 6:case"end":return Ar.stop()}},sr)}));return function(er){return qt.apply(this,arguments)}}();return t.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:lt,title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(ft.a,{className:bn.a.formWrap,form:jt,labelCol:{span:4},wrapperCol:{span:20},onFinish:Xe},t.a.createElement(ft.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Zt),t.a.createElement(ft.a.Item,{label:"\u90E8\u95E8\u540D\u79F0\uFF1A",name:"department",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"}]},t.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),t.a.createElement(ft.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(Gn,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:bn.a.footerWrap},t.a.createElement(ft.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:function(){xt()}},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Ut["account/appplyDepartment"]},"\u4FDD\u5B58")))))},ca=Object(s.a)(function(ht){var Ze=ht.account,dt=ht.loading,Et=ht.globalSetting;return{account:Ze,globalSetting:Et,loading:dt.effects}})(hn),wa=k("6UJt"),mn=k("DFOY"),Yt=k("jO45"),kn=k("jN4g"),va=k("gJ3r"),Vn=k("jwmR"),Xr=k.n(Vn),Fn=function(Ze,dt){return dt.some(function(Et){return Et.label.toLowerCase().indexOf(Ze.toLowerCase())>-1})},da=U.a.TextArea,Zn=function(Ze){var dt=Ze.account,Et=Ze.globalSetting,Ut=Ze.loading,Pt=Ze.dispatch,Zt=Ze.schoolName,kt=Ze.visible,lt=Ze.onClose,mt=lt===void 0?function(){}:lt,xt=Ze.onSuccess,_t=xt===void 0?function(){}:xt,wt=Object(v.a)(Ze,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),yt=ft.a.useForm(),Ct=Object(g.a)(yt,1),At=Ct[0];Object(i.useEffect)(function(){At.setFieldsValue({name:Zt})},[Zt]);var jt=function(){var Vt=Object(c.a)(n.a.mark(function Xe(qt){var sr,er,Bt,Nt,$t,Ft,Sr;return n.a.wrap(function(Yr){for(;;)switch(Yr.prev=Yr.next){case 0:return sr=qt||{},er=sr.name,Bt=sr.city,Nt=Bt===void 0?[]:Bt,$t=sr.address,Ft=sr.remarks,Yr.next=3,Pt({type:"account/appplySchool",payload:{name:er,province:Nt[0],city:Nt[1],address:$t,remarks:Ft}});case 3:Sr=Yr.sent,mt(),Sr&&(m.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),_t(er));case 6:case"end":return Yr.stop()}},Xe)}));return function(qt){return Vt.apply(this,arguments)}}();return t.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:kt,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(ft.a,{className:Xr.a.formWrap,form:At,labelCol:{span:4},wrapperCol:{span:20},onFinish:jt},t.a.createElement(ft.a.Item,{label:"\u5355\u4F4D\u5168\u79F0\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},t.a.createElement(U.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),t.a.createElement("div",{className:"".concat(Xr.a.flexRow," ").concat(Xr.a.example)},t.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),t.a.createElement("div",{className:Xr.a.flexColumn},t.a.createElement("div",null,t.a.createElement(Yt.a,{style:{color:"rgb(82, 196, 26)"}}),t.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),t.a.createElement("div",null,t.a.createElement(kn.a,{style:{color:"red"}}),t.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),t.a.createElement(ft.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},t.a.createElement(mn.a,{allowClear:!0,size:"large",options:va.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Fn}})),t.a.createElement(ft.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},t.a.createElement(U.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),t.a.createElement(ft.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(da,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:Xr.a.footerWrap},t.a.createElement(ft.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:function(){mt()}},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Ut["account/appplySchool"]},"\u4FDD\u5B58")))))},St=Object(s.a)(function(ht){var Ze=ht.account,dt=ht.loading,Et=ht.globalSetting;return{account:Ze,globalSetting:Et,loading:dt.effects}})(Zn),ir=de.a.Option,$n=p.a.Dragger,na=function(Ze){var dt,Et,Ut=Ze.user,Pt=Ze.account,Zt=Ze.globalSetting,kt=Ze.loading,lt=Ze.dispatch,mt=Ze.Scoid,xt=Object(v.a)(Ze,["user","account","globalSetting","loading","dispatch","Scoid"]),_t=ft.a.useForm(),wt=Object(g.a)(_t,1),yt=wt[0],Ct=Object(i.useState)({}),At=Object(g.a)(Ct,2),jt=At[0],Vt=At[1],Xe=Object(i.useState)([]),qt=Object(g.a)(Xe,2),sr=qt[0],er=qt[1],Bt=Object(i.useState)([]),Nt=Object(g.a)(Bt,2),$t=Nt[0],Ft=Nt[1],Sr=Object(i.useState)([]),Ar=Object(g.a)(Sr,2),Yr=Ar[0],vn=Ar[1],Jr=Object(i.useState)([]),Kt=Object(g.a)(Jr,2),st=Kt[0],rn=Kt[1],gn=Object(i.useState)(),_r=Object(g.a)(gn,2),fr=_r[0],gr=_r[1],Gt=Object(i.useState)(),zt=Object(g.a)(Gt,2),Mr=zt[0],tr=zt[1],pt=Object(i.useState)(),Lt=Object(g.a)(pt,2),vt=Lt[0],ct=Lt[1],Xt=Object(i.useState)(),Cr=Object(g.a)(Xt,2),Vr=Cr[0],yr=Cr[1],Or=Object(i.useState)(),jr=Object(g.a)(Or,2),Rr=jr[0],Wr=jr[1];Object(i.useEffect)(function(){Hr()},[]),Object(i.useEffect)(function(){Object(c.a)(n.a.mark(function Ue(){var je;return n.a.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(mt){at.next=2;break}return at.abrupt("return");case 2:return at.next=4,wn(mt);case 4:je=at.sent,vn(je==null?void 0:je.departments);case 6:case"end":return at.stop()}},Ue)}))()},[mt]);var Hr=function(){var Ue=Object(c.a)(n.a.mark(function je(){var Ge;return n.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return bt.next=2,lt({type:"account/getSchoolOption"});case 2:Ge=bt.sent,er(Ge==null?void 0:Ge.schools);case 4:case"end":return bt.stop()}},je)}));return function(){return Ue.apply(this,arguments)}}(),wn=function(je){return lt({type:"account/getDepartmentOption",payload:{id:je}})};Object(i.useEffect)(function(){if(!Pt.basicInfo)return;var Ue=Pt.basicInfo,je={identity:Ue.identity,school:Ue.school_name,department:Ue.department_name,studentNo:Ue.student_id,jobTitle:Ue.identity=="teacher"?Ue.technical_title:"\u6559\u6388",manager:Ue.identity=="professional"?Ue.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};yt.setFieldsValue(je),Vt(je)},[Pt.basicInfo]);var De=function(){yr(!0)},Fe=function(){if(!sr.find(function(je){return je.name===jt.school})){m.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}Wr(!0)},Ke=function(je){if(Vt(Object(L.a)({},yt.getFieldsValue())),"school"in je){Ft(sr.filter(function(at){return at.name.includes(je.school)}));var Ge=(sr.find(function(at){return at.name===je.school})||{}).id;Ge?Pe(je.school):(yt.setFieldsValue({department:""}),Vt(Object(L.a)(Object(L.a)({},jt),{school:je.school,department:""})))}},Pe=function(){var Ue=Object(c.a)(n.a.mark(function je(Ge,at){var bt,Ot,Wt,vr,kr,Ir;return n.a.wrap(function(Lr){for(;;)switch(Lr.prev=Lr.next){case 0:return vr=(bt=sr.find(function(Kr){return Kr.name===Ge}))===null||bt===void 0?void 0:bt.id,Lr.next=3,wn(vr);case 3:if(Lr.t0=Lr.sent,Lr.t0){Lr.next=6;break}Lr.t0={};case 6:kr=Lr.t0,vn(kr==null?void 0:kr.departments),Ir=at||(kr==null||((Ot=kr.departments)===null||Ot===void 0||((Wt=Ot[0])===null||Wt===void 0))?void 0:Wt.name),yt.setFieldsValue({department:Ir}),Vt(Object(L.a)(Object(L.a)({},jt),{school:Ge,department:Ir}));case 11:case"end":return Lr.stop()}},je)}));return function(Ge,at){return Ue.apply(this,arguments)}}(),pe=function(){var Ue=Object(c.a)(n.a.mark(function je(Ge){return n.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return bt.next=2,Hr();case 2:yt.setFieldsValue({school:Ge,department:""}),Vt(Object(L.a)(Object(L.a)({},jt),{school:Ge,department:""}));case 4:case"end":return bt.stop()}},je)}));return function(Ge){return Ue.apply(this,arguments)}}(),Ae=function(je){if(je.file.status==="uploading"){ct(!0);return}if(je.file.status==="done"){var Ge;console.log(je.file,je.file.response),tr((Ge=je.file.response)===null||Ge===void 0?void 0:Ge.id),Object(Dt.D)(je.file.originFileObj,function(at){gr(at),ct(!1)})}},be=function(){var Ue=Object(c.a)(n.a.mark(function je(Ge){var at,bt,Ot,Wt,vr,kr,Ir,Fr,Lr,Kr,Gr,nn,Qr,En,en,wr;return n.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(vr=Ge||{},kr=vr.school,Ir=vr.department,Fr=vr.identity,Lr=vr.studentNo,Kr=vr.jobTitle,Gr=vr.manager,fr){zr.next=4;break}return m.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),zr.abrupt("return");case 4:return nn=(at=sr.find(function(an){return an.name===kr}))===null||at===void 0?void 0:at.id,Qr=(bt=Yr.find(function(an){return an.name===Ir}))===null||bt===void 0?void 0:bt.id,Fr==="student"?En=Lr:Fr==="teacher"?En=Kr:En=Gr,zr.next=9,lt({type:"account/applyProfessionalAuth",payload:{id:((Ot=Pt.basicInfo)===null||Ot===void 0?void 0:Ot.id)||((Wt=Ut.userInfo)===null||Wt===void 0?void 0:Wt.login),school_id:nn,department_id:Qr,identity:Fr,extra:En,attachment_ids:[Mr]}});case 9:en=zr.sent,Le(),en&&(m.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),lt({type:"account/getBasicInfo",payload:{login:(wr=Ut.userInfo)===null||wr===void 0?void 0:wr.login}}));case 12:case"end":return zr.stop()}},je)}));return function(Ge){return Ue.apply(this,arguments)}}(),Le=function(){lt({type:"account/setActionTabs",payload:{}})},Ne={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(G.a.API_SERVER,"/api/attachments.json"),className:Tt.a.uploader,onChange:Ae,beforeUpload:function(je){var Ge=je.type==="image/jpeg"||je.type==="image/png"||je.type==="image/jpg"||je.type==="image/bmp";return Ge||m.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),Ge}};return t.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:Tt.a.modal,visible:Pt.actionTabs.key==="Account-ProfessionalAuth",title:t.a.createElement("div",null,t.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(Tt.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},t.a.createElement(o.a,{spinning:!!vt},t.a.createElement(ft.a,{className:Tt.a.formWrap,form:yt,layout:"horizontal",onValuesChange:Ke,onFinish:be},t.a.createElement(W.a,{gutter:[10,0]},t.a.createElement(nt.a,{flex:"300px"},t.a.createElement(ft.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},t.a.createElement(de.a,null,t.a.createElement(ir,{value:"teacher"},"\u6559\u5E08"),t.a.createElement(ir,{value:"student"},"\u5B66\u751F"),t.a.createElement(ir,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),jt.identity==="student"&&t.a.createElement(nt.a,{flex:"200px"},t.a.createElement(ft.a.Item,{initialValue:jt.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},t.a.createElement(U.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),jt.identity==="teacher"&&t.a.createElement(nt.a,{flex:"200px"},t.a.createElement(ft.a.Item,{initialValue:jt.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(de.a,null,t.a.createElement(ir,{value:"\u6559\u6388"},"\u6559\u6388"),t.a.createElement(ir,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),t.a.createElement(ir,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),t.a.createElement(ir,{value:"\u52A9\u6559"},"\u52A9\u6559")))),jt.identity==="professional"&&t.a.createElement(nt.a,{flex:"200px"},t.a.createElement(ft.a.Item,{initialValue:jt.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(de.a,null,t.a.createElement(ir,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),t.a.createElement(ir,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),t.a.createElement(ir,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),t.a.createElement(ir,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),t.a.createElement(ir,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),t.a.createElement(ft.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"school",extra:jt.school&&!(sr!=null&&sr.find(function(Ue){return Ue.name===jt.school}))&&t.a.createElement("div",{className:Tt.a.schoolHintWrap},t.a.createElement("span",{className:Tt.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",jt.school,"\u201D\u7684\u9AD8\u6821\uFF0C"),t.a.createElement("span",{className:"".concat(Tt.a.color0152d9," current"),onClick:De},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u5B66\u6821/\u5355\u4F4D"}]},t.a.createElement(Zr.a,{showSearch:!0,options:$t==null?void 0:$t.map(function(Ue){return{value:Ue.name}})})),t.a.createElement(ft.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:jt.department&&!(Yr!=null&&Yr.find(function(Ue){return Ue.name===jt.department}))&&t.a.createElement("div",{className:Tt.a.schoolHintWrap},t.a.createElement("span",{className:Tt.a.colorCDCDCD},jt.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(jt.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),t.a.createElement("span",{className:"".concat(Tt.a.color0152d9," current"),onClick:Fe},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},t.a.createElement(Zr.a,{showSearch:!0,onChange:function(je){return rn(Yr.filter(function(Ge){return Ge.name.includes(je)}))},options:st==null?void 0:st.map(function(Ue){return{value:Ue.name}})})),t.a.createElement(ft.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},t.a.createElement("div",{className:Tt.a.flexRow},t.a.createElement("div",{className:"".concat(Tt.a.flexColumn," ").concat(Tt.a.example)},t.a.createElement("span",{className:Tt.a.exampleImg},t.a.createElement("img",{src:Pr.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(Tt.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:Tt.a.flexColumn},t.a.createElement($n,Object(Oe.a)({},Ne,{accept:".png,.jpg,.bmp,.jpeg"}),fr?t.a.createElement("img",{src:fr,className:Tt.a.uploadImg}):t.a.createElement("div",{className:Tt.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(Tt.a.uploadTipIcon)})),t.a.createElement("p",{className:Tt.a.uploadTip},t.a.createElement("a",{className:Tt.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:Tt.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:Tt.a.footerWrap},t.a.createElement(ft.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:Le},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:kt["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:Tt.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u6839\u636E\u804C\u4E1A\u4E0A\u4F20\u76F8\u5E94\u7684\u8BC1\u4EF6\u7167\uFF1A\u6559\u5E08\uFF08\u6559\u5E08\u8BC1\uFF09\uFF0C\u4E13\u4E1A\u4EBA\u58EB\uFF08\u5458\u5DE5\u8BC1\uFF09\u3001\u5B66\u751F\uFF08\u5B66\u751F\u8BC1\uFF09\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u5185\u5BB9\u5B8C\u6574\u5E76\u4E14\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u804C\u4E1A\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B\u804C\u4E1A\u53D8\u66F4\u8BF7\u9009\u62E9\u91CD\u65B0\u8BA4\u8BC1\uFF1B"),t.a.createElement("p",null,"4.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u5B66\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u804C\u4E1A\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3",!(Zt!=null&&(dt=Zt.setting)!==null&&dt!==void 0&&dt.is_local)&&"\u542F\u667A","\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u975E\u8001\u5E08\u8EAB\u4EFD\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u804C\u4E1A\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))),t.a.createElement(St,{visible:Vr,onClose:function(){return yr(!1)},schoolName:jt.school,onSuccess:pe}),t.a.createElement(ca,{visible:Rr,onClose:function(){return Wr(!1)},schoolId:(Et=sr.find(function(Ue){return Ue.name===jt.school}))===null||Et===void 0?void 0:Et.id,schoolName:jt.school,departmentName:jt.department,onSuccess:function(je){return Pe(jt.school,je)}}))},It=Object(s.a)(function(ht){var Ze=ht.user,dt=ht.account,Et=ht.loading,Ut=ht.globalSetting;return{user:Ze,account:dt,globalSetting:Ut,loading:Et.effects}})(na),ga=k("aCH8"),Yn=k.n(ga);function cr(ht){var Ze=ht.type,dt=ht.dispatch,Et=ht.userid,Ut=ht.isshow,Pt=ht.setPhoneshow,Zt=ht.setEmailshow,kt="79e33abd4b6588941ab7622aed1e67e8",lt=Object(i.useState)(""),mt=Object(g.a)(lt,2),xt=mt[0],_t=mt[1],wt=Object(i.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),yt=Object(g.a)(wt,2),Ct=yt[0],At=yt[1],jt=Object(i.useState)(60),Vt=Object(g.a)(jt,2),Xe=Vt[0],qt=Vt[1],sr=Object(i.useState)(!1),er=Object(g.a)(sr,2),Bt=er[0],Nt=er[1],$t=Object(i.useState)(""),Ft=Object(g.a)($t,2),Sr=Ft[0],Ar=Ft[1];function Yr(){return vn.apply(this,arguments)}function vn(){return vn=Object(c.a)(n.a.mark(function _r(){var fr;return n.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:if(xt){Gt.next=3;break}return Ze===3?m.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):m.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),Gt.abrupt("return");case 3:return Gt.next=5,dt({type:"competitions/getVerification",payload:{type:Ze,login:xt,smscode:Yn()(kt+xt)}});case 5:fr=Gt.sent,fr.status===1&&(m.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),Jr(),Nt(!0));case 7:case"end":return Gt.stop()}},_r)})),vn.apply(this,arguments)}function Jr(){qt(60);var _r=setInterval(function(){--Xe,Xe>-1?qt(Xe):(clearInterval(_r),Nt(!1))},1e3)}function Kt(){return st.apply(this,arguments)}function st(){return st=Object(c.a)(n.a.mark(function _r(){var fr;return n.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return Gt.next=2,dt({type:"competitions/PhoneBind",payload:{userid:Et,code:Sr,phone:xt}});case 2:fr=Gt.sent,fr.status===0&&(m.b.info("\u7ED1\u5B9A\u6210\u529F"),Pt("none"));case 4:case"end":return Gt.stop()}},_r)})),st.apply(this,arguments)}function rn(){return gn.apply(this,arguments)}function gn(){return gn=Object(c.a)(n.a.mark(function _r(){var fr;return n.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return Gt.next=2,dt({type:"competitions/EmailBind",payload:{userid:Et,code:Sr,email:xt}});case 2:fr=Gt.sent,fr.status===0&&(m.b.info("\u7ED1\u5B9A\u6210\u529F"),Zt("none"));case 4:case"end":return Gt.stop()}},_r)})),gn.apply(this,arguments)}return t.a.createElement("div",{style:{display:Ut}},t.a.createElement("p",null,t.a.createElement(U.a,{value:xt,onChange:function(fr){return _t(fr.target.value)},placeholder:Ze===3?"\u8BF7\u8F93\u5165\u624B\u673A\u53F7":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740",style:{width:"370px"}})),t.a.createElement("span",null,t.a.createElement(U.a,{value:Sr,onChange:function(fr){return Ar(fr.target.value)},placeholder:Ze===3?"\u8BF7\u8F93\u5165\u624B\u673A\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801",style:{width:"250px"}}))," ",t.a.createElement(w.a,{disabled:Bt,onClick:function(){return Yr()},type:"primary",style:{marginLeft:"20px",width:"100px"}},Bt?"\u91CD\u65B0\u53D1\u9001".concat(Xe,"s"):Ct),t.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},t.a.createElement(w.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!Sr){m.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}Ze===3?Kt():rn()}},"\u786E\u8BA4"),t.a.createElement(w.a,{style:{marginLeft:"20px"},onClick:function(){Ze===3?Pt("none"):Zt("none")}},"\u53D6\u6D88")))}var Mn=cr;function Wn(ht){var Ze=ht.dispatch,dt=ht.userid,Et={wrapperCol:{offset:3,span:21}},Ut=ft.a.useForm(),Pt=Object(g.a)(Ut,1),Zt=Pt[0],kt=Object(S.i)(),lt=kt.identifier;return t.a.createElement("div",{style:{width:"500px"}},t.a.createElement(ft.a,{form:Zt,name:"basic"},t.a.createElement(ft.a.Item,Object(Oe.a)({},Et,{label:t.a.createElement("div",{style:{width:"30px"}},"\u5F00\u6237\u884C"),name:"bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}]}),t.a.createElement(U.a,null)),t.a.createElement(ft.a.Item,Object(Oe.a)({},Et,{label:t.a.createElement("div",{style:{width:"30px"}},"\u652F\u884C"),name:"second_bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u652F\u884C"}]}),t.a.createElement(U.a,null)),t.a.createElement(ft.a.Item,Object(Oe.a)({},Et,{label:t.a.createElement("div",{style:{width:"30px"}},"\u8D26\u53F7"),name:"card_no",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7"}]}),t.a.createElement(U.a,null)),t.a.createElement(ft.a.Item,null,t.a.createElement(w.a,{type:"primary",htmlType:"submit",onClick:Object(c.a)(n.a.mark(function mt(){return n.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:Zt.validateFields().then(function(){var wt=Object(c.a)(n.a.mark(function yt(Ct){var At;return n.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.next=2,Ze({type:"competitions/setleader",payload:Object(L.a)({identifier:lt,user_id:dt},Ct)});case 2:At=Vt.sent,At.status===0&&m.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return Vt.stop()}},yt)}));return function(yt){return wt.apply(this,arguments)}}());case 1:case"end":return _t.stop()}},mt)}))},"\u63D0\u4EA4"))))}var Jn=Wn,Nn={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function fa(ht){var Ze,dt,Et,Ut,Pt,Zt,kt,lt,mt=ht.Prize,xt=ht.Accounts,_t=ht.dispatch,wt=ht.userid,yt=Object(i.useState)("none"),Ct=Object(g.a)(yt,2),At=Ct[0],jt=Ct[1],Vt=Object(i.useState)("none"),Xe=Object(g.a)(Vt,2),qt=Xe[0],sr=Xe[1];function er(Nt){return Bt.apply(this,arguments)}function Bt(){return Bt=Object(c.a)(n.a.mark(function Nt($t){var Ft;return n.a.wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:if(!($t==="1")){Ar.next=6;break}return Ar.next=3,_t({type:"competitions/Authentication"});case 3:Ft=Ar.sent,Ar.next=9;break;case 6:return Ar.next=8,_t({type:"competitions/Professional"});case 8:Ft=Ar.sent;case 9:Ft.status===0&&m.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return Ar.stop()}},Nt)})),Bt.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u5B9E\u540D\u4FE1\u606F"),(xt==null?void 0:xt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(xt==null?void 0:xt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){_t({type:"account/setActionTabs",payload:{key:"Account-RealNameAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u59D3\u540D\uFF1A",t.a.createElement("span",null,xt==null?void 0:xt.name),(xt==null?void 0:xt.authentication)==="uncertified"?null:(xt==null?void 0:xt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(w.a,{type:"primary",onClick:function(){return er("1")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," \u5DF2\u8BA4\u8BC1")),t.a.createElement("p",null,"\u6027\u522B\uFF1A",t.a.createElement("span",null,(xt==null?void 0:xt.gender)===0?"\u7537":"\u5973"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u804C\u4E1A\u4FE1\u606F"),(xt==null?void 0:xt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(xt==null?void 0:xt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){_t({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u804C\u4E1A\uFF1A",t.a.createElement("span",null,xt&&xt.identity&&Nn[xt.identity]),(xt==null?void 0:xt.authentication)==="uncertified"?null:(xt==null?void 0:xt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(w.a,{type:"primary",onClick:function(){return er("2")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),t.a.createElement("span",null,"\u5DF2\u8BA4\u8BC1"),t.a.createElement(w.a,{type:"primary",onClick:function(){_t({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"\u91CD\u65B0\u8BA4\u8BC1"))),t.a.createElement("p",null,"\u5B66\u53F7\uFF1A",t.a.createElement("span",null,(xt==null?void 0:xt.student_id)||"--")),t.a.createElement("p",null,"\u5B66\u6821\uFF1A",t.a.createElement("span",null,(xt==null?void 0:xt.school_name)||"--")),t.a.createElement("p",null,"\u9662\u7CFB\uFF1A",t.a.createElement("span",null,(xt==null?void 0:xt.department_name)||"--"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u8054\u7CFB\u65B9\u5F0F")),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u624B\u673A\u53F7\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(xt==null?void 0:xt.phone)||"--"),At==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){jt("block")}},"\u66F4\u6362"):null),t.a.createElement(Mn,{type:3,dispatch:_t,userid:xt==null?void 0:xt.id,isshow:At,setPhoneshow:jt,setEmailshow:sr}),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(xt==null?void 0:xt.mail)||"--"),qt==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){sr("block")}},"\u66F4\u6362"):null),t.a.createElement(Mn,{type:4,dispatch:_t,userid:xt==null?void 0:xt.id,isshow:qt,setEmailshow:sr,setPhoneshow:jt})),mt!=null&&mt.leader&&mt!==null&&mt!==void 0&&mt.teams&&mt!==null&&mt!==void 0&&(Ze=mt.teams[0])!==null&&Ze!==void 0&&(dt=Ze.bank_account)!==null&&dt!==void 0&&dt.bank?t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")):t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")),t.a.createElement(Jn,{dispatch:_t,userid:wt})),mt!=null&&mt.leader?t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u5F00\u6237\u884C\uFF1A"),t.a.createElement("span",null,(mt==null?void 0:mt.teams)&&(mt==null||((Et=mt.teams[0])===null||Et===void 0||((Ut=Et.bank_account)===null||Ut===void 0))?void 0:Ut.bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u652F\u884C\uFF1A"),t.a.createElement("span",null,(mt==null?void 0:mt.teams)&&(mt==null||((Pt=mt.teams[0])===null||Pt===void 0||((Zt=Pt.bank_account)===null||Zt===void 0))?void 0:Zt.second_bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u8D26\u53F7\uFF1A"),t.a.createElement("span",null,(mt==null?void 0:mt.teams)&&(mt==null||((kt=mt.teams[0])===null||kt===void 0||((lt=kt.bank_account)===null||lt===void 0))?void 0:lt.card_no)||"--"))):null,t.a.createElement(It,{Scoid:xt==null?void 0:xt.school_id}),t.a.createElement(ln,null))}var Er=fa,ot=ue.a.TabPane;function ar(ht){var Ze=ht.Prize,dt=ht.Accounts,Et=ht.getAccounts,Ut=ht.dispatch,Pt=ht.userid;return t.a.createElement("div",{className:"fr"},t.a.createElement("div",{className:"mb100 "},t.a.createElement(ue.a,{defaultActiveKey:"1",onChange:function(kt){kt==="2"&&Et()}},t.a.createElement(ot,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},t.a.createElement(Ee,{Prize:Ze})),t.a.createElement(ot,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},t.a.createElement(Er,{userid:Pt,dispatch:Ut,Prize:Ze,Accounts:dt})))))}var xr=ar,on=k("xKgJ"),un=k("wd/R"),_n=k.n(un),Tn=ue.a.TabPane;function Sn(ht){var Ze,dt,Et,Ut,Pt,Zt,kt=ht.ChartRules,lt=ht.ItemData,mt=ht.getCharts,xt=ht.Selectkey,_t=ht.HeaderDetail,wt=ht.getChartRules,yt=ht.userinfo,Ct=ht.Editable,At=ht.dispatch,jt=ht.StaffDetail,Vt=ht.qs,Xe=Object(i.useState)(!1),qt=Object(g.a)(Xe,2),sr=qt[0],er=qt[1],Bt=Object(i.useState)(""),Nt=Object(g.a)(Bt,2),$t=Nt[0],Ft=Nt[1],Sr=Object(i.useState)(!0),Ar=Object(g.a)(Sr,2),Yr=Ar[0],vn=Ar[1],Jr=Object(i.useState)(),Kt=Object(g.a)(Jr,2),st=Kt[0],rn=Kt[1],gn=Object(i.useState)(),_r=Object(g.a)(gn,2),fr=_r[0],gr=_r[1],Gt=Object(S.i)(),zt=Gt.identifier;Object(i.useEffect)(function(){if(Yr){var Lt,vt,ct,Xt,Cr=kt==null||((Lt=kt.stages)===null||Lt===void 0)?void 0:Lt[0];rn(Cr);var Vr=kt==null||((vt=kt.stages)===null||vt===void 0||((ct=vt[0])===null||ct===void 0||((Xt=ct.children)===null||Xt===void 0)))?void 0:Xt[0];if(gr(Vr),Cr!=null&&Cr.id){var yr,Or,jr;mt(Cr==null?void 0:Cr.id),Ft(((yr=kt.rule_contents)===null||yr===void 0||((Or=yr.filter(function(wn){return parseInt(wn.competition_stage_id)===parseInt(Cr==null?void 0:Cr.id)}))===null||Or===void 0||((jr=Or[0])===null||jr===void 0))?void 0:jr.content)||"")}else{var Rr,Wr,Hr;mt(0),Ft(((Rr=kt.rule_contents)===null||Rr===void 0||((Wr=Rr.filter(function(wn){return parseInt(wn.competition_stage_id)===0}))===null||Wr===void 0||((Hr=Wr[0])===null||Hr===void 0))?void 0:Hr.content)||"")}}},[kt]);function Mr(){return tr.apply(this,arguments)}function tr(){return tr=Object(c.a)(n.a.mark(function Lt(){var vt,ct,Xt,Cr,Vr,yr,Or,jr,Rr;return n.a.wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:if($t){Hr.next=3;break}return m.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Hr.abrupt("return");case 3:if(vn(!1),vt=st==null?void 0:st.id,!vt){Hr.next=12;break}return Hr.next=8,Object(q.a)("/api/competitions/".concat(zt,"/update_md_content.json"),{method:"post",body:{competition_module_id:xt,content:$t,md_content_id:(ct=kt.rule_contents)===null||ct===void 0||((Xt=ct.filter(function(wn){return parseInt(wn.competition_stage_id)===parseInt(vt)}))===null||Xt===void 0||((Cr=Xt[0])===null||Cr===void 0))?void 0:Cr.id,stage_id:st==null?void 0:st.id}});case 8:Vr=Hr.sent,Vr.status===0&&(m.b.info("\u66F4\u65B0\u6210\u529F"),er(!1),wt()),Hr.next=16;break;case 12:return Hr.next=14,Object(q.a)("/api/competitions/".concat(zt,"/update_md_content.json"),{method:"post",body:{competition_module_id:xt,content:$t,md_content_id:(yr=kt.rule_contents)===null||yr===void 0||((Or=yr.filter(function(wn){return parseInt(wn.competition_stage_id)===0}))===null||Or===void 0||((jr=Or[0])===null||jr===void 0))?void 0:jr.id,stage_id:st==null?void 0:st.id}});case 14:Rr=Hr.sent,Rr.status===0&&(m.b.info("\u66F4\u65B0\u6210\u529F"),er(!1),wt());case 16:case"end":return Hr.stop()}},Lt)})),tr.apply(this,arguments)}var pt=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(vt,ct,Xt){return t.a.createElement("span",null,vt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(vt){return t.a.createElement(Ye.a,{title:vt},t.a.createElement("span",{title:vt},vt&&(vt==null?void 0:vt.length)>=10?(vt==null?void 0:vt.substr(0,10))+"...":vt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(vt){return t.a.createElement("span",{title:vt},vt&&(vt==null?void 0:vt.length)>=6?(vt==null?void 0:vt.substr(0,6))+"...":vt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(vt){return t.a.createElement("span",null,vt===1?"\u8BA1\u7B97\u4E2D":vt===2?"\u5B8C\u6210":vt===0?"\u5F85\u8BA1\u7B97":vt===3&&"\u9519\u8BEF")}},!(st!=null&&st.display_four_indicators)&&(st==null?void 0:st.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(vt){return t.a.createElement("span",null,vt||"--")}},!(st!=null&&st.display_four_indicators)&&(st==null?void 0:st.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(vt){return(vt==null?void 0:vt.length)>0?vt==null?void 0:vt.map(function(ct,Xt){return t.a.createElement("span",null,ct==null?void 0:ct.name,"\uFF1A",ct==null?void 0:ct.value," ",t.a.createElement("br",null))}):t.a.createElement("span",null,"--")}},(st==null?void 0:st.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(vt){return t.a.createElement("span",null,vt||"--")}},(st==null?void 0:st.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(vt){var ct;return t.a.createElement("span",null,(vt==null||((ct=vt.find(function(Xt){return(Xt==null?void 0:Xt.name)==="score"}))===null||ct===void 0)?void 0:ct.value)||"--")}},(st==null?void 0:st.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(vt){var ct;return t.a.createElement("span",null,(vt==null||((ct=vt.find(function(Xt){return(Xt==null?void 0:Xt.name)==="fid"}))===null||ct===void 0)?void 0:ct.value)||"--")}},(st==null?void 0:st.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(vt){var ct;return t.a.createElement("span",null,(vt==null||((ct=vt.find(function(Xt){return(Xt==null?void 0:Xt.name)==="total_score"}))===null||ct===void 0)?void 0:ct.value)||"--")}},!(st!=null&&st.display_four_indicators)&&(st==null?void 0:st.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Car",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(vt){return t.a.createElement("span",null,vt||"--")}},!(st!=null&&st.display_four_indicators)&&(st==null?void 0:st.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Coffee",dataIndex:"data_other",key:"data_other",align:"center",render:function(vt){var ct;return t.a.createElement("span",null,(vt==null||((ct=vt.find(function(Xt){return(Xt==null?void 0:Xt.name)==="Coffee"}))===null||ct===void 0)?void 0:ct.value)||"--")}},!(st!=null&&st.display_four_indicators)&&(st==null?void 0:st.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Easyship",dataIndex:"data_other",key:"data_other",align:"center",render:function(vt){var ct;return t.a.createElement("span",null,(vt==null||((ct=vt.find(function(Xt){return(Xt==null?void 0:Xt.name)==="Easyship"}))===null||ct===void 0)?void 0:ct.value)||"--")}},!(st!=null&&st.display_four_indicators)&&(st==null?void 0:st.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scar",dataIndex:"data_other",key:"data_other",align:"center",render:function(vt){var ct;return t.a.createElement("span",null,(vt==null||((ct=vt.find(function(Xt){return(Xt==null?void 0:Xt.name)==="Scar"}))===null||ct===void 0)?void 0:ct.value)||"--")}},!(st!=null&&st.display_four_indicators)&&(st==null?void 0:st.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scarf",dataIndex:"data_other",key:"data_other",align:"center",render:function(vt){var ct;return t.a.createElement("span",null,(vt==null||((ct=vt.find(function(Xt){return(Xt==null?void 0:Xt.name)==="Scarf"}))===null||ct===void 0)?void 0:ct.value)||"--")}},!(st!=null&&st.display_four_indicators)&&(st==null?void 0:st.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"center",render:function(vt){var ct;return t.a.createElement("span",null,(vt==null||((ct=vt.find(function(Xt){return(Xt==null?void 0:Xt.name)==="Total"}))===null||ct===void 0)?void 0:ct.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(vt){return t.a.createElement("a",{href:vt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(Lt){return!!Lt});return t.a.createElement("div",null,(kt==null||((Ze=kt.stages)===null||Ze===void 0)?void 0:Ze.length)>0?null:t.a.createElement(He,null),(kt==null||((dt=kt.stages)===null||dt===void 0)?void 0:dt.length)>0&&t.a.createElement(ue.a,{animated:!0,tabBarExtraContent:yt!=null&&yt.admin||yt!=null&&yt.business||Ct?t.a.createElement(w.a,{onClick:function(){er(!0)}},Vt.\u7F16\u8F91):jt.enrolled&&(st==null?void 0:st.start_time)&&(st==null?void 0:st.end_time)&&t.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",_n()(st==null?void 0:st.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",_n()(st==null?void 0:st.end_time).format("YYYY-MM-DD HH:mm:ss"),t.a.createElement(w.a,{style:{marginLeft:"20px"},disabled:_n()(st==null?void 0:st.start_time).unix()>_n()(_n()().format("YYYY-MM-DD HH:mm:s")).unix()||_n()(_n()().format("YYYY-MM-DD HH:mm:s")).unix()>_n()(st==null?void 0:st.end_time).unix(),onClick:function(){At({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(fr==null?void 0:fr.id)||(st==null?void 0:st.id),id:_t==null?void 0:_t.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(vt){var ct,Xt,Cr,Vr,yr;er(!1);var Or=kt==null||((ct=kt.stages)===null||ct===void 0)?void 0:ct.filter(function(Rr){return parseInt(vt)===parseInt(Rr==null?void 0:Rr.id)})[0],jr=Or==null||((Xt=Or.children)===null||Xt===void 0)?void 0:Xt[0];gr(jr),rn(Or),Ft(((Cr=kt.rule_contents)===null||Cr===void 0||((Vr=Cr.filter(function(Rr){return parseInt(Rr.competition_stage_id)===parseInt(Or==null?void 0:Or.id)}))===null||Vr===void 0||((yr=Vr[0])===null||yr===void 0))?void 0:yr.content)||""),mt((jr==null?void 0:jr.id)||vt)}},kt&&kt.stages.map(function(Lt,vt){return t.a.createElement(Tn,{tab:Lt.name,key:Lt.id===null?0:Lt.id},sr===!1&&kt&&kt.rule_contents.map(function(ct,Xt){if(Lt.id===ct.competition_stage_id)return t.a.createElement(B.a,{key:Xt,value:ct.content===void 0||ct.content===null?"":ct.content});if(Lt.id===null&&ct.competition_stage_id===0)return t.a.createElement(B.a,{key:Xt,value:ct.content===void 0||ct.content===null?"":ct.content})}))})),(st==null||((Et=st.children)===null||Et===void 0)?void 0:Et.length)>0&&t.a.createElement(ue.a,{activeKey:(fr==null?void 0:fr.id)+"",onChange:function(vt){var ct,Xt=st==null||((ct=st.children)===null||ct===void 0)?void 0:ct.filter(function(Cr){return parseInt(vt)===parseInt(Cr==null?void 0:Cr.id)})[0];gr(Xt),mt(vt)}},st==null||((Ut=st.children)===null||Ut===void 0)?void 0:Ut.map(function(Lt,vt){return t.a.createElement(Tn,{tab:Lt.name,key:Lt.id===null?0:Lt.id})})),sr&&t.a.createElement("div",null,t.a.createElement(Z.a,{defaultValue:$t,onChange:function(vt){Ft(vt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return Mr()}},"\u63D0\u4EA4"),t.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return er(!1)}},"\u53D6\u6D88"))),((Pt=_t.competition_modules.filter(function(Lt){return Lt.id===xt}))===null||Pt===void 0||((Zt=Pt[0])===null||Zt===void 0)?void 0:Zt.show_leaderboard)&&t.a.createElement(J.a,{dataSource:lt==null?void 0:lt.results,columns:pt}))}var ya=Sn,Ta=k("DjyN"),Sa=k("NUBc"),qn=ue.a.TabPane;function vi(ht){var Ze,dt,Et,Ut,Pt,Zt,kt=ht.loading,lt=ht.ChartRules,mt=ht.ItemData,xt=ht.getCharts,_t=ht.Selectkey,wt=ht.HeaderDetail,yt=ht.getChartRules,Ct=ht.userinfo,At=ht.Editable,jt=ht.dispatch,Vt=ht.StaffDetail,Xe=Object(i.useState)(!1),qt=Object(g.a)(Xe,2),sr=qt[0],er=qt[1],Bt=Object(i.useState)(""),Nt=Object(g.a)(Bt,2),$t=Nt[0],Ft=Nt[1],Sr=Object(i.useState)(!0),Ar=Object(g.a)(Sr,2),Yr=Ar[0],vn=Ar[1],Jr=Object(i.useState)(),Kt=Object(g.a)(Jr,2),st=Kt[0],rn=Kt[1],gn=Object(i.useState)(),_r=Object(g.a)(gn,2),fr=_r[0],gr=_r[1],Gt=Object(S.i)(),zt=Gt.identifier,Mr=Object(i.useState)({page:1,limit:10,sort:"desc"}),tr=Object(g.a)(Mr,2),pt=tr[0],Lt=tr[1];Object(i.useEffect)(function(){var ct;Yr&<!==null&<!==void 0&&(ct=lt.stages)!==null&&ct!==void 0&&ct[0]&&vt()},[lt==null||((Ze=lt.stages)===null||Ze===void 0)?void 0:Ze[0]]);var vt=function(){var ct=Object(c.a)(n.a.mark(function Xt(){var Cr,Vr,yr,Or,jr,Rr;return n.a.wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:return jr=lt==null||((Cr=lt.stages)===null||Cr===void 0)?void 0:Cr[0],rn(jr),Rr=lt==null||((Vr=lt.stages)===null||Vr===void 0||((yr=Vr[0])===null||yr===void 0||((Or=yr.children)===null||Or===void 0)))?void 0:Or[0],gr(Rr),pt.id=(Rr==null?void 0:Rr.id)||(jr==null?void 0:jr.id),Lt(Object(L.a)({},pt)),Hr.next=7,xt(Object(L.a)(Object(L.a)({},pt),{},{stage_id:pt.id}));case 7:case"end":return Hr.stop()}},Xt)}));return function(){return ct.apply(this,arguments)}}();return t.a.createElement("div",null,(lt==null||((dt=lt.stages)===null||dt===void 0)?void 0:dt.length)>0?null:t.a.createElement(He,null),(lt==null||((Et=lt.stages)===null||Et===void 0)?void 0:Et.length)>0&&t.a.createElement(ue.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var ct=Object(c.a)(n.a.mark(function Xt(Cr){var Vr,yr,Or,jr,Rr,Wr,Hr;return n.a.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return er(!1),Wr=lt==null||((Vr=lt.stages)===null||Vr===void 0)?void 0:Vr.filter(function(Fe){return parseInt(Cr)===parseInt(Fe==null?void 0:Fe.id)})[0],Hr=Wr==null||((yr=Wr.children)===null||yr===void 0)?void 0:yr[0],gr(Hr),rn(Wr),Ft(((Or=lt.rule_contents)===null||Or===void 0||((jr=Or.filter(function(Fe){return parseInt(Fe.competition_stage_id)===parseInt(Wr==null?void 0:Wr.id)}))===null||jr===void 0||((Rr=jr[0])===null||Rr===void 0))?void 0:Rr.content)||""),pt.page=1,pt.limit=10,pt.id=(Hr==null?void 0:Hr.id)||Cr,Lt(Object(L.a)({},pt)),De.next=9,xt(Object(L.a)({},pt));case 9:case"end":return De.stop()}},Xt)}));return function(Xt){return ct.apply(this,arguments)}}()},lt&<.stages.map(function(ct,Xt){return t.a.createElement(qn,{tab:ct.name,key:ct.id===null?0:ct.id})})),(st==null||((Ut=st.children)===null||Ut===void 0)?void 0:Ut.length)>0&&t.a.createElement(ue.a,{activeKey:(fr==null?void 0:fr.id)+"",onChange:function(){var ct=Object(c.a)(n.a.mark(function Xt(Cr){var Vr,yr;return n.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:return yr=st==null||((Vr=st.children)===null||Vr===void 0)?void 0:Vr.filter(function(Rr){return parseInt(Cr)===parseInt(Rr==null?void 0:Rr.id)})[0],gr(yr),pt.page=1,pt.limit=10,pt.id=Cr,Lt(Object(L.a)({},pt)),jr.next=5,xt(Object(L.a)({},pt));case 5:case"end":return jr.stop()}},Xt)}));return function(Xt){return ct.apply(this,arguments)}}()},st==null||((Pt=st.children)===null||Pt===void 0)?void 0:Pt.map(function(ct,Xt){return t.a.createElement(qn,{tab:ct.name,key:ct.id===null?0:ct.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){pt.page=1,pt.sort=pt.sort==="desc"?"asc":"desc",Lt(Object(L.a)({},pt)),xt(Object(L.a)({},pt))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",pt.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F ",t.a.createElement("i",{className:"iconfont font14 ".concat(pt.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",t.a.createElement(U.a.Search,{onSearch:function(Xt){pt.page=1,pt.search=Xt,Lt(Object(L.a)({},pt)),xt(Object(L.a)({},pt))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),t.a.createElement(o.a,{spinning:kt},mt==null||((Zt=mt.results)===null||Zt===void 0)?void 0:Zt.map(function(ct,Xt){return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:Xt===0?14:30}},t.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},t.a.createElement("img",{src:G.a.IMG_SERVER+"/images/"+(ct==null?void 0:ct.image_url),style:{width:40,height:40,borderRadius:"50%"}}),t.a.createElement("div",{style:{marginLeft:10}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},ct==null?void 0:ct.user_name),t.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"\u6240\u5C5E\u6218\u961F",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(ct==null?void 0:ct.team_name)||"- -")),t.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"\u5B66\u6821 ",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(ct==null?void 0:ct.school_name)||"- -")))),t.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},t.a.createElement("div",null,t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u63D0\u4EA4\u65F6\u95F4\uFF1A",ct==null?void 0:ct.created_at),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(ct==null?void 0:ct.ts_mem)||"- -","MB"),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(ct==null?void 0:ct.ts_time)||"- -","\u79D2")),t.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(ct==null?void 0:ct.game_identifier),target:"_blank"},t.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),t.a.createElement("span",{style:{lineHeight:"14px"}},"\u67E5\u770B\u4EE3\u7801"))))})),t.a.createElement(Sa.a,{total:mt==null?void 0:mt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:pt.page,onChange:function(Xt,Cr){pt.page=Xt,Lt(Object(L.a)({},pt)),xt(Object(L.a)({},pt))}})))}var gi=vi,Ka=function(Ze){var dt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],Et=["","\u5341","\u767E","\u5343","\u4E07"];Ze=parseInt(Ze);var Ut=function(lt){for(var mt=lt.toString().split("").reverse(),xt="",_t=0;_t<mt.length;_t++)xt=(_t==0&&mt[_t]==0||_t>0&&mt[_t]==0&&mt[_t-1]==0?"":dt[mt[_t]]+(mt[_t]==0?Et[0]:Et[_t]))+xt;return xt},Pt=Math.floor(Ze/1e4),Zt=Ze%1e4;return Zt.toString().length<4&&(Zt="0"+Zt),Pt?Ut(Pt)+"\u4E07"+Ut(Zt):Ut(Ze)};function Ma(ht){var Ze,dt=ht.item,Et=ht.index,Ut=ht.StaffDetail,Pt=Object(i.useState)(!0),Zt=Object(g.a)(Pt,2),kt=Zt[0],lt=Zt[1],mt=Object(i.useState)(!0),xt=Object(g.a)(mt,2),_t=xt[0],wt=xt[1],yt=Object(i.useRef)();return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},t.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},t.a.createElement("img",{src:G.a.IMG_SERVER+"/"+(dt==null?void 0:dt.pic),style:{width:220,height:130,borderRadius:"4px"}}),t.a.createElement("div",{style:{marginLeft:20,width:"75%"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"\u4EFB\u52A1",Ka(Et+1),"\uFF1A",t.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},dt==null?void 0:dt.name)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},dt==null?void 0:dt.challenges_count)," ")),t.a.createElement("div",{ref:yt},t.a.createElement(B.a,{style:{maxHeight:kt&&100},value:dt==null?void 0:dt.description})),t.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){lt(!kt)}},kt?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",t.a.createElement("i",{className:"iconfont font14 ".concat(kt?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),t.a.createElement("div",{style:{marginTop:14,maxHeight:_t&&58,overflow:"hidden"}},dt==null||((Ze=dt.challenges)===null||Ze===void 0)?void 0:Ze.map(function(Ct,At){return t.a.createElement("div",{style:{marginTop:At===0?0:12}},t.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),t.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",At+1,"\u5173",Ct==null?void 0:Ct.name))})),t.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},t.a.createElement("span",{onClick:function(){wt(!_t)}},_t?"\u5C55\u5F00":"\u6536\u8D77"," ",t.a.createElement("i",{className:"iconfont font14 ".concat(_t?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Ut==null?void 0:Ut.enrolled)&&t.a.createElement(w.a,{onClick:function(){window.open("/shixuns/".concat(dt==null?void 0:dt.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var wi=Ma,ui=ue.a.TabPane;function Ti(ht){var Ze,dt,Et,Ut,Pt,Zt,kt=ht.loading,lt=ht.ChartRules,mt=ht.ItemData,xt=ht.getCharts,_t=ht.Selectkey,wt=ht.HeaderDetail,yt=ht.getChartRules,Ct=ht.userinfo,At=ht.Editable,jt=ht.dispatch,Vt=ht.StaffDetail,Xe=Object(i.useState)(!1),qt=Object(g.a)(Xe,2),sr=qt[0],er=qt[1],Bt=Object(i.useState)(""),Nt=Object(g.a)(Bt,2),$t=Nt[0],Ft=Nt[1],Sr=Object(i.useState)(!0),Ar=Object(g.a)(Sr,2),Yr=Ar[0],vn=Ar[1],Jr=Object(i.useState)(),Kt=Object(g.a)(Jr,2),st=Kt[0],rn=Kt[1],gn=Object(i.useState)(),_r=Object(g.a)(gn,2),fr=_r[0],gr=_r[1],Gt=Object(S.i)(),zt=Gt.identifier,Mr=Object(i.useState)({page:1,limit:10}),tr=Object(g.a)(Mr,2),pt=tr[0],Lt=tr[1];console.log("loading",kt);var vt=Object(i.useState)(),ct=Object(g.a)(vt,2),Xt=ct[0],Cr=ct[1];Object(i.useEffect)(function(){var yr;Yr&<!==null&<!==void 0&&(yr=lt.stages)!==null&&yr!==void 0&&yr[0]&&Vr()},[lt==null||((Ze=lt.stages)===null||Ze===void 0)?void 0:Ze[0]]);var Vr=function(){var yr=Object(c.a)(n.a.mark(function Or(){var jr,Rr,Wr,Hr,wn,De;return n.a.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return wn=lt==null||((jr=lt.stages)===null||jr===void 0)?void 0:jr[0],rn(wn),De=lt==null||((Rr=lt.stages)===null||Rr===void 0||((Wr=Rr[0])===null||Wr===void 0||((Hr=Wr.children)===null||Hr===void 0)))?void 0:Hr[0],gr(De),pt.id=(De==null?void 0:De.id)||(wn==null?void 0:wn.id),Lt(Object(L.a)({},pt)),Ke.next=7,xt(Object(L.a)(Object(L.a)({},pt),{},{stage_id:pt.id}));case 7:case"end":return Ke.stop()}},Or)}));return function(){return yr.apply(this,arguments)}}();return t.a.createElement("div",null,(lt==null||((dt=lt.stages)===null||dt===void 0)?void 0:dt.length)>0?null:t.a.createElement(He,null),(lt==null||((Et=lt.stages)===null||Et===void 0)?void 0:Et.length)>0&&t.a.createElement(ue.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var yr=Object(c.a)(n.a.mark(function Or(jr){var Rr,Wr,Hr,wn,De,Fe,Ke;return n.a.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return er(!1),Fe=lt==null||((Rr=lt.stages)===null||Rr===void 0)?void 0:Rr.filter(function(Ae){return parseInt(jr)===parseInt(Ae==null?void 0:Ae.id)})[0],Ke=Fe==null||((Wr=Fe.children)===null||Wr===void 0)?void 0:Wr[0],gr(Ke),rn(Fe),Ft(((Hr=lt.rule_contents)===null||Hr===void 0||((wn=Hr.filter(function(Ae){return parseInt(Ae.competition_stage_id)===parseInt(Fe==null?void 0:Fe.id)}))===null||wn===void 0||((De=wn[0])===null||De===void 0))?void 0:De.content)||""),pt.page=1,pt.limit=10,pt.id=(Ke==null?void 0:Ke.id)||jr,Lt(Object(L.a)({},pt)),pe.next=9,xt(Object(L.a)({},pt));case 9:case"end":return pe.stop()}},Or)}));return function(Or){return yr.apply(this,arguments)}}()},lt&<.stages.map(function(yr,Or){return t.a.createElement(ui,{tab:yr.name,key:yr.id===null?0:yr.id})})),(st==null||((Ut=st.children)===null||Ut===void 0)?void 0:Ut.length)>0&&t.a.createElement(ue.a,{activeKey:(fr==null?void 0:fr.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var yr=Object(c.a)(n.a.mark(function Or(jr){var Rr,Wr;return n.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:return Wr=st==null||((Rr=st.children)===null||Rr===void 0)?void 0:Rr.filter(function(De){return parseInt(jr)===parseInt(De==null?void 0:De.id)})[0],gr(Wr),pt.page=1,pt.limit=10,pt.id=jr,Lt(Object(L.a)({},pt)),wn.next=5,xt(Object(L.a)({},pt));case 5:case"end":return wn.stop()}},Or)}));return function(Or){return yr.apply(this,arguments)}}()},st==null||((Pt=st.children)===null||Pt===void 0)?void 0:Pt.map(function(yr,Or){return t.a.createElement(ui,{tab:yr.name,key:yr.id===null?0:yr.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#9096A3"}},"\u4F5C\u54C1\u63D0\u4EA4\u65F6\u95F4",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},mt==null?void 0:mt.start_time,"~",mt==null?void 0:mt.end_time)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(mt==null?void 0:mt.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),t.a.createElement(o.a,{spinning:kt},mt==null||((Zt=mt.results)===null||Zt===void 0)?void 0:Zt.map(function(yr,Or){return t.a.createElement(wi,{StaffDetail:Vt,item:yr,index:Or})})),t.a.createElement(Sa.a,{total:mt==null?void 0:mt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:pt.page,onChange:function(Or,jr){pt.page=Or,Lt(Object(L.a)({},pt)),xt(Object(L.a)({},pt))}})))}var ci=Ti,za=k("UfjD"),Ca=k("qHvr"),Qa=function(Ze){var dt,Et,Ut,Pt,Zt,kt,lt,mt,xt=Ze.globalSetting,_t=Ze.loading,wt=Ze.dispatch,yt=Ze.user,Ct=Ze.competitions,At=Object(v.a)(Ze,["globalSetting","loading","dispatch","user","competitions"]),jt=Object(i.useState)({avatar_url:""}),Vt=Object(g.a)(jt,2),Xe=Vt[0],qt=Vt[1],sr=Object(i.useState)([]),er=Object(g.a)(sr,2),Bt=er[0],Nt=er[1],$t=Object(S.i)(),Ft=$t.identifier,Sr=Object(i.useState)([]),Ar=Object(g.a)(Sr,2),Yr=Ar[0],vn=Ar[1],Jr=Object(i.useState)(!0),Kt=Object(g.a)(Jr,2),st=Kt[0],rn=Kt[1],gn=Object(i.useState)([]),_r=Object(g.a)(gn,2),fr=_r[0],gr=_r[1],Gt=Object(i.useState)([]),zt=Object(g.a)(Gt,2),Mr=zt[0],tr=zt[1],pt=Object(i.useState)(!1),Lt=Object(g.a)(pt,2),vt=Lt[0],ct=Lt[1],Xt=Object(i.useState)(!1),Cr=Object(g.a)(Xt,2),Vr=Cr[0],yr=Cr[1],Or=Object(i.useState)(!1),jr=Object(g.a)(Or,2),Rr=jr[0],Wr=jr[1],Hr=Object(i.useState)([]),wn=Object(g.a)(Hr,2),De=wn[0],Fe=wn[1],Ke=Object(i.useState)([]),Pe=Object(g.a)(Ke,2),pe=Pe[0],Ae=Pe[1],be=Object(i.useState)([]),Le=Object(g.a)(be,2),Ne=Le[0],Ue=Le[1],je=Object(i.useState)(!1),Ge=Object(g.a)(je,2),at=Ge[0],bt=Ge[1],Ot=Object(i.useState)([]),Wt=Object(g.a)(Ot,2),vr=Wt[0],kr=Wt[1],Ir=Object(i.useState)(),Fr=Object(g.a)(Ir,2),Lr=Fr[0],Kr=Fr[1],Gr=Object(i.useState)(!0),nn=Object(g.a)(Gr,2),Qr=nn[0],En=nn[1],en=Object(i.useState)(!1),wr=Object(g.a)(en,2),Tr=wr[0],zr=wr[1],an=Object(i.useState)(!1),hr=Object(g.a)(an,2),cn=hr[0],Un=hr[1],xn=Object(i.useState)(!1),Rn=Object(g.a)(xn,2),Dn=Rn[0],Hn=Rn[1],oa=Object(i.useState)(!1),Kn=Object(g.a)(oa,2),ba=Kn[0],ka=Kn[1],Ra=Object(i.useState)(!1),aa=Object(g.a)(Ra,2),In=aa[0],Cn=aa[1],Xn=Object(i.useState)(!0),Bn=Object(g.a)(Xn,2),Fa=Bn[0],ha=Bn[1],Da=Object(S.h)(),On=Object(i.useRef)(null),tn=Ct.qs;Object(i.useEffect)(function(){Ft&&Za(),Object(Dt.W)("\u7ADE\u8D5B")},[Ft]);function Za(){return Pn.apply(this,arguments)}function Pn(){return Pn=Object(c.a)(n.a.mark(function ur(){var pr;return n.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return dn.t0=Nt,dn.next=3,wt({type:"competitions/getStaff",payload:{identifier:Ft}});case 3:return dn.t1=dn.sent,(0,dn.t0)(dn.t1),dn.next=7,wt({type:"competitions/getHeader",payload:{identifier:Ft}});case 7:pr=dn.sent,qt(pr),Object(Dt.W)((pr==null?void 0:pr.name)||"\u7ADE\u8D5B");case 10:case"end":return dn.stop()}},ur)})),Pn.apply(this,arguments)}Object(i.useEffect)(function(){var ur;Kr(parseInt(Da==null||((ur=Da.query)===null||ur===void 0)?void 0:ur.type)===1)},[Da]),Object(i.useEffect)(function(){var ur;if((Xe==null||((ur=Xe.competition_modules)===null||ur===void 0)?void 0:ur.length)>0){var pr,rr;if((Da==null||((pr=Da.query)===null||pr===void 0)?void 0:pr.active)==="\u8D5B\u9898\u53D1\u5E03"){var dn,nr=Xe==null||((dn=Xe.competition_modules)===null||dn===void 0)?void 0:dn.find(function(Xa){return Xa.name==="\u8D5B\u9898\u53D1\u5E03"});if(nr){yn(nr);return}}yn(Xe==null||((rr=Xe.competition_modules)===null||rr===void 0)?void 0:rr[0])}},[Xe]);function yn(ur){return ea.apply(this,arguments)}function ea(){return ea=Object(c.a)(n.a.mark(function ur(pr){var rr;return n.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:if(Ue(pr.id),Ne=pr.id,gr(pr),!(pr.module_type==="entrance")){nr.next=9;break}return nr.next=6,wt({type:"competitions/getItem",payload:{url:pr.module_url,module_type:"entrance"}});case 6:rr=nr.sent,nr.next=12;break;case 9:return nr.next=11,wt({type:"competitions/getItem",payload:{url:pr.module_url}});case 11:rr=nr.sent;case 12:ct(!1),Wr(!1),bt(!1),vn(rr),zr(!1),Un(!1),tr(pr.module_type),pr.module_type==="chart"?(ct(!0),rn(!1),ti()):pr.module_type==="certificate"?(Wr(!0),ct(!1),rn(!1),fo()):pr.module_type==="md_tab"?(bt(!0),rn(!1),localStorage.setItem("issee","2"),ct(!1),Wr(!1),Ga()):pr.module_type==="md_shixun"?(zr(!0),rn(!1),Ga()):pr.module_type==="entrance"?(Un(!0),rn(!1),Ga()):(rn(!0),localStorage.setItem("issee","1"));case 20:case"end":return nr.stop()}},ur)})),ea.apply(this,arguments)}function Mi(ur,pr,rr){return Si.apply(this,arguments)}function Si(){return Si=Object(c.a)(n.a.mark(function ur(pr,rr,dn){var nr,Xa;return n.a.wrap(function(ta){for(;;)switch(ta.prev=ta.next){case 0:if(pr.stopPropagation(),Object(ae.f)(wt)){ta.next=3;break}return ta.abrupt("return");case 3:if(!(Xe!=null&&Xe.is_authentication&&!(yt!=null&&(nr=yt.userInfo)!==null&&nr!==void 0&&nr.authentication))){ta.next=6;break}return wt({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),ta.abrupt("return");case 6:if(!(Xe!=null&&Xe.enroll_url)){ta.next=9;break}return Object(Dt.R)(Xe==null?void 0:Xe.enroll_url),ta.abrupt("return");case 9:if(!(dn==="ismodel")){ta.next=23;break}if(!(rr.member_of_course===!0)){ta.next=14;break}Object(Dt.R)("/classrooms/".concat(rr.course_id)),ta.next=21;break;case 14:if(rr.invite_code){ta.next=17;break}return m.b.info("\u672C\u7ADE\u8D5B\u53EA\u9762\u5411\u90E8\u5206\u5B66\u6821/\u5355\u4F4D\u5F00\u653E\uFF0C\u4F60\u6682\u65F6\u6CA1\u6709\u53C2\u8D5B\u8D44\u683C"),ta.abrupt("return");case 17:return ta.next=19,wt({type:"competitions/addApplytojoincourse",payload:{invite_code:rr.invite_code,student:1}});case 19:Xa=ta.sent,Xa.status===0&&Object(Dt.R)("/classrooms/".concat(rr.course_id));case 21:ta.next=27;break;case 23:if(!(Bt.enrolled===!0)){ta.next=26;break}return Object(Dt.R)(dn),ta.abrupt("return");case 26:Hn(!0);case 27:case"end":return ta.stop()}},ur)})),Si.apply(this,arguments)}function ti(){return ai.apply(this,arguments)}function ai(){return ai=Object(c.a)(n.a.mark(function ur(){return n.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.t0=yr,rr.next=3,wt({type:"competitions/ChartRules",payload:{identifier:Ft}});case 3:return rr.t1=rr.sent,rr.next=6,(0,rr.t0)(rr.t1);case 6:case"end":return rr.stop()}},ur)})),ai.apply(this,arguments)}function ki(ur){return Ci.apply(this,arguments)}function Ci(){return Ci=Object(c.a)(n.a.mark(function ur(pr){var rr;return n.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return nr.next=2,wt({type:"competitions/Charts",payload:{identifier:Ft,stage_id:pr}});case 2:rr=nr.sent,vn(rr);case 4:case"end":return nr.stop()}},ur)})),Ci.apply(this,arguments)}function Ii(ur){return Ki.apply(this,arguments)}function Ki(){return Ki=Object(c.a)(n.a.mark(function ur(pr){var rr;return n.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return En(!0),nr.next=3,wt({type:"competitions/Results",payload:Object(L.a)({identifier:Ft,stage_id:pr==null?void 0:pr.id},pr)});case 3:rr=nr.sent,vn(rr),En(!1);case 6:case"end":return nr.stop()}},ur)})),Ki.apply(this,arguments)}function co(ur){return Ni.apply(this,arguments)}function Ni(){return Ni=Object(c.a)(n.a.mark(function ur(pr){var rr;return n.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return En(!0),nr.next=3,wt({type:"competitions/Results",payload:Object(L.a)({identifier:Ft,stage_id:pr==null?void 0:pr.id,module_type:"entrance"},pr)});case 3:rr=nr.sent,vn(rr),En(!1);case 6:case"end":return nr.stop()}},ur)})),Ni.apply(this,arguments)}function ji(ur){return Oi.apply(this,arguments)}function Oi(){return Oi=Object(c.a)(n.a.mark(function ur(pr){var rr;return n.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return nr.next=2,wt({type:"competitions/Results",payload:{identifier:Ft,stage_id:pr}});case 2:if(rr=nr.sent,!(localStorage.getItem("issee")==="1")){nr.next=5;break}return nr.abrupt("return");case 5:vn(rr);case 6:case"end":return nr.stop()}},ur)})),Oi.apply(this,arguments)}function Ga(){return ii.apply(this,arguments)}function ii(){return ii=Object(c.a)(n.a.mark(function ur(){return n.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.t0=kr,rr.next=3,wt({type:"competitions/TabResults",payload:{identifier:Ft,competition_module_id:Ne}});case 3:rr.t1=rr.sent,(0,rr.t0)(rr.t1);case 5:case"end":return rr.stop()}},ur)})),ii.apply(this,arguments)}function fo(){return yi.apply(this,arguments)}function yi(){return yi=Object(c.a)(n.a.mark(function ur(){var pr,rr;return n.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return nr.next=2,wt({type:"competitions/Prize",payload:{identifier:Ft,user_id:yt==null||((pr=yt.userInfo)===null||pr===void 0)?void 0:pr.user_id}});case 2:rr=nr.sent,Fe(rr);case 4:case"end":return nr.stop()}},ur)})),yi.apply(this,arguments)}function Ai(){return oi.apply(this,arguments)}function oi(){return oi=Object(c.a)(n.a.mark(function ur(){var pr,rr;return n.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return nr.next=2,wt({type:"competitions/Accounts",payload:{id:yt==null||((pr=yt.userInfo)===null||pr===void 0)?void 0:pr.user_id}});case 2:rr=nr.sent,Ae(rr);case 4:case"end":return nr.stop()}},ur)})),oi.apply(this,arguments)}function bi(ur){return Ia.apply(this,arguments)}function Ia(){return Ia=Object(c.a)(n.a.mark(function ur(pr){var rr;return n.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:if(Fa){nr.next=2;break}return nr.abrupt("return");case 2:if(ha(!1),!si()){nr.next=5;break}return nr.abrupt("return");case 5:return nr.next=7,wt({type:"competitions/AddTeam",payload:{identifier:Ft,name:pr}});case 7:rr=nr.sent,rr&&rr.status===0?(m.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),Za(),ka(!1)):ha(!0);case 9:case"end":return nr.stop()}},ur)})),Ia.apply(this,arguments)}function si(){var ur,pr;if(yt!=null&&(ur=yt.userInfo)!==null&&ur!==void 0&&ur.is_teacher){var rr;if(Bt!=null&&(rr=Bt.teacher_staff)!==null&&rr!==void 0&&rr.mutiple_limited&&(Bt!=null&&Bt.enrolled))return m.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ha(!0),!0}else{var dn;if(Bt!=null&&(dn=Bt.member_staff)!==null&&dn!==void 0&&dn.mutiple_limited&&(Bt!=null&&Bt.enrolled))return m.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ha(!0),!0}if(Bt!=null&&Bt.enroll_ended)return m.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),ha(!0),!0;if(yt!=null&&(pr=yt.userInfo)!==null&&pr!==void 0&&pr.is_teacher){if(!Bt.teacher_staff)return m.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),ha(!0),!0}else if(!(Bt!=null&&Bt.member_staff))return m.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),ha(!0),!0}function li(ur){return di.apply(this,arguments)}function di(){return di=Object(c.a)(n.a.mark(function ur(pr){var rr;return n.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:if(Fa){nr.next=2;break}return nr.abrupt("return");case 2:if(!si()){nr.next=4;break}return nr.abrupt("return");case 4:return ha(!1),nr.next=7,wt({type:"competitions/JoinTeam",payload:{identifier:Ft,invite_code:pr}});case 7:rr=nr.sent,rr&&rr.status===0?(m.b.info(tn.\u52A0\u5165\u6218\u961F\u6210\u529F),Cn(!1),ha(!0),Za()):ha(!0);case 9:case"end":return nr.stop()}},ur)})),di.apply(this,arguments)}return console.log("-------",Qr),t.a.createElement("div",{className:"edu-container minH500"},t.a.createElement(a.a,{className:"mt10",separator:">"},t.a.createElement(a.a.Item,null,t.a.createElement(E.a,{to:"/competitions/index"},tn.\u5728\u7EBF\u7ADE\u8D5B)),tn.isChinese?t.a.createElement(a.a.Item,null,Xe.name,Xe.sub_title?"-"+Xe.sub_title:null):t.a.createElement(a.a.Item,null,Xe.english_name,Xe.english_sub_title?"-"+Xe.english_sub_title:null)),t.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},t.a.createElement(o.a,{spinning:_t.effects["competitions/getHeader"]},tn.isChinese?t.a.createElement("div",{style:{height:"355px",width:"800px"}},(Xe==null?void 0:Xe.avatar_url)&&(Xe==null?void 0:Xe.avatar_url)!==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:G.a.IMG_SERVER+"/"+(Xe==null?void 0:Xe.avatar_url)}),!(Xe!=null&&Xe.avatar_url)&&(Xe==null?void 0:Xe.avatar_url)==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:G.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"})):t.a.createElement("div",{style:{height:"355px",width:"800px"}},(Xe==null?void 0:Xe.english_avatar_url)&&(Xe==null?void 0:Xe.english_avatar_url)!==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:G.a.IMG_SERVER+"/"+(Xe==null?void 0:Xe.english_avatar_url)}),!(Xe!=null&&Xe.english_avatar_url)&&(Xe==null?void 0:Xe.english_avatar_url)==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:G.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),t.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},tn.isChinese?t.a.createElement("p",{title:"".concat(Xe.name).concat(Xe.sub_title?"-"+Xe.sub_title:""),className:"".concat(O.a.titlesize)},Xe.name,Xe.sub_title?"-"+Xe.sub_title:null):t.a.createElement("p",{title:"".concat(Xe.english_name).concat(Xe.english_sub_title?"-"+Xe.english_sub_title:null),className:"".concat(O.a.titlesize)},Xe.english_name,Xe.english_sub_title?"-"+Xe.english_sub_title:null),t.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,tn.\u5956\u91D1),Xe!=null&&Xe.bonus?t.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(Xe&&Xe.bonus).toLocaleString()):t.a.createElement("span",{style:{fontSize:"24px"}},tn.\u6682\u65E0)),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,tn.\u6D4F\u89C8),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(Xe&&Xe.visits_count).toLocaleString())),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,tn.\u62A5\u540D),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(Xe&&Xe.member_count).toLocaleString()))),t.a.createElement("p",{className:O.a.timesize,style:{marginTop:30}},t.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},tn["\u7ADE\u8D5B\u65F6\u95F4\uFF1A"]),Xe.start_time,"~",Xe.end_time),t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},tn["\u62A5\u540D\u622A\u6B62\uFF1A"]),Xe.enroll_end_time),Xe.competition_status==="ended"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},tn["\u7ADE\u8D5B\u72B6\u6001\uFF1A"]),tn.\u5DF2\u7ED3\u675F):null,Xe.competition_status==="nearly_published"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},tn["\u7ADE\u8D5B\u72B6\u6001\uFF1A"]),tn.\u672A\u53D1\u5E03):null,Xe.competition_status==="progressing"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},tn["\u7ADE\u8D5B\u72B6\u6001\uFF1A"]),tn.\u8FDB\u884C\u4E2D):null,t.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(Xe==null?void 0:Xe.mode)<=2&&Bt.enrolled&&t.a.createElement(w.a,{onClick:function(pr){if((Xe==null?void 0:Xe.mode)===1){var rr;yn((rr=Xe.competition_modules)===null||rr===void 0?void 0:rr.find(function(dn){return dn.module_type==="entrance"}))}else Mi(pr,Xe,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(Xe==null?void 0:Xe.mode)===2||(Xe==null?void 0:Xe.mode)===1&&((dt=Xe.competition_modules)===null||dt===void 0||((Et=dt.filter(function(ur){return ur.module_type==="entrance"}))===null||Et===void 0)?void 0:Et.length)>0?"":"none"},className:O.a.buttonsize},(Xe==null?void 0:Xe.mode)===1&&tn.\u8D5B\u9898\u5165\u53E3,(Xe==null?void 0:Xe.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),Xe.competition_status==="ended"?t.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},tn.\u5DF2\u7ED3\u675F):null,Xe.competition_status==="nearly_published"?t.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},tn.\u672A\u53D1\u5E03):null,Xe.competition_status!=="nearly_published"&&Xe.enroll_end&&Xe.competition_status!=="ended"?t.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,Xe.competition_status==="progressing"&&Xe.enroll_end!=!0?t.a.createElement(w.a,{type:"primary",disabled:Bt.enrolled&&!Xe.need_attachment,className:O.a.buttonsize,onClick:function(pr){if(Bt.enrolled&&Xe.need_attachment){var rr;(rr=On.current)===null||rr===void 0||rr.handleVisible();return}Mi(pr,Xe,Xe.mode===2?"ismodel":Xe.personal?"personal":"/competitions/index/".concat(Xe.identifier,"/enroll"))}},Bt.enrolled?Xe.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":tn.\u5DF2\u62A5\u540D:Xe!=null&&Xe.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":tn.\u7ACB\u5373\u62A5\u540D):null),yt.userInfo.real_name!="\u6E38\u5BA2"&&!(Xe!=null&&Xe.enroll_url)&&t.a.createElement("span",{onClick:function(pr){return Mi(pr,Xe,Xe.mode===2?"ismodel":Xe.personal?"personal":"/competitions/index/".concat(Xe.identifier,"/enroll"))},className:O.a.myteam},Object(on.u)()?"\u53C2\u8D5B\u6218\u961F>>":"".concat(tn.\u6211\u7684\u6218\u961F,">>")))),t.a.createElement("div",{className:O.a.bootmdetail},t.a.createElement("div",{className:O.a.flex1},t.a.createElement(u.a,{selectedKeys:["".concat(Ne)]},Xe&&Xe.competition_modules&&Xe.competition_modules.map(function(ur,pr){if(ur.module_type!="enroll")return t.a.createElement(u.a.Item,{className:O.a.menuItem,onClick:function(){if(ur!=null&&ur.is_authentication){if(!Object(ae.f)(wt))return;m.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}En(!1),yn(ur)},key:ur.id},tn.isChinese?ur.name:ur.english_name)}))),t.a.createElement("div",{className:O.a.flex6,style:{padding:(Tr||cn)&&0}},Rr?t.a.createElement(xr,{dispatch:wt,userid:yt==null||((Ut=yt.userInfo)===null||Ut===void 0)?void 0:Ut.user_id,Prize:De,Accounts:pe,getAccounts:Ai}):null,vt?t.a.createElement(Re,{qs:tn,HeaderDetail:Xe,userinfo:yt.userInfo,Editable:Xe==null||((Pt=Xe.permission)===null||Pt===void 0)?void 0:Pt.editable,getCharts:ki,getChartRules:ti,Selectkey:Ne,ChartRules:Vr,ItemData:Yr}):null,st?t.a.createElement(Y,{qs:tn,ref:On,StaffDetail:Bt,HeaderDetail:Xe,userinfo:yt.userInfo,Editable:Xe==null||((Zt=Xe.permission)===null||Zt===void 0)?void 0:Zt.editable,ItemData:Yr,setIssee:rn,ModelType:Mr,dispatch:wt}):null,!st&&!Tr&&!cn&&!vt&&!Rr&&!at?t.a.createElement($,{qs:tn,userinfo:yt.userInfo,ModelType:Mr,getrightdatas:yn,dispatch:wt,MenuItem:fr,setIssee:rn,identifier:Ft,ItemData:Yr}):null,at&&t.a.createElement(ya,{qs:tn,dispatch:wt,StaffDetail:Bt,userinfo:yt.userInfo,HeaderDetail:Xe,Editable:Xe==null||((kt=Xe.permission)===null||kt===void 0)?void 0:kt.editable,getCharts:ji,getChartRules:Ga,Selectkey:Ne,ChartRules:vr,ItemData:Yr}),Tr&&t.a.createElement(gi,{loading:Qr,dispatch:wt,StaffDetail:Bt,userinfo:yt.userInfo,HeaderDetail:Xe,Editable:Xe==null||((lt=Xe.permission)===null||lt===void 0)?void 0:lt.editable,getCharts:Ii,getChartRules:Ga,Selectkey:Ne,ChartRules:vr,ItemData:Yr}),cn&&t.a.createElement(ci,{loading:Qr,dispatch:wt,StaffDetail:Bt,userinfo:yt.userInfo,HeaderDetail:Xe,Editable:Xe==null||((mt=Xe.permission)===null||mt===void 0)?void 0:mt.editable,getCharts:co,getChartRules:Ga,Selectkey:Ne,ChartRules:vr,ItemData:Yr}))),t.a.createElement(b.a,null),t.a.createElement(K,{getResults:ji}),t.a.createElement(C.a,{visible:Lr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return Kr(!1)}},t.a.createElement("div",{className:O.a.modal},t.a.createElement("div",null,"\u534E\u4E3A\u6A21\u578B\u738B\u8005\u6311\u6218\u8D5B\u9EC4\u91D1\u8D5B\u6B63\u5F0F\u5F00\u542F\u5566"),t.a.createElement("div",null,"\u672C\u8D5B\u6BB5\u603B\u5956\u91D1\u9AD8\u8FBE",t.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"\u5143"),t.a.createElement("div",null,"1\u3001\u7B26\u5408\u8D5B\u9898\u8981\u6C42\u7684\u961F\u4F0D\uFF08\u517125\u652F\uFF09\u53EF\u83B7\u5F97\u5956\u91D1\uFF1A12000RMB/\u961F \uFF1B"),t.a.createElement("div",null,"2\u3001\u53C2\u4E0E\u83B7\u5F97\u201C\u8363\u8000\u6BBF\u5802\u201D\u699C\u4E3B\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1\uFF1B"),t.a.createElement("div",null,"3\u3001\u5404\u8D5B\u9898\u7CBE\u5EA6\u6700\u9AD8\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1+\u8363\u8A89\u8BC1\u4E66\uFF1B"),t.a.createElement("div",null,"\u5FC3\u52A8\u5427\uFF0C\u90A3\u5C31\u5FEB\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u62A5\u540D\u53C2\u8D5B"),t.a.createElement(w.a,{type:"primary",onClick:function(){return Object(Dt.R)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),t.a.createElement(C.a,{title:tn.\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F,visible:Dn,onCancel:function(){Hn(!1)},footer:!1},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},t.a.createElement(w.a,{type:"primary",style:{height:40},onClick:function(){Cn(!0),Hn(!1)}},tn.\u52A0\u5165\u6218\u961F\u53C2\u8D5B),t.a.createElement(w.a,{style:{height:40},onClick:function(){ka(!0),Hn(!1)}},tn.\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B))),In?t.a.createElement(za.a,{qs:tn,isjoin:In,setJoin:Cn,JoinTeams:li}):null,ba?t.a.createElement(Ca.a,{qs:tn,isAddmodle:ba,setIsAdd:ka,createTeam:bi}):null)},ei=Q.default=Object(s.a)(function(ht){var Ze=ht.loading,dt=ht.globalSetting,Et=ht.competitions,Ut=ht.user;return{globalSetting:dt,competitions:Et,loading:Ze,user:Ut}})(Qa)},GRuw:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("lPiR"))})(this,function(L){return function(){var h=L,C=h.lib,D=C.WordArray,u=h.algo,f=u.SHA256,w=u.SHA224=f.extend({_doReset:function(){this._hash=new D.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var d=f._doFinalize.call(this);return d.sigBytes-=4,d}});h.SHA224=f._createHelper(w),h.HmacSHA224=f._createHmacHelper(w)}(),L.SHA224})},GfqC:function(j,Q,k){"use strict";var L=k("q1tI"),h=k.n(L),C=k("TSYQ"),D=k.n(C);function u(z,U){var B="cannot "+z.method+" "+z.action+" "+U.status+"'",G=new Error(B);return G.status=U.status,G.method=z.method,G.url=z.action,G}function f(z){var U=z.responseText||z.response;if(!U)return U;try{return JSON.parse(U)}catch(B){return U}}function w(z){var U=new XMLHttpRequest;z.onProgress&&U.upload&&(U.upload.onprogress=function(ae){ae.total>0&&(ae.percent=ae.loaded/ae.total*100),z.onProgress(ae)});var B=new FormData;z.data&&Object.keys(z.data).forEach(function(q){var ae=z.data[q];if(Array.isArray(ae)){ae.forEach(function(se){B.append(q+"[]",se)});return}B.append(q,z.data[q])}),z.file instanceof Blob?B.append(z.filename,z.file,z.file.name):B.append(z.filename,z.file),U.onerror=function(ae){z.onError(ae)},U.onload=function(){return U.status<200||U.status>=300?z.onError(u(z,U),f(U)):z.onSuccess(f(U),U)},U.open(z.method,z.action,!0),z.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var G=z.headers||{};return G["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(G).forEach(function(q){G[q]!==null&&U.setRequestHeader(q,G[q])}),U.send(B),{abort:function(){U.abort()}}}var d=+new Date,o=0;function l(){return"rc-upload-"+d+"-"+ ++o}function a(z,U){return z.indexOf(U,z.length-U.length)!==-1}var _=function(z,U){if(z&&U){var B=Array.isArray(U)?U:U.split(","),G=z.name||"",q=z.type||"",ae=q.replace(/\/.*$/,"");return B.some(function(se){var we=se.trim();return we.charAt(0)==="."?a(G.toLowerCase(),we.toLowerCase()):/\/\*$/.test(we)?ae===we.replace(/\/.*$/,""):q===we})}return!0};function m(z,U){var B=z.createReader(),G=[];function q(){B.readEntries(function(ae){var se=Array.prototype.slice.apply(ae);G=G.concat(se);var we=!se.length;we?U(G):q()})}q()}var c=function(U,B,G){var q=function ae(se,we){we=we||"",se.isFile?se.file(function(Se){G(Se)&&(se.fullPath&&!Se.webkitRelativePath&&(Object.defineProperties(Se,{webkitRelativePath:{writable:!0}}),Se.webkitRelativePath=se.fullPath.replace(/^\//,""),Object.defineProperties(Se,{webkitRelativePath:{writable:!1}})),B([Se]))}):se.isDirectory&&m(se,function(Se){Se.forEach(function(de){ae(de,""+we+se.name+"/")})})};U.forEach(function(ae){q(ae.webkitGetAsEntry())})},g=c,v=Object.assign||function(z){for(var U=1;U<arguments.length;U++){var B=arguments[U];for(var G in B)Object.prototype.hasOwnProperty.call(B,G)&&(z[G]=B[G])}return z},x=function(){function z(U,B){var G=[],q=!0,ae=!1,se=void 0;try{for(var we=U[Symbol.iterator](),Se;!(q=(Se=we.next()).done)&&!(G.push(Se.value),B&&G.length===B);q=!0);}catch(de){ae=!0,se=de}finally{try{!q&&we.return&&we.return()}finally{if(ae)throw se}}return G}return function(U,B){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return z(U,B);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function z(U,B){for(var G=0;G<B.length;G++){var q=B[G];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(U,q.key,q)}}return function(U,B,G){return B&&z(U.prototype,B),G&&z(U,G),U}}();function i(z,U,B){return U in z?Object.defineProperty(z,U,{value:B,enumerable:!0,configurable:!0,writable:!0}):z[U]=B,z}function t(z,U){var B={};for(var G in z){if(U.indexOf(G)>=0)continue;if(!Object.prototype.hasOwnProperty.call(z,G))continue;B[G]=z[G]}return B}function S(z,U){if(!(z instanceof U))throw new TypeError("Cannot call a class as a function")}function E(z,U){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:z}function s(z,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);z.prototype=Object.create(U&&U.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(z,U):z.__proto__=U)}var P=function(U){return Object.keys(U).reduce(function(B,G){return(G.substr(0,5)==="data-"||G.substr(0,5)==="aria-"||G==="role")&&(B[G]=U[G]),B},{})},O=function(z){s(U,z);function U(){var B,G,q,ae;S(this,U);for(var se=arguments.length,we=Array(se),Se=0;Se<se;Se++)we[Se]=arguments[Se];return ae=(G=(q=E(this,(B=U.__proto__||Object.getPrototypeOf(U)).call.apply(B,[this].concat(we))),q),q.state={uid:l()},q.reqs={},q.onChange=function(de){var xe=de.target.files;q.uploadFiles(xe),q.reset()},q.onClick=function(de){var xe=q.fileInput;if(!xe)return;var he=q.props,ne=he.children,oe=he.onClick;ne&&ne.type==="button"&&(xe.parentNode.focus(),xe.parentNode.querySelector("button").blur()),xe.click(),oe&&oe(de)},q.onKeyDown=function(de){de.key==="Enter"&&q.onClick()},q.onFileDrop=function(de){var xe=q.props.multiple;if(de.preventDefault(),de.type==="dragover")return;if(q.props.directory)g(Array.prototype.slice.call(de.dataTransfer.items),q.uploadFiles,function(ne){return _(ne,q.props.accept)});else{var he=Array.prototype.slice.call(de.dataTransfer.files).filter(function(ne){return _(ne,q.props.accept)});xe===!1&&(he=he.slice(0,1)),q.uploadFiles(he)}},q.uploadFiles=function(de){var xe=Array.prototype.slice.call(de);xe.map(function(he){return he.uid=l(),he}).forEach(function(he){q.upload(he,xe)})},q.saveFileInput=function(de){q.fileInput=de},G),E(q,ae)}return n(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(G,q){var ae=this,se=this.props;if(!se.beforeUpload)return setTimeout(function(){return ae.post(G)},0);var we=se.beforeUpload(G,q);we&&we.then?we.then(function(Se){var de=Object.prototype.toString.call(Se);return de==="[object File]"||de==="[object Blob]"?ae.post(Se):ae.post(G)}).catch(function(Se){console.log(Se)}):we!==!1&&setTimeout(function(){return ae.post(G)},0);return}},{key:"post",value:function(G){var q=this;if(!this._isMounted)return;var ae=this.props,se=ae.onStart,we=ae.onProgress,Se=ae.transformFile,de=Se===void 0?function(xe){return xe}:Se;new Promise(function(xe){var he=ae.action;return typeof he=="function"&&(he=he(G)),xe(he)}).then(function(xe){var he=G.uid,ne=ae.customRequest||w,oe=Promise.resolve(de(G)).then(function(te){var le=ae.data;return typeof le=="function"&&(le=le(te)),Promise.all([te,le])}).catch(function(te){console.error(te)});oe.then(function(te){var le=x(te,2),Y=le[0],Z=le[1],ge={action:xe,filename:ae.name,data:Z,file:Y,headers:ae.headers,withCredentials:ae.withCredentials,method:ae.method||"post",onProgress:we?function(ee){we(ee,G)}:null,onSuccess:function($,X){delete q.reqs[he],ae.onSuccess($,G,X)},onError:function($,X){delete q.reqs[he],ae.onError($,X,G)}};se(G),q.reqs[he]=ne(ge)})})}},{key:"reset",value:function(){this.setState({uid:l()})}},{key:"abort",value:function(G){var q=this.reqs;if(G){var ae=G;G&&G.uid&&(ae=G.uid),q[ae]&&q[ae].abort&&q[ae].abort(),delete q[ae]}else Object.keys(q).forEach(function(se){q[se]&&q[se].abort&&q[se].abort(),delete q[se]})}},{key:"render",value:function(){var G,q=this.props,ae=q.component,se=q.prefixCls,we=q.className,Se=q.disabled,de=q.id,xe=q.style,he=q.multiple,ne=q.accept,oe=q.children,te=q.directory,le=q.openFileDialogOnClick,Y=q.onMouseEnter,Z=q.onMouseLeave,ge=t(q,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ee=D()((G={},i(G,se,!0),i(G,se+"-disabled",Se),i(G,we,we),G)),$=Se?{}:{onClick:le?this.onClick:function(){},onKeyDown:le?this.onKeyDown:function(){},onMouseEnter:Y,onMouseLeave:Z,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return h.a.createElement(ae,v({},$,{className:ee,role:"button",style:xe}),h.a.createElement("input",v({},P(ge),{id:de,type:"file",ref:this.saveFileInput,onClick:function(J){return J.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ne,directory:te?"directory":null,webkitdirectory:te?"webkitdirectory":null,multiple:he,onChange:this.onChange})),oe)}}]),U}(L.Component),b=O,y=Object.assign||function(z){for(var U=1;U<arguments.length;U++){var B=arguments[U];for(var G in B)Object.prototype.hasOwnProperty.call(B,G)&&(z[G]=B[G])}return z},p=function(){function z(U,B){for(var G=0;G<B.length;G++){var q=B[G];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(U,q.key,q)}}return function(U,B,G){return B&&z(U.prototype,B),G&&z(U,G),U}}();function T(z,U){if(!(z instanceof U))throw new TypeError("Cannot call a class as a function")}function M(z,U){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:z}function N(z,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);z.prototype=Object.create(U&&U.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(z,U):z.__proto__=U)}function I(){}var K=function(z){N(U,z);function U(){var B,G,q,ae;T(this,U);for(var se=arguments.length,we=Array(se),Se=0;Se<se;Se++)we[Se]=arguments[Se];return ae=(G=(q=M(this,(B=U.__proto__||Object.getPrototypeOf(U)).call.apply(B,[this].concat(we))),q),q.saveUploader=function(de){q.uploader=de},G),M(q,ae)}return p(U,[{key:"abort",value:function(G){this.uploader.abort(G)}},{key:"render",value:function(){return h.a.createElement(b,y({},this.props,{ref:this.saveUploader}))}}]),U}(L.Component);K.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:I,onError:I,onSuccess:I,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var H=K,W=Q.a=H},HmJG:function(j,Q,k){},IBYe:function(j,Q,k){"use strict";function L(h){return null}Q.a=L},Ib8C:function(j,Q,k){(function(L){(function(h,C){j.exports=Q=C()})(this,function(){var h=h||function(C,D){var u;if(typeof window!="undefined"&&window.crypto&&(u=window.crypto),typeof self!="undefined"&&self.crypto&&(u=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(u=globalThis.crypto),!u&&typeof window!="undefined"&&window.msCrypto&&(u=window.msCrypto),!u&&typeof L!="undefined"&&L.crypto&&(u=L.crypto),!u&&!0)try{u=k(4)}catch(i){}var f=function(){if(u){if(typeof u.getRandomValues=="function")try{return u.getRandomValues(new Uint32Array(1))[0]}catch(i){}if(typeof u.randomBytes=="function")try{return u.randomBytes(4).readInt32LE()}catch(i){}}throw new Error("Native crypto module could not be used to get secure random number.")},w=Object.create||function(){function i(){}return function(t){var S;return i.prototype=t,S=new i,i.prototype=null,S}}(),d={},o=d.lib={},l=o.Base=function(){return{extend:function(i){var t=w(this);return i&&t.mixIn(i),(!t.hasOwnProperty("init")||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var i=this.extend();return i.init.apply(i,arguments),i},init:function(){},mixIn:function(i){for(var t in i)i.hasOwnProperty(t)&&(this[t]=i[t]);i.hasOwnProperty("toString")&&(this.toString=i.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=o.WordArray=l.extend({init:function(i,t){i=this.words=i||[],t!=D?this.sigBytes=t:this.sigBytes=i.length*4},toString:function(i){return(i||m).stringify(this)},concat:function(i){var t=this.words,S=i.words,E=this.sigBytes,s=i.sigBytes;if(this.clamp(),E%4)for(var P=0;P<s;P++){var O=S[P>>>2]>>>24-P%4*8&255;t[E+P>>>2]|=O<<24-(E+P)%4*8}else for(var b=0;b<s;b+=4)t[E+b>>>2]=S[b>>>2];return this.sigBytes+=s,this},clamp:function(){var i=this.words,t=this.sigBytes;i[t>>>2]&=4294967295<<32-t%4*8,i.length=C.ceil(t/4)},clone:function(){var i=l.clone.call(this);return i.words=this.words.slice(0),i},random:function(i){for(var t=[],S=0;S<i;S+=4)t.push(f());return new a.init(t,i)}}),_=d.enc={},m=_.Hex={stringify:function(i){for(var t=i.words,S=i.sigBytes,E=[],s=0;s<S;s++){var P=t[s>>>2]>>>24-s%4*8&255;E.push((P>>>4).toString(16)),E.push((P&15).toString(16))}return E.join("")},parse:function(i){for(var t=i.length,S=[],E=0;E<t;E+=2)S[E>>>3]|=parseInt(i.substr(E,2),16)<<24-E%8*4;return new a.init(S,t/2)}},c=_.Latin1={stringify:function(i){for(var t=i.words,S=i.sigBytes,E=[],s=0;s<S;s++){var P=t[s>>>2]>>>24-s%4*8&255;E.push(String.fromCharCode(P))}return E.join("")},parse:function(i){for(var t=i.length,S=[],E=0;E<t;E++)S[E>>>2]|=(i.charCodeAt(E)&255)<<24-E%4*8;return new a.init(S,t)}},g=_.Utf8={stringify:function(i){try{return decodeURIComponent(escape(c.stringify(i)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(i){return c.parse(unescape(encodeURIComponent(i)))}},v=o.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(i){typeof i=="string"&&(i=g.parse(i)),this._data.concat(i),this._nDataBytes+=i.sigBytes},_process:function(i){var t,S=this._data,E=S.words,s=S.sigBytes,P=this.blockSize,O=P*4,b=s/O;i?b=C.ceil(b):b=C.max((b|0)-this._minBufferSize,0);var y=b*P,p=C.min(y*4,s);if(y){for(var T=0;T<y;T+=P)this._doProcessBlock(E,T);t=E.splice(0,y),S.sigBytes-=p}return new a.init(t,p)},clone:function(){var i=l.clone.call(this);return i._data=this._data.clone(),i},_minBufferSize:0}),x=o.Hasher=v.extend({cfg:l.extend(),init:function(i){this.cfg=this.cfg.extend(i),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(i){return this._append(i),this._process(),this},finalize:function(i){i&&this._append(i);var t=this._doFinalize();return t},blockSize:512/32,_createHelper:function(i){return function(t,S){return new i.init(S).finalize(t)}},_createHmacHelper:function(i){return function(t,S){return new n.HMAC.init(i,S).finalize(t)}}}),n=d.algo={};return d}(Math);return h})}).call(this,k("IyRk"))},K3mO:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("3y9D"),k("WYAk"))})(this,function(L){return function(){var h=L,C=h.lib,D=C.Base,u=C.WordArray,f=h.algo,w=f.MD5,d=f.EvpKDF=D.extend({cfg:D.extend({keySize:128/32,hasher:w,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,l){for(var a,_=this.cfg,m=_.hasher.create(),c=u.create(),g=c.words,v=_.keySize,x=_.iterations;g.length<v;){a&&m.update(a),a=m.update(o).finalize(l),m.reset();for(var n=1;n<x;n++)a=m.finalize(a),m.reset();c.concat(a)}return c.sigBytes=v*4,c}});h.EvpKDF=function(o,l,a){return d.create(a).compute(o,l)}}(),L.EvpKDF})},KXlV:function(j,Q,k){j.exports=k.p+"static/job.65c6034f.png"},KeDT:function(j,Q,k){j.exports={flex_box_center:"flex_box_center___3otMp",flex_space_between:"flex_space_between___2nig-",flex_box_vertical_center:"flex_box_vertical_center___3opWF",flex_box_center_end:"flex_box_center_end___1u2JP",flex_box_column:"flex_box_column___1RMsI",wrp:"wrp___-Shy4",bg:"bg___3aDMI",commonimg:"commonimg___15xnD",titlesize:"titlesize___2x92E",timesize:"timesize___3GFem",flex1:"flex1___1D3Li",buttonsize:"buttonsize___3oghG",myteam:"myteam___v6SIK",bootmdetail:"bootmdetail___3hk9v",flex6:"flex6___2iMiQ",menuItem:"menuItem___20c2q",spanprev:"spanprev___1dQoJ",spannext:"spannext___3fFnS",divwidth:"divwidth___1Dk29",receiveclick:"receiveclick___3mYYR",receivealready:"receivealready___20cCL",bkfff:"bkfff___WkCDR","ant-input":"ant-input___Zl9Xd",onediv:"onediv___2hHLH",onetop:"onetop___73xTC",towdiv:"towdiv___nqi1b",towtop:"towtop___pPhtO",threediv:"threediv___2G0u0",threetop:"threetop___2DsrB",imgradius:"imgradius___2WlXC",prize:"prize___1al1u",spanrightradius:"spanrightradius___3VHYc",bottomItem:"bottomItem___1NfPd",myTeam:"myTeam___2A-RJ",downloadpdf:"downloadpdf___1BQ_n",teamItem:"teamItem___220Fc",dash:"dash___3pxuh",modal:"modal___27esx"}},KhGG:function(j,Q,k){"use strict";k.d(Q,"a",function(){return s}),k.d(Q,"c",function(){return O});var L=k("0Owb"),h=k("miYZ"),C=k("tsqr"),D=k("oBTY"),u=k("tJVT"),f=k("PpiC"),w=k("k1fw"),d=k("9og8"),o=k("DZo9"),l=k("8z0m"),a=k("WmNS"),_=k.n(a),m=k("q1tI"),c=k.n(m),g=k("ErOA"),v=k("NFKh"),x=k.n(v),n=k("7Cbv"),i=k("9kvl"),t=k("mxV5"),S=k.n(t),E=l.a.Dragger,s=function(p){var T="bf3c199c2470cb477d907b1e0917c17b",M="5183666c72eec9e4",N=x.a.enc.Utf8.parse(T),I=x.a.enc.Utf8.parse(M),K=x.a.AES.decrypt(p,N,{iv:I,mode:x.a.mode.CBC});return K.toString(x.a.enc.Utf8)},P,O=function(){var y=Object(d.a)(_.a.mark(function p(T,M,N){var I,K,H,W,z,U,B,G,q;return _.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return M.file_name=T.name,se.next=3,Object(g.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return B=se.sent,console.log("decrypt(res.data):",s(B.data)),B.data=JSON.parse(s(B.data)),G=Object(n.a)(),q=new S.a({endpoint:B==null||((I=B.data)===null||I===void 0)?void 0:I.end_point,region:B==null||((K=B.data)===null||K===void 0)?void 0:K.region,accessKeyId:B==null||((H=B.data)===null||H===void 0)?void 0:H.access_key_id,accessKeySecret:B==null||((W=B.data)===null||W===void 0)?void 0:W.access_key_secret,bucket:B==null||((z=B.data)===null||z===void 0)?void 0:z.bucket,stsToken:B==null||((U=B.data)===null||U===void 0)?void 0:U.security_token}),se.abrupt("return",new Promise(function(we,Se){var de;q.multipartUpload("".concat(G),new Blob([T],{type:T.type}),Object(w.a)(Object(w.a)({timeout:200*1e3,partSize:102400},N),{},{callback:{url:B==null||((de=B.data)===null||de===void 0)?void 0:de.callback_url,host:B==null?void 0:B.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(g.e)(M)}})).then(function(xe){var he;T.response=(he=xe.data)===null||he===void 0?void 0:he.data,we(xe==null?void 0:xe.data)}).catch(function(xe){Se(xe),console.log("err:",xe)})}));case 9:case"end":return se.stop()}},p)}));return function(T,M,N){return y.apply(this,arguments)}}(),b=function(p){var T=p.user,M=p.cancelUpload,N=Object(f.a)(p,["user","cancelUpload"]),I=Object(m.useState)([]),K=Object(u.a)(I,2),H=K[0],W=K[1],z=Object(m.useState)(),U=Object(u.a)(z,2),B=U[0],G=U[1],q={onRemove:function(we){W(Object(D.a)(H.filter(function(Se){return Se.name!==we.name}))),N.onChange(H.filter(function(Se){return Se.name!==we.name}))},disabled:N.disabled,multiple:!0,fileList:H==null?void 0:H.map(function(se){return se.file}),customRequest:function(){},beforeUpload:function(){var se=Object(d.a)(_.a.mark(function Se(de){var xe;return _.a.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(xe=N.maxSize||1024*1024*1024*1,!H.filter(function(oe){return oe.name===de.name}).length){ne.next=4;break}return C.b.info("".concat(de.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ne.abrupt("return");case 4:if(!((de==null?void 0:de.size)>xe)){ne.next=7;break}return C.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(xe/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ne.abrupt("return",!1);case 7:return H.push({name:de.name,file:de}),W(Object(D.a)(H)),N.onChange(H),ne.abrupt("return",!1);case 11:case"end":return ne.stop()}},Se)}));function we(Se){return se.apply(this,arguments)}return we}()},ae=function(){var se=Object(d.a)(_.a.mark(function we(Se,de){var xe,he,ne,oe,te,le,Y,Z,ge;return _.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return de.file_name=Se.name,Y=Se.name,$.next=4,Object(g.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Z=$.sent,Z.data=JSON.parse(s(Z.data)),!((Z==null?void 0:Z.status)!==0)){$.next=12;break}return H[H.findIndex(function(X){return X.name===Y})].status="error",H[H.findIndex(function(X){return X.name===Y})].file.status="error",N.onChange(H),C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),$.abrupt("return");case 12:return B=new S.a({endpoint:Z==null||((xe=Z.data)===null||xe===void 0)?void 0:xe.end_point,region:Z==null||((he=Z.data)===null||he===void 0)?void 0:he.region,accessKeyId:Z==null||((ne=Z.data)===null||ne===void 0)?void 0:ne.access_key_id,accessKeySecret:Z==null||((oe=Z.data)===null||oe===void 0)?void 0:oe.access_key_secret,bucket:Z==null||((te=Z.data)===null||te===void 0)?void 0:te.bucket,stsToken:Z==null||((le=Z.data)===null||le===void 0)?void 0:le.security_token}),console.log(Se,"file"),G(B),ge=Object(n.a)(),$.abrupt("return",new Promise(function(X,J){try{var me;B.multipartUpload("".concat(N.identifier,"/").concat(ge).concat(Y.indexOf(".")>-1?"."+Y.split(".").pop():""),new Blob([Se.file],{type:Se.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(_e,He,$e){try{console.log("\u8FDB\u5EA6",_e,He,$e);var Ye=H.findIndex(function(tt){return tt.name===Y});H[Ye].file.percent=_e*100,H[Ye].tempCheckpoint=He,W(Object(D.a)(H))}catch(tt){}},checkpoint:H[H.findIndex(function(ue){return ue.name===Y})].tempCheckpoint,callback:{customValue:{id:Y+""},url:Z==null||((me=Z.data)===null||me===void 0)?void 0:me.callback_url,host:Z==null?void 0:Z.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(g.e)(de)}}).then(function(ue){var _e,He=H.findIndex(function(it){return it.name===Y}),$e="done";if(((_e=ue.data)===null||_e===void 0?void 0:_e.status)===0){var Ye;Se.response=(Ye=ue.data)===null||Ye===void 0?void 0:Ye.data;var tt=H.findIndex(function(it){return it.name===Y});H[tt].status="done",H[tt].file.status="done"}else{var nt;C.b.warn((nt=ue.data)===null||nt===void 0?void 0:nt.message),$e="error"}H[He].status=$e,H[He].file.status=$e,N.onChange(H),X(ue==null?void 0:ue.data)}).catch(function(ue){H[H.findIndex(function(_e){return _e.name===Y})].status="error",H[H.findIndex(function(_e){return _e.name===Y})].file.status="error",C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),W(Object(D.a)(H)),N.onChange(H),J(ue),console.log("err:",ue)})}catch(ue){}}));case 17:case"end":return $.stop()}},we)}));return function(Se,de){return se.apply(this,arguments)}}();return Object(m.useEffect)(function(){H.every(function(se){return se==="done"||se==="error"})&&N.onComplete(H)},[H]),Object(m.useEffect)(function(){if(M){var se;(se=B)===null||se===void 0||se.cancel()}},[M]),Object(m.useEffect)(function(){N.uploading&&H.map(function(){var se=Object(d.a)(_.a.mark(function we(Se){var de,xe;return _.a.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(!((!Se.status||Se.status==="error")&&!M)){ne.next=6;break}return Se.status="uploading",Se.file.status="uploading",ne.next=5,ae(Se,{login:T==null||((de=T.userInfo)===null||de===void 0)?void 0:de.login,container_type:N.container_type,container_id:N.container_id,description:N.description});case 5:xe=ne.sent;case 6:case"end":return ne.stop()}},we)}));return function(we){return se.apply(this,arguments)}}())},[N.uploading]),c.a.createElement(E,Object(L.a)({},q,{height:N.height,className:N.className}),c.a.createElement("p",{className:"ant-upload-hint"},N.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Q.b=Object(i.a)(function(y){var p=y.loading,T=y.globalSetting,M=y.user;return{globalSetting:T,loading:p.models.competitions,user:M}})(b)},KmYQ:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.ZeroPadding={pad:function(h,C){var D=C*4;h.clamp(),h.sigBytes+=D-(h.sigBytes%D||D)},unpad:function(h){for(var C=h.words,D=h.sigBytes-1,D=h.sigBytes-1;D>=0;D--)if(C[D>>>2]>>>24-D%4*8&255){h.sigBytes=D+1;break}}},L.pad.ZeroPadding})},LdHM:function(j,Q,k){"use strict";k.d(Q,"b",function(){return t}),k.d(Q,"a",function(){return E});var L=k("1OyB"),h=k("vuIU"),C=k("Ji7U"),D=k("LK+K"),u=k("q1tI"),f=k("rePB"),w=k("Ff2n"),d=k("ODXe"),o=k("4IlW"),l=k("bX4T"),a=k("YrtM"),_=k("TSYQ"),m=k.n(_),c=k("+nKL"),g=k("8OUc"),v=function(G,q){var ae=G.prefixCls,se=G.id,we=G.flattenOptions,Se=G.childrenAsData,de=G.values,xe=G.searchValue,he=G.multiple,ne=G.defaultActiveFirstOption,oe=G.height,te=G.itemHeight,le=G.notFoundContent,Y=G.open,Z=G.menuItemSelectedIcon,ge=G.virtual,ee=G.onSelect,$=G.onToggleOpen,X=G.onActiveValue,J=G.onScroll,me=G.onMouseEnter,ue="".concat(ae,"-item"),_e=Object(a.a)(function(){return we},[Y,we],function(et,ke){return ke[0]&&et[1]!==ke[1]}),He=u.useRef(null),$e=function(ke){ke.preventDefault()},Ye=function(ke){He.current&&He.current.scrollTo({index:ke})},tt=function(ke){for(var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Te=_e.length,fe=0;fe<Te;fe+=1){var ye=(ke+fe*Re+Te)%Te,Ee=_e[ye],Oe=Ee.group,We=Ee.data;if(!Oe&&!We.disabled)return ye}return-1},nt=u.useState(function(){return tt(0)}),it=Object(d.a)(nt,2),Me=it[0],Ce=it[1],Je=function(ke){Ce(ke);var Re=_e[ke];if(!Re){X(null,-1);return}X(Re.data.value,ke)};u.useEffect(function(){Je(ne!==!1?tt(0):-1)},[_e.length,xe]),u.useEffect(function(){var et=setTimeout(function(){if(!he&&Y&&de.size===1){var ke=Array.from(de)[0],Re=_e.findIndex(function(Te){var fe=Te.data;return fe.value===ke});Je(Re),Ye(Re)}});return function(){return clearTimeout(et)}},[Y]);var rt=function(ke){ke!==void 0&&ee(ke,{selected:!de.has(ke)}),he||$(!1)};if(u.useImperativeHandle(q,function(){return{onKeyDown:function(ke){var Re=ke.which;switch(Re){case o.a.UP:case o.a.DOWN:{var Te=0;if(Re===o.a.UP?Te=-1:Re===o.a.DOWN&&(Te=1),Te!==0){var fe=tt(Me+Te,Te);Ye(fe),Je(fe)}break}case o.a.ENTER:{var ye=_e[Me];ye&&!ye.data.disabled?rt(ye.data.value):rt(void 0),Y&&ke.preventDefault();break}case o.a.ESC:$(!1)}},onKeyUp:function(){},scrollTo:function(ke){Ye(ke)}}}),_e.length===0)return u.createElement("div",{role:"listbox",id:"".concat(se,"_list"),className:"".concat(ue,"-empty"),onMouseDown:$e},le);function ze(et){var ke=_e[et];if(!ke)return null;var Re=ke.data||{},Te=Re.value,fe=Re.label,ye=Re.children,Ee=Object(l.a)(Re,!0),Oe=Se?ye:fe;return ke?u.createElement("div",Object.assign({"aria-label":typeof Oe=="string"?Oe:null},Ee,{key:et,role:"option",id:"".concat(se,"_list_").concat(et),"aria-selected":de.has(Te)}),Te):null}return u.createElement(u.Fragment,null,u.createElement("div",{role:"listbox",id:"".concat(se,"_list"),style:{height:0,width:0,overflow:"hidden"}},ze(Me-1),ze(Me),ze(Me+1)),u.createElement(c.a,{itemKey:"key",ref:He,data:_e,height:oe,itemHeight:te,fullHeight:!1,onMouseDown:$e,onScroll:J,virtual:ge,onMouseEnter:me},function(et,ke){var Re,Te=et.group,fe=et.groupOption,ye=et.data,Ee=ye.label,Oe=ye.key;if(Te)return u.createElement("div",{className:m()(ue,"".concat(ue,"-group"))},Ee!==void 0?Ee:Oe);var We=ye.disabled,Ve=ye.value,ut=ye.title,ft=ye.children,Dt=ye.style,Mt=ye.className,lr=Object(w.a)(ye,["disabled","value","title","children","style","className"]),dr=de.has(Ve),Tt="".concat(ue,"-option"),$r=m()(ue,Tt,Mt,(Re={},Object(f.a)(Re,"".concat(Tt,"-grouped"),fe),Object(f.a)(Re,"".concat(Tt,"-active"),Me===ke&&!We),Object(f.a)(Re,"".concat(Tt,"-disabled"),We),Object(f.a)(Re,"".concat(Tt,"-selected"),dr),Re)),Ur=Se?ft:Ee,Br=!Z||typeof Z=="function"||dr;return u.createElement("div",Object.assign({},lr,{"aria-selected":dr,className:$r,title:ut,onMouseMove:function(){if(Me===ke||We)return;Je(ke)},onClick:function(){We||rt(Ve)},style:Dt}),u.createElement("div",{className:"".concat(Tt,"-content")},Ur||Ve),u.isValidElement(Z)||dr,Br&&u.createElement(g.a,{className:"".concat(ue,"-option-state"),customizeIcon:Z,customizeIconProps:{isSelected:dr}},dr?"\u2713":null))}))},x=u.forwardRef(v);x.displayName="OptionList";var n=x,i=function(){return null};i.isSelectOption=!0;var t=i,S=function(){return null};S.isSelectOptGroup=!0;var E=S,s=k("VTBJ"),P=k("Zm9Q");function O(B){var G=B.key,q=B.props,ae=q.children,se=q.value,we=Object(w.a)(q,["children","value"]);return Object(s.a)({key:G,value:se!==void 0?se:G,children:ae},we)}function b(B){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(P.a)(B).map(function(q,ae){if(!u.isValidElement(q)||!q.type)return null;var se=q.type.isSelectOptGroup,we=q.key,Se=q.props,de=Se.children,xe=Object(w.a)(Se,["children"]);return G||!se?O(q):Object(s.a)(Object(s.a)({key:"__RC_SELECT_GRP__".concat(we===null?ae:we,"__"),label:we},xe),{},{options:b(de)})}).filter(function(q){return q})}var y=k("2Qr1"),p=k("qNPg"),T=k("U8pU"),M=k("Kwbf"),N=k("WKfj");function I(B){var G=B.mode,q=B.options,ae=B.children,se=B.backfill,we=B.allowClear,Se=B.placeholder,de=B.getInputElement,xe=B.showSearch,he=B.onSearch,ne=B.defaultOpen,oe=B.autoFocus,te=B.labelInValue,le=B.value,Y=B.inputValue,Z=B.optionLabelProp,ge=G==="multiple"||G==="tags",ee=xe!==void 0?xe:ge||G==="combobox",$=q||b(ae);if(Object(M.a)(G!=="tags"||$.every(function(ue){return!ue.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),G==="tags"||G==="combobox"){var X=$.some(function(ue){return ue.options?ue.options.some(function(_e){return typeof("value"in _e?_e.value:_e.key)=="number"}):typeof("value"in ue?ue.value:ue.key)=="number"});Object(M.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(M.a)(G!=="combobox"||!Z,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(M.a)(G==="combobox"||!se,"`backfill` only works with `combobox` mode."),Object(M.a)(G==="combobox"||!de,"`getInputElement` only work with `combobox` mode."),Object(M.b)(G!=="combobox"||!de||!we||!Se,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),he&&!ee&&G!=="combobox"&&G!=="tags"&&Object(M.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(M.b)(!ne||oe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),le!=null){var J=Object(N.d)(le);Object(M.a)(!te||J.every(function(ue){return Object(T.a)(ue)==="object"&&("key"in ue||"value"in ue)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(M.a)(!ge||Array.isArray(le),"`value` should be array when `mode` is `multiple` or `tags`")}if(ae){var me=null;Object(P.a)(ae).some(function(ue){if(!u.isValidElement(ue)||!ue.type)return!1;var _e=ue.type;if(_e.isSelectOption)return!1;if(_e.isSelectOptGroup){var He=Object(P.a)(ue.props.children).every(function($e){return!u.isValidElement($e)||!ue.type||$e.type.isSelectOption?!0:(me=$e.type,!1)});return!He}return me=_e,!0}),me&&Object(M.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(me.displayName||me.name||me,"`.")),Object(M.a)(Y===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var K=I,H=Object(p.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:b,flattenOptions:y.d,getLabeledValue:y.e,filterOptions:y.b,isValueDisabled:y.g,findValueOption:y.c,warningProps:K,fillOptionsWithMissingValue:y.a}),W=function(B){Object(C.a)(q,B);var G=Object(D.a)(q);function q(){var ae;return Object(L.a)(this,q),ae=G.apply(this,arguments),ae.selectRef=u.createRef(),ae.focus=function(){ae.selectRef.current.focus()},ae.blur=function(){ae.selectRef.current.blur()},ae}return Object(h.a)(q,[{key:"render",value:function(){return u.createElement(H,Object.assign({ref:this.selectRef},this.props))}}]),q}(u.Component);W.Option=t,W.OptGroup=E;var z=W,U=Q.c=z},M8RZ:function(j,Q,k){"use strict";k.d(Q,"a",function(){return o});var L=k("fWQN"),h=k("mtLc"),C=k("yKVA"),D=k("879j"),u=k("q1tI"),f=k.n(u),w=k("i8i4"),d=k.n(w),o=function(l){Object(C.a)(_,l);var a=Object(D.a)(_);function _(m){var c;Object(L.a)(this,_),c=a.call(this,m);var g=window.document;return c.node=g.createElement("div"),g.body.appendChild(c.node),c}return Object(h.a)(_,[{key:"render",value:function(){var c=this.props.children;return Object(w.createPortal)(c,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),_}(f.a.Component)},MlIO:function(j,Q,k){(function(L,h){j.exports=Q=h(k("Ib8C"))})(this,function(L){return function(h){var C=L,D=C.lib,u=D.Base,f=D.WordArray,w=C.x64={},d=w.Word=u.extend({init:function(l,a){this.high=l,this.low=a}}),o=w.WordArray=u.extend({init:function(l,a){l=this.words=l||[],a!=h?this.sigBytes=a:this.sigBytes=l.length*8},toX32:function(){for(var l=this.words,a=l.length,_=[],m=0;m<a;m++){var c=l[m];_.push(c.high),_.push(c.low)}return f.create(_,this.sigBytes)},clone:function(){for(var l=u.clone.call(this),a=l.words=this.words.slice(0),_=a.length,m=0;m<_;m++)a[m]=a[m].clone();return l}})}(),L})},NFKh:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("MlIO"),k("F+F2"),k("qM6L"),k("ETIr"),k("wbyO"),k("cv67"),k("3y9D"),k("lPiR"),k("GRuw"),k("1uat"),k("uGsb"),k("5hvy"),k("ELcG"),k("WYAk"),k("e7zE"),k("K3mO"),k("OLod"),k("ALsQ"),k("9OqN"),k("qu8F"),k("S6kV"),k("gb/T"),k("qBft"),k("oRuE"),k("jO9C"),k("KmYQ"),k("uGxW"),k("bQjk"),k("wZgz"),k("pA7S"),k("w7YG"),k("E4JC"),k("PVpz"))})(this,function(L){return L})},NLgs:function(j,Q,k){"use strict";k.d(Q,"b",function(){return S}),k.d(Q,"f",function(){return E}),k.d(Q,"g",function(){return s}),k.d(Q,"e",function(){return O}),k.d(Q,"d",function(){return b}),k.d(Q,"a",function(){return y}),k.d(Q,"c",function(){return p});var L=k("9og8"),h=k("2qtc"),C=k("kLXV"),D=k("miYZ"),u=k("tsqr"),f=k("WmNS"),w=k.n(f),d=k("q1tI"),o=k.n(d),l=k("9kvl"),a=k("xKgJ"),_=k("RCxd"),m=k("mOS8"),c=k.n(m),g=k("1ZF9"),v=k.n(g),x=k("WdTA"),n=k.n(x),i=k("m3rI"),t=k("1vsH"),S=function(M){var N=Object(l.c)()._store.getState(),I=N.globalSetting;if(!Object(a.p)()){var K;return I!=null&&(K=I.setting)!==null&&K!==void 0&&K.sso_url?(u.b.warning("\u7528\u6237\u8FD8\u672A\u767B\u5F55\uFF0C\u6B63\u5728\u8DF3\u8F6C\u767B\u5F55"),setTimeout(function(){var H;window.location.href=I==null||((H=I.setting)===null||H===void 0)?void 0:H.sso_url},1e3)):s(M),!1}return!0},E=function(M){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(s(M)&&P(N))},s=function(M){return Object(a.p)()?!0:(Object(t.Z)(),!1)},P=function(){var M,N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,I=Object(l.c)()._store.getState(),K=I.user;return(M=K.userInfo)!==null&&M!==void 0&&M.profile_completed?!0:(C.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:N?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){l.d.push("/account/profile/edit")}}),!1)},O=function(){var M,N=Object(l.c)()._store.getState(),I=N.user;return(M=I.userInfo)!==null&&M!==void 0&&M.professional_certification?!0:(C.a.confirm({title:"\u63D0\u793A",centered:!0,content:o.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(t.R)("/account/certification")}}),!1)},b=function(){return Object(a.a)()?!0:(C.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:o.a.createElement("div",{className:"tc",style:{marginLeft:-38}},o.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u626B\u7801\u52A0\u7FA4@\u7FA4\u7BA1\u7406\u5458\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650\u54E6\uFF01"),o.a.createElement("img",{src:Object(a.t)()?n.a:"".concat(i.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},y=function(M,N){return M?!0:(C.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:o.a.createElement("div",null,o.a.createElement("p",null,N||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),o.a.createElement("div",{style:{marginLeft:"110px"}},o.a.createElement("img",{src:v.a,width:200}),o.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(t.R)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},p=function(M){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",I=Object(l.c)()._store.getState(),K=I.shixunsDetail.detail;return(K==null?void 0:K.public)===2||(K==null?void 0:K.public)===1||(K==null?void 0:K.shixun_status)===3?(C.a.info({centered:!0,icon:o.a.createElement(_.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:o.a.createElement("div",{className:"tc",style:{marginLeft:-38}},o.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},o.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(K==null?void 0:K.public)===2?"\u5DF2\u516C\u5F00":(K==null?void 0:K.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",N,"\u3002"),o.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),o.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:c.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(K==null?void 0:K.shixun_status)===2?(C.a.confirm({centered:!0,icon:o.a.createElement(_.a,null),title:"\u63D0\u793A",content:o.a.createElement("div",null,o.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",N,"\u3002"),o.a.createElement("br",null),o.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){C.a.confirm({width:440,centered:!0,icon:o.a.createElement(_.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var W=Object(L.a)(w.a.mark(function U(){var B;return w.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.next=2,M({type:"shixunsDetail/cancelRelease",payload:{id:K==null?void 0:K.identifier}});case 2:B=q.sent,B.status!==401&&(u.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),M({type:"shixunsDetail/getShixunsDetail",payload:{id:K==null?void 0:K.identifier}}),M({type:"practiceSetting/getCommonData",payload:{id:K==null?void 0:K.identifier}}));case 4:case"end":return q.stop()}},U)}));function z(){return W.apply(this,arguments)}return z}()})}}),!0):!1}},NnUe:function(j,Q,k){j.exports={modal:"modal___sZeHv",colorBlue:"colorBlue___3FmfG",formWrap:"formWrap___3YEqH",flexRow:"flexRow___37Sa0",flexColumn:"flexColumn___1ykGy",example:"example___7mYRk",exampleImg:"exampleImg___UGH9Y",colorOrange:"colorOrange___1IJLa",uploader:"uploader___3f2Sm",uploadImg:"uploadImg___3WCoA",imageTip:"imageTip___FhklW",uploadTipIcon:"uploadTipIcon___2YZJx",uploadTip:"uploadTip___1eikX",color05101a:"color05101a___1Nuwt",viewLargerImg:"viewLargerImg___Ek8jW",footerWrap:"footerWrap___F9F0q",note:"note___1U6xc",schoolHintWrap:"schoolHintWrap___31S22",colorCDCDCD:"colorCDCDCD___1KqvR",color0152d9:"color0152d9___1YXxu"}},NvD2:function(j,Q,k){"use strict";k.d(Q,"a",function(){return f});var L=k("Kwbf");function h(w,d){var o=new Set;return w.forEach(function(l){d.has(l)||o.add(l)}),o}function C(w){var d=w||{},o=d.disabled,l=d.disableCheckbox,a=d.checkable;return!!(o||l)||a===!1}function D(w,d,o,l){for(var a=new Set(w),_=new Set,m=0;m<=o;m+=1){var c=d.get(m)||new Set;c.forEach(function(n){var i=n.key,t=n.node,S=n.children,E=S===void 0?[]:S;a.has(i)&&!l(t)&&E.filter(function(s){return!l(s.node)}).forEach(function(s){a.add(s.key)})})}for(var g=new Set,v=o;v>=0;v-=1){var x=d.get(v)||new Set;x.forEach(function(n){var i=n.parent,t=n.node;if(l(t)||!n.parent||g.has(n.parent.key))return;if(l(n.parent.node)){g.add(i.key);return}var S=!0,E=!1;(i.children||[]).filter(function(s){return!l(s.node)}).forEach(function(s){var P=s.key,O=a.has(P);S&&!O&&(S=!1),!E&&(O||_.has(P))&&(E=!0)}),S&&a.add(i.key),E&&_.add(i.key),g.add(i.key)})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(h(_,a))}}function u(w,d,o,l,a){for(var _=new Set(w),m=new Set(d),c=0;c<=l;c+=1){var g=o.get(c)||new Set;g.forEach(function(i){var t=i.key,S=i.node,E=i.children,s=E===void 0?[]:E;!_.has(t)&&!m.has(t)&&!a(S)&&s.filter(function(P){return!a(P.node)}).forEach(function(P){_.delete(P.key)})})}m=new Set;for(var v=new Set,x=l;x>=0;x-=1){var n=o.get(x)||new Set;n.forEach(function(i){var t=i.parent,S=i.node;if(a(S)||!i.parent||v.has(i.parent.key))return;if(a(i.parent.node)){v.add(t.key);return}var E=!0,s=!1;(t.children||[]).filter(function(P){return!a(P.node)}).forEach(function(P){var O=P.key,b=_.has(O);E&&!b&&(E=!1),!s&&(b||m.has(O))&&(s=!0)}),E||_.delete(t.key),s&&m.add(t.key),v.add(t.key)})}return{checkedKeys:Array.from(_),halfCheckedKeys:Array.from(h(m,_))}}function f(w,d,o,l){var a=[],_;l?_=l:_=C;var m=new Set(w.filter(function(x){var n=!!o[x];return n||a.push(x),n})),c=new Map,g=0;Object.keys(o).forEach(function(x){var n=o[x],i=n.level,t=c.get(i);t||(t=new Set,c.set(i,t)),t.add(n),g=Math.max(g,i)}),Object(L.a)(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map(function(x){return"'".concat(x,"'")}).join(", ")));var v;return d===!0?v=D(m,c,g,_):v=u(m,d.halfCheckedKeys,c,g,_),v}},OLod:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("K3mO"))})(this,function(L){L.lib.Cipher||function(h){var C=L,D=C.lib,u=D.Base,f=D.WordArray,w=D.BufferedBlockAlgorithm,d=C.enc,o=d.Utf8,l=d.Base64,a=C.algo,_=a.EvpKDF,m=D.Cipher=w.extend({cfg:u.extend(),createEncryptor:function(p,T){return this.create(this._ENC_XFORM_MODE,p,T)},createDecryptor:function(p,T){return this.create(this._DEC_XFORM_MODE,p,T)},init:function(p,T,M){this.cfg=this.cfg.extend(M),this._xformMode=p,this._key=T,this.reset()},reset:function(){w.reset.call(this),this._doReset()},process:function(p){return this._append(p),this._process()},finalize:function(p){p&&this._append(p);var T=this._doFinalize();return T},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function p(T){return typeof T=="string"?y:P}return function(T){return{encrypt:function(M,N,I){return p(N).encrypt(T,M,N,I)},decrypt:function(M,N,I){return p(N).decrypt(T,M,N,I)}}}}()}),c=D.StreamCipher=m.extend({_doFinalize:function(){var p=this._process(!0);return p},blockSize:1}),g=C.mode={},v=D.BlockCipherMode=u.extend({createEncryptor:function(p,T){return this.Encryptor.create(p,T)},createDecryptor:function(p,T){return this.Decryptor.create(p,T)},init:function(p,T){this._cipher=p,this._iv=T}}),x=g.CBC=function(){var p=v.extend();p.Encryptor=p.extend({processBlock:function(M,N){var I=this._cipher,K=I.blockSize;T.call(this,M,N,K),I.encryptBlock(M,N),this._prevBlock=M.slice(N,N+K)}}),p.Decryptor=p.extend({processBlock:function(M,N){var I=this._cipher,K=I.blockSize,H=M.slice(N,N+K);I.decryptBlock(M,N),T.call(this,M,N,K),this._prevBlock=H}});function T(M,N,I){var K,H=this._iv;H?(K=H,this._iv=h):K=this._prevBlock;for(var W=0;W<I;W++)M[N+W]^=K[W]}return p}(),n=C.pad={},i=n.Pkcs7={pad:function(p,T){for(var M=T*4,N=M-p.sigBytes%M,I=N<<24|N<<16|N<<8|N,K=[],H=0;H<N;H+=4)K.push(I);var W=f.create(K,N);p.concat(W)},unpad:function(p){var T=p.words[p.sigBytes-1>>>2]&255;p.sigBytes-=T}},t=D.BlockCipher=m.extend({cfg:m.cfg.extend({mode:x,padding:i}),reset:function(){var p;m.reset.call(this);var T=this.cfg,M=T.iv,N=T.mode;this._xformMode==this._ENC_XFORM_MODE?p=N.createEncryptor:(p=N.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==p?this._mode.init(this,M&&M.words):(this._mode=p.call(N,this,M&&M.words),this._mode.__creator=p)},_doProcessBlock:function(p,T){this._mode.processBlock(p,T)},_doFinalize:function(){var p,T=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(T.pad(this._data,this.blockSize),p=this._process(!0)):(p=this._process(!0),T.unpad(p)),p},blockSize:128/32}),S=D.CipherParams=u.extend({init:function(p){this.mixIn(p)},toString:function(p){return(p||this.formatter).stringify(this)}}),E=C.format={},s=E.OpenSSL={stringify:function(p){var T,M=p.ciphertext,N=p.salt;return N?T=f.create([1398893684,1701076831]).concat(N).concat(M):T=M,T.toString(l)},parse:function(p){var T,M=l.parse(p),N=M.words;return N[0]==1398893684&&N[1]==1701076831&&(T=f.create(N.slice(2,4)),N.splice(0,4),M.sigBytes-=16),S.create({ciphertext:M,salt:T})}},P=D.SerializableCipher=u.extend({cfg:u.extend({format:s}),encrypt:function(p,T,M,N){N=this.cfg.extend(N);var I=p.createEncryptor(M,N),K=I.finalize(T),H=I.cfg;return S.create({ciphertext:K,key:M,iv:H.iv,algorithm:p,mode:H.mode,padding:H.padding,blockSize:p.blockSize,formatter:N.format})},decrypt:function(p,T,M,N){N=this.cfg.extend(N),T=this._parse(T,N.format);var I=p.createDecryptor(M,N).finalize(T.ciphertext);return I},_parse:function(p,T){return typeof p=="string"?T.parse(p,this):p}}),O=C.kdf={},b=O.OpenSSL={execute:function(p,T,M,N){N||(N=f.random(64/8));var I=_.create({keySize:T+M}).compute(p,N),K=f.create(I.words.slice(T),M*4);return I.sigBytes=T*4,S.create({key:I,iv:K,salt:N})}},y=D.PasswordBasedCipher=P.extend({cfg:P.cfg.extend({kdf:b}),encrypt:function(p,T,M,N){N=this.cfg.extend(N);var I=N.kdf.execute(M,p.keySize,p.ivSize);N.iv=I.iv;var K=P.encrypt.call(this,p,T,I.key,N);return K.mixIn(I),K},decrypt:function(p,T,M,N){N=this.cfg.extend(N),T=this._parse(T,N.format);var I=N.kdf.execute(M,p.keySize,p.ivSize,T.salt);N.iv=I.iv;var K=P.decrypt.call(this,p,T,I.key,N);return K}})}()})},OZM5:function(j,Q,k){"use strict";k.d(Q,"b",function(){return l}),k.d(Q,"a",function(){return a}),k.d(Q,"k",function(){return _}),k.d(Q,"h",function(){return m}),k.d(Q,"i",function(){return c}),k.d(Q,"g",function(){return g}),k.d(Q,"c",function(){return v}),k.d(Q,"d",function(){return x}),k.d(Q,"j",function(){return t}),k.d(Q,"e",function(){return S}),k.d(Q,"f",function(){return E});var L=k("KQm4"),h=k("U8pU"),C=k("Ff2n"),D=k("q1tI"),u=k.n(D),f=k("Kwbf"),w=k("WaYH"),d=.25,o=2;function l(s,P){var O=s.slice(),b=O.indexOf(P);return b>=0&&O.splice(b,1),O}function a(s,P){var O=s.slice();return O.indexOf(P)===-1&&O.push(P),O}function _(s){return s.split("-")}function m(s,P){return"".concat(s,"-").concat(P)}function c(s){return s&&s.type&&s.type.isTreeNode}function g(s,P){var O=[s],b=P[s];function y(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];p.forEach(function(T){var M=T.key,N=T.children;O.push(M),y(N)})}return y(b.children),O}function v(s,P){var O=s.clientY,b=P.selectHandle.getBoundingClientRect(),y=b.top,p=b.bottom,T=b.height,M=Math.max(T*d,o);return O<=y+M?-1:O>=p-M?1:0}function x(s,P){if(!s)return;var O=P.multiple;return O?s.slice():s.length?[s[0]]:s}var n=function(P){return P};function i(s,P){if(!s)return[];var O=P||{},b=O.processProps,y=b===void 0?n:b,p=Array.isArray(s)?s:[s];return p.map(function(T){var M=T.children,N=Object(C.a)(T,["children"]),I=i(M,P);return u.a.createElement(w.a,Object.assign({},y(N)),I)})}function t(s){if(!s)return null;var P;if(Array.isArray(s))P={checkedKeys:s,halfCheckedKeys:void 0};else if(Object(h.a)(s)==="object")P={checkedKeys:s.checked||void 0,halfCheckedKeys:s.halfChecked||void 0};else return Object(f.a)(!1,"`checkedKeys` is not an array or an object"),null;return P}function S(s,P){var O=new Set;function b(y){if(O.has(y))return;var p=P[y];if(!p)return;O.add(y);var T=p.parent,M=p.node;if(M.disabled)return;T&&b(T.key)}return(s||[]).forEach(function(y){b(y)}),Object(L.a)(O)}function E(s){var P={};return Object.keys(s).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(P[O]=s[O])}),P}},Ot1p:function(j,Q,k){"use strict";var L=k("2qtc"),h=k("kLXV"),C=k("rAM+"),D=k("miYZ"),u=k("tsqr"),f=k("tJVT"),w=k("jrin"),d=k("q1tI"),o=k.n(d),l=k("VrN/"),a=k.n(l),_=k("bdgK"),m=k("p77/"),c=k("Bd2K"),g=k("ELLl"),v=k("19Vz"),x=k("lZu9"),n=k("+NIl"),i=k("kSUc"),t=k("9Bee"),S=function(Te){var fe=Te.value,ye=fe===void 0?"":fe,Ee=Te.className,Oe=Te.showTextOnly,We=Te.showLines,Ve=Te.style,ut=Ve===void 0?{}:Ve,ft=Object(d.useMemo)(function(){return""},[ye]);return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{dangerouslySetInnerHTML:{__html:ft}}))},E=k("0Owb"),s=k("dejd"),P=k("C+DQ"),O=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function b(Te){var fe=Te.onActionCallback,ye=Te.title,Ee=Te.icon,Oe=Te.actionName,We=Te.className,Ve=We===void 0?"":We,ut=Te.children;function ft(){fe(Oe)}return o.a.createElement("a",{title:ye,className:Ve,onClick:ft},o.a.createElement("i",{className:"md-iconfont ".concat(Ee)}),ut)}var y=function(Te){var fe=Te.watch,ye=Te.showNullButton,Ee=Te.onActionCallback,Oe=Te.fullScreen,We=Te.insertTemp,Ve=Te.hidetoolBar,ut=[].concat(O,[{title:"".concat(fe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(fe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return o.a.createElement("ul",{className:"markdown-toolbar-container"},!Ve&&ut.map(function(ft,Dt){return o.a.createElement("li",{key:Dt},ft.actionName?o.a.createElement(b,Object(E.a)({},ft,{onActionCallback:Ee})):o.a.createElement("span",{className:"v-line"}))}),ye?o.a.createElement("li",null,o.a.createElement(b,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ee},o.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,We&&o.a.createElement("li",null,o.a.createElement(b,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(We),onActionCallback:Ee},o.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),o.a.createElement("li",{className:"btn-full-screen"},o.a.createElement(b,{icon:"".concat(Oe?"icon-shrink":"icon-enlarge"),title:Oe?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ee})))},p=k("M8RZ"),T=k("+L6B"),M=k("2/Rp"),N=k("y8nQ"),I=k("Vl3Y"),K=k("5NDa"),H=k("5rEg"),W={labelCol:{span:4},wrapperCol:{span:20}},z=function(Te){var fe=Te.callback,ye=Te.onCancel;function Ee(Oe){fe(Oe)}return o.a.createElement(I.a,Object(E.a)({},W,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ee}),o.a.createElement(I.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},o.a.createElement(H.a,null)),o.a.createElement(I.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},o.a.createElement(H.a,null)),o.a.createElement("div",{className:"flex-container flex-end"},o.a.createElement(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),o.a.createElement(M.a,{type:"ghost",onClick:ye},"\u53D6\u6D88")))},U=k("7ahc"),B=k("HmJG"),G=k("BjJ7"),q=I.a.useForm,ae={width:280,marginRight:10},se={labelCol:{span:5},wrapperCol:{span:19}},we=function(Te){var fe=Te.callback,ye=Te.onCancel,Ee=q(),Oe=Object(f.a)(Ee,1),We=Oe[0];function Ve(Dt){fe(Dt)}function ut(Dt,Mt){We.setFieldsValue({src:"/api/attachments/".concat(Dt.id),type:Mt.type})}function ft(Dt){var Mt=Dt.target.files[0];de(Mt,ut)}return o.a.createElement(I.a,Object(E.a)({form:We},se,{className:"upload-image-panel",onFinish:Ve}),o.a.createElement(I.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},o.a.createElement("div",{className:"flex-container"},o.a.createElement(I.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},o.a.createElement(H.a,{style:ae})),o.a.createElement(Se,{onFileChange:ft}))),o.a.createElement(I.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},o.a.createElement(H.a,{style:{width:264}})),o.a.createElement(I.a.Item,{style:{textAlign:"right"}},o.a.createElement(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),o.a.createElement(M.a,{type:"ghost",onClick:ye},"\u53D6\u6D88")))};function Se(Te){var fe=Te.onFileChange;return o.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",o.a.createElement("input",{type:"file",onChange:fe}))}function de(Te,fe){if(!Te)throw new String("\u6CA1\u6709\u6587\u4EF6");var ye=new FormData;ye.append("editormd-image-file",Te),ye.append("file_param_name","editormd-image-file"),ye.append("byxhr","true");var Ee=new window.XMLHttpRequest;Ee.withCredentials=!0,Ee.addEventListener("load",function(Oe){fe(JSON.parse(Oe.target.responseText),Te)},!1),Ee.addEventListener("error",function(Oe){console.error(Oe)},!1),Ee.open("POST","".concat(G.a,"/api/attachments.json")),Ee.send(ye)}var xe=k("giR+"),he=k("fyUT"),ne=k("7Kak"),oe=k("9yH6"),te=oe.a.Group,le={margin:"0 8px"},Y=function(Te){var fe=Te.callback,ye=Te.onCancel;function Ee(Oe){fe(Oe)}return o.a.createElement(I.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ee},o.a.createElement("div",{className:"flex-container"},o.a.createElement("span",{style:le},"\u5355\u5143\u683C\u6570\uFF1A"),o.a.createElement("span",{style:le},"\u884C\u6570"),o.a.createElement(I.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},o.a.createElement(he.a,null)),o.a.createElement("span",{style:le},"\u5217\u6570"),o.a.createElement(I.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},o.a.createElement(he.a,null))),o.a.createElement("div",{className:"flex-container",style:{marginTop:12}},o.a.createElement("span",{style:le},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),o.a.createElement(I.a.Item,{name:"align"},o.a.createElement(te,null,o.a.createElement(oe.a,{value:"default"},o.a.createElement("i",{className:"fa fa-align-justify"})),o.a.createElement(oe.a,{value:"left"},o.a.createElement("i",{className:"fa fa-align-left"})),o.a.createElement(oe.a,{value:"center"},o.a.createElement("i",{className:"fa fa-align-center"})),o.a.createElement(oe.a,{value:"right"},o.a.createElement("i",{className:"fa fa-align-right"}))))),o.a.createElement("div",{className:"flex-container flex-end"},o.a.createElement(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),o.a.createElement(M.a,{type:"ghost",onClick:ye},"\u53D6\u6D88")))},Z=k("m3rI"),ge=k("wMS7"),ee=k.n(ge),$="link",X="upload-image",J="code-block",me="add-table",ue="------------",_e={default:ue,left:":".concat(ue),center:":".concat(ue,":"),right:"".concat(ue,":")},He=k("9VGf"),$e,Ye;function tt(){}var nt=0,it=1e4,Me="\u2581",Ce=`
|
|
|
**\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 Je(Te){return/^\d+$/.test(Te)?"".concat(Te,"px"):Te}var rt=navigator.platform.toUpperCase().indexOf("MAC")>=0,ze=rt?"Cmd":"Ctrl",et=($e={},Object(w.a)($e,ze+"-B","bold"),Object(w.a)($e,ze+"-I","italic"),$e),ke=(Ye={},Object(w.a)(Ye,$,"\u6DFB\u52A0\u94FE\u63A5"),Object(w.a)(Ye,J,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(w.a)(Ye,X,"\u6DFB\u52A0\u56FE\u7247"),Object(w.a)(Ye,me,"\u6DFB\u52A0\u8868\u683C"),Ye),Re=Q.a=function(Te){var fe=Te.defaultValue,ye=fe===void 0?"":fe,Ee=Te.onChange,Oe=Te.width,We=Oe===void 0?"100%":Oe,Ve=Te.height,ut=Ve===void 0?400:Ve,ft=Te.miniToolbar,Dt=ft===void 0?!1:ft,Mt=Te.isFocus,lr=Mt===void 0?!1:Mt,dr=Te.watch,Tt=Te.insertTemp,$r=Te.mode,Ur=$r===void 0?"markdown":$r,Br=Te.id,ln=Br===void 0?"markdown-editor-id":Br,br=Te.showResizeBar,Zr=br===void 0?!1:br,qr=Te.noStorage,Pr=qr===void 0?!1:qr,fn=Te.showNullButton,bn=fn===void 0?!1:fn,Gn=Te.hidetoolBar,hn=Gn===void 0?!1:Gn,ca=Te.fullScreen,wa=ca===void 0?!1:ca,mn=Te.onBlur,Yt=Te.onCMBeforeChange,kn=Te.onFullScreen,va=Te.className,Vn=va===void 0?"":va,Xr=Te.disablePaste,Fn=Xr===void 0?!1:Xr,da=Te.placeholder,Zn=da===void 0?"":da,St=Te.values,ir=St===void 0?"":St,$n=Object(d.useState)(null),na=Object(f.a)($n,2),It=na[0],ga=na[1],Yn=Object(d.useState)(ye),cr=Object(f.a)(Yn,2),Mn=cr[0],Wn=cr[1],Jn=Object(d.useState)(dr),Nn=Object(f.a)(Jn,2),fa=Nn[0],Er=Nn[1],ot=Object(d.useState)(wa),ar=Object(f.a)(ot,2),xr=ar[0],on=ar[1],un=Object(d.useState)(""),_n=Object(f.a)(un,2),Tn=_n[0],Sn=_n[1],ya=Object(d.useState)(0),Ta=Object(f.a)(ya,2),Sa=Ta[0],qn=Ta[1],vi=Object(d.useState)(ut),gi=Object(f.a)(vi,2),Ka=gi[0],Ma=gi[1],wi=Object(d.useState)(!1),ui=Object(f.a)(wi,2),Ti=ui[0],ci=ui[1],za=Object(d.useRef)(),Ca=Object(d.useRef)(),Qa=Object(d.useRef)(),ei=Object(d.useRef)();Object(d.useEffect)(function(){Wn(ir),It==null||It.setValue(ir)},[ir]),Object(d.useEffect)(function(){kn==null||kn(xr)},[xr]),Object(d.useEffect)(function(){if(za.current){var _t=a.a.fromTextArea(za.current,{mode:Ur,lineNumbers:!Dt,lineWrapping:!0,value:ye,autoCloseTags:!0,autoCloseBrackets:!0});lr&&_t.focus();function wt(yt,Ct){if(Fn){Ct.preventDefault();return}var At=Ct.clipboardData;if(At){var jt=At.types.toString(),Vt=At.items,Xe=["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(jt==="Files"||At.types.indexOf("Files")>-1){if(Ct.preventDefault(),Ur=="stex")return;try{var qt,sr=Vt[1];((qt=Vt[0])===null||qt===void 0?void 0:qt.kind)==="file"&&(sr=Vt[0]);var er=sr.getAsFile(),Bt=er.name.split(".").pop();de(er,function(Nt){if(Nt.id){var $t,Ft,Sr;(er==null||(($t=er.type)===null||$t===void 0)?void 0:$t.indexOf("image"))>-1?_t.replaceSelection(".concat(Nt.content_type,")")):(er==null||((Ft=er.type)===null||Ft===void 0)?void 0:Ft.indexOf("video"))>-1?_t.replaceSelection('<video width="100%" controls src="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(Nt.id,'"></video>')):(er==null||((Sr=er.type)===null||Sr===void 0)?void 0:Sr.indexOf("pdf"))>-1?_t.replaceSelection('<a href="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(er.type,'&disposition=inline" target="_blank">').concat(er.name,"</a>")):Xe.includes(Bt)?_t.replaceSelection('<a href="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(Nt.id,'?type=office&disposition=inline" target="_blank">').concat(er.name,"</a>")):_t.replaceSelection("[".concat(er.name,"](").concat(Z.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(Nt.content_type,")"))}else(Nt==null?void 0:Nt.status)===401&&(document.location.href="/user/login")})}catch(Nt){u.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return _t.on("paste",wt),ga(_t),function(){_t.off("paste",wt)}}},[]);var ht=Object(d.useCallback)(function(){if(Ca.current)try{}catch(_t){console.log(_t,"---- to set md editor body height")}},[Ka,Ca,xr]);Object(d.useEffect)(function(){function _t(){var yt=new _.default(function(Ct){var At=Object(C.a)(Ct),jt;try{for(At.s();!(jt=At.n()).done;){var Vt=jt.value;(Vt.target.offsetHeight>0||Vt.target.offsetWidth>0)&&(ht(),It.setSize("100%","100%"),It.refresh())}}catch(Xe){At.e(Xe)}finally{At.f()}});return yt.observe(za.current.parentElement),yt}if(It){var wt=_t();return function(){wt.unobserve(za.current.parentElement)}}},[It,ht]),Object(d.useEffect)(function(){if(It){for(var _t=[],wt=function(){var Vt=Ct[yt];At=Object(f.a)(Vt,2);var Xe=At[0],qt=At[1],sr=Object(w.a)({},Xe,function(){Ze(qt)});_t.push(sr),It.addKeyMap(sr)},yt=0,Ct=Object.entries(et);yt<Ct.length;yt++){var At;wt()}return function(){var jt=Object(C.a)(_t),Vt;try{for(jt.s();!(Vt=jt.n()).done;){var Xe=Vt.value;It.removeKeyMap(Xe)}}catch(qt){jt.e(qt)}finally{jt.f()}}}},[It]),Object(d.useEffect)(function(){wa!==xr&&on(wa)},[wa]),Object(He.a)(function(){if(!Pr&&Sa>0){var _t=new Date().getTime(),wt=window.sessionStorage.getItem(ln);_t>=Sa+it&&(!wt||wt!==Mn)&&(window.sessionStorage.setItem(ln,Mn),ci(!0))}},it),Object(d.useEffect)(function(){Er(dr)},[It,dr]),Object(d.useEffect)(function(){It&&(lr&&It.focus())},[It,lr]),Object(d.useEffect)(function(){if(fa&&It){var _t=It.getScrollerElement();function wt(yt){var Ct=yt.target;if(ei.current){var At=Ct.scrollTop/Ct.scrollHeight;ei.current.scrollTop=ei.current.scrollHeight*At}}return _t.addEventListener("scroll",wt),function(){_t.removeEventListener("scroll",wt)}}},[It,fa]),Object(d.useEffect)(function(){if(It&&Yt){function _t(wt,yt){Yt(wt,yt)}return It.on("beforeChange",_t),function(){It.off("beforeChange",_t)}}},[It,Yt]),Object(d.useEffect)(function(){if(It&&mn){function _t(){mn(It.getValue())}return It.on("blur",_t),function(){It.off("blur",_t)}}},[It,mn]),Object(d.useEffect)(function(){if(It){function _t(wt){var yt=ee.a.sanitize(wt.getValue());Wn(yt),qn(new Date().getTime()),wt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ee&&Ee(yt)}return It.on("change",_t),function(){It.off("change",_t)}}},[It,Ee]),Object(d.useEffect)(function(){It&&(ye==null?(It.setValue(""),Wn("")):ye!==It.getValue()&&(It.setValue(ye),Wn(ye),It.setCursor(It.lineCount(),0)))},[It,ye]);var Ze=Object(d.useCallback)(function(_t){var wt=It.getCursor(),yt=It.getSelection(),Ct=yt.split(`
|
|
|
`);switch(_t){case"bold":return It.replaceSelection("**"+yt+"**"),yt===""&&It.setCursor(wt.line,wt.ch+2),It.focus();case"italic":return It.replaceSelection("*"+yt+"*"),yt===""&&It.setCursor(wt.line,wt.ch+1),It.focus();case"code":return It.replaceSelection("`"+yt+"`"),yt===""&&It.setCursor(wt.line,wt.ch+1),It.focus();case"inline-latex":return It.replaceSelection("`$$"+yt+"$$`"),yt===""&&It.setCursor(wt.line,wt.ch+3),It.focus();case"latex":return It.replaceSelection("```latex\n"+yt+"\n```"),It.setCursor(wt.line+1,yt.length+1),It.focus();case"line-break":return It.replaceSelection(`<br/>
|
|
|
`),It.focus();case"list-ul":return yt===""?It.replaceSelection("- "+yt):It.replaceSelection(Ct.map(function(At){return At===""?"":"- ".concat(At)}).join(`
|
|
|
`)),It.focus();case"list-ol":return yt===""?It.replaceSelection("1. "+yt):It.replaceSelection(Ct.map(function(At,jt){return At===""?"":"".concat(jt+1,". ").concat(At)}).join(`
|
|
|
`)),It.focus();case"add-null-ch":return yt===""&&It.setCursor(wt.line,wt.ch+1),It.replaceSelection(Me),It.focus();case"inster-template-1":return yt===""&&It.setCursor(wt.line,wt.ch),It.replaceSelection(Ce),It.focus();case"eraser":return It.setValue(""),It.focus();case"trigger-watch":return Er(!fa),It.focus();case"trigger-full-screen":return on(!xr),It.focus();case $:Sn($);return;case J:Sn(J);return;case X:Sn(X);return;case me:Sn(me);return;default:throw new Error}},[It,fa,xr]),dt=Object(d.useCallback)(function(_t){Sn("");switch(Tn){case $:var wt=_t.title,yt=_t.link;return It.replaceSelection("[".concat(wt,"](").concat(yt,")")),It.focus();case J:var Ct=_t.language,At=_t.content;return It.replaceSelection(["```"+Ct,At,"```"].join(`
|
|
|
`)),It.focus();case X:var jt=_t.src,Vt=_t.alt;return It.replaceSelection(".concat(jt,' "').concat(Vt,'" )')),It.focus();case me:for(var Xe=_t.row,qt=_t.col,sr=_t.align,er=`
|
|
|
`,Bt=0;Bt<Xe;Bt++){for(var Nt=[],$t=[],Ft=0;Ft<qt;Ft++)Bt===1&&$t.push(_e[sr]),Nt.push(" ");Bt===1&&(er+="| ".concat($t.join(" | "),` |
|
|
|
`)),er+="| ".concat(Nt.join(qt===1?"":" | "),` |
|
|
|
`)}return It.replaceSelection(er+`
|
|
|
`),It.focus();default:throw new Error}},[It,Tn]),Et=Object(d.useMemo)(function(){switch(Tn){case $:return o.a.createElement(z,{callback:dt,onCancel:Ut});case J:return o.a.createElement(U.b,{callback:dt,onCancel:Ut});case X:return o.a.createElement(we,{callback:dt,onCancel:Ut});case me:return o.a.createElement(Y,{callback:dt,onCancel:Ut});default:return null}},[Tn]);function Ut(){Sn("")}Object(d.useEffect)(function(){if(Qa.current){var _t=Qa.current,wt=!1,yt=0;function Ct(Vt){wt=!0,yt=Vt.pageY}function At(){wt=!1}function jt(Vt){if(wt){var Xe=Vt.pageY-yt;Xe<0&&(Xe=0),Xe>300&&(Xe=300);var qt=ut+Xe+"px";Ma(qt)}}return _t.addEventListener("mousedown",Ct),document.addEventListener("mousemove",jt),document.addEventListener("mouseup",At),function(){_t.removeEventListener("mousedown",Ct),document.removeEventListener("mousemove",jt),document.removeEventListener("mouseup",At)}}},[It,Qa]),Object(d.useEffect)(function(){Ma(ut)},[ut]);var Pt=Je(We),Zt=Je(Ka),kt={width:Pt,height:Zt},lt=Object(d.useMemo)(function(){if(Sa){var _t=new Date(Sa),wt=_t.getHours(),yt=_t.getMinutes(),Ct=_t.getSeconds();return wt=wt<10?"0"+wt:wt,yt=yt<10?"0"+yt:yt,Ct=Ct<10?"0"+Ct:Ct,"".concat(wt,":").concat(yt,":").concat(Ct)}return 0},[Sa]);function mt(){window.sessionStorage.removeItem(ln),ci(!1),qn(0)}function xt(){ci(!1),qn(0),It.setValue(window.sessionStorage.getItem(ln))}return o.a.createElement(d.Fragment,null,o.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ca},o.a.createElement("div",{className:"markdown-editor-container ".concat(Vn," ").concat(fa?"on-preview":""," ").concat(Dt?"mini":""," ").concat(xr?"full-screen":""),style:kt},o.a.createElement(y,{insertTemp:Tt,watch:fa,fullScreen:xr,showNullButton:bn,onActionCallback:Ze,hidetoolBar:hn}),o.a.createElement("div",{className:"markdown-editor-body"},o.a.createElement("div",{className:"codemirror-container"},o.a.createElement("textarea",{ref:za,placeholder:Zn})),fa?o.a.createElement("div",{ref:ei,className:"preview-container"},Ur==="stex"&&o.a.createElement(S,{value:Mn}),Ur!=="stex"&&o.a.createElement(t.a,{value:Mn})):null))),Zr?o.a.createElement("a",{ref:Qa,className:"editor-resize"}):null,o.a.createElement(p.a,null,ke[Tn]?o.a.createElement(h.a,{centered:!0,title:ke[Tn],visible:!0,onCancel:Ut,footer:null},Et):null))}},PVpz:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var h=L,C=h.lib,D=C.StreamCipher,u=h.algo,f=[],w=[],d=[],o=u.RabbitLegacy=D.extend({_doReset:function(){var a=this._key.words,_=this.cfg.iv,m=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],c=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[0]&65535];this._b=0;for(var g=0;g<4;g++)l.call(this);for(var g=0;g<8;g++)c[g]^=m[g+4&7];if(_){var v=_.words,x=v[0],n=v[1],i=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,t=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,S=i>>>16|t&4294901760,E=t<<16|i&65535;c[0]^=i,c[1]^=S,c[2]^=t,c[3]^=E,c[4]^=i,c[5]^=S,c[6]^=t,c[7]^=E;for(var g=0;g<4;g++)l.call(this)}},_doProcessBlock:function(a,_){var m=this._X;l.call(this),f[0]=m[0]^m[5]>>>16^m[3]<<16,f[1]=m[2]^m[7]>>>16^m[5]<<16,f[2]=m[4]^m[1]>>>16^m[7]<<16,f[3]=m[6]^m[3]>>>16^m[1]<<16;for(var c=0;c<4;c++)f[c]=(f[c]<<8|f[c]>>>24)&16711935|(f[c]<<24|f[c]>>>8)&4278255360,a[_+c]^=f[c]},blockSize:128/32,ivSize:64/32});function l(){for(var a=this._X,_=this._C,m=0;m<8;m++)w[m]=_[m];_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0<w[0]>>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0<w[1]>>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0<w[2]>>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0<w[3]>>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0<w[4]>>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0<w[5]>>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0<w[6]>>>0?1:0)|0,this._b=_[7]>>>0<w[7]>>>0?1:0;for(var m=0;m<8;m++){var c=a[m]+_[m],g=c&65535,v=c>>>16,x=((g*g>>>17)+g*v>>>15)+v*v,n=((c&4294901760)*c|0)+((c&65535)*c|0);d[m]=x^n}a[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,a[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,a[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,a[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,a[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,a[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,a[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,a[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}h.RabbitLegacy=D._createHelper(o)}(),L.RabbitLegacy})},RxwV:function(j,Q,k){"use strict";var L=k("q1tI"),h=k("uciX"),C=k("2W6z"),D=k.n(C),u=k("4IlW"),f=k("uK0f"),w=k.n(f);function d(xe,he){if(xe===he)return!0;if(!xe||!he)return!1;var ne=xe.length;if(he.length!==ne)return!1;for(var oe=0;oe<ne;oe++)if(xe[oe]!==he[oe])return!1;return!0}function o(xe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(ne){return typeof ne}:o=function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},o(xe)}function l(xe,he){if(!(xe instanceof he))throw new TypeError("Cannot call a class as a function")}function a(xe,he){for(var ne=0;ne<he.length;ne++){var oe=he[ne];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(xe,oe.key,oe)}}function _(xe,he,ne){return he&&a(xe.prototype,he),ne&&a(xe,ne),xe}function m(xe,he){if(typeof he!="function"&&he!==null)throw new TypeError("Super expression must either be null or a function");xe.prototype=Object.create(he&&he.prototype,{constructor:{value:xe,writable:!0,configurable:!0}}),he&&c(xe,he)}function c(xe,he){return c=Object.setPrototypeOf||function(oe,te){return oe.__proto__=te,oe},c(xe,he)}function g(xe){var he=n();return function(){var ne=i(xe),oe;if(he){var te=i(this).constructor;oe=Reflect.construct(ne,arguments,te)}else oe=ne.apply(this,arguments);return v(this,oe)}}function v(xe,he){return he&&(o(he)==="object"||typeof he=="function")?he:x(xe)}function x(xe){if(xe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return xe}function n(){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(xe){return!1}}function i(xe){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(ne){return ne.__proto__||Object.getPrototypeOf(ne)},i(xe)}var t=function(){var xe=function(he){m(oe,he);var ne=g(oe);function oe(){var te;return l(this,oe),te=ne.apply(this,arguments),te.menuItems={},te.saveMenuItem=function(le){return function(Y){te.menuItems[le]=Y}},te}return _(oe,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(le){!le.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(le){var Y=this.props,Z=Y.fieldNames,ge=Y.defaultFieldNames;return Z[le]||ge[le]}},{key:"getOption",value:function(le,Y){var Z=this.props,ge=Z.prefixCls,ee=Z.expandTrigger,$=Z.expandIcon,X=Z.loadingIcon,J=this.props.onSelect.bind(this,le,Y),me=this.props.onItemDoubleClick.bind(this,le,Y),ue={onClick:J,onDoubleClick:me},_e="".concat(ge,"-menu-item"),He=null,$e=le[this.getFieldName("children")]&&le[this.getFieldName("children")].length>0;($e||le.isLeaf===!1)&&(_e+=" ".concat(ge,"-menu-item-expand"),le.loading||(He=L.createElement("span",{className:"".concat(ge,"-menu-item-expand-icon")},$))),ee==="hover"&&($e||le.isLeaf===!1)&&(ue={onMouseEnter:this.delayOnSelect.bind(this,J),onMouseLeave:this.delayOnSelect.bind(this),onClick:J}),this.isActiveOption(le,Y)&&(_e+=" ".concat(ge,"-menu-item-active"),ue.ref=this.saveMenuItem(Y)),le.disabled&&(_e+=" ".concat(ge,"-menu-item-disabled"));var Ye=null;le.loading&&(_e+=" ".concat(ge,"-menu-item-loading"),Ye=X||null);var tt="";return"title"in le?tt=le.title:typeof le[this.getFieldName("label")]=="string"&&(tt=le[this.getFieldName("label")]),L.createElement("li",Object.assign({key:le[this.getFieldName("value")],className:_e,title:tt},ue,{role:"menuitem",onMouseDown:function(it){return it.preventDefault()}}),le[this.getFieldName("label")],He,Ye)}},{key:"getActiveOptions",value:function(le){var Y=this,Z=this.props.options,ge=le||this.props.activeValue;return w()(Z,function(ee,$){return ee[Y.getFieldName("value")]===ge[$]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var le=this,Y=this.props.options,Z=this.getActiveOptions().map(function(ge){return ge[le.getFieldName("children")]}).filter(function(ge){return!!ge});return Z.unshift(Y),Z}},{key:"delayOnSelect",value:function(le){for(var Y=this,Z=arguments.length,ge=new Array(Z>1?Z-1:0),ee=1;ee<Z;ee++)ge[ee-1]=arguments[ee];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof le=="function"&&(this.delayTimer=window.setTimeout(function(){le(ge),Y.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var le=this.getShowOptions().length,Y=0;Y<le;Y++){var Z=this.menuItems[Y];Z&&Z.parentElement&&(Z.parentElement.scrollTop=Z.offsetTop)}}},{key:"isActiveOption",value:function(le,Y){var Z=this.props.activeValue,ge=Z===void 0?[]:Z;return ge[Y]===le[this.getFieldName("value")]}},{key:"render",value:function(){var le=this,Y=this.props,Z=Y.prefixCls,ge=Y.dropdownMenuColumnStyle;return L.createElement("div",null,this.getShowOptions().map(function(ee,$){return L.createElement("ul",{className:"".concat(Z,"-menu"),key:$,style:ge},ee.map(function(X){return le.getOption(X,$)}))}))}}]),oe}(L.Component);return xe.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},xe}(),S=t,E={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},s=E;function P(xe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?P=function(ne){return typeof ne}:P=function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},P(xe)}function O(xe,he){if(xe==null)return{};var ne=b(xe,he),oe,te;if(Object.getOwnPropertySymbols){var le=Object.getOwnPropertySymbols(xe);for(te=0;te<le.length;te++){if(oe=le[te],he.indexOf(oe)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(xe,oe))continue;ne[oe]=xe[oe]}}return ne}function b(xe,he){if(xe==null)return{};var ne={},oe=Object.keys(xe),te,le;for(le=0;le<oe.length;le++){if(te=oe[le],he.indexOf(te)>=0)continue;ne[te]=xe[te]}return ne}function y(xe){return N(xe)||M(xe)||T(xe)||p()}function p(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(xe,he){if(!xe)return;if(typeof xe=="string")return I(xe,he);var ne=Object.prototype.toString.call(xe).slice(8,-1);if(ne==="Object"&&xe.constructor&&(ne=xe.constructor.name),ne==="Map"||ne==="Set")return Array.from(xe);if(ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ne))return I(xe,he)}function M(xe){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(xe))return Array.from(xe)}function N(xe){if(Array.isArray(xe))return I(xe)}function I(xe,he){(he==null||he>xe.length)&&(he=xe.length);for(var ne=0,oe=new Array(he);ne<he;ne++)oe[ne]=xe[ne];return oe}function K(xe,he){if(!(xe instanceof he))throw new TypeError("Cannot call a class as a function")}function H(xe,he){for(var ne=0;ne<he.length;ne++){var oe=he[ne];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(xe,oe.key,oe)}}function W(xe,he,ne){return he&&H(xe.prototype,he),ne&&H(xe,ne),xe}function z(xe,he){if(typeof he!="function"&&he!==null)throw new TypeError("Super expression must either be null or a function");xe.prototype=Object.create(he&&he.prototype,{constructor:{value:xe,writable:!0,configurable:!0}}),he&&U(xe,he)}function U(xe,he){return U=Object.setPrototypeOf||function(oe,te){return oe.__proto__=te,oe},U(xe,he)}function B(xe){var he=ae();return function(){var ne=se(xe),oe;if(he){var te=se(this).constructor;oe=Reflect.construct(ne,arguments,te)}else oe=ne.apply(this,arguments);return G(this,oe)}}function G(xe,he){return he&&(P(he)==="object"||typeof he=="function")?he:q(xe)}function q(xe){if(xe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return xe}function ae(){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(xe){return!1}}function se(xe){return se=Object.setPrototypeOf?Object.getPrototypeOf:function(ne){return ne.__proto__||Object.getPrototypeOf(ne)},se(xe)}var we=function(){var xe=function(he){z(oe,he);var ne=B(oe);function oe(te){var le;K(this,oe),le=ne.call(this,te),le.setPopupVisible=function(Z){var ge=le.state.value;"popupVisible"in le.props||le.setState({popupVisible:Z}),Z&&!le.state.popupVisible&&le.setState({activeValue:ge}),le.props.onPopupVisibleChange(Z)},le.handleChange=function(Z,ge,ee){var $=ge.visible;(ee.type!=="keydown"||ee.keyCode===u.a.ENTER)&&(le.props.onChange(Z.map(function(X){return X[le.getFieldName("value")]}),Z),le.setPopupVisible($))},le.handlePopupVisibleChange=function(Z){le.setPopupVisible(Z)},le.handleMenuSelect=function(Z,ge,ee){var $=le.trigger.getRootDomNode();$&&$.focus&&$.focus();var X=le.props,J=X.changeOnSelect,me=X.loadData,ue=X.expandTrigger;if(!Z||Z.disabled)return;var _e=le.state.activeValue;_e=_e.slice(0,ge+1),_e[ge]=Z[le.getFieldName("value")];var He=le.getActiveOptions(_e);if(Z.isLeaf===!1&&!Z[le.getFieldName("children")]&&me){J&&le.handleChange(He,{visible:!0},ee),le.setState({activeValue:_e}),me(He);return}var $e={};!Z[le.getFieldName("children")]||!Z[le.getFieldName("children")].length?(le.handleChange(He,{visible:!1},ee),$e.value=_e):J&&(ee.type==="click"||ee.type==="keydown")&&(ue==="hover"?le.handleChange(He,{visible:!1},ee):le.handleChange(He,{visible:!0},ee),$e.value=_e),$e.activeValue=_e,("value"in le.props||ee.type==="keydown"&&ee.keyCode!==u.a.ENTER)&&delete $e.value,le.setState($e)},le.handleItemDoubleClick=function(){var Z=le.props.changeOnSelect;Z&&le.setPopupVisible(!1)},le.handleKeyDown=function(Z){var ge=le.props.children;if(ge&&ge.props.onKeyDown){ge.props.onKeyDown(Z);return}var ee=y(le.state.activeValue),$=ee.length-1<0?0:ee.length-1,X=le.getCurrentLevelOptions(),J=X.map(function(He){return He[le.getFieldName("value")]}).indexOf(ee[$]);if(Z.keyCode!==u.a.DOWN&&Z.keyCode!==u.a.UP&&Z.keyCode!==u.a.LEFT&&Z.keyCode!==u.a.RIGHT&&Z.keyCode!==u.a.ENTER&&Z.keyCode!==u.a.SPACE&&Z.keyCode!==u.a.BACKSPACE&&Z.keyCode!==u.a.ESC&&Z.keyCode!==u.a.TAB)return;if(!le.state.popupVisible&&Z.keyCode!==u.a.BACKSPACE&&Z.keyCode!==u.a.LEFT&&Z.keyCode!==u.a.RIGHT&&Z.keyCode!==u.a.ESC&&Z.keyCode!==u.a.TAB){le.setPopupVisible(!0);return}if(Z.keyCode===u.a.DOWN||Z.keyCode===u.a.UP){Z.preventDefault();var me=J;me!==-1?Z.keyCode===u.a.DOWN?(me+=1,me=me>=X.length?0:me):(me-=1,me=me<0?X.length-1:me):me=0,ee[$]=X[me][le.getFieldName("value")]}else if(Z.keyCode===u.a.LEFT||Z.keyCode===u.a.BACKSPACE)Z.preventDefault(),ee.splice(ee.length-1,1);else if(Z.keyCode===u.a.RIGHT)Z.preventDefault(),X[J]&&X[J][le.getFieldName("children")]&&ee.push(X[J][le.getFieldName("children")][0][le.getFieldName("value")]);else if(Z.keyCode===u.a.ESC||Z.keyCode===u.a.TAB){le.setPopupVisible(!1);return}(!ee||ee.length===0)&&le.setPopupVisible(!1);var ue=le.getActiveOptions(ee),_e=ue[ue.length-1];le.handleMenuSelect(_e,ue.length-1,Z),le.props.onKeyDown&&le.props.onKeyDown(Z)},le.saveTrigger=function(Z){le.trigger=Z};var Y=[];return"value"in te?Y=te.value||[]:"defaultValue"in te&&(Y=te.defaultValue||[]),D()(!("filedNames"in te),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),le.state={popupVisible:te.popupVisible,activeValue:Y,value:Y,prevProps:te},le.defaultFieldNames={label:"label",value:"value",children:"children"},le}return W(oe,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(le){var Y=this.defaultFieldNames,Z=this.props,ge=Z.fieldNames,ee=Z.filedNames;return"filedNames"in this.props?ee[le]||Y[le]:ge[le]||Y[le]}},{key:"getFieldNames",value:function(){var le=this.props,Y=le.fieldNames,Z=le.filedNames;return"filedNames"in this.props?Z:Y}},{key:"getCurrentLevelOptions",value:function(){var le=this,Y=this.props.options,Z=Y===void 0?[]:Y,ge=this.state.activeValue,ee=ge===void 0?[]:ge,$=w()(Z,function(X,J){return X[le.getFieldName("value")]===ee[J]},{childrenKeyName:this.getFieldName("children")});return $[$.length-2]?$[$.length-2][this.getFieldName("children")]:y(Z).filter(function(X){return!X.disabled})}},{key:"getActiveOptions",value:function(le){var Y=this;return w()(this.props.options||[],function(Z,ge){return Z[Y.getFieldName("value")]===le[ge]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var le=this.props,Y=le.prefixCls,Z=le.transitionName,ge=le.popupClassName,ee=le.options,$=ee===void 0?[]:ee,X=le.disabled,J=le.builtinPlacements,me=le.popupPlacement,ue=le.children,_e=le.dropdownRender,He=O(le,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),$e=L.createElement("div",null),Ye="";$&&$.length>0?$e=L.createElement(S,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):Ye=" ".concat(Y,"-menus-empty");var tt=$e;return _e&&(tt=_e($e)),L.createElement(h.a,Object.assign({ref:this.saveTrigger},He,{popupPlacement:me,builtinPlacements:J,popupTransitionName:Z,action:X?[]:["click"],popupVisible:X?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(Y,"-menus"),popupClassName:ge+Ye,popup:tt}),L.cloneElement(ue,{onKeyDown:this.handleKeyDown,tabIndex:X?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(le,Y){var Z=Y.prevProps,ge=Z===void 0?{}:Z,ee={prevProps:le};return"value"in le&&!d(ge.value,le.value)&&(ee.value=le.value||[],"loadData"in le||(ee.activeValue=le.value||[])),"popupVisible"in le&&(ee.popupVisible=le.popupVisible),ee}}]),oe}(L.Component);return xe.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:s,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},xe}(),Se=we,de=Q.a=Se},S6kV:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("OLod"))})(this,function(L){return L.mode.OFB=function(){var h=L.lib.BlockCipherMode.extend(),C=h.Encryptor=h.extend({processBlock:function(D,u){var f=this._cipher,w=f.blockSize,d=this._iv,o=this._keystream;d&&(o=this._keystream=d.slice(0),this._iv=void 0),f.encryptBlock(o,0);for(var l=0;l<w;l++)D[u+l]^=o[l]}});return h.Decryptor=C,h}(),L.mode.OFB})},"SA+Z":function(j,Q,k){var L=k("wTVA"),h=k("EbDI"),C=k("ZhPi"),D=k("wkBT");function u(f){return L(f)||h(f)||C(f)||D()}j.exports=u,j.exports.__esModule=!0,j.exports.default=j.exports},SJMd:function(j,Q){/**
|
|
|
* @license
|
|
|
* Copyright (C) 2006 Google Inc.
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
* You may obtain a copy of the License at
|
|
|
*
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
*
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
* See the License for the specific language governing permissions and
|
|
|
* limitations under the License.
|
|
|
*/var k,L,h,C=!1,D,u;window.PR_SHOULD_USE_CONTINUATION=!0;var f,w;(function(){var d=window,o=["break,continue,do,else,for,if,return,while"],l=[o,"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"],a=[l,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],_=[a,"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"],m=[a,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],c=[a,"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"],g="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",v=[a,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],x="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=[o,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],i=[o,"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"],t=[o,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],S=[_,c,m,v,x,n,i,t],E=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,s="str",P="kwd",O="com",b="typ",y="lit",p="pun",T="pln",M="tag",N="dec",I="src",K="atn",H="atv",W="nocode",z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ee){for(var $=0,X=!1,J=!1,me=0,ue=ee.length;me<ue;++me){var _e=ee[me];if(_e.ignoreCase)J=!0;else if(/[a-z]/i.test(_e.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){X=!0,J=!1;break}}var He={b:8,t:9,n:10,v:11,f:12,r:13};function $e(Me){var Ce=Me.charCodeAt(0);if(Ce!==92)return Ce;var Je=Me.charAt(1);return Ce=He[Je],Ce||("0"<=Je&&Je<="7"?parseInt(Me.substring(1),8):Je==="u"||Je==="x"?parseInt(Me.substring(2),16):Me.charCodeAt(1))}function Ye(Me){if(Me<32)return(Me<16?"\\x0":"\\x")+Me.toString(16);var Ce=String.fromCharCode(Me);return Ce==="\\"||Ce==="-"||Ce==="]"||Ce==="^"?"\\"+Ce:Ce}function tt(Me){var Ce=Me.substring(1,Me.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")),Je=[],rt=Ce[0]==="^",ze=["["];rt&&ze.push("^");for(var et=rt?1:0,ke=Ce.length;et<ke;++et){var Re=Ce[et];if(/\\[bdsw]/i.test(Re))ze.push(Re);else{var Te=$e(Re),fe;et+2<ke&&Ce[et+1]==="-"?(fe=$e(Ce[et+2]),et+=2):fe=Te,Je.push([Te,fe]),fe<65||Te>122||(fe<65||Te>90||Je.push([Math.max(65,Te)|32,Math.min(fe,90)|32]),fe<97||Te>122||Je.push([Math.max(97,Te)&~32,Math.min(fe,122)&~32]))}}Je.sort(function(We,Ve){return We[0]-Ve[0]||Ve[1]-We[1]});for(var ye=[],Ee=[],et=0;et<Je.length;++et){var Oe=Je[et];Oe[0]<=Ee[1]+1?Ee[1]=Math.max(Ee[1],Oe[1]):ye.push(Ee=Oe)}for(var et=0;et<ye.length;++et){var Oe=ye[et];ze.push(Ye(Oe[0])),Oe[1]>Oe[0]&&(Oe[1]+1>Oe[0]&&ze.push("-"),ze.push(Ye(Oe[1])))}return ze.push("]"),ze.join("")}function nt(Me){for(var Ce=Me.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")),Je=Ce.length,rt=[],ze=0,et=0;ze<Je;++ze){var ke=Ce[ze];if(ke==="(")++et;else if(ke.charAt(0)==="\\"){var Re=+ke.substring(1);Re&&(Re<=et?rt[Re]=-1:Ce[ze]=Ye(Re))}}for(var ze=1;ze<rt.length;++ze)rt[ze]===-1&&(rt[ze]=++$);for(var ze=0,et=0;ze<Je;++ze){var ke=Ce[ze];if(ke==="(")++et,rt[et]||(Ce[ze]="(?:");else if(ke.charAt(0)==="\\"){var Re=+ke.substring(1);Re&&Re<=et&&(Ce[ze]="\\"+rt[Re])}}for(var ze=0;ze<Je;++ze)Ce[ze]==="^"&&Ce[ze+1]!=="^"&&(Ce[ze]="");if(Me.ignoreCase&&X)for(var ze=0;ze<Je;++ze){var ke=Ce[ze],Te=ke.charAt(0);ke.length>=2&&Te==="["?Ce[ze]=tt(ke):Te!=="\\"&&(Ce[ze]=ke.replace(/[a-zA-Z]/g,function(Ee){var Oe=Ee.charCodeAt(0);return"["+String.fromCharCode(Oe&~32,Oe|32)+"]"}))}return Ce.join("")}for(var it=[],me=0,ue=ee.length;me<ue;++me){var _e=ee[me];if(_e.global||_e.multiline)throw new Error(""+_e);it.push("(?:"+nt(_e)+")")}return new RegExp(it.join("|"),J?"gi":"g")}function B(ee,$){var X=/(?:^|\s)nocode(?:\s|$)/,J=[],me=0,ue=[],_e=0;function He($e){var Ye=$e.nodeType;if(Ye==1){if(X.test($e.className))return;for(var tt=$e.firstChild;tt;tt=tt.nextSibling)He(tt);var nt=$e.nodeName.toLowerCase();(nt==="br"||nt==="li")&&(J[_e]=`
|
|
|
`,ue[_e<<1]=me++,ue[_e++<<1|1]=$e)}else if(Ye==3||Ye==4){var it=$e.nodeValue;it.length&&($?it=it.replace(/\r\n?/g,`
|
|
|
`):it=it.replace(/[ \t\r\n]+/g," "),J[_e]=it,ue[_e<<1]=me,me+=it.length,ue[_e++<<1|1]=$e)}}return He(ee),{sourceCode:J.join("").replace(/\n$/,""),spans:ue}}function G(ee,$,X,J,me){if(!X)return;var ue={sourceNode:ee,pre:1,langExtension:null,numberLines:null,sourceCode:X,spans:null,basePos:$,decorations:null};J(ue),me.push.apply(me,ue.decorations)}var q=/\S/;function ae(ee){for(var $=void 0,X=ee.firstChild;X;X=X.nextSibling){var J=X.nodeType;$=J===1?$?ee:X:J===3&&q.test(X.nodeValue)?ee:$}return $===ee?void 0:$}function se(ee,$){var X={},J;(function(){for(var _e=ee.concat($),He=[],$e={},Ye=0,tt=_e.length;Ye<tt;++Ye){var nt=_e[Ye],it=nt[3];if(it)for(var Me=it.length;--Me>=0;)X[it.charAt(Me)]=nt;var Ce=nt[1],Je=""+Ce;$e.hasOwnProperty(Je)||(He.push(Ce),$e[Je]=null)}He.push(/[\0-\uffff]/),J=U(He)})();var me=$.length,ue=function(_e){for(var He=_e.sourceCode,$e=_e.basePos,Ye=_e.sourceNode,tt=[$e,T],nt=0,it=He.match(J)||[],Me={},Ce=0,Je=it.length;Ce<Je;++Ce){var rt=it[Ce],ze=Me[rt],et=void 0,ke;if(typeof ze=="string")ke=!1;else{var Re=X[rt.charAt(0)];if(Re)et=rt.match(Re[1]),ze=Re[0];else{for(var Te=0;Te<me;++Te)if(Re=$[Te],et=rt.match(Re[1]),et){ze=Re[0];break}et||(ze=T)}ke=ze.length>=5&&ze.substring(0,5)==="lang-",ke&&!(et&&typeof et[1]=="string")&&(ke=!1,ze=I),ke||(Me[rt]=ze)}var fe=nt;if(nt+=rt.length,!ke)tt.push($e+fe,ze);else{var ye=et[1],Ee=rt.indexOf(ye),Oe=Ee+ye.length;et[2]&&(Oe=rt.length-et[2].length,Ee=Oe-ye.length);var We=ze.substring(5);G(Ye,$e+fe,rt.substring(0,Ee),ue,tt),G(Ye,$e+fe+Ee,ye,oe(We,ye),tt),G(Ye,$e+fe+Oe,rt.substring(Oe),ue,tt)}}_e.decorations=tt};return ue}function we(ee){var $=[],X=[];ee.tripleQuotedStrings?$.push([s,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ee.multiLineStrings?$.push([s,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):$.push([s,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ee.verbatimStrings&&X.push([s,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var J=ee.hashComments;J&&(ee.cStyleComments?(J>1?$.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):$.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([s,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):$.push([O,/^#[^\r\n]*/,null,"#"])),ee.cStyleComments&&(X.push([O,/^\/\/[^\r\n]*/,null]),X.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var me=ee.regexLiterals;if(me){var ue=me>1?"":`
|
|
|
\r`,_e=ue?".":"[\\S\\s]",He="/(?=[^/*"+ue+"])(?:[^/\\x5B\\x5C"+ue+"]|\\x5C"+_e+"|\\x5B(?:[^\\x5C\\x5D"+ue+"]|\\x5C"+_e+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+z+"("+He+")")])}var $e=ee.types;$e&&X.push([b,$e]);var Ye=(""+ee.keywords).replace(/^ | $/g,"");Ye.length&&X.push([P,new RegExp("^(?:"+Ye.replace(/[\s,]+/g,"|")+")\\b"),null]),$.push([T,/^\s+/,null,` \r
|
|
|
\xA0`]);var tt="^.[^\\s\\w.$@'\"`/\\\\]*";return ee.regexLiterals&&(tt+="(?!s*/)"),X.push([y,/^@[a-z_$][a-z_$@0-9]*/i,null],[b,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[T,/^[a-z_$][a-z_$@0-9]*/i,null],[y,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[T,/^\\[\s\S]?/,null],[p,new RegExp(tt),null]),se($,X)}var Se=we({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function de(ee,$,X){for(var J=/(?:^|\s)nocode(?:\s|$)/,me=/\r\n?|\n/,ue=ee.ownerDocument,_e=ue.createElement("li");ee.firstChild;)_e.appendChild(ee.firstChild);var He=[_e];function $e(Ce){var Je=Ce.nodeType;if(Je==1&&!J.test(Ce.className))if(Ce.nodeName==="br")Ye(Ce),Ce.parentNode&&Ce.parentNode.removeChild(Ce);else for(var rt=Ce.firstChild;rt;rt=rt.nextSibling)$e(rt);else if((Je==3||Je==4)&&X){var ze=Ce.nodeValue,et=ze.match(me);if(et){var ke=ze.substring(0,et.index);Ce.nodeValue=ke;var Re=ze.substring(et.index+et[0].length);if(Re){var Te=Ce.parentNode;Te.insertBefore(ue.createTextNode(Re),Ce.nextSibling)}Ye(Ce),ke||Ce.parentNode.removeChild(Ce)}}}function Ye(Ce){for(;!Ce.nextSibling;)if(Ce=Ce.parentNode,!Ce)return;function Je(et,ke){var Re=ke?et.cloneNode(!1):et,Te=et.parentNode;if(Te){var fe=Je(Te,1),ye=et.nextSibling;fe.appendChild(Re);for(var Ee=ye;Ee;Ee=ye)ye=Ee.nextSibling,fe.appendChild(Ee)}return Re}for(var rt=Je(Ce.nextSibling,0),ze;(ze=rt.parentNode)&&ze.nodeType===1;)rt=ze;He.push(rt)}for(var tt=0;tt<He.length;++tt)$e(He[tt]);$===($|0)&&He[0].setAttribute("value",$);var nt=ue.createElement("ol");nt.className="linenums";for(var it=Math.max(0,$-1|0)||0,tt=0,Me=He.length;tt<Me;++tt)_e=He[tt],_e.className="L"+(tt+it)%10,_e.firstChild||_e.appendChild(ue.createTextNode("\xA0")),nt.appendChild(_e);ee.appendChild(nt)}function xe(ee){var $=/\bMSIE\s(\d+)/.exec(navigator.userAgent);$=$&&+$[1]<=8;var X=/\n/g,J=ee.sourceCode,me=J.length,ue=0,_e=ee.spans,He=_e.length,$e=0,Ye=ee.decorations,tt=Ye.length,nt=0;Ye[tt]=me;var it,Me;for(Me=it=0;Me<tt;)Ye[Me]!==Ye[Me+2]?(Ye[it++]=Ye[Me++],Ye[it++]=Ye[Me++]):Me+=2;for(tt=it,Me=it=0;Me<tt;){for(var Ce=Ye[Me],Je=Ye[Me+1],rt=Me+2;rt+2<=tt&&Ye[rt+1]===Je;)rt+=2;Ye[it++]=Ce,Ye[it++]=Je,Me=rt}tt=Ye.length=it;var ze=ee.sourceNode,et="";ze&&(et=ze.style.display,ze.style.display="none");try{for(var ke=null;$e<He;){var Re=_e[$e],Te=_e[$e+2]||me,fe=Ye[nt+2]||me,rt=Math.min(Te,fe),ye=_e[$e+1],Ee;if(ye.nodeType!==1&&(Ee=J.substring(ue,rt))){$&&(Ee=Ee.replace(X,"\r")),ye.nodeValue=Ee;var Oe=ye.ownerDocument,We=Oe.createElement("span");We.className=Ye[nt+1];var Ve=ye.parentNode;Ve.replaceChild(We,ye),We.appendChild(ye),ue<Te&&(_e[$e+1]=ye=Oe.createTextNode(J.substring(rt,Te)),Ve.insertBefore(ye,We.nextSibling))}ue=rt,ue>=Te&&($e+=2),ue>=fe&&(nt+=2)}}finally{ze&&(ze.style.display=et)}}var he={};function ne(ee,$){for(var X=$.length;--X>=0;){var J=$[X];he.hasOwnProperty(J)?d.console&&console.warn("cannot override language handler %s",J):he[J]=ee}}function oe(ee,$){return ee&&he.hasOwnProperty(ee)||(ee=/^\s*</.test($)?"default-markup":"default-code"),he[ee]}ne(Se,["default-code"]),ne(se([],[[T,/^[^<?]+/],[N,/^<!\w[^>]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[p,/^(?:<[%?]|[%?]>)/],["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"]),ne(se([[T,/^[\s]+/,null,` \r
|
|
|
`],[H,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[M,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[K,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[p,/^[=<>\/]+/],["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"]),ne(se([],[[H,/^[\s\S]+/]]),["uq.val"]),ne(we({keywords:_,hashComments:!0,cStyleComments:!0,types:E}),["c","cc","cpp","cxx","cyc","m"]),ne(we({keywords:"null,true,false"}),["json"]),ne(we({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:E}),["cs"]),ne(we({keywords:m,cStyleComments:!0}),["java"]),ne(we({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ne(we({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ne(we({keywords:x,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ne(we({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ne(we({keywords:v,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ne(we({keywords:g,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ne(se([],[[s,/^[\s\S]+/]]),["regex"]);function te(ee){var $=ee.langExtension;try{var X=B(ee.sourceNode,ee.pre),J=X.sourceCode;ee.sourceCode=J,ee.spans=X.spans,ee.basePos=0,oe($,J)(ee),xe(ee)}catch(me){d.console&&console.log(me&&me.stack||me)}}function le(ee,$,X){var J=X||!1,me=$||null,ue=document.createElement("div");ue.innerHTML="<pre>"+ee+"</pre>",ue=ue.firstChild,J&&de(ue,J,!0);var _e={langExtension:me,numberLines:J,sourceNode:ue,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return te(_e),ue.innerHTML}function Y(ee,$){var X=$||document.body,J=X.ownerDocument||document;function me(Re){return X.getElementsByTagName(Re)}for(var ue=[me("pre"),me("code"),me("xmp")],_e=[],He=0;He<ue.length;++He)for(var $e=0,Ye=ue[He].length;$e<Ye;++$e)_e.push(ue[He][$e]);ue=null;var tt=Date;tt.now||(tt={now:function(){return+new Date}});var nt=0,it=/\blang(?:uage)?-([\w.]+)(?!\S)/,Me=/\bprettyprint\b/,Ce=/\bprettyprinted\b/,Je=/pre|xmp/i,rt=/^code$/i,ze=/^(?:pre|code|xmp)$/i,et={};function ke(){for(var Re=d.PR_SHOULD_USE_CONTINUATION?tt.now()+250:Infinity;nt<_e.length&&tt.now()<Re;nt++){for(var Te=_e[nt],fe=et,ye=Te;ye=ye.previousSibling;){var Ee=ye.nodeType,Oe=(Ee===7||Ee===8)&&ye.nodeValue;if(Oe?!/^\??prettify\b/.test(Oe):Ee!==3||/\S/.test(ye.nodeValue))break;if(Oe){fe={},Oe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ln,br,Zr){fe[br]=Zr});break}}var We=Te.className;if((fe!==et||Me.test(We))&&!Ce.test(We)){for(var Ve=!1,ut=Te.parentNode;ut;ut=ut.parentNode){var ft=ut.tagName;if(ze.test(ft)&&ut.className&&Me.test(ut.className)){Ve=!0;break}}if(!Ve){Te.className+=" prettyprinted";var Dt=fe.lang;if(!Dt){Dt=We.match(it);var Mt;!Dt&&(Mt=ae(Te))&&rt.test(Mt.tagName)&&(Dt=Mt.className.match(it)),Dt&&(Dt=Dt[1])}var lr;if(Je.test(Te.tagName))lr=1;else{var dr=Te.currentStyle,Tt=J.defaultView,$r=dr?dr.whiteSpace:Tt&&Tt.getComputedStyle?Tt.getComputedStyle(Te,null).getPropertyValue("white-space"):0;lr=$r&&$r.substring(0,3)==="pre"}var Ur=fe.linenums;(Ur=Ur==="true"||+Ur)||(Ur=We.match(/\blinenums\b(?::(\d+))?/),Ur=Ur?Ur[1]&&Ur[1].length?+Ur[1]:!0:!1),Ur&&de(Te,Ur,lr);var Br={langExtension:Dt,sourceNode:Te,numberLines:Ur,pre:lr,sourceCode:null,basePos:null,spans:null,decorations:null};te(Br)}}}nt<_e.length?d.setTimeout(ke,250):typeof ee=="function"&&ee()}ke()}var Z=d.PR={createSimpleLexer:se,registerLangHandler:ne,sourceDecorator:we,PR_ATTRIB_NAME:K,PR_ATTRIB_VALUE:H,PR_COMMENT:O,PR_DECLARATION:N,PR_KEYWORD:P,PR_LITERAL:y,PR_NOCODE:W,PR_PLAIN:T,PR_PUNCTUATION:p,PR_SOURCE:I,PR_STRING:s,PR_TAG:M,PR_TYPE:b,prettyPrintOne:C?d.prettyPrintOne=le:f=le,prettyPrint:w=C?d.prettyPrint=Y:w=Y},ge=d.define;typeof ge=="function"&&ge.amd&&ge("google-code-prettify",[],function(){return Z})})()},Sjjz:function(j,Q,k){j.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},UfjD:function(j,Q,k){"use strict";var L=k("2qtc"),h=k("kLXV"),C=k("5NDa"),D=k("5rEg"),u=k("miYZ"),f=k("tsqr"),w=k("tJVT"),d=k("q1tI"),o=k.n(d),l=k("4i/N");function a(_){var m=_.isjoin,c=_.setJoin,g=_.JoinTeams,v=_.qs,x=Object(d.useState)(""),n=Object(w.a)(x,2),i=n[0],t=n[1];return o.a.createElement(h.a,{centered:!0,title:o.a.createElement("div",{style:{alignItems:"center",display:"flex"}},o.a.createElement("div",{style:{textAlign:"left",flex:"1"}},v.\u52A0\u5165\u6218\u961F),o.a.createElement(l.a,{onClick:function(){return c(!1)},style:{cursor:"porint"}})),visible:m,closable:!1,destroyOnClose:!0,okText:v.\u786E\u8BA4,cancelText:v.\u53D6\u6D88,onOk:function(){if(!i){f.b.info(v.\u9080\u8BF7\u7801\u4E0D\u80FD\u4E3A\u7A7A);return}g(i)},onCancel:function(){return c(!1)}},o.a.createElement("div",null,o.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},o.a.createElement("span",{style:{flex:"none"}},v.\u9080\u8BF7\u7801,"\uFF1A")," ",o.a.createElement(D.a,{placeholder:v.\u8BF7\u8F93\u5165\u9080\u8BF7\u7801,value:i,maxLength:60,addonAfter:String(i&&i.length||0)+"/60",onChange:function(E){return t(E.target.value)}}))))}Q.a=a},"VrN/":function(j,Q,k){(function(L,h){j.exports=h()})(this,function(){"use strict";var L=navigator.userAgent,h=navigator.platform,C=/gecko\/\d/i.test(L),D=/MSIE \d/.test(L),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(L),f=/Edge\/(\d+)/.exec(L),w=D||u||f,d=w&&(D?document.documentMode||6:+(f||u)[1]),o=!f&&/WebKit\//.test(L),l=o&&/Qt\/\d+\.\d+/.test(L),a=!f&&/Chrome\//.test(L),_=/Opera\//.test(L),m=/Apple Computer/.test(navigator.vendor),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(L),g=/PhantomJS/.test(L),v=!f&&/AppleWebKit/.test(L)&&/Mobile\/\w+/.test(L),x=/Android/.test(L),n=v||x||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(L),i=v||/Mac/.test(h),t=/\bCrOS\b/.test(L),S=/win/i.test(h),E=_&&L.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(_=!1,o=!0);var s=i&&(l||_&&(E==null||E<12.11)),P=C||w&&d>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var b=function(e,r){var R=e.className,A=O(r).exec(R);if(A){var F=R.slice(A.index+A[0].length);e.className=R.slice(0,A.index)+(F?A[1]+F:"")}};function y(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function p(e,r){return y(e).appendChild(r)}function T(e,r,R,A){var F=document.createElement(e);if(R&&(F.className=R),A&&(F.style.cssText=A),typeof r=="string")F.appendChild(document.createTextNode(r));else if(r)for(var V=0;V<r.length;++V)F.appendChild(r[V]);return F}function M(e,r,R,A){var F=T(e,r,R,A);return F.setAttribute("role","presentation"),F}var N;document.createRange?N=function(e,r,R,A){var F=document.createRange();return F.setEnd(A||e,R),F.setStart(e,r),F}:N=function(e,r,R){var A=document.body.createTextRange();try{A.moveToElementText(e.parentNode)}catch(F){return A}return A.collapse(!0),A.moveEnd("character",R),A.moveStart("character",r),A};function I(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 K(){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 H(e,r){var R=e.className;O(r).test(R)||(e.className+=(R?" ":"")+r)}function W(e,r){for(var R=e.split(" "),A=0;A<R.length;A++)R[A]&&!O(R[A]).test(r)&&(r+=" "+R[A]);return r}var z=function(e){e.select()};v?z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(z=function(e){try{e.select()}catch(r){}});function U(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function B(e,r,R){r||(r={});for(var A in e)e.hasOwnProperty(A)&&(R!==!1||!r.hasOwnProperty(A))&&(r[A]=e[A]);return r}function G(e,r,R,A,F){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var V=A||0,re=F||0;;){var ie=e.indexOf(" ",V);if(ie<0||ie>=r)return re+(r-V);re+=ie-V,re+=R-re%R,V=ie+1}}var q=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};q.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},q.prototype.set=function(e,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 ae(e,r){for(var R=0;R<e.length;++R)if(e[R]==r)return R;return-1}var se=50,we={toString:function(){return"CodeMirror.Pass"}},Se={scroll:!1},de={origin:"*mouse"},xe={origin:"+move"};function he(e,r,R){for(var A=0,F=0;;){var V=e.indexOf(" ",A);V==-1&&(V=e.length);var re=V-A;if(V==e.length||F+re>=r)return A+Math.min(re,r-F);if(F+=V-A,F+=R-F%R,A=V+1,F>=r)return A}}var ne=[""];function oe(e){for(;ne.length<=e;)ne.push(te(ne)+" ");return ne[e]}function te(e){return e[e.length-1]}function le(e,r){for(var R=[],A=0;A<e.length;A++)R[A]=r(e[A],A);return R}function Y(e,r,R){for(var A=0,F=R(r);A<e.length&&R(e[A])<=F;)A++;e.splice(A,0,r)}function Z(){}function ge(e,r){var R;return Object.create?R=Object.create(e):(Z.prototype=e,R=new Z),r&&B(r,R),R}var ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function $(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function X(e,r){return r?r.source.indexOf("\\w")>-1&&$(e)?!0:r.test(e):$(e)}function J(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var me=/[\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 ue(e){return e.charCodeAt(0)>=768&&me.test(e)}function _e(e,r,R){for(;(R<0?r>0:r<e.length)&&ue(e.charAt(r));)r+=R;return r}function He(e,r,R){for(var A=r>R?-1:1;;){if(r==R)return r;var F=(r+R)/2,V=A<0?Math.ceil(F):Math.floor(F);if(V==r)return e(V)?r:R;e(V)?R=V:r=V+A}}function $e(e,r,R,A){if(!e)return A(r,R,"ltr",0);for(var F=!1,V=0;V<e.length;++V){var re=e[V];(re.from<R&&re.to>r||r==R&&re.to==r)&&(A(Math.max(re.from,r),Math.min(re.to,R),re.level==1?"rtl":"ltr",V),F=!0)}F||A(r,R,"ltr")}var Ye=null;function tt(e,r,R){var A;Ye=null;for(var F=0;F<e.length;++F){var V=e[F];if(V.from<r&&V.to>r)return F;V.to==r&&(V.from!=V.to&&R=="before"?A=F:Ye=F),V.from==r&&(V.from!=V.to&&R!="before"?A=F:Ye=F)}return A!=null?A:Ye}var nt=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 A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,F=/[stwN]/,V=/[LRr]/,re=/[Lb1n]/,ie=/[1n]/;function ce(ve,Ie,Be){this.level=ve,this.from=Ie,this.to=Be}return function(ve,Ie){var Be=Ie=="ltr"?"L":"R";if(ve.length==0||Ie=="ltr"&&!A.test(ve))return!1;for(var qe=ve.length,Qe=[],gt=0;gt<qe;++gt)Qe.push(R(ve.charCodeAt(gt)));for(var Rt=0,Ht=Be;Rt<qe;++Rt){var Jt=Qe[Rt];Jt=="m"?Qe[Rt]=Ht:Ht=Jt}for(var or=0,Qt=Be;or<qe;++or){var mr=Qe[or];mr=="1"&&Qt=="r"?Qe[or]="n":V.test(mr)&&(Qt=mr,mr=="r"&&(Qe[or]="R"))}for(var Nr=1,Dr=Qe[0];Nr<qe-1;++Nr){var sn=Qe[Nr];sn=="+"&&Dr=="1"&&Qe[Nr+1]=="1"?Qe[Nr]="1":sn==","&&Dr==Qe[Nr+1]&&(Dr=="1"||Dr=="n")&&(Qe[Nr]=Dr),Dr=sn}for(var zn=0;zn<qe;++zn){var Oa=Qe[zn];if(Oa==",")Qe[zn]="N";else if(Oa=="%"){var ra=void 0;for(ra=zn+1;ra<qe&&Qe[ra]=="%";++ra);for(var qa=zn&&Qe[zn-1]=="!"||ra<qe&&Qe[ra]=="1"?"1":"N",$a=zn;$a<ra;++$a)Qe[$a]=qa;zn=ra-1}}for(var pa=0,Ya=Be;pa<qe;++pa){var La=Qe[pa];Ya=="L"&&La=="1"?Qe[pa]="L":V.test(La)&&(Ya=La)}for(var _a=0;_a<qe;++_a)if(F.test(Qe[_a])){var ma=void 0;for(ma=_a+1;ma<qe&&F.test(Qe[ma]);++ma);for(var ia=(_a?Qe[_a-1]:Be)=="L",Ja=(ma<qe?Qe[ma]:Be)=="L",lo=ia==Ja?ia?"L":"R":Be,Hi=_a;Hi<ma;++Hi)Qe[Hi]=lo;_a=ma-1}for(var ja=[],_i,Aa=0;Aa<qe;)if(re.test(Qe[Aa])){var ps=Aa;for(++Aa;Aa<qe&&re.test(Qe[Aa]);++Aa);ja.push(new ce(0,ps,Aa))}else{var Li=Aa,Vi=ja.length,$i=Ie=="rtl"?1:0;for(++Aa;Aa<qe&&Qe[Aa]!="L";++Aa);for(var Ha=Li;Ha<Aa;)if(ie.test(Qe[Ha])){Li<Ha&&(ja.splice(Vi,0,new ce(1,Li,Ha)),Vi+=$i);var uo=Ha;for(++Ha;Ha<Aa&&ie.test(Qe[Ha]);++Ha);ja.splice(Vi,0,new ce(2,uo,Ha)),Vi+=$i,Li=Ha}else++Ha;Li<Aa&&ja.splice(Vi,0,new ce(1,Li,Aa))}return Ie=="ltr"&&(ja[0].level==1&&(_i=ve.match(/^\s+/))&&(ja[0].from=_i[0].length,ja.unshift(new ce(0,0,_i[0].length))),te(ja).level==1&&(_i=ve.match(/\s+$/))&&(te(ja).to-=_i[0].length,ja.push(new ce(0,qe-_i[0].length,qe)))),Ie=="rtl"?ja.reverse():ja}}();function it(e,r){var R=e.order;return R==null&&(R=e.order=nt(e.text,r)),R}var Me=[],Ce=function(e,r,R){if(e.addEventListener)e.addEventListener(r,R,!1);else if(e.attachEvent)e.attachEvent("on"+r,R);else{var A=e._handlers||(e._handlers={});A[r]=(A[r]||Me).concat(R)}};function Je(e,r){return e._handlers&&e._handlers[r]||Me}function rt(e,r,R){if(e.removeEventListener)e.removeEventListener(r,R,!1);else if(e.detachEvent)e.detachEvent("on"+r,R);else{var A=e._handlers,F=A&&A[r];if(F){var V=ae(F,R);V>-1&&(A[r]=F.slice(0,V).concat(F.slice(V+1)))}}}function ze(e,r){var R=Je(e,r);if(!R.length)return;for(var A=Array.prototype.slice.call(arguments,2),F=0;F<R.length;++F)R[F].apply(null,A)}function et(e,r,R){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),ze(e,R||r.type,e,r),Ee(r)||r.codemirrorIgnore}function ke(e){var r=e._handlers&&e._handlers.cursorActivity;if(!r)return;for(var R=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),A=0;A<r.length;++A)ae(R,r[A])==-1&&R.push(r[A])}function Re(e,r){return Je(e,r).length>0}function Te(e){e.prototype.on=function(r,R){Ce(this,r,R)},e.prototype.off=function(r,R){rt(this,r,R)}}function fe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ye(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Oe(e){fe(e),ye(e)}function We(e){return e.target||e.srcElement}function Ve(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),i&&e.ctrlKey&&r==1&&(r=3),r}var ut=function(){if(w&&d<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),ft;function Dt(e){if(ft==null){var r=T("span","\u200B");p(e,T("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ft=r.offsetWidth<=1&&r.offsetHeight>2&&!(w&&d<8))}var R=ft?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var Mt;function lr(e){if(Mt!=null)return Mt;var r=p(e,document.createTextNode("A\u062EA")),R=N(r,0,1).getBoundingClientRect(),A=N(r,1,2).getBoundingClientRect();return y(e),!R||R.left==R.right?!1:Mt=A.right-R.right<3}var dr=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var r=0,R=[],A=e.length;r<=A;){var F=e.indexOf(`
|
|
|
`,r);F==-1&&(F=e.length);var V=e.slice(r,e.charAt(F-1)=="\r"?F-1:F),re=V.indexOf("\r");re!=-1?(R.push(V.slice(0,re)),r+=re+1):(R.push(V),r=F+1)}return R}:function(e){return e.split(/\r\n?|\n/)},Tt=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},$r=function(){var e=T("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ur=null;function Br(e){if(Ur!=null)return Ur;var r=p(e,T("span","x")),R=r.getBoundingClientRect(),A=N(r,0,1).getBoundingClientRect();return Ur=Math.abs(R.left-A.left)>1}var ln={},br={};function Zr(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),ln[e]=r}function qr(e,r){br[e]=r}function Pr(e){if(typeof e=="string"&&br.hasOwnProperty(e))e=br[e];else if(e&&typeof e.name=="string"&&br.hasOwnProperty(e.name)){var r=br[e.name];typeof r=="string"&&(r={name:r}),e=ge(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Pr("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Pr("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function fn(e,r){r=Pr(r);var R=ln[r.name];if(!R)return fn(e,"text/plain");var A=R(e,r);if(bn.hasOwnProperty(r.name)){var F=bn[r.name];for(var V in F){if(!F.hasOwnProperty(V))continue;A.hasOwnProperty(V)&&(A["_"+V]=A[V]),A[V]=F[V]}}if(A.name=r.name,r.helperType&&(A.helperType=r.helperType),r.modeProps)for(var re in r.modeProps)A[re]=r.modeProps[re];return A}var bn={};function Gn(e,r){var R=bn.hasOwnProperty(e)?bn[e]:bn[e]={};B(r,R)}function hn(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var R={};for(var A in r){var F=r[A];F instanceof Array&&(F=F.concat([])),R[A]=F}return R}function ca(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 wa(e,r,R){return e.startState?e.startState(r,R):!0}var mn=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};mn.prototype.eol=function(){return this.pos>=this.string.length},mn.prototype.sol=function(){return this.pos==this.lineStart},mn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},mn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},mn.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},mn.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},mn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},mn.prototype.skipToEnd=function(){this.pos=this.string.length},mn.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},mn.prototype.backUp=function(e){this.pos-=e},mn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=G(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},mn.prototype.indentation=function(){return G(this.string,null,this.tabSize)-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},mn.prototype.match=function(e,r,R){if(typeof e=="string"){var A=function(re){return R?re.toLowerCase():re},F=this.string.substr(this.pos,e.length);if(A(F)==A(e))return r!==!1&&(this.pos+=e.length),!0}else{var V=this.string.slice(this.pos).match(e);return V&&V.index>0?null:(V&&r!==!1&&(this.pos+=V[0].length),V)}},mn.prototype.current=function(){return this.string.slice(this.start,this.pos)},mn.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},mn.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},mn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Yt(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 A=0;;++A){var F=R.children[A],V=F.chunkSize();if(r<V){R=F;break}r-=V}return R.lines[r]}function kn(e,r,R){var A=[],F=r.line;return e.iter(r.line,R.line+1,function(V){var re=V.text;F==R.line&&(re=re.slice(0,R.ch)),F==r.line&&(re=re.slice(r.ch)),A.push(re),++F}),A}function va(e,r,R){var A=[];return e.iter(r,R,function(F){A.push(F.text)}),A}function Vn(e,r){var R=r-e.height;if(R)for(var A=e;A;A=A.parent)A.height+=R}function Xr(e){if(e.parent==null)return null;for(var r=e.parent,R=ae(r.lines,e),A=r.parent;A;r=A,A=A.parent)for(var F=0;!(A.children[F]==r);++F)R+=A.children[F].chunkSize();return R+r.first}function Fn(e,r){var R=e.first;e:do{for(var A=0;A<e.children.length;++A){var F=e.children[A],V=F.height;if(r<V){e=F;continue e}r-=V,R+=F.chunkSize()}return R}while(!e.lines);for(var re=0;re<e.lines.length;++re){var ie=e.lines[re],ce=ie.height;if(r<ce)break;r-=ce}return R+re}function da(e,r){return r>=e.first&&r<e.first+e.size}function Zn(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function St(e,r,R){if(R===void 0&&(R=null),!(this instanceof St))return new St(e,r,R);this.line=e,this.ch=r,this.sticky=R}function ir(e,r){return e.line-r.line||e.ch-r.ch}function $n(e,r){return e.sticky==r.sticky&&ir(e,r)==0}function na(e){return St(e.line,e.ch)}function It(e,r){return ir(e,r)<0?r:e}function ga(e,r){return ir(e,r)<0?e:r}function Yn(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function cr(e,r){if(r.line<e.first)return St(e.first,0);var R=e.first+e.size-1;return r.line>R?St(R,Yt(e,R).text.length):Mn(r,Yt(e,r.line).text.length)}function Mn(e,r){var R=e.ch;return R==null||R>r?St(e.line,r):R<0?St(e.line,0):e}function Wn(e,r){for(var R=[],A=0;A<r.length;A++)R[A]=cr(e,r[A]);return R}var Jn=function(e,r){this.state=e,this.lookAhead=r},Nn=function(e,r,R,A){this.state=r,this.doc=e,this.line=R,this.maxLookAhead=A||0,this.baseTokens=null,this.baseTokenPos=1};Nn.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},Nn.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}},Nn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Nn.fromSaved=function(e,r,R){return r instanceof Jn?new Nn(e,hn(e.mode,r.state),R,r.lookAhead):new Nn(e,hn(e.mode,r),R)},Nn.prototype.save=function(e){var r=e!==!1?hn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Jn(r,this.maxLookAhead):r};function fa(e,r,R,A){var F=[e.state.modeGen],V={};Sn(e,r.text,e.doc.mode,R,function(ve,Ie){return F.push(ve,Ie)},V,A);for(var re=R.state,ie=function(ve){R.baseTokens=F;var Ie=e.state.overlays[ve],Be=1,qe=0;R.state=!0,Sn(e,r.text,Ie.mode,R,function(Qe,gt){for(var Rt=Be;qe<Qe;){var Ht=F[Be];Ht>Qe&&F.splice(Be,1,Qe,F[Be+1],Ht),Be+=2,qe=Math.min(Qe,Ht)}if(!gt)return;if(Ie.opaque)F.splice(Rt,Be-Rt,Qe,"overlay "+gt),Be=Rt+2;else for(;Rt<Be;Rt+=2){var Jt=F[Rt+1];F[Rt+1]=(Jt?Jt+" ":"")+"overlay "+gt}},V),R.state=re,R.baseTokens=null,R.baseTokenPos=1},ce=0;ce<e.state.overlays.length;++ce)ie(ce);return{styles:F,classes:V.bgClass||V.textClass?V:null}}function Er(e,r,R){if(!r.styles||r.styles[0]!=e.state.modeGen){var A=ot(e,Xr(r)),F=r.text.length>e.options.maxHighlightLength&&hn(e.doc.mode,A.state),V=fa(e,r,A);F&&(A.state=F),r.stateAfter=A.save(!F),r.styles=V.styles,V.classes?r.styleClasses=V.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 ot(e,r,R){var A=e.doc,F=e.display;if(!A.mode.startState)return new Nn(A,!0,r);var V=ya(e,r,R),re=V>A.first&&Yt(A,V-1).stateAfter,ie=re?Nn.fromSaved(A,re,V):new Nn(A,wa(A.mode),V);return A.iter(V,r,function(ce){ar(e,ce.text,ie);var ve=ie.line;ce.stateAfter=ve==r-1||ve%5==0||ve>=F.viewFrom&&ve<F.viewTo?ie.save():null,ie.nextLine()}),R&&(A.modeFrontier=ie.line),ie}function ar(e,r,R,A){var F=e.doc.mode,V=new mn(r,e.options.tabSize,R);for(V.start=V.pos=A||0,r==""&&xr(F,R.state);!V.eol();)on(F,V,R.state),V.start=V.pos}function xr(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var R=ca(e,r);if(R.mode.blankLine)return R.mode.blankLine(R.state)}function on(e,r,R,A){for(var F=0;F<10;F++){A&&(A[0]=ca(e,R).mode);var V=e.token(r,R);if(r.pos>r.start)return V}throw new Error("Mode "+e.name+" failed to advance stream.")}var un=function(e,r,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=R};function _n(e,r,R,A){var F=e.doc,V=F.mode,re;r=cr(F,r);var ie=Yt(F,r.line),ce=ot(e,r.line,R),ve=new mn(ie.text,e.options.tabSize,ce),Ie;for(A&&(Ie=[]);(A||ve.pos<r.ch)&&!ve.eol();)ve.start=ve.pos,re=on(V,ve,ce.state),A&&Ie.push(new un(ve,re,hn(F.mode,ce.state)));return A?Ie:new un(ve,re,ce.state)}function Tn(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 A=R[1]?"bgClass":"textClass";r[A]==null?r[A]=R[2]:new RegExp("(?:^|\\s)"+R[2]+"(?:$|\\s)").test(r[A])||(r[A]+=" "+R[2])}return e}function Sn(e,r,R,A,F,V,re){var ie=R.flattenSpans;ie==null&&(ie=e.options.flattenSpans);var ce=0,ve=null,Ie=new mn(r,e.options.tabSize,A),Be,qe=e.options.addModeClass&&[null];for(r==""&&Tn(xr(R,A.state),V);!Ie.eol();){if(Ie.pos>e.options.maxHighlightLength?(ie=!1,re&&ar(e,r,A,Ie.pos),Ie.pos=r.length,Be=null):Be=Tn(on(R,Ie,A.state,qe),V),qe){var Qe=qe[0].name;Qe&&(Be="m-"+(Be?Qe+" "+Be:Qe))}if(!ie||ve!=Be){for(;ce<Ie.start;)ce=Math.min(Ie.start,ce+5e3),F(ce,ve);ve=Be}Ie.start=Ie.pos}for(;ce<Ie.pos;){var gt=Math.min(Ie.pos,ce+5e3);F(gt,ve),ce=gt}}function ya(e,r,R){for(var A,F,V=e.doc,re=R?-1:r-(e.doc.mode.innerMode?1e3:100),ie=r;ie>re;--ie){if(ie<=V.first)return V.first;var ce=Yt(V,ie-1),ve=ce.stateAfter;if(ve&&(!R||ie+(ve instanceof Jn?ve.lookAhead:0)<=V.modeFrontier))return ie;var Ie=G(ce.text,null,e.options.tabSize);(F==null||A>Ie)&&(F=ie-1,A=Ie)}return F}function Ta(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontier<r-10)return;for(var R=e.first,A=r-1;A>R;A--){var F=Yt(e,A).stateAfter;if(F&&(!(F instanceof Jn)||A+F.lookAhead<r)){R=A+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,R)}var Sa=!1,qn=!1;function vi(){Sa=!0}function gi(){qn=!0}function Ka(e,r,R){this.marker=e,this.from=r,this.to=R}function Ma(e,r){if(e)for(var R=0;R<e.length;++R){var A=e[R];if(A.marker==r)return A}}function wi(e,r){for(var R,A=0;A<e.length;++A)e[A]!=r&&(R||(R=[])).push(e[A]);return R}function ui(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function Ti(e,r,R){var A;if(e)for(var F=0;F<e.length;++F){var V=e[F],re=V.marker,ie=V.from==null||(re.inclusiveLeft?V.from<=r:V.from<r);if(ie||V.from==r&&re.type=="bookmark"&&(!R||!V.marker.insertLeft)){var ce=V.to==null||(re.inclusiveRight?V.to>=r:V.to>r);(A||(A=[])).push(new Ka(re,V.from,ce?null:V.to))}}return A}function ci(e,r,R){var A;if(e)for(var F=0;F<e.length;++F){var V=e[F],re=V.marker,ie=V.to==null||(re.inclusiveRight?V.to>=r:V.to>r);if(ie||V.from==r&&re.type=="bookmark"&&(!R||V.marker.insertLeft)){var ce=V.from==null||(re.inclusiveLeft?V.from<=r:V.from<r);(A||(A=[])).push(new Ka(re,ce?null:V.from-r,V.to==null?null:V.to-r))}}return A}function za(e,r){if(r.full)return null;var R=da(e,r.from.line)&&Yt(e,r.from.line).markedSpans,A=da(e,r.to.line)&&Yt(e,r.to.line).markedSpans;if(!R&&!A)return null;var F=r.from.ch,V=r.to.ch,re=ir(r.from,r.to)==0,ie=Ti(R,F,re),ce=ci(A,V,re),ve=r.text.length==1,Ie=te(r.text).length+(ve?F:0);if(ie)for(var Be=0;Be<ie.length;++Be){var qe=ie[Be];if(qe.to==null){var Qe=Ma(ce,qe.marker);Qe?ve&&(qe.to=Qe.to==null?null:Qe.to+Ie):qe.to=F}}if(ce)for(var gt=0;gt<ce.length;++gt){var Rt=ce[gt];if(Rt.to!=null&&(Rt.to+=Ie),Rt.from==null){var Ht=Ma(ie,Rt.marker);Ht||(Rt.from=Ie,ve&&(ie||(ie=[])).push(Rt))}else Rt.from+=Ie,ve&&(ie||(ie=[])).push(Rt)}ie&&(ie=Ca(ie)),ce&&ce!=ie&&(ce=Ca(ce));var Jt=[ie];if(!ve){var or=r.text.length-2,Qt;if(or>0&&ie)for(var mr=0;mr<ie.length;++mr)ie[mr].to==null&&(Qt||(Qt=[])).push(new Ka(ie[mr].marker,null,null));for(var Nr=0;Nr<or;++Nr)Jt.push(Qt);Jt.push(ce)}return Jt}function Ca(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 Qa(e,r,R){var A=null;if(e.iter(r.line,R.line+1,function(Qe){if(Qe.markedSpans)for(var gt=0;gt<Qe.markedSpans.length;++gt){var Rt=Qe.markedSpans[gt].marker;Rt.readOnly&&(!A||ae(A,Rt)==-1)&&(A||(A=[])).push(Rt)}}),!A)return null;for(var F=[{from:r,to:R}],V=0;V<A.length;++V)for(var re=A[V],ie=re.find(0),ce=0;ce<F.length;++ce){var ve=F[ce];if(ir(ve.to,ie.from)<0||ir(ve.from,ie.to)>0)continue;var Ie=[ce,1],Be=ir(ve.from,ie.from),qe=ir(ve.to,ie.to);(Be<0||!re.inclusiveLeft&&!Be)&&Ie.push({from:ve.from,to:ie.from}),(qe>0||!re.inclusiveRight&&!qe)&&Ie.push({from:ie.to,to:ve.to}),F.splice.apply(F,Ie),ce+=Ie.length-3}return F}function ei(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 ht(e,r){if(!r)return;for(var R=0;R<r.length;++R)r[R].marker.attachLine(e);e.markedSpans=r}function Ze(e){return e.inclusiveLeft?-1:0}function dt(e){return e.inclusiveRight?1:0}function Et(e,r){var R=e.lines.length-r.lines.length;if(R!=0)return R;var A=e.find(),F=r.find(),V=ir(A.from,F.from)||Ze(e)-Ze(r);if(V)return-V;var re=ir(A.to,F.to)||dt(e)-dt(r);return re||r.id-e.id}function Ut(e,r){var R=qn&&e.markedSpans,A;if(R)for(var F=void 0,V=0;V<R.length;++V)F=R[V],F.marker.collapsed&&(r?F.from:F.to)==null&&(!A||Et(A,F.marker)<0)&&(A=F.marker);return A}function Pt(e){return Ut(e,!0)}function Zt(e){return Ut(e,!1)}function kt(e,r){var R=qn&&e.markedSpans,A;if(R)for(var F=0;F<R.length;++F){var V=R[F];V.marker.collapsed&&(V.from==null||V.from<r)&&(V.to==null||V.to>r)&&(!A||Et(A,V.marker)<0)&&(A=V.marker)}return A}function lt(e,r,R,A,F){var V=Yt(e,r),re=qn&&V.markedSpans;if(re)for(var ie=0;ie<re.length;++ie){var ce=re[ie];if(!ce.marker.collapsed)continue;var ve=ce.marker.find(0),Ie=ir(ve.from,R)||Ze(ce.marker)-Ze(F),Be=ir(ve.to,A)||dt(ce.marker)-dt(F);if(Ie>=0&&Be<=0||Ie<=0&&Be>=0)continue;if(Ie<=0&&(ce.marker.inclusiveRight&&F.inclusiveLeft?ir(ve.to,R)>=0:ir(ve.to,R)>0)||Ie>=0&&(ce.marker.inclusiveRight&&F.inclusiveLeft?ir(ve.from,A)<=0:ir(ve.from,A)<0))return!0}}function mt(e){for(var r;r=Pt(e);)e=r.find(-1,!0).line;return e}function xt(e){for(var r;r=Zt(e);)e=r.find(1,!0).line;return e}function _t(e){for(var r,R;r=Zt(e);)e=r.find(1,!0).line,(R||(R=[])).push(e);return R}function wt(e,r){var R=Yt(e,r),A=mt(R);return R==A?r:Xr(A)}function yt(e,r){if(r>e.lastLine())return r;var R=Yt(e,r),A;if(!Ct(e,R))return r;for(;A=Zt(R);)R=A.find(1,!0).line;return Xr(R)+1}function Ct(e,r){var R=qn&&r.markedSpans;if(R)for(var A=void 0,F=0;F<R.length;++F){if(A=R[F],!A.marker.collapsed)continue;if(A.from==null)return!0;if(A.marker.widgetNode)continue;if(A.from==0&&A.marker.inclusiveLeft&&At(e,r,A))return!0}}function At(e,r,R){if(R.to==null){var A=R.marker.find(1,!0);return At(e,A.line,Ma(A.line.markedSpans,R.marker))}if(R.marker.inclusiveRight&&R.to==r.text.length)return!0;for(var F=void 0,V=0;V<r.markedSpans.length;++V)if(F=r.markedSpans[V],F.marker.collapsed&&!F.marker.widgetNode&&F.from==R.to&&(F.to==null||F.to!=R.from)&&(F.marker.inclusiveLeft||R.marker.inclusiveRight)&&At(e,r,F))return!0}function jt(e){e=mt(e);for(var r=0,R=e.parent,A=0;A<R.lines.length;++A){var F=R.lines[A];if(F==e)break;r+=F.height}for(var V=R.parent;V;R=V,V=R.parent)for(var re=0;re<V.children.length;++re){var ie=V.children[re];if(ie==R)break;r+=ie.height}return r}function Vt(e){if(e.height==0)return 0;for(var r=e.text.length,R,A=e;R=Pt(A);){var F=R.find(0,!0);A=F.from.line,r+=F.from.ch-F.to.ch}for(A=e;R=Zt(A);){var V=R.find(0,!0);r-=A.text.length-V.from.ch,A=V.to.line,r+=A.text.length-V.to.ch}return r}function Xe(e){var r=e.display,R=e.doc;r.maxLine=Yt(R,R.first),r.maxLineLength=Vt(r.maxLine),r.maxLineChanged=!0,R.iter(function(A){var F=Vt(A);F>r.maxLineLength&&(r.maxLineLength=F,r.maxLine=A)})}var qt=function(e,r,R){this.text=e,ht(this,r),this.height=R?R(this):1};qt.prototype.lineNo=function(){return Xr(this)},Te(qt);function sr(e,r,R,A){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ei(e),ht(e,R);var F=A?A(e):1;F!=e.height&&Vn(e,F)}function er(e){e.parent=null,ei(e)}var Bt={},Nt={};function $t(e,r){if(!e||/^\s*$/.test(e))return null;var R=r.addModeClass?Nt:Bt;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function Ft(e,r){var R=M("span",null,null,o?"padding-right: .1px":null),A={pre:M("pre",[R],"CodeMirror-line"),content:R,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var F=0;F<=(r.rest?r.rest.length:0);F++){var V=F?r.rest[F-1]:r.line,re=void 0;A.pos=0,A.addToken=Ar,lr(e.display.measure)&&(re=it(V,e.doc.direction))&&(A.addToken=vn(A.addToken,re)),A.map=[];var ie=r!=e.display.externalMeasured&&Xr(V);Kt(V,A,Er(e,V,ie)),V.styleClasses&&(V.styleClasses.bgClass&&(A.bgClass=W(V.styleClasses.bgClass,A.bgClass||"")),V.styleClasses.textClass&&(A.textClass=W(V.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(Dt(e.display.measure))),F==0?(r.measure.map=A.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(A.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(o){var ce=A.content.lastChild;(/\bcm-tab\b/.test(ce.className)||ce.querySelector&&ce.querySelector(".cm-tab"))&&(A.content.className="cm-tab-wrap-hack")}return ze(e,"renderLine",e,r.line,A.pre),A.pre.className&&(A.textClass=W(A.pre.className,A.textClass||"")),A}function Sr(e){var r=T("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function Ar(e,r,R,A,F,V,re){if(!r)return;var ie=e.splitSpaces?Yr(r,e.trailingSpace):r,ce=e.cm.state.specialChars,ve=!1,Ie;if(!ce.test(r))e.col+=r.length,Ie=document.createTextNode(ie),e.map.push(e.pos,e.pos+r.length,Ie),w&&d<9&&(ve=!0),e.pos+=r.length;else{Ie=document.createDocumentFragment();for(var Be=0;;){ce.lastIndex=Be;var qe=ce.exec(r),Qe=qe?qe.index-Be:r.length-Be;if(Qe){var gt=document.createTextNode(ie.slice(Be,Be+Qe));w&&d<9?Ie.appendChild(T("span",[gt])):Ie.appendChild(gt),e.map.push(e.pos,e.pos+Qe,gt),e.col+=Qe,e.pos+=Qe}if(!qe)break;Be+=Qe+1;var Rt=void 0;if(qe[0]==" "){var Ht=e.cm.options.tabSize,Jt=Ht-e.col%Ht;Rt=Ie.appendChild(T("span",oe(Jt),"cm-tab")),Rt.setAttribute("role","presentation"),Rt.setAttribute("cm-text"," "),e.col+=Jt}else qe[0]=="\r"||qe[0]==`
|
|
|
`?(Rt=Ie.appendChild(T("span",qe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Rt.setAttribute("cm-text",qe[0]),e.col+=1):(Rt=e.cm.options.specialCharPlaceholder(qe[0]),Rt.setAttribute("cm-text",qe[0]),w&&d<9?Ie.appendChild(T("span",[Rt])):Ie.appendChild(Rt),e.col+=1);e.map.push(e.pos,e.pos+1,Rt),e.pos++}}if(e.trailingSpace=ie.charCodeAt(r.length-1)==32,R||A||F||ve||V||re){var or=R||"";A&&(or+=A),F&&(or+=F);var Qt=T("span",[Ie],or,V);if(re)for(var mr in re)re.hasOwnProperty(mr)&&mr!="style"&&mr!="class"&&Qt.setAttribute(mr,re[mr]);return e.content.appendChild(Qt)}e.content.appendChild(Ie)}function Yr(e,r){if(e.length>1&&!/ /.test(e))return e;for(var R=r,A="",F=0;F<e.length;F++){var V=e.charAt(F);V==" "&&R&&(F==e.length-1||e.charCodeAt(F+1)==32)&&(V="\xA0"),A+=V,R=V==" "}return A}function vn(e,r){return function(R,A,F,V,re,ie,ce){F=F?F+" cm-force-border":"cm-force-border";for(var ve=R.pos,Ie=ve+A.length;;){for(var Be=void 0,qe=0;qe<r.length&&!(Be=r[qe],Be.to>ve&&Be.from<=ve);qe++);if(Be.to>=Ie)return e(R,A,F,V,re,ie,ce);e(R,A.slice(0,Be.to-ve),F,V,null,ie,ce),V=null,A=A.slice(Be.to-ve),ve=Be.to}}}function Jr(e,r,R,A){var F=!A&&R.widgetNode;F&&e.map.push(e.pos,e.pos+r,F),!A&&e.cm.display.input.needsContentAttribute&&(F||(F=e.content.appendChild(document.createElement("span"))),F.setAttribute("cm-marker",R.id)),F&&(e.cm.display.input.setUneditable(F),e.content.appendChild(F)),e.pos+=r,e.trailingSpace=!1}function Kt(e,r,R){var A=e.markedSpans,F=e.text,V=0;if(!A){for(var re=1;re<R.length;re+=2)r.addToken(r,F.slice(V,V=R[re]),$t(R[re+1],r.cm.options));return}for(var ie=F.length,ce=0,ve=1,Ie="",Be,qe,Qe=0,gt,Rt,Ht,Jt,or;;){if(Qe==ce){gt=Rt=Ht=qe="",or=null,Jt=null,Qe=Infinity;for(var Qt=[],mr=void 0,Nr=0;Nr<A.length;++Nr){var Dr=A[Nr],sn=Dr.marker;if(sn.type=="bookmark"&&Dr.from==ce&&sn.widgetNode)Qt.push(sn);else if(Dr.from<=ce&&(Dr.to==null||Dr.to>ce||sn.collapsed&&Dr.to==ce&&Dr.from==ce)){if(Dr.to!=null&&Dr.to!=ce&&Qe>Dr.to&&(Qe=Dr.to,Rt=""),sn.className&&(gt+=" "+sn.className),sn.css&&(qe=(qe?qe+";":"")+sn.css),sn.startStyle&&Dr.from==ce&&(Ht+=" "+sn.startStyle),sn.endStyle&&Dr.to==Qe&&(mr||(mr=[])).push(sn.endStyle,Dr.to),sn.title&&((or||(or={})).title=sn.title),sn.attributes)for(var zn in sn.attributes)(or||(or={}))[zn]=sn.attributes[zn];sn.collapsed&&(!Jt||Et(Jt.marker,sn)<0)&&(Jt=Dr)}else Dr.from>ce&&Qe>Dr.from&&(Qe=Dr.from)}if(mr)for(var Oa=0;Oa<mr.length;Oa+=2)mr[Oa+1]==Qe&&(Rt+=" "+mr[Oa]);if(!Jt||Jt.from==ce)for(var ra=0;ra<Qt.length;++ra)Jr(r,0,Qt[ra]);if(Jt&&(Jt.from||0)==ce){if(Jr(r,(Jt.to==null?ie+1:Jt.to)-ce,Jt.marker,Jt.from==null),Jt.to==null)return;Jt.to==ce&&(Jt=!1)}}if(ce>=ie)break;for(var qa=Math.min(ie,Qe);;){if(Ie){var $a=ce+Ie.length;if(!Jt){var pa=$a>qa?Ie.slice(0,qa-ce):Ie;r.addToken(r,pa,Be?Be+gt:gt,Ht,ce+pa.length==Qe?Rt:"",qe,or)}if($a>=qa){Ie=Ie.slice(qa-ce),ce=qa;break}ce=$a,Ht=""}Ie=F.slice(V,V=R[ve++]),Be=$t(R[ve++],r.cm.options)}}}function st(e,r,R){this.line=r,this.rest=_t(r),this.size=this.rest?Xr(te(this.rest))-R+1:1,this.node=this.text=null,this.hidden=Ct(e,r)}function rn(e,r,R){for(var A=[],F,V=r;V<R;V=F){var re=new st(e.doc,Yt(e.doc,V),V);F=V+re.size,A.push(re)}return A}var gn=null;function _r(e){gn?gn.ops.push(e):e.ownsGroup=gn={ops:[e],delayedCallbacks:[]}}function fr(e){var r=e.delayedCallbacks,R=0;do{for(;R<r.length;R++)r[R].call(null);for(var A=0;A<e.ops.length;A++){var F=e.ops[A];if(F.cursorActivityHandlers)for(;F.cursorActivityCalled<F.cursorActivityHandlers.length;)F.cursorActivityHandlers[F.cursorActivityCalled++].call(null,F.cm)}}while(R<r.length)}function gr(e,r){var R=e.ownsGroup;if(!R)return;try{fr(R)}finally{gn=null,r(R)}}var Gt=null;function zt(e,r){var R=Je(e,r);if(!R.length)return;var A=Array.prototype.slice.call(arguments,2),F;gn?F=gn.delayedCallbacks:Gt?F=Gt:(F=Gt=[],setTimeout(Mr,0));for(var V=function(ie){F.push(function(){return R[ie].apply(null,A)})},re=0;re<R.length;++re)V(re)}function Mr(){var e=Gt;Gt=null;for(var r=0;r<e.length;++r)e[r]()}function tr(e,r,R,A){for(var F=0;F<r.changes.length;F++){var V=r.changes[F];V=="text"?ct(e,r):V=="gutter"?Cr(e,r,R,A):V=="class"?Xt(e,r):V=="widget"&&Vr(e,r,A)}r.changes=null}function pt(e){return e.node==e.text&&(e.node=T("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),w&&d<8&&(e.node.style.zIndex=2)),e.node}function Lt(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 A=pt(r);r.background=A.insertBefore(T("div",null,R),A.firstChild),e.display.input.setUneditable(r.background)}}function vt(e,r){var R=e.display.externalMeasured;return R&&R.line==r.line?(e.display.externalMeasured=null,r.measure=R.measure,R.built):Ft(e,r)}function ct(e,r){var R=r.text.className,A=vt(e,r);r.text==r.node&&(r.node=A.pre),r.text.parentNode.replaceChild(A.pre,r.text),r.text=A.pre,A.bgClass!=r.bgClass||A.textClass!=r.textClass?(r.bgClass=A.bgClass,r.textClass=A.textClass,Xt(e,r)):R&&(r.text.className=R)}function Xt(e,r){Lt(e,r),r.line.wrapClass?pt(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 Cr(e,r,R,A){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 F=pt(r);r.gutterBackground=T("div",null,"CodeMirror-gutter-background "+r.line.gutterClass,"left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px; width: "+A.gutterTotalWidth+"px"),e.display.input.setUneditable(r.gutterBackground),F.insertBefore(r.gutterBackground,r.text)}var V=r.line.gutterMarkers;if(e.options.lineNumbers||V){var re=pt(r),ie=r.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px");if(e.display.input.setUneditable(ie),re.insertBefore(ie,r.text),r.line.gutterClass&&(ie.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!V||!V["CodeMirror-linenumbers"])&&(r.lineNumber=ie.appendChild(T("div",Zn(e.options,R),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+A.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),V)for(var ce=0;ce<e.display.gutterSpecs.length;++ce){var ve=e.display.gutterSpecs[ce].className,Ie=V.hasOwnProperty(ve)&&V[ve];Ie&&ie.appendChild(T("div",[Ie],"CodeMirror-gutter-elt","left: "+A.gutterLeft[ve]+"px; width: "+A.gutterWidth[ve]+"px"))}}}function Vr(e,r,R){r.alignable&&(r.alignable=null);for(var A=O("CodeMirror-linewidget"),F=r.node.firstChild,V=void 0;F;F=V)V=F.nextSibling,A.test(F.className)&&r.node.removeChild(F);Or(e,r,R)}function yr(e,r,R,A){var F=vt(e,r);return r.text=r.node=F.pre,F.bgClass&&(r.bgClass=F.bgClass),F.textClass&&(r.textClass=F.textClass),Xt(e,r),Cr(e,r,R,A),Or(e,r,A),r.node}function Or(e,r,R){if(jr(e,r.line,r,R,!0),r.rest)for(var A=0;A<r.rest.length;A++)jr(e,r.rest[A],r,R,!1)}function jr(e,r,R,A,F){if(!r.widgets)return;for(var V=pt(R),re=0,ie=r.widgets;re<ie.length;++re){var ce=ie[re],ve=T("div",[ce.node],"CodeMirror-linewidget"+(ce.className?" "+ce.className:""));ce.handleMouseEvents||ve.setAttribute("cm-ignore-events","true"),Rr(ce,ve,R,A),e.display.input.setUneditable(ve),F&&ce.above?V.insertBefore(ve,R.gutter||R.text):V.appendChild(ve),zt(ce,"redraw")}}function Rr(e,r,R,A){if(e.noHScroll){(R.alignable||(R.alignable=[])).push(r);var F=A.wrapperWidth;r.style.left=A.fixedPos+"px",e.coverGutter||(F-=A.gutterTotalWidth,r.style.paddingLeft=A.gutterTotalWidth+"px"),r.style.width=F+"px"}e.coverGutter&&(r.style.zIndex=5,r.style.position="relative",e.noHScroll||(r.style.marginLeft=-A.gutterTotalWidth+"px"))}function Wr(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!I(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;"),p(r.display.measure,T("div",[e.node],null,R))}return e.height=e.node.parentNode.offsetHeight}function Hr(e,r){for(var R=We(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 wn(e){return e.lineSpace.offsetTop}function De(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Fe(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=p(e.measure,T("pre","x","CodeMirror-line-like")),R=window.getComputedStyle?window.getComputedStyle(r):r.currentStyle,A={left:parseInt(R.paddingLeft),right:parseInt(R.paddingRight)};return!isNaN(A.left)&&!isNaN(A.right)&&(e.cachedPaddingH=A),A}function Ke(e){return se-e.display.nativeBarWidth}function Pe(e){return e.display.scroller.clientWidth-Ke(e)-e.display.barWidth}function pe(e){return e.display.scroller.clientHeight-Ke(e)-e.display.barHeight}function Ae(e,r,R){var A=e.options.lineWrapping,F=A&&Pe(e);if(!r.measure.heights||A&&r.measure.width!=F){var V=r.measure.heights=[];if(A){r.measure.width=F;for(var re=r.text.firstChild.getClientRects(),ie=0;ie<re.length-1;ie++){var ce=re[ie],ve=re[ie+1];Math.abs(ce.bottom-ve.bottom)>2&&V.push((ce.bottom+ve.top)/2-R.top)}}V.push(R.bottom-R.top)}}function be(e,r,R){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var A=0;A<e.rest.length;A++)if(e.rest[A]==r)return{map:e.measure.maps[A],cache:e.measure.caches[A]};for(var F=0;F<e.rest.length;F++)if(Xr(e.rest[F])>R)return{map:e.measure.maps[F],cache:e.measure.caches[F],before:!0}}function Le(e,r){r=mt(r);var R=Xr(r),A=e.display.externalMeasured=new st(e.doc,r,R);A.lineN=R;var F=A.built=Ft(e,A);return A.text=F.pre,p(e.display.lineMeasure,F.pre),A}function Ne(e,r,R,A){return Ge(e,je(e,r),R,A)}function Ue(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[In(e,r)];var R=e.display.externalMeasured;if(R&&r>=R.lineN&&r<R.lineN+R.size)return R}function je(e,r){var R=Xr(r),A=Ue(e,R);A&&!A.text?A=null:A&&A.changes&&(tr(e,A,R,Kn(e)),e.curOp.forceUpdate=!0),A||(A=Le(e,r));var F=be(A,r,R);return{line:r,view:A,rect:null,map:F.map,cache:F.cache,before:F.before,hasHeights:!1}}function Ge(e,r,R,A,F){r.before&&(R=-1);var V=R+(A||""),re;return r.cache.hasOwnProperty(V)?re=r.cache[V]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(Ae(e,r.view,r.rect),r.hasHeights=!0),re=Wt(e,r,R,A),re.bogus||(r.cache[V]=re)),{left:re.left,right:re.right,top:F?re.rtop:re.top,bottom:F?re.rbottom:re.bottom}}var at={left:0,right:0,top:0,bottom:0};function bt(e,r,R){for(var A,F,V,re,ie,ce,ve=0;ve<e.length;ve+=3)if(ie=e[ve],ce=e[ve+1],r<ie?(F=0,V=1,re="left"):r<ce?(F=r-ie,V=F+1):(ve==e.length-3||r==ce&&e[ve+3]>r)&&(V=ce-ie,F=V-1,r>=ce&&(re="right")),F!=null){if(A=e[ve+2],ie==ce&&R==(A.insertLeft?"left":"right")&&(re=R),R=="left"&&F==0)for(;ve&&e[ve-2]==e[ve-3]&&e[ve-1].insertLeft;)A=e[(ve-=3)+2],re="left";if(R=="right"&&F==ce-ie)for(;ve<e.length-3&&e[ve+3]==e[ve+4]&&!e[ve+5].insertLeft;)A=e[(ve+=3)+2],re="right";break}return{node:A,start:F,end:V,collapse:re,coverStart:ie,coverEnd:ce}}function Ot(e,r){var R=at;if(r=="left")for(var A=0;A<e.length&&!((R=e[A]).left!=R.right);A++);else for(var F=e.length-1;F>=0&&!((R=e[F]).left!=R.right);F--);return R}function Wt(e,r,R,A){var F=bt(r.map,R,A),V=F.node,re=F.start,ie=F.end,ce=F.collapse,ve;if(V.nodeType==3){for(var Ie=0;Ie<4;Ie++){for(;re&&ue(r.line.text.charAt(F.coverStart+re));)--re;for(;F.coverStart+ie<F.coverEnd&&ue(r.line.text.charAt(F.coverStart+ie));)++ie;if(w&&d<9&&re==0&&ie==F.coverEnd-F.coverStart?ve=V.parentNode.getBoundingClientRect():ve=Ot(N(V,re,ie).getClientRects(),A),ve.left||ve.right||re==0)break;ie=re,re=re-1,ce="right"}w&&d<11&&(ve=vr(e.display.measure,ve))}else{re>0&&(ce=A="right");var Be;e.options.lineWrapping&&(Be=V.getClientRects()).length>1?ve=Be[A=="right"?Be.length-1:0]:ve=V.getBoundingClientRect()}if(w&&d<9&&!re&&(!ve||!ve.left&&!ve.right)){var qe=V.parentNode.getClientRects()[0];qe?ve={left:qe.left,right:qe.left+oa(e.display),top:qe.top,bottom:qe.bottom}:ve=at}for(var Qe=ve.top-r.rect.top,gt=ve.bottom-r.rect.top,Rt=(Qe+gt)/2,Ht=r.view.measure.heights,Jt=0;Jt<Ht.length-1&&!(Rt<Ht[Jt]);Jt++);var or=Jt?Ht[Jt-1]:0,Qt=Ht[Jt],mr={left:(ce=="right"?ve.right:ve.left)-r.rect.left,right:(ce=="left"?ve.left:ve.right)-r.rect.left,top:or,bottom:Qt};return!ve.left&&!ve.right&&(mr.bogus=!0),e.options.singleCursorHeightPerLine||(mr.rtop=Qe,mr.rbottom=gt),mr}function vr(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Br(e))return r;var R=screen.logicalXDPI/screen.deviceXDPI,A=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*R,right:r.right*R,top:r.top*A,bottom:r.bottom*A}}function kr(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 Ir(e){e.display.externalMeasure=null,y(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)kr(e.display.view[r])}function Fr(e){Ir(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Lr(){return a&&x?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Kr(){return a&&x?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Gr(e){var r=0;if(e.widgets)for(var R=0;R<e.widgets.length;++R)e.widgets[R].above&&(r+=Wr(e.widgets[R]));return r}function nn(e,r,R,A,F){if(!F){var V=Gr(r);R.top+=V,R.bottom+=V}if(A=="line")return R;A||(A="local");var re=jt(r);if(A=="local"?re+=wn(e.display):re-=e.display.viewOffset,A=="page"||A=="window"){var ie=e.display.lineSpace.getBoundingClientRect();re+=ie.top+(A=="window"?0:Kr());var ce=ie.left+(A=="window"?0:Lr());R.left+=ce,R.right+=ce}return R.top+=re,R.bottom+=re,R}function Qr(e,r,R){if(R=="div")return r;var A=r.left,F=r.top;if(R=="page")A-=Lr(),F-=Kr();else if(R=="local"||!R){var V=e.display.sizer.getBoundingClientRect();A+=V.left,F+=V.top}var re=e.display.lineSpace.getBoundingClientRect();return{left:A-re.left,top:F-re.top}}function En(e,r,R,A,F){return A||(A=Yt(e.doc,r.line)),nn(e,A,Ne(e,A,r.ch,F),R)}function en(e,r,R,A,F,V){A=A||Yt(e.doc,r.line),F||(F=je(e,A));function re(gt,Rt){var Ht=Ge(e,F,gt,Rt?"right":"left",V);return Rt?Ht.left=Ht.right:Ht.right=Ht.left,nn(e,A,Ht,R)}var ie=it(A,e.doc.direction),ce=r.ch,ve=r.sticky;if(ce>=A.text.length?(ce=A.text.length,ve="before"):ce<=0&&(ce=0,ve="after"),!ie)return re(ve=="before"?ce-1:ce,ve=="before");function Ie(gt,Rt,Ht){var Jt=ie[Rt],or=Jt.level==1;return re(Ht?gt-1:gt,or!=Ht)}var Be=tt(ie,ce,ve),qe=Ye,Qe=Ie(ce,Be,ve=="before");return qe!=null&&(Qe.other=Ie(ce,qe,ve!="before")),Qe}function wr(e,r){var R=0;r=cr(e.doc,r),e.options.lineWrapping||(R=oa(e.display)*r.ch);var A=Yt(e.doc,r.line),F=jt(A)+wn(e.display);return{left:R,right:R,top:F,bottom:F+A.height}}function Tr(e,r,R,A,F){var V=St(e,r,R);return V.xRel=F,A&&(V.outside=A),V}function zr(e,r,R){var A=e.doc;if(R+=e.display.viewOffset,R<0)return Tr(A.first,0,null,-1,-1);var F=Fn(A,R),V=A.first+A.size-1;if(F>V)return Tr(A.first+A.size-1,Yt(A,V).text.length,null,1,1);r<0&&(r=0);for(var re=Yt(A,F);;){var ie=Un(e,re,F,r,R),ce=kt(re,ie.ch+(ie.xRel>0||ie.outside>0?1:0));if(!ce)return ie;var ve=ce.find(1);if(ve.line==F)return ve;re=Yt(A,F=ve.line)}}function an(e,r,R,A){A-=Gr(r);var F=r.text.length,V=He(function(re){return Ge(e,R,re-1).bottom<=A},F,0);return F=He(function(re){return Ge(e,R,re).top>A},V,F),{begin:V,end:F}}function hr(e,r,R,A){R||(R=je(e,r));var F=nn(e,r,Ge(e,R,A),"line").top;return an(e,r,R,F)}function cn(e,r,R,A){return e.bottom<=R?!1:e.top>R?!0:(A?e.left:e.right)>r}function Un(e,r,R,A,F){F-=jt(r);var V=je(e,r),re=Gr(r),ie=0,ce=r.text.length,ve=!0,Ie=it(r,e.doc.direction);if(Ie){var Be=(e.options.lineWrapping?Rn:xn)(e,r,R,V,Ie,A,F);ve=Be.level!=1,ie=ve?Be.from:Be.to-1,ce=ve?Be.to:Be.from-1}var qe=null,Qe=null,gt=He(function(Nr){var Dr=Ge(e,V,Nr);return Dr.top+=re,Dr.bottom+=re,cn(Dr,A,F,!1)?(Dr.top<=F&&Dr.left<=A&&(qe=Nr,Qe=Dr),!0):!1},ie,ce),Rt,Ht,Jt=!1;if(Qe){var or=A-Qe.left<Qe.right-A,Qt=or==ve;gt=qe+(Qt?0:1),Ht=Qt?"after":"before",Rt=or?Qe.left:Qe.right}else{!ve&&(gt==ce||gt==ie)&>++,Ht=gt==0?"after":gt==r.text.length?"before":Ge(e,V,gt-(ve?1:0)).bottom+re<=F==ve?"after":"before";var mr=en(e,St(R,gt,Ht),"line",r,V);Rt=mr.left,Jt=F<mr.top?-1:F>=mr.bottom?1:0}return gt=_e(r.text,gt,1),Tr(R,gt,Ht,Jt,A-Rt)}function xn(e,r,R,A,F,V,re){var ie=He(function(Be){var qe=F[Be],Qe=qe.level!=1;return cn(en(e,St(R,Qe?qe.to:qe.from,Qe?"before":"after"),"line",r,A),V,re,!0)},0,F.length-1),ce=F[ie];if(ie>0){var ve=ce.level!=1,Ie=en(e,St(R,ve?ce.from:ce.to,ve?"after":"before"),"line",r,A);cn(Ie,V,re,!0)&&Ie.top>re&&(ce=F[ie-1])}return ce}function Rn(e,r,R,A,F,V,re){var ie=an(e,r,A,re),ce=ie.begin,ve=ie.end;/\s/.test(r.text.charAt(ve-1))&&ve--;for(var Ie=null,Be=null,qe=0;qe<F.length;qe++){var Qe=F[qe];if(Qe.from>=ve||Qe.to<=ce)continue;var gt=Qe.level!=1,Rt=Ge(e,A,gt?Math.min(ve,Qe.to)-1:Math.max(ce,Qe.from)).right,Ht=Rt<V?V-Rt+1e9:Rt-V;(!Ie||Be>Ht)&&(Ie=Qe,Be=Ht)}return Ie||(Ie=F[F.length-1]),Ie.from<ce&&(Ie={from:ce,to:Ie.to,level:Ie.level}),Ie.to>ve&&(Ie={from:Ie.from,to:ve,level:Ie.level}),Ie}var Dn;function Hn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Dn==null){Dn=T("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)Dn.appendChild(document.createTextNode("x")),Dn.appendChild(T("br"));Dn.appendChild(document.createTextNode("x"))}p(e.measure,Dn);var R=Dn.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),y(e.measure),R||1}function oa(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=T("span","xxxxxxxxxx"),R=T("pre",[r],"CodeMirror-line-like");p(e.measure,R);var A=r.getBoundingClientRect(),F=(A.right-A.left)/10;return F>2&&(e.cachedCharWidth=F),F||10}function Kn(e){for(var r=e.display,R={},A={},F=r.gutters.clientLeft,V=r.gutters.firstChild,re=0;V;V=V.nextSibling,++re){var ie=e.display.gutterSpecs[re].className;R[ie]=V.offsetLeft+V.clientLeft+F,A[ie]=V.clientWidth}return{fixedPos:ba(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:R,gutterWidth:A,wrapperWidth:r.wrapper.clientWidth}}function ba(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ka(e){var r=Hn(e.display),R=e.options.lineWrapping,A=R&&Math.max(5,e.display.scroller.clientWidth/oa(e.display)-3);return function(F){if(Ct(e.doc,F))return 0;var V=0;if(F.widgets)for(var re=0;re<F.widgets.length;re++)F.widgets[re].height&&(V+=F.widgets[re].height);return R?V+(Math.ceil(F.text.length/A)||1)*r:V+r}}function Ra(e){var r=e.doc,R=ka(e);r.iter(function(A){var F=R(A);F!=A.height&&Vn(A,F)})}function aa(e,r,R,A){var F=e.display;if(!R&&We(r).getAttribute("cm-not-content")=="true")return null;var V,re,ie=F.lineSpace.getBoundingClientRect();try{V=r.clientX-ie.left,re=r.clientY-ie.top}catch(Be){return null}var ce=zr(e,V,re),ve;if(A&&ce.xRel>0&&(ve=Yt(e.doc,ce.line).text).length==ce.ch){var Ie=G(ve,ve.length,e.options.tabSize)-ve.length;ce=St(ce.line,Math.max(0,Math.round((V-Fe(e.display).left)/oa(e.display))-Ie))}return ce}function In(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var R=e.display.view,A=0;A<R.length;A++)if(r-=R[A].size,r<0)return A}function Cn(e,r,R,A){r==null&&(r=e.doc.first),R==null&&(R=e.doc.first+e.doc.size),A||(A=0);var F=e.display;if(A&&R<F.viewTo&&(F.updateLineNumbers==null||F.updateLineNumbers>r)&&(F.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=F.viewTo)qn&&wt(e.doc,r)<F.viewTo&&Bn(e);else if(R<=F.viewFrom)qn&&yt(e.doc,R+A)>F.viewFrom?Bn(e):(F.viewFrom+=A,F.viewTo+=A);else if(r<=F.viewFrom&&R>=F.viewTo)Bn(e);else if(r<=F.viewFrom){var V=Fa(e,R,R+A,1);V?(F.view=F.view.slice(V.index),F.viewFrom=V.lineN,F.viewTo+=A):Bn(e)}else if(R>=F.viewTo){var re=Fa(e,r,r,-1);re?(F.view=F.view.slice(0,re.index),F.viewTo=re.lineN):Bn(e)}else{var ie=Fa(e,r,r,-1),ce=Fa(e,R,R+A,1);ie&&ce?(F.view=F.view.slice(0,ie.index).concat(rn(e,ie.lineN,ce.lineN)).concat(F.view.slice(ce.index)),F.viewTo+=A):Bn(e)}var ve=F.externalMeasured;ve&&(R<ve.lineN?ve.lineN+=A:r<ve.lineN+ve.size&&(F.externalMeasured=null))}function Xn(e,r,R){e.curOp.viewChanged=!0;var A=e.display,F=e.display.externalMeasured;if(F&&r>=F.lineN&&r<F.lineN+F.size&&(A.externalMeasured=null),r<A.viewFrom||r>=A.viewTo)return;var V=A.view[In(e,r)];if(V.node==null)return;var re=V.changes||(V.changes=[]);ae(re,R)==-1&&re.push(R)}function Bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Fa(e,r,R,A){var F=In(e,r),V,re=e.display.view;if(!qn||R==e.doc.first+e.doc.size)return{index:F,lineN:R};for(var ie=e.display.viewFrom,ce=0;ce<F;ce++)ie+=re[ce].size;if(ie!=r){if(A>0){if(F==re.length-1)return null;V=ie+re[F].size-r,F++}else V=ie-r;r+=V,R+=V}for(;wt(e.doc,R)!=R;){if(F==(A<0?0:re.length-1))return null;R+=A*re[F-(A<0?1:0)].size,F+=A}return{index:F,lineN:R}}function ha(e,r,R){var A=e.display,F=A.view;F.length==0||r>=A.viewTo||R<=A.viewFrom?(A.view=rn(e,r,R),A.viewFrom=r):(A.viewFrom>r?A.view=rn(e,r,A.viewFrom).concat(A.view):A.viewFrom<r&&(A.view=A.view.slice(In(e,r))),A.viewFrom=r,A.viewTo<R?A.view=A.view.concat(rn(e,A.viewTo,R)):A.viewTo>R&&(A.view=A.view.slice(0,In(e,R)))),A.viewTo=R}function Da(e){for(var r=e.display.view,R=0,A=0;A<r.length;A++){var F=r[A];!F.hidden&&(!F.node||F.changes)&&++R}return R}function On(e){e.display.input.showSelection(e.display.input.prepareSelection())}function tn(e,r){r===void 0&&(r=!0);for(var R=e.doc,A={},F=A.cursors=document.createDocumentFragment(),V=A.selection=document.createDocumentFragment(),re=0;re<R.sel.ranges.length;re++){if(!r&&re==R.sel.primIndex)continue;var ie=R.sel.ranges[re];if(ie.from().line>=e.display.viewTo||ie.to().line<e.display.viewFrom)continue;var ce=ie.empty();(ce||e.options.showCursorWhenSelecting)&&Za(e,ie.head,F),ce||yn(e,ie,V)}return A}function Za(e,r,R){var A=en(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),F=R.appendChild(T("div","\xA0","CodeMirror-cursor"));if(F.style.left=A.left+"px",F.style.top=A.top+"px",F.style.height=Math.max(0,A.bottom-A.top)*e.options.cursorHeight+"px",A.other){var V=R.appendChild(T("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));V.style.display="",V.style.left=A.other.left+"px",V.style.top=A.other.top+"px",V.style.height=(A.other.bottom-A.other.top)*.85+"px"}}function Pn(e,r){return e.top-r.top||e.left-r.left}function yn(e,r,R){var A=e.display,F=e.doc,V=document.createDocumentFragment(),re=Fe(e.display),ie=re.left,ce=Math.max(A.sizerWidth,Pe(e)-A.sizer.offsetLeft)-re.right,ve=F.direction=="ltr";function Ie(Qt,mr,Nr,Dr){mr<0&&(mr=0),mr=Math.round(mr),Dr=Math.round(Dr),V.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+Qt+`px;
|
|
|
top: `+mr+"px; width: "+(Nr==null?ce-Qt:Nr)+`px;
|
|
|
height: `+(Dr-mr)+"px"))}function Be(Qt,mr,Nr){var Dr=Yt(F,Qt),sn=Dr.text.length,zn,Oa;function ra(pa,Ya){return En(e,St(Qt,pa),"div",Dr,Ya)}function qa(pa,Ya,La){var _a=hr(e,Dr,null,pa),ma=Ya=="ltr"==(La=="after")?"left":"right",ia=La=="after"?_a.begin:_a.end-(/\s/.test(Dr.text.charAt(_a.end-1))?2:1);return ra(ia,ma)[ma]}var $a=it(Dr,F.direction);return $e($a,mr||0,Nr==null?sn:Nr,function(pa,Ya,La,_a){var ma=La=="ltr",ia=ra(pa,ma?"left":"right"),Ja=ra(Ya-1,ma?"right":"left"),lo=mr==null&&pa==0,Hi=Nr==null&&Ya==sn,ja=_a==0,_i=!$a||_a==$a.length-1;if(Ja.top-ia.top<=3){var Aa=(ve?lo:Hi)&&ja,ps=(ve?Hi:lo)&&_i,Li=Aa?ie:(ma?ia:Ja).left,Vi=ps?ce:(ma?Ja:ia).right;Ie(Li,ia.top,Vi-Li,ia.bottom)}else{var $i,Ha,uo,ms;ma?($i=ve&&lo&&ja?ie:ia.left,Ha=ve?ce:qa(pa,La,"before"),uo=ve?ie:qa(Ya,La,"after"),ms=ve&&Hi&&_i?ce:Ja.right):($i=ve?qa(pa,La,"before"):ie,Ha=!ve&&lo&&ja?ce:ia.right,uo=!ve&&Hi&&_i?ie:Ja.left,ms=ve?qa(Ya,La,"after"):ce),Ie($i,ia.top,Ha-$i,ia.bottom),ia.bottom<Ja.top&&Ie(ie,ia.bottom,null,Ja.top),Ie(uo,Ja.top,ms-uo,Ja.bottom)}(!zn||Pn(ia,zn)<0)&&(zn=ia),Pn(Ja,zn)<0&&(zn=Ja),(!Oa||Pn(ia,Oa)<0)&&(Oa=ia),Pn(Ja,Oa)<0&&(Oa=Ja)}),{start:zn,end:Oa}}var qe=r.from(),Qe=r.to();if(qe.line==Qe.line)Be(qe.line,qe.ch,Qe.ch);else{var gt=Yt(F,qe.line),Rt=Yt(F,Qe.line),Ht=mt(gt)==mt(Rt),Jt=Be(qe.line,qe.ch,Ht?gt.text.length+1:null).end,or=Be(Qe.line,Ht?0:null,Qe.ch).start;Ht&&(Jt.top<or.top-2?(Ie(Jt.right,Jt.top,null,Jt.bottom),Ie(ie,or.top,or.left,or.bottom)):Ie(Jt.right,Jt.top,or.left-Jt.right,Jt.bottom)),Jt.bottom<or.top&&Ie(ie,Jt.bottom,null,or.top)}R.appendChild(V)}function ea(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()||ai(e),r.cursorDiv.style.visibility=(R=!R)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Mi(e){e.state.focused||(e.display.input.focus(),ti(e))}function Si(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ai(e))},100)}function ti(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ze(e,"focus",e,r),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),o&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ea(e)}function ai(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(ze(e,"blur",e,r),e.state.focused=!1,b(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ki(e){for(var r=e.display,R=r.lineDiv.offsetTop,A=0;A<r.view.length;A++){var F=r.view[A],V=e.options.lineWrapping,re=void 0,ie=0;if(F.hidden)continue;if(w&&d<8){var ce=F.node.offsetTop+F.node.offsetHeight;re=ce-R,R=ce}else{var ve=F.node.getBoundingClientRect();re=ve.bottom-ve.top,!V&&F.text.firstChild&&(ie=F.text.firstChild.getBoundingClientRect().right-ve.left-1)}var Ie=F.line.height-re;if((Ie>.005||Ie<-.005)&&(Vn(F.line,re),Ci(F.line),F.rest))for(var Be=0;Be<F.rest.length;Be++)Ci(F.rest[Be]);if(ie>e.display.sizerWidth){var qe=Math.ceil(ie/oa(e.display));qe>e.display.maxLineLength&&(e.display.maxLineLength=qe,e.display.maxLine=F.line,e.display.maxLineChanged=!0)}}}function Ci(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var R=e.widgets[r],A=R.node.parentNode;A&&(R.height=A.offsetHeight)}}function Ii(e,r,R){var A=R&&R.top!=null?Math.max(0,R.top):e.scroller.scrollTop;A=Math.floor(A-wn(e));var F=R&&R.bottom!=null?R.bottom:A+e.wrapper.clientHeight,V=Fn(r,A),re=Fn(r,F);if(R&&R.ensure){var ie=R.ensure.from.line,ce=R.ensure.to.line;ie<V?(V=ie,re=Fn(r,jt(Yt(r,ie))+e.wrapper.clientHeight)):Math.min(ce,r.lastLine())>=re&&(V=Fn(r,jt(Yt(r,ce))-e.wrapper.clientHeight),re=ce)}return{from:V,to:Math.max(re,V+1)}}function Ki(e,r){if(et(e,"scrollCursorIntoView"))return;var R=e.display,A=R.sizer.getBoundingClientRect(),F=null;if(r.top+A.top<0?F=!0:r.bottom+A.top>(window.innerHeight||document.documentElement.clientHeight)&&(F=!1),F!=null&&!g){var V=T("div","\u200B",null,`position: absolute;
|
|
|
top: `+(r.top-R.viewOffset-wn(e.display))+`px;
|
|
|
height: `+(r.bottom-r.top+Ke(e)+R.barHeight)+`px;
|
|
|
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(V),V.scrollIntoView(F),e.display.lineSpace.removeChild(V)}}function co(e,r,R,A){A==null&&(A=0);var F;!e.options.lineWrapping&&r==R&&(r=r.ch?St(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,R=r.sticky=="before"?St(r.line,r.ch+1,"before"):r);for(var V=0;V<5;V++){var re=!1,ie=en(e,r),ce=!R||R==r?ie:en(e,R);F={left:Math.min(ie.left,ce.left),top:Math.min(ie.top,ce.top)-A,right:Math.max(ie.left,ce.left),bottom:Math.max(ie.bottom,ce.bottom)+A};var ve=ji(e,F),Ie=e.doc.scrollTop,Be=e.doc.scrollLeft;if(ve.scrollTop!=null&&(oi(e,ve.scrollTop),Math.abs(e.doc.scrollTop-Ie)>1&&(re=!0)),ve.scrollLeft!=null&&(Ia(e,ve.scrollLeft),Math.abs(e.doc.scrollLeft-Be)>1&&(re=!0)),!re)break}return F}function Ni(e,r){var R=ji(e,r);R.scrollTop!=null&&oi(e,R.scrollTop),R.scrollLeft!=null&&Ia(e,R.scrollLeft)}function ji(e,r){var R=e.display,A=Hn(e.display);r.top<0&&(r.top=0);var F=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,V=pe(e),re={};r.bottom-r.top>V&&(r.bottom=r.top+V);var ie=e.doc.height+De(R),ce=r.top<A,ve=r.bottom>ie-A;if(r.top<F)re.scrollTop=ce?0:r.top;else if(r.bottom>F+V){var Ie=Math.min(r.top,(ve?ie:r.bottom)-V);Ie!=F&&(re.scrollTop=Ie)}var Be=e.options.fixedGutter?0:R.gutters.offsetWidth,qe=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-Be,Qe=Pe(e)-R.gutters.offsetWidth,gt=r.right-r.left>Qe;return gt&&(r.right=r.left+Qe),r.left<10?re.scrollLeft=0:r.left<qe?re.scrollLeft=Math.max(0,r.left+Be-(gt?0:10)):r.right>Qe+qe-3&&(re.scrollLeft=r.right+(gt?0:10)-Qe),re}function Oi(e,r){if(r==null)return;yi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function Ga(e){yi(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function ii(e,r,R){(r!=null||R!=null)&&yi(e),r!=null&&(e.curOp.scrollLeft=r),R!=null&&(e.curOp.scrollTop=R)}function fo(e,r){yi(e),e.curOp.scrollToPos=r}function yi(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var R=wr(e,r.from),A=wr(e,r.to);Ai(e,R,A,r.margin)}}function Ai(e,r,R,A){var F=ji(e,{left:Math.min(r.left,R.left),top:Math.min(r.top,R.top)-A,right:Math.max(r.right,R.right),bottom:Math.max(r.bottom,R.bottom)+A});ii(e,F.scrollLeft,F.scrollTop)}function oi(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;C||Gi(e,{top:r}),bi(e,r,!0),C&&Gi(e),zi(e,100)}function bi(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 Ia(e,r,R,A){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)&&!A)return;e.doc.scrollLeft=r,pn(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function si(e){var r=e.display,R=r.gutters.offsetWidth,A=Math.round(e.doc.height+De(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:A,scrollHeight:A+Ke(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:R}}var li=function(e,r,R){this.cm=R;var A=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),F=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");A.tabIndex=F.tabIndex=-1,e(A),e(F),Ce(A,"scroll",function(){A.clientHeight&&r(A.scrollTop,"vertical")}),Ce(F,"scroll",function(){F.clientWidth&&r(F.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&d<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};li.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,R=e.scrollHeight>e.clientHeight+1,A=e.nativeBarWidth;if(R){this.vert.style.display="block",this.vert.style.bottom=r?A+"px":"0";var F=e.viewHeight-(r?A:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+F)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=R?A+"px":"0",this.horiz.style.left=e.barLeft+"px";var V=e.viewWidth-e.barLeft-(R?A:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+V)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(A==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:R?A:0,bottom:r?A:0}},li.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},li.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},li.prototype.zeroWidthHack=function(){var e=i&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new q,this.disableVert=new q},li.prototype.enableZeroWidthBar=function(e,r,R){e.style.pointerEvents="auto";function A(){var F=e.getBoundingClientRect(),V=R=="vert"?document.elementFromPoint(F.right-1,(F.top+F.bottom)/2):document.elementFromPoint((F.right+F.left)/2,F.bottom-1);V!=e?e.style.pointerEvents="none":r.set(1e3,A)}r.set(1e3,A)},li.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var di=function(){};di.prototype.update=function(){return{bottom:0,right:0}},di.prototype.setScrollLeft=function(){},di.prototype.setScrollTop=function(){},di.prototype.clear=function(){};function ur(e,r){r||(r=si(e));var R=e.display.barWidth,A=e.display.barHeight;pr(e,r);for(var F=0;F<4&&R!=e.display.barWidth||A!=e.display.barHeight;F++)R!=e.display.barWidth&&e.options.lineWrapping&&ki(e),pr(e,si(e)),R=e.display.barWidth,A=e.display.barHeight}function pr(e,r){var R=e.display,A=R.scrollbars.update(r);R.sizer.style.paddingRight=(R.barWidth=A.right)+"px",R.sizer.style.paddingBottom=(R.barHeight=A.bottom)+"px",R.heightForcer.style.borderBottom=A.bottom+"px solid transparent",A.right&&A.bottom?(R.scrollbarFiller.style.display="block",R.scrollbarFiller.style.height=A.bottom+"px",R.scrollbarFiller.style.width=A.right+"px"):R.scrollbarFiller.style.display="",A.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(R.gutterFiller.style.display="block",R.gutterFiller.style.height=A.bottom+"px",R.gutterFiller.style.width=r.gutterWidth+"px"):R.gutterFiller.style.display=""}var rr={native:li,null:di};function dn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&b(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new rr[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),Ce(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"?Ia(e,r):oi(e,r)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var nr=0;function Xa(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:++nr},_r(e.curOp)}function Ei(e){var r=e.curOp;r&&gr(r,function(R){for(var A=0;A<R.ops.length;A++)R.ops[A].cm.curOp=null;ta(R)})}function ta(e){for(var r=e.ops,R=0;R<r.length;R++)Jo(r[R]);for(var A=0;A<r.length;A++)Qo(r[A]);for(var F=0;F<r.length;F++)Zo(r[F]);for(var V=0;V<r.length;V++)ho(r[V]);for(var re=0;re<r.length;re++)qo(r[re])}function Jo(e){var r=e.cm,R=r.display;Po(r),e.updateMaxLine&&Xe(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 ri(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&Ri(e.cm,e.update)}function Zo(e){var r=e.cm,R=r.display;e.updatedDisplay&&ki(r),e.barMeasure=si(r),R.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Ne(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+Ke(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-Pe(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=R.input.prepareSelection())}function ho(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&Ia(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var R=e.focus&&e.focus==K();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,R),(e.updatedDisplay||e.startHeight!=r.doc.height)&&ur(r,e.barMeasure),e.updatedDisplay&&Ln(r,e.barMeasure),e.selectionChanged&&ea(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),R&&Mi(e.cm)}function qo(e){var r=e.cm,R=r.display,A=r.doc;if(e.updatedDisplay&&Yi(r,e.update),R.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(R.wheelStartX=R.wheelStartY=null),e.scrollTop!=null&&bi(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Ia(r,e.scrollLeft,!0,!0),e.scrollToPos){var F=co(r,cr(A,e.scrollToPos.from),cr(A,e.scrollToPos.to),e.scrollToPos.margin);Ki(r,F)}var V=e.maybeHiddenMarkers,re=e.maybeUnhiddenMarkers;if(V)for(var ie=0;ie<V.length;++ie)V[ie].lines.length||ze(V[ie],"hide");if(re)for(var ce=0;ce<re.length;++ce)re[ce].lines.length&&ze(re[ce],"unhide");R.wrapper.offsetHeight&&(A.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&ze(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function Ua(e,r){if(e.curOp)return r();Xa(e);try{return r()}finally{Ei(e)}}function sa(e,r){return function(){if(e.curOp)return r.apply(e,arguments);Xa(e);try{return r.apply(e,arguments)}finally{Ei(e)}}}function Pa(e){return function(){if(this.curOp)return e.apply(this,arguments);Xa(this);try{return e.apply(this,arguments)}finally{Ei(this)}}}function la(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);Xa(r);try{return e.apply(this,arguments)}finally{Ei(r)}}}function zi(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,U(es,e))}function es(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var R=+new Date+e.options.workTime,A=ot(e,r.highlightFrontier),F=[];r.iter(A.line,Math.min(r.first+r.size,e.display.viewTo+500),function(V){if(A.line>=e.display.viewFrom){var re=V.styles,ie=V.text.length>e.options.maxHighlightLength?hn(r.mode,A.state):null,ce=fa(e,V,A,!0);ie&&(A.state=ie),V.styles=ce.styles;var ve=V.styleClasses,Ie=ce.classes;Ie?V.styleClasses=Ie:ve&&(V.styleClasses=null);for(var Be=!re||re.length!=V.styles.length||ve!=Ie&&(!ve||!Ie||ve.bgClass!=Ie.bgClass||ve.textClass!=Ie.textClass),qe=0;!Be&&qe<re.length;++qe)Be=re[qe]!=V.styles[qe];Be&&F.push(A.line),V.stateAfter=A.save(),A.nextLine()}else V.text.length<=e.options.maxHighlightLength&&ar(e,V.text,A),V.stateAfter=A.line%5==0?A.save():null,A.nextLine();if(+new Date>R)return zi(e,e.options.workDelay),!0}),r.highlightFrontier=A.line,r.modeFrontier=Math.max(r.modeFrontier,A.line),F.length&&Ua(e,function(){for(var V=0;V<F.length;V++)Xn(e,F[V],"text")})}var ri=function(e,r,R){var A=e.display;this.viewport=r,this.visible=Ii(A,e.doc,r),this.editorIsHidden=!A.wrapper.offsetWidth,this.wrapperHeight=A.wrapper.clientHeight,this.wrapperWidth=A.wrapper.clientWidth,this.oldDisplayWidth=Pe(e),this.force=R,this.dims=Kn(e),this.events=[]};ri.prototype.signal=function(e,r){Re(e,r)&&this.events.push(arguments)},ri.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ze.apply(null,this.events[e])};function Po(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=Ke(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=Ke(e)+"px",r.scrollbarsClipped=!0)}function Lo(e){if(e.hasFocus())return null;var r=K();if(!r||!I(e.display.lineDiv,r))return null;var R={activeElt:r};if(window.getSelection){var A=window.getSelection();A.anchorNode&&A.extend&&I(e.display.lineDiv,A.anchorNode)&&(R.anchorNode=A.anchorNode,R.anchorOffset=A.anchorOffset,R.focusNode=A.focusNode,R.focusOffset=A.focusOffset)}return R}function Mo(e){if(!e||!e.activeElt||e.activeElt==K())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&I(document.body,e.anchorNode)&&I(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 Ri(e,r){var R=e.display,A=e.doc;if(r.editorIsHidden)return Bn(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&&Da(e)==0)return!1;Ea(e)&&(Bn(e),r.dims=Kn(e));var F=A.first+A.size,V=Math.max(r.visible.from-e.options.viewportMargin,A.first),re=Math.min(F,r.visible.to+e.options.viewportMargin);R.viewFrom<V&&V-R.viewFrom<20&&(V=Math.max(A.first,R.viewFrom)),R.viewTo>re&&R.viewTo-re<20&&(re=Math.min(F,R.viewTo)),qn&&(V=wt(e.doc,V),re=yt(e.doc,re));var ie=V!=R.viewFrom||re!=R.viewTo||R.lastWrapHeight!=r.wrapperHeight||R.lastWrapWidth!=r.wrapperWidth;ha(e,V,re),R.viewOffset=jt(Yt(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var ce=Da(e);if(!ie&&ce==0&&!r.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var ve=Lo(e);return ce>4&&(R.lineDiv.style.display="none"),ko(e,R.updateLineNumbers,r.dims),ce>4&&(R.lineDiv.style.display=""),R.renderedView=R.view,Mo(ve),y(R.cursorDiv),y(R.selectionDiv),R.gutters.style.height=R.sizer.style.minHeight=0,ie&&(R.lastWrapHeight=r.wrapperHeight,R.lastWrapWidth=r.wrapperWidth,zi(e,400)),R.updateLineNumbers=null,!0}function Yi(e,r){for(var R=r.viewport,A=!0;;A=!1){if(!A||!e.options.lineWrapping||r.oldDisplayWidth==Pe(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+De(e.display)-pe(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 A&&(r.visible=Ii(e.display,e.doc,R));if(!Ri(e,r))break;ki(e);var F=si(e);On(e),ur(e,F),Ln(e,F),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 Gi(e,r){var R=new ri(e,r);if(Ri(e,R)){ki(e),Yi(e,R);var A=si(e);On(e),ur(e,A),Ln(e,A),R.finish()}}function ko(e,r,R){var A=e.display,F=e.options.lineNumbers,V=A.lineDiv,re=V.firstChild;function ie(gt){var Rt=gt.nextSibling;return o&&i&&e.display.currentWheelTarget==gt?gt.style.display="none":gt.parentNode.removeChild(gt),Rt}for(var ce=A.view,ve=A.viewFrom,Ie=0;Ie<ce.length;Ie++){var Be=ce[Ie];if(!Be.hidden)if(!Be.node||Be.node.parentNode!=V){var qe=yr(e,Be,ve,R);V.insertBefore(qe,re)}else{for(;re!=Be.node;)re=ie(re);var Qe=F&&r!=null&&r<=ve&&Be.lineNumber;Be.changes&&(ae(Be.changes,"gutter")>-1&&(Qe=!1),tr(e,Be,ve,R)),Qe&&(y(Be.lineNumber),Be.lineNumber.appendChild(document.createTextNode(Zn(e.options,ve)))),re=Be.node.nextSibling}ve+=Be.size}for(;re;)re=ie(re)}function Ji(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function Ln(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+Ke(e)+"px"}function pn(e){var r=e.display,R=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var A=ba(r)-r.scroller.scrollLeft+e.doc.scrollLeft,F=r.gutters.offsetWidth,V=A+"px",re=0;re<R.length;re++)if(!R[re].hidden){e.options.fixedGutter&&(R[re].gutter&&(R[re].gutter.style.left=V),R[re].gutterBackground&&(R[re].gutterBackground.style.left=V));var ie=R[re].alignable;if(ie)for(var ce=0;ce<ie.length;ce++)ie[ce].style.left=V}e.options.fixedGutter&&(r.gutters.style.left=A+F+"px")}function Ea(e){if(!e.options.lineNumbers)return!1;var r=e.doc,R=Zn(e.options,r.first+r.size-1),A=e.display;if(R.length!=A.lineNumChars){var F=A.measure.appendChild(T("div",[T("div",R)],"CodeMirror-linenumber CodeMirror-gutter-elt")),V=F.firstChild.offsetWidth,re=F.offsetWidth-V;return A.lineGutter.style.width="",A.lineNumInnerWidth=Math.max(V,A.lineGutter.offsetWidth-re)+1,A.lineNumWidth=A.lineNumInnerWidth+re,A.lineNumChars=A.lineNumInnerWidth?R.length:-1,A.lineGutter.style.width=A.lineNumWidth+"px",Ji(e.display),!0}return!1}function Ba(e,r){for(var R=[],A=!1,F=0;F<e.length;F++){var V=e[F],re=null;if(typeof V!="string"&&(re=V.style,V=V.className),V=="CodeMirror-linenumbers")if(r)A=!0;else continue;R.push({className:V,style:re})}return r&&!A&&R.push({className:"CodeMirror-linenumbers",style:null}),R}function Fi(e){var r=e.gutters,R=e.gutterSpecs;y(r),e.lineGutter=null;for(var A=0;A<R.length;++A){var F=R[A],V=F.className,re=F.style,ie=r.appendChild(T("div",null,"CodeMirror-gutter "+V));re&&(ie.style.cssText=re),V=="CodeMirror-linenumbers"&&(e.lineGutter=ie,ie.style.width=(e.lineNumWidth||1)+"px")}r.style.display=R.length?"":"none",Ji(e)}function fi(e){Fi(e.display),Cn(e),pn(e)}function Xi(e,r,R,A){var F=this;this.input=R,F.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),F.scrollbarFiller.setAttribute("cm-not-content","true"),F.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),F.gutterFiller.setAttribute("cm-not-content","true"),F.lineDiv=M("div",null,"CodeMirror-code"),F.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),F.cursorDiv=T("div",null,"CodeMirror-cursors"),F.measure=T("div",null,"CodeMirror-measure"),F.lineMeasure=T("div",null,"CodeMirror-measure"),F.lineSpace=M("div",[F.measure,F.lineMeasure,F.selectionDiv,F.cursorDiv,F.lineDiv],null,"position: relative; outline: none");var V=M("div",[F.lineSpace],"CodeMirror-lines");F.mover=T("div",[V],null,"position: relative"),F.sizer=T("div",[F.mover],"CodeMirror-sizer"),F.sizerWidth=null,F.heightForcer=T("div",null,null,"position: absolute; height: "+se+"px; width: 1px;"),F.gutters=T("div",null,"CodeMirror-gutters"),F.lineGutter=null,F.scroller=T("div",[F.sizer,F.heightForcer,F.gutters],"CodeMirror-scroll"),F.scroller.setAttribute("tabIndex","-1"),F.wrapper=T("div",[F.scrollbarFiller,F.gutterFiller,F.scroller],"CodeMirror"),w&&d<8&&(F.gutters.style.zIndex=-1,F.scroller.style.paddingRight=0),!o&&!(C&&n)&&(F.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(F.wrapper):e(F.wrapper)),F.viewFrom=F.viewTo=r.first,F.reportedViewFrom=F.reportedViewTo=r.first,F.view=[],F.renderedView=null,F.externalMeasured=null,F.viewOffset=0,F.lastWrapHeight=F.lastWrapWidth=0,F.updateLineNumbers=null,F.nativeBarWidth=F.barHeight=F.barWidth=0,F.scrollbarsClipped=!1,F.lineNumWidth=F.lineNumInnerWidth=F.lineNumChars=null,F.alignWidgets=!1,F.cachedCharWidth=F.cachedTextHeight=F.cachedPaddingH=null,F.maxLine=null,F.maxLineLength=0,F.maxLineChanged=!1,F.wheelDX=F.wheelDY=F.wheelStartX=F.wheelStartY=null,F.shift=!1,F.selForContextMenu=null,F.activeTouch=null,F.gutterSpecs=Ba(A.gutters,A.lineNumbers),Fi(F),R.init(F)}var xi=0,xa=null;w?xa=-.53:C?xa=15:a?xa=-.7:m&&(xa=-1/3);function Qi(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 po(e){var r=Qi(e);return r.x*=xa,r.y*=xa,r}function mo(e,r){var R=Qi(r),A=R.x,F=R.y,V=e.display,re=V.scroller,ie=re.scrollWidth>re.clientWidth,ce=re.scrollHeight>re.clientHeight;if(!(A&&ie||F&&ce))return;if(F&&i&&o){e:for(var ve=r.target,Ie=V.view;ve!=re;ve=ve.parentNode)for(var Be=0;Be<Ie.length;Be++)if(Ie[Be].node==ve){e.display.currentWheelTarget=ve;break e}}if(A&&!C&&!_&&xa!=null){F&&ce&&oi(e,Math.max(0,re.scrollTop+F*xa)),Ia(e,Math.max(0,re.scrollLeft+A*xa)),(!F||F&&ce)&&fe(r),V.wheelStartX=null;return}if(F&&xa!=null){var qe=F*xa,Qe=e.doc.scrollTop,gt=Qe+V.wrapper.clientHeight;qe<0?Qe=Math.max(0,Qe+qe-50):gt=Math.min(e.doc.height,gt+qe+50),Gi(e,{top:Qe,bottom:gt})}xi<20&&(V.wheelStartX==null?(V.wheelStartX=re.scrollLeft,V.wheelStartY=re.scrollTop,V.wheelDX=A,V.wheelDY=F,setTimeout(function(){if(V.wheelStartX==null)return;var Rt=re.scrollLeft-V.wheelStartX,Ht=re.scrollTop-V.wheelStartY,Jt=Ht&&V.wheelDY&&Ht/V.wheelDY||Rt&&V.wheelDX&&Rt/V.wheelDX;if(V.wheelStartX=V.wheelStartY=null,!Jt)return;xa=(xa*xi+Jt)/(xi+1),++xi},200)):(V.wheelDX+=A,V.wheelDY+=F))}var Wa=function(e,r){this.ranges=e,this.primIndex=r};Wa.prototype.primary=function(){return this.ranges[this.primIndex]},Wa.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],A=e.ranges[r];if(!$n(R.anchor,A.anchor)||!$n(R.head,A.head))return!1}return!0},Wa.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new An(na(this.ranges[r].anchor),na(this.ranges[r].head));return new Wa(e,this.primIndex)},Wa.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Wa.prototype.contains=function(e,r){r||(r=e);for(var R=0;R<this.ranges.length;R++){var A=this.ranges[R];if(ir(r,A.from())>=0&&ir(e,A.to())<=0)return R}return-1};var An=function(e,r){this.anchor=e,this.head=r};An.prototype.from=function(){return ga(this.anchor,this.head)},An.prototype.to=function(){return It(this.anchor,this.head)},An.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ni(e,r,R){var A=e&&e.options.selectionsMayTouch,F=r[R];r.sort(function(qe,Qe){return ir(qe.from(),Qe.from())}),R=ae(r,F);for(var V=1;V<r.length;V++){var re=r[V],ie=r[V-1],ce=ir(ie.to(),re.from());if(A&&!re.empty()?ce>0:ce>=0){var ve=ga(ie.from(),re.from()),Ie=It(ie.to(),re.to()),Be=ie.empty()?re.from()==re.head:ie.from()==ie.head;V<=R&&--R,r.splice(--V,2,new An(Be?Ie:ve,Be?ve:Ie))}}return new Wa(r,R)}function hi(e,r){return new Wa([new An(e,r||e)],0)}function pi(e){return e.text?St(e.from.line+e.text.length-1,te(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function vo(e,r){if(ir(e,r.from)<0)return e;if(ir(e,r.to)<=0)return pi(r);var R=e.line+r.text.length-(r.to.line-r.from.line)-1,A=e.ch;return e.line==r.to.line&&(A+=pi(r).ch-r.to.ch),St(R,A)}function Zi(e,r){for(var R=[],A=0;A<e.sel.ranges.length;A++){var F=e.sel.ranges[A];R.push(new An(vo(F.anchor,r),vo(F.head,r)))}return ni(e.cm,R,e.sel.primIndex)}function Io(e,r,R){return e.line==r.line?St(R.line,e.ch-r.ch+R.ch):St(R.line+(e.line-r.line),e.ch)}function No(e,r,R){for(var A=[],F=St(e.first,0),V=F,re=0;re<r.length;re++){var ie=r[re],ce=Io(ie.from,F,V),ve=Io(pi(ie),F,V);if(F=ie.to,V=ve,R=="around"){var Ie=e.sel.ranges[re],Be=ir(Ie.head,Ie.anchor)<0;A[re]=new An(Be?ve:ce,Be?ce:ve)}else A[re]=new An(ce,ce)}return new Wa(A,e.sel.primIndex)}function Di(e){e.doc.mode=fn(e.options,e.doc.modeOption),go(e)}function go(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,zi(e,100),e.state.modeGen++,e.curOp&&Cn(e)}function vs(e,r){return r.from.ch==0&&r.to.ch==0&&te(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,r,R,A){function F(or){return R?R[or]:null}function V(or,Qt,mr){sr(or,Qt,mr,A),zt(or,"change",or,r)}function re(or,Qt){for(var mr=[],Nr=or;Nr<Qt;++Nr)mr.push(new qt(ve[Nr],F(Nr),A));return mr}var ie=r.from,ce=r.to,ve=r.text,Ie=Yt(e,ie.line),Be=Yt(e,ce.line),qe=te(ve),Qe=F(ve.length-1),gt=ce.line-ie.line;if(r.full)e.insert(0,re(0,ve.length)),e.remove(ve.length,e.size-ve.length);else if(vs(e,r)){var Rt=re(0,ve.length-1);V(Be,Be.text,Qe),gt&&e.remove(ie.line,gt),Rt.length&&e.insert(ie.line,Rt)}else if(Ie==Be)if(ve.length==1)V(Ie,Ie.text.slice(0,ie.ch)+qe+Ie.text.slice(ce.ch),Qe);else{var Ht=re(1,ve.length-1);Ht.push(new qt(qe+Ie.text.slice(ce.ch),Qe,A)),V(Ie,Ie.text.slice(0,ie.ch)+ve[0],F(0)),e.insert(ie.line+1,Ht)}else if(ve.length==1)V(Ie,Ie.text.slice(0,ie.ch)+ve[0]+Be.text.slice(ce.ch),F(0)),e.remove(ie.line+1,gt);else{V(Ie,Ie.text.slice(0,ie.ch)+ve[0],F(0)),V(Be,qe+Be.text.slice(ce.ch),Qe);var Jt=re(1,ve.length-1);gt>1&&e.remove(ie.line+1,gt-1),e.insert(ie.line+1,Jt)}zt(e,"change",e,r)}function Ui(e,r,R){function A(F,V,re){if(F.linked)for(var ie=0;ie<F.linked.length;++ie){var ce=F.linked[ie];if(ce.doc==V)continue;var ve=re&&ce.sharedHist;if(R&&!ve)continue;r(ce.doc,ve),A(ce.doc,F,ve)}}A(e,null,!0)}function gs(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,Ra(e),Di(e),ys(e),e.options.lineWrapping||Xe(e),e.options.mode=r.modeOption,Cn(e)}function ys(e){(e.doc.direction=="rtl"?H:b)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Ua(e,function(){ys(e),Cn(e)})}function jo(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 rs(e,r){var R={from:na(r.from),to:pi(r),text:kn(e,r.from,r.to)};return xs(e,R,r.from.line,r.to.line+1),Ui(e,function(A){return xs(A,R,r.from.line,r.to.line+1)},!0),R}function bs(e){for(;e.length;){var r=te(e);if(r.ranges)e.pop();else break}}function ml(e,r){if(r)return bs(e.done),te(e.done);if(e.done.length&&!te(e.done).ranges)return te(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),te(e.done)}function Es(e,r,R,A){var F=e.history;F.undone.length=0;var V=+new Date,re,ie;if((F.lastOp==A||F.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&F.lastModTime>V-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(re=ml(F,F.lastOp==A)))ie=te(re.changes),ir(r.from,r.to)==0&&ir(r.from,ie.to)==0?ie.to=pi(r):re.changes.push(rs(e,r));else{var ce=te(F.done);for((!ce||!ce.ranges)&&Fo(e.sel,F.done),re={changes:[rs(e,r)],generation:F.generation},F.done.push(re);F.done.length>F.undoDepth;)F.done.shift(),F.done[0].ranges||F.done.shift()}F.done.push(R),F.generation=++F.maxGeneration,F.lastModTime=F.lastSelTime=V,F.lastOp=F.lastSelOp=A,F.lastOrigin=F.lastSelOrigin=r.origin,ie||ze(e,"historyAdded")}function vl(e,r,R,A){var F=r.charAt(0);return F=="*"||F=="+"&&R.ranges.length==A.ranges.length&&R.somethingSelected()==A.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,r,R,A){var F=e.history,V=A&&A.origin;R==F.lastSelOp||V&&F.lastSelOrigin==V&&(F.lastModTime==F.lastSelTime&&F.lastOrigin==V||vl(e,V,te(F.done),r))?F.done[F.done.length-1]=r:Fo(r,F.done),F.lastSelTime=+new Date,F.lastSelOrigin=V,F.lastSelOp=R,A&&A.clearRedo!==!1&&bs(F.undone)}function Fo(e,r){var R=te(r);R&&R.ranges&&R.equals(e)||r.push(e)}function xs(e,r,R,A){var F=r["spans_"+e.id],V=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,A),function(re){re.markedSpans&&((F||(F=r["spans_"+e.id]={}))[V]=re.markedSpans),++V})}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 A=[],F=0;F<r.text.length;++F)A.push(yl(R[F]));return A}function _s(e,r){var R=bl(e,r),A=za(e,r);if(!R)return A;if(!A)return R;for(var F=0;F<R.length;++F){var V=R[F],re=A[F];if(V&&re){e:for(var ie=0;ie<re.length;++ie){for(var ce=re[ie],ve=0;ve<V.length;++ve)if(V[ve].marker==ce.marker)continue e;V.push(ce)}}else re&&(R[F]=re)}return R}function qi(e,r,R){for(var A=[],F=0;F<e.length;++F){var V=e[F];if(V.ranges){A.push(R?Wa.prototype.deepCopy.call(V):V);continue}var re=V.changes,ie=[];A.push({changes:ie});for(var ce=0;ce<re.length;++ce){var ve=re[ce],Ie=void 0;if(ie.push({from:ve.from,to:ve.to,text:ve.text}),r)for(var Be in ve)(Ie=Be.match(/^spans_(\d+)$/))&&(ae(r,Number(Ie[1]))>-1&&(te(ie)[Be]=ve[Be],delete ve[Be]))}}return A}function ns(e,r,R,A){if(A){var F=e.anchor;if(R){var V=ir(r,F)<0;V!=ir(R,F)<0?(F=r,r=R):V!=ir(r,R)<0&&(r=R)}return new An(F,r)}else return new An(R||r,r)}function Uo(e,r,R,A,F){F==null&&(F=e.cm&&(e.cm.display.shift||e.extend)),Na(e,new Wa([ns(e.sel.primary(),r,R,F)],0),A)}function ws(e,r,R){for(var A=[],F=e.cm&&(e.cm.display.shift||e.extend),V=0;V<e.sel.ranges.length;V++)A[V]=ns(e.sel.ranges[V],r[V],null,F);var re=ni(e.cm,A,e.sel.primIndex);Na(e,re,R)}function as(e,r,R,A){var F=e.sel.ranges.slice(0);F[r]=R,Na(e,ni(e.cm,F,e.sel.primIndex),A)}function Ts(e,r,R,A){Na(e,hi(r,R),A)}function El(e,r,R){var A={ranges:r.ranges,update:function(F){this.ranges=[];for(var V=0;V<F.length;V++)this.ranges[V]=new An(cr(e,F[V].anchor),cr(e,F[V].head))},origin:R&&R.origin};return ze(e,"beforeSelectionChange",e,A),e.cm&&ze(e.cm,"beforeSelectionChange",e.cm,A),A.ranges!=r.ranges?ni(e.cm,A.ranges,A.ranges.length-1):r}function Ss(e,r,R){var A=e.history.done,F=te(A);F&&F.ranges?(A[A.length-1]=r,Bo(e,r,R)):Na(e,r,R)}function Na(e,r,R){Bo(e,r,R),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,R)}function Bo(e,r,R){(Re(e,"beforeSelectionChange")||e.cm&&Re(e.cm,"beforeSelectionChange"))&&(r=El(e,r,R));var A=R&&R.bias||(ir(r.primary().head,e.sel.primary().head)<0?-1:1);Cs(e,As(e,r,A,!0)),!(R&&R.scroll===!1)&&e.cm&&Ga(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,ke(e.cm)),zt(e,"cursorActivity",e)}function Os(e){Cs(e,As(e,e.sel,null,!1))}function As(e,r,R,A){for(var F,V=0;V<r.ranges.length;V++){var re=r.ranges[V],ie=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[V],ce=Wo(e,re.anchor,ie&&ie.anchor,R,A),ve=Wo(e,re.head,ie&&ie.head,R,A);(F||ce!=re.anchor||ve!=re.head)&&(F||(F=r.ranges.slice(0,V)),F[V]=new An(ce,ve))}return F?ni(e.cm,F,r.primIndex):r}function eo(e,r,R,A,F){var V=Yt(e,r.line);if(V.markedSpans)for(var re=0;re<V.markedSpans.length;++re){var ie=V.markedSpans[re],ce=ie.marker,ve="selectLeft"in ce?!ce.selectLeft:ce.inclusiveLeft,Ie="selectRight"in ce?!ce.selectRight:ce.inclusiveRight;if((ie.from==null||(ve?ie.from<=r.ch:ie.from<r.ch))&&(ie.to==null||(Ie?ie.to>=r.ch:ie.to>r.ch))){if(F&&(ze(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(V.markedSpans){--re;continue}else break;if(!ce.atomic)continue;if(R){var Be=ce.find(A<0?1:-1),qe=void 0;if((A<0?Ie:ve)&&(Be=Rs(e,Be,-A,Be&&Be.line==r.line?V:null)),Be&&Be.line==r.line&&(qe=ir(Be,R))&&(A<0?qe<0:qe>0))return eo(e,Be,r,A,F)}var Qe=ce.find(A<0?-1:1);return(A<0?ve:Ie)&&(Qe=Rs(e,Qe,A,Qe.line==r.line?V:null)),Qe?eo(e,Qe,r,A,F):null}}return r}function Wo(e,r,R,A,F){var V=A||1,re=eo(e,r,R,V,F)||!F&&eo(e,r,R,V,!0)||eo(e,r,R,-V,F)||!F&&eo(e,r,R,-V,!0);return re||(e.cantEdit=!0,St(e.first,0))}function Rs(e,r,R,A){return R<0&&r.ch==0?r.line>e.first?cr(e,St(r.line-1)):null:R>0&&r.ch==(A||Yt(e,r.line)).text.length?r.line<e.first+e.size-1?St(r.line+1,0):null:new St(r.line,r.ch+R)}function Ds(e){e.setSelection(St(e.firstLine(),0),St(e.lastLine()),Se)}function Ps(e,r,R){var A={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return A.canceled=!0}};return R&&(A.update=function(F,V,re,ie){F&&(A.from=cr(e,F)),V&&(A.to=cr(e,V)),re&&(A.text=re),ie!==void 0&&(A.origin=ie)}),ze(e,"beforeChange",e,A),e.cm&&ze(e.cm,"beforeChange",e.cm,A),A.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:A.from,to:A.to,text:A.text,origin:A.origin}}function to(e,r,R){if(e.cm){if(!e.cm.curOp)return sa(e.cm,to)(e,r,R);if(e.cm.state.suppressEdits)return}if((Re(e,"beforeChange")||e.cm&&Re(e.cm,"beforeChange"))&&(r=Ps(e,r,!0),!r))return;var A=Sa&&!R&&Qa(e,r.from,r.to);if(A)for(var F=A.length-1;F>=0;--F)Ls(e,{from:A[F].from,to:A[F].to,text:F?[""]:r.text,origin:r.origin});else Ls(e,r)}function Ls(e,r){if(r.text.length==1&&r.text[0]==""&&ir(r.from,r.to)==0)return;var R=Zi(e,r);Es(e,r,R,e.cm?e.cm.curOp.id:NaN),yo(e,r,R,za(e,r));var A=[];Ui(e,function(F,V){!V&&ae(A,F.history)==-1&&(Ns(F.history,r),A.push(F.history)),yo(F,r,null,za(F,r))})}function Ho(e,r,R){var A=e.cm&&e.cm.state.suppressEdits;if(A&&!R)return;for(var F=e.history,V,re=e.sel,ie=r=="undo"?F.done:F.undone,ce=r=="undo"?F.undone:F.done,ve=0;ve<ie.length&&!(V=ie[ve],R?V.ranges&&!V.equals(e.sel):!V.ranges);ve++);if(ve==ie.length)return;for(F.lastOrigin=F.lastSelOrigin=null;;)if(V=ie.pop(),V.ranges){if(Fo(V,ce),R&&!V.equals(e.sel)){Na(e,V,{clearRedo:!1});return}re=V}else if(A){ie.push(V);return}else break;var Ie=[];Fo(re,ce),ce.push({changes:Ie,generation:F.generation}),F.generation=V.generation||++F.maxGeneration;for(var Be=Re(e,"beforeChange")||e.cm&&Re(e.cm,"beforeChange"),qe=function(Rt){var Ht=V.changes[Rt];if(Ht.origin=r,Be&&!Ps(e,Ht,!1))return ie.length=0,{};Ie.push(rs(e,Ht));var Jt=Rt?Zi(e,Ht):te(ie);yo(e,Ht,Jt,_s(e,Ht)),!Rt&&e.cm&&e.cm.scrollIntoView({from:Ht.from,to:pi(Ht)});var or=[];Ui(e,function(Qt,mr){!mr&&ae(or,Qt.history)==-1&&(Ns(Qt.history,Ht),or.push(Qt.history)),yo(Qt,Ht,null,_s(Qt,Ht))})},Qe=V.changes.length-1;Qe>=0;--Qe){var gt=qe(Qe);if(gt)return gt.v}}function Ms(e,r){if(r==0)return;if(e.first+=r,e.sel=new Wa(le(e.sel.ranges,function(F){return new An(St(F.anchor.line+r,F.anchor.ch),St(F.head.line+r,F.head.ch))}),e.sel.primIndex),e.cm){Cn(e.cm,e.first,e.first-r,r);for(var R=e.cm.display,A=R.viewFrom;A<R.viewTo;A++)Xn(e.cm,A,"gutter")}}function yo(e,r,R,A){if(e.cm&&!e.cm.curOp)return sa(e.cm,yo)(e,r,R,A);if(r.to.line<e.first){Ms(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 F=r.text.length-1-(e.first-r.from.line);Ms(e,F),r={from:St(e.first,0),to:St(r.to.line+F,r.to.ch),text:[te(r.text)],origin:r.origin}}var V=e.lastLine();r.to.line>V&&(r={from:r.from,to:St(V,Yt(e,V).text.length),text:[r.text[0]],origin:r.origin}),r.removed=kn(e,r.from,r.to),R||(R=Zi(e,r)),e.cm?xl(e.cm,r,A):ts(e,r,A),Bo(e,R,Se),e.cantEdit&&Wo(e,St(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,r,R){var A=e.doc,F=e.display,V=r.from,re=r.to,ie=!1,ce=V.line;e.options.lineWrapping||(ce=Xr(mt(Yt(A,V.line))),A.iter(ce,re.line+1,function(Qe){if(Qe==F.maxLine)return ie=!0,!0})),A.sel.contains(r.from,r.to)>-1&&ke(e),ts(A,r,R,ka(e)),e.options.lineWrapping||(A.iter(ce,V.line+r.text.length,function(Qe){var gt=Vt(Qe);gt>F.maxLineLength&&(F.maxLine=Qe,F.maxLineLength=gt,F.maxLineChanged=!0,ie=!1)}),ie&&(e.curOp.updateMaxLine=!0)),Ta(A,V.line),zi(e,400);var ve=r.text.length-(re.line-V.line)-1;r.full?Cn(e):V.line==re.line&&r.text.length==1&&!vs(e.doc,r)?Xn(e,V.line,"text"):Cn(e,V.line,re.line+1,ve);var Ie=Re(e,"changes"),Be=Re(e,"change");if(Be||Ie){var qe={from:V,to:re,text:r.text,removed:r.removed,origin:r.origin};Be&&zt(e,"change",e,qe),Ie&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(qe)}e.display.selForContextMenu=null}function ro(e,r,R,A,F){var V;A||(A=R),ir(A,R)<0&&(V=[A,R],R=V[0],A=V[1]),typeof r=="string"&&(r=e.splitLines(r)),to(e,{from:R,to:A,text:r,origin:F})}function ks(e,r,R,A){R<e.line?e.line+=A:r<e.line&&(e.line=r,e.ch=0)}function Is(e,r,R,A){for(var F=0;F<e.length;++F){var V=e[F],re=!0;if(V.ranges){V.copied||(V=e[F]=V.deepCopy(),V.copied=!0);for(var ie=0;ie<V.ranges.length;ie++)ks(V.ranges[ie].anchor,r,R,A),ks(V.ranges[ie].head,r,R,A);continue}for(var ce=0;ce<V.changes.length;++ce){var ve=V.changes[ce];if(R<ve.from.line)ve.from=St(ve.from.line+A,ve.from.ch),ve.to=St(ve.to.line+A,ve.to.ch);else if(r<=ve.to.line){re=!1;break}}re||(e.splice(0,F+1),F=0)}}function Ns(e,r){var R=r.from.line,A=r.to.line,F=r.text.length-(A-R)-1;Is(e.done,R,A,F),Is(e.undone,R,A,F)}function bo(e,r,R,A){var F=r,V=r;return typeof r=="number"?V=Yt(e,Yn(e,r)):F=Xr(r),F==null?null:(A(V,F)&&e.cm&&Xn(e.cm,F,R),V)}function Eo(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}Eo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,r){for(var R=e,A=e+r;R<A;++R){var F=this.lines[R];this.height-=F.height,er(F),zt(F,"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 A=0;A<r.length;++A)r[A].parent=this},iterN:function(e,r,R){for(var A=e+r;e<A;++e)if(R(this.lines[e]))return!0}};function xo(e){this.children=e;for(var r=0,R=0,A=0;A<e.length;++A){var F=e[A];r+=F.chunkSize(),R+=F.height,F.parent=this}this.size=r,this.height=R,this.parent=null}xo.prototype={chunkSize:function(){return this.size},removeInner:function(e,r){this.size-=r;for(var R=0;R<this.children.length;++R){var A=this.children[R],F=A.chunkSize();if(e<F){var V=Math.min(r,F-e),re=A.height;if(A.removeInner(e,V),this.height-=re-A.height,F==V&&(this.children.splice(R--,1),A.parent=null),(r-=V)==0)break;e=0}else e-=F}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof Eo))){var ie=[];this.collapse(ie),this.children=[new Eo(ie)],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 A=0;A<this.children.length;++A){var F=this.children[A],V=F.chunkSize();if(e<=V){if(F.insertInner(e,r,R),F.lines&&F.lines.length>50){for(var re=F.lines.length%25+25,ie=re;ie<F.lines.length;){var ce=new Eo(F.lines.slice(ie,ie+=25));F.height-=ce.height,this.children.splice(++A,0,ce),ce.parent=this}F.lines=F.lines.slice(0,re),this.maybeSpill()}break}e-=V}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var r=e.children.splice(e.children.length-5,5),R=new xo(r);if(e.parent){e.size-=R.size,e.height-=R.height;var F=ae(e.parent.children,e);e.parent.children.splice(F+1,0,R)}else{var A=new xo(e.children);A.parent=e,e.children=[A,R],e=A}R.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,r,R){for(var A=0;A<this.children.length;++A){var F=this.children[A],V=F.chunkSize();if(e<V){var re=Math.min(r,V-e);if(F.iterN(e,re,R))return!0;if((r-=re)==0)break;e=0}else e-=V}}};var _o=function(e,r,R){if(R)for(var A in R)R.hasOwnProperty(A)&&(this[A]=R[A]);this.doc=e,this.node=r};_o.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,R=this.line,A=Xr(R);if(A==null||!r)return;for(var F=0;F<r.length;++F)r[F]==this&&r.splice(F--,1);r.length||(R.widgets=null);var V=Wr(this);Vn(R,Math.max(0,R.height-V)),e&&(Ua(e,function(){js(e,R,-V),Xn(e,A,"widget")}),zt(e,"lineWidgetCleared",e,this,A))},_o.prototype.changed=function(){var e=this,r=this.height,R=this.doc.cm,A=this.line;this.height=null;var F=Wr(this)-r;if(!F)return;Ct(this.doc,A)||Vn(A,A.height+F),R&&Ua(R,function(){R.curOp.forceUpdate=!0,js(R,A,F),zt(R,"lineWidgetChanged",R,e,Xr(A))})},Te(_o);function js(e,r,R){jt(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Oi(e,R)}function _l(e,r,R,A){var F=new _o(e,R,A),V=e.cm;return V&&F.noHScroll&&(V.display.alignWidgets=!0),bo(e,r,"widget",function(re){var ie=re.widgets||(re.widgets=[]);if(F.insertAt==null?ie.push(F):ie.splice(Math.min(ie.length-1,Math.max(0,F.insertAt)),0,F),F.line=re,V&&!Ct(e,re)){var ce=jt(re)<e.scrollTop;Vn(re,re.height+Wr(F)),ce&&Oi(V,F.height),V.curOp.forceUpdate=!0}return!0}),V&&zt(V,"lineWidgetAdded",V,F,typeof r=="number"?r:Xr(r)),F}var Fs=0,Bi=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++Fs};Bi.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&Xa(e),Re(this,"clear")){var R=this.find();R&&zt(this,"clear",R.from,R.to)}for(var A=null,F=null,V=0;V<this.lines.length;++V){var re=this.lines[V],ie=Ma(re.markedSpans,this);e&&!this.collapsed?Xn(e,Xr(re),"text"):e&&(ie.to!=null&&(F=Xr(re)),ie.from!=null&&(A=Xr(re))),re.markedSpans=wi(re.markedSpans,ie),ie.from==null&&this.collapsed&&!Ct(this.doc,re)&&e&&Vn(re,Hn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ce=0;ce<this.lines.length;++ce){var ve=mt(this.lines[ce]),Ie=Vt(ve);Ie>e.display.maxLineLength&&(e.display.maxLine=ve,e.display.maxLineLength=Ie,e.display.maxLineChanged=!0)}A!=null&&e&&this.collapsed&&Cn(e,A,F+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&zt(e,"markerCleared",e,this,A,F),r&&Ei(e),this.parent&&this.parent.clear()},Bi.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var R,A,F=0;F<this.lines.length;++F){var V=this.lines[F],re=Ma(V.markedSpans,this);if(re.from!=null&&(R=St(r?V:Xr(V),re.from),e==-1))return R;if(re.to!=null&&(A=St(r?V:Xr(V),re.to),e==1))return A}return R&&{from:R,to:A}},Bi.prototype.changed=function(){var e=this,r=this.find(-1,!0),R=this,A=this.doc.cm;if(!r||!A)return;Ua(A,function(){var F=r.line,V=Xr(r.line),re=Ue(A,V);if(re&&(kr(re),A.curOp.selectionChanged=A.curOp.forceUpdate=!0),A.curOp.updateMaxLine=!0,!Ct(R.doc,F)&&R.height!=null){var ie=R.height;R.height=null;var ce=Wr(R)-ie;ce&&Vn(F,F.height+ce)}zt(A,"markerChanged",A,e)})},Bi.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||ae(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Bi.prototype.detachLine=function(e){if(this.lines.splice(ae(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},Te(Bi);function no(e,r,R,A,F){if(A&&A.shared)return wl(e,r,R,A,F);if(e.cm&&!e.cm.curOp)return sa(e.cm,no)(e,r,R,A,F);var V=new Bi(e,F),re=ir(r,R);if(A&&B(A,V,!1),re>0||re==0&&V.clearWhenEmpty!==!1)return V;if(V.replacedWith&&(V.collapsed=!0,V.widgetNode=M("span",[V.replacedWith],"CodeMirror-widget"),A.handleMouseEvents||V.widgetNode.setAttribute("cm-ignore-events","true"),A.insertLeft&&(V.widgetNode.insertLeft=!0)),V.collapsed){if(lt(e,r.line,r,R,V)||r.line!=R.line&<(e,R.line,r,R,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");gi()}V.addToHistory&&Es(e,{from:r,to:R,origin:"markText"},e.sel,NaN);var ie=r.line,ce=e.cm,ve;if(e.iter(ie,R.line+1,function(Be){ce&&V.collapsed&&!ce.options.lineWrapping&&mt(Be)==ce.display.maxLine&&(ve=!0),V.collapsed&&ie!=r.line&&Vn(Be,0),ui(Be,new Ka(V,ie==r.line?r.ch:null,ie==R.line?R.ch:null)),++ie}),V.collapsed&&e.iter(r.line,R.line+1,function(Be){Ct(e,Be)&&Vn(Be,0)}),V.clearOnEnter&&Ce(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(vi(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),V.collapsed&&(V.id=++Fs,V.atomic=!0),ce){if(ve&&(ce.curOp.updateMaxLine=!0),V.collapsed)Cn(ce,r.line,R.line+1);else if(V.className||V.startStyle||V.endStyle||V.css||V.attributes||V.title)for(var Ie=r.line;Ie<=R.line;Ie++)Xn(ce,Ie,"text");V.atomic&&Os(ce.doc),zt(ce,"markerAdded",ce,V)}return V}var wo=function(e,r){this.markers=e,this.primary=r;for(var R=0;R<e.length;++R)e[R].parent=this};wo.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();zt(this,"clear")},wo.prototype.find=function(e,r){return this.primary.find(e,r)},Te(wo);function wl(e,r,R,A,F){A=B(A),A.shared=!1;var V=[no(e,r,R,A,F)],re=V[0],ie=A.widgetNode;return Ui(e,function(ce){ie&&(A.widgetNode=ie.cloneNode(!0)),V.push(no(ce,cr(ce,r),cr(ce,R),A,F));for(var ve=0;ve<ce.linked.length;++ve)if(ce.linked[ve].isParent)return;re=te(V)}),new wo(V,re)}function Us(e){return e.findMarks(St(e.first,0),e.clipPos(St(e.lastLine())),function(r){return r.parent})}function Tl(e,r){for(var R=0;R<r.length;R++){var A=r[R],F=A.find(),V=e.clipPos(F.from),re=e.clipPos(F.to);if(ir(V,re)){var ie=no(e,V,re,A.primary,A.primary.type);A.markers.push(ie),ie.parent=A}}}function Sl(e){for(var r=function(A){var F=e[A],V=[F.primary.doc];Ui(F.primary.doc,function(ce){return V.push(ce)});for(var re=0;re<F.markers.length;re++){var ie=F.markers[re];ae(V,ie.doc)==-1&&(ie.parent=null,F.markers.splice(re--,1))}},R=0;R<e.length;R++)r(R)}var Cl=0,Va=function(e,r,R,A,F){if(!(this instanceof Va))return new Va(e,r,R,A,F);R==null&&(R=0),xo.call(this,[new Eo([new qt("",null)])]),this.first=R,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=R;var V=St(R,0);this.sel=hi(V),this.history=new jo(null),this.id=++Cl,this.modeOption=r,this.lineSep=A,this.direction=F=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:V,to:V,text:e}),Na(this,hi(V),Se)};Va.prototype=ge(xo.prototype,{constructor:Va,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,A=0;A<r.length;++A)R+=r[A].height;this.insertInner(e-this.first,r,R)},remove:function(e,r){this.removeInner(e-this.first,r)},getValue:function(e){var r=va(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:la(function(e){var r=St(this.first,0),R=this.first+this.size-1;to(this,{from:r,to:St(R,Yt(this,R).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ii(this.cm,0,0),Na(this,hi(r),Se)}),replaceRange:function(e,r,R,A){r=cr(this,r),R=R?cr(this,R):r,ro(this,e,r,R,A)},getRange:function(e,r,R){var A=kn(this,cr(this,e),cr(this,r));return R===!1?A:A.join(R||this.lineSeparator())},getLine:function(e){var r=this.getLineHandle(e);return r&&r.text},getLineHandle:function(e){if(da(this,e))return Yt(this,e)},getLineNumber:function(e){return Xr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Yt(this,e)),mt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return cr(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:la(function(e,r,R){Ts(this,cr(this,typeof e=="number"?St(e,r||0):e),null,R)}),setSelection:la(function(e,r,R){Ts(this,cr(this,e),cr(this,r||e),R)}),extendSelection:la(function(e,r,R){Uo(this,cr(this,e),r&&cr(this,r),R)}),extendSelections:la(function(e,r){ws(this,Wn(this,e),r)}),extendSelectionsBy:la(function(e,r){var R=le(this.sel.ranges,e);ws(this,Wn(this,R),r)}),setSelections:la(function(e,r,R){if(!e.length)return;for(var A=[],F=0;F<e.length;F++)A[F]=new An(cr(this,e[F].anchor),cr(this,e[F].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),Na(this,ni(this.cm,A,r),R)}),addSelection:la(function(e,r,R){var A=this.sel.ranges.slice(0);A.push(new An(cr(this,e),cr(this,r||e))),Na(this,ni(this.cm,A,A.length-1),R)}),getSelection:function(e){for(var r=this.sel.ranges,R,A=0;A<r.length;A++){var F=kn(this,r[A].from(),r[A].to());R=R?R.concat(F):F}return e===!1?R:R.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],R=this.sel.ranges,A=0;A<R.length;A++){var F=kn(this,R[A].from(),R[A].to());e!==!1&&(F=F.join(e||this.lineSeparator())),r[A]=F}return r},replaceSelection:function(e,r,R){for(var A=[],F=0;F<this.sel.ranges.length;F++)A[F]=e;this.replaceSelections(A,r,R||"+input")},replaceSelections:la(function(e,r,R){for(var A=[],F=this.sel,V=0;V<F.ranges.length;V++){var re=F.ranges[V];A[V]={from:re.from(),to:re.to(),text:this.splitLines(e[V]),origin:R}}for(var ie=r&&r!="end"&&No(this,A,r),ce=A.length-1;ce>=0;ce--)to(this,A[ce]);ie?Ss(this,ie):this.cm&&Ga(this.cm)}),undo:la(function(){Ho(this,"undo")}),redo:la(function(){Ho(this,"redo")}),undoSelection:la(function(){Ho(this,"undo",!0)}),redoSelection:la(function(){Ho(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,A=0;A<e.done.length;A++)e.done[A].ranges||++r;for(var F=0;F<e.undone.length;F++)e.undone[F].ranges||++R;return{undo:r,redo:R}},clearHistory:function(){var e=this;this.history=new jo(this.history.maxGeneration),Ui(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:qi(this.history.done),undone:qi(this.history.undone)}},setHistory:function(e){var r=this.history=new jo(this.history.maxGeneration);r.done=qi(e.done.slice(0),null,!0),r.undone=qi(e.undone.slice(0),null,!0)},setGutterMarker:la(function(e,r,R){return bo(this,e,"gutter",function(A){var F=A.gutterMarkers||(A.gutterMarkers={});return F[r]=R,!R&&J(F)&&(A.gutterMarkers=null),!0})}),clearGutter:la(function(e){var r=this;this.iter(function(R){R.gutterMarkers&&R.gutterMarkers[e]&&bo(r,R,"gutter",function(){return R.gutterMarkers[e]=null,J(R.gutterMarkers)&&(R.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!da(this,e))return null;if(r=e,e=Yt(this,e),!e)return null}else if(r=Xr(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:la(function(e,r,R){return bo(this,e,r=="gutter"?"gutter":"class",function(A){var F=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass";if(!A[F])A[F]=R;else{if(O(R).test(A[F]))return!1;A[F]+=" "+R}return!0})}),removeLineClass:la(function(e,r,R){return bo(this,e,r=="gutter"?"gutter":"class",function(A){var F=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass",V=A[F];if(V)if(R==null)A[F]=null;else{var re=V.match(O(R));if(!re)return!1;var ie=re.index+re[0].length;A[F]=V.slice(0,re.index)+(!re.index||ie==V.length?"":" ")+V.slice(ie)||null}else return!1;return!0})}),addLineWidget:la(function(e,r,R){return _l(this,e,r,R)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,R){return no(this,cr(this,e),cr(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=cr(this,e),no(this,e,e,R,"bookmark")},findMarksAt:function(e){e=cr(this,e);var r=[],R=Yt(this,e.line).markedSpans;if(R)for(var A=0;A<R.length;++A){var F=R[A];(F.from==null||F.from<=e.ch)&&(F.to==null||F.to>=e.ch)&&r.push(F.marker.parent||F.marker)}return r},findMarks:function(e,r,R){e=cr(this,e),r=cr(this,r);var A=[],F=e.line;return this.iter(e.line,r.line+1,function(V){var re=V.markedSpans;if(re)for(var ie=0;ie<re.length;ie++){var ce=re[ie];!(ce.to!=null&&F==e.line&&e.ch>=ce.to||ce.from==null&&F!=e.line||ce.from!=null&&F==r.line&&ce.from>=r.ch)&&(!R||R(ce.marker))&&A.push(ce.marker.parent||ce.marker)}++F}),A},getAllMarks:function(){var e=[];return this.iter(function(r){var R=r.markedSpans;if(R)for(var A=0;A<R.length;++A)R[A].from!=null&&e.push(R[A].marker)}),e},posFromIndex:function(e){var r,R=this.first,A=this.lineSeparator().length;return this.iter(function(F){var V=F.text.length+A;if(V>e)return r=e,!0;e-=V,++R}),cr(this,St(R,r))},indexFromPos:function(e){e=cr(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(A){r+=A.text.length+R}),r},copy:function(e){var r=new Va(va(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 A=new Va(va(this,r,R),e.mode||this.modeOption,r,this.lineSep,this.direction);return e.sharedHist&&(A.history=this.history),(this.linked||(this.linked=[])).push({doc:A,sharedHist:e.sharedHist}),A.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(A,Us(this)),A},unlinkDoc:function(e){if(e instanceof Qn&&(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),Sl(Us(this));break}if(e.history==this.history){var A=[e.id];Ui(e,function(F){return A.push(F.id)},!0),e.history=new jo(null),e.history.done=qi(this.history.done,A),e.history.undone=qi(this.history.undone,A)}},iterLinkedDocs:function(e){Ui(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):dr(e)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:la(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)})}),Va.prototype.eachLine=Va.prototype.iter;var Bs=0;function Ol(e){var r=this;if(Ws(r),et(r,e)||Hr(r.display,e))return;fe(e),w&&(Bs=+new Date);var R=aa(r,e,!0),A=e.dataTransfer.files;if(!R||r.isReadOnly())return;if(A&&A.length&&window.FileReader&&window.File)for(var F=A.length,V=Array(F),re=0,ie=function(){++re==F&&sa(r,function(){R=cr(r.doc,R);var Qe={from:R,to:R,text:r.doc.splitLines(V.filter(function(gt){return gt!=null}).join(r.doc.lineSeparator())),origin:"paste"};to(r.doc,Qe),Ss(r.doc,hi(cr(r.doc,R),cr(r.doc,pi(Qe))))})()},ce=function(Qe,gt){if(r.options.allowDropFileTypes&&ae(r.options.allowDropFileTypes,Qe.type)==-1){ie();return}var Rt=new FileReader;Rt.onerror=function(){return ie()},Rt.onload=function(){var Ht=Rt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ht)){ie();return}V[gt]=Ht,ie()},Rt.readAsText(Qe)},ve=0;ve<A.length;ve++)ce(A[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 Ie=e.dataTransfer.getData("Text");if(Ie){var Be;if(r.state.draggingText&&!r.state.draggingText.copy&&(Be=r.listSelections()),Bo(r.doc,hi(R,R)),Be)for(var qe=0;qe<Be.length;++qe)ro(r.doc,"",Be[qe].anchor,Be[qe].head,"drag");r.replaceSelection(Ie,"around","paste"),r.display.input.focus()}}catch(Qe){}}}function Al(e,r){if(w&&(!e.state.draggingText||+new Date-Bs<100)){Oe(r);return}if(et(e,r)||Hr(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!m){var R=T("img",null,null,"position: fixed; left: 0; top: 0;");R.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",_&&(R.width=R.height=1,e.display.wrapper.appendChild(R),R._top=R.offsetTop),r.dataTransfer.setDragImage(R,0,0),_&&R.parentNode.removeChild(R)}}function Rl(e,r){var R=aa(e,r);if(!R)return;var A=document.createDocumentFragment();Za(e,R,A),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),p(e.display.dragCursor,A)}function Ws(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Hs(e){if(!document.getElementsByClassName)return;for(var r=document.getElementsByClassName("CodeMirror"),R=[],A=0;A<r.length;A++){var F=r[A].CodeMirror;F&&R.push(F)}R.length&&R[0].operation(function(){for(var V=0;V<R.length;V++)e(R[V])})}var Ks=!1;function Dl(){if(Ks)return;Pl(),Ks=!0}function Pl(){var e;Ce(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Hs(Ll)},100))}),Ce(window,"blur",function(){return Hs(ai)})}function Ll(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var Wi={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"},To=0;To<10;To++)Wi[To+48]=Wi[To+96]=String(To);for(var Ko=65;Ko<=90;Ko++)Wi[Ko]=String.fromCharCode(Ko);for(var So=1;So<=12;So++)Wi[So+111]=Wi[So+63235]="F"+So;var Pi={};Pi.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"},Pi.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"},Pi.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"},Pi.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"]},Pi.default=i?Pi.macDefault:Pi.pcDefault;function Ml(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var R,A,F,V,re=0;re<r.length-1;re++){var ie=r[re];if(/^(cmd|meta|m)$/i.test(ie))V=!0;else if(/^a(lt)?$/i.test(ie))R=!0;else if(/^(c|ctrl|control)$/i.test(ie))A=!0;else if(/^s(hift)?$/i.test(ie))F=!0;else throw new Error("Unrecognized modifier name: "+ie)}return R&&(e="Alt-"+e),A&&(e="Ctrl-"+e),V&&(e="Cmd-"+e),F&&(e="Shift-"+e),e}function kl(e){var r={};for(var R in e)if(e.hasOwnProperty(R)){var A=e[R];if(/^(name|fallthrough|(de|at)tach)$/.test(R))continue;if(A=="..."){delete e[R];continue}for(var F=le(R.split(" "),Ml),V=0;V<F.length;V++){var re=void 0,ie=void 0;V==F.length-1?(ie=F.join(" "),re=A):(ie=F.slice(0,V+1).join(" "),re="...");var ce=r[ie];if(!ce)r[ie]=re;else if(ce!=re)throw new Error("Inconsistent bindings for "+ie)}delete e[R]}for(var ve in r)e[ve]=r[ve];return e}function ao(e,r,R,A){r=zo(r);var F=r.call?r.call(e,A):r[e];if(F===!1)return"nothing";if(F==="...")return"multi";if(F!=null&&R(F))return"handled";if(r.fallthrough){if(Object.prototype.toString.call(r.fallthrough)!="[object Array]")return ao(e,r.fallthrough,R,A);for(var V=0;V<r.fallthrough.length;V++){var re=ao(e,r.fallthrough[V],R,A);if(re)return re}}}function zs(e){var r=typeof e=="string"?e:Wi[e.keyCode];return r=="Ctrl"||r=="Alt"||r=="Shift"||r=="Mod"}function Gs(e,r,R){var A=e;return r.altKey&&A!="Alt"&&(e="Alt-"+e),(s?r.metaKey:r.ctrlKey)&&A!="Ctrl"&&(e="Ctrl-"+e),(s?r.ctrlKey:r.metaKey)&&A!="Mod"&&(e="Cmd-"+e),!R&&r.shiftKey&&A!="Shift"&&(e="Shift-"+e),e}function Xs(e,r){if(_&&e.keyCode==34&&e.char)return!1;var R=Wi[e.keyCode];return R==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(R=e.code),Gs(R,e,r))}function zo(e){return typeof e=="string"?Pi[e]:e}function io(e,r){for(var R=e.doc.sel.ranges,A=[],F=0;F<R.length;F++){for(var V=r(R[F]);A.length&&ir(V.from,te(A).to)<=0;){var re=A.pop();if(ir(re.from,V.from)<0){V.from=re.from;break}}A.push(V)}Ua(e,function(){for(var ie=A.length-1;ie>=0;ie--)ro(e.doc,"",A[ie].from,A[ie].to,"+delete");Ga(e)})}function is(e,r,R){var A=_e(e.text,r+R,R);return A<0||A>e.text.length?null:A}function os(e,r,R){var A=is(e,r.ch,R);return A==null?null:new St(r.line,A,R<0?"after":"before")}function ss(e,r,R,A,F){if(e){r.doc.direction=="rtl"&&(F=-F);var V=it(R,r.doc.direction);if(V){var re=F<0?te(V):V[0],ie=F<0==(re.level==1),ce=ie?"after":"before",ve;if(re.level>0||r.doc.direction=="rtl"){var Ie=je(r,R);ve=F<0?R.text.length-1:0;var Be=Ge(r,Ie,ve).top;ve=He(function(qe){return Ge(r,Ie,qe).top==Be},F<0==(re.level==1)?re.from:re.to-1,ve),ce=="before"&&(ve=is(R,ve,1))}else ve=F<0?re.to:re.from;return new St(A,ve,ce)}}return new St(A,F<0?R.text.length:0,F<0?"before":"after")}function Il(e,r,R,A){var F=it(r,e.doc.direction);if(!F)return os(r,R,A);R.ch>=r.text.length?(R.ch=r.text.length,R.sticky="before"):R.ch<=0&&(R.ch=0,R.sticky="after");var V=tt(F,R.ch,R.sticky),re=F[V];if(e.doc.direction=="ltr"&&re.level%2==0&&(A>0?re.to>R.ch:re.from<R.ch))return os(r,R,A);var ie=function(Jt,or){return is(r,Jt instanceof St?Jt.ch:Jt,or)},ce,ve=function(Jt){return e.options.lineWrapping?(ce=ce||je(e,r),hr(e,r,ce,Jt)):{begin:0,end:r.text.length}},Ie=ve(R.sticky=="before"?ie(R,-1):R.ch);if(e.doc.direction=="rtl"||re.level==1){var Be=re.level==1==A<0,qe=ie(R,Be?1:-1);if(qe!=null&&(Be?qe<=re.to&&qe<=Ie.end:qe>=re.from&&qe>=Ie.begin)){var Qe=Be?"before":"after";return new St(R.line,qe,Qe)}}var gt=function(Jt,or,Qt){for(var mr=function(zn,Oa){return Oa?new St(R.line,ie(zn,1),"before"):new St(R.line,zn,"after")};Jt>=0&&Jt<F.length;Jt+=or){var Nr=F[Jt],Dr=or>0==(Nr.level!=1),sn=Dr?Qt.begin:ie(Qt.end,-1);if(Nr.from<=sn&&sn<Nr.to)return mr(sn,Dr);if(sn=Dr?Nr.from:ie(Nr.to,-1),Qt.begin<=sn&&sn<Qt.end)return mr(sn,Dr)}},Rt=gt(V+A,A,Ie);if(Rt)return Rt;var Ht=A>0?Ie.end:ie(Ie.begin,-1);return Ht!=null&&!(A>0&&Ht==r.text.length)&&(Rt=gt(A>0?0:F.length-1,A,ve(Ht)),Rt)?Rt:null}var Co={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Se)},killLine:function(e){return io(e,function(r){if(r.empty()){var R=Yt(e.doc,r.head.line).text.length;return r.head.ch==R&&r.head.line<e.lastLine()?{from:r.head,to:St(r.head.line+1,0)}:{from:r.head,to:St(r.head.line,R)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return io(e,function(r){return{from:St(r.from().line,0),to:cr(e.doc,St(r.to().line+1,0))}})},delLineLeft:function(e){return io(e,function(r){return{from:St(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return io(e,function(r){var R=e.charCoords(r.head,"div").top+5,A=e.coordsChar({left:0,top:R},"div");return{from:A,to:r.from()}})},delWrappedLineRight:function(e){return io(e,function(r){var R=e.charCoords(r.head,"div").top+5,A=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:R},"div");return{from:r.from(),to:A}})},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(St(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(St(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return Vs(e,r.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(r){return $s(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")},xe)},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")},xe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5,A=e.coordsChar({left:0,top:R},"div");return A.ch<e.getLine(A.line).search(/\S/)?$s(e,r.head):A},xe)},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(),A=e.options.tabSize,F=0;F<R.length;F++){var V=R[F].from(),re=G(e.getLine(V.line),V.ch,A);r.push(oe(A-re%A))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ua(e,function(){for(var r=e.listSelections(),R=[],A=0;A<r.length;A++){if(!r[A].empty())continue;var F=r[A].head,V=Yt(e.doc,F.line).text;if(V){if(F.ch==V.length&&(F=new St(F.line,F.ch-1)),F.ch>0)F=new St(F.line,F.ch+1),e.replaceRange(V.charAt(F.ch-1)+V.charAt(F.ch-2),St(F.line,F.ch-2),F,"+transpose");else if(F.line>e.doc.first){var re=Yt(e.doc,F.line-1).text;re&&(F=new St(F.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+re.charAt(re.length-1),St(F.line-1,re.length-1),F,"+transpose"))}}R.push(new An(F,F))}e.setSelections(R)})},newlineAndIndent:function(e){return Ua(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 A=0;A<r.length;A++)e.indentLine(r[A].from().line,null,!0);Ga(e)})},openLine:function(e){return e.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vs(e,r){var R=Yt(e.doc,r),A=mt(R);return A!=R&&(r=Xr(A)),ss(!0,e,A,r,1)}function Nl(e,r){var R=Yt(e.doc,r),A=xt(R);return A!=R&&(r=Xr(A)),ss(!0,e,R,r,-1)}function $s(e,r){var R=Vs(e,r.line),A=Yt(e.doc,R.line),F=it(A,e.doc.direction);if(!F||F[0].level==0){var V=Math.max(R.ch,A.text.search(/\S/)),re=r.line==R.line&&r.ch<=V&&r.ch;return St(R.line,re?0:V,R.sticky)}return R}function Go(e,r,R){if(typeof r=="string"&&(r=Co[r],!r))return!1;e.display.input.ensurePolled();var A=e.display.shift,F=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),R&&(e.display.shift=!1),F=r(e)!=we}finally{e.display.shift=A,e.state.suppressEdits=!1}return F}function jl(e,r,R){for(var A=0;A<e.state.keyMaps.length;A++){var F=ao(r,e.state.keyMaps[A],R,e);if(F)return F}return e.options.extraKeys&&ao(r,e.options.extraKeys,R,e)||ao(r,e.options.keyMap,R,e)}var Fl=new q;function Oo(e,r,R,A){var F=e.state.keySeq;if(F){if(zs(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:Fl.set(50,function(){e.state.keySeq==F&&(e.state.keySeq=null,e.display.input.reset())}),Ys(e,F+" "+r,R,A))return!0}return Ys(e,r,R,A)}function Ys(e,r,R,A){var F=jl(e,r,A);return F=="multi"&&(e.state.keySeq=r),F=="handled"&&zt(e,"keyHandled",e,r,R),(F=="handled"||F=="multi")&&(fe(R),ea(e)),!!F}function Js(e,r){var R=Xs(r,!0);return R?r.shiftKey&&!e.state.keySeq?Oo(e,"Shift-"+R,r,function(A){return Go(e,A,!0)})||Oo(e,R,r,function(A){if(typeof A=="string"?/^go[A-Z]/.test(A):A.motion)return Go(e,A)}):Oo(e,R,r,function(A){return Go(e,A)}):!1}function Ul(e,r,R){return Oo(e,"'"+R+"'",r,function(A){return Go(e,A,!0)})}var ls=null;function Qs(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(r.curOp.focus=K(),et(r,e))return;w&&d<11&&e.keyCode==27&&(e.returnValue=!1);var R=e.keyCode;r.display.shift=R==16||e.shiftKey;var A=Js(r,e);_&&(ls=A?R:null,!A&&R==88&&!$r&&(i?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),C&&!i&&!A&&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;H(r,"CodeMirror-crosshair");function R(A){(A.keyCode==18||!A.altKey)&&(b(r,"CodeMirror-crosshair"),rt(document,"keyup",R),rt(document,"mouseover",R))}Ce(document,"keyup",R),Ce(document,"mouseover",R)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),et(this,e)}function el(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(Hr(r.display,e)||et(r,e)||e.ctrlKey&&!e.altKey||i&&e.metaKey)return;var R=e.keyCode,A=e.charCode;if(_&&R==ls){ls=null,fe(e);return}if(_&&(!e.which||e.which<10)&&Js(r,e))return;var F=String.fromCharCode(A==null?R:A);if(F=="\b")return;if(Ul(r,e,F))return;r.display.input.onKeyPress(e)}var Wl=400,us=function(e,r,R){this.time=e,this.pos=r,this.button=R};us.prototype.compare=function(e,r,R){return this.time+Wl>e&&ir(r,this.pos)==0&&R==this.button};var Ao,Ro;function Hl(e,r){var R=+new Date;return Ro&&Ro.compare(R,e,r)?(Ao=Ro=null,"triple"):Ao&&Ao.compare(R,e,r)?(Ro=new us(R,e,r),Ao=null,"double"):(Ao=new us(R,e,r),Ro=null,"single")}function tl(e){var r=this,R=r.display;if(et(r,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,Hr(R,e)){o||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(cs(r,e))return;var A=aa(r,e),F=Ve(e),V=A?Hl(A,F):"single";if(window.focus(),F==1&&r.state.selectingText&&r.state.selectingText(e),A&&Kl(r,F,A,V,e))return;F==1?A?Gl(r,A,V,e):We(e)==R.scroller&&fe(e):F==2?(A&&Uo(r.doc,A),setTimeout(function(){return R.input.focus()},20)):F==3&&(P?r.display.input.onContextMenu(e):Si(r))}function Kl(e,r,R,A,F){var V="Click";return A=="double"?V="Double"+V:A=="triple"&&(V="Triple"+V),V=(r==1?"Left":r==2?"Middle":"Right")+V,Oo(e,Gs(V,F),F,function(re){if(typeof re=="string"&&(re=Co[re]),!re)return!1;var ie=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),ie=re(e,R)!=we}finally{e.state.suppressEdits=!1}return ie})}function zl(e,r,R){var A=e.getOption("configureMouse"),F=A?A(e,r,R):{};if(F.unit==null){var V=t?R.shiftKey&&R.metaKey:R.altKey;F.unit=V?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(F.extend==null||e.doc.extend)&&(F.extend=e.doc.extend||R.shiftKey),F.addNew==null&&(F.addNew=i?R.metaKey:R.ctrlKey),F.moveOnDrag==null&&(F.moveOnDrag=!(i?R.altKey:R.ctrlKey)),F}function Gl(e,r,R,A){w?setTimeout(U(Mi,e),0):e.curOp.focus=K();var F=zl(e,R,A),V=e.doc.sel,re;e.options.dragDrop&&ut&&!e.isReadOnly()&&R=="single"&&(re=V.contains(r))>-1&&(ir((re=V.ranges[re]).from(),r)<0||r.xRel>0)&&(ir(re.to(),r)>0||r.xRel<0)?Xl(e,A,r,F):Vl(e,A,r,F)}function Xl(e,r,R,A){var F=e.display,V=!1,re=sa(e,function(ve){o&&(F.scroller.draggable=!1),e.state.draggingText=!1,rt(F.wrapper.ownerDocument,"mouseup",re),rt(F.wrapper.ownerDocument,"mousemove",ie),rt(F.scroller,"dragstart",ce),rt(F.scroller,"drop",re),V||(fe(ve),A.addNew||Uo(e.doc,R,null,null,A.extend),o&&!m||w&&d==9?setTimeout(function(){F.wrapper.ownerDocument.body.focus({preventScroll:!0}),F.input.focus()},20):F.input.focus())}),ie=function(ve){V=V||Math.abs(r.clientX-ve.clientX)+Math.abs(r.clientY-ve.clientY)>=10},ce=function(){return V=!0};o&&(F.scroller.draggable=!0),e.state.draggingText=re,re.copy=!A.moveOnDrag,F.scroller.dragDrop&&F.scroller.dragDrop(),Ce(F.wrapper.ownerDocument,"mouseup",re),Ce(F.wrapper.ownerDocument,"mousemove",ie),Ce(F.scroller,"dragstart",ce),Ce(F.scroller,"drop",re),Si(e),setTimeout(function(){return F.input.focus()},20)}function rl(e,r,R){if(R=="char")return new An(r,r);if(R=="word")return e.findWordAt(r);if(R=="line")return new An(St(r.line,0),cr(e.doc,St(r.line+1,0)));var A=R(e,r);return new An(A.from,A.to)}function Vl(e,r,R,A){var F=e.display,V=e.doc;fe(r);var re,ie,ce=V.sel,ve=ce.ranges;if(A.addNew&&!A.extend?(ie=V.sel.contains(R),ie>-1?re=ve[ie]:re=new An(R,R)):(re=V.sel.primary(),ie=V.sel.primIndex),A.unit=="rectangle")A.addNew||(re=new An(R,R)),R=aa(e,r,!0,!0),ie=-1;else{var Ie=rl(e,R,A.unit);A.extend?re=ns(re,Ie.anchor,Ie.head,A.extend):re=Ie}A.addNew?ie==-1?(ie=ve.length,Na(V,ni(e,ve.concat([re]),ie),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[ie].empty()&&A.unit=="char"&&!A.extend?(Na(V,ni(e,ve.slice(0,ie).concat(ve.slice(ie+1)),0),{scroll:!1,origin:"*mouse"}),ce=V.sel):as(V,ie,re,de):(ie=0,Na(V,new Wa([re],0),de),ce=V.sel);var Be=R;function qe(Qt){if(ir(Be,Qt)==0)return;if(Be=Qt,A.unit=="rectangle"){for(var mr=[],Nr=e.options.tabSize,Dr=G(Yt(V,R.line).text,R.ch,Nr),sn=G(Yt(V,Qt.line).text,Qt.ch,Nr),zn=Math.min(Dr,sn),Oa=Math.max(Dr,sn),ra=Math.min(R.line,Qt.line),qa=Math.min(e.lastLine(),Math.max(R.line,Qt.line));ra<=qa;ra++){var $a=Yt(V,ra).text,pa=he($a,zn,Nr);zn==Oa?mr.push(new An(St(ra,pa),St(ra,pa))):$a.length>pa&&mr.push(new An(St(ra,pa),St(ra,he($a,Oa,Nr))))}mr.length||mr.push(new An(R,R)),Na(V,ni(e,ce.ranges.slice(0,ie).concat(mr),ie),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Qt)}else{var Ya=re,La=rl(e,Qt,A.unit),_a=Ya.anchor,ma;ir(La.anchor,_a)>0?(ma=La.head,_a=ga(Ya.from(),La.anchor)):(ma=La.anchor,_a=It(Ya.to(),La.head));var ia=ce.ranges.slice(0);ia[ie]=$l(e,new An(cr(V,_a),ma)),Na(V,ni(e,ia,ie),de)}}var Qe=F.wrapper.getBoundingClientRect(),gt=0;function Rt(Qt){var mr=++gt,Nr=aa(e,Qt,!0,A.unit=="rectangle");if(!Nr)return;if(ir(Nr,Be)!=0){e.curOp.focus=K(),qe(Nr);var Dr=Ii(F,V);(Nr.line>=Dr.to||Nr.line<Dr.from)&&setTimeout(sa(e,function(){gt==mr&&Rt(Qt)}),150)}else{var sn=Qt.clientY<Qe.top?-20:Qt.clientY>Qe.bottom?20:0;sn&&setTimeout(sa(e,function(){if(gt!=mr)return;F.scroller.scrollTop+=sn,Rt(Qt)}),50)}}function Ht(Qt){e.state.selectingText=!1,gt=Infinity,Qt&&(fe(Qt),F.input.focus()),rt(F.wrapper.ownerDocument,"mousemove",Jt),rt(F.wrapper.ownerDocument,"mouseup",or),V.history.lastSelOrigin=null}var Jt=sa(e,function(Qt){Qt.buttons===0||!Ve(Qt)?Ht(Qt):Rt(Qt)}),or=sa(e,Ht);e.state.selectingText=or,Ce(F.wrapper.ownerDocument,"mousemove",Jt),Ce(F.wrapper.ownerDocument,"mouseup",or)}function $l(e,r){var R=r.anchor,A=r.head,F=Yt(e.doc,R.line);if(ir(R,A)==0&&R.sticky==A.sticky)return r;var V=it(F);if(!V)return r;var re=tt(V,R.ch,R.sticky),ie=V[re];if(ie.from!=R.ch&&ie.to!=R.ch)return r;var ce=re+(ie.from==R.ch==(ie.level!=1)?0:1);if(ce==0||ce==V.length)return r;var ve;if(A.line!=R.line)ve=(A.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ie=tt(V,A.ch,A.sticky),Be=Ie-re||(A.ch-R.ch)*(ie.level==1?-1:1);Ie==ce-1||Ie==ce?ve=Be<0:ve=Be>0}var qe=V[ce+(ve?-1:0)],Qe=ve==(qe.level==1),gt=Qe?qe.from:qe.to,Rt=Qe?"after":"before";return R.ch==gt&&R.sticky==Rt?r:new An(new St(R.line,gt,Rt),A)}function nl(e,r,R,A){var F,V;if(r.touches)F=r.touches[0].clientX,V=r.touches[0].clientY;else try{F=r.clientX,V=r.clientY}catch(qe){return!1}if(F>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&fe(r);var re=e.display,ie=re.lineDiv.getBoundingClientRect();if(V>ie.bottom||!Re(e,R))return Ee(r);V-=ie.top-re.viewOffset;for(var ce=0;ce<e.display.gutterSpecs.length;++ce){var ve=re.gutters.childNodes[ce];if(ve&&ve.getBoundingClientRect().right>=F){var Ie=Fn(e.doc,V),Be=e.display.gutterSpecs[ce];return ze(e,R,e,Ie,Be.className,r),Ee(r)}}}function cs(e,r){return nl(e,r,"gutterClick",!0)}function al(e,r){if(Hr(e.display,r)||Yl(e,r))return;if(et(e,r,"contextmenu"))return;P||e.display.input.onContextMenu(r)}function Yl(e,r){return Re(e,"gutterContextMenu")?nl(e,r,"gutterContextMenu",!1):!1}function il(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Fr(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Xo={};function Jl(e){var r=e.optionHandlers;function R(A,F,V,re){e.defaults[A]=F,V&&(r[A]=re?function(ie,ce,ve){ve!=oo&&V(ie,ce,ve)}:V)}e.defineOption=R,e.Init=oo,R("value","",function(A,F){return A.setValue(F)},!0),R("mode",null,function(A,F){A.doc.modeOption=F,Di(A)},!0),R("indentUnit",2,Di,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(A){go(A),Fr(A),Cn(A)},!0),R("lineSeparator",null,function(A,F){if(A.doc.lineSep=F,!F)return;var V=[],re=A.doc.first;A.doc.iter(function(ce){for(var ve=0;;){var Ie=ce.text.indexOf(F,ve);if(Ie==-1)break;ve=Ie+F.length,V.push(St(re,Ie))}re++});for(var ie=V.length-1;ie>=0;ie--)ro(A.doc,F,V[ie],St(V[ie].line,V[ie].ch+F.length))}),R("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(A,F,V){A.state.specialChars=new RegExp(F.source+(F.test(" ")?"":"| "),"g"),V!=oo&&A.refresh()}),R("specialCharPlaceholder",Sr,function(A){return A.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(A,F){return A.getInputField().spellcheck=F},!0),R("autocorrect",!1,function(A,F){return A.getInputField().autocorrect=F},!0),R("autocapitalize",!1,function(A,F){return A.getInputField().autocapitalize=F},!0),R("rtlMoveVisually",!S),R("wholeLineUpdateBefore",!0),R("theme","default",function(A){il(A),fi(A)},!0),R("keyMap","default",function(A,F,V){var re=zo(F),ie=V!=oo&&zo(V);ie&&ie.detach&&ie.detach(A,re),re.attach&&re.attach(A,ie||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,Zl,!0),R("gutters",[],function(A,F){A.display.gutterSpecs=Ba(F,A.options.lineNumbers),fi(A)},!0),R("fixedGutter",!0,function(A,F){A.display.gutters.style.left=F?ba(A.display)+"px":"0",A.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(A){return ur(A)},!0),R("scrollbarStyle","native",function(A){dn(A),ur(A),A.display.scrollbars.setScrollTop(A.doc.scrollTop),A.display.scrollbars.setScrollLeft(A.doc.scrollLeft)},!0),R("lineNumbers",!1,function(A,F){A.display.gutterSpecs=Ba(A.options.gutters,F),fi(A)},!0),R("firstLineNumber",1,fi,!0),R("lineNumberFormatter",function(A){return A},fi,!0),R("showCursorWhenSelecting",!1,On,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(A,F){F=="nocursor"&&(ai(A),A.display.input.blur()),A.display.input.readOnlyChanged(F)}),R("screenReaderLabel",null,function(A,F){F=F===""?null:F,A.display.input.screenReaderLabelChanged(F)}),R("disableInput",!1,function(A,F){F||A.display.input.reset()},!0),R("dragDrop",!0,Ql),R("allowDropFileTypes",null),R("cursorBlinkRate",530),R("cursorScrollMargin",0),R("cursorHeight",1,On,!0),R("singleCursorHeightPerLine",!0,On,!0),R("workTime",100),R("workDelay",100),R("flattenSpans",!0,go,!0),R("addModeClass",!1,go,!0),R("pollInterval",100),R("undoDepth",200,function(A,F){return A.doc.history.undoDepth=F}),R("historyEventDelay",1250),R("viewportMargin",10,function(A){return A.refresh()},!0),R("maxHighlightLength",1e4,go,!0),R("moveInputWithCursor",!0,function(A,F){F||A.display.input.resetPosition()}),R("tabindex",null,function(A,F){return A.display.input.getField().tabIndex=F||""}),R("autofocus",null),R("direction","ltr",function(A,F){return A.doc.setDirection(F)},!0),R("phrases",null)}function Ql(e,r,R){var A=R&&R!=oo;if(!r!=!A){var F=e.display.dragFunctions,V=r?Ce:rt;V(e.display.scroller,"dragstart",F.start),V(e.display.scroller,"dragenter",F.enter),V(e.display.scroller,"dragover",F.over),V(e.display.scroller,"dragleave",F.leave),V(e.display.scroller,"drop",F.drop)}}function Zl(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),Xe(e)),Ra(e),Cn(e),Fr(e),setTimeout(function(){return ur(e)},100)}function Qn(e,r){var R=this;if(!(this instanceof Qn))return new Qn(e,r);this.options=r=r?B(r):{},B(ol,r,!1);var A=r.value;typeof A=="string"?A=new Va(A,r.mode,null,r.lineSeparator,r.direction):r.mode&&(A.modeOption=r.mode),this.doc=A;var F=new Qn.inputStyles[r.inputStyle](this),V=this.display=new Xi(e,A,F,r);V.wrapper.CodeMirror=this,il(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),dn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new q,keySeq:null,specialChars:null},r.autofocus&&!n&&V.input.focus(),w&&d<11&&setTimeout(function(){return R.display.input.reset(!0)},20),ql(this),Dl(),Xa(this),this.curOp.forceUpdate=!0,gs(this,A),r.autofocus&&!n||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&ti(R)},20):ai(this);for(var re in Xo)Xo.hasOwnProperty(re)&&Xo[re](this,r[re],oo);Ea(this),r.finishInit&&r.finishInit(this);for(var ie=0;ie<ds.length;++ie)ds[ie](this);Ei(this),o&&r.lineWrapping&&getComputedStyle(V.lineDiv).textRendering=="optimizelegibility"&&(V.lineDiv.style.textRendering="auto")}Qn.defaults=ol,Qn.optionHandlers=Xo;function ql(e){var r=e.display;Ce(r.scroller,"mousedown",sa(e,tl)),w&&d<11?Ce(r.scroller,"dblclick",sa(e,function(ce){if(et(e,ce))return;var ve=aa(e,ce);if(!ve||cs(e,ce)||Hr(e.display,ce))return;fe(ce);var Ie=e.findWordAt(ve);Uo(e.doc,Ie.anchor,Ie.head)})):Ce(r.scroller,"dblclick",function(ce){return et(e,ce)||fe(ce)}),Ce(r.scroller,"contextmenu",function(ce){return al(e,ce)}),Ce(r.input.getField(),"contextmenu",function(ce){r.scroller.contains(ce.target)||al(e,ce)});var R,A={end:0};function F(){r.activeTouch&&(R=setTimeout(function(){return r.activeTouch=null},1e3),A=r.activeTouch,A.end=+new Date)}function V(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 Ie=ve.left-ce.left,Be=ve.top-ce.top;return Ie*Ie+Be*Be>20*20}Ce(r.scroller,"touchstart",function(ce){if(!et(e,ce)&&!V(ce)&&!cs(e,ce)){r.input.ensurePolled(),clearTimeout(R);var ve=+new Date;r.activeTouch={start:ve,moved:!1,prev:ve-A.end<=300?A:null},ce.touches.length==1&&(r.activeTouch.left=ce.touches[0].pageX,r.activeTouch.top=ce.touches[0].pageY)}}),Ce(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Ce(r.scroller,"touchend",function(ce){var ve=r.activeTouch;if(ve&&!Hr(r,ce)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var Ie=e.coordsChar(r.activeTouch,"page"),Be;!ve.prev||re(ve,ve.prev)?Be=new An(Ie,Ie):!ve.prev.prev||re(ve,ve.prev.prev)?Be=e.findWordAt(Ie):Be=new An(St(Ie.line,0),cr(e.doc,St(Ie.line+1,0))),e.setSelection(Be.anchor,Be.head),e.focus(),fe(ce)}F()}),Ce(r.scroller,"touchcancel",F),Ce(r.scroller,"scroll",function(){r.scroller.clientHeight&&(oi(e,r.scroller.scrollTop),Ia(e,r.scroller.scrollLeft,!0),ze(e,"scroll",e))}),Ce(r.scroller,"mousewheel",function(ce){return mo(e,ce)}),Ce(r.scroller,"DOMMouseScroll",function(ce){return mo(e,ce)}),Ce(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(ce){et(e,ce)||Oe(ce)},over:function(ce){et(e,ce)||(Rl(e,ce),Oe(ce))},start:function(ce){return Al(e,ce)},drop:sa(e,Ol),leave:function(ce){et(e,ce)||Ws(e)}};var ie=r.input.getField();Ce(ie,"keyup",function(ce){return Zs.call(e,ce)}),Ce(ie,"keydown",sa(e,Qs)),Ce(ie,"keypress",sa(e,el)),Ce(ie,"focus",function(ce){return ti(e,ce)}),Ce(ie,"blur",function(ce){return ai(e,ce)})}var ds=[];Qn.defineInitHook=function(e){return ds.push(e)};function Do(e,r,R,A){var F=e.doc,V;R==null&&(R="add"),R=="smart"&&(F.mode.indent?V=ot(e,r).state:R="prev");var re=e.options.tabSize,ie=Yt(F,r),ce=G(ie.text,null,re);ie.stateAfter&&(ie.stateAfter=null);var ve=ie.text.match(/^\s*/)[0],Ie;if(!A&&!/\S/.test(ie.text))Ie=0,R="not";else if(R=="smart"&&(Ie=F.mode.indent(V,ie.text.slice(ve.length),ie.text),Ie==we||Ie>150)){if(!A)return;R="prev"}R=="prev"?r>F.first?Ie=G(Yt(F,r-1).text,null,re):Ie=0:R=="add"?Ie=ce+e.options.indentUnit:R=="subtract"?Ie=ce-e.options.indentUnit:typeof R=="number"&&(Ie=ce+R),Ie=Math.max(0,Ie);var Be="",qe=0;if(e.options.indentWithTabs)for(var Qe=Math.floor(Ie/re);Qe;--Qe)qe+=re,Be+=" ";if(qe<Ie&&(Be+=oe(Ie-qe)),Be!=ve)return ro(F,Be,St(r,0),St(r,ve.length),"+input"),ie.stateAfter=null,!0;for(var gt=0;gt<F.sel.ranges.length;gt++){var Rt=F.sel.ranges[gt];if(Rt.head.line==r&&Rt.head.ch<ve.length){var Ht=St(r,ve.length);as(F,gt,new An(Ht,Ht));break}}}var mi=null;function Vo(e){mi=e}function fs(e,r,R,A,F){var V=e.doc;e.display.shift=!1,A||(A=V.sel);var re=+new Date-200,ie=F=="paste"||e.state.pasteIncoming>re,ce=dr(r),ve=null;if(ie&&A.ranges.length>1)if(mi&&mi.text.join(`
|
|
|
`)==r){if(A.ranges.length%mi.text.length==0){ve=[];for(var Ie=0;Ie<mi.text.length;Ie++)ve.push(V.splitLines(mi.text[Ie]))}}else ce.length==A.ranges.length&&e.options.pasteLinesPerSelection&&(ve=le(ce,function(Jt){return[Jt]}));for(var Be=e.curOp.updateInput,qe=A.ranges.length-1;qe>=0;qe--){var Qe=A.ranges[qe],gt=Qe.from(),Rt=Qe.to();Qe.empty()&&(R&&R>0?gt=St(gt.line,gt.ch-R):e.state.overwrite&&!ie?Rt=St(Rt.line,Math.min(Yt(V,Rt.line).text.length,Rt.ch+te(ce).length)):ie&&mi&&mi.lineWise&&mi.text.join(`
|
|
|
`)==ce.join(`
|
|
|
`)&&(gt=Rt=St(gt.line,0)));var Ht={from:gt,to:Rt,text:ve?ve[qe%ve.length]:ce,origin:F||(ie?"paste":e.state.cutIncoming>re?"cut":"+input")};to(e.doc,Ht),zt(e,"inputRead",e,Ht)}r&&!ie&&ll(e,r),Ga(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Be),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,r){var R=e.clipboardData&&e.clipboardData.getData("Text");if(R)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Ua(r,function(){return fs(r,R,0,null,"paste")}),!0}function ll(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var R=e.doc.sel,A=R.ranges.length-1;A>=0;A--){var F=R.ranges[A];if(F.head.ch>100||A&&R.ranges[A-1].head.line==F.head.line)continue;var V=e.getModeAt(F.head),re=!1;if(V.electricChars){for(var ie=0;ie<V.electricChars.length;ie++)if(r.indexOf(V.electricChars.charAt(ie))>-1){re=Do(e,F.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(Yt(e.doc,F.head.line).text.slice(0,F.head.ch))&&(re=Do(e,F.head.line,"smart")));re&&zt(e,"electricInput",e,F.head.line)}}function ul(e){for(var r=[],R=[],A=0;A<e.doc.sel.ranges.length;A++){var F=e.doc.sel.ranges[A].head.line,V={anchor:St(F,0),head:St(F+1,0)};R.push(V),r.push(e.getRange(V.anchor,V.head))}return{text:r,ranges:R}}function cl(e,r,R,A){e.setAttribute("autocorrect",R?"":"off"),e.setAttribute("autocapitalize",A?"":"off"),e.setAttribute("spellcheck",!!r)}function dl(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return o?e.style.width="1000px":e.setAttribute("wrap","off"),v&&(e.style.border="1px solid black"),cl(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(A,F){var V=this.options,re=V[A];if(V[A]==F&&A!="mode")return;V[A]=F,r.hasOwnProperty(A)&&sa(this,r[A])(this,F,re),ze(this,"optionChange",this,A)},getOption:function(A){return this.options[A]},getDoc:function(){return this.doc},addKeyMap:function(A,F){this.state.keyMaps[F?"push":"unshift"](zo(A))},removeKeyMap:function(A){for(var F=this.state.keyMaps,V=0;V<F.length;++V)if(F[V]==A||F[V].name==A)return F.splice(V,1),!0},addOverlay:Pa(function(A,F){var V=A.token?A:e.getMode(this.options,A);if(V.startState)throw new Error("Overlays may not be stateful.");Y(this.state.overlays,{mode:V,modeSpec:A,opaque:F&&F.opaque,priority:F&&F.priority||0},function(re){return re.priority}),this.state.modeGen++,Cn(this)}),removeOverlay:Pa(function(A){for(var F=this.state.overlays,V=0;V<F.length;++V){var re=F[V].modeSpec;if(re==A||typeof A=="string"&&re.name==A){F.splice(V,1),this.state.modeGen++,Cn(this);return}}}),indentLine:Pa(function(A,F,V){typeof F!="string"&&typeof F!="number"&&(F==null?F=this.options.smartIndent?"smart":"prev":F=F?"add":"subtract"),da(this.doc,A)&&Do(this,A,F,V)}),indentSelection:Pa(function(A){for(var F=this.doc.sel.ranges,V=-1,re=0;re<F.length;re++){var ie=F[re];if(ie.empty())ie.head.line>V&&(Do(this,ie.head.line,A,!0),V=ie.head.line,re==this.doc.sel.primIndex&&Ga(this));else{var ce=ie.from(),ve=ie.to(),Ie=Math.max(V,ce.line);V=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var Be=Ie;Be<V;++Be)Do(this,Be,A);var qe=this.doc.sel.ranges;ce.ch==0&&F.length==qe.length&&qe[re].from().ch>0&&as(this.doc,re,new An(ce,qe[re].to()),Se)}}}),getTokenAt:function(A,F){return _n(this,A,F)},getLineTokens:function(A,F){return _n(this,St(A),F,!0)},getTokenTypeAt:function(A){A=cr(this.doc,A);var F=Er(this,Yt(this.doc,A.line)),V=0,re=(F.length-1)/2,ie=A.ch,ce;if(ie==0)ce=F[2];else for(;;){var ve=V+re>>1;if((ve?F[ve*2-1]:0)>=ie)re=ve;else if(F[ve*2+1]<ie)V=ve+1;else{ce=F[ve*2+2];break}}var Ie=ce?ce.indexOf("overlay "):-1;return Ie<0?ce:Ie==0?null:ce.slice(0,Ie-1)},getModeAt:function(A){var F=this.doc.mode;return F.innerMode?e.innerMode(F,this.getTokenAt(A).state).mode:F},getHelper:function(A,F){return this.getHelpers(A,F)[0]},getHelpers:function(A,F){var V=[];if(!R.hasOwnProperty(F))return V;var re=R[F],ie=this.getModeAt(A);if(typeof ie[F]=="string")re[ie[F]]&&V.push(re[ie[F]]);else if(ie[F])for(var ce=0;ce<ie[F].length;ce++){var ve=re[ie[F][ce]];ve&&V.push(ve)}else ie.helperType&&re[ie.helperType]?V.push(re[ie.helperType]):re[ie.name]&&V.push(re[ie.name]);for(var Ie=0;Ie<re._global.length;Ie++){var Be=re._global[Ie];Be.pred(ie,this)&&ae(V,Be.val)==-1&&V.push(Be.val)}return V},getStateAfter:function(A,F){var V=this.doc;return A=Yn(V,A==null?V.first+V.size-1:A),ot(this,A+1,F).state},cursorCoords:function(A,F){var V,re=this.doc.sel.primary();return A==null?V=re.head:typeof A=="object"?V=cr(this.doc,A):V=A?re.from():re.to(),en(this,V,F||"page")},charCoords:function(A,F){return En(this,cr(this.doc,A),F||"page")},coordsChar:function(A,F){return A=Qr(this,A,F||"page"),zr(this,A.left,A.top)},lineAtHeight:function(A,F){return A=Qr(this,{top:A,left:0},F||"page").top,Fn(this.doc,A+this.display.viewOffset)},heightAtLine:function(A,F,V){var re=!1,ie;if(typeof A=="number"){var ce=this.doc.first+this.doc.size-1;A<this.doc.first?A=this.doc.first:A>ce&&(A=ce,re=!0),ie=Yt(this.doc,A)}else ie=A;return nn(this,ie,{top:0,left:0},F||"page",V||re).top+(re?this.doc.height-jt(ie):0)},defaultTextHeight:function(){return Hn(this.display)},defaultCharWidth:function(){return oa(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,F,V,re,ie){var ce=this.display;A=en(this,cr(this.doc,A));var ve=A.bottom,Ie=A.left;if(F.style.position="absolute",F.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(F),ce.sizer.appendChild(F),re=="over")ve=A.top;else if(re=="above"||re=="near"){var Be=Math.max(ce.wrapper.clientHeight,this.doc.height),qe=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(re=="above"||A.bottom+F.offsetHeight>Be)&&A.top>F.offsetHeight?ve=A.top-F.offsetHeight:A.bottom+F.offsetHeight<=Be&&(ve=A.bottom),Ie+F.offsetWidth>qe&&(Ie=qe-F.offsetWidth)}F.style.top=ve+"px",F.style.left=F.style.right="",ie=="right"?(Ie=ce.sizer.clientWidth-F.offsetWidth,F.style.right="0px"):(ie=="left"?Ie=0:ie=="middle"&&(Ie=(ce.sizer.clientWidth-F.offsetWidth)/2),F.style.left=Ie+"px"),V&&Ni(this,{left:Ie,top:ve,right:Ie+F.offsetWidth,bottom:ve+F.offsetHeight})},triggerOnKeyDown:Pa(Qs),triggerOnKeyPress:Pa(el),triggerOnKeyUp:Zs,triggerOnMouseDown:Pa(tl),execCommand:function(A){if(Co.hasOwnProperty(A))return Co[A].call(null,this)},triggerElectric:Pa(function(A){ll(this,A)}),findPosH:function(A,F,V,re){var ie=1;F<0&&(ie=-1,F=-F);for(var ce=cr(this.doc,A),ve=0;ve<F&&!(ce=hs(this.doc,ce,ie,V,re),ce.hitSide);++ve);return ce},moveH:Pa(function(A,F){var V=this;this.extendSelectionsBy(function(re){return V.display.shift||V.doc.extend||re.empty()?hs(V.doc,re.head,A,F,V.options.rtlMoveVisually):A<0?re.from():re.to()},xe)}),deleteH:Pa(function(A,F){var V=this.doc.sel,re=this.doc;V.somethingSelected()?re.replaceSelection("",null,"+delete"):io(this,function(ie){var ce=hs(re,ie.head,A,F,!1);return A<0?{from:ce,to:ie.head}:{from:ie.head,to:ce}})}),findPosV:function(A,F,V,re){var ie=1,ce=re;F<0&&(ie=-1,F=-F);for(var ve=cr(this.doc,A),Ie=0;Ie<F;++Ie){var Be=en(this,ve,"div");if(ce==null?ce=Be.left:Be.left=ce,ve=fl(this,Be,ie,V),ve.hitSide)break}return ve},moveV:Pa(function(A,F){var V=this,re=this.doc,ie=[],ce=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(Ie){if(ce)return A<0?Ie.from():Ie.to();var Be=en(V,Ie.head,"div");Ie.goalColumn!=null&&(Be.left=Ie.goalColumn),ie.push(Be.left);var qe=fl(V,Be,A,F);return F=="page"&&Ie==re.sel.primary()&&Oi(V,En(V,qe,"div").top-Be.top),qe},xe),ie.length)for(var ve=0;ve<re.sel.ranges.length;ve++)re.sel.ranges[ve].goalColumn=ie[ve]}),findWordAt:function(A){var F=this.doc,V=Yt(F,A.line).text,re=A.ch,ie=A.ch;if(V){var ce=this.getHelper(A,"wordChars");(A.sticky=="before"||ie==V.length)&&re?--re:++ie;for(var ve=V.charAt(re),Ie=X(ve,ce)?function(Be){return X(Be,ce)}:/\s/.test(ve)?function(Be){return/\s/.test(Be)}:function(Be){return!/\s/.test(Be)&&!X(Be)};re>0&&Ie(V.charAt(re-1));)--re;for(;ie<V.length&&Ie(V.charAt(ie));)++ie}return new An(St(A.line,re),St(A.line,ie))},toggleOverwrite:function(A){if(A!=null&&A==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?H(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),ze(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==K()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Pa(function(A,F){ii(this,A,F)}),getScrollInfo:function(){var A=this.display.scroller;return{left:A.scrollLeft,top:A.scrollTop,height:A.scrollHeight-Ke(this)-this.display.barHeight,width:A.scrollWidth-Ke(this)-this.display.barWidth,clientHeight:pe(this),clientWidth:Pe(this)}},scrollIntoView:Pa(function(A,F){A==null?(A={from:this.doc.sel.primary().head,to:null},F==null&&(F=this.options.cursorScrollMargin)):typeof A=="number"?A={from:St(A,0),to:null}:A.from==null&&(A={from:A,to:null}),A.to||(A.to=A.from),A.margin=F||0,A.from.line!=null?fo(this,A):Ai(this,A.from,A.to,A.margin)}),setSize:Pa(function(A,F){var V=this,re=function(ce){return typeof ce=="number"||/^\d+$/.test(String(ce))?ce+"px":ce};A!=null&&(this.display.wrapper.style.width=re(A)),F!=null&&(this.display.wrapper.style.height=re(F)),this.options.lineWrapping&&Ir(this);var ie=this.display.viewFrom;this.doc.iter(ie,this.display.viewTo,function(ce){if(ce.widgets){for(var ve=0;ve<ce.widgets.length;ve++)if(ce.widgets[ve].noHScroll){Xn(V,ie,"widget");break}}++ie}),this.curOp.forceUpdate=!0,ze(this,"refresh",this)}),operation:function(A){return Ua(this,A)},startOperation:function(){return Xa(this)},endOperation:function(){return Ei(this)},refresh:Pa(function(){var A=this.display.cachedTextHeight;Cn(this),this.curOp.forceUpdate=!0,Fr(this),ii(this,this.doc.scrollLeft,this.doc.scrollTop),Ji(this.display),(A==null||Math.abs(A-Hn(this.display))>.5||this.options.lineWrapping)&&Ra(this),ze(this,"refresh",this)}),swapDoc:Pa(function(A){var F=this.doc;return F.cm=null,this.state.selectingText&&this.state.selectingText(),gs(this,A),Fr(this),this.display.input.reset(),ii(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,zt(this,"swapDoc",this,F),F}),phrase:function(A){var F=this.options.phrases;return F&&Object.prototype.hasOwnProperty.call(F,A)?F[A]:A},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}},Te(e),e.registerHelper=function(A,F,V){R.hasOwnProperty(A)||(R[A]=e[A]={_global:[]}),R[A][F]=V},e.registerGlobalHelper=function(A,F,V,re){e.registerHelper(A,F,re),R[A]._global.push({pred:V,val:re})}}function hs(e,r,R,A,F){var V=r,re=R,ie=Yt(e,r.line),ce=F&&e.direction=="rtl"?-R:R;function ve(){var or=r.line+ce;return or<e.first||or>=e.first+e.size?!1:(r=new St(or,r.ch,r.sticky),ie=Yt(e,or))}function Ie(or){var Qt;if(A=="codepoint"){var mr=ie.text.charCodeAt(r.ch+(A>0?0:-1));isNaN(mr)?Qt=null:Qt=new St(r.line,Math.max(0,Math.min(ie.text.length,r.ch+R*(mr>=55296&&mr<56320?2:1))),-R)}else F?Qt=Il(e.cm,ie,r,R):Qt=os(ie,r,R);if(Qt==null)if(!or&&ve())r=ss(F,e.cm,ie,r.line,ce);else return!1;else r=Qt;return!0}if(A=="char"||A=="codepoint")Ie();else if(A=="column")Ie(!0);else if(A=="word"||A=="group")for(var Be=null,qe=A=="group",Qe=e.cm&&e.cm.getHelper(r,"wordChars"),gt=!0;!(R<0&&!Ie(!gt));gt=!1){var Rt=ie.text.charAt(r.ch)||`
|
|
|
`,Ht=X(Rt,Qe)?"w":qe&&Rt==`
|
|
|
`?"n":!qe||/\s/.test(Rt)?null:"p";if(qe&&!gt&&!Ht&&(Ht="s"),Be&&Be!=Ht){R<0&&(R=1,Ie(),r.sticky="after");break}if(Ht&&(Be=Ht),R>0&&!Ie(!gt))break}var Jt=Wo(e,r,V,re,!0);return $n(V,Jt)&&(Jt.hitSide=!0),Jt}function fl(e,r,R,A){var F=e.doc,V=r.left,re;if(A=="page"){var ie=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ce=Math.max(ie-.5*Hn(e.display),3);re=(R>0?r.bottom:r.top)+R*ce}else A=="line"&&(re=R>0?r.bottom+3:r.top-3);for(var ve;!(ve=zr(e,V,re),!ve.outside);){if(R<0?re<=0:re>=F.height){ve.hitSide=!0;break}re+=R*5}return ve}var jn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};jn.prototype.init=function(e){var r=this,R=this,A=R.cm,F=R.div=e.lineDiv;cl(F,A.options.spellcheck,A.options.autocorrect,A.options.autocapitalize);function V(ie){for(var ce=ie.target;ce;ce=ce.parentNode){if(ce==F)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ce.className))break}return!1}Ce(F,"paste",function(ie){if(!V(ie)||et(A,ie)||sl(ie,A))return;d<=11&&setTimeout(sa(A,function(){return r.updateFromDOM()}),20)}),Ce(F,"compositionstart",function(ie){r.composing={data:ie.data,done:!1}}),Ce(F,"compositionupdate",function(ie){r.composing||(r.composing={data:ie.data,done:!1})}),Ce(F,"compositionend",function(ie){r.composing&&(ie.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Ce(F,"touchstart",function(){return R.forceCompositionEnd()}),Ce(F,"input",function(){r.composing||r.readFromDOMSoon()});function re(ie){if(!V(ie)||et(A,ie))return;if(A.somethingSelected())Vo({lineWise:!1,text:A.getSelections()}),ie.type=="cut"&&A.replaceSelection("",null,"cut");else if(A.options.lineWiseCopyCut){var ce=ul(A);Vo({lineWise:!0,text:ce.text}),ie.type=="cut"&&A.operation(function(){A.setSelections(ce.ranges,0,Se),A.replaceSelection("",null,"cut")})}else return;if(ie.clipboardData){ie.clipboardData.clearData();var ve=mi.text.join(`
|
|
|
`);if(ie.clipboardData.setData("Text",ve),ie.clipboardData.getData("Text")==ve){ie.preventDefault();return}}var Ie=dl(),Be=Ie.firstChild;A.display.lineSpace.insertBefore(Ie,A.display.lineSpace.firstChild),Be.value=mi.text.join(`
|
|
|
`);var qe=document.activeElement;z(Be),setTimeout(function(){A.display.lineSpace.removeChild(Ie),qe.focus(),qe==F&&R.showPrimarySelection()},50)}Ce(F,"copy",re),Ce(F,"cut",re)},jn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},jn.prototype.prepareSelection=function(){var e=tn(this.cm,!1);return e.focus=document.activeElement==this.div,e},jn.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},jn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},jn.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,R=r.doc.sel.primary(),A=R.from(),F=R.to();if(r.display.viewTo==r.display.viewFrom||A.line>=r.display.viewTo||F.line<r.display.viewFrom){e.removeAllRanges();return}var V=$o(r,e.anchorNode,e.anchorOffset),re=$o(r,e.focusNode,e.focusOffset);if(V&&!V.bad&&re&&!re.bad&&ir(ga(V,re),A)==0&&ir(It(V,re),F)==0)return;var ie=r.display.view,ce=A.line>=r.display.viewFrom&&hl(r,A)||{node:ie[0].measure.map[2],offset:0},ve=F.line<r.display.viewTo&&hl(r,F);if(!ve){var Ie=ie[ie.length-1].measure,Be=Ie.maps?Ie.maps[Ie.maps.length-1]:Ie.map;ve={node:Be[Be.length-1],offset:Be[Be.length-2]-Be[Be.length-3]}}if(!ce||!ve){e.removeAllRanges();return}var qe=e.rangeCount&&e.getRangeAt(0),Qe;try{Qe=N(ce.node,ce.offset,ve.offset,ve.node)}catch(gt){}Qe&&(!C&&r.state.focused?(e.collapse(ce.node,ce.offset),Qe.collapsed||(e.removeAllRanges(),e.addRange(Qe))):(e.removeAllRanges(),e.addRange(Qe)),qe&&e.anchorNode==null?e.addRange(qe):C&&this.startGracePeriod()),this.rememberSelection()},jn.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)},jn.prototype.showMultipleSelections=function(e){p(this.cm.display.cursorDiv,e.cursors),p(this.cm.display.selectionDiv,e.selection)},jn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},jn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return I(this.div,r)},jn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},jn.prototype.blur=function(){this.div.blur()},jn.prototype.getField=function(){return this.div},jn.prototype.supportsTouch=function(){return!0},jn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Ua(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)},jn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},jn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(x&&a&&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=$o(r,e.anchorNode,e.anchorOffset),A=$o(r,e.focusNode,e.focusOffset);R&&A&&Ua(r,function(){Na(r.doc,hi(R,A),Se),(R.bad||A.bad)&&(r.curOp.selectionChanged=!0)})},jn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,R=e.doc.sel.primary(),A=R.from(),F=R.to();if(A.ch==0&&A.line>e.firstLine()&&(A=St(A.line-1,Yt(e.doc,A.line-1).length)),F.ch==Yt(e.doc,F.line).text.length&&F.line<e.lastLine()&&(F=St(F.line+1,0)),A.line<r.viewFrom||F.line>r.viewTo-1)return!1;var V,re,ie;A.line==r.viewFrom||(V=In(e,A.line))==0?(re=Xr(r.view[0].line),ie=r.view[0].node):(re=Xr(r.view[V].line),ie=r.view[V-1].node.nextSibling);var ce=In(e,F.line),ve,Ie;if(ce==r.view.length-1?(ve=r.viewTo-1,Ie=r.lineDiv.lastChild):(ve=Xr(r.view[ce+1].line)-1,Ie=r.view[ce+1].node.previousSibling),!ie)return!1;for(var Be=e.doc.splitLines(ru(e,ie,Ie,re,ve)),qe=kn(e.doc,St(re,0),St(ve,Yt(e.doc,ve).text.length));Be.length>1&&qe.length>1;)if(te(Be)==te(qe))Be.pop(),qe.pop(),ve--;else if(Be[0]==qe[0])Be.shift(),qe.shift(),re++;else break;for(var Qe=0,gt=0,Rt=Be[0],Ht=qe[0],Jt=Math.min(Rt.length,Ht.length);Qe<Jt&&Rt.charCodeAt(Qe)==Ht.charCodeAt(Qe);)++Qe;for(var or=te(Be),Qt=te(qe),mr=Math.min(or.length-(Be.length==1?Qe:0),Qt.length-(qe.length==1?Qe:0));gt<mr&&or.charCodeAt(or.length-gt-1)==Qt.charCodeAt(Qt.length-gt-1);)++gt;if(Be.length==1&&qe.length==1&&re==A.line)for(;Qe&&Qe>A.ch&&or.charCodeAt(or.length-gt-1)==Qt.charCodeAt(Qt.length-gt-1);)Qe--,gt++;Be[Be.length-1]=or.slice(0,or.length-gt).replace(/^\u200b+/,""),Be[0]=Be[0].slice(Qe).replace(/\u200b+$/,"");var Nr=St(re,Qe),Dr=St(ve,qe.length?te(qe).length-gt:0);if(Be.length>1||Be[0]||ir(Nr,Dr))return ro(e.doc,Be,Nr,Dr,"+input"),!0},jn.prototype.ensurePolled=function(){this.forceCompositionEnd()},jn.prototype.reset=function(){this.forceCompositionEnd()},jn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},jn.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)},jn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ua(this.cm,function(){return Cn(e.cm)})},jn.prototype.setUneditable=function(e){e.contentEditable="false"},jn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||sa(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},jn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},jn.prototype.onContextMenu=function(){},jn.prototype.resetPosition=function(){},jn.prototype.needsContentAttribute=!0;function hl(e,r){var R=Ue(e,r.line);if(!R||R.hidden)return null;var A=Yt(e.doc,r.line),F=be(R,A,r.line),V=it(A,e.doc.direction),re="left";if(V){var ie=tt(V,r.ch);re=ie%2?"right":"left"}var ce=bt(F.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 so(e,r){return r&&(e.bad=!0),e}function ru(e,r,R,A,F){var V="",re=!1,ie=e.doc.lineSeparator(),ce=!1;function ve(Qe){return function(gt){return gt.id==Qe}}function Ie(){re&&(V+=ie,ce&&(V+=ie),re=ce=!1)}function Be(Qe){Qe&&(Ie(),V+=Qe)}function qe(Qe){if(Qe.nodeType==1){var gt=Qe.getAttribute("cm-text");if(gt){Be(gt);return}var Rt=Qe.getAttribute("cm-marker"),Ht;if(Rt){var Jt=e.findMarks(St(A,0),St(F+1,0),ve(+Rt));Jt.length&&(Ht=Jt[0].find(0))&&Be(kn(e.doc,Ht.from,Ht.to).join(ie));return}if(Qe.getAttribute("contenteditable")=="false")return;var or=/^(pre|div|p|li|table|br)$/i.test(Qe.nodeName);if(!/^br$/i.test(Qe.nodeName)&&Qe.textContent.length==0)return;or&&Ie();for(var Qt=0;Qt<Qe.childNodes.length;Qt++)qe(Qe.childNodes[Qt]);/^(pre|p)$/i.test(Qe.nodeName)&&(ce=!0),or&&(re=!0)}else Qe.nodeType==3&&Be(Qe.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(qe(r),r==R);)r=r.nextSibling,ce=!1;return V}function $o(e,r,R){var A;if(r==e.display.lineDiv){if(A=e.display.lineDiv.childNodes[R],!A)return so(e.clipPos(St(e.display.viewTo-1)),!0);r=null,R=0}else for(A=r;;A=A.parentNode){if(!A||A==e.display.lineDiv)return null;if(A.parentNode&&A.parentNode==e.display.lineDiv)break}for(var F=0;F<e.display.view.length;F++){var V=e.display.view[F];if(V.node==A)return nu(V,r,R)}}function nu(e,r,R){var A=e.text.firstChild,F=!1;if(!r||!I(A,r))return so(St(Xr(e.line),0),!0);if(r==A&&(F=!0,r=A.childNodes[R],R=0,!r)){var V=e.rest?te(e.rest):e.line;return so(St(Xr(V),V.text.length),F)}var re=r.nodeType==3?r:null,ie=r;for(!re&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(re=r.firstChild,R&&(R=re.nodeValue.length));ie.parentNode!=A;)ie=ie.parentNode;var ce=e.measure,ve=ce.maps;function Ie(Ht,Jt,or){for(var Qt=-1;Qt<(ve?ve.length:0);Qt++)for(var mr=Qt<0?ce.map:ve[Qt],Nr=0;Nr<mr.length;Nr+=3){var Dr=mr[Nr+2];if(Dr==Ht||Dr==Jt){var sn=Xr(Qt<0?e.line:e.rest[Qt]),zn=mr[Nr]+or;return(or<0||Dr!=Ht)&&(zn=mr[Nr+(or?1:0)]),St(sn,zn)}}}var Be=Ie(re,ie,R);if(Be)return so(Be,F);for(var qe=ie.nextSibling,Qe=re?re.nodeValue.length-R:0;qe;qe=qe.nextSibling){if(Be=Ie(qe,qe.firstChild,0),Be)return so(St(Be.line,Be.ch-Qe),F);Qe+=qe.textContent.length}for(var gt=ie.previousSibling,Rt=R;gt;gt=gt.previousSibling){if(Be=Ie(gt,gt.firstChild,-1),Be)return so(St(Be.line,Be.ch+Rt),F);Rt+=gt.textContent.length}}var ua=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new q,this.hasSelection=!1,this.composing=null};ua.prototype.init=function(e){var r=this,R=this,A=this.cm;this.createField(e);var F=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(F.style.width="0px"),Ce(F,"input",function(){w&&d>=9&&r.hasSelection&&(r.hasSelection=null),R.poll()}),Ce(F,"paste",function(re){if(et(A,re)||sl(re,A))return;A.state.pasteIncoming=+new Date,R.fastPoll()});function V(re){if(et(A,re))return;if(A.somethingSelected())Vo({lineWise:!1,text:A.getSelections()});else if(A.options.lineWiseCopyCut){var ie=ul(A);Vo({lineWise:!0,text:ie.text}),re.type=="cut"?A.setSelections(ie.ranges,null,Se):(R.prevInput="",F.value=ie.text.join(`
|
|
|
`),z(F))}else return;re.type=="cut"&&(A.state.cutIncoming=+new Date)}Ce(F,"cut",V),Ce(F,"copy",V),Ce(e.scroller,"paste",function(re){if(Hr(e,re)||et(A,re))return;if(!F.dispatchEvent){A.state.pasteIncoming=+new Date,R.focus();return}var ie=new Event("paste");ie.clipboardData=re.clipboardData,F.dispatchEvent(ie)}),Ce(e.lineSpace,"selectstart",function(re){Hr(e,re)||fe(re)}),Ce(F,"compositionstart",function(){var re=A.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:re,range:A.markText(re,A.getCursor("to"),{className:"CodeMirror-composing"})}}),Ce(F,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},ua.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},ua.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ua.prototype.prepareSelection=function(){var e=this.cm,r=e.display,R=e.doc,A=tn(e);if(e.options.moveInputWithCursor){var F=en(e,R.sel.primary().head,"div"),V=r.wrapper.getBoundingClientRect(),re=r.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,F.top+re.top-V.top)),A.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,F.left+re.left-V.left))}return A},ua.prototype.showSelection=function(e){var r=this.cm,R=r.display;p(R.cursorDiv,e.cursors),p(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ua.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&&z(this.textarea),w&&d>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",w&&d>=9&&(this.hasSelection=null))},ua.prototype.getField=function(){return this.textarea},ua.prototype.supportsTouch=function(){return!1},ua.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||K()!=this.textarea))try{this.textarea.focus()}catch(e){}},ua.prototype.blur=function(){this.textarea.blur()},ua.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ua.prototype.receivedFocus=function(){this.slowPoll()},ua.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()})},ua.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function R(){var A=r.poll();!A&&!e?(e=!0,r.polling.set(60,R)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,R)},ua.prototype.poll=function(){var e=this,r=this.cm,R=this.textarea,A=this.prevInput;if(this.contextMenuPending||!r.state.focused||Tt(R)&&!A&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var F=R.value;if(F==A&&!r.somethingSelected())return!1;if(w&&d>=9&&this.hasSelection===F||i&&/[\uf700-\uf7ff]/.test(F))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var V=F.charCodeAt(0);if(V==8203&&!A&&(A="\u200B"),V==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,ie=Math.min(A.length,F.length);re<ie&&A.charCodeAt(re)==F.charCodeAt(re);)++re;return Ua(r,function(){fs(r,F.slice(re),A.length-re,null,e.composing?"*compose":null),F.length>1e3||F.indexOf(`
|
|
|
`)>-1?R.value=e.prevInput="":e.prevInput=F,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ua.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ua.prototype.onKeyPress=function(){w&&d>=9&&(this.hasSelection=null),this.fastPoll()},ua.prototype.onContextMenu=function(e){var r=this,R=r.cm,A=R.display,F=r.textarea;r.contextMenuPending&&r.contextMenuPending();var V=aa(R,e),re=A.scroller.scrollTop;if(!V||_)return;var ie=R.options.resetSelectionOnContextMenu;ie&&R.doc.sel.contains(V)==-1&&sa(R,Na)(R.doc,hi(V),Se);var ce=F.style.cssText,ve=r.wrapper.style.cssText,Ie=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",F.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-Ie.top-5)+"px; left: "+(e.clientX-Ie.left-5)+`px;
|
|
|
z-index: 1000; background: `+(w?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Be;o&&(Be=window.scrollY),A.input.focus(),o&&window.scrollTo(null,Be),A.input.reset(),R.somethingSelected()||(F.value=r.prevInput=" "),r.contextMenuPending=Qe,A.selForContextMenu=R.doc.sel,clearTimeout(A.detectingSelectAll);function qe(){if(F.selectionStart!=null){var Rt=R.somethingSelected(),Ht="\u200B"+(Rt?F.value:"");F.value="\u21DA",F.value=Ht,r.prevInput=Rt?"":"\u200B",F.selectionStart=1,F.selectionEnd=Ht.length,A.selForContextMenu=R.doc.sel}}function Qe(){if(r.contextMenuPending!=Qe)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=ve,F.style.cssText=ce,w&&d<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=re),F.selectionStart!=null){(!w||w&&d<9)&&qe();var Rt=0,Ht=function(){A.selForContextMenu==R.doc.sel&&F.selectionStart==0&&F.selectionEnd>0&&r.prevInput=="\u200B"?sa(R,Ds)(R):Rt++<10?A.detectingSelectAll=setTimeout(Ht,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(Ht,200)}}if(w&&d>=9&&qe(),P){Oe(e);var gt=function(){rt(window,"mouseup",gt),setTimeout(Qe,20)};Ce(window,"mouseup",gt)}else setTimeout(Qe,50)},ua.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ua.prototype.setUneditable=function(){},ua.prototype.needsContentAttribute=!1;function au(e,r){if(r=r?B(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=K();r.autofocus=R==e||e.getAttribute("autofocus")!=null&&R==document.body}function A(){e.value=ie.getValue()}var F;if(e.form&&(Ce(e.form,"submit",A),!r.leaveSubmitMethodAlone)){var V=e.form;F=V.submit;try{var re=V.submit=function(){A(),V.submit=F,V.submit(),V.submit=re}}catch(ce){}}r.finishInit=function(ce){ce.save=A,ce.getTextArea=function(){return e},ce.toTextArea=function(){ce.toTextArea=isNaN,A(),e.parentNode.removeChild(ce.getWrapperElement()),e.style.display="",e.form&&(rt(e.form,"submit",A),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=F))}},e.style.display="none";var ie=Qn(function(ce){return e.parentNode.insertBefore(ce,e.nextSibling)},r);return ie}function iu(e){e.off=rt,e.on=Ce,e.wheelEventPixels=po,e.Doc=Va,e.splitLines=dr,e.countColumn=G,e.findColumn=he,e.isWordChar=$,e.Pass=we,e.signal=ze,e.Line=qt,e.changeEnd=pi,e.scrollbarModel=rr,e.Pos=St,e.cmpPos=ir,e.modes=ln,e.mimeModes=br,e.resolveMode=Pr,e.getMode=fn,e.modeExtensions=bn,e.extendMode=Gn,e.copyState=hn,e.startState=wa,e.innerMode=ca,e.commands=Co,e.keyMap=Pi,e.keyName=Xs,e.isModifierKey=zs,e.lookupKey=ao,e.normalizeKeyMap=kl,e.StringStream=mn,e.SharedTextMarker=wo,e.TextMarker=Bi,e.LineWidget=_o,e.e_preventDefault=fe,e.e_stopPropagation=ye,e.e_stop=Oe,e.addClass=H,e.contains=I,e.rmClass=b,e.keyNames=Wi}Jl(Qn),eu(Qn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Yo in Va.prototype)Va.prototype.hasOwnProperty(Yo)&&ae(ou,Yo)<0&&(Qn.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Va.prototype[Yo]));return Te(Va),Qn.inputStyles={textarea:ua,contenteditable:jn},Qn.defineMode=function(e){!Qn.defaults.mode&&e!="null"&&(Qn.defaults.mode=e),Zr.apply(this,arguments)},Qn.defineMIME=qr,Qn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Qn.defineMIME("text/plain","null"),Qn.defineExtension=function(e,r){Qn.prototype[e]=r},Qn.defineDocExtension=function(e,r){Va.prototype[e]=r},Qn.fromTextArea=au,iu(Qn),Qn.version="5.58.2",Qn})},WYAk:function(j,Q,k){(function(L,h){j.exports=Q=h(k("Ib8C"))})(this,function(L){(function(){var h=L,C=h.lib,D=C.Base,u=h.enc,f=u.Utf8,w=h.algo,d=w.HMAC=D.extend({init:function(o,l){o=this._hasher=new o.init,typeof l=="string"&&(l=f.parse(l));var a=o.blockSize,_=a*4;l.sigBytes>_&&(l=o.finalize(l)),l.clamp();for(var m=this._oKey=l.clone(),c=this._iKey=l.clone(),g=m.words,v=c.words,x=0;x<a;x++)g[x]^=1549556828,v[x]^=909522486;m.sigBytes=c.sigBytes=_,this.reset()},reset:function(){var o=this._hasher;o.reset(),o.update(this._iKey)},update:function(o){return this._hasher.update(o),this},finalize:function(o){var l=this._hasher,a=l.finalize(o);l.reset();var _=l.finalize(this._oKey.clone().concat(a));return _}})})()})},WaYH:function(j,Q,k){"use strict";var L=k("rePB"),h=k("Ff2n"),C=k("VTBJ"),D=k("1OyB"),u=k("vuIU"),f=k("JX7q"),w=k("Ji7U"),d=k("LK+K"),o=k("q1tI"),l=k("TSYQ"),a=k.n(l),_=k("sboe"),m=k("OZM5"),c=function(P){var O=P.prefixCls,b=P.level,y=P.isStart,p=P.isEnd;if(!b)return null;for(var T="".concat(O,"-indent-unit"),M=[],N=0;N<b;N+=1){var I;M.push(o.createElement("span",{key:N,className:a()(T,(I={},Object(L.a)(I,"".concat(T,"-start"),y[N+1]),Object(L.a)(I,"".concat(T,"-end"),p[N+1]),Object(L.a)(I,"".concat(T,"-end-first-level"),!N&&p[0]),I))}))}return o.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},M)},g=c,v=k("815F"),x="open",n="close",i="---",t=function(s){Object(w.a)(O,s);var P=Object(d.a)(O);function O(){var b;return Object(D.a)(this,O),b=P.apply(this,arguments),b.state={dragNodeHighlight:!1},b.onSelectorClick=function(y){var p=b.props.context.onNodeClick;p(y,Object(v.b)(b.props)),b.isSelectable()?b.onSelect(y):b.onCheck(y)},b.onSelectorDoubleClick=function(y){var p=b.props.context.onNodeDoubleClick;p(y,Object(v.b)(b.props))},b.onSelect=function(y){if(b.isDisabled())return;var p=b.props.context.onNodeSelect;y.preventDefault(),p(y,Object(v.b)(b.props))},b.onCheck=function(y){if(b.isDisabled())return;var p=b.props,T=p.disableCheckbox,M=p.checked,N=b.props.context.onNodeCheck;if(!b.isCheckable()||T)return;y.preventDefault();var I=!M;N(y,Object(v.b)(b.props),I)},b.onMouseEnter=function(y){var p=b.props.context.onNodeMouseEnter;p(y,Object(v.b)(b.props))},b.onMouseLeave=function(y){var p=b.props.context.onNodeMouseLeave;p(y,Object(v.b)(b.props))},b.onContextMenu=function(y){var p=b.props.context.onNodeContextMenu;p(y,Object(v.b)(b.props))},b.onDragStart=function(y){var p=b.props.context.onNodeDragStart;y.stopPropagation(),b.setState({dragNodeHighlight:!0}),p(y,Object(f.a)(b));try{y.dataTransfer.setData("text/plain","")}catch(T){}},b.onDragEnter=function(y){var p=b.props.context.onNodeDragEnter;y.preventDefault(),y.stopPropagation(),p(y,Object(f.a)(b))},b.onDragOver=function(y){var p=b.props.context.onNodeDragOver;y.preventDefault(),y.stopPropagation(),p(y,Object(f.a)(b))},b.onDragLeave=function(y){var p=b.props.context.onNodeDragLeave;y.stopPropagation(),p(y,Object(f.a)(b))},b.onDragEnd=function(y){var p=b.props.context.onNodeDragEnd;y.stopPropagation(),b.setState({dragNodeHighlight:!1}),p(y,Object(f.a)(b))},b.onDrop=function(y){var p=b.props.context.onNodeDrop;y.preventDefault(),y.stopPropagation(),b.setState({dragNodeHighlight:!1}),p(y,Object(f.a)(b))},b.onExpand=function(y){var p=b.props.context.onNodeExpand;p(y,Object(v.b)(b.props))},b.setSelectHandle=function(y){b.selectHandle=y},b.getNodeState=function(){var y=b.props.expanded;return b.isLeaf()?null:y?x:n},b.hasChildren=function(){var y=b.props.eventKey,p=b.props.context.keyEntities,T=p[y]||{},M=T.children;return!!(M||[]).length},b.isLeaf=function(){var y=b.props,p=y.isLeaf,T=y.loaded,M=b.props.context.loadData,N=b.hasChildren();return p===!1?!1:p||!M&&!N||M&&T&&!N},b.isDisabled=function(){var y=b.props.disabled,p=b.props.context.disabled;return!!(p||y)},b.isCheckable=function(){var y=b.props.checkable,p=b.props.context.checkable;return!p||y===!1?!1:p},b.syncLoadData=function(y){var p=y.expanded,T=y.loading,M=y.loaded,N=b.props.context,I=N.loadData,K=N.onNodeLoad;if(T)return;I&&p&&!b.isLeaf()&&(!b.hasChildren()&&!M&&K(Object(v.b)(b.props)))},b.renderSwitcher=function(){var y=b.props,p=y.expanded,T=y.switcherIcon,M=b.props.context,N=M.prefixCls,I=M.switcherIcon,K=T||I;if(b.isLeaf())return o.createElement("span",{className:a()("".concat(N,"-switcher"),"".concat(N,"-switcher-noop"))},typeof K=="function"?K(Object(C.a)(Object(C.a)({},b.props),{},{isLeaf:!0})):K);var H=a()("".concat(N,"-switcher"),"".concat(N,"-switcher_").concat(p?x:n));return o.createElement("span",{onClick:b.onExpand,className:H},typeof K=="function"?K(Object(C.a)(Object(C.a)({},b.props),{},{isLeaf:!1})):K)},b.renderCheckbox=function(){var y=b.props,p=y.checked,T=y.halfChecked,M=y.disableCheckbox,N=b.props.context.prefixCls,I=b.isDisabled(),K=b.isCheckable();if(!K)return null;var H=typeof K!="boolean"?K:null;return o.createElement("span",{className:a()("".concat(N,"-checkbox"),p&&"".concat(N,"-checkbox-checked"),!p&&T&&"".concat(N,"-checkbox-indeterminate"),(I||M)&&"".concat(N,"-checkbox-disabled")),onClick:b.onCheck},H)},b.renderIcon=function(){var y=b.props.loading,p=b.props.context.prefixCls;return o.createElement("span",{className:a()("".concat(p,"-iconEle"),"".concat(p,"-icon__").concat(b.getNodeState()||"docu"),y&&"".concat(p,"-icon_loading"))})},b.renderSelector=function(){var y=b.state.dragNodeHighlight,p=b.props,T=p.title,M=p.selected,N=p.icon,I=p.loading,K=p.data,H=b.props.context,W=H.prefixCls,z=H.showIcon,U=H.icon,B=H.draggable,G=H.loadData,q=H.titleRender,ae=b.isDisabled(),se="".concat(W,"-node-content-wrapper"),we;if(z){var Se=N||U;we=Se?o.createElement("span",{className:a()("".concat(W,"-iconEle"),"".concat(W,"-icon__customize"))},typeof Se=="function"?Se(b.props):Se):b.renderIcon()}else G&&I&&(we=b.renderIcon());var de;typeof T=="function"?de=T(K):q?de=q(K):de=T;var xe=o.createElement("span",{className:"".concat(W,"-title")},de);return o.createElement("span",{ref:b.setSelectHandle,title:typeof T=="string"?T:"",className:a()("".concat(se),"".concat(se,"-").concat(b.getNodeState()||"normal"),!ae&&(M||y)&&"".concat(W,"-node-selected"),!ae&&B&&"draggable"),draggable:!ae&&B||void 0,"aria-grabbed":!ae&&B||void 0,onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,onContextMenu:b.onContextMenu,onClick:b.onSelectorClick,onDoubleClick:b.onSelectorDoubleClick,onDragStart:B?b.onDragStart:void 0},we,xe)},b}return Object(u.a)(O,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var y=this.props.selectable,p=this.props.context.selectable;return typeof y=="boolean"?y:p}},{key:"render",value:function(){var y,p=this.props,T=p.eventKey,M=p.className,N=p.style,I=p.dragOver,K=p.dragOverGapTop,H=p.dragOverGapBottom,W=p.isLeaf,z=p.isStart,U=p.isEnd,B=p.expanded,G=p.selected,q=p.checked,ae=p.halfChecked,se=p.loading,we=p.domRef,Se=p.active,de=p.onMouseMove,xe=Object(h.a)(p,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),he=this.props.context,ne=he.prefixCls,oe=he.filterTreeNode,te=he.draggable,le=he.keyEntities,Y=this.isDisabled(),Z=Object(m.f)(xe),ge=le[T]||{},ee=ge.level,$=U[U.length-1];return o.createElement("div",Object.assign({ref:we,className:a()(M,"".concat(ne,"-treenode"),(y={},Object(L.a)(y,"".concat(ne,"-treenode-disabled"),Y),Object(L.a)(y,"".concat(ne,"-treenode-switcher-").concat(B?"open":"close"),!W),Object(L.a)(y,"".concat(ne,"-treenode-checkbox-checked"),q),Object(L.a)(y,"".concat(ne,"-treenode-checkbox-indeterminate"),ae),Object(L.a)(y,"".concat(ne,"-treenode-selected"),G),Object(L.a)(y,"".concat(ne,"-treenode-loading"),se),Object(L.a)(y,"".concat(ne,"-treenode-active"),Se),Object(L.a)(y,"".concat(ne,"-treenode-leaf-last"),$),Object(L.a)(y,"drag-over",!Y&&I),Object(L.a)(y,"drag-over-gap-top",!Y&&K),Object(L.a)(y,"drag-over-gap-bottom",!Y&&H),Object(L.a)(y,"filter-node",oe&&oe(Object(v.b)(this.props))),y)),style:N,onDragEnter:te?this.onDragEnter:void 0,onDragOver:te?this.onDragOver:void 0,onDragLeave:te?this.onDragLeave:void 0,onDrop:te?this.onDrop:void 0,onDragEnd:te?this.onDragEnd:void 0,onMouseMove:de},Z),o.createElement(g,{prefixCls:ne,level:ee,isStart:z,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(o.Component),S=function(P){return o.createElement(_.a.Consumer,null,function(O){return o.createElement(t,Object.assign({},P,{context:O}))})};S.displayName="TreeNode",S.defaultProps={title:i},S.isTreeNode=1;var E=Q.a=S},WdTA:function(j,Q,k){j.exports=k.p+"static/studnetqun.598eeb43.png"},Y1PL:function(j,Q,k){"use strict";k.r(Q),k.d(Q,"ResizableTextArea",function(){return ae});var L=k("wx14"),h=k("1OyB"),C=k("vuIU"),D=k("Ji7U"),u=k("LK+K"),f=k("q1tI"),w=k("VTBJ"),d=k("rePB"),o=k("Zm9Q"),l=k("Kwbf"),a=k("c+Xe"),_=k("m+aA"),m=k("bdgK"),c=new Map;function g(Se){Se.forEach(function(de){var xe,he=de.target;(xe=c.get(he))===null||xe===void 0||xe.forEach(function(ne){return ne(he)})})}var v=new m.default(g),x=null,n=null;function i(Se,de){c.has(Se)||(c.set(Se,new Set),v.observe(Se)),c.get(Se).add(de)}function t(Se,de){c.has(Se)&&(c.get(Se).delete(de),c.get(Se).size||(v.unobserve(Se),c.delete(Se)))}var S=function(Se){Object(D.a)(xe,Se);var de=Object(u.a)(xe);function xe(){return Object(h.a)(this,xe),de.apply(this,arguments)}return Object(C.a)(xe,[{key:"render",value:function(){return this.props.children}}]),xe}(f.Component),E=f.createContext(null);function s(Se){var de=Se.children,xe=Se.onBatchResize,he=f.useRef(0),ne=f.useRef([]),oe=f.useContext(E),te=f.useCallback(function(le,Y,Z){he.current+=1;var ge=he.current;ne.current.push({size:le,element:Y,data:Z}),Promise.resolve().then(function(){ge===he.current&&(xe==null||xe(ne.current),ne.current=[])}),oe==null||oe(le,Y,Z)},[xe,oe]);return f.createElement(E.Provider,{value:te},de)}function P(Se){var de=Se.children,xe=Se.disabled,he=f.useRef(null),ne=f.useRef(null),oe=f.useContext(E),te=f.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),le=f.isValidElement(de)&&Object(a.c)(de),Y=le?de.ref:null,Z=f.useMemo(function(){return Object(a.a)(Y,he)},[Y,he]),ge=f.useRef(Se);ge.current=Se;var ee=f.useCallback(function($){var X=ge.current,J=X.onResize,me=X.data,ue=$.getBoundingClientRect(),_e=ue.width,He=ue.height,$e=$.offsetWidth,Ye=$.offsetHeight,tt=Math.floor(_e),nt=Math.floor(He);if(te.current.width!==tt||te.current.height!==nt||te.current.offsetWidth!==$e||te.current.offsetHeight!==Ye){var it={width:tt,height:nt,offsetWidth:$e,offsetHeight:Ye};te.current=it;var Me=$e===Math.round(_e)?_e:$e,Ce=Ye===Math.round(He)?He:Ye,Je=Object(w.a)(Object(w.a)({},it),{},{offsetWidth:Me,offsetHeight:Ce});oe==null||oe(Je,$,me),J&&Promise.resolve().then(function(){J(Je,$)})}},[]);return f.useEffect(function(){var $=Object(_.a)(he.current)||Object(_.a)(ne.current);return $&&!xe&&i($,ee),function(){return t($,ee)}},[he.current,xe]),f.createElement(S,{ref:ne},le?f.cloneElement(de,{ref:Z}):de)}var O="rc-observer-key";function b(Se){var de=Se.children,xe=Object(o.a)(de);return xe.map(function(he,ne){var oe=(he==null?void 0:he.key)||"".concat(O,"-").concat(ne);return f.createElement(P,Object(L.a)({},Se,{key:oe}),he)})}b.Collection=s;var y=b,p=k("bT9E"),T=k("TSYQ"),M=k.n(T),N=`
|
|
|
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
|
|
|
`,I=["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"],K={},H;function W(Se){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=Se.getAttribute("id")||Se.getAttribute("data-reactid")||Se.getAttribute("name");if(de&&K[xe])return K[xe];var he=window.getComputedStyle(Se),ne=he.getPropertyValue("box-sizing")||he.getPropertyValue("-moz-box-sizing")||he.getPropertyValue("-webkit-box-sizing"),oe=parseFloat(he.getPropertyValue("padding-bottom"))+parseFloat(he.getPropertyValue("padding-top")),te=parseFloat(he.getPropertyValue("border-bottom-width"))+parseFloat(he.getPropertyValue("border-top-width")),le=I.map(function(Z){return"".concat(Z,":").concat(he.getPropertyValue(Z))}).join(";"),Y={sizingStyle:le,paddingSize:oe,borderSize:te,boxSizing:ne};return de&&xe&&(K[xe]=Y),Y}function z(Se){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,he=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;H||(H=document.createElement("textarea"),H.setAttribute("tab-index","-1"),H.setAttribute("aria-hidden","true"),document.body.appendChild(H)),Se.getAttribute("wrap")?H.setAttribute("wrap",Se.getAttribute("wrap")):H.removeAttribute("wrap");var ne=W(Se,de),oe=ne.paddingSize,te=ne.borderSize,le=ne.boxSizing,Y=ne.sizingStyle;H.setAttribute("style","".concat(Y,";").concat(N)),H.value=Se.value||Se.placeholder||"";var Z=Number.MIN_SAFE_INTEGER,ge=Number.MAX_SAFE_INTEGER,ee=H.scrollHeight,$;if(le==="border-box"?ee+=te:le==="content-box"&&(ee-=oe),xe!==null||he!==null){H.value=" ";var X=H.scrollHeight-oe;xe!==null&&(Z=X*xe,le==="border-box"&&(Z=Z+oe+te),ee=Math.max(Z,ee)),he!==null&&(ge=X*he,le==="border-box"&&(ge=ge+oe+te),$=ee>ge?"":"hidden",ee=Math.min(ge,ee))}return{height:ee,minHeight:Z,maxHeight:ge,overflowY:$,resize:"none"}}var U=k("Gytx"),B=k.n(U),G;(function(Se){Se[Se.NONE=0]="NONE",Se[Se.RESIZING=1]="RESIZING",Se[Se.RESIZED=2]="RESIZED"})(G||(G={}));var q=function(Se){Object(D.a)(xe,Se);var de=Object(u.a)(xe);function xe(he){var ne;return Object(h.a)(this,xe),ne=de.call(this,he),ne.nextFrameActionId=void 0,ne.resizeFrameId=void 0,ne.textArea=void 0,ne.saveTextArea=function(oe){ne.textArea=oe},ne.handleResize=function(oe){var te=ne.state.resizeStatus,le=ne.props,Y=le.autoSize,Z=le.onResize;if(te!==G.NONE)return;typeof Z=="function"&&Z(oe),Y&&ne.resizeOnNextFrame()},ne.resizeOnNextFrame=function(){cancelAnimationFrame(ne.nextFrameActionId),ne.nextFrameActionId=requestAnimationFrame(ne.resizeTextarea)},ne.resizeTextarea=function(){var oe=ne.props.autoSize;if(!oe||!ne.textArea)return;var te=oe.minRows,le=oe.maxRows,Y=z(ne.textArea,!1,te,le);ne.setState({textareaStyles:Y,resizeStatus:G.RESIZING},function(){cancelAnimationFrame(ne.resizeFrameId),ne.resizeFrameId=requestAnimationFrame(function(){ne.setState({resizeStatus:G.RESIZED},function(){ne.resizeFrameId=requestAnimationFrame(function(){ne.setState({resizeStatus:G.NONE}),ne.fixFirefoxAutoScroll()})})})})},ne.renderTextArea=function(){var oe=ne.props,te=oe.prefixCls,le=te===void 0?"rc-textarea":te,Y=oe.autoSize,Z=oe.onResize,ge=oe.className,ee=oe.disabled,$=ne.state,X=$.textareaStyles,J=$.resizeStatus,me=Object(p.a)(ne.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ue=M()(le,ge,Object(d.a)({},"".concat(le,"-disabled"),ee));"value"in me&&(me.value=me.value||"");var _e=Object(w.a)(Object(w.a)(Object(w.a)({},ne.props.style),X),J===G.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return f.createElement(y,{onResize:ne.handleResize,disabled:!(Y||Z)},f.createElement("textarea",Object(L.a)({},me,{className:ue,style:_e,ref:ne.saveTextArea})))},ne.state={textareaStyles:{},resizeStatus:G.NONE},ne}return Object(C.a)(xe,[{key:"componentDidUpdate",value:function(ne){(ne.value!==this.props.value||!B()(ne.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 ne=this.textArea.selectionStart,oe=this.textArea.selectionEnd;this.textArea.setSelectionRange(ne,oe)}}catch(te){}}},{key:"render",value:function(){return this.renderTextArea()}}]),xe}(f.Component),ae=q,se=function(Se){Object(D.a)(xe,Se);var de=Object(u.a)(xe);function xe(he){var ne;Object(h.a)(this,xe),ne=de.call(this,he),ne.resizableTextArea=void 0,ne.focus=function(){ne.resizableTextArea.textArea.focus()},ne.saveTextArea=function(te){ne.resizableTextArea=te},ne.handleChange=function(te){var le=ne.props.onChange;ne.setValue(te.target.value,function(){ne.resizableTextArea.resizeTextarea()}),le&&le(te)},ne.handleKeyDown=function(te){var le=ne.props,Y=le.onPressEnter,Z=le.onKeyDown;te.keyCode===13&&Y&&Y(te),Z&&Z(te)};var oe=typeof he.value=="undefined"||he.value===null?he.defaultValue:he.value;return ne.state={value:oe},ne}return Object(C.a)(xe,[{key:"setValue",value:function(ne,oe){"value"in this.props||this.setState({value:ne},oe)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return f.createElement(ae,Object(L.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ne){return"value"in ne?{value:ne.value}:null}}]),xe}(f.Component),we=Q.default=se},ZW9T:function(j,Q,k){"use strict";k.d(Q,"a",function(){return S});var L=k("k1fw"),h=k("miYZ"),C=k("tsqr"),D=k("rAM+"),u=k("tJVT"),f=k("PpiC"),w=k("q1tI"),d=k.n(w),o=k("bdgK");function l(E,s,P,O,b){var y=s.getWordUntilPosition(P),p={startLineNumber:P.lineNumber,endLineNumber:P.lineNumber,startColumn:y.startColumn,endColumn:y.endColumn},T=O.map(function(M){return{label:M,kind:E.languages.CompletionItemKind.Keyword,insertText:M,insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:p}});return b.map(function(M){T.push(Object(L.a)(Object(L.a)({},M),{},{range:p}))}),T}var a=function(E){var s={label:"ifelse",kind:E.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet},P=["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"];E.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(p,T){var M=l(E,p,T,P,[s]);return{suggestions:M}}});var O=["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"];E.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(p,T){var M=[{label:"print",kind:E.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
|
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=l(E,p,T,O,M);return{suggestions:N}}});var b=["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"];E.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(p,T){var M=[s,{label:"main",kind:E.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:E.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
|
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=l(E,p,T,b,M);return{suggestions:N}}})},_="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",m=k("LvDl");function c(E){return/^\d+$/.test(E)?"".concat(E,"px"):E}function g(){}var v=!1,x={"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 E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=E;if(Array.isArray(E)){for(var P=0;P<E.length;P++){var O=x[E[P]];if(O)return O}return s[0]}return x[s]||s}var i=null,t=Q.b=function(E){var s=E.width,P=s===void 0?"100%":s,O=E.height,b=O===void 0?"100%":O,y=E.value,p=E.language,T=p===void 0?"javascript":p,M=E.style,N=M===void 0?{}:M,I=E.options,K=I===void 0?{}:I,H=E.overrideServices,W=H===void 0?{}:H,z=E.theme,U=z===void 0?"vs-dark":z,B=E.onEditBlur,G=E.onSave,q=E.autoHeight,ae=q===void 0?!1:q,se=E.forbidCopy,we=se===void 0?!1:se,Se=E.onChange,de=Se===void 0?g:Se,xe=E.editorDidMount,he=xe===void 0?g:xe,ne=E.onFocus,oe=ne===void 0?g:ne,te=E.filename,le=te===void 0?"educoder.txt":te,Y=Object(f.a)(E,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Z=Object(w.useRef)(),ge=Object(w.useRef)({}),ee=Object(w.useRef)(),$=Object(w.useRef)(!1),X=Object(w.useRef)(),J=Object(w.useState)(!1),me=Object(u.a)(J,2),ue=me[0],_e=me[1];function He(){var Ee;return Z.current&&(Ee=new o.default(function(Oe){var We=Object(D.a)(Oe),Ve;try{for(We.s();!(Ve=We.n()).done;){var ut=Ve.value;(ut.target.offsetHeight>0||ut.target.offsetWidth>0)&&ge.current.instance.layout()}}catch(ft){We.e(ft)}finally{We.f()}}),Ee.observe(Z.current)),Ee}function $e(){C.b.warn(decodeURIComponent(_))}var Ye=function(){var Oe=ge.current.instance;if(y!=null&&Oe&&ue){var We=Oe.getModel();We&&y!==We.getValue()&&(v=!0,We.setValue(y),Oe.layout(),v=!1)}};Object(w.useEffect)(function(){ee.current&&clearTimeout(ee.current),ee.current=setTimeout(function(){Ye()},500)},[y,ue,ge.current]);function tt(){var Ee=ge.current.instance;if(Ee){var Oe=Ee.getSelection(),We=ge.current.pastePos||{},Ve=new i.Range(We.startLineNumber||Oe.endLineNumber,We.startColumn||Oe.endColumn,We.endLineNumber||Oe.endLineNumber,We.endColumn||Oe.endColumn);setTimeout(function(){Ee.executeEdits("",[{range:Ve,text:""}])},300)}}function nt(Ee){(window.navigator.platform.match("Mac")?Ee.metaKey:Ee.ctrlKey)&&Ee.keyCode==83&&(Ee.preventDefault(),G())}var it=function(){if(ae&&ge.current.instance){var Oe=ge.current.instance.getContentHeight();fe(Oe<b?b:Oe)}else fe(b)};function Me(Ee){var Oe=document.createEvent("MouseEvents");Oe.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Ee.dispatchEvent(Oe)}function Ce(Ee,Oe){var We=window.URL||window.webkitURL||window,Ve=new Blob([Oe]),ut=document.createElementNS("http://www.w3.org/1999/xhtml","a");ut.href=We.createObjectURL(Ve),ut.download=Ee,Me(ut)}Object(w.useEffect)(function(){it()},[it]),Object(w.useEffect)(function(){Z.current&&!ue&&k.e(26).then(k.t.bind(null,"M/lh",7)).then(function(Ee){try{i=Ee,ge.current.instance=i.editor.create(Z.current,{value:y,language:n(T),theme:U,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},W);var Oe=ge.current.instance;if(he(Oe,i),setTimeout(function(){it(),ge.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ce(le||"educoder.txt",Oe.getValue())}})},500),ge.current.subscription=Oe.onDidChangeModelContent(function(Ve){$.current?clearTimeout(X.current):(it(),de(Oe.getValue(),Ve)),X.current=setTimeout(function(){$.current=!1},500)}),window.Monaco||a(i),we&&(Oe.addCommand(i.KeyMod.CtrlCmd|i.KeyMod.Shift|i.KeyCode.KEY_V,function(){return $e(),null}),Oe.addCommand(i.KeyMod.CtrlCmd|i.KeyCode.KEY_C,function(){return $e(),null})),window.Monaco=i,B&&Oe.onDidBlurEditorWidget(function(){B(Oe.getValue())}),oe&&Oe.onDidFocusEditorText(function(){oe(Oe.getValue())}),we){Oe.addCommand(i.KeyMod.CtrlCmd|i.KeyCode.KEY_V,function(){return $e(),null}),Oe.onDidPaste(function(Ve){ge.current.pastePos=Ve});try{window.addEventListener("paste",tt)}catch(Ve){}}var We=He();return _e(!0),function(){var Ve=ge.current.instance;Ve.dispose();var ut=Ve.getModel();ut&&ut.dispose(),ge.current.subscription&&ge.current.subscription.dispose(),we&&window.removeEventListener("paste",tt),We.unobserve(Z.current)}}catch(Ve){}})},[]),Object(w.useEffect)(function(){var Ee=ge.current.instance;if(Ee&&ue)return document.addEventListener("keydown",nt,!1),function(){document.removeEventListener("keydown",nt)}},[G,ue]),Object(w.useEffect)(function(){var Ee=ge.current.instance;if(Ee&&ue){var Oe=n(T);i.editor.setModelLanguage(Ee.getModel(),Oe),console.log("language:",T,Ee.getModel(),Oe)}},[T,ue]),Object(w.useEffect)(function(){var Ee=ge.current.instance;Ee&&ue&&i.editor.setTheme(U)},[U,ue]),Object(w.useEffect)(function(){var Ee=ge.current.instance;Ee&&ue&&(Ee.updateOptions(Object(L.a)({},K)),setTimeout(function(){Ee.getModel().updateOptions(Object(L.a)({},K))},200))},[JSON.stringify(K),ue]),Object(w.useEffect)(function(){var Ee=ge.current.instance;Ee&&ue&&Ee.layout()},[P,b,ue]);var Je=Object(w.useState)(c(P)),rt=Object(u.a)(Je,2),ze=rt[0],et=rt[1],ke=Object(w.useState)(c(b)),Re=Object(u.a)(ke,2),Te=Re[0],fe=Re[1],ye=Object(L.a)(Object(L.a)({},N),{},{width:ze,height:Te});return d.a.createElement("div",{className:"my-monaco-editor",ref:Z,style:ye})};function S(E){var s=E.width,P=s===void 0?"100%":s,O=E.height,b=O===void 0?"100%":O,y=E.original,p=E.modified,T=E.language,M=E.options,N=M===void 0?{}:M,I=Object(w.useRef)(),K=Object(w.useState)(null),H=Object(u.a)(K,2),W=H[0],z=H[1];function U(ae){var se;return I.current&&(se=new o.default(function(we){var Se=Object(D.a)(we),de;try{for(Se.s();!(de=Se.n()).done;){var xe=de.value;(xe.target.offsetHeight>0||xe.target.offsetWidth>0)&&ae.layout()}}catch(he){Se.e(he)}finally{Se.f()}}),se.observe(I.current)),se}Object(w.useEffect)(function(){I.current&&k.e(26).then(k.t.bind(null,"M/lh",7)).then(function(ae){i=ae;var se=i.editor.createDiffEditor(I.current,Object(L.a)(Object(L.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},N),{},{wordWrap:!0}));z(se);var we=U(se);return function(){se.dispose();var Se=se.getModel();Se&&Se.dispose(),we.unobserve(I.current)}})},[]),Object(w.useEffect)(function(){W&&W.setModel({original:i.editor.createModel(y,T),modified:i.editor.createModel(p,T)})},[y,p,T,W]);var B=c(P),G=c(b),q={width:B,height:G};return d.a.createElement("div",{className:"my-diff-editor",ref:I,style:q})}},ZpRC:function(j,Q,k){"use strict";function L(a){return typeof a=="object"&&a!=null&&a.nodeType===1}function h(a,_){return(!_||a!=="hidden")&&a!=="visible"&&a!=="clip"}function C(a,_){if(a.clientHeight<a.scrollHeight||a.clientWidth<a.scrollWidth){var m=getComputedStyle(a,null);return h(m.overflowY,_)||h(m.overflowX,_)||function(c){var g=function(v){if(!v.ownerDocument||!v.ownerDocument.defaultView)return null;try{return v.ownerDocument.defaultView.frameElement}catch(x){return null}}(c);return!!g&&(g.clientHeight<c.scrollHeight||g.clientWidth<c.scrollWidth)}(a)}return!1}function D(a,_,m,c,g,v,x,n){return v<a&&x>_||v>a&&x<_?0:v<=a&&n<=m||x>=_&&n>=m?v-a-c:x>_&&n<m||v<a&&n>m?x-_+g:0}var u=function(a,_){var m=window,c=_.scrollMode,g=_.block,v=_.inline,x=_.boundary,n=_.skipOverflowHiddenElements,i=typeof x=="function"?x:function(X){return X!==x};if(!L(a))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,S=[],E=a;L(E)&&i(E);){if((E=E.parentElement)===t){S.push(E);break}E!=null&&E===document.body&&C(E)&&!C(document.documentElement)||E!=null&&C(E,n)&&S.push(E)}for(var s=m.visualViewport?m.visualViewport.width:innerWidth,P=m.visualViewport?m.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,y=a.getBoundingClientRect(),p=y.height,T=y.width,M=y.top,N=y.right,I=y.bottom,K=y.left,H=g==="start"||g==="nearest"?M:g==="end"?I:M+p/2,W=v==="center"?K+T/2:v==="end"?N:K,z=[],U=0;U<S.length;U++){var B=S[U],G=B.getBoundingClientRect(),q=G.height,ae=G.width,se=G.top,we=G.right,Se=G.bottom,de=G.left;if(c==="if-needed"&&M>=0&&K>=0&&I<=P&&N<=s&&M>=se&&I<=Se&&K>=de&&N<=we)return z;var xe=getComputedStyle(B),he=parseInt(xe.borderLeftWidth,10),ne=parseInt(xe.borderTopWidth,10),oe=parseInt(xe.borderRightWidth,10),te=parseInt(xe.borderBottomWidth,10),le=0,Y=0,Z="offsetWidth"in B?B.offsetWidth-B.clientWidth-he-oe:0,ge="offsetHeight"in B?B.offsetHeight-B.clientHeight-ne-te:0;if(t===B)le=g==="start"?H:g==="end"?H-P:g==="nearest"?D(b,b+P,P,ne,te,b+H,b+H+p,p):H-P/2,Y=v==="start"?W:v==="center"?W-s/2:v==="end"?W-s:D(O,O+s,s,he,oe,O+W,O+W+T,T),le=Math.max(0,le+b),Y=Math.max(0,Y+O);else{le=g==="start"?H-se-ne:g==="end"?H-Se+te+ge:g==="nearest"?D(se,Se,q,ne,te+ge,H,H+p,p):H-(se+q/2)+ge/2,Y=v==="start"?W-de-he:v==="center"?W-(de+ae/2)+Z/2:v==="end"?W-we+oe+Z:D(de,we,ae,he,oe+Z,W,W+T,T);var ee=B.scrollLeft,$=B.scrollTop;H+=$-(le=Math.max(0,Math.min($+le,B.scrollHeight-q+ge))),W+=ee-(Y=Math.max(0,Math.min(ee+Y,B.scrollWidth-ae+Z)))}z.push({el:B,top:le,left:Y})}return z};function f(a){return a===Object(a)&&Object.keys(a).length!==0}function w(a,_){_===void 0&&(_="auto");var m="scrollBehavior"in document.body.style;a.forEach(function(c){var g=c.el,v=c.top,x=c.left;g.scroll&&m?g.scroll({top:v,left:x,behavior:_}):(g.scrollTop=v,g.scrollLeft=x)})}function d(a){return a===!1?{block:"end",inline:"nearest"}:f(a)?a:{block:"start",inline:"nearest"}}function o(a,_){var m=!a.ownerDocument.documentElement.contains(a);if(f(_)&&typeof _.behavior=="function")return _.behavior(m?[]:u(a,_));if(m)return;var c=d(_);return w(u(a,c),c.behavior)}var l=Q.a=o},Zss7:function(j,Q,k){var L;(function(h){var C=/^\s+/,D=/\s+$/,u=0,f=h.round,w=h.min,d=h.max,o=h.random;function l(te,le){if(te=te||"",le=le||{},te instanceof l)return te;if(!(this instanceof l))return new l(te,le);var Y=a(te);this._originalInput=te,this._r=Y.r,this._g=Y.g,this._b=Y.b,this._a=Y.a,this._roundA=f(100*this._a)/100,this._format=le.format||Y.format,this._gradientType=le.gradientType,this._r<1&&(this._r=f(this._r)),this._g<1&&(this._g=f(this._g)),this._b<1&&(this._b=f(this._b)),this._ok=Y.ok,this._tc_id=u++}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var te=this.toRgb();return(te.r*299+te.g*587+te.b*114)/1e3},getLuminance:function(){var te=this.toRgb(),le,Y,Z,ge,ee,$;return le=te.r/255,Y=te.g/255,Z=te.b/255,le<=.03928?ge=le/12.92:ge=h.pow((le+.055)/1.055,2.4),Y<=.03928?ee=Y/12.92:ee=h.pow((Y+.055)/1.055,2.4),Z<=.03928?$=Z/12.92:$=h.pow((Z+.055)/1.055,2.4),.2126*ge+.7152*ee+.0722*$},setAlpha:function(te){return this._a=z(te),this._roundA=f(100*this._a)/100,this},toHsv:function(){var te=g(this._r,this._g,this._b);return{h:te.h*360,s:te.s,v:te.v,a:this._a}},toHsvString:function(){var te=g(this._r,this._g,this._b),le=f(te.h*360),Y=f(te.s*100),Z=f(te.v*100);return this._a==1?"hsv("+le+", "+Y+"%, "+Z+"%)":"hsva("+le+", "+Y+"%, "+Z+"%, "+this._roundA+")"},toHsl:function(){var te=m(this._r,this._g,this._b);return{h:te.h*360,s:te.s,l:te.l,a:this._a}},toHslString:function(){var te=m(this._r,this._g,this._b),le=f(te.h*360),Y=f(te.s*100),Z=f(te.l*100);return this._a==1?"hsl("+le+", "+Y+"%, "+Z+"%)":"hsla("+le+", "+Y+"%, "+Z+"%, "+this._roundA+")"},toHex:function(te){return x(this._r,this._g,this._b,te)},toHexString:function(te){return"#"+this.toHex(te)},toHex8:function(te){return n(this._r,this._g,this._b,this._a,te)},toHex8String:function(te){return"#"+this.toHex8(te)},toRgb:function(){return{r:f(this._r),g:f(this._g),b:f(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+f(this._r)+", "+f(this._g)+", "+f(this._b)+")":"rgba("+f(this._r)+", "+f(this._g)+", "+f(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:f(U(this._r,255)*100)+"%",g:f(U(this._g,255)*100)+"%",b:f(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+f(U(this._r,255)*100)+"%, "+f(U(this._g,255)*100)+"%, "+f(U(this._b,255)*100)+"%)":"rgba("+f(U(this._r,255)*100)+"%, "+f(U(this._g,255)*100)+"%, "+f(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:H[x(this._r,this._g,this._b,!0)]||!1},toFilter:function(te){var le="#"+i(this._r,this._g,this._b,this._a),Y=le,Z=this._gradientType?"GradientType = 1, ":"";if(te){var ge=l(te);Y="#"+i(ge._r,ge._g,ge._b,ge._a)}return"progid:DXImageTransform.Microsoft.gradient("+Z+"startColorstr="+le+",endColorstr="+Y+")"},toString:function(te){var le=!!te;te=te||this._format;var Y=!1,Z=this._a<1&&this._a>=0,ge=!le&&Z&&(te==="hex"||te==="hex6"||te==="hex3"||te==="hex4"||te==="hex8"||te==="name");return ge?te==="name"&&this._a===0?this.toName():this.toRgbString():(te==="rgb"&&(Y=this.toRgbString()),te==="prgb"&&(Y=this.toPercentageRgbString()),(te==="hex"||te==="hex6")&&(Y=this.toHexString()),te==="hex3"&&(Y=this.toHexString(!0)),te==="hex4"&&(Y=this.toHex8String(!0)),te==="hex8"&&(Y=this.toHex8String()),te==="name"&&(Y=this.toName()),te==="hsl"&&(Y=this.toHslString()),te==="hsv"&&(Y=this.toHsvString()),Y||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(te,le){var Y=te.apply(null,[this].concat([].slice.call(le)));return this._r=Y._r,this._g=Y._g,this._b=Y._b,this.setAlpha(Y._a),this},lighten:function(){return this._applyModification(s,arguments)},brighten:function(){return this._applyModification(P,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(t,arguments)},saturate:function(){return this._applyModification(S,arguments)},greyscale:function(){return this._applyModification(E,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(te,le){return te.apply(null,[this].concat([].slice.call(le)))},analogous:function(){return this._applyCombination(N,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(p,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},l.fromRatio=function(te,le){if(typeof te=="object"){var Y={};for(var Z in te)te.hasOwnProperty(Z)&&(Z==="a"?Y[Z]=te[Z]:Y[Z]=we(te[Z]));te=Y}return l(te,le)};function a(te){var le={r:0,g:0,b:0},Y=1,Z=null,ge=null,ee=null,$=!1,X=!1;return typeof te=="string"&&(te=ne(te)),typeof te=="object"&&(he(te.r)&&he(te.g)&&he(te.b)?(le=_(te.r,te.g,te.b),$=!0,X=String(te.r).substr(-1)==="%"?"prgb":"rgb"):he(te.h)&&he(te.s)&&he(te.v)?(Z=we(te.s),ge=we(te.v),le=v(te.h,Z,ge),$=!0,X="hsv"):he(te.h)&&he(te.s)&&he(te.l)&&(Z=we(te.s),ee=we(te.l),le=c(te.h,Z,ee),$=!0,X="hsl"),te.hasOwnProperty("a")&&(Y=te.a)),Y=z(Y),{ok:$,format:te.format||X,r:w(255,d(le.r,0)),g:w(255,d(le.g,0)),b:w(255,d(le.b,0)),a:Y}}function _(te,le,Y){return{r:U(te,255)*255,g:U(le,255)*255,b:U(Y,255)*255}}function m(te,le,Y){te=U(te,255),le=U(le,255),Y=U(Y,255);var Z=d(te,le,Y),ge=w(te,le,Y),ee,$,X=(Z+ge)/2;if(Z==ge)ee=$=0;else{var J=Z-ge;$=X>.5?J/(2-Z-ge):J/(Z+ge);switch(Z){case te:ee=(le-Y)/J+(le<Y?6:0);break;case le:ee=(Y-te)/J+2;break;case Y:ee=(te-le)/J+4;break}ee/=6}return{h:ee,s:$,l:X}}function c(te,le,Y){var Z,ge,ee;te=U(te,360),le=U(le,100),Y=U(Y,100);function $(me,ue,_e){return _e<0&&(_e+=1),_e>1&&(_e-=1),_e<1/6?me+(ue-me)*6*_e:_e<1/2?ue:_e<2/3?me+(ue-me)*(2/3-_e)*6:me}if(le===0)Z=ge=ee=Y;else{var X=Y<.5?Y*(1+le):Y+le-Y*le,J=2*Y-X;Z=$(J,X,te+1/3),ge=$(J,X,te),ee=$(J,X,te-1/3)}return{r:Z*255,g:ge*255,b:ee*255}}function g(te,le,Y){te=U(te,255),le=U(le,255),Y=U(Y,255);var Z=d(te,le,Y),ge=w(te,le,Y),ee,$,X=Z,J=Z-ge;if($=Z===0?0:J/Z,Z==ge)ee=0;else{switch(Z){case te:ee=(le-Y)/J+(le<Y?6:0);break;case le:ee=(Y-te)/J+2;break;case Y:ee=(te-le)/J+4;break}ee/=6}return{h:ee,s:$,v:X}}function v(te,le,Y){te=U(te,360)*6,le=U(le,100),Y=U(Y,100);var Z=h.floor(te),ge=te-Z,ee=Y*(1-le),$=Y*(1-ge*le),X=Y*(1-(1-ge)*le),J=Z%6,me=[Y,$,ee,ee,X,Y][J],ue=[X,Y,Y,$,ee,ee][J],_e=[ee,ee,X,Y,Y,$][J];return{r:me*255,g:ue*255,b:_e*255}}function x(te,le,Y,Z){var ge=[se(f(te).toString(16)),se(f(le).toString(16)),se(f(Y).toString(16))];return Z&&ge[0].charAt(0)==ge[0].charAt(1)&&ge[1].charAt(0)==ge[1].charAt(1)&&ge[2].charAt(0)==ge[2].charAt(1)?ge[0].charAt(0)+ge[1].charAt(0)+ge[2].charAt(0):ge.join("")}function n(te,le,Y,Z,ge){var ee=[se(f(te).toString(16)),se(f(le).toString(16)),se(f(Y).toString(16)),se(Se(Z))];return ge&&ee[0].charAt(0)==ee[0].charAt(1)&&ee[1].charAt(0)==ee[1].charAt(1)&&ee[2].charAt(0)==ee[2].charAt(1)&&ee[3].charAt(0)==ee[3].charAt(1)?ee[0].charAt(0)+ee[1].charAt(0)+ee[2].charAt(0)+ee[3].charAt(0):ee.join("")}function i(te,le,Y,Z){var ge=[se(Se(Z)),se(f(te).toString(16)),se(f(le).toString(16)),se(f(Y).toString(16))];return ge.join("")}l.equals=function(te,le){return!te||!le?!1:l(te).toRgbString()==l(le).toRgbString()},l.random=function(){return l.fromRatio({r:o(),g:o(),b:o()})};function t(te,le){le=le===0?0:le||10;var Y=l(te).toHsl();return Y.s-=le/100,Y.s=B(Y.s),l(Y)}function S(te,le){le=le===0?0:le||10;var Y=l(te).toHsl();return Y.s+=le/100,Y.s=B(Y.s),l(Y)}function E(te){return l(te).desaturate(100)}function s(te,le){le=le===0?0:le||10;var Y=l(te).toHsl();return Y.l+=le/100,Y.l=B(Y.l),l(Y)}function P(te,le){le=le===0?0:le||10;var Y=l(te).toRgb();return Y.r=d(0,w(255,Y.r-f(255*-(le/100)))),Y.g=d(0,w(255,Y.g-f(255*-(le/100)))),Y.b=d(0,w(255,Y.b-f(255*-(le/100)))),l(Y)}function O(te,le){le=le===0?0:le||10;var Y=l(te).toHsl();return Y.l-=le/100,Y.l=B(Y.l),l(Y)}function b(te,le){var Y=l(te).toHsl(),Z=(Y.h+le)%360;return Y.h=Z<0?360+Z:Z,l(Y)}function y(te){var le=l(te).toHsl();return le.h=(le.h+180)%360,l(le)}function p(te){var le=l(te).toHsl(),Y=le.h;return[l(te),l({h:(Y+120)%360,s:le.s,l:le.l}),l({h:(Y+240)%360,s:le.s,l:le.l})]}function T(te){var le=l(te).toHsl(),Y=le.h;return[l(te),l({h:(Y+90)%360,s:le.s,l:le.l}),l({h:(Y+180)%360,s:le.s,l:le.l}),l({h:(Y+270)%360,s:le.s,l:le.l})]}function M(te){var le=l(te).toHsl(),Y=le.h;return[l(te),l({h:(Y+72)%360,s:le.s,l:le.l}),l({h:(Y+216)%360,s:le.s,l:le.l})]}function N(te,le,Y){le=le||6,Y=Y||30;var Z=l(te).toHsl(),ge=360/Y,ee=[l(te)];for(Z.h=(Z.h-(ge*le>>1)+720)%360;--le;)Z.h=(Z.h+ge)%360,ee.push(l(Z));return ee}function I(te,le){le=le||6;for(var Y=l(te).toHsv(),Z=Y.h,ge=Y.s,ee=Y.v,$=[],X=1/le;le--;)$.push(l({h:Z,s:ge,v:ee})),ee=(ee+X)%1;return $}l.mix=function(te,le,Y){Y=Y===0?0:Y||50;var Z=l(te).toRgb(),ge=l(le).toRgb(),ee=Y/100,$={r:(ge.r-Z.r)*ee+Z.r,g:(ge.g-Z.g)*ee+Z.g,b:(ge.b-Z.b)*ee+Z.b,a:(ge.a-Z.a)*ee+Z.a};return l($)},l.readability=function(te,le){var Y=l(te),Z=l(le);return(h.max(Y.getLuminance(),Z.getLuminance())+.05)/(h.min(Y.getLuminance(),Z.getLuminance())+.05)},l.isReadable=function(te,le,Y){var Z=l.readability(te,le),ge,ee;ee=!1,ge=oe(Y);switch(ge.level+ge.size){case"AAsmall":case"AAAlarge":ee=Z>=4.5;break;case"AAlarge":ee=Z>=3;break;case"AAAsmall":ee=Z>=7;break}return ee},l.mostReadable=function(te,le,Y){var Z=null,ge=0,ee,$,X,J;Y=Y||{},$=Y.includeFallbackColors,X=Y.level,J=Y.size;for(var me=0;me<le.length;me++)ee=l.readability(te,le[me]),ee>ge&&(ge=ee,Z=l(le[me]));return l.isReadable(te,Z,{level:X,size:J})||!$?Z:(Y.includeFallbackColors=!1,l.mostReadable(te,["#fff","#000"],Y))};var K=l.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},H=l.hexNames=W(K);function W(te){var le={};for(var Y in te)te.hasOwnProperty(Y)&&(le[te[Y]]=Y);return le}function z(te){return te=parseFloat(te),(isNaN(te)||te<0||te>1)&&(te=1),te}function U(te,le){q(te)&&(te="100%");var Y=ae(te);return te=w(le,d(0,parseFloat(te))),Y&&(te=parseInt(te*le,10)/100),h.abs(te-le)<1e-6?1:te%le/parseFloat(le)}function B(te){return w(1,d(0,te))}function G(te){return parseInt(te,16)}function q(te){return typeof te=="string"&&te.indexOf(".")!=-1&&parseFloat(te)===1}function ae(te){return typeof te=="string"&&te.indexOf("%")!=-1}function se(te){return te.length==1?"0"+te:""+te}function we(te){return te<=1&&(te=te*100+"%"),te}function Se(te){return h.round(parseFloat(te)*255).toString(16)}function de(te){return G(te)/255}var xe=function(){var te="[-\\+]?\\d+%?",le="[-\\+]?\\d*\\.\\d+%?",Y="(?:"+le+")|(?:"+te+")",Z="[\\s|\\(]+("+Y+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")\\s*\\)?",ge="[\\s|\\(]+("+Y+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")\\s*\\)?";return{CSS_UNIT:new RegExp(Y),rgb:new RegExp("rgb"+Z),rgba:new RegExp("rgba"+ge),hsl:new RegExp("hsl"+Z),hsla:new RegExp("hsla"+ge),hsv:new RegExp("hsv"+Z),hsva:new RegExp("hsva"+ge),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function he(te){return!!xe.CSS_UNIT.exec(te)}function ne(te){te=te.replace(C,"").replace(D,"").toLowerCase();var le=!1;if(K[te])te=K[te],le=!0;else if(te=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Y;return(Y=xe.rgb.exec(te))?{r:Y[1],g:Y[2],b:Y[3]}:(Y=xe.rgba.exec(te))?{r:Y[1],g:Y[2],b:Y[3],a:Y[4]}:(Y=xe.hsl.exec(te))?{h:Y[1],s:Y[2],l:Y[3]}:(Y=xe.hsla.exec(te))?{h:Y[1],s:Y[2],l:Y[3],a:Y[4]}:(Y=xe.hsv.exec(te))?{h:Y[1],s:Y[2],v:Y[3]}:(Y=xe.hsva.exec(te))?{h:Y[1],s:Y[2],v:Y[3],a:Y[4]}:(Y=xe.hex8.exec(te))?{r:G(Y[1]),g:G(Y[2]),b:G(Y[3]),a:de(Y[4]),format:le?"name":"hex8"}:(Y=xe.hex6.exec(te))?{r:G(Y[1]),g:G(Y[2]),b:G(Y[3]),format:le?"name":"hex"}:(Y=xe.hex4.exec(te))?{r:G(Y[1]+""+Y[1]),g:G(Y[2]+""+Y[2]),b:G(Y[3]+""+Y[3]),a:de(Y[4]+""+Y[4]),format:le?"name":"hex8"}:(Y=xe.hex3.exec(te))?{r:G(Y[1]+""+Y[1]),g:G(Y[2]+""+Y[2]),b:G(Y[3]+""+Y[3]),format:le?"name":"hex"}:!1}function oe(te){var le,Y;return te=te||{level:"AA",size:"small"},le=(te.level||"AA").toUpperCase(),Y=(te.size||"small").toLowerCase(),le!=="AA"&&le!=="AAA"&&(le="AA"),Y!=="small"&&Y!=="large"&&(Y="small"),{level:le,size:Y}}j.exports?j.exports=l:!(L=function(){return l}.call(Q,k,Q,j),L!==void 0&&(j.exports=L))})(Math)},bQjk:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("OLod"))})(this,function(L){return function(h){var C=L,D=C.lib,u=D.CipherParams,f=C.enc,w=f.Hex,d=C.format,o=d.Hex={stringify:function(l){return l.ciphertext.toString(w)},parse:function(l){var a=w.parse(l);return u.create({ciphertext:a})}}}(),L.format.Hex})},bT9E:function(j,Q,k){"use strict";k.d(Q,"a",function(){return h});var L=k("VTBJ");function h(C,D){var u=Object(L.a)({},C);return Array.isArray(D)&&D.forEach(function(f){delete u[f]}),u}},biw7:function(j,Q,k){"use strict";var L=k("q1tI"),h=k.n(L),C=L.createContext(null);Q.a=C},c5Ni:function(j,Q,k){},cv67:function(j,Q,k){(function(L,h){j.exports=Q=h(k("Ib8C"))})(this,function(L){return function(h){var C=L,D=C.lib,u=D.WordArray,f=D.Hasher,w=C.algo,d=[];(function(){for(var c=0;c<64;c++)d[c]=h.abs(h.sin(c+1))*4294967296|0})();var o=w.MD5=f.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(c,g){for(var v=0;v<16;v++){var x=g+v,n=c[x];c[x]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var i=this._hash.words,t=c[g+0],S=c[g+1],E=c[g+2],s=c[g+3],P=c[g+4],O=c[g+5],b=c[g+6],y=c[g+7],p=c[g+8],T=c[g+9],M=c[g+10],N=c[g+11],I=c[g+12],K=c[g+13],H=c[g+14],W=c[g+15],z=i[0],U=i[1],B=i[2],G=i[3];z=l(z,U,B,G,t,7,d[0]),G=l(G,z,U,B,S,12,d[1]),B=l(B,G,z,U,E,17,d[2]),U=l(U,B,G,z,s,22,d[3]),z=l(z,U,B,G,P,7,d[4]),G=l(G,z,U,B,O,12,d[5]),B=l(B,G,z,U,b,17,d[6]),U=l(U,B,G,z,y,22,d[7]),z=l(z,U,B,G,p,7,d[8]),G=l(G,z,U,B,T,12,d[9]),B=l(B,G,z,U,M,17,d[10]),U=l(U,B,G,z,N,22,d[11]),z=l(z,U,B,G,I,7,d[12]),G=l(G,z,U,B,K,12,d[13]),B=l(B,G,z,U,H,17,d[14]),U=l(U,B,G,z,W,22,d[15]),z=a(z,U,B,G,S,5,d[16]),G=a(G,z,U,B,b,9,d[17]),B=a(B,G,z,U,N,14,d[18]),U=a(U,B,G,z,t,20,d[19]),z=a(z,U,B,G,O,5,d[20]),G=a(G,z,U,B,M,9,d[21]),B=a(B,G,z,U,W,14,d[22]),U=a(U,B,G,z,P,20,d[23]),z=a(z,U,B,G,T,5,d[24]),G=a(G,z,U,B,H,9,d[25]),B=a(B,G,z,U,s,14,d[26]),U=a(U,B,G,z,p,20,d[27]),z=a(z,U,B,G,K,5,d[28]),G=a(G,z,U,B,E,9,d[29]),B=a(B,G,z,U,y,14,d[30]),U=a(U,B,G,z,I,20,d[31]),z=_(z,U,B,G,O,4,d[32]),G=_(G,z,U,B,p,11,d[33]),B=_(B,G,z,U,N,16,d[34]),U=_(U,B,G,z,H,23,d[35]),z=_(z,U,B,G,S,4,d[36]),G=_(G,z,U,B,P,11,d[37]),B=_(B,G,z,U,y,16,d[38]),U=_(U,B,G,z,M,23,d[39]),z=_(z,U,B,G,K,4,d[40]),G=_(G,z,U,B,t,11,d[41]),B=_(B,G,z,U,s,16,d[42]),U=_(U,B,G,z,b,23,d[43]),z=_(z,U,B,G,T,4,d[44]),G=_(G,z,U,B,I,11,d[45]),B=_(B,G,z,U,W,16,d[46]),U=_(U,B,G,z,E,23,d[47]),z=m(z,U,B,G,t,6,d[48]),G=m(G,z,U,B,y,10,d[49]),B=m(B,G,z,U,H,15,d[50]),U=m(U,B,G,z,O,21,d[51]),z=m(z,U,B,G,I,6,d[52]),G=m(G,z,U,B,s,10,d[53]),B=m(B,G,z,U,M,15,d[54]),U=m(U,B,G,z,S,21,d[55]),z=m(z,U,B,G,p,6,d[56]),G=m(G,z,U,B,W,10,d[57]),B=m(B,G,z,U,b,15,d[58]),U=m(U,B,G,z,K,21,d[59]),z=m(z,U,B,G,P,6,d[60]),G=m(G,z,U,B,N,10,d[61]),B=m(B,G,z,U,E,15,d[62]),U=m(U,B,G,z,T,21,d[63]),i[0]=i[0]+z|0,i[1]=i[1]+U|0,i[2]=i[2]+B|0,i[3]=i[3]+G|0},_doFinalize:function(){var c=this._data,g=c.words,v=this._nDataBytes*8,x=c.sigBytes*8;g[x>>>5]|=128<<24-x%32;var n=h.floor(v/4294967296),i=v;g[(x+64>>>9<<4)+15]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,g[(x+64>>>9<<4)+14]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,c.sigBytes=(g.length+1)*4,this._process();for(var t=this._hash,S=t.words,E=0;E<4;E++){var s=S[E];S[E]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}return t},clone:function(){var c=f.clone.call(this);return c._hash=this._hash.clone(),c}});function l(c,g,v,x,n,i,t){var S=c+(g&v|~g&x)+n+t;return(S<<i|S>>>32-i)+g}function a(c,g,v,x,n,i,t){var S=c+(g&x|v&~x)+n+t;return(S<<i|S>>>32-i)+g}function _(c,g,v,x,n,i,t){var S=c+(g^v^x)+n+t;return(S<<i|S>>>32-i)+g}function m(c,g,v,x,n,i,t){var S=c+(v^(g|~x))+n+t;return(S<<i|S>>>32-i)+g}C.MD5=f._createHelper(o),C.HmacMD5=f._createHmacHelper(o)}(Math),L.MD5})},dejd:function(j,Q,k){},dmUQ:function(j,Q,k){"use strict";var L=k("Ff2n"),h=k("rePB"),C=k("1OyB"),D=k("vuIU"),u=k("Ji7U"),f=k("md7G"),w=k("foSv"),d=k("q1tI"),o=k.n(d),l=k("TSYQ"),a=k.n(l),_=k("4IlW");function m(p,T){var M=Object.keys(p);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(p);T&&(N=N.filter(function(I){return Object.getOwnPropertyDescriptor(p,I).enumerable})),M.push.apply(M,N)}return M}function c(p){for(var T=1;T<arguments.length;T++){var M=arguments[T]!=null?arguments[T]:{};T%2?m(Object(M),!0).forEach(function(N){Object(h.a)(p,N,M[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(M)):m(Object(M)).forEach(function(N){Object.defineProperty(p,N,Object.getOwnPropertyDescriptor(M,N))})}return p}function g(p){var T=v();return function(){var N=Object(w.a)(p),I;if(T){var K=Object(w.a)(this).constructor;I=Reflect.construct(N,arguments,K)}else I=N.apply(this,arguments);return Object(f.a)(this,I)}}function v(){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(p){return!1}}function x(){}function n(p){p.preventDefault()}var i=function(T){return T.replace(/[^\w.-]+/g,"")},t=200,S=600,E=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,s=function(T){return T!=null},P=function(T,M){return M===T||typeof M=="number"&&typeof T=="number"&&isNaN(M)&&isNaN(T)},O=function(p){Object(u.a)(M,p);var T=g(M);function M(N){var I;Object(C.a)(this,M),I=T.call(this,N),I.onKeyDown=function(W){var z=I.props,U=z.onKeyDown,B=z.onPressEnter;if(W.keyCode===_.a.UP){var G=I.getRatio(W);I.up(W,G,null),I.stop()}else if(W.keyCode===_.a.DOWN){var q=I.getRatio(W);I.down(W,q,null),I.stop()}else W.keyCode===_.a.ENTER&&B&&B(W);if(I.recordCursorPosition(),I.lastKeyCode=W.keyCode,U){for(var ae=arguments.length,se=new Array(ae>1?ae-1:0),we=1;we<ae;we++)se[we-1]=arguments[we];U.apply(void 0,[W].concat(se))}},I.onKeyUp=function(W){var z=I.props.onKeyUp;if(I.stop(),I.recordCursorPosition(),z){for(var U=arguments.length,B=new Array(U>1?U-1:0),G=1;G<U;G++)B[G-1]=arguments[G];z.apply(void 0,[W].concat(B))}},I.onChange=function(W){var z=I.props.onChange;I.state.focused&&(I.inputting=!0),I.rawInput=I.props.parser(I.getValueFromEvent(W)),I.setState({inputValue:I.rawInput}),z(I.toNumber(I.rawInput))},I.onMouseUp=function(){var W=I.props.onMouseUp;I.recordCursorPosition(),W&&W.apply(void 0,arguments)},I.onFocus=function(){var W;I.setState({focused:!0}),(W=I.props).onFocus.apply(W,arguments)},I.onBlur=function(){var W=I.props.onBlur;I.inputting=!1,I.setState({focused:!1});var z=I.getCurrentValidValue(I.state.inputValue),U=I.setValue(z,x);if(W){var B=I.input.value,G=I.getInputDisplayValue({focus:!1,value:U});I.input.value=G&&Number(G),W.apply(void 0,arguments),I.input.value=B}},I.getRatio=function(W){var z=1;return W.metaKey||W.ctrlKey?z=.1:W.shiftKey&&(z=10),z},I.getFullNum=function(W){return isNaN(W)?W:/e/i.test(String(W))?Number(W).toFixed(18).replace(/\.?0+$/,""):W},I.getPrecision=function(W){if(s(I.props.precision))return I.props.precision;var z=String(W);if(z.indexOf("e-")>=0)return parseInt(z.slice(z.indexOf("e-")+2),10);var U=0;return z.indexOf(".")>=0&&(U=z.length-z.indexOf(".")-1),U},I.getInputDisplayValue=function(W){var z=W||I.state,U=z.focused,B=z.inputValue,G=z.value,q;U?q=B:q=I.toPrecisionAsStep(G),q==null&&(q="");var ae=I.formatWrapper(q);return s(I.props.decimalSeparator)&&(ae=ae.toString().replace(".",I.props.decimalSeparator)),ae},I.recordCursorPosition=function(){try{I.cursorStart=I.input.selectionStart,I.cursorEnd=I.input.selectionEnd,I.currentValue=I.input.value,I.cursorBefore=I.input.value.substring(0,I.cursorStart),I.cursorAfter=I.input.value.substring(I.cursorEnd)}catch(W){}},I.restoreByAfter=function(W){if(W===void 0)return!1;var z=I.input.value,U=z.lastIndexOf(W);if(U===-1)return!1;var B=I.cursorBefore.length;return I.lastKeyCode===_.a.DELETE&&I.cursorBefore.charAt(B-1)===W[0]?(I.fixCaret(B,B),!0):U+W.length===z.length?(I.fixCaret(U,U),!0):!1},I.partRestoreByAfter=function(W){return W===void 0?!1:Array.prototype.some.call(W,function(z,U){var B=W.substring(U);return I.restoreByAfter(B)})},I.isNotCompleteNumber=function(W){return isNaN(W)||W===""||W===null||W&&W.toString().indexOf(".")===W.toString().length-1},I.stop=function(){I.autoStepTimer&&clearTimeout(I.autoStepTimer)},I.down=function(W,z,U){I.pressingUpOrDown=!0,I.step("down",W,z,U)},I.up=function(W,z,U){I.pressingUpOrDown=!0,I.step("up",W,z,U)},I.saveInput=function(W){I.input=W};var K=N.value;K===void 0&&(K=N.defaultValue),I.state={focused:N.autoFocus};var H=I.getValidValue(I.toNumber(K));return I.state=c(c({},I.state),{},{inputValue:I.toPrecisionAsStep(H),value:H}),I}return Object(D.a)(M,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(I){var K=this.props,H=K.value,W=K.onChange,z=K.max,U=K.min,B=this.state.focused;if(I){if(!P(I.value,H)||!P(I.max,z)||!P(I.min,U)){var G=B?H:this.getValidValue(H),q;this.pressingUpOrDown?q=G:this.inputting?q=this.rawInput:q=this.toPrecisionAsStep(G),this.setState({value:G,inputValue:q})}var ae="value"in this.props?H:this.state.value;"max"in this.props&&I.max!==z&&typeof ae=="number"&&ae>z&&W&&W(z),"min"in this.props&&I.min!==U&&typeof ae=="number"&&ae<U&&W&&W(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var se=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===_.a.BACKSPACE?se=this.cursorStart-1:this.lastKeyCode===_.a.DELETE&&(se=this.cursorStart):se=this.input.value.length,this.fixCaret(se,se)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case _.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case _.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(we){}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(I){var K=I;return K===""?K="":this.isNotCompleteNumber(parseFloat(K))?K=this.state.value:K=this.getValidValue(K),this.toNumber(K)}},{key:"getValueFromEvent",value:function(I){var K=I.target.value.trim().replace(/。/g,".");return s(this.props.decimalSeparator)&&(K=K.replace(this.props.decimalSeparator,".")),K}},{key:"getValidValue",value:function(I){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,W=parseFloat(I);return isNaN(W)?I:(W<K&&(W=K),W>H&&(W=H),W)}},{key:"setValue",value:function(I,K){var H=this.props.precision,W=this.isNotCompleteNumber(parseFloat(I))?null:parseFloat(I),z=this.state.value,U=z===void 0?null:z,B=this.state.inputValue,G=B===void 0?null:B,q=typeof W=="number"?W.toFixed(H):"".concat(W),ae=W!==U||q!=="".concat(G);return"value"in this.props?(G=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:G},K)):this.setState({value:W,inputValue:this.toPrecisionAsStep(I)},K),ae&&this.props.onChange(W),W}},{key:"getMaxPrecision",value:function(I){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.props,W=H.precision,z=H.step;if(s(W))return W;var U=this.getPrecision(K),B=this.getPrecision(z),G=this.getPrecision(I);return I?Math.max(G,U+B):U+B}},{key:"getPrecisionFactor",value:function(I){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.getMaxPrecision(I,K);return Math.pow(10,H)}},{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(I){return this.props.formatter?this.props.formatter(I):I}},{key:"toPrecisionAsStep",value:function(I){if(this.isNotCompleteNumber(I)||I==="")return I;var K=Math.abs(this.getMaxPrecision(I));return isNaN(K)?I.toString():Number(I).toFixed(K)}},{key:"toNumber",value:function(I){var K=this.props.precision,H=this.state.focused,W=I&&I.length>16&&H;return this.isNotCompleteNumber(I)||W?I:s(K)?Math.round(I*Math.pow(10,K))/Math.pow(10,K):Number(I)}},{key:"upStep",value:function(I,K){var H=this.props.step,W=this.getPrecisionFactor(I,K),z=Math.abs(this.getMaxPrecision(I,K)),U=((W*I+W*H*K)/W).toFixed(z);return this.toNumber(U)}},{key:"downStep",value:function(I,K){var H=this.props.step,W=this.getPrecisionFactor(I,K),z=Math.abs(this.getMaxPrecision(I,K)),U=((W*I-W*H*K)/W).toFixed(z);return this.toNumber(U)}},{key:"step",value:function(I,K){var H=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,z=arguments.length>3?arguments[3]:void 0;this.stop(),K&&(K.persist(),K.preventDefault());var U=this.props;if(U.disabled)return;var B=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(B))return;var G=this["".concat(I,"Step")](B,W),q=G>U.max||G<U.min;if(G>U.max?G=U.max:G<U.min&&(G=U.min),this.setValue(G,null),this.setState({focused:!0},function(){H.pressingUpOrDown=!1}),q)return;this.autoStepTimer=setTimeout(function(){H[I](K,W,!0)},z?t:S)}},{key:"fixCaret",value:function(I,K){if(I===void 0||K===void 0||!this.input||!this.input.value)return;try{var H=this.input.selectionStart,W=this.input.selectionEnd;(I!==H||K!==W)&&this.input.setSelectionRange(I,K)}catch(z){}}},{key:"render",value:function(){var I,K=this.props,H=K.prefixCls,W=K.disabled,z=K.readOnly,U=K.useTouch,B=K.autoComplete,G=K.upHandler,q=K.downHandler,ae=K.className,se=K.max,we=K.min,Se=K.style,de=K.title,xe=K.onMouseEnter,he=K.onMouseLeave,ne=K.onMouseOver,oe=K.onMouseOut,te=K.required,le=K.onClick,Y=K.tabIndex,Z=K.type,ge=K.placeholder,ee=K.id,$=K.inputMode,X=K.pattern,J=K.step,me=K.maxLength,ue=K.autoFocus,_e=K.name,He=K.onPaste,$e=K.onInput,Ye=Object(L.a)(K,["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"]),tt=this.state,nt=tt.value,it=tt.focused,Me=a()(H,(I={},Object(h.a)(I,ae,!!ae),Object(h.a)(I,"".concat(H,"-disabled"),W),Object(h.a)(I,"".concat(H,"-focused"),it),I)),Ce={};Object.keys(Ye).forEach(function(Oe){(Oe.substr(0,5)==="data-"||Oe.substr(0,5)==="aria-"||Oe==="role")&&(Ce[Oe]=Ye[Oe])});var Je=!z&&!W,rt=this.getInputDisplayValue(null),ze=(nt||nt===0)&&(isNaN(nt)||Number(nt)>=se),et=(nt||nt===0)&&(isNaN(nt)||Number(nt)<=we),ke=ze||W||z,Re=et||W||z,Te=a()("".concat(H,"-handler"),"".concat(H,"-handler-up"),Object(h.a)({},"".concat(H,"-handler-up-disabled"),ke)),fe=a()("".concat(H,"-handler"),"".concat(H,"-handler-down"),Object(h.a)({},"".concat(H,"-handler-down-disabled"),Re)),ye=U?{onTouchStart:ke?x:this.up,onTouchEnd:this.stop}:{onMouseDown:ke?x:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ee=U?{onTouchStart:Re?x:this.down,onTouchEnd:this.stop}:{onMouseDown:Re?x:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return o.a.createElement("div",{className:Me,style:Se,title:de,onMouseEnter:xe,onMouseLeave:he,onMouseOver:ne,onMouseOut:oe,onFocus:function(){return null},onBlur:function(){return null}},o.a.createElement("div",{className:"".concat(H,"-handler-wrap")},o.a.createElement("span",Object.assign({unselectable:"on"},ye,{role:"button","aria-label":"Increase Value","aria-disabled":ke,className:Te}),G||o.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-up-inner"),onClick:n})),o.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Decrease Value","aria-disabled":Re,className:fe}),q||o.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-down-inner"),onClick:n}))),o.a.createElement("div",{className:"".concat(H,"-input-wrap")},o.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":we,"aria-valuemax":se,"aria-valuenow":nt,required:te,type:Z,placeholder:ge,onPaste:He,onClick:le,onMouseUp:this.onMouseUp,className:"".concat(H,"-input"),tabIndex:Y,autoComplete:B,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Je?this.onKeyDown:x,onKeyUp:Je?this.onKeyUp:x,autoFocus:ue,maxLength:me,readOnly:z,disabled:W,max:se,min:we,step:J,name:_e,title:de,id:ee,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(rt),pattern:X,inputMode:$,onInput:$e},Ce))))}}]),M}(o.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:E,min:-E,step:1,style:{},onChange:x,onKeyDown:x,onPressEnter:x,onFocus:x,onBlur:x,parser:i,required:!1,autoComplete:"off"};var b=O,y=Q.a=b},e7zE:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("3y9D"),k("WYAk"))})(this,function(L){return function(){var h=L,C=h.lib,D=C.Base,u=C.WordArray,f=h.algo,w=f.SHA1,d=f.HMAC,o=f.PBKDF2=D.extend({cfg:D.extend({keySize:128/32,hasher:w,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,a){for(var _=this.cfg,m=d.create(_.hasher,l),c=u.create(),g=u.create([1]),v=c.words,x=g.words,n=_.keySize,i=_.iterations;v.length<n;){var t=m.update(a).finalize(g);m.reset();for(var S=t.words,E=S.length,s=t,P=1;P<i;P++){s=m.finalize(s),m.reset();for(var O=s.words,b=0;b<E;b++)S[b]^=O[b]}c.concat(t),x[0]++}return c.sigBytes=n*4,c}});h.PBKDF2=function(l,a,_){return o.create(_).compute(l,a)}}(),L.PBKDF2})},fyJ8:function(j,Q,k){"use strict";var L=k("rePB"),h=k("VTBJ"),C=k("Ff2n"),D=k("U8pU"),u=k("q1tI"),f=k.n(u),w=k("TSYQ"),d=k.n(w),o=k("c+Xe"),l=k("sR1s");function a(v){return v&&Object(D.a)(v)==="object"&&!Array.isArray(v)&&!u.isValidElement(v)}function _(v){return typeof v=="string"?!0:Object(o.c)(v)}function m(v,x){var n,i=v.prefixCls,t=v.className,S=v.record,E=v.index,s=v.dataIndex,P=v.render,O=v.children,b=v.component,y=b===void 0?"td":b,p=v.colSpan,T=v.rowSpan,M=v.fixLeft,N=v.fixRight,I=v.firstFixLeft,K=v.lastFixLeft,H=v.firstFixRight,W=v.lastFixRight,z=v.appendNode,U=v.additionalProps,B=U===void 0?{}:U,G=v.ellipsis,q=v.align,ae=v.rowType,se=v.isSticky,we="".concat(i,"-cell"),Se,de;if(O)de=O;else{var xe=Object(l.b)(S,s);if(de=xe,P){var he=P(xe,S,E);a(he)?(de=he.children,Se=he.props):de=he}}Object(D.a)(de)==="object"&&!Array.isArray(de)&&!u.isValidElement(de)&&(de=null),G&&(K||H)&&(de=u.createElement("span",{className:"".concat(we,"-content")},de));var ne=Se||{},oe=ne.colSpan,te=ne.rowSpan,le=ne.style,Y=ne.className,Z=Object(C.a)(ne,["colSpan","rowSpan","style","className"]),ge=oe!==void 0?oe:p,ee=te!==void 0?te:T;if(ge===0||ee===0)return null;var $={},X=typeof M=="number",J=typeof N=="number";X&&($.position="sticky",$.left=M),J&&($.position="sticky",$.right=N);var me={};q&&(me.textAlign=q);var ue,_e=G===!0?{showTitle:!0}:G;_e&&(_e.showTitle||ae==="header")&&(typeof de=="string"||typeof de=="number"?ue=de.toString():u.isValidElement(de)&&typeof de.props.children=="string"&&(ue=de.props.children));var He=Object(h.a)(Object(h.a)(Object(h.a)({title:ue},Z),B),{},{colSpan:ge&&ge!==1?ge:null,rowSpan:ee&&ee!==1?ee:null,className:d()(we,t,(n={},Object(L.a)(n,"".concat(we,"-fix-left"),X),Object(L.a)(n,"".concat(we,"-fix-left-first"),I),Object(L.a)(n,"".concat(we,"-fix-left-last"),K),Object(L.a)(n,"".concat(we,"-fix-right"),J),Object(L.a)(n,"".concat(we,"-fix-right-first"),H),Object(L.a)(n,"".concat(we,"-fix-right-last"),W),Object(L.a)(n,"".concat(we,"-ellipsis"),G),Object(L.a)(n,"".concat(we,"-with-append"),z),Object(L.a)(n,"".concat(we,"-fix-sticky"),(X||J)&&se),n),B.className,Y),style:Object(h.a)(Object(h.a)(Object(h.a)(Object(h.a)({},B.style),me),$),le),ref:_(y)?x:null});return u.createElement(y,Object.assign({},He),z,de)}var c=u.forwardRef(m);c.displayName="Cell";var g=u.memo(c,function(v,x){return x.shouldCellUpdate?!x.shouldCellUpdate(x.record,v.record):!1});Q.a=g},gJ3r:function(j,Q,k){"use strict";k.d(Q,"a",function(){return L});var L=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},"gb/T":function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("OLod"))})(this,function(L){return L.mode.ECB=function(){var h=L.lib.BlockCipherMode.extend();return h.Encryptor=h.extend({processBlock:function(C,D){this._cipher.encryptBlock(C,D)}}),h.Decryptor=h.extend({processBlock:function(C,D){this._cipher.decryptBlock(C,D)}}),h}(),L.mode.ECB})},h78n:function(j,Q,k){"use strict";k.d(Q,"a",function(){return I});var L=k("q1tI"),h=k.n(L),C=k("TSYQ"),D=k.n(C),u={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},f=function(W){var z=W.map(function(){return Object(L.useRef)()}),U=Object(L.useRef)();return Object(L.useEffect)(function(){var B=Date.now(),G=!1;Object.keys(z).forEach(function(q){var ae=z[q].current;if(!ae)return;G=!0;var se=ae.style;se.transitionDuration=".3s, .3s, .3s, .06s",U.current&&B-U.current<100&&(se.transitionDuration="0s, 0s")}),G&&(U.current=Date.now())}),[z]};function w(){return w=Object.assign||function(H){for(var W=1;W<arguments.length;W++){var z=arguments[W];for(var U in z)Object.prototype.hasOwnProperty.call(z,U)&&(H[U]=z[U])}return H},w.apply(this,arguments)}function d(H,W){return m(H)||_(H,W)||l(H,W)||o()}function o(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l(H,W){if(!H)return;if(typeof H=="string")return a(H,W);var z=Object.prototype.toString.call(H).slice(8,-1);if(z==="Object"&&H.constructor&&(z=H.constructor.name),z==="Map"||z==="Set")return Array.from(H);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return a(H,W)}function a(H,W){(W==null||W>H.length)&&(W=H.length);for(var z=0,U=new Array(W);z<W;z++)U[z]=H[z];return U}function _(H,W){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(H)))return;var z=[],U=!0,B=!1,G=void 0;try{for(var q=H[Symbol.iterator](),ae;!(U=(ae=q.next()).done)&&!(z.push(ae.value),W&&z.length===W);U=!0);}catch(se){B=!0,G=se}finally{try{!U&&q.return!=null&&q.return()}finally{if(B)throw G}}return z}function m(H){if(Array.isArray(H))return H}function c(H,W){if(H==null)return{};var z=g(H,W),U,B;if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(H);for(B=0;B<G.length;B++){if(U=G[B],W.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(H,U))continue;z[U]=H[U]}}return z}function g(H,W){if(H==null)return{};var z={},U=Object.keys(H),B,G;for(G=0;G<U.length;G++){if(B=U[G],W.indexOf(B)>=0)continue;z[B]=H[B]}return z}var v=function(W){var z=W.className,U=W.percent,B=W.prefixCls,G=W.strokeColor,q=W.strokeLinecap,ae=W.strokeWidth,se=W.style,we=W.trailColor,Se=W.trailWidth,de=W.transition,xe=c(W,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete xe.gapPosition;var he=Array.isArray(U)?U:[U],ne=Array.isArray(G)?G:[G],oe=f(he),te=d(oe,1),le=te[0],Y=ae/2,Z=100-ae/2,ge="M ".concat(q==="round"?Y:0,",").concat(Y,`
|
|
|
L `).concat(q==="round"?Z:100,",").concat(Y),ee="0 0 100 ".concat(ae),$=0;return h.a.createElement("svg",w({className:D()("".concat(B,"-line"),z),viewBox:ee,preserveAspectRatio:"none",style:se},xe),h.a.createElement("path",{className:"".concat(B,"-line-trail"),d:ge,strokeLinecap:q,stroke:we,strokeWidth:Se||ae,fillOpacity:"0"}),he.map(function(X,J){var me={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat($,"px"),transition:de||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ue=ne[J]||ne[ne.length-1];return $+=X,h.a.createElement("path",{key:J,className:"".concat(B,"-line-path"),d:ge,strokeLinecap:q,stroke:ue,strokeWidth:ae,fillOpacity:"0",ref:le[J],style:me})}))};v.defaultProps=u;var x=v;function n(){return n=Object.assign||function(H){for(var W=1;W<arguments.length;W++){var z=arguments[W];for(var U in z)Object.prototype.hasOwnProperty.call(z,U)&&(H[U]=z[U])}return H},n.apply(this,arguments)}function i(H,W){return P(H)||s(H,W)||S(H,W)||t()}function t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S(H,W){if(!H)return;if(typeof H=="string")return E(H,W);var z=Object.prototype.toString.call(H).slice(8,-1);if(z==="Object"&&H.constructor&&(z=H.constructor.name),z==="Map"||z==="Set")return Array.from(H);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return E(H,W)}function E(H,W){(W==null||W>H.length)&&(W=H.length);for(var z=0,U=new Array(W);z<W;z++)U[z]=H[z];return U}function s(H,W){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(H)))return;var z=[],U=!0,B=!1,G=void 0;try{for(var q=H[Symbol.iterator](),ae;!(U=(ae=q.next()).done)&&!(z.push(ae.value),W&&z.length===W);U=!0);}catch(se){B=!0,G=se}finally{try{!U&&q.return!=null&&q.return()}finally{if(B)throw G}}return z}function P(H){if(Array.isArray(H))return H}function O(H,W){if(H==null)return{};var z=b(H,W),U,B;if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(H);for(B=0;B<G.length;B++){if(U=G[B],W.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(H,U))continue;z[U]=H[U]}}return z}function b(H,W){if(H==null)return{};var z={},U=Object.keys(H),B,G;for(G=0;G<U.length;G++){if(B=U[G],W.indexOf(B)>=0)continue;z[B]=H[B]}return z}var y=0;function p(H){return+H.replace("%","")}function T(H){return Array.isArray(H)?H:[H]}function M(H,W,z,U){var B=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,G=arguments.length>5?arguments[5]:void 0,q=50-U/2,ae=0,se=-q,we=0,Se=-2*q;switch(G){case"left":ae=-q,se=0,we=2*q,Se=0;break;case"right":ae=q,se=0,we=-2*q,Se=0;break;case"bottom":se=q,Se=2*q;break;default:}var de="M 50,50 m ".concat(ae,",").concat(se,`
|
|
|
a `).concat(q,",").concat(q," 0 1 1 ").concat(we,",").concat(-Se,`
|
|
|
a `).concat(q,",").concat(q," 0 1 1 ").concat(-we,",").concat(Se),xe=Math.PI*2*q,he={stroke:z,strokeDasharray:"".concat(W/100*(xe-B),"px ").concat(xe,"px"),strokeDashoffset:"-".concat(B/2+H/100*(xe-B),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:de,pathStyle:he}}var N=function(W){var z=W.prefixCls,U=W.strokeWidth,B=W.trailWidth,G=W.gapDegree,q=W.gapPosition,ae=W.trailColor,se=W.strokeLinecap,we=W.style,Se=W.className,de=W.strokeColor,xe=W.percent,he=O(W,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ne=Object(L.useMemo)(function(){return y+=1,y},[]),oe=M(0,100,ae,U,G,q),te=oe.pathString,le=oe.pathStyle,Y=T(xe),Z=T(de),ge=Z.find(function(me){return Object.prototype.toString.call(me)==="[object Object]"}),ee=f(Y),$=i(ee,1),X=$[0],J=function(){var ue=0;return Y.map(function(_e,He){var $e=Z[He]||Z[Z.length-1],Ye=Object.prototype.toString.call($e)==="[object Object]"?"url(#".concat(z,"-gradient-").concat(ne,")"):"",tt=M(ue,_e,$e,U,G,q);return ue+=_e,h.a.createElement("path",{key:He,className:"".concat(z,"-circle-path"),d:tt.pathString,stroke:Ye,strokeLinecap:se,strokeWidth:U,opacity:_e===0?0:1,fillOpacity:"0",style:tt.pathStyle,ref:X[He]})})};return h.a.createElement("svg",n({className:D()("".concat(z,"-circle"),Se),viewBox:"0 0 100 100",style:we},he),ge&&h.a.createElement("defs",null,h.a.createElement("linearGradient",{id:"".concat(z,"-gradient-").concat(ne),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(ge).sort(function(me,ue){return p(me)-p(ue)}).map(function(me,ue){return h.a.createElement("stop",{key:ue,offset:me,stopColor:ge[me]})}))),h.a.createElement("path",{className:"".concat(z,"-circle-trail"),d:te,stroke:ae,strokeLinecap:se,strokeWidth:B||U,fillOpacity:"0",style:le}),J().reverse())};N.defaultProps=u;var I=N,K={Line:x,Circle:I}},hW8S:function(j,Q,k){"use strict";k.d(Q,"a",function(){return D}),k.d(Q,"c",function(){return u}),k.d(Q,"b",function(){return f});var L=k("VTBJ"),h=k("Ff2n"),C=k("Kwbf"),D="RC_TABLE_INTERNAL_COL_DEFINE";function u(w){var d=w.expandable,o=Object(h.a)(w,["expandable"]);return"expandable"in w?Object(L.a)(Object(L.a)({},o),d):o}function f(w){return Object.keys(w).reduce(function(d,o){return(o.substr(0,5)==="data-"||o.substr(0,5)==="aria-")&&(d[o]=w[o]),d},{})}},jO9C:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.Iso97971={pad:function(h,C){h.concat(L.lib.WordArray.create([2147483648],1)),L.pad.ZeroPadding.pad(h,C)},unpad:function(h){L.pad.ZeroPadding.unpad(h),h.sigBytes--}},L.pad.Iso97971})},jwmR:function(j,Q,k){j.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(j,Q,k){"use strict";k.d(Q,"a",function(){return yr});var L=k("rePB"),h=k("ODXe"),C=k("Ff2n"),D=k("VTBJ"),u=k("q1tI"),f=k("TSYQ"),w=k.n(f),d=k("Zm9Q"),o=k("6cGi"),l=k("KQm4"),a=k("xEkU"),_=k.n(a),m=k("t23M");function c(De){var Fe=Object(u.useRef)(),Ke=Object(u.useRef)(!1);function Pe(){for(var pe=arguments.length,Ae=new Array(pe),be=0;be<pe;be++)Ae[be]=arguments[be];Ke.current||(_.a.cancel(Fe.current),Fe.current=_()(function(){De.apply(void 0,Ae)}))}return Object(u.useEffect)(function(){return function(){Ke.current=!0,_.a.cancel(Fe.current)}},[]),Pe}function g(De){var Fe=Object(u.useRef)([]),Ke=Object(u.useState)({}),Pe=Object(h.a)(Ke,2),pe=Pe[1],Ae=Object(u.useRef)(typeof De=="function"?De():De),be=c(function(){var Ne=Ae.current;Fe.current.forEach(function(Ue){Ne=Ue(Ne)}),Fe.current=[],Ae.current=Ne,pe({})});function Le(Ne){Fe.current.push(Ne),be()}return[Ae.current,Le]}var v=k("4IlW");function x(De,Fe){var Ke,Pe=De.prefixCls,pe=De.id,Ae=De.active,be=De.rtl,Le=De.tab,Ne=Le.key,Ue=Le.tab,je=Le.disabled,Ge=Le.closeIcon,at=De.tabBarGutter,bt=De.tabPosition,Ot=De.closable,Wt=De.renderWrapper,vr=De.removeAriaLabel,kr=De.editable,Ir=De.onClick,Fr=De.onRemove,Lr=De.onFocus,Kr="".concat(Pe,"-tab");u.useEffect(function(){return Fr},[]);var Gr={};bt==="top"||bt==="bottom"?Gr[be?"marginLeft":"marginRight"]=at:Gr.marginBottom=at;var nn=kr&&Ot!==!1&&!je;function Qr(wr){if(je)return;Ir(wr)}function En(wr){wr.preventDefault(),wr.stopPropagation(),kr.onEdit("remove",{key:Ne,event:wr})}var en=u.createElement("div",{key:Ne,ref:Fe,className:w()(Kr,(Ke={},Object(L.a)(Ke,"".concat(Kr,"-with-remove"),nn),Object(L.a)(Ke,"".concat(Kr,"-active"),Ae),Object(L.a)(Ke,"".concat(Kr,"-disabled"),je),Ke)),style:Gr,onClick:Qr},u.createElement("div",{role:"tab","aria-selected":Ae,id:pe&&"".concat(pe,"-tab-").concat(Ne),className:"".concat(Kr,"-btn"),"aria-controls":pe&&"".concat(pe,"-panel-").concat(Ne),"aria-disabled":je,tabIndex:je?null:0,onClick:function(Tr){Tr.stopPropagation(),Qr(Tr)},onKeyDown:function(Tr){[v.a.SPACE,v.a.ENTER].includes(Tr.which)&&(Tr.preventDefault(),Qr(Tr))},onFocus:Lr},Ue),nn&&u.createElement("button",{type:"button","aria-label":vr||"remove",tabIndex:0,className:"".concat(Kr,"-remove"),onClick:function(Tr){Tr.stopPropagation(),En(Tr)}},Ge||kr.removeIcon||"\xD7"));return Wt&&(en=Wt(en)),en}var n=u.forwardRef(x),i={width:0,height:0,left:0,top:0};function t(De,Fe,Ke){return Object(u.useMemo)(function(){for(var Pe,pe=new Map,Ae=Fe.get((Pe=De[0])===null||Pe===void 0?void 0:Pe.key)||i,be=Ae.left+Ae.width,Le=0;Le<De.length;Le+=1){var Ne=De[Le].key,Ue=Fe.get(Ne);if(!Ue){var je;Ue=Fe.get((je=De[Le-1])===null||je===void 0?void 0:je.key)||i}var Ge=pe.get(Ne)||Object(D.a)({},Ue);Ge.right=be-Ge.left-Ge.width,pe.set(Ne,Ge)}return pe},[De.map(function(Pe){return Pe.key}).join("_"),Fe,Ke])}var S={width:0,height:0,left:0,top:0,right:0};function E(De,Fe,Ke,Pe,pe){var Ae=pe.tabs,be=pe.tabPosition,Le=pe.rtl,Ne,Ue,je;["top","bottom"].includes(be)?(Ne="width",Ue=Le?"right":"left",je=Math.abs(Fe.left)):(Ne="height",Ue="top",je=-Fe.top);var Ge=Fe[Ne],at=Ke[Ne],bt=Pe[Ne],Ot=Ge;return at+bt>Ge&&(Ot=Ge-bt),Object(u.useMemo)(function(){if(!Ae.length)return[0,0];for(var Wt=Ae.length,vr=Wt,kr=0;kr<Wt;kr+=1){var Ir=De.get(Ae[kr].key)||S;if(Ir[Ue]+Ir[Ne]>je+Ot){vr=kr-1;break}}for(var Fr=0,Lr=Wt-1;Lr>=0;Lr-=1){var Kr=De.get(Ae[Lr].key)||S;if(Kr[Ue]<je){Fr=Lr+1;break}}return[Fr,vr]},[De,je,Ot,be,Ae.map(function(Wt){return Wt.key}).join("_"),Le])}var s=k("wx14"),P=k("1OyB"),O=k("vuIU"),b=k("JX7q"),y=k("Ji7U"),p=k("LK+K"),T=k("I8Z2"),M=k("bT9E"),N=k("2GS6"),I=k("Gytx"),K=k.n(I),H=k("U8pU"),W=/iPhone/i,z=/iPod/i,U=/iPad/i,B=/\bAndroid(?:.+)Mobile\b/i,G=/Android/i,q=/\bAndroid(?:.+)SD4930UR\b/i,ae=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,se=/Windows Phone/i,we=/\bWindows(?:.+)ARM\b/i,Se=/BlackBerry/i,de=/BB10/i,xe=/Opera Mini/i,he=/\b(CriOS|Chrome)(?:.+)Mobile/i,ne=/Mobile(?:.+)Firefox\b/i;function oe(De,Fe){return De.test(Fe)}function te(De){var Fe=De||(typeof navigator!="undefined"?navigator.userAgent:""),Ke=(Fe||"").split("[FBAN");if(typeof Ke[1]!="undefined"){var Pe=Ke,pe=Object(h.a)(Pe,1);Fe=pe[0]}if(Ke=Fe.split("Twitter"),typeof Ke[1]!="undefined"){var Ae=Ke,be=Object(h.a)(Ae,1);Fe=be[0]}var Le={apple:{phone:oe(W,Fe)&&!oe(se,Fe),ipod:oe(z,Fe),tablet:!oe(W,Fe)&&oe(U,Fe)&&!oe(se,Fe),device:(oe(W,Fe)||oe(z,Fe)||oe(U,Fe))&&!oe(se,Fe)},amazon:{phone:oe(q,Fe),tablet:!oe(q,Fe)&&oe(ae,Fe),device:oe(q,Fe)||oe(ae,Fe)},android:{phone:!oe(se,Fe)&&oe(q,Fe)||!oe(se,Fe)&&oe(B,Fe),tablet:!oe(se,Fe)&&!oe(q,Fe)&&!oe(B,Fe)&&(oe(ae,Fe)||oe(G,Fe)),device:!oe(se,Fe)&&(oe(q,Fe)||oe(ae,Fe)||oe(B,Fe)||oe(G,Fe))||oe(/\bokhttp\b/i,Fe)},windows:{phone:oe(se,Fe),tablet:oe(we,Fe),device:oe(se,Fe)||oe(we,Fe)},other:{blackberry:oe(Se,Fe),blackberry10:oe(de,Fe),opera:oe(xe,Fe),firefox:oe(ne,Fe),chrome:oe(he,Fe),device:oe(Se,Fe)||oe(de,Fe)||oe(xe,Fe)||oe(ne,Fe)||oe(he,Fe)},any:null,phone:null,tablet:null};return Le.any=Le.apple.device||Le.android.device||Le.windows.device||Le.other.device,Le.phone=Le.apple.phone||Le.android.phone||Le.windows.phone,Le.tablet=Le.apple.tablet||Le.android.tablet||Le.windows.tablet,Le}var le=Object(D.a)(Object(D.a)({},te()),{},{isMobile:te}),Y=le;function Z(){}function ge(De,Fe,Ke){var Pe=Fe||"";return De.key||"".concat(Pe,"item_").concat(Ke)}function ee(De){return"".concat(De,"-menu-")}function $(De,Fe){var Ke=-1;u.Children.forEach(De,function(Pe){Ke+=1,Pe&&Pe.type&&Pe.type.isMenuItemGroup?u.Children.forEach(Pe.props.children,function(pe){Ke+=1,Fe(pe,Ke)}):Fe(Pe,Ke)})}function X(De,Fe,Ke){if(!De||Ke.find)return;u.Children.forEach(De,function(Pe){if(Pe){var pe=Pe.type;if(!pe||!(pe.isSubMenu||pe.isMenuItem||pe.isMenuItemGroup))return;Fe.indexOf(Pe.key)!==-1?Ke.find=!0:Pe.props.children&&X(Pe.props.children,Fe,Ke)}})}var J=["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"],me=function(Fe){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pe=Fe&&typeof Fe.getBoundingClientRect=="function"&&Fe.getBoundingClientRect().width;if(Pe){if(Ke){var pe=getComputedStyle(Fe),Ae=pe.marginLeft,be=pe.marginRight;Pe+=+Ae.replace("px","")+ +be.replace("px","")}Pe=+Pe.toFixed(6)}return Pe||0},ue=function(Fe,Ke,Pe){Fe&&Object(H.a)(Fe.style)==="object"&&(Fe.style[Ke]=Pe)},_e=function(){return Y.any},He=k("bdgK"),$e=k("i8i4"),Ye=k.n($e),tt=k("wgJM"),nt=k("l4aY"),it=k("m+aA"),Me=k("c+Xe"),Ce=k("zT1h"),Je=k("QC+M");function rt(De,Fe,Ke){return Ke?De[0]===Fe[0]:De[0]===Fe[0]&&De[1]===Fe[1]}function ze(De,Fe,Ke){var Pe=De[Fe]||{};return Object(D.a)(Object(D.a)({},Pe),Ke)}function et(De,Fe,Ke,Pe){for(var pe=Ke.points,Ae=Object.keys(De),be=0;be<Ae.length;be+=1){var Le=Ae[be];if(rt(De[Le].points,pe,Pe))return"".concat(Fe,"-placement-").concat(Le)}return""}var ke=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var De=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(De)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(De==null?void 0:De.substr(0,4)))},Re=k("MNnm");function Te(De,Fe){var Ke={};return Ke[De.toLowerCase()]=Fe.toLowerCase(),Ke["Webkit".concat(De)]="webkit".concat(Fe),Ke["Moz".concat(De)]="moz".concat(Fe),Ke["ms".concat(De)]="MS".concat(Fe),Ke["O".concat(De)]="o".concat(Fe.toLowerCase()),Ke}function fe(De,Fe){var Ke={animationend:Te("Animation","AnimationEnd"),transitionend:Te("Transition","TransitionEnd")};return De&&("AnimationEvent"in Fe||delete Ke.animationend.animation,"TransitionEvent"in Fe||delete Ke.transitionend.transition),Ke}var ye=fe(Object(Re.a)(),typeof window!="undefined"?window:{}),Ee={};if(Object(Re.a)()){var Oe=document.createElement("div");Ee=Oe.style}var We={};function Ve(De){if(We[De])return We[De];var Fe=ye[De];if(Fe)for(var Ke=Object.keys(Fe),Pe=Ke.length,pe=0;pe<Pe;pe+=1){var Ae=Ke[pe];if(Object.prototype.hasOwnProperty.call(Fe,Ae)&&Ae in Ee)return We[De]=Fe[Ae],We[De]}return""}var ut=Ve("animationend"),ft=Ve("transitionend"),Dt=!!(ut&&ft),Mt=ut||"animationend",lr=ft||"transitionend";function dr(De,Fe){if(!De)return null;if(Object(H.a)(De)==="object"){var Ke=Fe.replace(/-\w/g,function(Pe){return Pe[1].toUpperCase()});return De[Ke]}return"".concat(De,"-").concat(Fe)}var Tt="none",$r="appear",Ur="enter",Br="leave",ln="none",br="prepare",Zr="start",qr="active",Pr="end";function fn(De){var Fe=Object(u.useRef)(!1),Ke=Object(u.useState)(De),Pe=Object(h.a)(Ke,2),pe=Pe[0],Ae=Pe[1];function be(Le){Fe.current||Ae(Le)}return Object(u.useEffect)(function(){return function(){Fe.current=!0}},[]),[pe,be]}var bn=Object(Re.a)()?u.useLayoutEffect:u.useEffect,Gn=bn,hn=function(){var De=u.useRef(null);function Fe(){tt.a.cancel(De.current)}function Ke(Pe){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Fe();var Ae=Object(tt.a)(function(){pe<=1?Pe({isCanceled:function(){return Ae!==De.current}}):Ke(Pe,pe-1)});De.current=Ae}return u.useEffect(function(){return function(){Fe()}},[]),[Ke,Fe]},ca=[br,Zr,qr,Pr],wa=!1,mn=!0;function Yt(De){return De===qr||De===Pr}var kn=function(De,Fe){var Ke=u.useState(ln),Pe=Object(h.a)(Ke,2),pe=Pe[0],Ae=Pe[1],be=hn(),Le=Object(h.a)(be,2),Ne=Le[0],Ue=Le[1];function je(){Ae(br)}return Gn(function(){if(pe!==ln&&pe!==Pr){var Ge=ca.indexOf(pe),at=ca[Ge+1],bt=Fe(pe);bt===wa?Ae(at):Ne(function(Ot){function Wt(){if(Ot.isCanceled())return;Ae(at)}bt===!0?Wt():Promise.resolve(bt).then(Wt)})}},[De,pe]),u.useEffect(function(){return function(){Ue()}},[]),[je,pe]},va=function(De){var Fe=Object(u.useRef)(),Ke=Object(u.useRef)(De);Ke.current=De;var Pe=u.useCallback(function(be){Ke.current(be)},[]);function pe(be){be&&(be.removeEventListener(lr,Pe),be.removeEventListener(Mt,Pe))}function Ae(be){Fe.current&&Fe.current!==be&&pe(Fe.current),be&&be!==Fe.current&&(be.addEventListener(lr,Pe),be.addEventListener(Mt,Pe),Fe.current=be)}return u.useEffect(function(){return function(){pe(Fe.current)}},[]),[Ae,pe]};function Vn(De,Fe,Ke,Pe){var pe=Pe.motionEnter,Ae=pe===void 0?!0:pe,be=Pe.motionAppear,Le=be===void 0?!0:be,Ne=Pe.motionLeave,Ue=Ne===void 0?!0:Ne,je=Pe.motionDeadline,Ge=Pe.motionLeaveImmediately,at=Pe.onAppearPrepare,bt=Pe.onEnterPrepare,Ot=Pe.onLeavePrepare,Wt=Pe.onAppearStart,vr=Pe.onEnterStart,kr=Pe.onLeaveStart,Ir=Pe.onAppearActive,Fr=Pe.onEnterActive,Lr=Pe.onLeaveActive,Kr=Pe.onAppearEnd,Gr=Pe.onEnterEnd,nn=Pe.onLeaveEnd,Qr=Pe.onVisibleChanged,En=fn(),en=Object(h.a)(En,2),wr=en[0],Tr=en[1],zr=fn(Tt),an=Object(h.a)(zr,2),hr=an[0],cn=an[1],Un=fn(null),xn=Object(h.a)(Un,2),Rn=xn[0],Dn=xn[1],Hn=Object(u.useRef)(!1),oa=Object(u.useRef)(null),Kn=Object(u.useRef)(!1),ba=Object(u.useRef)(null);function ka(){var Pn=Ke();return Pn||ba.current}var Ra=Object(u.useRef)(!1);function aa(Pn){var yn=ka();if(Pn&&!Pn.deadline&&Pn.target!==yn)return;var ea;hr===$r&&Ra.current?ea=Kr==null?void 0:Kr(yn,Pn):hr===Ur&&Ra.current?ea=Gr==null?void 0:Gr(yn,Pn):hr===Br&&Ra.current&&(ea=nn==null?void 0:nn(yn,Pn)),ea!==!1&&!Kn.current&&(cn(Tt),Dn(null))}var In=va(aa),Cn=Object(h.a)(In,1),Xn=Cn[0],Bn=u.useMemo(function(){var Pn,yn,ea;switch(hr){case"appear":return Pn={},Object(L.a)(Pn,br,at),Object(L.a)(Pn,Zr,Wt),Object(L.a)(Pn,qr,Ir),Pn;case"enter":return yn={},Object(L.a)(yn,br,bt),Object(L.a)(yn,Zr,vr),Object(L.a)(yn,qr,Fr),yn;case"leave":return ea={},Object(L.a)(ea,br,Ot),Object(L.a)(ea,Zr,kr),Object(L.a)(ea,qr,Lr),ea;default:return{}}},[hr]),Fa=kn(hr,function(Pn){if(Pn===br){var yn=Bn[br];return yn?yn(ka()):wa}if(On in Bn){var ea;Dn(((ea=Bn[On])===null||ea===void 0?void 0:ea.call(Bn,ka(),null))||null)}return On===qr&&(Xn(ka()),je>0&&(clearTimeout(oa.current),oa.current=setTimeout(function(){aa({deadline:!0})},je))),mn}),ha=Object(h.a)(Fa,2),Da=ha[0],On=ha[1],tn=Yt(On);Ra.current=tn,Gn(function(){Tr(Fe);var Pn=Hn.current;if(Hn.current=!0,!De)return;var yn;!Pn&&Fe&&Le&&(yn=$r),Pn&&Fe&&Ae&&(yn=Ur),(Pn&&!Fe&&Ue||!Pn&&Ge&&!Fe&&Ue)&&(yn=Br),yn&&(cn(yn),Da())},[Fe]),Object(u.useEffect)(function(){(hr===$r&&!Le||hr===Ur&&!Ae||hr===Br&&!Ue)&&cn(Tt)},[Le,Ae,Ue]),Object(u.useEffect)(function(){return function(){clearTimeout(oa.current),Kn.current=!0}},[]),Object(u.useEffect)(function(){wr!==void 0&&hr===Tt&&(Qr==null||Qr(wr))},[wr,hr]);var Za=Rn;return Bn[br]&&On===Zr&&(Za=Object(D.a)({transition:"none"},Za)),[hr,On,Za,wr!=null?wr:Fe]}var Xr=function(De){Object(y.a)(Ke,De);var Fe=Object(p.a)(Ke);function Ke(){return Object(P.a)(this,Ke),Fe.apply(this,arguments)}return Object(O.a)(Ke,[{key:"render",value:function(){return this.props.children}}]),Ke}(u.Component),Fn=Xr;function da(De){var Fe=De;Object(H.a)(De)==="object"&&(Fe=De.transitionSupport);function Ke(pe){return!!(pe.motionName&&Fe)}var Pe=u.forwardRef(function(pe,Ae){var be=pe.visible,Le=be===void 0?!0:be,Ne=pe.removeOnLeave,Ue=Ne===void 0?!0:Ne,je=pe.forceRender,Ge=pe.children,at=pe.motionName,bt=pe.leavedClassName,Ot=pe.eventProps,Wt=Ke(pe),vr=Object(u.useRef)(),kr=Object(u.useRef)();function Ir(){try{return Object(it.a)(vr.current||kr.current)}catch(cn){return null}}var Fr=Vn(Wt,Le,Ir,pe),Lr=Object(h.a)(Fr,4),Kr=Lr[0],Gr=Lr[1],nn=Lr[2],Qr=Lr[3],En=u.useRef(Qr);Qr&&(En.current=!0);var en=Object(u.useRef)(Ae);en.current=Ae;var wr=u.useCallback(function(cn){vr.current=cn,Object(Me.b)(en.current,cn)},[]),Tr,zr=Object(D.a)(Object(D.a)({},Ot),{},{visible:Le});if(!Ge)Tr=null;else if(Kr===Tt||!Ke(pe))Qr?Tr=Ge(Object(D.a)({},zr),wr):!Ue&&En.current?Tr=Ge(Object(D.a)(Object(D.a)({},zr),{},{className:bt}),wr):je?Tr=Ge(Object(D.a)(Object(D.a)({},zr),{},{style:{display:"none"}}),wr):Tr=null;else{var an,hr;Gr===br?hr="prepare":Yt(Gr)?hr="active":Gr===Zr&&(hr="start"),Tr=Ge(Object(D.a)(Object(D.a)({},zr),{},{className:w()(dr(at,Kr),(an={},Object(L.a)(an,dr(at,"".concat(Kr,"-").concat(hr)),hr),Object(L.a)(an,at,typeof at=="string"),an)),style:nn}),wr)}return u.createElement(Fn,{ref:kr},Tr)});return Pe.displayName="CSSMotion",Pe}var Zn=da(Dt),St="add",ir="keep",$n="remove",na="removed";function It(De){var Fe;return De&&Object(H.a)(De)==="object"&&"key"in De?Fe=De:Fe={key:De},Object(D.a)(Object(D.a)({},Fe),{},{key:String(Fe.key)})}function ga(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return De.map(It)}function Yn(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ke=[],Pe=0,pe=Fe.length,Ae=ga(De),be=ga(Fe);Ae.forEach(function(Ue){for(var je=!1,Ge=Pe;Ge<pe;Ge+=1){var at=be[Ge];if(at.key===Ue.key){Pe<Ge&&(Ke=Ke.concat(be.slice(Pe,Ge).map(function(bt){return Object(D.a)(Object(D.a)({},bt),{},{status:St})})),Pe=Ge),Ke.push(Object(D.a)(Object(D.a)({},at),{},{status:ir})),Pe+=1,je=!0;break}}je||Ke.push(Object(D.a)(Object(D.a)({},Ue),{},{status:$n}))}),Pe<pe&&(Ke=Ke.concat(be.slice(Pe).map(function(Ue){return Object(D.a)(Object(D.a)({},Ue),{},{status:St})})));var Le={};Ke.forEach(function(Ue){var je=Ue.key;Le[je]=(Le[je]||0)+1});var Ne=Object.keys(Le).filter(function(Ue){return Le[Ue]>1});return Ne.forEach(function(Ue){Ke=Ke.filter(function(je){var Ge=je.key,at=je.status;return Ge!==Ue||at!==$n}),Ke.forEach(function(je){je.key===Ue&&(je.status=ir)})}),Ke}var cr=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Mn(De){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Zn,Ke=function(Pe){Object(y.a)(Ae,Pe);var pe=Object(p.a)(Ae);function Ae(){var be;return Object(P.a)(this,Ae),be=pe.apply(this,arguments),be.state={keyEntities:[]},be.removeKey=function(Le){be.setState(function(Ne){var Ue=Ne.keyEntities;return{keyEntities:Ue.map(function(je){return je.key!==Le?je:Object(D.a)(Object(D.a)({},je),{},{status:na})})}})},be}return Object(O.a)(Ae,[{key:"render",value:function(){var Le=this,Ne=this.state.keyEntities,Ue=this.props,je=Ue.component,Ge=Ue.children,at=Ue.onVisibleChanged,bt=Object(C.a)(Ue,["component","children","onVisibleChanged"]),Ot=je||u.Fragment,Wt={};return cr.forEach(function(vr){Wt[vr]=bt[vr],delete bt[vr]}),delete bt.keys,u.createElement(Ot,bt,Ne.map(function(vr){var kr=vr.status,Ir=Object(C.a)(vr,["status"]),Fr=kr===St||kr===ir;return u.createElement(Fe,Object(s.a)({},Wt,{key:Ir.key,visible:Fr,eventProps:Ir,onVisibleChanged:function(Kr){at==null||at(Kr,{key:Ir.key}),Kr||Le.removeKey(Ir.key)}}),Ge)}))}}],[{key:"getDerivedStateFromProps",value:function(Le,Ne){var Ue=Le.keys,je=Ne.keyEntities,Ge=ga(Ue),at=Yn(je,Ge);return{keyEntities:at.filter(function(bt){var Ot=je.find(function(Wt){var vr=Wt.key;return bt.key===vr});return!(Ot&&Ot.status===na&&bt.status===$n)})}}}]),Ae}(u.Component);return Ke.defaultProps={component:"div"},Ke}var Wn=Mn(Dt),Jn=Zn;function Nn(De){var Fe=De.prefixCls,Ke=De.motion,Pe=De.animation,pe=De.transitionName;return Ke||(Pe?{motionName:"".concat(Fe,"-").concat(Pe)}:pe?{motionName:pe}:null)}function fa(De){var Fe=De.prefixCls,Ke=De.visible,Pe=De.zIndex,pe=De.mask,Ae=De.maskMotion,be=De.maskAnimation,Le=De.maskTransitionName;if(!pe)return null;var Ne={};return(Ae||Le||be)&&(Ne=Object(D.a)({motionAppear:!0},Nn({motion:Ae,prefixCls:Fe,transitionName:Le,animation:be}))),u.createElement(Jn,Object(s.a)({},Ne,{visible:Ke,removeOnLeave:!0}),function(Ue){var je=Ue.className;return u.createElement("div",{style:{zIndex:Pe},className:w()("".concat(Fe,"-mask"),je)})})}var Er=k("9mu1"),ot=k("o0o1"),ar=k.n(ot),xr=k("HaE+"),on=["measure","align",null,"motion"],un=function(De,Fe){var Ke=Object(u.useState)(null),Pe=Object(h.a)(Ke,2),pe=Pe[0],Ae=Pe[1],be=Object(u.useRef)(),Le=Object(u.useRef)(!1);function Ne(Ge){Le.current||Ae(Ge)}function Ue(){tt.a.cancel(be.current)}function je(Ge){Ue(),be.current=Object(tt.a)(function(){Ne(function(at){switch(pe){case"align":return"motion";case"motion":return"stable";default:}return at}),Ge==null||Ge()})}return Object(u.useEffect)(function(){Ne("measure")},[De]),Object(u.useEffect)(function(){switch(pe){case"measure":Fe();break;default:}pe&&(be.current=Object(tt.a)(Object(xr.a)(ar.a.mark(function Ge(){var at,bt;return ar.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:at=on.indexOf(pe),bt=on[at+1],bt&&at!==-1&&Ne(bt);case 3:case"end":return Wt.stop()}},Ge)}))))},[pe]),Object(u.useEffect)(function(){return function(){Le.current=!0,Ue()}},[]),[pe,je]},_n=function(De){var Fe=u.useState({width:0,height:0}),Ke=Object(h.a)(Fe,2),Pe=Ke[0],pe=Ke[1];function Ae(Le){pe({width:Le.offsetWidth,height:Le.offsetHeight})}var be=u.useMemo(function(){var Le={};if(De){var Ne=Pe.width,Ue=Pe.height;De.indexOf("height")!==-1&&Ue?Le.height=Ue:De.indexOf("minHeight")!==-1&&Ue&&(Le.minHeight=Ue),De.indexOf("width")!==-1&&Ne?Le.width=Ne:De.indexOf("minWidth")!==-1&&Ne&&(Le.minWidth=Ne)}return Le},[De,Pe]);return[be,Ae]},Tn=u.forwardRef(function(De,Fe){var Ke=De.visible,Pe=De.prefixCls,pe=De.className,Ae=De.style,be=De.children,Le=De.zIndex,Ne=De.stretch,Ue=De.destroyPopupOnHide,je=De.forceRender,Ge=De.align,at=De.point,bt=De.getRootDomNode,Ot=De.getClassNameFromAlign,Wt=De.onAlign,vr=De.onMouseEnter,kr=De.onMouseLeave,Ir=De.onMouseDown,Fr=De.onTouchStart,Lr=Object(u.useRef)(),Kr=Object(u.useRef)(),Gr=Object(u.useState)(),nn=Object(h.a)(Gr,2),Qr=nn[0],En=nn[1],en=_n(Ne),wr=Object(h.a)(en,2),Tr=wr[0],zr=wr[1];function an(){Ne&&zr(bt())}var hr=un(Ke,an),cn=Object(h.a)(hr,2),Un=cn[0],xn=cn[1],Rn=Object(u.useRef)();function Dn(){return at||bt}function Hn(){var In;(In=Lr.current)===null||In===void 0||In.forceAlign()}function oa(In,Cn){var Xn=Ot(Cn);Qr!==Xn&&En(Xn),Un==="align"&&(Qr!==Xn?Promise.resolve().then(function(){Hn()}):xn(function(){var Bn;(Bn=Rn.current)===null||Bn===void 0||Bn.call(Rn)}),Wt==null||Wt(In,Cn))}var Kn=Object(D.a)({},Nn(De));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(In){var Cn=Kn[In];Kn[In]=function(Xn,Bn){return xn(),Cn==null?void 0:Cn(Xn,Bn)}});function ba(){return new Promise(function(In){Rn.current=In})}u.useEffect(function(){!Kn.motionName&&Un==="motion"&&xn()},[Kn.motionName,Un]),u.useImperativeHandle(Fe,function(){return{forceAlign:Hn,getElement:function(){return Kr.current}}});var ka=Object(D.a)(Object(D.a)({},Tr),{},{zIndex:Le,opacity:Un==="motion"||Un==="stable"||!Ke?void 0:0,pointerEvents:Un==="stable"?void 0:"none"},Ae),Ra=!0;(Ge==null?void 0:Ge.points)&&(Un==="align"||Un==="stable")&&(Ra=!1);var aa=be;return u.Children.count(be)>1&&(aa=u.createElement("div",{className:"".concat(Pe,"-content")},be)),u.createElement(Jn,Object(s.a)({visible:Ke,ref:Kr,leavedClassName:"".concat(Pe,"-hidden")},Kn,{onAppearPrepare:ba,onEnterPrepare:ba,removeOnLeave:Ue,forceRender:je}),function(In,Cn){var Xn=In.className,Bn=In.style,Fa=w()(Pe,pe,Qr,Xn);return u.createElement(Er.a,{target:Dn(),key:"popup",ref:Lr,monitorWindowResize:!0,disabled:Ra,align:Ge,onAlign:oa},u.createElement("div",{ref:Cn,className:Fa,onMouseEnter:vr,onMouseLeave:kr,onMouseDownCapture:Ir,onTouchStartCapture:Fr,style:Object(D.a)(Object(D.a)({},Bn),ka)},aa))})});Tn.displayName="PopupInner";var Sn=Tn,ya=u.forwardRef(function(De,Fe){var Ke=De.prefixCls,Pe=De.visible,pe=De.zIndex,Ae=De.children,be=De.mobile;be=be===void 0?{}:be;var Le=be.popupClassName,Ne=be.popupStyle,Ue=be.popupMotion,je=Ue===void 0?{}:Ue,Ge=be.popupRender,at=u.useRef();u.useImperativeHandle(Fe,function(){return{forceAlign:function(){},getElement:function(){return at.current}}});var bt=Object(D.a)({zIndex:pe},Ne),Ot=Ae;return u.Children.count(Ae)>1&&(Ot=u.createElement("div",{className:"".concat(Ke,"-content")},Ae)),Ge&&(Ot=Ge(Ot)),u.createElement(Jn,Object(s.a)({visible:Pe,ref:at,removeOnLeave:!0},je),function(Wt,vr){var kr=Wt.className,Ir=Wt.style,Fr=w()(Ke,Le,kr);return u.createElement("div",{ref:vr,className:Fr,style:Object(D.a)(Object(D.a)({},Ir),bt)},Ot)})});ya.displayName="MobilePopupInner";var Ta=ya,Sa=["visible","mobile"],qn=u.forwardRef(function(De,Fe){var Ke=De.visible,Pe=De.mobile,pe=Object(C.a)(De,Sa),Ae=Object(u.useState)(Ke),be=Object(h.a)(Ae,2),Le=be[0],Ne=be[1],Ue=Object(u.useState)(!1),je=Object(h.a)(Ue,2),Ge=je[0],at=je[1],bt=Object(D.a)(Object(D.a)({},pe),{},{visible:Le});Object(u.useEffect)(function(){Ne(Ke),Ke&&Pe&&at(ke())},[Ke,Pe]);var Ot=Ge?u.createElement(Ta,Object(s.a)({},bt,{mobile:Pe,ref:Fe})):u.createElement(Sn,Object(s.a)({},bt,{ref:Fe}));return u.createElement("div",null,u.createElement(fa,bt),Ot)});qn.displayName="Popup";var vi=qn,gi=u.createContext(null),Ka=gi;function Ma(){}function wi(){return""}function ui(De){return De?De.ownerDocument:window.document}var Ti=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function ci(De){var Fe=function(Ke){Object(y.a)(pe,Ke);var Pe=Object(p.a)(pe);function pe(Ae){var be;Object(P.a)(this,pe),be=Pe.call(this,Ae),be.popupRef=u.createRef(),be.triggerRef=u.createRef(),be.attachId=void 0,be.clickOutsideHandler=void 0,be.touchOutsideHandler=void 0,be.contextMenuOutsideHandler1=void 0,be.contextMenuOutsideHandler2=void 0,be.mouseDownTimeout=void 0,be.focusTime=void 0,be.preClickTime=void 0,be.preTouchTime=void 0,be.delayTimer=void 0,be.hasPopupMouseDown=void 0,be.onMouseEnter=function(Ne){var Ue=be.props.mouseEnterDelay;be.fireEvents("onMouseEnter",Ne),be.delaySetPopupVisible(!0,Ue,Ue?null:Ne)},be.onMouseMove=function(Ne){be.fireEvents("onMouseMove",Ne),be.setPoint(Ne)},be.onMouseLeave=function(Ne){be.fireEvents("onMouseLeave",Ne),be.delaySetPopupVisible(!1,be.props.mouseLeaveDelay)},be.onPopupMouseEnter=function(){be.clearDelayTimer()},be.onPopupMouseLeave=function(Ne){var Ue;if(Ne.relatedTarget&&!Ne.relatedTarget.setTimeout&&Object(nt.a)((Ue=be.popupRef.current)===null||Ue===void 0?void 0:Ue.getElement(),Ne.relatedTarget))return;be.delaySetPopupVisible(!1,be.props.mouseLeaveDelay)},be.onFocus=function(Ne){be.fireEvents("onFocus",Ne),be.clearDelayTimer(),be.isFocusToShow()&&(be.focusTime=Date.now(),be.delaySetPopupVisible(!0,be.props.focusDelay))},be.onMouseDown=function(Ne){be.fireEvents("onMouseDown",Ne),be.preClickTime=Date.now()},be.onTouchStart=function(Ne){be.fireEvents("onTouchStart",Ne),be.preTouchTime=Date.now()},be.onBlur=function(Ne){be.fireEvents("onBlur",Ne),be.clearDelayTimer(),be.isBlurToHide()&&be.delaySetPopupVisible(!1,be.props.blurDelay)},be.onContextMenu=function(Ne){Ne.preventDefault(),be.fireEvents("onContextMenu",Ne),be.setPopupVisible(!0,Ne)},be.onContextMenuClose=function(){be.isContextMenuToShow()&&be.close()},be.onClick=function(Ne){if(be.fireEvents("onClick",Ne),be.focusTime){var Ue;if(be.preClickTime&&be.preTouchTime?Ue=Math.min(be.preClickTime,be.preTouchTime):be.preClickTime?Ue=be.preClickTime:be.preTouchTime&&(Ue=be.preTouchTime),Math.abs(Ue-be.focusTime)<20)return;be.focusTime=0}be.preClickTime=0,be.preTouchTime=0,be.isClickToShow()&&(be.isClickToHide()||be.isBlurToHide())&&Ne&&Ne.preventDefault&&Ne.preventDefault();var je=!be.state.popupVisible;(be.isClickToHide()&&!je||je&&be.isClickToShow())&&be.setPopupVisible(!be.state.popupVisible,Ne)},be.onPopupMouseDown=function(){if(be.hasPopupMouseDown=!0,clearTimeout(be.mouseDownTimeout),be.mouseDownTimeout=window.setTimeout(function(){be.hasPopupMouseDown=!1},0),be.context){var Ne;(Ne=be.context).onPopupMouseDown.apply(Ne,arguments)}},be.onDocumentClick=function(Ne){if(be.props.mask&&!be.props.maskClosable)return;var Ue=Ne.target,je=be.getRootDomNode(),Ge=be.getPopupDomNode();(!Object(nt.a)(je,Ue)||be.isContextMenuOnly())&&!Object(nt.a)(Ge,Ue)&&!be.hasPopupMouseDown&&be.close()},be.getRootDomNode=function(){var Ne=be.props.getTriggerDOMNode;if(Ne)return Ne(be.triggerRef.current);try{var Ue=Object(it.a)(be.triggerRef.current);if(Ue)return Ue}catch(je){}return Ye.a.findDOMNode(Object(b.a)(be))},be.getPopupClassNameFromAlign=function(Ne){var Ue=[],je=be.props,Ge=je.popupPlacement,at=je.builtinPlacements,bt=je.prefixCls,Ot=je.alignPoint,Wt=je.getPopupClassNameFromAlign;return Ge&&at&&Ue.push(et(at,bt,Ne,Ot)),Wt&&Ue.push(Wt(Ne)),Ue.join(" ")},be.getComponent=function(){var Ne=be.props,Ue=Ne.prefixCls,je=Ne.destroyPopupOnHide,Ge=Ne.popupClassName,at=Ne.onPopupAlign,bt=Ne.popupMotion,Ot=Ne.popupAnimation,Wt=Ne.popupTransitionName,vr=Ne.popupStyle,kr=Ne.mask,Ir=Ne.maskAnimation,Fr=Ne.maskTransitionName,Lr=Ne.maskMotion,Kr=Ne.zIndex,Gr=Ne.popup,nn=Ne.stretch,Qr=Ne.alignPoint,En=Ne.mobile,en=Ne.forceRender,wr=be.state,Tr=wr.popupVisible,zr=wr.point,an=be.getPopupAlign(),hr={};return be.isMouseEnterToShow()&&(hr.onMouseEnter=be.onPopupMouseEnter),be.isMouseLeaveToHide()&&(hr.onMouseLeave=be.onPopupMouseLeave),hr.onMouseDown=be.onPopupMouseDown,hr.onTouchStart=be.onPopupMouseDown,u.createElement(vi,Object(s.a)({prefixCls:Ue,destroyPopupOnHide:je,visible:Tr,point:Qr&&zr,className:Ge,align:an,onAlign:at,animation:Ot,getClassNameFromAlign:be.getPopupClassNameFromAlign},hr,{stretch:nn,getRootDomNode:be.getRootDomNode,style:vr,mask:kr,zIndex:Kr,transitionName:Wt,maskAnimation:Ir,maskTransitionName:Fr,maskMotion:Lr,ref:be.popupRef,motion:bt,mobile:En,forceRender:en}),typeof Gr=="function"?Gr():Gr)},be.attachParent=function(Ne){tt.a.cancel(be.attachId);var Ue=be.props,je=Ue.getPopupContainer,Ge=Ue.getDocument,at=be.getRootDomNode(),bt;je?(at||je.length===0)&&(bt=je(at)):bt=Ge(be.getRootDomNode()).body,bt?bt.appendChild(Ne):be.attachId=Object(tt.a)(function(){be.attachParent(Ne)})},be.getContainer=function(){var Ne=be.props.getDocument,Ue=Ne(be.getRootDomNode()).createElement("div");return Ue.style.position="absolute",Ue.style.top="0",Ue.style.left="0",Ue.style.width="100%",be.attachParent(Ue),Ue},be.setPoint=function(Ne){var Ue=be.props.alignPoint;if(!Ue||!Ne)return;be.setState({point:{pageX:Ne.pageX,pageY:Ne.pageY}})},be.handlePortalUpdate=function(){be.state.prevPopupVisible!==be.state.popupVisible&&be.props.afterPopupVisibleChange(be.state.popupVisible)},be.triggerContextValue={onPopupMouseDown:be.onPopupMouseDown};var Le;return"popupVisible"in Ae?Le=!!Ae.popupVisible:Le=!!Ae.defaultPopupVisible,be.state={prevPopupVisible:Le,popupVisible:Le},Ti.forEach(function(Ne){be["fire".concat(Ne)]=function(Ue){be.fireEvents(Ne,Ue)}}),be}return Object(O.a)(pe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var be=this.props,Le=this.state;if(Le.popupVisible){var Ne;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ne=be.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ce.a)(Ne,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ne=Ne||be.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ce.a)(Ne,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ne=Ne||be.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ce.a)(Ne,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ce.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),tt.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var be;return((be=this.popupRef.current)===null||be===void 0?void 0:be.getElement())||null}},{key:"getPopupAlign",value:function(){var be=this.props,Le=be.popupPlacement,Ne=be.popupAlign,Ue=be.builtinPlacements;return Le&&Ue?ze(Ue,Le,Ne):Ne}},{key:"setPopupVisible",value:function(be,Le){var Ne=this.props.alignPoint,Ue=this.state.popupVisible;this.clearDelayTimer(),Ue!==be&&("popupVisible"in this.props||this.setState({popupVisible:be,prevPopupVisible:Ue}),this.props.onPopupVisibleChange(be)),Ne&&Le&&be&&this.setPoint(Le)}},{key:"delaySetPopupVisible",value:function(be,Le,Ne){var Ue=this,je=Le*1e3;if(this.clearDelayTimer(),je){var Ge=Ne?{pageX:Ne.pageX,pageY:Ne.pageY}:null;this.delayTimer=window.setTimeout(function(){Ue.setPopupVisible(be,Ge),Ue.clearDelayTimer()},je)}else this.setPopupVisible(be,Ne)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(be){var Le=this.props.children.props,Ne=this.props;return Le[be]&&Ne[be]?this["fire".concat(be)]:Le[be]||Ne[be]}},{key:"isClickToShow",value:function(){var be=this.props,Le=be.action,Ne=be.showAction;return Le.indexOf("click")!==-1||Ne.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var be=this.props.action;return be==="contextMenu"||be.length===1&&be[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var be=this.props,Le=be.action,Ne=be.showAction;return Le.indexOf("contextMenu")!==-1||Ne.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var be=this.props,Le=be.action,Ne=be.hideAction;return Le.indexOf("click")!==-1||Ne.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var be=this.props,Le=be.action,Ne=be.showAction;return Le.indexOf("hover")!==-1||Ne.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var be=this.props,Le=be.action,Ne=be.hideAction;return Le.indexOf("hover")!==-1||Ne.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var be=this.props,Le=be.action,Ne=be.showAction;return Le.indexOf("focus")!==-1||Ne.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var be=this.props,Le=be.action,Ne=be.hideAction;return Le.indexOf("focus")!==-1||Ne.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var be;(be=this.popupRef.current)===null||be===void 0||be.forceAlign()}}},{key:"fireEvents",value:function(be,Le){var Ne=this.props.children.props[be];Ne&&Ne(Le);var Ue=this.props[be];Ue&&Ue(Le)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var be=this.state.popupVisible,Le=this.props,Ne=Le.children,Ue=Le.forceRender,je=Le.alignPoint,Ge=Le.className,at=Le.autoDestroy,bt=u.Children.only(Ne),Ot={key:"trigger"};this.isContextMenuToShow()?Ot.onContextMenu=this.onContextMenu:Ot.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(Ot.onClick=this.onClick,Ot.onMouseDown=this.onMouseDown,Ot.onTouchStart=this.onTouchStart):(Ot.onClick=this.createTwoChains("onClick"),Ot.onMouseDown=this.createTwoChains("onMouseDown"),Ot.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(Ot.onMouseEnter=this.onMouseEnter,je&&(Ot.onMouseMove=this.onMouseMove)):Ot.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?Ot.onMouseLeave=this.onMouseLeave:Ot.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(Ot.onFocus=this.onFocus,Ot.onBlur=this.onBlur):(Ot.onFocus=this.createTwoChains("onFocus"),Ot.onBlur=this.createTwoChains("onBlur"));var Wt=w()(bt&&bt.props&&bt.props.className,Ge);Wt&&(Ot.className=Wt);var vr=Object(D.a)({},Ot);Object(Me.c)(bt)&&(vr.ref=Object(Me.a)(this.triggerRef,bt.ref));var kr=u.cloneElement(bt,vr),Ir;return(be||this.popupRef.current||Ue)&&(Ir=u.createElement(De,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!be&&at&&(Ir=null),u.createElement(Ka.Provider,{value:this.triggerContextValue},kr,Ir)}}],[{key:"getDerivedStateFromProps",value:function(be,Le){var Ne=be.popupVisible,Ue={};return Ne!==void 0&&Le.popupVisible!==Ne&&(Ue.popupVisible=Ne,Ue.prevPopupVisible=Le.popupVisible),Ue}}]),pe}(u.Component);return Fe.contextType=Ka,Fe.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:wi,getDocument:ui,onPopupVisibleChange:Ma,afterPopupVisibleChange:Ma,onPopupAlign:Ma,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Fe}var za=ci(Je.a),Ca={adjustX:1,adjustY:1},Qa={topLeft:{points:["bl","tl"],overflow:Ca,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ca,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Ca,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Ca,offset:[4,0]}},ei={topLeft:{points:["bl","tl"],overflow:Ca,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ca,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Ca,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Ca,offset:[4,0]}},ht=Qa,Ze=0,dt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Et=function(Fe,Ke,Pe){var pe=ee(Ke),Ae=Fe.getState();Fe.setState({defaultActiveFirst:Object(D.a)(Object(D.a)({},Ae.defaultActiveFirst),{},Object(L.a)({},pe,Pe))})},Ut=function(De){Object(y.a)(Ke,De);var Fe=Object(p.a)(Ke);function Ke(Pe){var pe;Object(P.a)(this,Ke),pe=Fe.call(this,Pe),pe.onDestroy=function(je){pe.props.onDestroy(je)},pe.onKeyDown=function(je){var Ge=je.keyCode,at=pe.menuInstance,bt=pe.props.store,Ot=pe.getVisible();if(Ge===v.a.ENTER)return pe.onTitleClick(je),Et(bt,pe.props.eventKey,!0),!0;if(Ge===v.a.RIGHT)return Ot?at.onKeyDown(je):(pe.triggerOpenChange(!0),Et(bt,pe.props.eventKey,!0)),!0;if(Ge===v.a.LEFT){var Wt;if(Ot)Wt=at.onKeyDown(je);else return;return Wt||(pe.triggerOpenChange(!1),Wt=!0),Wt}return Ot&&(Ge===v.a.UP||Ge===v.a.DOWN)?at.onKeyDown(je):void 0},pe.onOpenChange=function(je){pe.props.onOpenChange(je)},pe.onPopupVisibleChange=function(je){pe.triggerOpenChange(je,je?"mouseenter":"mouseleave")},pe.onMouseEnter=function(je){var Ge=pe.props,at=Ge.eventKey,bt=Ge.onMouseEnter,Ot=Ge.store;Et(Ot,pe.props.eventKey,!1),bt({key:at,domEvent:je})},pe.onMouseLeave=function(je){var Ge=pe.props,at=Ge.parentMenu,bt=Ge.eventKey,Ot=Ge.onMouseLeave;at.subMenuInstance=Object(b.a)(pe),Ot({key:bt,domEvent:je})},pe.onTitleMouseEnter=function(je){var Ge=pe.props,at=Ge.eventKey,bt=Ge.onItemHover,Ot=Ge.onTitleMouseEnter;bt({key:at,hover:!0}),Ot({key:at,domEvent:je})},pe.onTitleMouseLeave=function(je){var Ge=pe.props,at=Ge.parentMenu,bt=Ge.eventKey,Ot=Ge.onItemHover,Wt=Ge.onTitleMouseLeave;at.subMenuInstance=Object(b.a)(pe),Ot({key:bt,hover:!1}),Wt({key:bt,domEvent:je})},pe.onTitleClick=function(je){var Ge=Object(b.a)(pe),at=Ge.props;if(at.onTitleClick({key:at.eventKey,domEvent:je}),at.triggerSubMenuAction==="hover")return;pe.triggerOpenChange(!pe.getVisible(),"click"),Et(at.store,pe.props.eventKey,!1)},pe.onSubMenuClick=function(je){typeof pe.props.onClick=="function"&&pe.props.onClick(pe.addKeyPath(je))},pe.onSelect=function(je){pe.props.onSelect(je)},pe.onDeselect=function(je){pe.props.onDeselect(je)},pe.getPrefixCls=function(){return"".concat(pe.props.rootPrefixCls,"-submenu")},pe.getActiveClassName=function(){return"".concat(pe.getPrefixCls(),"-active")},pe.getDisabledClassName=function(){return"".concat(pe.getPrefixCls(),"-disabled")},pe.getSelectedClassName=function(){return"".concat(pe.getPrefixCls(),"-selected")},pe.getOpenClassName=function(){return"".concat(pe.props.rootPrefixCls,"-submenu-open")},pe.getVisible=function(){return pe.state.isOpen},pe.getMode=function(){return pe.state.mode},pe.saveMenuInstance=function(je){pe.menuInstance=je},pe.addKeyPath=function(je){return Object(D.a)(Object(D.a)({},je),{},{keyPath:(je.keyPath||[]).concat(pe.props.eventKey)})},pe.triggerOpenChange=function(je,Ge){var at=pe.props.eventKey,bt=function(){pe.onOpenChange({key:at,item:Object(b.a)(pe),trigger:Ge,open:je})};Ge==="mouseenter"?pe.mouseenterTimeout=setTimeout(function(){bt()},0):bt()},pe.isChildrenSelected=function(){var je={find:!1};return X(pe.props.children,pe.props.selectedKeys,je),je.find},pe.isInlineMode=function(){return pe.getMode()==="inline"},pe.adjustWidth=function(){if(!pe.subMenuTitle||!pe.menuInstance)return;var je=$e.findDOMNode(pe.menuInstance);if(je.offsetWidth>=pe.subMenuTitle.offsetWidth)return;je.style.minWidth="".concat(pe.subMenuTitle.offsetWidth,"px")},pe.saveSubMenuTitle=function(je){pe.subMenuTitle=je},pe.getBaseProps=function(){var je=Object(b.a)(pe),Ge=je.props,at=pe.getMode();return{mode:at==="horizontal"?"vertical":at,visible:pe.getVisible(),level:Ge.level+1,inlineIndent:Ge.inlineIndent,focusable:!1,onClick:pe.onSubMenuClick,onSelect:pe.onSelect,onDeselect:pe.onDeselect,onDestroy:pe.onDestroy,selectedKeys:Ge.selectedKeys,eventKey:"".concat(Ge.eventKey,"-menu-"),openKeys:Ge.openKeys,motion:Ge.motion,onOpenChange:pe.onOpenChange,subMenuOpenDelay:Ge.subMenuOpenDelay,parentMenu:Object(b.a)(pe),subMenuCloseDelay:Ge.subMenuCloseDelay,forceSubMenuRender:Ge.forceSubMenuRender,triggerSubMenuAction:Ge.triggerSubMenuAction,builtinPlacements:Ge.builtinPlacements,defaultActiveFirst:Ge.store.getState().defaultActiveFirst[ee(Ge.eventKey)],multiple:Ge.multiple,prefixCls:Ge.rootPrefixCls,id:pe.internalMenuId,manualRef:pe.saveMenuInstance,itemIcon:Ge.itemIcon,expandIcon:Ge.expandIcon,direction:Ge.direction}},pe.getMotion=function(je,Ge){var at=Object(b.a)(pe),bt=at.haveRendered,Ot=pe.props,Wt=Ot.motion,vr=Ot.rootPrefixCls,kr=Object(D.a)(Object(D.a)({},Wt),{},{leavedClassName:"".concat(vr,"-hidden"),removeOnLeave:!1,motionAppear:bt||!Ge||je!=="inline"});return kr};var Ae=Pe.store,be=Pe.eventKey,Le=Ae.getState(),Ne=Le.defaultActiveFirst;pe.isRootMenu=!1;var Ue=!1;return Ne&&(Ue=Ne[be]),Et(Ae,be,Ue),pe.state={mode:Pe.mode,isOpen:Pe.isOpen},pe}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var pe=this,Ae=this.props,be=Ae.mode,Le=Ae.parentMenu,Ne=Ae.manualRef,Ue=Ae.isOpen,je=function(){pe.setState({mode:be,isOpen:Ue})},Ge=Ue!==this.state.isOpen,at=be!==this.state.mode;if((at||Ge)&&(tt.a.cancel(this.updateStateRaf),at?this.updateStateRaf=Object(tt.a)(je):je()),Ne&&Ne(this),be!=="horizontal"||!(Le==null?void 0:Le.isRootMenu)||!Ue)return;this.minWidthTimeout=setTimeout(function(){return pe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var pe=this.props,Ae=pe.onDestroy,be=pe.eventKey;Ae&&Ae(be),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),tt.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(pe,Ae){var be=this.getBaseProps();return u.createElement(Xe,Object(s.a)({},be,{id:this.internalMenuId,className:pe,style:Ae}),this.props.children)}},{key:"renderChildren",value:function(){var pe=this,Ae=this.getBaseProps(),be=Ae.mode,Le=Ae.visible,Ne=Ae.forceSubMenuRender,Ue=Ae.direction,je=this.getMotion(be,Le);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Le||Ne,!this.haveOpened)return u.createElement("div",null);var Ge=w()("".concat(Ae.prefixCls,"-sub"),Object(L.a)({},"".concat(Ae.prefixCls,"-rtl"),Ue==="rtl"));return this.isInlineMode()?u.createElement(Jn,Object(s.a)({visible:Ae.visible,forceRender:Ne},je),function(at){var bt=at.className,Ot=at.style,Wt=w()(Ge,bt);return pe.renderPopupMenu(Wt,Ot)}):this.renderPopupMenu(Ge)}},{key:"render",value:function(){var pe,Ae,be,Le=Object(D.a)({},this.props),Ne=this.getVisible(),Ue=this.getPrefixCls(),je=this.isInlineMode(),Ge=this.getMode(),at=w()(Ue,"".concat(Ue,"-").concat(Ge),(pe={},Object(L.a)(pe,Le.className,!!Le.className),Object(L.a)(pe,this.getOpenClassName(),Ne),Object(L.a)(pe,this.getActiveClassName(),Le.active||Ne&&!je),Object(L.a)(pe,this.getDisabledClassName(),Le.disabled),Object(L.a)(pe,this.getSelectedClassName(),this.isChildrenSelected()),pe));this.internalMenuId||(Le.eventKey?this.internalMenuId="".concat(Le.eventKey,"$Menu"):(Ze+=1,this.internalMenuId="$__$".concat(Ze,"$Menu")));var bt={},Ot={},Wt={};Le.disabled||(bt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Ot={onClick:this.onTitleClick},Wt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var vr={},kr=Le.direction,Ir=kr==="rtl";je&&(Ir?vr.paddingRight=Le.inlineIndent*Le.level:vr.paddingLeft=Le.inlineIndent*Le.level);var Fr={};this.getVisible()&&(Fr={"aria-owns":this.internalMenuId});var Lr=null;Ge!=="horizontal"&&(Lr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Lr=u.createElement(this.props.expandIcon,Object(D.a)({},this.props))));var Kr=u.createElement("div",Object(s.a)({ref:this.saveSubMenuTitle,style:vr,className:"".concat(Ue,"-title"),role:"button"},Wt,Ot,{"aria-expanded":Ne},Fr,{"aria-haspopup":"true",title:typeof Le.title=="string"?Le.title:void 0}),Le.title,Lr||u.createElement("i",{className:"".concat(Ue,"-arrow")})),Gr=this.renderChildren(),nn=((Ae=Le.parentMenu)===null||Ae===void 0?void 0:Ae.isRootMenu)?Le.parentMenu.props.getPopupContainer:function(Dn){return Dn.parentNode},Qr=dt[Ge],En=Le.popupOffset?{offset:Le.popupOffset}:{},en=w()((be={},Object(L.a)(be,Le.popupClassName,Le.popupClassName&&!je),Object(L.a)(be,"".concat(Ue,"-rtl"),Ir),be)),wr=Le.disabled,Tr=Le.triggerSubMenuAction,zr=Le.subMenuOpenDelay,an=Le.forceSubMenuRender,hr=Le.subMenuCloseDelay,cn=Le.builtinPlacements;J.forEach(function(Dn){return delete Le[Dn]}),delete Le.onClick;var Un=Ir?Object(D.a)(Object(D.a)({},ei),cn):Object(D.a)(Object(D.a)({},Qa),cn);delete Le.direction;var xn=this.getBaseProps(),Rn=je?null:this.getMotion(xn.mode,xn.visible);return u.createElement("li",Object(s.a)({},Le,bt,{className:at,role:"menuitem"}),u.createElement(za,{prefixCls:Ue,popupClassName:w()("".concat(Ue,"-popup"),en),getPopupContainer:nn,builtinPlacements:Un,popupPlacement:Qr,popupVisible:je?!1:Ne,popupAlign:En,popup:je?null:Gr,action:wr||je?[]:[Tr],mouseEnterDelay:zr,mouseLeaveDelay:hr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:an,popupMotion:Rn},Kr),je?Gr:null)}}]),Ke}(u.Component);Ut.defaultProps={onMouseEnter:Z,onMouseLeave:Z,onTitleMouseEnter:Z,onTitleMouseLeave:Z,onTitleClick:Z,manualRef:Z,mode:"vertical",title:""};var Pt=Object(T.b)(function(De,Fe){var Ke=De.openKeys,Pe=De.activeKey,pe=De.selectedKeys,Ae=Fe.eventKey,be=Fe.subMenuKey;return{isOpen:Ke.indexOf(Ae)>-1,active:Pe[be]===Ae,selectedKeys:pe}})(Ut);Pt.isSubMenu=!0;var Zt=Pt,kt="menuitem-overflowed",lt=.5,mt=function(De){Object(y.a)(Ke,De);var Fe=Object(p.a)(Ke);function Ke(){var Pe;return Object(P.a)(this,Ke),Pe=Fe.apply(this,arguments),Pe.resizeObserver=null,Pe.mutationObserver=null,Pe.originalTotalWidth=0,Pe.overflowedItems=[],Pe.menuItemSizes=[],Pe.cancelFrameId=null,Pe.state={lastVisibleIndex:void 0},Pe.childRef=u.createRef(),Pe.getMenuItemNodes=function(){var pe=Pe.props.prefixCls,Ae=Pe.childRef.current;return Ae?[].slice.call(Ae.children).filter(function(be){return be.className.split(" ").indexOf("".concat(pe,"-overflowed-submenu"))<0}):[]},Pe.getOverflowedSubMenuItem=function(pe,Ae,be){var Le=Pe.props,Ne=Le.overflowedIndicator,Ue=Le.level,je=Le.mode,Ge=Le.prefixCls,at=Le.theme;if(Ue!==1||je!=="horizontal")return null;var bt=Pe.props.children[0],Ot=bt.props,Wt=Ot.children,vr=Ot.title,kr=Ot.style,Ir=Object(C.a)(Ot,["children","title","style"]),Fr=Object(D.a)({},kr),Lr="".concat(pe,"-overflowed-indicator"),Kr="".concat(pe,"-overflowed-indicator");Ae.length===0&&be!==!0?Fr=Object(D.a)(Object(D.a)({},Fr),{},{display:"none"}):be&&(Fr=Object(D.a)(Object(D.a)({},Fr),{},{visibility:"hidden",position:"absolute"}),Lr="".concat(Lr,"-placeholder"),Kr="".concat(Kr,"-placeholder"));var Gr=at?"".concat(Ge,"-").concat(at):"",nn={};return J.forEach(function(Qr){Ir[Qr]!==void 0&&(nn[Qr]=Ir[Qr])}),u.createElement(Zt,Object(s.a)({title:Ne,className:"".concat(Ge,"-overflowed-submenu"),popupClassName:Gr},nn,{key:Lr,eventKey:Kr,disabled:!1,style:Fr}),Ae)},Pe.setChildrenWidthAndResize=function(){if(Pe.props.mode!=="horizontal")return;var pe=Pe.childRef.current;if(!pe)return;var Ae=pe.children;if(!Ae||Ae.length===0)return;var be=pe.children[Ae.length-1];ue(be,"display","inline-block");var Le=Pe.getMenuItemNodes(),Ne=Le.filter(function(Ue){return Ue.className.split(" ").indexOf(kt)>=0});Ne.forEach(function(Ue){ue(Ue,"display","inline-block")}),Pe.menuItemSizes=Le.map(function(Ue){return me(Ue,!0)}),Ne.forEach(function(Ue){ue(Ue,"display","none")}),Pe.overflowedIndicatorWidth=me(pe.children[pe.children.length-1],!0),Pe.originalTotalWidth=Pe.menuItemSizes.reduce(function(Ue,je){return Ue+je},0),Pe.handleResize(),ue(be,"display","none")},Pe.handleResize=function(){if(Pe.props.mode!=="horizontal")return;var pe=Pe.childRef.current;if(!pe)return;var Ae=me(pe);Pe.overflowedItems=[];var be=0,Le;Pe.originalTotalWidth>Ae+lt&&(Le=-1,Pe.menuItemSizes.forEach(function(Ne){be+=Ne,be+Pe.overflowedIndicatorWidth<=Ae&&(Le+=1)})),Pe.setState({lastVisibleIndex:Le})},Pe}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){var pe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ae=this.childRef.current;if(!Ae)return;this.resizeObserver=new He.default(function(be){be.forEach(function(){var Le=pe.cancelFrameId;cancelAnimationFrame(Le),pe.cancelFrameId=requestAnimationFrame(pe.setChildrenWidthAndResize)})}),[].slice.call(Ae.children).concat(Ae).forEach(function(be){pe.resizeObserver.observe(be)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){pe.resizeObserver.disconnect(),[].slice.call(Ae.children).concat(Ae).forEach(function(be){pe.resizeObserver.observe(be)}),pe.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ae,{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(pe){var Ae=this,be=this.state.lastVisibleIndex;return(pe||[]).reduce(function(Le,Ne,Ue){var je=Ne;if(Ae.props.mode==="horizontal"){var Ge=Ae.getOverflowedSubMenuItem(Ne.props.eventKey,[]);be!==void 0&&Ae.props.className.indexOf("".concat(Ae.props.prefixCls,"-root"))!==-1&&(Ue>be&&(je=u.cloneElement(Ne,{style:{display:"none"},eventKey:"".concat(Ne.props.eventKey,"-hidden"),className:"".concat(kt)})),Ue===be+1&&(Ae.overflowedItems=pe.slice(be+1).map(function(bt){return u.cloneElement(bt,{key:bt.props.eventKey,mode:"vertical-left"})}),Ge=Ae.getOverflowedSubMenuItem(Ne.props.eventKey,Ae.overflowedItems)));var at=[].concat(Object(l.a)(Le),[Ge,je]);return Ue===pe.length-1&&at.push(Ae.getOverflowedSubMenuItem(Ne.props.eventKey,[],!0)),at}return[].concat(Object(l.a)(Le),[je])},[])}},{key:"render",value:function(){var pe=this.props,Ae=pe.visible,be=pe.prefixCls,Le=pe.overflowedIndicator,Ne=pe.mode,Ue=pe.level,je=pe.tag,Ge=pe.children,at=pe.theme,bt=Object(C.a)(pe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Ot=je;return u.createElement(Ot,Object(s.a)({ref:this.childRef},bt),this.renderChildren(Ge))}}]),Ke}(u.Component);mt.defaultProps={tag:"div",className:""};var xt=mt;function _t(De){return De.length?De.every(function(Fe){return!!Fe.props.disabled}):!0}function wt(De,Fe,Ke){var Pe=De.getState();De.setState({activeKey:Object(D.a)(Object(D.a)({},Pe.activeKey),{},Object(L.a)({},Fe,Ke))})}function yt(De){return De.eventKey||"0-menu-"}function Ct(De,Fe){var Ke=Fe,Pe=De.children,pe=De.eventKey;if(Ke){var Ae;if($(Pe,function(be,Le){be&&be.props&&!be.props.disabled&&Ke===ge(be,pe,Le)&&(Ae=!0)}),Ae)return Ke}return Ke=null,De.defaultActiveFirst&&$(Pe,function(be,Le){!Ke&&be&&!be.props.disabled&&(Ke=ge(be,pe,Le))}),Ke}function At(De){if(!De)return;var Fe=this.instanceArray.indexOf(De);Fe!==-1?this.instanceArray[Fe]=De:this.instanceArray.push(De)}var jt=function(De){Object(y.a)(Ke,De);var Fe=Object(p.a)(Ke);function Ke(Pe){var pe;return Object(P.a)(this,Ke),pe=Fe.call(this,Pe),pe.onKeyDown=function(Ae,be){var Le=Ae.keyCode,Ne;if(pe.getFlatInstanceArray().forEach(function(je){je&&je.props.active&&je.onKeyDown&&(Ne=je.onKeyDown(Ae))}),Ne)return 1;var Ue=null;return(Le===v.a.UP||Le===v.a.DOWN)&&(Ue=pe.step(Le===v.a.UP?-1:1)),Ue?(Ae.preventDefault(),wt(pe.props.store,yt(pe.props),Ue.props.eventKey),typeof be=="function"&&be(Ue),1):void 0},pe.onItemHover=function(Ae){var be=Ae.key,Le=Ae.hover;wt(pe.props.store,yt(pe.props),Le?be:null)},pe.onDeselect=function(Ae){pe.props.onDeselect(Ae)},pe.onSelect=function(Ae){pe.props.onSelect(Ae)},pe.onClick=function(Ae){pe.props.onClick(Ae)},pe.onOpenChange=function(Ae){pe.props.onOpenChange(Ae)},pe.onDestroy=function(Ae){pe.props.onDestroy(Ae)},pe.getFlatInstanceArray=function(){return pe.instanceArray},pe.step=function(Ae){var be=pe.getFlatInstanceArray(),Le=pe.props.store.getState().activeKey[yt(pe.props)],Ne=be.length;if(!Ne)return null;Ae<0&&(be=be.concat().reverse());var Ue=-1;if(be.every(function(bt,Ot){return bt&&bt.props.eventKey===Le?(Ue=Ot,!1):!0}),!pe.props.defaultActiveFirst&&Ue!==-1&&_t(be.slice(Ue,Ne-1)))return;var je=(Ue+1)%Ne,Ge=je;do{var at=be[Ge];if(!at||at.props.disabled)Ge=(Ge+1)%Ne;else return at}while(Ge!==je);return null},pe.renderCommonMenuItem=function(Ae,be,Le){var Ne=pe.props.store.getState(),Ue=Object(b.a)(pe),je=Ue.props,Ge=ge(Ae,je.eventKey,be),at=Ae.props;if(!at||typeof Ae.type=="string")return Ae;var bt=Ge===Ne.activeKey,Ot=Object(D.a)(Object(D.a)({mode:at.mode||je.mode,level:je.level,inlineIndent:je.inlineIndent,renderMenuItem:pe.renderMenuItem,rootPrefixCls:je.prefixCls,index:be,parentMenu:je.parentMenu,manualRef:at.disabled?void 0:Object(N.a)(Ae.ref,At.bind(Object(b.a)(pe))),eventKey:Ge,active:!at.disabled&&bt,multiple:je.multiple,onClick:function(vr){(at.onClick||Z)(vr),pe.onClick(vr)},onItemHover:pe.onItemHover,motion:je.motion,subMenuOpenDelay:je.subMenuOpenDelay,subMenuCloseDelay:je.subMenuCloseDelay,forceSubMenuRender:je.forceSubMenuRender,onOpenChange:pe.onOpenChange,onDeselect:pe.onDeselect,onSelect:pe.onSelect,builtinPlacements:je.builtinPlacements,itemIcon:at.itemIcon||pe.props.itemIcon,expandIcon:at.expandIcon||pe.props.expandIcon},Le),{},{direction:je.direction});return(je.mode==="inline"||_e())&&(Ot.triggerSubMenuAction="click"),u.cloneElement(Ae,Object(D.a)(Object(D.a)({},Ot),{},{key:Ge||be}))},pe.renderMenuItem=function(Ae,be,Le){if(!Ae)return null;var Ne=pe.props.store.getState(),Ue={openKeys:Ne.openKeys,selectedKeys:Ne.selectedKeys,triggerSubMenuAction:pe.props.triggerSubMenuAction,subMenuKey:Le};return pe.renderCommonMenuItem(Ae,be,Ue)},Pe.store.setState({activeKey:Object(D.a)(Object(D.a)({},Pe.store.getState().activeKey),{},Object(L.a)({},Pe.eventKey,Ct(Pe,Pe.activeKey)))}),pe.instanceArray=[],pe}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(pe){return this.props.visible||pe.visible||this.props.className!==pe.className||!K()(this.props.style,pe.style)}},{key:"componentDidUpdate",value:function(pe){var Ae=this.props,be="activeKey"in Ae?Ae.activeKey:Ae.store.getState().activeKey[yt(Ae)],Le=Ct(Ae,be);if(Le!==be)wt(Ae.store,yt(Ae),Le);else if("activeKey"in pe){var Ne=Ct(pe,pe.activeKey);Le!==Ne&&wt(Ae.store,yt(Ae),Le)}}},{key:"render",value:function(){var pe=this,Ae=Object(s.a)({},this.props);this.instanceArray=[];var be=w()(Ae.prefixCls,Ae.className,"".concat(Ae.prefixCls,"-").concat(Ae.mode)),Le={className:be,role:Ae.role||"menu"};Ae.id&&(Le.id=Ae.id),Ae.focusable&&(Le.tabIndex=0,Le.onKeyDown=this.onKeyDown);var Ne=Ae.prefixCls,Ue=Ae.eventKey,je=Ae.visible,Ge=Ae.level,at=Ae.mode,bt=Ae.overflowedIndicator,Ot=Ae.theme;return J.forEach(function(Wt){return delete Ae[Wt]}),delete Ae.onClick,u.createElement(xt,Object(s.a)({},Ae,{prefixCls:Ne,mode:at,tag:"ul",level:Ge,theme:Ot,visible:je,overflowedIndicator:bt},Le),Object(d.a)(Ae.children).map(function(Wt,vr){return pe.renderMenuItem(Wt,vr,Ue||"0-menu-")}))}}]),Ke}(u.Component);jt.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:Z};var Vt=Object(T.b)()(jt),Xe=Vt,qt=k("Kwbf");function sr(De,Fe,Ke){var Pe=De.prefixCls,pe=De.motion,Ae=De.defaultMotions,be=Ae===void 0?{}:Ae,Le=De.openAnimation,Ne=De.openTransitionName,Ue=Fe.switchingModeFromInline;if(pe)return pe;if(Object(H.a)(Le)==="object"&&Le)Object(qt.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Le=="string")return{motionName:"".concat(Pe,"-open-").concat(Le)};if(Ne)return{motionName:Ne};var je=be[Ke];return je||(Ue?null:be.other)}var er=function(De){Object(y.a)(Ke,De);var Fe=Object(p.a)(Ke);function Ke(Pe){var pe;Object(P.a)(this,Ke),pe=Fe.call(this,Pe),pe.onSelect=function(Le){var Ne=Object(b.a)(pe),Ue=Ne.props;if(Ue.selectable){var je=pe.store.getState(),Ge=je.selectedKeys,at=Le.key;Ue.multiple?Ge=Ge.concat([at]):Ge=[at],"selectedKeys"in Ue||pe.store.setState({selectedKeys:Ge}),Ue.onSelect(Object(D.a)(Object(D.a)({},Le),{},{selectedKeys:Ge}))}},pe.onClick=function(Le){var Ne=pe.getRealMenuMode(),Ue=Object(b.a)(pe),je=Ue.store,Ge=Ue.props.onOpenChange;Ne!=="inline"&&!("openKeys"in pe.props)&&(je.setState({openKeys:[]}),Ge([])),pe.props.onClick(Le)},pe.onKeyDown=function(Le,Ne){pe.innerMenu.getWrappedInstance().onKeyDown(Le,Ne)},pe.onOpenChange=function(Le){var Ne=Object(b.a)(pe),Ue=Ne.props,je=pe.store.getState().openKeys.concat(),Ge=!1,at=function(Ot){var Wt=!1;if(Ot.open)Wt=je.indexOf(Ot.key)===-1,Wt&&je.push(Ot.key);else{var vr=je.indexOf(Ot.key);Wt=vr!==-1,Wt&&je.splice(vr,1)}Ge=Ge||Wt};Array.isArray(Le)?Le.forEach(at):at(Le),Ge&&("openKeys"in pe.props||pe.store.setState({openKeys:je}),Ue.onOpenChange(je))},pe.onDeselect=function(Le){var Ne=Object(b.a)(pe),Ue=Ne.props;if(Ue.selectable){var je=pe.store.getState().selectedKeys.concat(),Ge=Le.key,at=je.indexOf(Ge);at!==-1&&je.splice(at,1),"selectedKeys"in Ue||pe.store.setState({selectedKeys:je}),Ue.onDeselect(Object(D.a)(Object(D.a)({},Le),{},{selectedKeys:je}))}},pe.onMouseEnter=function(Le){pe.restoreModeVerticalFromInline();var Ne=pe.props.onMouseEnter;Ne&&Ne(Le)},pe.onTransitionEnd=function(Le){var Ne=Le.propertyName==="width"&&Le.target===Le.currentTarget,Ue=Le.target.className,je=Object.prototype.toString.call(Ue)==="[object SVGAnimatedString]"?Ue.animVal:Ue,Ge=Le.propertyName==="font-size"&&je.indexOf("anticon")>=0;(Ne||Ge)&&pe.restoreModeVerticalFromInline()},pe.setInnerMenu=function(Le){pe.innerMenu=Le},pe.isRootMenu=!0;var Ae=Pe.defaultSelectedKeys,be=Pe.defaultOpenKeys;return"selectedKeys"in Pe&&(Ae=Pe.selectedKeys||[]),"openKeys"in Pe&&(be=Pe.openKeys||[]),pe.store=Object(T.c)({selectedKeys:Ae,openKeys:be,activeKey:{"0-menu-":Ct(Pe,Pe.activeKey)}}),pe.state={switchingModeFromInline:!1,prevProps:Pe,inlineOpenKeys:[],store:pe.store},pe}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(pe){var Ae=this.props,be=Ae.siderCollapsed,Le=Ae.inlineCollapsed,Ne=Ae.onOpenChange;(!pe.inlineCollapsed&&Le||!pe.siderCollapsed&&be)&&Ne([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var pe=this.props.collapsedWidth,Ae=this.store,be=this.prevOpenKeys,Le=this.getInlineCollapsed()&&(pe===0||pe==="0"||pe==="0px");Le?(this.prevOpenKeys=Ae.getState().openKeys.concat(),this.store.setState({openKeys:[]})):be&&(this.store.setState({openKeys:be}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var pe=this.props.mode,Ae=this.state.switchingModeFromInline,be=this.getInlineCollapsed();return Ae&&be?"inline":be?"vertical":pe}},{key:"getInlineCollapsed",value:function(){var pe=this.props,Ae=pe.inlineCollapsed,be=pe.siderCollapsed;return be!==void 0?be:Ae}},{key:"restoreModeVerticalFromInline",value:function(){var pe=this.state.switchingModeFromInline;pe&&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 pe=Object(D.a)({},Object(M.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ae=this.getRealMenuMode();return pe.className+=" ".concat(pe.prefixCls,"-root"),pe.direction==="rtl"&&(pe.className+=" ".concat(pe.prefixCls,"-rtl")),pe=Object(D.a)(Object(D.a)({},pe),{},{mode:Ae,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:sr(this.props,this.state,Ae)}),delete pe.openAnimation,delete pe.openTransitionName,u.createElement(T.a,{store:this.store},u.createElement(Xe,Object(s.a)({},pe,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(pe,Ae){var be=Ae.prevProps,Le=Ae.store,Ne=Le.getState(),Ue={},je={prevProps:pe};return be.mode==="inline"&&pe.mode!=="inline"&&(je.switchingModeFromInline=!0),"openKeys"in pe?Ue.openKeys=pe.openKeys||[]:((pe.inlineCollapsed&&!be.inlineCollapsed||pe.siderCollapsed&&!be.siderCollapsed)&&(je.switchingModeFromInline=!0,je.inlineOpenKeys=Ne.openKeys,Ue.openKeys=[]),(!pe.inlineCollapsed&&be.inlineCollapsed||!pe.siderCollapsed&&be.siderCollapsed)&&(Ue.openKeys=Ae.inlineOpenKeys,je.inlineOpenKeys=[])),Object.keys(Ue).length&&Le.setState(Ue),je}}]),Ke}(u.Component);er.defaultProps={selectable:!0,onClick:Z,onSelect:Z,onOpenChange:Z,onDeselect:Z,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:u.createElement("span",null,"\xB7\xB7\xB7")};var Bt=er,Nt=function(De){Object(y.a)(Ke,De);var Fe=Object(p.a)(Ke);function Ke(){var Pe;return Object(P.a)(this,Ke),Pe=Fe.apply(this,arguments),Pe.onKeyDown=function(pe){var Ae=pe.keyCode;return Ae===v.a.ENTER?(Pe.onClick(pe),!0):void 0},Pe.onMouseLeave=function(pe){var Ae=Pe.props,be=Ae.eventKey,Le=Ae.onItemHover,Ne=Ae.onMouseLeave;Le({key:be,hover:!1}),Ne({key:be,domEvent:pe})},Pe.onMouseEnter=function(pe){var Ae=Pe.props,be=Ae.eventKey,Le=Ae.onItemHover,Ne=Ae.onMouseEnter;Le({key:be,hover:!0}),Ne({key:be,domEvent:pe})},Pe.onClick=function(pe){var Ae=Pe.props,be=Ae.eventKey,Le=Ae.multiple,Ne=Ae.onClick,Ue=Ae.onSelect,je=Ae.onDeselect,Ge=Ae.isSelected,at={key:be,keyPath:[be],item:Object(b.a)(Pe),domEvent:pe};Ne(at),Le?Ge?je(at):Ue(at):Ge||Ue(at)},Pe.saveNode=function(pe){Pe.node=pe},Pe}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var pe=this.props;pe.onDestroy&&pe.onDestroy(pe.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 pe,Ae=Object(D.a)({},this.props),be=w()(this.getPrefixCls(),Ae.className,(pe={},Object(L.a)(pe,this.getActiveClassName(),!Ae.disabled&&Ae.active),Object(L.a)(pe,this.getSelectedClassName(),Ae.isSelected),Object(L.a)(pe,this.getDisabledClassName(),Ae.disabled),pe)),Le=Object(D.a)(Object(D.a)({},Ae.attribute),{},{title:typeof Ae.title=="string"?Ae.title:void 0,className:be,role:Ae.role||"menuitem","aria-disabled":Ae.disabled});Ae.role==="option"?Le=Object(D.a)(Object(D.a)({},Le),{},{role:"option","aria-selected":Ae.isSelected}):(Ae.role===null||Ae.role==="none")&&(Le.role="none");var Ne={onClick:Ae.disabled?null:this.onClick,onMouseLeave:Ae.disabled?null:this.onMouseLeave,onMouseEnter:Ae.disabled?null:this.onMouseEnter},Ue=Object(D.a)({},Ae.style);Ae.mode==="inline"&&(Ae.direction==="rtl"?Ue.paddingRight=Ae.inlineIndent*Ae.level:Ue.paddingLeft=Ae.inlineIndent*Ae.level),J.forEach(function(Ge){return delete Ae[Ge]}),delete Ae.direction;var je=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(je=u.createElement(this.props.itemIcon,this.props)),u.createElement("li",Object(s.a)({},Object(M.a)(Ae,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Le,Ne,{style:Ue,ref:this.saveNode}),Ae.children,je)}}]),Ke}(u.Component);Nt.isMenuItem=!0,Nt.defaultProps={onSelect:Z,onMouseEnter:Z,onMouseLeave:Z,manualRef:Z};var $t=Object(T.b)(function(De,Fe){var Ke=De.activeKey,Pe=De.selectedKeys,pe=Fe.eventKey,Ae=Fe.subMenuKey;return{active:Ke[Ae]===pe,isSelected:Array.isArray(Pe)?Pe.indexOf(pe)!==-1:Pe===pe}})(Nt),Ft=$t,Sr=function(De){Object(y.a)(Ke,De);var Fe=Object(p.a)(Ke);function Ke(){var Pe;return Object(P.a)(this,Ke),Pe=Fe.apply(this,arguments),Pe.renderInnerMenuItem=function(pe){var Ae=Pe.props,be=Ae.renderMenuItem,Le=Ae.index;return be(pe,Le,Pe.props.subMenuKey)},Pe}return Object(O.a)(Ke,[{key:"render",value:function(){var pe=Object(s.a)({},this.props),Ae=pe.className,be=Ae===void 0?"":Ae,Le=pe.rootPrefixCls,Ne="".concat(Le,"-item-group-title"),Ue="".concat(Le,"-item-group-list"),je=pe.title,Ge=pe.children;return J.forEach(function(at){return delete pe[at]}),delete pe.direction,u.createElement("li",Object(s.a)({},pe,{onClick:function(bt){return bt.stopPropagation()},className:"".concat(be," ").concat(Le,"-item-group")}),u.createElement("div",{className:Ne,title:typeof je=="string"?je:void 0},je),u.createElement("ul",{className:Ue},u.Children.map(Ge,this.renderInnerMenuItem)))}}]),Ke}(u.Component);Sr.isMenuItemGroup=!0,Sr.defaultProps={disabled:!0};var Ar=Sr,Yr=function(Fe){var Ke=Fe.className,Pe=Fe.rootPrefixCls,pe=Fe.style;return u.createElement("li",{className:"".concat(Ke," ").concat(Pe,"-item-divider"),style:pe})};Yr.defaultProps={disabled:!0,className:"",style:{}};var vn=Yr,Jr=Bt,Kt=k("eDIo");function st(De,Fe){var Ke=De.prefixCls,Pe=De.editable,pe=De.locale,Ae=De.style;return!Pe||Pe.showAdd===!1?null:u.createElement("button",{ref:Fe,type:"button",className:"".concat(Ke,"-nav-add"),style:Ae,"aria-label":(pe==null?void 0:pe.addAriaLabel)||"Add tab",onClick:function(Le){Pe.onEdit("add",{event:Le})}},Pe.addIcon||"+")}var rn=u.forwardRef(st);function gn(De,Fe){var Ke=De.prefixCls,Pe=De.id,pe=De.tabs,Ae=De.locale,be=De.mobile,Le=De.moreIcon,Ne=Le===void 0?"More":Le,Ue=De.moreTransitionName,je=De.style,Ge=De.className,at=De.editable,bt=De.tabBarGutter,Ot=De.rtl,Wt=De.onTabClick,vr=Object(u.useState)(!1),kr=Object(h.a)(vr,2),Ir=kr[0],Fr=kr[1],Lr=Object(u.useState)(null),Kr=Object(h.a)(Lr,2),Gr=Kr[0],nn=Kr[1],Qr="".concat(Pe,"-more-popup"),En="".concat(Ke,"-dropdown"),en=Gr!==null?"".concat(Qr,"-").concat(Gr):null,wr=Ae==null?void 0:Ae.dropdownAriaLabel,Tr=u.createElement(Jr,{onClick:function(Rn){var Dn=Rn.key,Hn=Rn.domEvent;Wt(Dn,Hn),Fr(!1)},id:Qr,tabIndex:-1,role:"listbox","aria-activedescendant":en,selectedKeys:[Gr],"aria-label":wr!==void 0?wr:"expanded dropdown"},pe.map(function(xn){return u.createElement(Ft,{key:xn.key,id:"".concat(Qr,"-").concat(xn.key),role:"option","aria-controls":Pe&&"".concat(Pe,"-panel-").concat(xn.key),disabled:xn.disabled},xn.tab)}));function zr(xn){for(var Rn=pe.filter(function(ba){return!ba.disabled}),Dn=Rn.findIndex(function(ba){return ba.key===Gr})||0,Hn=Rn.length,oa=0;oa<Hn;oa+=1){Dn=(Dn+xn+Hn)%Hn;var Kn=Rn[Dn];if(!Kn.disabled){nn(Kn.key);return}}}function an(xn){var Rn=xn.which;if(!Ir){[v.a.DOWN,v.a.SPACE,v.a.ENTER].includes(Rn)&&(Fr(!0),xn.preventDefault());return}switch(Rn){case v.a.UP:zr(-1),xn.preventDefault();break;case v.a.DOWN:zr(1),xn.preventDefault();break;case v.a.ESC:Fr(!1);break;case v.a.SPACE:case v.a.ENTER:Gr!==null&&Wt(Gr,xn);break}}Object(u.useEffect)(function(){var xn=document.getElementById(en);xn&&xn.scrollIntoView&&xn.scrollIntoView(!1)},[Gr]),Object(u.useEffect)(function(){Ir||nn(null)},[Ir]);var hr=Object(L.a)({},Ot?"marginLeft":"marginRight",bt);pe.length||(hr.visibility="hidden",hr.order=1);var cn=w()(Object(L.a)({},"".concat(En,"-rtl"),Ot)),Un=be?null:u.createElement(Kt.a,{prefixCls:En,overlay:Tr,trigger:["hover"],visible:Ir,transitionName:Ue,onVisibleChange:Fr,overlayClassName:cn,mouseEnterDelay:.1,mouseLeaveDelay:.1},u.createElement("button",{type:"button",className:"".concat(Ke,"-nav-more"),style:hr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Qr,id:"".concat(Pe,"-more"),"aria-expanded":Ir,onKeyDown:an},Ne));return u.createElement("div",{className:w()("".concat(Ke,"-nav-operations"),Ge),style:je,ref:Fe},Un,u.createElement(rn,{prefixCls:Ke,locale:Ae,editable:at}))}var _r=u.forwardRef(gn),fr=Object(u.createContext)(null),gr=.1,Gt=.01,zt=20,Mr=Math.pow(.995,zt);function tr(){var De=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(De)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(De.substr(0,4)))}function pt(De,Fe){var Ke=Object(u.useState)(),Pe=Object(h.a)(Ke,2),pe=Pe[0],Ae=Pe[1],be=Object(u.useState)(0),Le=Object(h.a)(be,2),Ne=Le[0],Ue=Le[1],je=Object(u.useState)(0),Ge=Object(h.a)(je,2),at=Ge[0],bt=Ge[1],Ot=Object(u.useState)(),Wt=Object(h.a)(Ot,2),vr=Wt[0],kr=Wt[1],Ir=Object(u.useRef)();function Fr(wr){var Tr=wr.touches[0],zr=Tr.screenX,an=Tr.screenY;Ae({x:zr,y:an}),window.clearInterval(Ir.current)}function Lr(wr){if(!pe)return;wr.preventDefault();var Tr=wr.touches[0],zr=Tr.screenX,an=Tr.screenY;Ae({x:zr,y:an});var hr=zr-pe.x,cn=an-pe.y;Fe(hr,cn);var Un=Date.now();Ue(Un),bt(Un-Ne),kr({x:hr,y:cn})}function Kr(){if(!pe)return;if(Ae(null),kr(null),vr){var wr=vr.x/at,Tr=vr.y/at,zr=Math.abs(wr),an=Math.abs(Tr);if(Math.max(zr,an)<gr)return;var hr=wr,cn=Tr;Ir.current=window.setInterval(function(){if(Math.abs(hr)<Gt&&Math.abs(cn)<Gt){window.clearInterval(Ir.current);return}hr*=Mr,cn*=Mr,Fe(hr*zt,cn*zt)},zt)}}var Gr=Object(u.useRef)(0),nn=Object(u.useRef)(!1),Qr=Object(u.useRef)();function En(wr){var Tr=wr.deltaX,zr=wr.deltaY,an=0,hr=Math.abs(Tr),cn=Math.abs(zr);hr===cn?an=Qr.current==="x"?Tr:zr:hr>cn?(an=Tr,Qr.current="x"):(an=zr,Qr.current="y");var Un=Date.now();Un-Gr.current>100&&(nn.current=!1),(Fe(-an,-an)||nn.current)&&(wr.preventDefault(),nn.current=!0),Gr.current=Un}var en=Object(u.useRef)(null);en.current={onTouchStart:Fr,onTouchMove:Lr,onTouchEnd:Kr,onWheel:En},u.useEffect(function(){function wr(hr){en.current.onTouchStart(hr)}function Tr(hr){en.current.onTouchMove(hr)}function zr(hr){en.current.onTouchEnd(hr)}function an(hr){en.current.onWheel(hr)}return document.addEventListener("touchmove",Tr,{passive:!1}),document.addEventListener("touchend",zr,{passive:!1}),De.current.addEventListener("touchstart",wr,{passive:!1}),De.current.addEventListener("wheel",an),function(){document.removeEventListener("touchmove",Tr),document.removeEventListener("touchend",zr)}},[])}function Lt(){var De=Object(u.useRef)(new Map);function Fe(Pe){return De.current.has(Pe)||De.current.set(Pe,u.createRef()),De.current.get(Pe)}function Ke(Pe){De.current.delete(Pe)}return[Fe,Ke]}function vt(De,Fe){var Ke=u.useRef(De),Pe=u.useState({}),pe=Object(h.a)(Pe,2),Ae=pe[1];function be(Le){var Ne=typeof Le=="function"?Le(Ke.current):Le;Ne!==Ke.current&&Fe(Ne,Ke.current),Ke.current=Ne,Ae({})}return[Ke.current,be]}var ct=function(Fe){var Ke=Fe.position,Pe=Fe.prefixCls,pe=Fe.extra;if(!pe)return null;var Ae,be=pe;return Ke==="right"&&(Ae=be.right||!be.left&&be||null),Ke==="left"&&(Ae=be.left||null),Ae?u.createElement("div",{className:"".concat(Pe,"-extra-content")},Ae):null};function Xt(De,Fe){var Ke,Pe=u.useContext(fr),pe=Pe.prefixCls,Ae=Pe.tabs,be=De.className,Le=De.style,Ne=De.id,Ue=De.animated,je=De.activeKey,Ge=De.rtl,at=De.extra,bt=De.editable,Ot=De.locale,Wt=De.tabPosition,vr=De.tabBarGutter,kr=De.children,Ir=De.onTabClick,Fr=De.onTabScroll,Lr=Object(u.useRef)(),Kr=Object(u.useRef)(),Gr=Object(u.useRef)(),nn=Object(u.useRef)(),Qr=Lt(),En=Object(h.a)(Qr,2),en=En[0],wr=En[1],Tr=Wt==="top"||Wt==="bottom",zr=vt(0,function(Ln,pn){Tr&&Fr&&Fr({direction:Ln>pn?"left":"right"})}),an=Object(h.a)(zr,2),hr=an[0],cn=an[1],Un=vt(0,function(Ln,pn){!Tr&&Fr&&Fr({direction:Ln>pn?"top":"bottom"})}),xn=Object(h.a)(Un,2),Rn=xn[0],Dn=xn[1],Hn=Object(u.useState)(0),oa=Object(h.a)(Hn,2),Kn=oa[0],ba=oa[1],ka=Object(u.useState)(0),Ra=Object(h.a)(ka,2),aa=Ra[0],In=Ra[1],Cn=Object(u.useState)(0),Xn=Object(h.a)(Cn,2),Bn=Xn[0],Fa=Xn[1],ha=Object(u.useState)(0),Da=Object(h.a)(ha,2),On=Da[0],tn=Da[1],Za=Object(u.useState)(null),Pn=Object(h.a)(Za,2),yn=Pn[0],ea=Pn[1],Mi=Object(u.useState)(null),Si=Object(h.a)(Mi,2),ti=Si[0],ai=Si[1],ki=Object(u.useState)(0),Ci=Object(h.a)(ki,2),Ii=Ci[0],Ki=Ci[1],co=Object(u.useState)(0),Ni=Object(h.a)(co,2),ji=Ni[0],Oi=Ni[1],Ga=g(new Map),ii=Object(h.a)(Ga,2),fo=ii[0],yi=ii[1],Ai=t(Ae,fo,Kn),oi="".concat(pe,"-nav-operations-hidden"),bi=0,Ia=0;Tr?Ge?(bi=0,Ia=Math.max(0,Kn-yn)):(bi=Math.min(0,yn-Kn),Ia=0):(bi=Math.min(0,ti-aa),Ia=0);function si(Ln){return Ln<bi?[bi,!1]:Ln>Ia?[Ia,!1]:[Ln,!0]}var li=Object(u.useRef)(),di=Object(u.useState)(),ur=Object(h.a)(di,2),pr=ur[0],rr=ur[1];function dn(){rr(Date.now())}function nr(){window.clearTimeout(li.current)}pt(Lr,function(Ln,pn){var Ea=!1;function Ba(Fi,fi){Fi(function(Xi){var xi=si(Xi+fi),xa=Object(h.a)(xi,2),Qi=xa[0],po=xa[1];return Ea=po,Qi})}if(Tr){if(yn>=Kn)return Ea;Ba(cn,Ln)}else{if(ti>=aa)return Ea;Ba(Dn,pn)}return nr(),dn(),Ea}),Object(u.useEffect)(function(){return nr(),pr&&(li.current=window.setTimeout(function(){rr(0)},100)),nr},[pr]);function Xa(){var Ln=arguments.length>0&&arguments[0]!==void 0?arguments[0]:je,pn=Ai.get(Ln);if(!pn)return;if(Tr){var Ea=hr;Ge?pn.right<hr?Ea=pn.right:pn.right+pn.width>hr+yn&&(Ea=pn.right+pn.width-yn):pn.left<-hr?Ea=-pn.left:pn.left+pn.width>-hr+yn&&(Ea=-(pn.left+pn.width-yn)),Dn(0),cn(si(Ea)[0])}else{var Ba=Rn;pn.top<-Rn?Ba=-pn.top:pn.top+pn.height>-Rn+ti&&(Ba=-(pn.top+pn.height-ti)),cn(0),Dn(si(Ba)[0])}}var Ei=E(Ai,{width:yn,height:ti,left:hr,top:Rn},{width:Bn,height:On},{width:Ii,height:ji},Object(D.a)(Object(D.a)({},De),{},{tabs:Ae})),ta=Object(h.a)(Ei,2),Jo=ta[0],Qo=ta[1],Zo=Ae.map(function(Ln){var pn=Ln.key;return u.createElement(n,{id:Ne,prefixCls:pe,key:pn,rtl:Ge,tab:Ln,closable:Ln.closable,editable:bt,active:pn===je,tabPosition:Wt,tabBarGutter:vr,renderWrapper:kr,removeAriaLabel:Ot==null?void 0:Ot.removeAriaLabel,ref:en(pn),onClick:function(Ba){Ir(pn,Ba)},onRemove:function(){wr(pn)},onFocus:function(){Xa(pn),dn(),Ge||(Lr.current.scrollLeft=0),Lr.current.scrollTop=0}})}),ho=c(function(){var Ln,pn,Ea,Ba,Fi,fi,Xi,xi,xa,Qi=((Ln=Lr.current)===null||Ln===void 0?void 0:Ln.offsetWidth)||0,po=((pn=Lr.current)===null||pn===void 0?void 0:pn.offsetHeight)||0,mo=((Ea=nn.current)===null||Ea===void 0?void 0:Ea.offsetWidth)||0,Wa=((Ba=nn.current)===null||Ba===void 0?void 0:Ba.offsetHeight)||0,An=((Fi=Gr.current)===null||Fi===void 0?void 0:Fi.offsetWidth)||0,ni=((fi=Gr.current)===null||fi===void 0?void 0:fi.offsetHeight)||0;ea(Qi),ai(po),Ki(mo),Oi(Wa);var hi=(((Xi=Kr.current)===null||Xi===void 0?void 0:Xi.offsetWidth)||0)-mo,pi=(((xi=Kr.current)===null||xi===void 0?void 0:xi.offsetHeight)||0)-Wa;ba(hi),In(pi);var vo=(xa=Gr.current)===null||xa===void 0?void 0:xa.className.includes(oi);Fa(hi-(vo?0:An)),tn(pi-(vo?0:ni)),yi(function(){var Zi=new Map;return Ae.forEach(function(Io){var No=Io.key,Di=en(No).current;Di&&Zi.set(No,{width:Di.offsetWidth,height:Di.offsetHeight,left:Di.offsetLeft,top:Di.offsetTop})}),Zi})}),qo=Ae.slice(0,Jo),Ua=Ae.slice(Qo+1),sa=[].concat(Object(l.a)(qo),Object(l.a)(Ua)),Pa=Object(u.useState)(),la=Object(h.a)(Pa,2),zi=la[0],es=la[1],ri=Ai.get(je),Po=Object(u.useRef)();function Lo(){_.a.cancel(Po.current)}Object(u.useEffect)(function(){var Ln={};return ri&&(Tr?(Ge?Ln.right=ri.right:Ln.left=ri.left,Ln.width=ri.width):(Ln.top=ri.top,Ln.height=ri.height)),Lo(),Po.current=_()(function(){es(Ln)}),Lo},[ri,Tr,Ge]),Object(u.useEffect)(function(){Xa()},[je,ri,Ai,Tr]),Object(u.useEffect)(function(){ho()},[Ge,vr,je,Ae.map(function(Ln){return Ln.key}).join("_")]);var Mo=!!sa.length,Ri="".concat(pe,"-nav-wrap"),Yi,Gi,ko,Ji;return Tr?Ge?(Gi=hr>0,Yi=hr+yn<Kn):(Yi=hr<0,Gi=-hr+yn<Kn):(ko=Rn<0,Ji=-Rn+ti<aa),u.createElement("div",{ref:Fe,role:"tablist",className:w()("".concat(pe,"-nav"),be),style:Le,onKeyDown:function(){dn()}},u.createElement(ct,{position:"left",extra:at,prefixCls:pe}),u.createElement(m.a,{onResize:ho},u.createElement("div",{className:w()(Ri,(Ke={},Object(L.a)(Ke,"".concat(Ri,"-ping-left"),Yi),Object(L.a)(Ke,"".concat(Ri,"-ping-right"),Gi),Object(L.a)(Ke,"".concat(Ri,"-ping-top"),ko),Object(L.a)(Ke,"".concat(Ri,"-ping-bottom"),Ji),Ke)),ref:Lr},u.createElement(m.a,{onResize:ho},u.createElement("div",{ref:Kr,className:"".concat(pe,"-nav-list"),style:{transform:"translate(".concat(hr,"px, ").concat(Rn,"px)"),transition:pr?"none":void 0}},Zo,u.createElement(rn,{ref:nn,prefixCls:pe,locale:Ot,editable:bt,style:{visibility:Mo?"hidden":null}}),u.createElement("div",{className:w()("".concat(pe,"-ink-bar"),Object(L.a)({},"".concat(pe,"-ink-bar-animated"),Ue.inkBar)),style:zi}))))),u.createElement(_r,Object.assign({},De,{ref:Gr,prefixCls:pe,tabs:sa,className:!Mo&&oi})),u.createElement(ct,{position:"right",extra:at,prefixCls:pe}))}var Cr=u.forwardRef(Xt);function Vr(De){var Fe=De.id,Ke=De.activeKey,Pe=De.animated,pe=De.tabPosition,Ae=De.rtl,be=De.destroyInactiveTabPane,Le=u.useContext(fr),Ne=Le.prefixCls,Ue=Le.tabs,je=Pe.tabPane,Ge=Ue.findIndex(function(at){return at.key===Ke});return u.createElement("div",{className:w()("".concat(Ne,"-content-holder"))},u.createElement("div",{className:w()("".concat(Ne,"-content"),"".concat(Ne,"-content-").concat(pe),Object(L.a)({},"".concat(Ne,"-content-animated"),je)),style:Ge&&je?Object(L.a)({},Ae?"marginRight":"marginLeft","-".concat(Ge,"00%")):null},Ue.map(function(at){return u.cloneElement(at.node,{key:at.key,prefixCls:Ne,tabKey:at.key,id:Fe,animated:je,active:at.key===Ke,destroyInactiveTabPane:be})})))}function yr(De){var Fe=De.prefixCls,Ke=De.forceRender,Pe=De.className,pe=De.style,Ae=De.id,be=De.active,Le=De.animated,Ne=De.destroyInactiveTabPane,Ue=De.tabKey,je=De.children,Ge=u.useState(Ke),at=Object(h.a)(Ge,2),bt=at[0],Ot=at[1];u.useEffect(function(){be?Ot(!0):Ne&&Ot(!1)},[be,Ne]);var Wt={};return be||(Le?(Wt.visibility="hidden",Wt.height=0,Wt.overflowY="hidden"):Wt.display="none"),u.createElement("div",{id:Ae&&"".concat(Ae,"-panel-").concat(Ue),role:"tabpanel",tabIndex:be?0:-1,"aria-labelledby":Ae&&"".concat(Ae,"-tab-").concat(Ue),"aria-hidden":!be,style:Object(D.a)(Object(D.a)({},Wt),pe),className:w()("".concat(Fe,"-tabpane"),be&&"".concat(Fe,"-tabpane-active"),Pe)},(be||bt||Ke)&&je)}var Or=0;function jr(De){return Object(d.a)(De).map(function(Fe){if(u.isValidElement(Fe)){var Ke=Fe.key!==void 0?String(Fe.key):void 0;return Object(D.a)(Object(D.a)({key:Ke},Fe.props),{},{node:Fe})}return null}).filter(function(Fe){return Fe})}function Rr(De,Fe){var Ke,Pe=De.id,pe=De.prefixCls,Ae=pe===void 0?"rc-tabs":pe,be=De.className,Le=De.children,Ne=De.direction,Ue=De.activeKey,je=De.defaultActiveKey,Ge=De.editable,at=De.animated,bt=De.tabPosition,Ot=bt===void 0?"top":bt,Wt=De.tabBarGutter,vr=De.tabBarStyle,kr=De.tabBarExtraContent,Ir=De.locale,Fr=De.moreIcon,Lr=De.moreTransitionName,Kr=De.destroyInactiveTabPane,Gr=De.renderTabBar,nn=De.onChange,Qr=De.onTabClick,En=De.onTabScroll,en=Object(C.a)(De,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),wr=jr(Le),Tr=Ne==="rtl",zr;at===!1?zr={inkBar:!1,tabPane:!1}:zr=Object(D.a)({inkBar:!0,tabPane:!1},at!==!0?at:null);var an=Object(u.useState)(!1),hr=Object(h.a)(an,2),cn=hr[0],Un=hr[1];Object(u.useEffect)(function(){Un(tr())},[]);var xn=Object(o.a)(function(){var On;return(On=wr[0])===null||On===void 0?void 0:On.key},{value:Ue,defaultValue:je}),Rn=Object(h.a)(xn,2),Dn=Rn[0],Hn=Rn[1],oa=Object(u.useState)(function(){return wr.findIndex(function(On){return On.key===Dn})}),Kn=Object(h.a)(oa,2),ba=Kn[0],ka=Kn[1];Object(u.useEffect)(function(){var On=wr.findIndex(function(Za){return Za.key===Dn});if(On===-1){var tn;On=Math.max(0,Math.min(ba,wr.length-1)),Hn((tn=wr[On])===null||tn===void 0?void 0:tn.key)}ka(On)},[wr.map(function(On){return On.key}).join("_"),Dn,ba]);var Ra=Object(o.a)(null,{value:Pe}),aa=Object(h.a)(Ra,2),In=aa[0],Cn=aa[1],Xn=Ot;cn&&!["left","right"].includes(Ot)&&(Xn="top"),Object(u.useEffect)(function(){Pe||(Cn("rc-tabs-".concat(Or)),Or+=1)},[]);function Bn(On,tn){Qr==null||Qr(On,tn),Hn(On),nn==null||nn(On)}var Fa={id:In,activeKey:Dn,animated:zr,tabPosition:Xn,rtl:Tr,mobile:cn},ha,Da=Object(D.a)(Object(D.a)({},Fa),{},{editable:Ge,locale:Ir,moreIcon:Fr,moreTransitionName:Lr,tabBarGutter:Wt,onTabClick:Bn,onTabScroll:En,extra:kr,style:vr,panes:Le});return Gr?ha=Gr(Da,Cr):ha=u.createElement(Cr,Object.assign({},Da)),u.createElement(fr.Provider,{value:{tabs:wr,prefixCls:Ae}},u.createElement("div",Object.assign({ref:Fe,id:Pe,className:w()(Ae,"".concat(Ae,"-").concat(Xn),(Ke={},Object(L.a)(Ke,"".concat(Ae,"-mobile"),cn),Object(L.a)(Ke,"".concat(Ae,"-editable"),Ge),Object(L.a)(Ke,"".concat(Ae,"-rtl"),Tr),Ke),be)},en),ha,u.createElement(Vr,Object.assign({destroyInactiveTabPane:Kr},Fa,{animated:zr}))))}var Wr=u.forwardRef(Rr);Wr.TabPane=yr;var Hr=Wr,wn=Q.b=Hr},kSUc:function(j,Q,k){},lPiR:function(j,Q,k){(function(L,h){j.exports=Q=h(k("Ib8C"))})(this,function(L){return function(h){var C=L,D=C.lib,u=D.WordArray,f=D.Hasher,w=C.algo,d=[],o=[];(function(){function _(v){for(var x=h.sqrt(v),n=2;n<=x;n++)if(!(v%n))return!1;return!0}function m(v){return(v-(v|0))*4294967296|0}for(var c=2,g=0;g<64;)_(c)&&(g<8&&(d[g]=m(h.pow(c,1/2))),o[g]=m(h.pow(c,1/3)),g++),c++})();var l=[],a=w.SHA256=f.extend({_doReset:function(){this._hash=new u.init(d.slice(0))},_doProcessBlock:function(_,m){for(var c=this._hash.words,g=c[0],v=c[1],x=c[2],n=c[3],i=c[4],t=c[5],S=c[6],E=c[7],s=0;s<64;s++){if(s<16)l[s]=_[m+s]|0;else{var P=l[s-15],O=(P<<25|P>>>7)^(P<<14|P>>>18)^P>>>3,b=l[s-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;l[s]=O+l[s-7]+y+l[s-16]}var p=i&t^~i&S,T=g&v^g&x^v&x,M=(g<<30|g>>>2)^(g<<19|g>>>13)^(g<<10|g>>>22),N=(i<<26|i>>>6)^(i<<21|i>>>11)^(i<<7|i>>>25),I=E+N+p+o[s]+l[s],K=M+T;E=S,S=t,t=i,i=n+I|0,n=x,x=v,v=g,g=I+K|0}c[0]=c[0]+g|0,c[1]=c[1]+v|0,c[2]=c[2]+x|0,c[3]=c[3]+n|0,c[4]=c[4]+i|0,c[5]=c[5]+t|0,c[6]=c[6]+S|0,c[7]=c[7]+E|0},_doFinalize:function(){var _=this._data,m=_.words,c=this._nDataBytes*8,g=_.sigBytes*8;return m[g>>>5]|=128<<24-g%32,m[(g+64>>>9<<4)+14]=h.floor(c/4294967296),m[(g+64>>>9<<4)+15]=c,_.sigBytes=m.length*4,this._process(),this._hash},clone:function(){var _=f.clone.call(this);return _._hash=this._hash.clone(),_}});C.SHA256=f._createHelper(a),C.HmacSHA256=f._createHmacHelper(a)}(Math),L.SHA256})},lZu9:function(j,Q,k){(function(L){L(k("VrN/"),k("1eCo"),k("8EBN"))})(function(L){"use strict";L.defineMode("markdown",function(h,C){var D=L.getMode(h,"text/html"),u=D.name=="null";function f(U){if(L.findModeByName){var B=L.findModeByName(U);B&&(U=B.mime||B.mimes[0])}var G=L.getMode(h,U);return G.name=="null"?null:G}C.highlightFormatting===void 0&&(C.highlightFormatting=!1),C.maxBlockquoteDepth===void 0&&(C.maxBlockquoteDepth=0),C.taskLists===void 0&&(C.taskLists=!1),C.strikethrough===void 0&&(C.strikethrough=!1),C.emoji===void 0&&(C.emoji=!1),C.fencedCodeBlockHighlighting===void 0&&(C.fencedCodeBlockHighlighting=!0),C.fencedCodeBlockDefaultMode===void 0&&(C.fencedCodeBlockDefaultMode="text/plain"),C.xml===void 0&&(C.xml=!0),C.tokenTypeOverrides===void 0&&(C.tokenTypeOverrides={});var w={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 d in w)w.hasOwnProperty(d)&&C.tokenTypeOverrides[d]&&(w[d]=C.tokenTypeOverrides[d]);var o=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,a=/^\[(x| )\](?=\s)/i,_=C.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,m=/^ {0,3}(?:\={1,}|-{2,})\s*$/,c=/^[^#!\[\]*_\\<>` "'(~:]+/,g=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,v=/^\s*\[[^\]]+?\]:.*$/,x=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 i(U,B,G){return B.f=B.inline=G,G(U,B)}function t(U,B,G){return B.f=B.block=G,G(U,B)}function S(U){return!U||!/\S/.test(U.string)}function E(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==P){var B=u;if(!B){var G=L.innerMode(D,U.htmlState);B=G.mode.name=="xml"&&G.state.tagStart===null&&!G.state.context&&G.state.tokenize.isInText}B&&(U.f=p,U.block=s,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function s(U,B){var G=U.column()===B.indentation,q=S(B.prevLine.stream),ae=B.indentedCode,se=B.prevLine.hr,we=B.list!==!1,Se=(B.listStack[B.listStack.length-1]||0)+3;B.indentedCode=!1;var de=B.indentation;if(B.indentationDiff===null&&(B.indentationDiff=B.indentation,we)){for(B.list=null;de<B.listStack[B.listStack.length-1];)B.listStack.pop(),B.listStack.length?B.indentation=B.listStack[B.listStack.length-1]:B.list=!1;B.list!==!1&&(B.indentationDiff=de-B.listStack[B.listStack.length-1])}var xe=!q&&!se&&!B.prevLine.header&&(!we||!ae)&&!B.prevLine.fencedCodeEnd,he=(B.list===!1||se||q)&&B.indentation<=Se&&U.match(o),ne=null;if(B.indentationDiff>=4&&(ae||B.prevLine.fencedCodeEnd||B.prevLine.header||q))return U.skipToEnd(),B.indentedCode=!0,w.code;if(U.eatSpace())return null;if(G&&B.indentation<=Se&&(ne=U.match(_))&&ne[1].length<=6)return B.quote=0,B.header=ne[1].length,B.thisLine.header=!0,C.highlightFormatting&&(B.formatting="header"),B.f=B.inline,b(B);if(B.indentation<=Se&&U.eat(">"))return B.quote=G?1:B.quote+1,C.highlightFormatting&&(B.formatting="quote"),U.eatSpace(),b(B);if(!he&&!B.setext&&G&&B.indentation<=Se&&(ne=U.match(l))){var oe=ne[1]?"ol":"ul";return B.indentation=de+U.current().length,B.list=!0,B.quote=0,B.listStack.push(B.indentation),B.em=!1,B.strong=!1,B.code=!1,B.strikethrough=!1,C.taskLists&&U.match(a,!1)&&(B.taskList=!0),B.f=B.inline,C.highlightFormatting&&(B.formatting=["list","list-"+oe]),b(B)}else{if(G&&B.indentation<=Se&&(ne=U.match(g,!0)))return B.quote=0,B.fencedEndRE=new RegExp(ne[1]+"+ *$"),B.localMode=C.fencedCodeBlockHighlighting&&f(ne[2]||C.fencedCodeBlockDefaultMode),B.localMode&&(B.localState=L.startState(B.localMode)),B.f=B.block=O,C.highlightFormatting&&(B.formatting="code-block"),B.code=-1,b(B);if(B.setext||(!xe||!we)&&!B.quote&&B.list===!1&&!B.code&&!he&&!v.test(U.string)&&(ne=U.lookAhead(1))&&(ne=ne.match(m)))return B.setext?(B.header=B.setext,B.setext=0,U.skipToEnd(),C.highlightFormatting&&(B.formatting="header")):(B.header=ne[0].charAt(0)=="="?1:2,B.setext=B.header),B.thisLine.header=!0,B.f=B.inline,b(B);if(he)return U.skipToEnd(),B.hr=!0,B.thisLine.hr=!0,w.hr;if(U.peek()==="[")return i(U,B,K)}return i(U,B,B.inline)}function P(U,B){var G=D.token(U,B.htmlState);if(!u){var q=L.innerMode(D,B.htmlState);(q.mode.name=="xml"&&q.state.tagStart===null&&!q.state.context&&q.state.tokenize.isInText||B.md_inside&&U.current().indexOf(">")>-1)&&(B.f=p,B.block=s,B.htmlState=null)}return G}function O(U,B){var G=B.listStack[B.listStack.length-1]||0,q=B.indentation<G,ae=G+3;if(B.fencedEndRE&&B.indentation<=ae&&(q||U.match(B.fencedEndRE))){C.highlightFormatting&&(B.formatting="code-block");var se;return q||(se=b(B)),B.localMode=B.localState=null,B.block=s,B.f=p,B.fencedEndRE=null,B.code=0,B.thisLine.fencedCodeEnd=!0,q?t(U,B,B.block):se}else return B.localMode?B.localMode.token(U,B.localState):(U.skipToEnd(),w.code)}function b(U){var B=[];if(U.formatting){B.push(w.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var G=0;G<U.formatting.length;G++)B.push(w.formatting+"-"+U.formatting[G]),U.formatting[G]==="header"&&B.push(w.formatting+"-"+U.formatting[G]+"-"+U.header),U.formatting[G]==="quote"&&(!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=U.quote?B.push(w.formatting+"-"+U.formatting[G]+"-"+U.quote):B.push("error"))}if(U.taskOpen)return B.push("meta"),B.length?B.join(" "):null;if(U.taskClosed)return B.push("property"),B.length?B.join(" "):null;if(U.linkHref?B.push(w.linkHref,"url"):(U.strong&&B.push(w.strong),U.em&&B.push(w.em),U.strikethrough&&B.push(w.strikethrough),U.emoji&&B.push(w.emoji),U.linkText&&B.push(w.linkText),U.code&&B.push(w.code),U.image&&B.push(w.image),U.imageAltText&&B.push(w.imageAltText,"link"),U.imageMarker&&B.push(w.imageMarker)),U.header&&B.push(w.header,w.header+"-"+U.header),U.quote&&(B.push(w.quote),!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=U.quote?B.push(w.quote+"-"+U.quote):B.push(w.quote+"-"+C.maxBlockquoteDepth)),U.list!==!1){var q=(U.listStack.length-1)%3;q?q===1?B.push(w.list2):B.push(w.list3):B.push(w.list1)}return U.trailingSpaceNewLine?B.push("trailing-space-new-line"):U.trailingSpace&&B.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),B.length?B.join(" "):null}function y(U,B){return U.match(c,!0)?b(B):void 0}function p(U,B){var G=B.text(U,B);if(typeof G!="undefined")return G;if(B.list)return B.list=null,b(B);if(B.taskList){var q=U.match(a,!0)[1]===" ";return q?B.taskOpen=!0:B.taskClosed=!0,C.highlightFormatting&&(B.formatting="task"),B.taskList=!1,b(B)}if(B.taskOpen=!1,B.taskClosed=!1,B.header&&U.match(/^#+$/,!0))return C.highlightFormatting&&(B.formatting="header"),b(B);var ae=U.next();if(B.linkTitle){B.linkTitle=!1;var se=ae;ae==="("&&(se=")"),se=(se+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var we="^\\s*(?:[^"+se+"\\\\]+|\\\\\\\\|\\\\.)"+se;if(U.match(new RegExp(we),!0))return w.linkHref}if(ae==="`"){var Se=B.formatting;C.highlightFormatting&&(B.formatting="code"),U.eatWhile("`");var de=U.current().length;if(B.code==0&&(!B.quote||de==1))return B.code=de,b(B);if(de==B.code){var xe=b(B);return B.code=0,xe}else return B.formatting=Se,b(B)}else if(B.code)return b(B);if(ae==="\\"&&(U.next(),C.highlightFormatting)){var he=b(B),ne=w.formatting+"-escape";return he?he+" "+ne:ne}if(ae==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return B.imageMarker=!0,B.image=!0,C.highlightFormatting&&(B.formatting="image"),b(B);if(ae==="["&&B.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return B.imageMarker=!1,B.imageAltText=!0,C.highlightFormatting&&(B.formatting="image"),b(B);if(ae==="]"&&B.imageAltText){C.highlightFormatting&&(B.formatting="image");var he=b(B);return B.imageAltText=!1,B.image=!1,B.inline=B.f=M,he}if(ae==="["&&!B.image)return B.linkText&&U.match(/^.*?\]/)||(B.linkText=!0,C.highlightFormatting&&(B.formatting="link")),b(B);if(ae==="]"&&B.linkText){C.highlightFormatting&&(B.formatting="link");var he=b(B);return B.linkText=!1,B.inline=B.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?M:p,he}if(ae==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){B.f=B.inline=T,C.highlightFormatting&&(B.formatting="link");var he=b(B);return he?he+=" ":he="",he+w.linkInline}if(ae==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){B.f=B.inline=T,C.highlightFormatting&&(B.formatting="link");var he=b(B);return he?he+=" ":he="",he+w.linkEmail}if(C.xml&&ae==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var oe=U.string.indexOf(">",U.pos);if(oe!=-1){var te=U.string.substring(U.start,oe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(te)&&(B.md_inside=!0)}return U.backUp(1),B.htmlState=L.startState(D),t(U,B,P)}if(C.xml&&ae==="<"&&U.match(/^\/\w*?>/))return B.md_inside=!1,"tag";if(ae==="*"||ae==="_"){for(var le=1,Y=U.pos==1?" ":U.string.charAt(U.pos-2);le<3&&U.eat(ae);)le++;var Z=U.peek()||" ",ge=!/\s/.test(Z)&&(!x.test(Z)||/\s/.test(Y)||x.test(Y)),ee=!/\s/.test(Y)&&(!x.test(Y)||/\s/.test(Z)||x.test(Z)),$=null,X=null;if(le%2&&(!B.em&&ge&&(ae==="*"||!ee||x.test(Y))?$=!0:B.em==ae&&ee&&(ae==="*"||!ge||x.test(Z))&&($=!1)),le>1&&(!B.strong&&ge&&(ae==="*"||!ee||x.test(Y))?X=!0:B.strong==ae&&ee&&(ae==="*"||!ge||x.test(Z))&&(X=!1)),X!=null||$!=null){C.highlightFormatting&&(B.formatting=$==null?"strong":X==null?"em":"strong em"),$===!0&&(B.em=ae),X===!0&&(B.strong=ae);var xe=b(B);return $===!1&&(B.em=!1),X===!1&&(B.strong=!1),xe}}else if(ae===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return b(B);U.backUp(1)}if(C.strikethrough){if(ae==="~"&&U.eatWhile(ae)){if(B.strikethrough){C.highlightFormatting&&(B.formatting="strikethrough");var xe=b(B);return B.strikethrough=!1,xe}else if(U.match(/^[^\s]/,!1))return B.strikethrough=!0,C.highlightFormatting&&(B.formatting="strikethrough"),b(B)}else if(ae===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return b(B);U.backUp(2)}}if(C.emoji&&ae===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){B.emoji=!0,C.highlightFormatting&&(B.formatting="emoji");var J=b(B);return B.emoji=!1,J}return ae===" "&&(U.match(/^ +$/,!1)?B.trailingSpace++:B.trailingSpace&&(B.trailingSpaceNewLine=!0)),b(B)}function T(U,B){var G=U.next();if(G===">"){B.f=B.inline=p,C.highlightFormatting&&(B.formatting="link");var q=b(B);return q?q+=" ":q="",q+w.linkInline}return U.match(/^[^>]+/,!0),w.linkInline}function M(U,B){if(U.eatSpace())return null;var G=U.next();return G==="("||G==="["?(B.f=B.inline=I(G==="("?")":"]"),C.highlightFormatting&&(B.formatting="link-string"),B.linkHref=!0,b(B)):"error"}var N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function I(U){return function(B,G){var q=B.next();if(q===U){G.f=G.inline=p,C.highlightFormatting&&(G.formatting="link-string");var ae=b(G);return G.linkHref=!1,ae}return B.match(N[U]),G.linkHref=!0,b(G)}}function K(U,B){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(B.f=H,U.next(),C.highlightFormatting&&(B.formatting="link"),B.linkText=!0,b(B)):i(U,B,p)}function H(U,B){if(U.match(/^\]:/,!0)){B.f=B.inline=W,C.highlightFormatting&&(B.formatting="link");var G=b(B);return B.linkText=!1,G}return U.match(/^([^\]\\]|\\.)+/,!0),w.linkText}function W(U,B){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?B.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),B.f=B.inline=p,w.linkHref+" url")}var z={startState:function(){return{f:s,prevLine:{stream:null},thisLine:{stream:null},block:s,htmlState:null,indentation:0,inline:p,text:y,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(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&L.copyState(D,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?L.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,B){if(B.formatting=!1,U!=B.thisLine.stream){if(B.header=0,B.hr=!1,U.match(/^\s*$/,!0))return E(B),null;if(B.prevLine=B.thisLine,B.thisLine={stream:U},B.taskList=!1,B.trailingSpace=0,B.trailingSpaceNewLine=!1,!B.localState&&(B.f=B.block,B.f!=P)){var G=U.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(B.indentation=G,B.indentationDiff=null,G>0)return null}}return B.f(U,B)},innerMode:function(U){return U.block==P?{state:U.htmlState,mode:D}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:z}},indent:function(U,B,G){return U.block==P&&D.indent?D.indent(U.htmlState,B,G):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,B,G):L.Pass},blankLine:E,getType:b,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return z},"xml"),L.defineMIME("text/markdown","markdown"),L.defineMIME("text/x-markdown","markdown")})},mOS8:function(j,Q,k){j.exports=k.p+"static/403Qrcode.6c17b6f4.png"},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(j){if(!0)module.exports=j();else var Q})(function(){var define,module,exports;return function(){function j(Q,k,L){function h(u,f){if(!k[u]){if(!Q[u]){var w=typeof require=="function"&&require;if(!f&&w)return require(u,!0);if(C)return C(u,!0);var d=new Error("Cannot find module '"+u+"'");throw d.code="MODULE_NOT_FOUND",d}var o=k[u]={exports:{}};Q[u][0].call(o.exports,function(l){var a=Q[u][1][l];return h(a||l)},o,o.exports,j,Q,k,L)}return k[u].exports}for(var C=typeof require=="function"&&require,D=0;D<L.length;D++)h(L[D]);return h}return j}()({1:[function(j,Q,k){"use strict";var L=j("./browser/client");L.Buffer=j("buffer").Buffer,L.urllib=j("../shims/xhr"),L.version=j("./browser/version").version,Q.exports=L},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(j,Q,k){(function(L,h){"use strict";var C=j("babel-runtime/core-js/promise"),D=o(C),u=j("babel-runtime/regenerator"),f=o(u),w=j("babel-runtime/core-js/object/assign"),d=o(w);function o(K){return K&&K.__esModule?K:{default:K}}var l=j("debug")("ali-oss"),a=j("copy-to"),_=j("xml2js"),m=j("agentkeepalive"),c=j("merge-descriptors"),g=j("url"),v=j("is-type-of"),x=j("platform"),n=j("utility"),i=j("urllib"),t=j("./version"),S=j("bowser"),E=j("../common/signUtils"),s=j("../common/utils/isIP"),P=s.isIP,O=j("../common/client/initOptions"),b=j("../common/utils/createRequest"),y=b.createRequest,p=new m;function T(){var K=x.name,H=x.version;K&&K.toLowerCase&&K.toLowerCase()==="ie"&&H.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function M(){return location&&location.protocol==="https:"}function N(K,H){if(T(),!(this instanceof N))return new N(K,H);K&&K.inited?this.options=K:this.options=N.initOptions(K),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=i,this.agent=this.options.agent||p),this.ctx=H,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}Q.exports=N,N.initOptions=function(H){H.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var W=(0,d.default)({secure:M(),useFetch:!1},H);return O(W)};var I=N.prototype;I.debug=l,c(I,j("./object")),c(I,j("../common/bucket/getBucketWebsite")),c(I,j("../common/bucket/putBucketWebsite")),c(I,j("../common/bucket/deleteBucketWebsite")),c(I,j("../common/bucket/getBucketLifecycle")),c(I,j("../common/bucket/putBucketLifecycle")),c(I,j("../common/bucket/deleteBucketLifecycle")),c(I,j("../common/bucket/putBucketVersioning")),c(I,j("../common/bucket/getBucketVersioning")),c(I,j("./managed-upload")),c(I,j("../common/multipart")),c(I,j("../common/parallel")),I.signature=function(H){return this.debug("authorization stringToSign: %s",H,"info"),E.computeSignature(this.options.accessKeySecret,H)},I.authorization=function(H,W,z,U){var B=E.buildCanonicalString(H.toUpperCase(),W,{headers:U,parameters:z});return E.authorization(this.options.accessKeyId,this.options.accessKeySecret,B)},I.request=function(H){var W,z,U,B,G,q;return f.default.async(function(se){for(;;)switch(se.prev=se.next){case 0:return W=y.call(this,H),this.options.useFetch||(W.params.mode="disable-fetch"),z=void 0,U=void 0,B=!!H.stream,se.prev=5,se.next=8,f.default.awrap(this.urllib.request(W.url,W.params));case 8:z=se.sent,this.debug("response %s %s, got %s, headers: %j",H.method,W.url,z.status,z.headers,"info"),se.next=15;break;case 12:se.prev=12,se.t0=se.catch(5),U=se.t0;case 15:if(G=void 0,!(z&&H.successStatuses&&H.successStatuses.indexOf(z.status)===-1)){se.next=28;break}return se.next=19,f.default.awrap(this.requestError(z));case 19:if(G=se.sent,!(G.code==="RequestTimeTooSkewed"&&!B)){se.next=25;break}return this.options.amendTimeSkewed=+new Date(G.serverTime)-new Date,se.next=24,f.default.awrap(this.request(H));case 24:return se.abrupt("return",se.sent);case 25:G.params=H,se.next=32;break;case 28:if(!U){se.next=32;break}return se.next=31,f.default.awrap(this.requestError(U));case 31:G=se.sent;case 32:if(!G){se.next=34;break}throw G;case 34:if(!H.xmlResponse){se.next=39;break}return se.next=37,f.default.awrap(this.parseXML(z.data));case 37:q=se.sent,z.data=q;case 39:return se.abrupt("return",z);case 40:case"end":return se.stop()}},null,this,[[5,12]])},I._getResource=function(H){var W="/";return H.bucket&&(W+=H.bucket+"/"),H.object&&(W+=H.object),W},I._isIP=P,I._escape=function(H){return n.encodeURIComponent(H).replace(/%2F/g,"/")},I._getReqUrl=function(H){var W={};a(this.options.endpoint).to(W);var z=this._isIP(W.hostname),U=this.options.cname;H.bucket&&!U&&!z&&(W.host=H.bucket+"."+W.host);var B="/";H.bucket&&z&&(B+=H.bucket+"/"),H.object&&(B+=this._escape(H.object).replace(/\+/g,"%2B")),W.pathname=B;var G={};if(H.query&&c(G,H.query),H.subres){var q={};v.string(H.subres)?q[H.subres]="":v.array(H.subres)?H.subres.forEach(function(ae){q[ae]=""}):q=H.subres,c(G,q)}return W.query=G,g.format(W)},I._getUserAgent=function(){var H=h&&h.browser?"js":"nodejs",W="aliyun-sdk-"+H+"/"+t.version,z=x.description;return!z&&h&&(z="Node.js "+h.version.slice(1)+" on "+h.platform+" "+h.arch),this._checkUserAgent(W+" "+z)},I._checkUserAgent=function(H){var W=H.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return W},I.checkBrowserAndVersion=function(H,W){return S.name===H&&S.version.split(".")[0]===W},I.parseXML=function(H){return new D.default(function(W,z){L.isBuffer(H)&&(H=H.toString()),_.parseString(H,{explicitRoot:!1,explicitArray:!1},function(U,B){U?z(U):W(B)})})},I.requestError=function(H){var W,z,U,B;return f.default.async(function(q){for(;;)switch(q.prev=q.next){case 0:if(W=null,!(!H.data||!H.data.length)){q.next=5;break}H.status===-1||H.status===-2?(W=new Error(H.message),W.name=H.name,W.status=H.status,W.code=H.name):(H.status===404?(W=new Error("Object not exists"),W.name="NoSuchKeyError",W.status=404,W.code="NoSuchKey"):H.status===412?(W=new Error("Pre condition failed"),W.name="PreconditionFailedError",W.status=412,W.code="PreconditionFailed"):(W=new Error("Unknow error, status: "+H.status),W.name="UnknowError",W.status=H.status),W.requestId=H.headers["x-oss-request-id"],W.host=""),q.next=33;break;case 5:return z=String(H.data),this.debug("request response error data: %s",z,"error"),U=void 0,q.prev=8,q.next=11,f.default.awrap(this.parseXML(z));case 11:if(q.t0=q.sent,q.t0){q.next=14;break}q.t0={};case 14:U=q.t0,q.next=24;break;case 17:return q.prev=17,q.t1=q.catch(8),this.debug(z,"error"),q.t1.message+=`
|
|
|
raw xml: `+z,q.t1.status=H.status,q.t1.requestId=H.headers["x-oss-request-id"],q.abrupt("return",q.t1);case 24:B=U.Message||"unknow request error, status: "+H.status,U.Condition&&(B+=" (condition: "+U.Condition+")"),W=new Error(B),W.name=U.Code?U.Code+"Error":"UnknowError",W.status=H.status,W.code=U.Code,W.requestId=U.RequestId,W.hostId=U.HostId,W.serverTime=U.ServerTime;case 33:return this.debug("generate error %j",W,"error"),q.abrupt("return",W);case 35:case"end":return q.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:j("../../node_modules/is-buffer/index.js")},j("_process"))},{"../../node_modules/is-buffer/index.js":197,"../common/bucket/deleteBucketLifecycle":6,"../common/bucket/deleteBucketWebsite":7,"../common/bucket/getBucketLifecycle":8,"../common/bucket/getBucketVersioning":9,"../common/bucket/getBucketWebsite":10,"../common/bucket/putBucketLifecycle":11,"../common/bucket/putBucketVersioning":12,"../common/bucket/putBucketWebsite":13,"../common/client/initOptions":15,"../common/multipart":18,"../common/parallel":33,"../common/signUtils":34,"../common/utils/createRequest":38,"../common/utils/isIP":45,"./managed-upload":3,"./object":4,"./version":5,_process:208,agentkeepalive:48,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,bowser:70,"copy-to":76,debug:288,"is-type-of":289,"merge-descriptors":200,platform:206,url:238,urllib:291,utility:290,xml2js:249}],3:[function(j,Q,k){(function(L){"use strict";var h=j("babel-runtime/core-js/array/from"),C=d(h),D=j("babel-runtime/core-js/promise"),u=d(D),f=j("babel-runtime/regenerator"),w=d(f);function d(E){return E&&E.__esModule?E:{default:E}}var o=j("is-type-of"),l=j("util"),a=j("path"),_=j("mime"),m=j("copy-to"),c=j("../common/utils/isBlob"),g=c.isBlob,v=j("../common/utils/isFile"),x=v.isFile,n=k;n.multipartUpload=function(s,P,O){var b,y,p,T,M,N,I,K,H;return w.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:if(this.resetCancelFlag(),O=O||{},!(O.checkpoint&&O.checkpoint.uploadId)){z.next=6;break}return z.next=5,w.default.awrap(this._resumeMultipart(O.checkpoint,O));case 5:return z.abrupt("return",z.sent);case 6:return b=100*1024,O.mime||(x(P)?O.mime=_.getType(a.extname(P.name)):g(P)?O.mime=P.type:O.mime=_.getType(a.extname(P))),O.headers=O.headers||{},this._convertMetaToHeaders(O.meta,O.headers),z.next=12,w.default.awrap(this._getFileSize(P));case 12:if(y=z.sent,!(y<b)){z.next=25;break}return p=this._createStream(P,0,y),O.contentLength=y,z.next=18,w.default.awrap(this.putStream(s,p,O));case 18:if(T=z.sent,!(O&&O.progress)){z.next=22;break}return z.next=22,w.default.awrap(O.progress(1));case 22:return M={res:T.res,bucket:this.options.bucket,name:s,etag:T.res.headers.etag},(O.headers&&O.headers["x-oss-callback"]||O.callback)&&(M.data=T.data),z.abrupt("return",M);case 25:if(!(O.partSize&&!(parseInt(O.partSize,10)===O.partSize))){z.next=27;break}throw new Error("partSize must be int number");case 27:if(!(O.partSize&&O.partSize<b)){z.next=29;break}throw new Error("partSize must not be smaller than "+b);case 29:return z.next=31,w.default.awrap(this.initMultipartUpload(s,O));case 31:if(N=z.sent,I=N.uploadId,K=this._getPartSize(y,O.partSize),H={file:P,name:s,fileSize:y,partSize:K,uploadId:I,doneParts:[]},!(O&&O.progress)){z.next=38;break}return z.next=38,w.default.awrap(O.progress(0,H,N.res));case 38:return z.next=40,w.default.awrap(this._resumeMultipart(H,O));case 40:return z.abrupt("return",z.sent);case 41:case"end":return z.stop()}},null,this)},n._resumeMultipart=function(s,P){var O,b,y,p,T,M,N,I,K,H,W,z,U,B,G,q,ae,se;return w.default.async(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(O=this,!this.isCancel()){Se.next=3;break}throw this._makeCancelEvent();case 3:return b=s.file,y=s.fileSize,p=s.partSize,T=s.uploadId,M=s.doneParts,N=s.name,I=[],M.length>0&&m(M).to(I),K=this._divideParts(y,p),H=K.length,W=!1,z=function(xe,he){var ne=this;return new u.default(function(te,le){var Y,Z,ge,ee;return w.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,xe.isCancel()){X.next=18;break}return Y=K[he-1],Z={stream:xe._createStream(b,Y.start,Y.end),size:Y.end-Y.start},X.next=6,w.default.awrap(xe._uploadPart(N,T,he,Z));case 6:if(ge=X.sent,!(!xe.isCancel()&&!W)){X.next=15;break}if(s.doneParts.push({number:he,etag:ge.res.headers.etag}),!P.progress){X.next=12;break}return X.next=12,w.default.awrap(P.progress(M.length/H,s,ge.res));case 12:te({number:he,etag:ge.res.headers.etag}),X.next=16;break;case 15:te();case 16:X.next=19;break;case 18:te();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),ee=new Error,ee.name=X.t0.name,ee.message=X.t0.message,ee.stack=X.t0.stack,ee.partNum=he,m(X.t0).to(ee),le(ee);case 30:case"end":return X.stop()}},null,ne,[[0,21]])})},U=(0,C.default)(new Array(H),function(de,xe){return xe+1}),B=I.map(function(de){return de.number}),G=U.filter(function(de){return B.indexOf(de)<0}),q=5,ae=P.parallel||q,Se.next=17,w.default.awrap(this._parallel(G,ae,function(de){return new u.default(function(xe,he){z(O,de).then(function(ne){ne&&I.push(ne),xe()}).catch(function(ne){he(ne)})})}));case 17:if(se=Se.sent,W=!0,!this.isCancel()){Se.next=22;break}throw z=null,this._makeCancelEvent();case 22:if(!(se&&se.length>0)){Se.next=25;break}throw se[0].message="Failed to upload some parts with error: "+se[0].toString()+" part_num: "+se[0].partNum,se[0];case 25:return Se.next=27,w.default.awrap(this.completeMultipartUpload(N,T,I,P));case 27:return Se.abrupt("return",Se.sent);case 28:case"end":return Se.stop()}},null,this)},n._getFileSize=function(s){return w.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!o.buffer(s)){O.next=4;break}return O.abrupt("return",s.length);case 4:if(!(g(s)||x(s))){O.next=6;break}return O.abrupt("return",s.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var i=j("stream"),t=i.Readable;function S(E,s){if(!(this instanceof S))return new S(E,s);t.call(this,s),this.file=E,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}l.inherits(S,t),S.prototype.readFileAndPush=function(s){if(this.fileBuffer)for(var P=!0;P&&this.fileBuffer&&this.start<this.fileBuffer.length;){var O=this.start,b=O+s;b=b>this.fileBuffer.length?this.fileBuffer.length:b,this.start=b,P=this.push(this.fileBuffer.slice(O,b))}},S.prototype._read=function(s){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var P=16*1024;s=s||P;var O=this;this.reader.onload=function(y){O.fileBuffer=L.from(new Uint8Array(y.target.result)),O.file=null,O.readFileAndPush(s)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(s)},n._createStream=function(s,P,O){if(g(s)||x(s))return new S(s.slice(P,O));throw new Error("_createStream requires File/Blob.")},n._getPartSize=function(s,P){var O=10*1e3,b=1024*1024;return P?Math.max(Math.ceil(s/O),P):b},n._divideParts=function(s,P){for(var O=Math.ceil(s/P),b=[],y=0;y<O;y++){var p=P*y,T=Math.min(p+P,s);b.push({start:p,end:T})}return b}}).call(this,j("buffer").Buffer)},{"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/array/from":52,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,buffer:73,"copy-to":76,"is-type-of":289,mime:202,path:205,stream:230,util:243}],4:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/promise"),h=o(L),C=j("babel-runtime/core-js/object/keys"),D=o(C),u=j("babel-runtime/core-js/object/assign"),f=o(u),w=j("babel-runtime/regenerator"),d=o(w);function o(O){return O&&O.__esModule?O:{default:O}}var l=j("utility"),a=j("fs"),_=j("is-type-of"),m=j("url"),c=j("copy-to"),g=j("path"),v=j("mime"),x=j("../common/callback"),n=j("../common/signUtils"),i=j("merge-descriptors"),t=j("../common/utils/isBlob"),S=t.isBlob,E=j("../common/utils/isFile"),s=E.isFile,P=k;P.append=function(b,y,p){var T;return d.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return p=p||{},p.position===void 0&&(p.position="0"),p.subres={append:"",position:p.position},p.method="POST",N.next=6,d.default.awrap(this.put(b,y,p));case 6:return T=N.sent,T.nextAppendPosition=T.res.headers["x-oss-next-append-position"],N.abrupt("return",T);case 9:case"end":return N.stop()}},null,this)},P.put=function(b,y,p){var T,M,N,I,K,H,W;return d.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(T=void 0,p=p||{},b=this._objectName(b),!_.buffer(y)){U.next=7;break}T=y,U.next=33;break;case 7:if(!(S(y)||s(y))){U.next=32;break}return p.mime||(s(y)?p.mime=v.getType(g.extname(y.name)):p.mime=y.type),M=this._createStream(y,0,y.size),U.next=12,d.default.awrap(this._getFileSize(y));case 12:return p.contentLength=U.sent,U.prev=13,U.next=16,d.default.awrap(this.putStream(b,M,p));case 16:return N=U.sent,U.abrupt("return",N);case 20:if(U.prev=20,U.t0=U.catch(13),!(U.t0.code==="RequestTimeTooSkewed")){U.next=29;break}return this.options.amendTimeSkewed=+new Date(U.t0.serverTime)-new Date,U.next=26,d.default.awrap(this.put(b,y,p));case 26:return U.abrupt("return",U.sent);case 29:throw U.t0;case 30:U.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return p.headers=p.headers||{},this._convertMetaToHeaders(p.meta,p.headers),I=p.method||"PUT",K=this._objectRequestParams(I,b,p),x.encodeCallback(K,p),K.mime=p.mime,K.content=T,K.successStatuses=[200],U.next=43,d.default.awrap(this.request(K));case 43:return H=U.sent,W={name:b,url:this._objectUrl(b),res:H.res},K.headers&&K.headers["x-oss-callback"]&&(W.data=JSON.parse(H.data.toString())),U.abrupt("return",W);case 47:case"end":return U.stop()}},null,this,[[13,20]])},P.putStream=function(b,y,p){var T,M,N,I;return d.default.async(function(H){for(;;)switch(H.prev=H.next){case 0:return p=p||{},p.headers=p.headers||{},b=this._objectName(b),p.contentLength?p.headers["Content-Length"]=p.contentLength:p.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(p.meta,p.headers),T=p.method||"PUT",M=this._objectRequestParams(T,b,p),x.encodeCallback(M,p),M.mime=p.mime,M.stream=y,M.successStatuses=[200],H.next=13,d.default.awrap(this.request(M));case 13:return N=H.sent,I={name:b,url:this._objectUrl(b),res:N.res},M.headers&&M.headers["x-oss-callback"]&&(I.data=JSON.parse(N.data.toString())),H.abrupt("return",I);case 17:case"end":return H.stop()}},null,this)},i(P,j("../common/object/copyObject")),i(P,j("../common/object/getObjectTagging")),i(P,j("../common/object/putObjectTagging")),i(P,j("../common/object/deleteObjectTagging")),i(P,j("../common/image")),i(P,j("../common/object/getBucketVersions")),i(P,j("../common/object/getACL")),i(P,j("../common/object/putACL")),i(P,j("../common/object/head")),i(P,j("../common/object/delete")),i(P,j("../common/object/get")),i(P,j("../common/object/putSymlink")),i(P,j("../common/object/getSymlink")),i(P,j("../common/object/deleteMulti")),i(P,j("../common/object/getObjectMeta")),P.putMeta=function(b,y,p){var T;return d.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return N.next=2,d.default.awrap(this.copy(b,b,{meta:y||{},timeout:p&&p.timeout,ctx:p&&p.ctx}));case 2:return T=N.sent,N.abrupt("return",T);case 4:case"end":return N.stop()}},null,this)},P.list=function(b,y){var p,T,M,N,I;return d.default.async(function(H){for(;;)switch(H.prev=H.next){case 0:return p=this._objectRequestParams("GET","",y),p.query=b,p.xmlResponse=!0,p.successStatuses=[200],H.next=6,d.default.awrap(this.request(p));case 6:return T=H.sent,M=T.data.Contents,N=this,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(W){return{name:W.Key,url:N._objectUrl(W.Key),lastModified:W.LastModified,etag:W.ETag,type:W.Type,size:Number(W.Size),storageClass:W.StorageClass,owner:{id:W.Owner.ID,displayName:W.Owner.DisplayName}}})),I=T.data.CommonPrefixes||null,I&&(Array.isArray(I)||(I=[I]),I=I.map(function(W){return W.Prefix})),H.abrupt("return",{res:T.res,objects:M,prefixes:I,nextMarker:T.data.NextMarker||null,isTruncated:T.data.IsTruncated==="true"});case 13:case"end":return H.stop()}},null,this)},P.restore=function(b,y){var p,T;return d.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return y=y||{},y.subres=(0,f.default)({restore:""},y.subres),y.versionId&&(y.subres.versionId=y.versionId),p=this._objectRequestParams("POST",b,y),p.successStatuses=[202],N.next=7,d.default.awrap(this.request(p));case 7:return T=N.sent,N.abrupt("return",{res:T.res});case 9:case"end":return N.stop()}},null,this)},P.signatureUrl=function(b,y){y=y||{},b=this._objectName(b),y.method=y.method||"GET";var p=l.timestamp()+(y.expires||1800),T={bucket:this.options.bucket,object:b},M=this._getResource(T);this.options.stsToken&&(y["security-token"]=this.options.stsToken);var N=n._signatureForURL(this.options.accessKeySecret,y,M,p),I=m.parse(this._getReqUrl(T));return I.query={OSSAccessKeyId:this.options.accessKeyId,Expires:p,Signature:N.Signature},c(N.subResource).to(I.query),I.format()},P.getObjectUrl=function(b,y){return y?y[y.length-1]!=="/"&&(y+="/"):y=this.options.endpoint.format(),y+this._escape(this._objectName(b))},P._objectUrl=function(b){return this._getReqUrl({bucket:this.options.bucket,object:b})},P.generateObjectUrl=function(O,b){if(b)b[b.length-1]!=="/"&&(b+="/");else{b=this.options.endpoint.format();var y=m.parse(b),p=this.options.bucket;y.hostname=p+"."+y.hostname,y.host=p+"."+y.host,b=y.format()}return b+this._escape(this._objectName(O))},P._objectRequestParams=function(b,y,p){if(!this.options.bucket)throw new Error("Please create a bucket first");p=p||{},y=this._objectName(y);var T={object:y,bucket:this.options.bucket,method:b,subres:p&&p.subres,timeout:p&&p.timeout,ctx:p&&p.ctx};return p.headers&&(T.headers={},c(p.headers).to(T.headers)),T},P._objectName=function(b){return b.replace(/^\/+/,"")},P._convertMetaToHeaders=function(b,y){if(!b)return;(0,D.default)(b).forEach(function(p){y["x-oss-meta-"+p]=b[p]})},P._deleteFileSafe=function(b){var y=this;return new h.default(function(p){a.exists(b,function(T){T?a.unlink(b,function(M){M&&y.debug("unlink %j error: %s",b,M,"error"),p()}):p()})})}},{"../common/callback":14,"../common/image":16,"../common/object/copyObject":19,"../common/object/delete":20,"../common/object/deleteMulti":21,"../common/object/deleteObjectTagging":22,"../common/object/get":23,"../common/object/getACL":24,"../common/object/getBucketVersions":25,"../common/object/getObjectMeta":26,"../common/object/getObjectTagging":27,"../common/object/getSymlink":28,"../common/object/head":29,"../common/object/putACL":30,"../common/object/putObjectTagging":31,"../common/object/putSymlink":32,"../common/signUtils":34,"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,"copy-to":76,fs:71,"is-type-of":289,"merge-descriptors":200,mime:202,path:205,url:238,utility:290}],5:[function(j,Q,k){"use strict";k.version="6.10.0"},{}],6:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=C(L);function C(w){return w&&w.__esModule?w:{default:w}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,f=k;f.deleteBucketLifecycle=function(d,o){var l,a;return h.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return u(d),l=this._bucketRequestParams("DELETE",d,"lifecycle",o),l.successStatuses=[204],m.next=5,h.default.awrap(this.request(l));case 5:return a=m.sent,m.abrupt("return",{res:a.res});case 7:case"end":return m.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=C(L);function C(w){return w&&w.__esModule?w:{default:w}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,f=k;f.deleteBucketWebsite=function(d,o){var l,a;return h.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return u(d),l=this._bucketRequestParams("DELETE",d,"website",o),l.successStatuses=[204],m.next=5,h.default.awrap(this.request(l));case 5:return a=m.sent,m.abrupt("return",{res:a.res});case 7:case"end":return m.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=C(L);function C(a){return a&&a.__esModule?a:{default:a}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,f=j("../utils/isArray"),w=f.isArray,d=j("../utils/formatObjKey"),o=d.formatObjKey,l=k;l.getBucketLifecycle=function(_,m){var c,g,v;return h.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return u(_),c=this._bucketRequestParams("GET",_,"lifecycle",m),c.successStatuses=[200],c.xmlResponse=!0,n.next=6,h.default.awrap(this.request(c));case 6:return g=n.sent,v=g.data.Rule||null,v&&(w(v)||(v=[v]),v=v.map(function(i){return i.ID&&(i.id=i.ID,delete i.ID),i.Tag&&!w(i.Tag)&&(i.Tag=[i.Tag]),o(i,"firstLowerCase")})),n.abrupt("return",{rules:v,res:g.res});case 10:case"end":return n.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=C(L);function C(w){return w&&w.__esModule?w:{default:w}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,f=k;f.getBucketVersioning=function(d,o){var l,a,_;return h.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return u(d),l=this._bucketRequestParams("GET",d,"versioning",o),l.xmlResponse=!0,l.successStatuses=[200],c.next=6,h.default.awrap(this.request(l));case 6:return a=c.sent,_=a.data.Status,c.abrupt("return",{status:a.status,versionStatus:_,res:a.res});case 9:case"end":return c.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=C(L);function C(o){return o&&o.__esModule?o:{default:o}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,f=j("../utils/isObject"),w=f.isObject,d=k;d.getBucketWebsite=function(l,a){var _,m,c;return h.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return u(l),_=this._bucketRequestParams("GET",l,"website",a),_.successStatuses=[200],_.xmlResponse=!0,v.next=6,h.default.awrap(this.request(_));case 6:return m=v.sent,c=[],m.data.RoutingRules&&m.data.RoutingRules.RoutingRule&&(w(m.data.RoutingRules.RoutingRule)?c=[m.data.RoutingRules.RoutingRule]:c=m.data.RoutingRules.RoutingRule),v.abrupt("return",{index:m.data.IndexDocument&&m.data.IndexDocument.Suffix||"",supportSubDir:m.data.IndexDocument&&m.data.IndexDocument.SupportSubDir||"false",type:m.data.IndexDocument&&m.data.IndexDocument.Type,routingRules:c,error:m.data.ErrorDocument&&m.data.ErrorDocument.Key||null,res:m.res});case 10:case"end":return v.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=C(L);function C(s){return s&&s.__esModule?s:{default:s}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,f=j("../utils/isArray"),w=f.isArray,d=j("../utils/deepCopy"),o=d.deepCopy,l=j("../utils/isObject"),a=l.isObject,_=j("../utils/obj2xml"),m=_.obj2xml,c=j("../utils/checkObjectTag"),g=c.checkObjectTag,v=j("../utils/getStrBytesCount"),x=v.getStrBytesCount,n=k;n.putBucketLifecycle=function(P,O,b){var y,p,T,M,N;return h.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:if(u(P),w(O)){K.next=3;break}throw new Error("rules must be Array");case 3:return y=this._bucketRequestParams("PUT",P,"lifecycle",b),p=[],T={LifecycleConfiguration:{Rule:p}},O.forEach(function(H){i(H),E(H),H.id&&(H.ID=H.id,delete H.id),p.push(H)}),M=m(T,{headers:!0,firstUpperCase:!0}),y.content=M,y.mime="xml",y.successStatuses=[200],K.next=13,h.default.awrap(this.request(y));case 13:return N=K.sent,K.abrupt("return",{res:N.res});case 15:case"end":return K.stop()}},null,this)};function i(s){s.days&&(s.expiration={days:s.days}),s.date&&(s.expiration={createdBeforeDate:s.date})}function t(s,P){var O=s.days,b=s.createdBeforeDate;if(!O&&!b)throw new Error(P+" must includes days or createdBeforeDate");if(O&&!/^[1-9][0-9]*$/.test(O))throw new Error("days must be a positive integer");if(b&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(b))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function S(s){if(!w(s)&&!a(s))throw new Error("tag must be Object or Array");s=a(s)?[s]:s;var P={},O=o(s);O.forEach(function(b){P[b.key]=b.value}),g(P)}function E(s){if(s.id&&x(s.id)>255)throw new Error("ID is composed of 255 bytes at most");if(s.prefix===""||s.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(s.status))throw new Error("Status must be Enabled or Disabled");if(s.transition){if(!["IA","Archive"].includes(s.transition.storageClass))throw new Error("StorageClass must be IA or Archive");t(s.transition,"Transition")}if(s.expiration){if(!s.expiration.expiredObjectDeleteMarker)t(s.expiration,"Expiration");else if(s.expiration.days||s.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(s.abortMultipartUpload&&t(s.abortMultipartUpload,"AbortMultipartUpload"),!s.expiration&&!s.abortMultipartUpload&&!s.transition&&!s.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(s.tag){if(s.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");S(s.tag)}}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=C(L);function C(o){return o&&o.__esModule?o:{default:o}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,f=j("../utils/obj2xml"),w=f.obj2xml,d=k;d.putBucketVersioning=function(l,a){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m,c,g;return h.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:if(u(l),["Enabled","Suspended"].includes(a)){x.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return m=this._bucketRequestParams("PUT",l,"versioning",_),c={VersioningConfiguration:{Status:a}},m.mime="xml",m.content=w(c,{headers:!0}),x.next=9,h.default.awrap(this.request(m));case 9:return g=x.sent,x.abrupt("return",{res:g.res,status:g.status});case 11:case"end":return x.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=C(L);function C(a){return a&&a.__esModule?a:{default:a}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,f=j("../utils/obj2xml"),w=f.obj2xml,d=j("../utils/isArray"),o=d.isArray,l=k;l.putBucketWebsite=function(_){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],g,v,x,n,i;return h.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:if(u(_),g=this._bucketRequestParams("PUT",_,"website",c),v={Suffix:m.index||"index.html"},x={IndexDocument:v},n={WebsiteConfiguration:x},m.supportSubDir&&(v.SupportSubDir=m.supportSubDir),m.type&&(v.Type=m.type),m.error&&(x.ErrorDocument={Key:m.error}),!(m.routingRules!==void 0)){S.next=12;break}if(o(m.routingRules)){S.next=11;break}throw new Error("RoutingRules must be Array");case 11:x.RoutingRules={RoutingRule:m.routingRules};case 12:return n=w(n),g.content=n,g.mime="xml",g.successStatuses=[200],S.next=18,h.default.awrap(this.request(g));case 18:return i=S.sent,S.abrupt("return",{res:i.res});case 20:case"end":return S.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(j,Q,k){(function(L){"use strict";var h=j("babel-runtime/core-js/object/keys"),C=f(h),D=j("babel-runtime/core-js/json/stringify"),u=f(D);function f(w){return w&&w.__esModule?w:{default:w}}k.encodeCallback=function(d,o){if(d.headers=d.headers||{},!Object.prototype.hasOwnProperty.call(d.headers,"x-oss-callback")&&o.callback){var l={callbackUrl:encodeURI(o.callback.url),callbackBody:o.callback.body};o.callback.host&&(l.callbackHost=o.callback.host),o.callback.contentType&&(l.callbackBodyType=o.callback.contentType);var a=L.from((0,u.default)(l)).toString("base64");if(d.headers["x-oss-callback"]=a,o.callback.customValue){var _={};(0,C.default)(o.callback.customValue).forEach(function(m){_["x:"+m]=o.callback.customValue[m]}),d.headers["x-oss-callback-var"]=L.from((0,u.default)(_)).toString("base64")}}}}).call(this,j("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/assign"),h=C(L);function C(l){return l&&l.__esModule?l:{default:l}}var D=j("humanize-ms"),u=j("url"),f=j("../utils/checkBucketName"),w=f.checkBucketName;function d(l,a){var _=u.parse(l);if(_.protocol||(_=u.parse("http"+(a?"s":"")+"://"+l)),_.protocol!=="http:"&&_.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return _}function o(l,a,_){var m=_?"https://":"http://",c=a?"-internal.aliyuncs.com":".aliyuncs.com",g="vpc100-oss-cn-";return l.substr(0,g.length)===g&&(c=".aliyuncs.com"),u.parse(m+l+c)}Q.exports=function(l){if(!l||!l.accessKeyId||!l.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");l.bucket&&w(l.bucket);var a=(0,h.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},l);if(a.accessKeyId=a.accessKeyId.trim(),a.accessKeySecret=a.accessKeySecret.trim(),a.timeout&&(a.timeout=D(a.timeout)),a.endpoint)a.endpoint=d(a.endpoint,a.secure);else if(a.region)a.endpoint=o(a.region,a.internal,a.secure);else throw new Error("require options.endpoint or options.region");return a.inited=!0,a}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(j,Q,k){"use strict";var L=j("merge-descriptors"),h=k;L(h,j("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=C(L);function C(a){return a&&a.__esModule?a:{default:a}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,f=j("querystring"),w=j("js-base64"),d=w.Base64.encode,o=k;o.processObjectSave=function(_,m,c,g){var v,x,n,i;return h.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return l(_,"sourceObject"),l(m,"targetObject"),l(c,"process"),m=this._objectName(m),g&&u(g),v=this._objectRequestParams("POST",_,{subres:"x-oss-process"}),x=g?",b_"+d(g):"",m=d(m),n={"x-oss-process":c+"|sys/saveas,o_"+m+x},v.content=f.stringify(n),S.next=12,h.default.awrap(this.request(v));case 12:return i=S.sent,S.abrupt("return",{res:i.res,status:i.res.status});case 14:case"end":return S.stop()}},null,this)};function l(a,_){if(!a)throw new Error(_+" is required");if(typeof a!="string")throw new Error(_+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=C(L);function C(o){return o&&o.__esModule?o:{default:o}}var D=j("copy-to"),u=j("./callback"),f=j("./utils/deepCopy"),w=f.deepCopy,d=k;d.listUploads=function(l,a){var _,m,c,g;return h.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:return a=a||{},_={},D(a).to(_),_.subres="uploads",m=this._objectRequestParams("GET","",_),m.query=l,m.xmlResponse=!0,m.successStatuses=[200],x.next=10,h.default.awrap(this.request(m));case 10:return c=x.sent,g=c.data.Upload||[],Array.isArray(g)||(g=[g]),g=g.map(function(n){return{name:n.Key,uploadId:n.UploadId,initiated:n.Initiated}}),x.abrupt("return",{res:c.res,uploads:g,bucket:c.data.Bucket,nextKeyMarker:c.data.NextKeyMarker,nextUploadIdMarker:c.data.NextUploadIdMarker,isTruncated:c.data.IsTruncated==="true"});case 15:case"end":return x.stop()}},null,this)},d.listParts=function(l,a,_,m){var c,g,v;return h.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return m=m||{},c={},D(m).to(c),c.subres={uploadId:a},g=this._objectRequestParams("GET",l,c),g.query=_,g.xmlResponse=!0,g.successStatuses=[200],n.next=10,h.default.awrap(this.request(g));case 10:return v=n.sent,n.abrupt("return",{res:v.res,uploadId:v.data.UploadId,bucket:v.data.Bucket,name:v.data.Key,partNumberMarker:v.data.PartNumberMarker,nextPartNumberMarker:v.data.NextPartNumberMarker,maxParts:v.data.MaxParts,isTruncated:v.data.IsTruncated,parts:v.data.Part||[]});case 12:case"end":return n.stop()}},null,this)},d.abortMultipartUpload=function(l,a,_){var m,c,g;return h.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:return this._stop(),_=_||{},m={},D(_).to(m),m.subres={uploadId:a},c=this._objectRequestParams("DELETE",l,m),c.successStatuses=[204],x.next=9,h.default.awrap(this.request(c));case 9:return g=x.sent,x.abrupt("return",{res:g.res});case 11:case"end":return x.stop()}},null,this)},d.initMultipartUpload=function(l,a){var _,m,c;return h.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return a=a||{},_={},D(a).to(_),_.headers=_.headers||{},this._convertMetaToHeaders(a.meta,_.headers),_.subres="uploads",m=this._objectRequestParams("POST",l,_),m.mime=a.mime,m.xmlResponse=!0,m.successStatuses=[200],v.next=12,h.default.awrap(this.request(m));case 12:return c=v.sent,v.abrupt("return",{res:c.res,bucket:c.data.Bucket,name:c.data.Key,uploadId:c.data.UploadId});case 14:case"end":return v.stop()}},null,this)},d.uploadPart=function(l,a,_,m,c,g,v){var x;return h.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return x={stream:this._createStream(m,c,g),size:g-c},i.next=3,h.default.awrap(this._uploadPart(l,a,_,x,v));case 3:return i.abrupt("return",i.sent);case 4:case"end":return i.stop()}},null,this)},d.completeMultipartUpload=function(l,a,_,m){var c,g,v,x,n,i,t,S;return h.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:for(c=_.concat().sort(function(P,O){return P.number-O.number}).filter(function(P,O,b){return!O||P.number!==b[O-1].number}),g=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,v=0;v<c.length;v++)x=c[v],g+=`<Part>
|
|
|
`,g+="<PartNumber>"+x.number+`</PartNumber>
|
|
|
`,g+="<ETag>"+x.etag+`</ETag>
|
|
|
`,g+=`</Part>
|
|
|
`;return g+="</CompleteMultipartUpload>",m=m||{},n={},n=w(m),n.headers&&delete n.headers["x-oss-server-side-encryption"],n.subres={uploadId:a},i=this._objectRequestParams("POST",l,n),u.encodeCallback(i,n),i.mime="xml",i.content=g,i.headers&&i.headers["x-oss-callback"]||(i.xmlResponse=!0),i.successStatuses=[200],s.next=17,h.default.awrap(this.request(i));case 17:return t=s.sent,S={res:t.res,bucket:i.bucket,name:l,etag:t.res.headers.etag},i.headers&&i.headers["x-oss-callback"]&&(S.data=JSON.parse(t.data.toString())),s.abrupt("return",S);case 21:case"end":return s.stop()}},null,this)},d._uploadPart=function(l,a,_,m,c){var g,v,x;return h.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return c=c||{},g={},D(c).to(g),g.headers={"Content-Length":m.size},g.subres={partNumber:_,uploadId:a},v=this._objectRequestParams("PUT",l,g),v.mime=g.mime,v.stream=m.stream,v.successStatuses=[200],i.next=11,h.default.awrap(this.request(v));case 11:if(x=i.sent,x.res.headers.etag){i.next=14;break}throw new Error(`Please set the etag of expose-headers in OSS
|
|
|
https://help.aliyun.com/document_detail/32069.html`);case 14:return m.stream=null,v.stream=null,i.abrupt("return",{name:l,etag:x.res.headers.etag,res:x.res});case 17:case"end":return i.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=w(L),C=j("babel-runtime/core-js/object/keys"),D=w(C),u=j("babel-runtime/helpers/typeof"),f=w(u);function w(a){return a&&a.__esModule?a:{default:a}}var d=j("../utils/checkBucketName"),o=d.checkBucketName,l=k;l.copy=function(_,m,c,g){var v,x,n;return h.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return(typeof c=="undefined"?"undefined":(0,f.default)(c))==="object"&&(g=c),g=g||{},g.headers=g.headers||{},(0,D.default)(g.headers).forEach(function(S){g.headers["x-oss-copy-source-"+S.toLowerCase()]=g.headers[S]}),g.meta&&(g.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(g.meta,g.headers),m=this._getSourceName(m,c),g.versionId&&(m=m+"?versionId="+g.versionId),g.headers["x-oss-copy-source"]=m,v=this._objectRequestParams("PUT",_,g),v.xmlResponse=!0,v.successStatuses=[200,304],t.next=14,h.default.awrap(this.request(v));case 14:return x=t.sent,n=x.data,n&&(n={etag:n.ETag,lastModified:n.LastModified}),t.abrupt("return",{data:n,res:x.res});case 18:case"end":return t.stop()}},null,this)},l._getSourceName=function(_,m){return typeof m=="string"?_=this._objectName(_):_[0]!=="/"?m=this.options.bucket:(m=_.replace(/\/(.+?)(\/.*)/,"$1"),_=_.replace(/(\/.+?\/)(.*)/,"$2")),o(m),_=encodeURI(_),_="/"+m+"/"+_,_}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var f=k;f.delete=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a;return h.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return o.subres=(0,D.default)({},o.subres),o.versionId&&(o.subres.versionId=o.versionId),l=this._objectRequestParams("DELETE",d,o),l.successStatuses=[204],m.next=6,h.default.awrap(this.request(l));case 6:return a=m.sent,m.abrupt("return",{res:a.res});case 8:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(l){return l&&l.__esModule?l:{default:l}}var f=j("utility"),w=j("../utils/obj2xml"),d=w.obj2xml,o=k;o.deleteMulti=function(a){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m,c,g,v,x,n,i,t,S,E,s,P;return h.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:if(m=[],!(!a||!a.length)){b.next=3;break}throw new Error("names is required");case 3:for(c=0;c<a.length;c++)g={},typeof a[c]=="string"?g.Key=f.escape(this._objectName(a[c])):(v=a[c],x=v.key,n=v.versionId,g.Key=f.escape(this._objectName(x)),g.VersionId=n),m.push(g);return i={Delete:{Quiet:!!_.quiet,Object:m}},t=d(i,{headers:!0}),_.subres=(0,D.default)({delete:""},_.subres),_.versionId&&(_.subres.versionId=_.versionId),S=this._objectRequestParams("POST","",_),S.mime="xml",S.content=t,S.xmlResponse=!0,S.successStatuses=[200],b.next=15,h.default.awrap(this.request(S));case 15:return E=b.sent,s=E.data,P=s&&s.Deleted||null,P&&(Array.isArray(P)||(P=[P])),b.abrupt("return",{res:E.res,deleted:P||[]});case 20:case"end":return b.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var f=k;f.deleteObjectTagging=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a;return h.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return o.subres=(0,D.default)({tagging:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),d=this._objectName(d),l=this._objectRequestParams("DELETE",d,o),l.successStatuses=[204],m.next=7,h.default.awrap(this.request(l));case 7:return a=m.sent,m.abrupt("return",{status:a.status,res:a.res});case 9:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(o){return o&&o.__esModule?o:{default:o}}var f=j("fs"),w=j("is-type-of"),d=k;d.get=function(l,a){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m,c,g,v;return h.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return m=null,c=!1,w.writableStream(a)?m=a:w.string(a)?(m=f.createWriteStream(a),c=!0):_=a,_=_||{},_.subres=(0,D.default)({},_.subres),_.versionId&&(_.subres.versionId=_.versionId),_.process&&(_.subres["x-oss-process"]=_.process),g=void 0,n.prev=8,v=this._objectRequestParams("GET",l,_),v.writeStream=m,v.successStatuses=[200,206,304],n.next=14,h.default.awrap(this.request(v));case 14:g=n.sent,c&&m.destroy(),n.next=25;break;case 18:if(n.prev=18,n.t0=n.catch(8),!c){n.next=24;break}return m.destroy(),n.next=24,h.default.awrap(this._deleteFileSafe(a));case 24:throw n.t0;case 25:return n.abrupt("return",{res:g.res,content:g.data});case 26:case"end":return n.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var f=k;f.getACL=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a;return h.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return o.subres=(0,D.default)({acl:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),d=this._objectName(d),l=this._objectRequestParams("GET",d,o),l.successStatuses=[200],l.xmlResponse=!0,m.next=8,h.default.awrap(this.request(l));case 8:return a=m.sent,m.abrupt("return",{acl:a.data.AccessControlList.Grant,owner:{id:a.data.Owner.ID,displayName:a.data.Owner.DisplayName},res:a.res});case 10:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/keys"),h=w(L),C=j("babel-runtime/regenerator"),D=w(C),u=j("babel-runtime/core-js/object/assign"),f=w(u);function w(v){return v&&v.__esModule?v:{default:v}}var d=k,o=j("../utils/isObject"),l=o.isObject,a=j("../utils/isArray"),_=a.isArray;d.getBucketVersions=m,d.listObjectVersions=m;function m(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,t,S,E,s;return D.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(v.versionIdMarker&&v.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return x.subres=(0,f.default)({versions:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),n=this._objectRequestParams("GET","",x),n.xmlResponse=!0,n.successStatuses=[200],n.query=g(v),O.next=10,D.default.awrap(this.request(n));case 10:return i=O.sent,t=i.data.Version||[],S=i.data.DeleteMarker||[],E=this,t&&(Array.isArray(t)||(t=[t]),t=t.map(function(b){return{name:b.Key,url:E._objectUrl(b.Key),lastModified:b.LastModified,isLatest:b.IsLatest==="true",versionId:b.VersionId,etag:b.ETag,type:b.Type,size:Number(b.Size),storageClass:b.StorageClass,owner:{id:b.Owner.ID,displayName:b.Owner.DisplayName}}})),S&&(_(S)||(S=[S]),S=S.map(function(b){return{name:b.Key,lastModified:b.LastModified,versionId:b.VersionId,owner:{id:b.Owner.ID,displayName:b.Owner.DisplayName}}})),s=i.data.CommonPrefixes||null,s&&(_(s)||(s=[s]),s=s.map(function(b){return b.Prefix})),O.abrupt("return",{res:i.res,objects:t,deleteMarker:S,prefixes:s,nextMarker:i.data.NextMarker||null,NextVersionIdMarker:i.data.NextVersionIdMarker||null,isTruncated:i.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function c(v){return v.replace(/([A-Z])/g,"-$1").toLowerCase()}function g(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},x={};return l(v)&&(0,h.default)(v).forEach(function(n){x[c(n)]=v[n]}),x}},{"../utils/isArray":42,"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],26:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var f=k;f.getObjectMeta=function(d,o){var l,a;return h.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return o=o||{},d=this._objectName(d),o.subres=(0,D.default)({objectMeta:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),l=this._objectRequestParams("HEAD",d,o),l.successStatuses=[200],m.next=8,h.default.awrap(this.request(l));case 8:return a=m.sent,m.abrupt("return",{status:a.status,res:a.res});case 10:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(o){return o&&o.__esModule?o:{default:o}}var f=k,w=j("../utils/isObject"),d=w.isObject;f.getObjectTagging=function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_,m,c,g,v;return h.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return a.subres=(0,D.default)({tagging:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),l=this._objectName(l),_=this._objectRequestParams("GET",l,a),_.successStatuses=[200],n.next=7,h.default.awrap(this.request(_));case 7:return m=n.sent,n.next=10,h.default.awrap(this.parseXML(m.data));case 10:return c=n.sent,g=c.TagSet.Tag,g=g&&d(g)?[g]:g||[],v={},g.forEach(function(i){v[i.Key]=i.Value}),n.abrupt("return",{status:m.status,res:m.res,tag:v});case 16:case"end":return n.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var f=k;f.getSymlink=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a,_;return h.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return o.subres=(0,D.default)({symlink:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),d=this._objectName(d),l=this._objectRequestParams("GET",d,o),l.successStatuses=[200],c.next=7,h.default.awrap(this.request(l));case 7:return a=c.sent,_=a.res.headers["x-oss-symlink-target"],c.abrupt("return",{targetName:decodeURIComponent(_),res:a.res});case 10:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=w(L),C=j("babel-runtime/core-js/object/keys"),D=w(C),u=j("babel-runtime/core-js/object/assign"),f=w(u);function w(o){return o&&o.__esModule?o:{default:o}}var d=k;d.head=function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_,m,c;return h.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return a.subres=(0,f.default)({},a.subres),a.versionId&&(a.subres.versionId=a.versionId),_=this._objectRequestParams("HEAD",l,a),_.successStatuses=[200,304],v.next=6,h.default.awrap(this.request(_));case 6:return m=v.sent,c={meta:null,res:m.res,status:m.status},m.status===200&&(0,D.default)(m.headers).forEach(function(x){x.indexOf("x-oss-meta-")===0&&(c.meta||(c.meta={}),c.meta[x.substring(11)]=m.headers[x])}),v.abrupt("return",c);case 10:case"end":return v.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var f=k;f.putACL=function(d,o,l){var a,_;return h.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return l=l||{},l.subres=(0,D.default)({acl:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.headers=l.headers||{},l.headers["x-oss-object-acl"]=o,d=this._objectName(d),a=this._objectRequestParams("PUT",d,l),a.successStatuses=[200],c.next=10,h.default.awrap(this.request(a));case 10:return _=c.sent,c.abrupt("return",{res:_.res});case 12:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=w(L),C=j("babel-runtime/core-js/object/keys"),D=w(C),u=j("babel-runtime/core-js/object/assign"),f=w(u);function w(m){return m&&m.__esModule?m:{default:m}}var d=j("../utils/obj2xml"),o=d.obj2xml,l=j("../utils/checkObjectTag"),a=l.checkObjectTag,_=k;_.putObjectTagging=function(c,g){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x,n,i;return h.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return a(g),v.subres=(0,f.default)({tagging:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),c=this._objectName(c),x=this._objectRequestParams("PUT",c,v),x.successStatuses=[200],g=(0,D.default)(g).map(function(E){return{Key:E,Value:g[E]}}),n={Tagging:{TagSet:{Tag:g}}},x.mime="xml",x.content=o(n),S.next=12,h.default.awrap(this.request(x));case 12:return i=S.sent,S.abrupt("return",{res:i.res,status:i.status});case 14:case"end":return S.stop()}},null,this)}},{"../utils/checkObjectTag":36,"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],32:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var f=k;f.putSymlink=function(d,o,l){var a,_;return h.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return l=l||{},l.headers=l.headers||{},o=this._escape(this._objectName(o)),this._convertMetaToHeaders(l.meta,l.headers),l.headers["x-oss-symlink-target"]=o,l.subres=(0,D.default)({symlink:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.storageClass&&(l.headers["x-oss-storage-class"]=l.storageClass),d=this._objectName(d),a=this._objectRequestParams("PUT",d,l),a.successStatuses=[200],c.next=13,h.default.awrap(this.request(a));case 13:return _=c.sent,c.abrupt("return",{res:_.res});case 15:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(j,Q,k){"use strict";var L=j("babel-runtime/regenerator"),h=u(L),C=j("babel-runtime/core-js/promise"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var f=k;f._parallelNode=function(d,o,l,a){var _,m,c,g,v,x,n,i;return h.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:_=this,m=[],c=[],g=d.length/o,v=d.length%o,x=v===0?g:(d.length-v)/o+1,n=1,i=0;case 8:if(!(i<d.length)){S.next=26;break}if(!_.isCancel()){S.next=11;break}return S.abrupt("break",26);case 11:if(a?c.push(l(_,d[i],a)):c.push(l(_,d[i])),!(c.length===o||n===x&&i===d.length-1)){S.next=23;break}return S.prev=13,n+=1,S.next=17,h.default.awrap(D.default.all(c));case 17:S.next=22;break;case 19:S.prev=19,S.t0=S.catch(13),m.push(S.t0);case 22:c=[];case 23:i++,S.next=8;break;case 26:return S.abrupt("return",m);case 27:case"end":return S.stop()}},null,this,[[13,19]])},f._parallel=function(d,o,l){var a=this;return new D.default(function(_){var m=[];if(o<=0||!d){_(m);return}function c(s){return function(){if(s===null)throw new Error("Callback was already called.");var P=s;s=null;for(var O=arguments.length,b=Array(O),y=0;y<O;y++)b[y]=arguments[y];P.apply(this,b)}}function g(s){var P=-1,O=s.length;return function(){return++P<O&&!a.isCancel()?{value:s[P],key:P}:null}}var v=g(d),x=!1,n=0,i=!1;function t(s,P){n-=1,s?(x=!0,m.push(s),_(m)):P==={}||x&&n<=0?(x=!0,_(m)):i||(a.isCancel()?_(m):E())}function S(s,P){l(s).then(function(O){P(null,O)}).catch(function(O){P(O)})}function E(){for(i=!0;n<o&&!x&&!a.isCancel();){var s=v();if(s===null||m.length>0){x=!0,n<=0&&_(m);return}n+=1,S(s.value,c(t))}i=!1}E()})},f.cancel=function(d){this.options.cancelFlag=!0,d&&this.abortMultipartUpload(d.name,d.uploadId,d.options)},f.isCancel=function(){return this.options.cancelFlag},f.resetCancelFlag=function(){this.options.cancelFlag=!1},f._stop=function(){this.options.cancelFlag=!0},f._makeCancelEvent=function(){var d={status:0,name:"cancel"};return d}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(j,Q,k){(function(L){"use strict";var h=j("babel-runtime/core-js/json/stringify"),C=f(h),D=j("babel-runtime/core-js/object/keys"),u=f(D);function f(o){return o&&o.__esModule?o:{default:o}}var w=j("./../../shims/crypto/crypto.js"),d=j("is-type-of");k.buildCanonicalizedResource=function(l,a){var _=""+l,m="?";if(d.string(a)&&a.trim()!=="")_+=m+a;else if(d.array(a))a.sort(),_+=m+a.join("&");else if(a){var c=function(x,n){return x[0]>n[0]?1:x[0]<n[0]?-1:0},g=function(x){_+=m+x,a[x]&&(_+="="+a[x]),m="&"};(0,u.default)(a).sort(c).forEach(g)}return _},k.buildCanonicalString=function(l,a,_,m){_=_||{};var c=_.headers||{},g="x-oss-",v=[],x={},n=[l.toUpperCase(),c["Content-Md5"]||"",c["Content-Type"]||c["Content-Type".toLowerCase()],m||c["x-oss-date"]];return(0,u.default)(c).forEach(function(i){var t=i.toLowerCase();t.indexOf(g)===0&&(x[t]=String(c[i]).trim())}),(0,u.default)(x).sort().forEach(function(i){v.push(i+":"+x[i])}),n=n.concat(v),n.push(this.buildCanonicalizedResource(a,_.parameters)),n.join(`
|
|
|
`)},k.computeSignature=function(l,a){var _=w.createHmac("sha1",l);return _.update(L.from(a,"utf8")).digest("base64")},k.authorization=function(l,a,_){return"OSS "+l+":"+this.computeSignature(a,_)},k._signatureForURL=function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=arguments[2],m=arguments[3],c={},g=a.subResource,v=g===void 0?{}:g;if(a.process){var x="x-oss-process";v[x]=a.process}if(a.trafficLimit){var n="x-oss-traffic-limit";v[n]=a.trafficLimit}if(a.response&&(0,u.default)(a.response).forEach(function(E){var s="response-"+E.toLowerCase();v[s]=a.response[E]}),(0,u.default)(a).forEach(function(E){var s=E.toLowerCase(),P=a[E];s.indexOf("x-oss-")===0?c[s]=P:(s.indexOf("content-md5")===0||s.indexOf("content-type")===0)&&(c[E]=P)}),Object.prototype.hasOwnProperty.call(a,"security-token")&&(v["security-token"]=a["security-token"]),Object.prototype.hasOwnProperty.call(a,"callback")){var i={callbackUrl:encodeURI(a.callback.url),callbackBody:a.callback.body};if(a.callback.host&&(i.callbackHost=a.callback.host),a.callback.contentType&&(i.callbackBodyType=a.callback.contentType),v.callback=L.from((0,C.default)(i)).toString("base64"),a.callback.customValue){var t={};(0,u.default)(a.callback.customValue).forEach(function(E){t["x:"+E]=a.callback.customValue[E]}),v["callback-var"]=L.from((0,C.default)(t)).toString("base64")}}var S=this.buildCanonicalString(a.method,_,{headers:c,parameters:v},m.toString());return{Signature:this.computeSignature(l,S),subResource:v}}}).call(this,j("buffer").Buffer)},{"./../../shims/crypto/crypto.js":284,"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73,"is-type-of":289}],35:[function(j,Q,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.checkBucketName=void 0,k.checkBucketName=function(L,h){var C=h?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!C.test(L))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/entries"),h=C(L);function C(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(k,"__esModule",{value:!0}),k.checkObjectTag=void 0;var D=j("./checkValid"),u=D.checkValid,f=j("./isObject"),w=f.isObject,d=[{validator:function(_){if(typeof _!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],o={key:[].concat(d,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(d,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function l(a){if(!w(a))throw new Error("tag must be Object");var _=(0,h.default)(a);if(_.length>10)throw new Error("maximum of 10 tags for a object");var m=["key","value"];_.forEach(function(c){c.forEach(function(g,v){u(g,o[m[v]])})})}k.checkObjectTag=l},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(j,Q,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.checkValid=void 0;function L(h,C){C.forEach(function(D){if(D.validator)D.validator(h);else if(D.pattern&&!D.pattern.test(h))throw new Error(D.msg)})}k.checkValid=L},{}],38:[function(j,Q,k){(function(L){"use strict";var h=j("babel-runtime/core-js/object/assign"),C=D(h);function D(c){return c&&c.__esModule?c:{default:c}}Object.defineProperty(k,"__esModule",{value:!0}),k.createRequest=void 0;var u=j("./../../../shims/crypto/crypto.js"),f=j("debug")("ali-oss"),w=j("mime"),d=j("dateformat"),o=j("copy-to"),l=j("path");function a(c,g){return c[g]||c[g.toLowerCase()]}function _(c,g){delete c[g],delete c[g.toLowerCase()]}function m(c){var g=new Date;this.options.amendTimeSkewed&&(g=+new Date+this.options.amendTimeSkewed);var v={"x-oss-date":d(g,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(v["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,C.default)(v,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(v["x-oss-security-token"]=this.options.stsToken),o(c.headers).to(v),a(v,"Content-Type")||(c.mime&&c.mime.indexOf("/")>0?v["Content-Type"]=c.mime:v["Content-Type"]=w.getType(c.mime||l.extname(c.object||""))),a(v,"Content-Type")||_(v,"Content-Type"),c.content&&(v["Content-Md5"]=u.createHash("md5").update(L.from(c.content,"utf8")).digest("base64"),v["Content-Length"]||(v["Content-Length"]=c.content.length));var x=this._getResource(c);v.authorization=this.authorization(c.method,x,c.subres,v);var n=this._getReqUrl(c);f("request %s %s, with headers %j, !!stream: %s",c.method,n,v,!!c.stream);var i=c.timeout||this.options.timeout,t={method:c.method,content:c.content,stream:c.stream,headers:v,timeout:i,writeStream:c.writeStream,customResponse:c.customResponse,ctx:c.ctx||this.ctx};return this.agent&&(t.agent=this.agent),this.httpsAgent&&(t.httpsAgent=this.httpsAgent),{url:n,params:t}}k.createRequest=m}).call(this,j("buffer").Buffer)},{"./../../../shims/crypto/crypto.js":284,"babel-runtime/core-js/object/assign":54,buffer:73,"copy-to":76,dateformat:190,debug:288,mime:202,path:205}],39:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/keys"),h=u(L),C=j("babel-runtime/helpers/typeof"),D=u(C);function u(f){return f&&f.__esModule?f:{default:f}}Object.defineProperty(k,"__esModule",{value:!0}),k.deepCopy=void 0,k.deepCopy=function(f){if(f===null||(typeof f=="undefined"?"undefined":(0,D.default)(f))!=="object")return f;var w=Array.isArray(f)?[]:{};return(0,h.default)(f).forEach(function(d){w[d]=k.deepCopy(f[d])}),w}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/keys"),h=u(L),C=j("babel-runtime/helpers/typeof"),D=u(C);function u(d){return d&&d.__esModule?d:{default:d}}Object.defineProperty(k,"__esModule",{value:!0}),k.formatObjKey=void 0;function f(d,o){if(d===null||(typeof d=="undefined"?"undefined":(0,D.default)(d))!=="object")return d;var l=void 0;if(Array.isArray(d)){l=[];for(var a=0;a<d.length;a++)l.push(f(d[a],o))}else l={},(0,h.default)(d).forEach(function(_){l[w(_,o)]=f(d[_],o)});return l}k.formatObjKey=f;function w(d,o){return o==="firstUpperCase"?d=d.replace(/^./,function(l){return l.toUpperCase()}):o==="firstLowerCase"&&(d=d.replace(/^./,function(l){return l.toLowerCase()})),d}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(j,Q,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.getStrBytesCount=void 0;function L(h){for(var C=0,D=0;D<h.length;D++){var u=h.charAt(D);/^[\u00-\uff]$/.test(u)?C+=1:C+=2}return C}k.getStrBytesCount=L},{}],42:[function(j,Q,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isArray=void 0,k.isArray=function(L){return Object.prototype.toString.call(L)==="[object Array]"}},{}],43:[function(j,Q,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isBlob=void 0;function L(h){return typeof Blob!="undefined"&&h instanceof Blob}k.isBlob=L},{}],44:[function(j,Q,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isFile=void 0,k.isFile=function(L){return typeof File!="undefined"&&L instanceof File}},{}],45:[function(j,Q,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isIP=void 0,k.isIP=function(L){var h=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,C=/^\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 h.test(L)||C.test(L)}},{}],46:[function(j,Q,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isObject=void 0,k.isObject=function(L){return Object.prototype.toString.call(L)==="[object Object]"}},{}],47:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/keys"),h=C(L);function C(w){return w&&w.__esModule?w:{default:w}}Object.defineProperty(k,"__esModule",{value:!0}),k.obj2xml=void 0;var D=j("./formatObjKey");function u(w){return Object.prototype.toString.call(w).replace(/(.*? |])/g,"").toLowerCase()}function f(w,d){var o="";return d&&d.headers&&(o=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
`),d&&d.firstUpperCase&&(w=D.formatObjKey(w,"firstUpperCase")),u(w)==="object"?(0,h.default)(w).forEach(function(l){u(w[l])==="string"||u(w[l])==="number"?o+="<"+l+">"+w[l]+"</"+l+">":u(w[l])==="object"?o+="<"+l+">"+f(w[l])+"</"+l+">":u(w[l])==="array"?o+=w[l].map(function(a){return"<"+l+">"+f(a)+"</"+l+">"}).join(""):o+="<"+l+">"+w[l].toString()+"</"+l+">"}):o+=w.toString(),o}k.obj2xml=f},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(j,Q,k){Q.exports=L,Q.exports.HttpsAgent=L;function L(){}},{}],49:[function(j,Q,k){Q.exports=j("./register")().Promise},{"./register":51}],50:[function(j,Q,k){"use strict";var L="@@any-promise/REGISTRATION",h=null;Q.exports=function(C,D){return function(f,w){f=f||null,w=w||{};var d=w.global!==!1;if(h===null&&d&&(h=C[L]||null),h!==null&&f!==null&&h.implementation!==f)throw new Error('any-promise already defined as "'+h.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return h===null&&(f!==null&&typeof w.Promise!="undefined"?h={Promise:w.Promise,implementation:f}:h=D(f),d&&(C[L]=h)),h}}},{}],51:[function(j,Q,k){"use strict";Q.exports=j("./loader")(window,L);function L(){if(typeof window.Promise=="undefined")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"}}},{"./loader":50}],52:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(j,Q,k){Q.exports={default:j("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(j,Q,k){"use strict";k.__esModule=!0;var L=j("../core-js/symbol/iterator"),h=f(L),C=j("../core-js/symbol"),D=f(C),u=typeof D.default=="function"&&typeof h.default=="symbol"?function(w){return typeof w}:function(w){return w&&typeof D.default=="function"&&w.constructor===D.default&&w!==D.default.prototype?"symbol":typeof w};function f(w){return w&&w.__esModule?w:{default:w}}k.default=typeof D.default=="function"&&u(h.default)==="symbol"?function(w){return typeof w=="undefined"?"undefined":u(w)}:function(w){return w&&typeof D.default=="function"&&w.constructor===D.default&&w!==D.default.prototype?"symbol":typeof w=="undefined"?"undefined":u(w)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(j,Q,k){Q.exports=j("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(j,Q,k){"use strict";k.byteLength=d,k.toByteArray=l,k.fromByteArray=m;for(var L=[],h=[],C=typeof Uint8Array!="undefined"?Uint8Array:Array,D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,f=D.length;u<f;++u)L[u]=D[u],h[D.charCodeAt(u)]=u;h["-".charCodeAt(0)]=62,h["_".charCodeAt(0)]=63;function w(c){var g=c.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=c.indexOf("=");v===-1&&(v=g);var x=v===g?0:4-v%4;return[v,x]}function d(c){var g=w(c),v=g[0],x=g[1];return(v+x)*3/4-x}function o(c,g,v){return(g+v)*3/4-v}function l(c){var g,v=w(c),x=v[0],n=v[1],i=new C(o(c,x,n)),t=0,S=n>0?x-4:x,E;for(E=0;E<S;E+=4)g=h[c.charCodeAt(E)]<<18|h[c.charCodeAt(E+1)]<<12|h[c.charCodeAt(E+2)]<<6|h[c.charCodeAt(E+3)],i[t++]=g>>16&255,i[t++]=g>>8&255,i[t++]=g&255;return n===2&&(g=h[c.charCodeAt(E)]<<2|h[c.charCodeAt(E+1)]>>4,i[t++]=g&255),n===1&&(g=h[c.charCodeAt(E)]<<10|h[c.charCodeAt(E+1)]<<4|h[c.charCodeAt(E+2)]>>2,i[t++]=g>>8&255,i[t++]=g&255),i}function a(c){return L[c>>18&63]+L[c>>12&63]+L[c>>6&63]+L[c&63]}function _(c,g,v){for(var x,n=[],i=g;i<v;i+=3)x=(c[i]<<16&16711680)+(c[i+1]<<8&65280)+(c[i+2]&255),n.push(a(x));return n.join("")}function m(c){for(var g,v=c.length,x=v%3,n=[],i=16383,t=0,S=v-x;t<S;t+=i)n.push(_(c,t,t+i>S?S:t+i));return x===1?(g=c[v-1],n.push(L[g>>2]+L[g<<4&63]+"==")):x===2&&(g=(c[v-2]<<8)+c[v-1],n.push(L[g>>10]+L[g>>4&63]+L[g<<2&63]+"=")),n.join("")}},{}],70:[function(j,Q,k){/*!
|
|
|
* Bowser - a browser detector
|
|
|
* https://github.com/ded/bowser
|
|
|
* MIT License | (c) Dustin Diaz 2015
|
|
|
*/!function(L,h,C){typeof Q!="undefined"&&Q.exports?Q.exports=C():typeof define=="function"&&define.amd?define(h,C):L[h]=C()}(this,"bowser",function(){var L=!0;function h(o){function l(z){var U=o.match(z);return U&&U.length>1&&U[1]||""}function a(z){var U=o.match(z);return U&&U.length>1&&U[2]||""}var _=l(/(ipod|iphone|ipad)/i).toLowerCase(),m=/like android/i.test(o),c=!m&&/android/i.test(o),g=/nexus\s*[0-6]\s*/i.test(o),v=!g&&/nexus\s*[0-9]+/i.test(o),x=/CrOS/.test(o),n=/silk/i.test(o),i=/sailfish/i.test(o),t=/tizen/i.test(o),S=/(web|hpw)(o|0)s/i.test(o),E=/windows phone/i.test(o),s=/SamsungBrowser/i.test(o),P=!E&&/windows/i.test(o),O=!_&&!n&&/macintosh/i.test(o),b=!c&&!i&&!t&&!S&&/linux/i.test(o),y=a(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),p=l(/version\/(\d+(\.\d+)?)/i),T=/tablet/i.test(o)&&!/tablet pc/i.test(o),M=!T&&/[^-]mobi/i.test(o),N=/xbox/i.test(o),I;/opera/i.test(o)?I={name:"Opera",opera:L,version:p||l(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(o)?I={name:"Opera",opera:L,version:l(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||p}:/SamsungBrowser/i.test(o)?I={name:"Samsung Internet for Android",samsungBrowser:L,version:p||l(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(o)?I={name:"NAVER Whale browser",whale:L,version:l(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(o)?I={name:"MZ Browser",mzbrowser:L,version:l(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(o)?I={name:"Opera Coast",coast:L,version:p||l(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(o)?I={name:"Focus",focus:L,version:l(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(o)?I={name:"Yandex Browser",yandexbrowser:L,version:p||l(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(o)?I={name:"UC Browser",ucbrowser:L,version:l(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(o)?I={name:"Maxthon",maxthon:L,version:l(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(o)?I={name:"Epiphany",epiphany:L,version:l(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(o)?I={name:"Puffin",puffin:L,version:l(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(o)?I={name:"Sleipnir",sleipnir:L,version:l(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(o)?I={name:"K-Meleon",kMeleon:L,version:l(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:E?(I={name:"Windows Phone",osname:"Windows Phone",windowsphone:L},y?(I.msedge=L,I.version=y):(I.msie=L,I.version=l(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(o)?I={name:"Internet Explorer",msie:L,version:l(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:x?I={name:"Chrome",osname:"Chrome OS",chromeos:L,chromeBook:L,chrome:L,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(o)?I={name:"Microsoft Edge",msedge:L,version:y}:/vivaldi/i.test(o)?I={name:"Vivaldi",vivaldi:L,version:l(/vivaldi\/(\d+(\.\d+)?)/i)||p}:i?I={name:"Sailfish",osname:"Sailfish OS",sailfish:L,version:l(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(o)?I={name:"SeaMonkey",seamonkey:L,version:l(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(o)?(I={name:"Firefox",firefox:L,version:l(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(o)&&(I.firefoxos=L,I.osname="Firefox OS")):n?I={name:"Amazon Silk",silk:L,version:l(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(o)?I={name:"PhantomJS",phantom:L,version:l(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(o)?I={name:"SlimerJS",slimer:L,version:l(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(o)||/rim\stablet/i.test(o)?I={name:"BlackBerry",osname:"BlackBerry OS",blackberry:L,version:p||l(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:S?(I={name:"WebOS",osname:"WebOS",webos:L,version:p||l(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(o)&&(I.touchpad=L)):/bada/i.test(o)?I={name:"Bada",osname:"Bada",bada:L,version:l(/dolfin\/(\d+(\.\d+)?)/i)}:t?I={name:"Tizen",osname:"Tizen",tizen:L,version:l(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||p}:/qupzilla/i.test(o)?I={name:"QupZilla",qupzilla:L,version:l(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||p}:/chromium/i.test(o)?I={name:"Chromium",chromium:L,version:l(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||p}:/chrome|crios|crmo/i.test(o)?I={name:"Chrome",chrome:L,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:c?I={name:"Android",version:p}:/safari|applewebkit/i.test(o)?(I={name:"Safari",safari:L},p&&(I.version=p)):_?(I={name:_=="iphone"?"iPhone":_=="ipad"?"iPad":"iPod"},p&&(I.version=p)):/googlebot/i.test(o)?I={name:"Googlebot",googlebot:L,version:l(/googlebot\/(\d+(\.\d+))/i)||p}:I={name:l(/^(.*)\/(.*) /),version:a(/^(.*)\/(.*) /)},!I.msedge&&/(apple)?webkit/i.test(o)?(/(apple)?webkit\/537\.36/i.test(o)?(I.name=I.name||"Blink",I.blink=L):(I.name=I.name||"Webkit",I.webkit=L),!I.version&&p&&(I.version=p)):!I.opera&&/gecko\//i.test(o)&&(I.name=I.name||"Gecko",I.gecko=L,I.version=I.version||l(/gecko\/(\d+(\.\d+)?)/i)),!I.windowsphone&&(c||I.silk)?(I.android=L,I.osname="Android"):!I.windowsphone&&_?(I[_]=L,I.ios=L,I.osname="iOS"):O?(I.mac=L,I.osname="macOS"):N?(I.xbox=L,I.osname="Xbox"):P?(I.windows=L,I.osname="Windows"):b&&(I.linux=L,I.osname="Linux");function K(z){switch(z){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}}var H="";I.windows?H=K(l(/Windows ((NT|XP)( \d\d?.\d)?)/i)):I.windowsphone?H=l(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):I.mac?(H=l(/Mac OS X (\d+([_\.\s]\d+)*)/i),H=H.replace(/[_\s]/g,".")):_?(H=l(/os (\d+([_\s]\d+)*) like mac os x/i),H=H.replace(/[_\s]/g,".")):c?H=l(/android[ \/-](\d+(\.\d+)*)/i):I.webos?H=l(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):I.blackberry?H=l(/rim\stablet\sos\s(\d+(\.\d+)*)/i):I.bada?H=l(/bada\/(\d+(\.\d+)*)/i):I.tizen&&(H=l(/tizen[\/\s](\d+(\.\d+)*)/i)),H&&(I.osversion=H);var W=!I.windows&&H.split(".")[0];return T||v||_=="ipad"||c&&(W==3||W>=4&&!M)||I.silk?I.tablet=L:(M||_=="iphone"||_=="ipod"||c||g||I.blackberry||I.webos||I.bada)&&(I.mobile=L),I.msedge||I.msie&&I.version>=10||I.yandexbrowser&&I.version>=15||I.vivaldi&&I.version>=1||I.chrome&&I.version>=20||I.samsungBrowser&&I.version>=4||I.whale&&f([I.version,"1.0"])===1||I.mzbrowser&&f([I.version,"6.0"])===1||I.focus&&f([I.version,"1.0"])===1||I.firefox&&I.version>=20||I.safari&&I.version>=6||I.opera&&I.version>=10||I.ios&&I.osversion&&I.osversion.split(".")[0]>=6||I.blackberry&&I.version>=10.1||I.chromium&&I.version>=20?I.a=L:I.msie&&I.version<10||I.chrome&&I.version<20||I.firefox&&I.version<20||I.safari&&I.version<6||I.opera&&I.version<10||I.ios&&I.osversion&&I.osversion.split(".")[0]<6||I.chromium&&I.version<20?I.c=L:I.x=L,I}var C=h(typeof navigator!="undefined"&&navigator.userAgent||"");C.test=function(o){for(var l=0;l<o.length;++l){var a=o[l];if(typeof a=="string"&&a in C)return!0}return!1};function D(o){return o.split(".").length}function u(o,l){var a=[],_;if(Array.prototype.map)return Array.prototype.map.call(o,l);for(_=0;_<o.length;_++)a.push(l(o[_]));return a}function f(o){for(var l=Math.max(D(o[0]),D(o[1])),a=u(o,function(_){var m=l-D(_);return _=_+new Array(m+1).join(".0"),u(_.split("."),function(c){return new Array(20-c.length).join("0")+c}).reverse()});--l>=0;){if(a[0][l]>a[1][l])return 1;if(a[0][l]===a[1][l]){if(l===0)return 0}else return-1}}function w(o,l,a){var _=C;typeof l=="string"&&(a=l,l=void 0),l===void 0&&(l=!1),a&&(_=h(a));var m=""+_.version;for(var c in o)if(o.hasOwnProperty(c)&&_[c]){if(typeof o[c]!="string")throw new Error("Browser version in the minVersion map should be a string: "+c+": "+String(o));return f([m,o[c]])<0}return l}function d(o,l,a){return!w(o,l,a)}return C.isUnsupportedBrowser=w,C.compareVersions=f,C.check=d,C._detect=h,C.detect=h,C})},{}],71:[function(j,Q,k){},{}],72:[function(j,Q,k){var L=j("buffer").Buffer,h=L.isEncoding||function(d){switch(d&&d.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}};function C(d){if(d&&!h(d))throw new Error("Unknown encoding: "+d)}var D=k.StringDecoder=function(d){this.encoding=(d||"utf8").toLowerCase().replace(/[-_]/,""),C(d);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=f;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=w;break;default:this.write=u;return}this.charBuffer=new L(6),this.charReceived=0,this.charLength=0};D.prototype.write=function(d){for(var o="";this.charLength;){var l=d.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:d.length;if(d.copy(this.charBuffer,this.charReceived,0,l),this.charReceived+=l,this.charReceived<this.charLength)return"";d=d.slice(l,d.length),o=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var _=o.charCodeAt(o.length-1);if(_>=55296&&_<=56319){this.charLength+=this.surrogateSize,o="";continue}if(this.charReceived=this.charLength=0,d.length===0)return o;break}this.detectIncompleteChar(d);var a=d.length;this.charLength&&(d.copy(this.charBuffer,0,d.length-this.charReceived,a),a-=this.charReceived),o+=d.toString(this.encoding,0,a);var a=o.length-1,_=o.charCodeAt(a);if(_>=55296&&_<=56319){var m=this.surrogateSize;return this.charLength+=m,this.charReceived+=m,this.charBuffer.copy(this.charBuffer,m,0,m),d.copy(this.charBuffer,0,0,m),o.substring(0,a)}return o},D.prototype.detectIncompleteChar=function(d){for(var o=d.length>=3?3:d.length;o>0;o--){var l=d[d.length-o];if(o==1&&l>>5==6){this.charLength=2;break}if(o<=2&&l>>4==14){this.charLength=3;break}if(o<=3&&l>>3==30){this.charLength=4;break}}this.charReceived=o},D.prototype.end=function(d){var o="";if(d&&d.length&&(o=this.write(d)),this.charReceived){var l=this.charReceived,a=this.charBuffer,_=this.encoding;o+=a.slice(0,l).toString(_)}return o};function u(d){return d.toString(this.encoding)}function f(d){this.charReceived=d.length%2,this.charLength=this.charReceived?2:0}function w(d){this.charReceived=d.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(j,Q,k){(function(L,h){/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/"use strict";var C=j("base64-js"),D=j("ieee754"),u=j("isarray");k.Buffer=h,k.SlowBuffer=n,k.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=L.TYPED_ARRAY_SUPPORT!==void 0?L.TYPED_ARRAY_SUPPORT:f(),k.kMaxLength=w();function f(){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($){return!1}}function w(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function d(ee,$){if(w()<$)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(ee=new Uint8Array($),ee.__proto__=h.prototype):(ee===null&&(ee=new h($)),ee.length=$),ee}function h(ee,$,X){if(!h.TYPED_ARRAY_SUPPORT&&!(this instanceof h))return new h(ee,$,X);if(typeof ee=="number"){if(typeof $=="string")throw new Error("If encoding is specified then the first argument must be a string");return _(this,ee)}return o(this,ee,$,X)}h.poolSize=8192,h._augment=function(ee){return ee.__proto__=h.prototype,ee};function o(ee,$,X,J){if(typeof $=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&$ instanceof ArrayBuffer?g(ee,$,X,J):typeof $=="string"?m(ee,$,X):v(ee,$)}h.from=function(ee,$,X){return o(null,ee,$,X)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0}));function l(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 a(ee,$,X,J){return l($),$<=0?d(ee,$):X!==void 0?typeof J=="string"?d(ee,$).fill(X,J):d(ee,$).fill(X):d(ee,$)}h.alloc=function(ee,$,X){return a(null,ee,$,X)};function _(ee,$){if(l($),ee=d(ee,$<0?0:x($)|0),!h.TYPED_ARRAY_SUPPORT)for(var X=0;X<$;++X)ee[X]=0;return ee}h.allocUnsafe=function(ee){return _(null,ee)},h.allocUnsafeSlow=function(ee){return _(null,ee)};function m(ee,$,X){if((typeof X!="string"||X==="")&&(X="utf8"),!h.isEncoding(X))throw new TypeError('"encoding" must be a valid string encoding');var J=i($,X)|0;ee=d(ee,J);var me=ee.write($,X);return me!==J&&(ee=ee.slice(0,me)),ee}function c(ee,$){var X=$.length<0?0:x($.length)|0;ee=d(ee,X);for(var J=0;J<X;J+=1)ee[J]=$[J]&255;return ee}function g(ee,$,X,J){if($.byteLength,X<0||$.byteLength<X)throw new RangeError("'offset' is out of bounds");if($.byteLength<X+(J||0))throw new RangeError("'length' is out of bounds");return X===void 0&&J===void 0?$=new Uint8Array($):J===void 0?$=new Uint8Array($,X):$=new Uint8Array($,X,J),h.TYPED_ARRAY_SUPPORT?(ee=$,ee.__proto__=h.prototype):ee=c(ee,$),ee}function v(ee,$){if(h.isBuffer($)){var X=x($.length)|0;return ee=d(ee,X),ee.length===0||$.copy(ee,0,0,X),ee}if($){if(typeof ArrayBuffer!="undefined"&&$.buffer instanceof ArrayBuffer||"length"in $)return typeof $.length!="number"||ge($.length)?d(ee,0):c(ee,$);if($.type==="Buffer"&&u($.data))return c(ee,$.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function x(ee){if(ee>=w())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w().toString(16)+" bytes");return ee|0}function n(ee){return+ee!=ee&&(ee=0),h.alloc(+ee)}h.isBuffer=function($){return!!($!=null&&$._isBuffer)},h.compare=function($,X){if(!h.isBuffer($)||!h.isBuffer(X))throw new TypeError("Arguments must be Buffers");if($===X)return 0;for(var J=$.length,me=X.length,ue=0,_e=Math.min(J,me);ue<_e;++ue)if($[ue]!==X[ue]){J=$[ue],me=X[ue];break}return J<me?-1:me<J?1:0},h.isEncoding=function($){switch(String($).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}},h.concat=function($,X){if(!u($))throw new TypeError('"list" argument must be an Array of Buffers');if($.length===0)return h.alloc(0);var J;if(X===void 0)for(X=0,J=0;J<$.length;++J)X+=$[J].length;var me=h.allocUnsafe(X),ue=0;for(J=0;J<$.length;++J){var _e=$[J];if(!h.isBuffer(_e))throw new TypeError('"list" argument must be an Array of Buffers');_e.copy(me,ue),ue+=_e.length}return me};function i(ee,$){if(h.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 X=ee.length;if(X===0)return 0;for(var J=!1;;)switch($){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":case void 0:return oe(ee).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return Y(ee).length;default:if(J)return oe(ee).length;$=(""+$).toLowerCase(),J=!0}}h.byteLength=i;function t(ee,$,X){var J=!1;if(($===void 0||$<0)&&($=0),$>this.length)return"";if((X===void 0||X>this.length)&&(X=this.length),X<=0)return"";if(X>>>=0,$>>>=0,X<=$)return"";for(ee||(ee="utf8");;)switch(ee){case"hex":return z(this,$,X);case"utf8":case"utf-8":return N(this,$,X);case"ascii":return H(this,$,X);case"latin1":case"binary":return W(this,$,X);case"base64":return M(this,$,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,$,X);default:if(J)throw new TypeError("Unknown encoding: "+ee);ee=(ee+"").toLowerCase(),J=!0}}h.prototype._isBuffer=!0;function S(ee,$,X){var J=ee[$];ee[$]=ee[X],ee[X]=J}h.prototype.swap16=function(){var $=this.length;if($%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X<$;X+=2)S(this,X,X+1);return this},h.prototype.swap32=function(){var $=this.length;if($%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var X=0;X<$;X+=4)S(this,X,X+3),S(this,X+1,X+2);return this},h.prototype.swap64=function(){var $=this.length;if($%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var X=0;X<$;X+=8)S(this,X,X+7),S(this,X+1,X+6),S(this,X+2,X+5),S(this,X+3,X+4);return this},h.prototype.toString=function(){var $=this.length|0;return $===0?"":arguments.length===0?N(this,0,$):t.apply(this,arguments)},h.prototype.equals=function($){if(!h.isBuffer($))throw new TypeError("Argument must be a Buffer");return this===$?!0:h.compare(this,$)===0},h.prototype.inspect=function(){var $="",X=k.INSPECT_MAX_BYTES;return this.length>0&&($=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&($+=" ... ")),"<Buffer "+$+">"},h.prototype.compare=function($,X,J,me,ue){if(!h.isBuffer($))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),J===void 0&&(J=$?$.length:0),me===void 0&&(me=0),ue===void 0&&(ue=this.length),X<0||J>$.length||me<0||ue>this.length)throw new RangeError("out of range index");if(me>=ue&&X>=J)return 0;if(me>=ue)return-1;if(X>=J)return 1;if(X>>>=0,J>>>=0,me>>>=0,ue>>>=0,this===$)return 0;for(var _e=ue-me,He=J-X,$e=Math.min(_e,He),Ye=this.slice(me,ue),tt=$.slice(X,J),nt=0;nt<$e;++nt)if(Ye[nt]!==tt[nt]){_e=Ye[nt],He=tt[nt];break}return _e<He?-1:He<_e?1:0};function E(ee,$,X,J,me){if(ee.length===0)return-1;if(typeof X=="string"?(J=X,X=0):X>2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=me?0:ee.length-1),X<0&&(X=ee.length+X),X>=ee.length){if(me)return-1;X=ee.length-1}else if(X<0)if(me)X=0;else return-1;if(typeof $=="string"&&($=h.from($,J)),h.isBuffer($))return $.length===0?-1:s(ee,$,X,J,me);if(typeof $=="number")return $=$&255,h.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?me?Uint8Array.prototype.indexOf.call(ee,$,X):Uint8Array.prototype.lastIndexOf.call(ee,$,X):s(ee,[$],X,J,me);throw new TypeError("val must be string, number or Buffer")}function s(ee,$,X,J,me){var ue=1,_e=ee.length,He=$.length;if(J!==void 0&&(J=String(J).toLowerCase(),J==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(ee.length<2||$.length<2)return-1;ue=2,_e/=2,He/=2,X/=2}function $e(Me,Ce){return ue===1?Me[Ce]:Me.readUInt16BE(Ce*ue)}var Ye;if(me){var tt=-1;for(Ye=X;Ye<_e;Ye++)if($e(ee,Ye)===$e($,tt===-1?0:Ye-tt)){if(tt===-1&&(tt=Ye),Ye-tt+1===He)return tt*ue}else tt!==-1&&(Ye-=Ye-tt),tt=-1}else for(X+He>_e&&(X=_e-He),Ye=X;Ye>=0;Ye--){for(var nt=!0,it=0;it<He;it++)if($e(ee,Ye+it)!==$e($,it)){nt=!1;break}if(nt)return Ye}return-1}h.prototype.includes=function($,X,J){return this.indexOf($,X,J)!==-1},h.prototype.indexOf=function($,X,J){return E(this,$,X,J,!0)},h.prototype.lastIndexOf=function($,X,J){return E(this,$,X,J,!1)};function P(ee,$,X,J){X=Number(X)||0;var me=ee.length-X;J?(J=Number(J),J>me&&(J=me)):J=me;var ue=$.length;if(ue%2!==0)throw new TypeError("Invalid hex string");J>ue/2&&(J=ue/2);for(var _e=0;_e<J;++_e){var He=parseInt($.substr(_e*2,2),16);if(isNaN(He))return _e;ee[X+_e]=He}return _e}function O(ee,$,X,J){return Z(oe($,ee.length-X),ee,X,J)}function b(ee,$,X,J){return Z(te($),ee,X,J)}function y(ee,$,X,J){return b(ee,$,X,J)}function p(ee,$,X,J){return Z(Y($),ee,X,J)}function T(ee,$,X,J){return Z(le($,ee.length-X),ee,X,J)}h.prototype.write=function($,X,J,me){if(X===void 0)me="utf8",J=this.length,X=0;else if(J===void 0&&typeof X=="string")me=X,J=this.length,X=0;else if(isFinite(X))X=X|0,isFinite(J)?(J=J|0,me===void 0&&(me="utf8")):(me=J,J=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ue=this.length-X;if((J===void 0||J>ue)&&(J=ue),$.length>0&&(J<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");me||(me="utf8");for(var _e=!1;;)switch(me){case"hex":return P(this,$,X,J);case"utf8":case"utf-8":return O(this,$,X,J);case"ascii":return b(this,$,X,J);case"latin1":case"binary":return y(this,$,X,J);case"base64":return p(this,$,X,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,$,X,J);default:if(_e)throw new TypeError("Unknown encoding: "+me);me=(""+me).toLowerCase(),_e=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(ee,$,X){return $===0&&X===ee.length?C.fromByteArray(ee):C.fromByteArray(ee.slice($,X))}function N(ee,$,X){X=Math.min(ee.length,X);for(var J=[],me=$;me<X;){var ue=ee[me],_e=null,He=ue>239?4:ue>223?3:ue>191?2:1;if(me+He<=X){var $e,Ye,tt,nt;switch(He){case 1:ue<128&&(_e=ue);break;case 2:$e=ee[me+1],($e&192)===128&&(nt=(ue&31)<<6|$e&63,nt>127&&(_e=nt));break;case 3:$e=ee[me+1],Ye=ee[me+2],($e&192)===128&&(Ye&192)===128&&(nt=(ue&15)<<12|($e&63)<<6|Ye&63,nt>2047&&(nt<55296||nt>57343)&&(_e=nt));break;case 4:$e=ee[me+1],Ye=ee[me+2],tt=ee[me+3],($e&192)===128&&(Ye&192)===128&&(tt&192)===128&&(nt=(ue&15)<<18|($e&63)<<12|(Ye&63)<<6|tt&63,nt>65535&&nt<1114112&&(_e=nt))}}_e===null?(_e=65533,He=1):_e>65535&&(_e-=65536,J.push(_e>>>10&1023|55296),_e=56320|_e&1023),J.push(_e),me+=He}return K(J)}var I=4096;function K(ee){var $=ee.length;if($<=I)return String.fromCharCode.apply(String,ee);for(var X="",J=0;J<$;)X+=String.fromCharCode.apply(String,ee.slice(J,J+=I));return X}function H(ee,$,X){var J="";X=Math.min(ee.length,X);for(var me=$;me<X;++me)J+=String.fromCharCode(ee[me]&127);return J}function W(ee,$,X){var J="";X=Math.min(ee.length,X);for(var me=$;me<X;++me)J+=String.fromCharCode(ee[me]);return J}function z(ee,$,X){var J=ee.length;(!$||$<0)&&($=0),(!X||X<0||X>J)&&(X=J);for(var me="",ue=$;ue<X;++ue)me+=ne(ee[ue]);return me}function U(ee,$,X){for(var J=ee.slice($,X),me="",ue=0;ue<J.length;ue+=2)me+=String.fromCharCode(J[ue]+J[ue+1]*256);return me}h.prototype.slice=function($,X){var J=this.length;$=~~$,X=X===void 0?J:~~X,$<0?($+=J,$<0&&($=0)):$>J&&($=J),X<0?(X+=J,X<0&&(X=0)):X>J&&(X=J),X<$&&(X=$);var me;if(h.TYPED_ARRAY_SUPPORT)me=this.subarray($,X),me.__proto__=h.prototype;else{var ue=X-$;me=new h(ue,void 0);for(var _e=0;_e<ue;++_e)me[_e]=this[_e+$]}return me};function B(ee,$,X){if(ee%1!==0||ee<0)throw new RangeError("offset is not uint");if(ee+$>X)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUIntLE=function($,X,J){$=$|0,X=X|0,J||B($,X,this.length);for(var me=this[$],ue=1,_e=0;++_e<X&&(ue*=256);)me+=this[$+_e]*ue;return me},h.prototype.readUIntBE=function($,X,J){$=$|0,X=X|0,J||B($,X,this.length);for(var me=this[$+--X],ue=1;X>0&&(ue*=256);)me+=this[$+--X]*ue;return me},h.prototype.readUInt8=function($,X){return X||B($,1,this.length),this[$]},h.prototype.readUInt16LE=function($,X){return X||B($,2,this.length),this[$]|this[$+1]<<8},h.prototype.readUInt16BE=function($,X){return X||B($,2,this.length),this[$]<<8|this[$+1]},h.prototype.readUInt32LE=function($,X){return X||B($,4,this.length),(this[$]|this[$+1]<<8|this[$+2]<<16)+this[$+3]*16777216},h.prototype.readUInt32BE=function($,X){return X||B($,4,this.length),this[$]*16777216+(this[$+1]<<16|this[$+2]<<8|this[$+3])},h.prototype.readIntLE=function($,X,J){$=$|0,X=X|0,J||B($,X,this.length);for(var me=this[$],ue=1,_e=0;++_e<X&&(ue*=256);)me+=this[$+_e]*ue;return ue*=128,me>=ue&&(me-=Math.pow(2,8*X)),me},h.prototype.readIntBE=function($,X,J){$=$|0,X=X|0,J||B($,X,this.length);for(var me=X,ue=1,_e=this[$+--me];me>0&&(ue*=256);)_e+=this[$+--me]*ue;return ue*=128,_e>=ue&&(_e-=Math.pow(2,8*X)),_e},h.prototype.readInt8=function($,X){return X||B($,1,this.length),this[$]&128?(255-this[$]+1)*-1:this[$]},h.prototype.readInt16LE=function($,X){X||B($,2,this.length);var J=this[$]|this[$+1]<<8;return J&32768?J|4294901760:J},h.prototype.readInt16BE=function($,X){X||B($,2,this.length);var J=this[$+1]|this[$]<<8;return J&32768?J|4294901760:J},h.prototype.readInt32LE=function($,X){return X||B($,4,this.length),this[$]|this[$+1]<<8|this[$+2]<<16|this[$+3]<<24},h.prototype.readInt32BE=function($,X){return X||B($,4,this.length),this[$]<<24|this[$+1]<<16|this[$+2]<<8|this[$+3]},h.prototype.readFloatLE=function($,X){return X||B($,4,this.length),D.read(this,$,!0,23,4)},h.prototype.readFloatBE=function($,X){return X||B($,4,this.length),D.read(this,$,!1,23,4)},h.prototype.readDoubleLE=function($,X){return X||B($,8,this.length),D.read(this,$,!0,52,8)},h.prototype.readDoubleBE=function($,X){return X||B($,8,this.length),D.read(this,$,!1,52,8)};function G(ee,$,X,J,me,ue){if(!h.isBuffer(ee))throw new TypeError('"buffer" argument must be a Buffer instance');if($>me||$<ue)throw new RangeError('"value" argument is out of bounds');if(X+J>ee.length)throw new RangeError("Index out of range")}h.prototype.writeUIntLE=function($,X,J,me){if($=+$,X=X|0,J=J|0,!me){var ue=Math.pow(2,8*J)-1;G(this,$,X,J,ue,0)}var _e=1,He=0;for(this[X]=$&255;++He<J&&(_e*=256);)this[X+He]=$/_e&255;return X+J},h.prototype.writeUIntBE=function($,X,J,me){if($=+$,X=X|0,J=J|0,!me){var ue=Math.pow(2,8*J)-1;G(this,$,X,J,ue,0)}var _e=J-1,He=1;for(this[X+_e]=$&255;--_e>=0&&(He*=256);)this[X+_e]=$/He&255;return X+J},h.prototype.writeUInt8=function($,X,J){return $=+$,X=X|0,J||G(this,$,X,1,255,0),h.TYPED_ARRAY_SUPPORT||($=Math.floor($)),this[X]=$&255,X+1};function q(ee,$,X,J){$<0&&($=65535+$+1);for(var me=0,ue=Math.min(ee.length-X,2);me<ue;++me)ee[X+me]=($&255<<8*(J?me:1-me))>>>(J?me:1-me)*8}h.prototype.writeUInt16LE=function($,X,J){return $=+$,X=X|0,J||G(this,$,X,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[X]=$&255,this[X+1]=$>>>8):q(this,$,X,!0),X+2},h.prototype.writeUInt16BE=function($,X,J){return $=+$,X=X|0,J||G(this,$,X,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[X]=$>>>8,this[X+1]=$&255):q(this,$,X,!1),X+2};function ae(ee,$,X,J){$<0&&($=4294967295+$+1);for(var me=0,ue=Math.min(ee.length-X,4);me<ue;++me)ee[X+me]=$>>>(J?me:3-me)*8&255}h.prototype.writeUInt32LE=function($,X,J){return $=+$,X=X|0,J||G(this,$,X,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[X+3]=$>>>24,this[X+2]=$>>>16,this[X+1]=$>>>8,this[X]=$&255):ae(this,$,X,!0),X+4},h.prototype.writeUInt32BE=function($,X,J){return $=+$,X=X|0,J||G(this,$,X,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[X]=$>>>24,this[X+1]=$>>>16,this[X+2]=$>>>8,this[X+3]=$&255):ae(this,$,X,!1),X+4},h.prototype.writeIntLE=function($,X,J,me){if($=+$,X=X|0,!me){var ue=Math.pow(2,8*J-1);G(this,$,X,J,ue-1,-ue)}var _e=0,He=1,$e=0;for(this[X]=$&255;++_e<J&&(He*=256);)$<0&&$e===0&&this[X+_e-1]!==0&&($e=1),this[X+_e]=($/He>>0)-$e&255;return X+J},h.prototype.writeIntBE=function($,X,J,me){if($=+$,X=X|0,!me){var ue=Math.pow(2,8*J-1);G(this,$,X,J,ue-1,-ue)}var _e=J-1,He=1,$e=0;for(this[X+_e]=$&255;--_e>=0&&(He*=256);)$<0&&$e===0&&this[X+_e+1]!==0&&($e=1),this[X+_e]=($/He>>0)-$e&255;return X+J},h.prototype.writeInt8=function($,X,J){return $=+$,X=X|0,J||G(this,$,X,1,127,-128),h.TYPED_ARRAY_SUPPORT||($=Math.floor($)),$<0&&($=255+$+1),this[X]=$&255,X+1},h.prototype.writeInt16LE=function($,X,J){return $=+$,X=X|0,J||G(this,$,X,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[X]=$&255,this[X+1]=$>>>8):q(this,$,X,!0),X+2},h.prototype.writeInt16BE=function($,X,J){return $=+$,X=X|0,J||G(this,$,X,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[X]=$>>>8,this[X+1]=$&255):q(this,$,X,!1),X+2},h.prototype.writeInt32LE=function($,X,J){return $=+$,X=X|0,J||G(this,$,X,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[X]=$&255,this[X+1]=$>>>8,this[X+2]=$>>>16,this[X+3]=$>>>24):ae(this,$,X,!0),X+4},h.prototype.writeInt32BE=function($,X,J){return $=+$,X=X|0,J||G(this,$,X,4,2147483647,-2147483648),$<0&&($=4294967295+$+1),h.TYPED_ARRAY_SUPPORT?(this[X]=$>>>24,this[X+1]=$>>>16,this[X+2]=$>>>8,this[X+3]=$&255):ae(this,$,X,!1),X+4};function se(ee,$,X,J,me,ue){if(X+J>ee.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function we(ee,$,X,J,me){return me||se(ee,$,X,4,34028234663852886e22,-34028234663852886e22),D.write(ee,$,X,J,23,4),X+4}h.prototype.writeFloatLE=function($,X,J){return we(this,$,X,!0,J)},h.prototype.writeFloatBE=function($,X,J){return we(this,$,X,!1,J)};function Se(ee,$,X,J,me){return me||se(ee,$,X,8,17976931348623157e292,-17976931348623157e292),D.write(ee,$,X,J,52,8),X+8}h.prototype.writeDoubleLE=function($,X,J){return Se(this,$,X,!0,J)},h.prototype.writeDoubleBE=function($,X,J){return Se(this,$,X,!1,J)},h.prototype.copy=function($,X,J,me){if(J||(J=0),!me&&me!==0&&(me=this.length),X>=$.length&&(X=$.length),X||(X=0),me>0&&me<J&&(me=J),me===J)return 0;if($.length===0||this.length===0)return 0;if(X<0)throw new RangeError("targetStart out of bounds");if(J<0||J>=this.length)throw new RangeError("sourceStart out of bounds");if(me<0)throw new RangeError("sourceEnd out of bounds");me>this.length&&(me=this.length),$.length-X<me-J&&(me=$.length-X+J);var ue=me-J,_e;if(this===$&&J<X&&X<me)for(_e=ue-1;_e>=0;--_e)$[_e+X]=this[_e+J];else if(ue<1e3||!h.TYPED_ARRAY_SUPPORT)for(_e=0;_e<ue;++_e)$[_e+X]=this[_e+J];else Uint8Array.prototype.set.call($,this.subarray(J,J+ue),X);return ue},h.prototype.fill=function($,X,J,me){if(typeof $=="string"){if(typeof X=="string"?(me=X,X=0,J=this.length):typeof J=="string"&&(me=J,J=this.length),$.length===1){var ue=$.charCodeAt(0);ue<256&&($=ue)}if(me!==void 0&&typeof me!="string")throw new TypeError("encoding must be a string");if(typeof me=="string"&&!h.isEncoding(me))throw new TypeError("Unknown encoding: "+me)}else typeof $=="number"&&($=$&255);if(X<0||this.length<X||this.length<J)throw new RangeError("Out of range index");if(J<=X)return this;X=X>>>0,J=J===void 0?this.length:J>>>0,$||($=0);var _e;if(typeof $=="number")for(_e=X;_e<J;++_e)this[_e]=$;else{var He=h.isBuffer($)?$:oe(new h($,me).toString()),$e=He.length;for(_e=0;_e<J-X;++_e)this[_e+X]=He[_e%$e]}return this};var de=/[^+\/0-9A-Za-z-_]/g;function xe(ee){if(ee=he(ee).replace(de,""),ee.length<2)return"";for(;ee.length%4!==0;)ee=ee+"=";return ee}function he(ee){return ee.trim?ee.trim():ee.replace(/^\s+|\s+$/g,"")}function ne(ee){return ee<16?"0"+ee.toString(16):ee.toString(16)}function oe(ee,$){$=$||Infinity;for(var X,J=ee.length,me=null,ue=[],_e=0;_e<J;++_e){if(X=ee.charCodeAt(_e),X>55295&&X<57344){if(!me){if(X>56319){($-=3)>-1&&ue.push(239,191,189);continue}else if(_e+1===J){($-=3)>-1&&ue.push(239,191,189);continue}me=X;continue}if(X<56320){($-=3)>-1&&ue.push(239,191,189),me=X;continue}X=(me-55296<<10|X-56320)+65536}else me&&(($-=3)>-1&&ue.push(239,191,189));if(me=null,X<128){if(($-=1)<0)break;ue.push(X)}else if(X<2048){if(($-=2)<0)break;ue.push(X>>6|192,X&63|128)}else if(X<65536){if(($-=3)<0)break;ue.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if(($-=4)<0)break;ue.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return ue}function te(ee){for(var $=[],X=0;X<ee.length;++X)$.push(ee.charCodeAt(X)&255);return $}function le(ee,$){for(var X,J,me,ue=[],_e=0;_e<ee.length&&!(($-=2)<0);++_e)X=ee.charCodeAt(_e),J=X>>8,me=X%256,ue.push(me),ue.push(J);return ue}function Y(ee){return C.toByteArray(xe(ee))}function Z(ee,$,X,J){for(var me=0;me<J&&!(me+X>=$.length||me>=ee.length);++me)$[me+X]=ee[me];return me}function ge(ee){return ee!==ee}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(j,Q,k){Q.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"}},{}],75:[function(j,Q,k){Q.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}},{}],76:[function(j,Q,k){/*!
|
|
|
* copy-to - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var L=Array.prototype.slice;Q.exports=h;function h(D,u){if(!(this instanceof h))return new h(D,u);this.src=D,this._withAccess=u}h.prototype.withAccess=function(D){return this._withAccess=D!==!1,this},h.prototype.pick=function(D){return Array.isArray(D)||(D=L.call(arguments)),D.length&&(this.keys=D),this},h.prototype.to=function(D){if(D=D||{},!this.src)return D;var u=this.keys||Object.keys(this.src);if(!this._withAccess){for(var f=0;f<u.length;f++){if(w=u[f],D[w]!==void 0)continue;D[w]=this.src[w]}return D}for(var f=0;f<u.length;f++){var w=u[f];if(!C(D,w))continue;var d=this.src.__lookupGetter__(w),o=this.src.__lookupSetter__(w);d&&D.__defineGetter__(w,d),o&&D.__defineSetter__(w,o),!d&&!o&&(D[w]=this.src[w])}return D},h.prototype.toCover=function(D){for(var u=this.keys||Object.keys(this.src),f=0;f<u.length;f++){var w=u[f];delete D[w];var d=this.src.__lookupGetter__(w),o=this.src.__lookupSetter__(w);d&&D.__defineGetter__(w,d),o&&D.__defineSetter__(w,o),!d&&!o&&(D[w]=this.src[w])}},h.prototype.override=h.prototype.toCover,h.prototype.and=function(D){var u={};return this.to(u),this.src=D,this.to(u),this.src=u,this};function C(D,u){return D[u]===void 0&&D.__lookupGetter__(u)===void 0&&D.__lookupSetter__(u)===void 0}},{}],77:[function(j,Q,k){j("../../modules/es6.string.iterator"),j("../../modules/es6.array.from"),Q.exports=j("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(j,Q,k){var L=j("../../modules/_core"),h=L.JSON||(L.JSON={stringify:JSON.stringify});Q.exports=function(D){return h.stringify.apply(h,arguments)}},{"../../modules/_core":99}],79:[function(j,Q,k){j("../../modules/es6.object.assign"),Q.exports=j("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(j,Q,k){j("../../modules/es6.object.create");var L=j("../../modules/_core").Object;Q.exports=function(C,D){return L.create(C,D)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(j,Q,k){j("../../modules/es6.object.define-property");var L=j("../../modules/_core").Object;Q.exports=function(C,D,u){return L.defineProperty(C,D,u)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(j,Q,k){j("../../modules/es7.object.entries"),Q.exports=j("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(j,Q,k){j("../../modules/es6.object.get-own-property-names");var L=j("../../modules/_core").Object;Q.exports=function(C){return L.getOwnPropertyNames(C)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(j,Q,k){j("../../modules/es6.object.get-prototype-of"),Q.exports=j("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(j,Q,k){j("../../modules/es6.object.keys"),Q.exports=j("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(j,Q,k){j("../modules/es6.object.to-string"),j("../modules/es6.string.iterator"),j("../modules/web.dom.iterable"),j("../modules/es6.promise"),j("../modules/es7.promise.finally"),j("../modules/es7.promise.try"),Q.exports=j("../modules/_core").Promise},{"../modules/_core":99,"../modules/es6.object.to-string":177,"../modules/es6.promise":178,"../modules/es6.string.iterator":180,"../modules/es7.promise.finally":183,"../modules/es7.promise.try":184,"../modules/web.dom.iterable":187}],87:[function(j,Q,k){j("../modules/web.immediate"),Q.exports=j("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(j,Q,k){j("../../modules/es6.string.from-code-point"),Q.exports=j("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(j,Q,k){j("../../modules/es6.function.has-instance"),Q.exports=j("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(j,Q,k){j("../../modules/es6.symbol"),j("../../modules/es6.object.to-string"),j("../../modules/es7.symbol.async-iterator"),j("../../modules/es7.symbol.observable"),Q.exports=j("../../modules/_core").Symbol},{"../../modules/_core":99,"../../modules/es6.object.to-string":177,"../../modules/es6.symbol":181,"../../modules/es7.symbol.async-iterator":185,"../../modules/es7.symbol.observable":186}],91:[function(j,Q,k){j("../../modules/es6.string.iterator"),j("../../modules/web.dom.iterable"),Q.exports=j("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(j,Q,k){Q.exports=function(L){if(typeof L!="function")throw TypeError(L+" is not a function!");return L}},{}],93:[function(j,Q,k){Q.exports=function(){}},{}],94:[function(j,Q,k){Q.exports=function(L,h,C,D){if(!(L instanceof h)||D!==void 0&&D in L)throw TypeError(C+": incorrect invocation!");return L}},{}],95:[function(j,Q,k){var L=j("./_is-object");Q.exports=function(h){if(!L(h))throw TypeError(h+" is not an object!");return h}},{"./_is-object":119}],96:[function(j,Q,k){var L=j("./_to-iobject"),h=j("./_to-length"),C=j("./_to-absolute-index");Q.exports=function(D){return function(u,f,w){var d=L(u),o=h(d.length),l=C(w,o),a;if(D&&f!=f){for(;o>l;)if(a=d[l++],a!=a)return!0}else for(;o>l;l++)if((D||l in d)&&d[l]===f)return D||l||0;return!D&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(j,Q,k){var L=j("./_cof"),h=j("./_wks")("toStringTag"),C=L(function(){return arguments}())=="Arguments",D=function(u,f){try{return u[f]}catch(w){}};Q.exports=function(u){var f,w,d;return u===void 0?"Undefined":u===null?"Null":typeof(w=D(f=Object(u),h))=="string"?w:C?L(f):(d=L(f))=="Object"&&typeof f.callee=="function"?"Arguments":d}},{"./_cof":98,"./_wks":166}],98:[function(j,Q,k){var L={}.toString;Q.exports=function(h){return L.call(h).slice(8,-1)}},{}],99:[function(j,Q,k){var L=Q.exports={version:"2.6.11"};typeof __e=="number"&&(__e=L)},{}],100:[function(j,Q,k){"use strict";var L=j("./_object-dp"),h=j("./_property-desc");Q.exports=function(C,D,u){D in C?L.f(C,D,h(0,u)):C[D]=u}},{"./_object-dp":132,"./_property-desc":146}],101:[function(j,Q,k){var L=j("./_a-function");Q.exports=function(h,C,D){if(L(h),C===void 0)return h;switch(D){case 1:return function(u){return h.call(C,u)};case 2:return function(u,f){return h.call(C,u,f)};case 3:return function(u,f,w){return h.call(C,u,f,w)}}return function(){return h.apply(C,arguments)}}},{"./_a-function":92}],102:[function(j,Q,k){Q.exports=function(L){if(L==null)throw TypeError("Can't call method on "+L);return L}},{}],103:[function(j,Q,k){Q.exports=!j("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(j,Q,k){var L=j("./_is-object"),h=j("./_global").document,C=L(h)&&L(h.createElement);Q.exports=function(D){return C?h.createElement(D):{}}},{"./_global":110,"./_is-object":119}],105:[function(j,Q,k){Q.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(j,Q,k){var L=j("./_object-keys"),h=j("./_object-gops"),C=j("./_object-pie");Q.exports=function(D){var u=L(D),f=h.f;if(f)for(var w=f(D),d=C.f,o=0,l;w.length>o;)d.call(D,l=w[o++])&&u.push(l);return u}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(j,Q,k){var L=j("./_global"),h=j("./_core"),C=j("./_ctx"),D=j("./_hide"),u=j("./_has"),f="prototype",w=function(d,o,l){var a=d&w.F,_=d&w.G,m=d&w.S,c=d&w.P,g=d&w.B,v=d&w.W,x=_?h:h[o]||(h[o]={}),n=x[f],i=_?L:m?L[o]:(L[o]||{})[f],t,S,E;_&&(l=o);for(t in l){if(S=!a&&i&&i[t]!==void 0,S&&u(x,t))continue;E=S?i[t]:l[t],x[t]=_&&typeof i[t]!="function"?l[t]:g&&S?C(E,L):v&&i[t]==E?function(s){var P=function(O,b,y){if(this instanceof s){switch(arguments.length){case 0:return new s;case 1:return new s(O);case 2:return new s(O,b)}return new s(O,b,y)}return s.apply(this,arguments)};return P[f]=s[f],P}(E):c&&typeof E=="function"?C(Function.call,E):E,c&&((x.virtual||(x.virtual={}))[t]=E,d&w.R&&n&&!n[t]&&D(n,t,E))}};w.F=1,w.G=2,w.S=4,w.P=8,w.B=16,w.W=32,w.U=64,w.R=128,Q.exports=w},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(j,Q,k){Q.exports=function(L){try{return!!L()}catch(h){return!0}}},{}],109:[function(j,Q,k){var L=j("./_ctx"),h=j("./_iter-call"),C=j("./_is-array-iter"),D=j("./_an-object"),u=j("./_to-length"),f=j("./core.get-iterator-method"),w={},d={},k=Q.exports=function(o,l,a,_,m){var c=m?function(){return o}:f(o),g=L(a,_,l?2:1),v=0,x,n,i,t;if(typeof c!="function")throw TypeError(o+" is not iterable!");if(C(c)){for(x=u(o.length);x>v;v++)if(t=l?g(D(n=o[v])[0],n[1]):g(o[v]),t===w||t===d)return t}else for(i=c.call(o);!(n=i.next()).done;)if(t=h(i,g,n.value,l),t===w||t===d)return t};k.BREAK=w,k.RETURN=d},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(j,Q,k){var L=Q.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=L)},{}],111:[function(j,Q,k){var L={}.hasOwnProperty;Q.exports=function(h,C){return L.call(h,C)}},{}],112:[function(j,Q,k){var L=j("./_object-dp"),h=j("./_property-desc");Q.exports=j("./_descriptors")?function(C,D,u){return L.f(C,D,h(1,u))}:function(C,D,u){return C[D]=u,C}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(j,Q,k){var L=j("./_global").document;Q.exports=L&&L.documentElement},{"./_global":110}],114:[function(j,Q,k){Q.exports=!j("./_descriptors")&&!j("./_fails")(function(){return Object.defineProperty(j("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(j,Q,k){Q.exports=function(L,h,C){var D=C===void 0;switch(h.length){case 0:return D?L():L.call(C);case 1:return D?L(h[0]):L.call(C,h[0]);case 2:return D?L(h[0],h[1]):L.call(C,h[0],h[1]);case 3:return D?L(h[0],h[1],h[2]):L.call(C,h[0],h[1],h[2]);case 4:return D?L(h[0],h[1],h[2],h[3]):L.call(C,h[0],h[1],h[2],h[3])}return L.apply(C,h)}},{}],116:[function(j,Q,k){var L=j("./_cof");Q.exports=Object("z").propertyIsEnumerable(0)?Object:function(h){return L(h)=="String"?h.split(""):Object(h)}},{"./_cof":98}],117:[function(j,Q,k){var L=j("./_iterators"),h=j("./_wks")("iterator"),C=Array.prototype;Q.exports=function(D){return D!==void 0&&(L.Array===D||C[h]===D)}},{"./_iterators":125,"./_wks":166}],118:[function(j,Q,k){var L=j("./_cof");Q.exports=Array.isArray||function(C){return L(C)=="Array"}},{"./_cof":98}],119:[function(j,Q,k){Q.exports=function(L){return typeof L=="object"?L!==null:typeof L=="function"}},{}],120:[function(j,Q,k){var L=j("./_an-object");Q.exports=function(h,C,D,u){try{return u?C(L(D)[0],D[1]):C(D)}catch(w){var f=h.return;throw f!==void 0&&L(f.call(h)),w}}},{"./_an-object":95}],121:[function(j,Q,k){"use strict";var L=j("./_object-create"),h=j("./_property-desc"),C=j("./_set-to-string-tag"),D={};j("./_hide")(D,j("./_wks")("iterator"),function(){return this}),Q.exports=function(u,f,w){u.prototype=L(D,{next:h(1,w)}),C(u,f+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(j,Q,k){"use strict";var L=j("./_library"),h=j("./_export"),C=j("./_redefine"),D=j("./_hide"),u=j("./_iterators"),f=j("./_iter-create"),w=j("./_set-to-string-tag"),d=j("./_object-gpo"),o=j("./_wks")("iterator"),l=!([].keys&&"next"in[].keys()),a="@@iterator",_="keys",m="values",c=function(){return this};Q.exports=function(g,v,x,n,i,t,S){f(x,v,n);var E=function(H){if(!l&&H in b)return b[H];switch(H){case _:return function(){return new x(this,H)};case m:return function(){return new x(this,H)}}return function(){return new x(this,H)}},s=v+" Iterator",P=i==m,O=!1,b=g.prototype,y=b[o]||b[a]||i&&b[i],p=y||E(i),T=i?P?E("entries"):p:void 0,M=v=="Array"&&b.entries||y,N,I,K;if(M&&(K=d(M.call(new g)),K!==Object.prototype&&K.next&&(w(K,s,!0),!L&&typeof K[o]!="function"&&D(K,o,c))),P&&y&&y.name!==m&&(O=!0,p=function(){return y.call(this)}),(!L||S)&&(l||O||!b[o])&&D(b,o,p),u[v]=p,u[s]=c,i)if(N={values:P?p:E(m),keys:t?p:E(_),entries:T},S)for(I in N)I in b||C(b,I,N[I]);else h(h.P+h.F*(l||O),v,N);return N}},{"./_export":107,"./_hide":112,"./_iter-create":121,"./_iterators":125,"./_library":126,"./_object-gpo":138,"./_redefine":148,"./_set-to-string-tag":150,"./_wks":166}],123:[function(j,Q,k){var L=j("./_wks")("iterator"),h=!1;try{var C=[7][L]();C.return=function(){h=!0},Array.from(C,function(){throw 2})}catch(D){}Q.exports=function(D,u){if(!u&&!h)return!1;var f=!1;try{var w=[7],d=w[L]();d.next=function(){return{done:f=!0}},w[L]=function(){return d},D(w)}catch(o){}return f}},{"./_wks":166}],124:[function(j,Q,k){Q.exports=function(L,h){return{value:h,done:!!L}}},{}],125:[function(j,Q,k){Q.exports={}},{}],126:[function(j,Q,k){Q.exports=!0},{}],127:[function(j,Q,k){var L=j("./_uid")("meta"),h=j("./_is-object"),C=j("./_has"),D=j("./_object-dp").f,u=0,f=Object.isExtensible||function(){return!0},w=!j("./_fails")(function(){return f(Object.preventExtensions({}))}),d=function(m){D(m,L,{value:{i:"O"+ ++u,w:{}}})},o=function(m,c){if(!h(m))return typeof m=="symbol"?m:(typeof m=="string"?"S":"P")+m;if(!C(m,L)){if(!f(m))return"F";if(!c)return"E";d(m)}return m[L].i},l=function(m,c){if(!C(m,L)){if(!f(m))return!0;if(!c)return!1;d(m)}return m[L].w},a=function(m){return w&&_.NEED&&f(m)&&!C(m,L)&&d(m),m},_=Q.exports={KEY:L,NEED:!1,fastKey:o,getWeak:l,onFreeze:a}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(j,Q,k){var L=j("./_global"),h=j("./_task").set,C=L.MutationObserver||L.WebKitMutationObserver,D=L.process,u=L.Promise,f=j("./_cof")(D)=="process";Q.exports=function(){var w,d,o,l=function(){var c,g;for(f&&(c=D.domain)&&c.exit();w;){g=w.fn,w=w.next;try{g()}catch(v){throw w?o():d=void 0,v}}d=void 0,c&&c.enter()};if(f)o=function(){D.nextTick(l)};else if(C&&!(L.navigator&&L.navigator.standalone)){var a=!0,_=document.createTextNode("");new C(l).observe(_,{characterData:!0}),o=function(){_.data=a=!a}}else if(u&&u.resolve){var m=u.resolve(void 0);o=function(){m.then(l)}}else o=function(){h.call(L,l)};return function(c){var g={fn:c,next:void 0};d&&(d.next=g),w||(w=g,o()),d=g}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(j,Q,k){"use strict";var L=j("./_a-function");function h(C){var D,u;this.promise=new C(function(f,w){if(D!==void 0||u!==void 0)throw TypeError("Bad Promise constructor");D=f,u=w}),this.resolve=L(D),this.reject=L(u)}Q.exports.f=function(C){return new h(C)}},{"./_a-function":92}],130:[function(j,Q,k){"use strict";var L=j("./_descriptors"),h=j("./_object-keys"),C=j("./_object-gops"),D=j("./_object-pie"),u=j("./_to-object"),f=j("./_iobject"),w=Object.assign;Q.exports=!w||j("./_fails")(function(){var d={},o={},l=Symbol(),a="abcdefghijklmnopqrst";return d[l]=7,a.split("").forEach(function(_){o[_]=_}),w({},d)[l]!=7||Object.keys(w({},o)).join("")!=a})?function(o,l){for(var a=u(o),_=arguments.length,m=1,c=C.f,g=D.f;_>m;)for(var v=f(arguments[m++]),x=c?h(v).concat(c(v)):h(v),n=x.length,i=0,t;n>i;)t=x[i++],(!L||g.call(v,t))&&(a[t]=v[t]);return a}:w},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(j,Q,k){var L=j("./_an-object"),h=j("./_object-dps"),C=j("./_enum-bug-keys"),D=j("./_shared-key")("IE_PROTO"),u=function(){},f="prototype",w=function(){var d=j("./_dom-create")("iframe"),o=C.length,l="<",a=">",_;for(d.style.display="none",j("./_html").appendChild(d),d.src="javascript:",_=d.contentWindow.document,_.open(),_.write(l+"script"+a+"document.F=Object"+l+"/script"+a),_.close(),w=_.F;o--;)delete w[f][C[o]];return w()};Q.exports=Object.create||function(o,l){var a;return o!==null?(u[f]=L(o),a=new u,u[f]=null,a[D]=o):a=w(),l===void 0?a:h(a,l)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(j,Q,k){var L=j("./_an-object"),h=j("./_ie8-dom-define"),C=j("./_to-primitive"),D=Object.defineProperty;k.f=j("./_descriptors")?Object.defineProperty:function(f,w,d){if(L(f),w=C(w,!0),L(d),h)try{return D(f,w,d)}catch(o){}if("get"in d||"set"in d)throw TypeError("Accessors not supported!");return"value"in d&&(f[w]=d.value),f}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(j,Q,k){var L=j("./_object-dp"),h=j("./_an-object"),C=j("./_object-keys");Q.exports=j("./_descriptors")?Object.defineProperties:function(u,f){h(u);for(var w=C(f),d=w.length,o=0,l;d>o;)L.f(u,l=w[o++],f[l]);return u}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(j,Q,k){var L=j("./_object-pie"),h=j("./_property-desc"),C=j("./_to-iobject"),D=j("./_to-primitive"),u=j("./_has"),f=j("./_ie8-dom-define"),w=Object.getOwnPropertyDescriptor;k.f=j("./_descriptors")?w:function(o,l){if(o=C(o),l=D(l,!0),f)try{return w(o,l)}catch(a){}if(u(o,l))return h(!L.f.call(o,l),o[l])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(j,Q,k){var L=j("./_to-iobject"),h=j("./_object-gopn").f,C={}.toString,D=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(f){try{return h(f)}catch(w){return D.slice()}};Q.exports.f=function(w){return D&&C.call(w)=="[object Window]"?u(w):h(L(w))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(j,Q,k){var L=j("./_object-keys-internal"),h=j("./_enum-bug-keys").concat("length","prototype");k.f=Object.getOwnPropertyNames||function(D){return L(D,h)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(j,Q,k){k.f=Object.getOwnPropertySymbols},{}],138:[function(j,Q,k){var L=j("./_has"),h=j("./_to-object"),C=j("./_shared-key")("IE_PROTO"),D=Object.prototype;Q.exports=Object.getPrototypeOf||function(u){return u=h(u),L(u,C)?u[C]:typeof u.constructor=="function"&&u instanceof u.constructor?u.constructor.prototype:u instanceof Object?D:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(j,Q,k){var L=j("./_has"),h=j("./_to-iobject"),C=j("./_array-includes")(!1),D=j("./_shared-key")("IE_PROTO");Q.exports=function(u,f){var w=h(u),d=0,o=[],l;for(l in w)l!=D&&(L(w,l)&&o.push(l));for(;f.length>d;)L(w,l=f[d++])&&(~C(o,l)||o.push(l));return o}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(j,Q,k){var L=j("./_object-keys-internal"),h=j("./_enum-bug-keys");Q.exports=Object.keys||function(D){return L(D,h)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(j,Q,k){k.f={}.propertyIsEnumerable},{}],142:[function(j,Q,k){var L=j("./_export"),h=j("./_core"),C=j("./_fails");Q.exports=function(D,u){var f=(h.Object||{})[D]||Object[D],w={};w[D]=u(f),L(L.S+L.F*C(function(){f(1)}),"Object",w)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(j,Q,k){var L=j("./_descriptors"),h=j("./_object-keys"),C=j("./_to-iobject"),D=j("./_object-pie").f;Q.exports=function(u){return function(f){for(var w=C(f),d=h(w),o=d.length,l=0,a=[],_;o>l;)_=d[l++],(!L||D.call(w,_))&&a.push(u?[_,w[_]]:w[_]);return a}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(j,Q,k){Q.exports=function(L){try{return{e:!1,v:L()}}catch(h){return{e:!0,v:h}}}},{}],145:[function(j,Q,k){var L=j("./_an-object"),h=j("./_is-object"),C=j("./_new-promise-capability");Q.exports=function(D,u){if(L(D),h(u)&&u.constructor===D)return u;var f=C.f(D),w=f.resolve;return w(u),f.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(j,Q,k){Q.exports=function(L,h){return{enumerable:!(L&1),configurable:!(L&2),writable:!(L&4),value:h}}},{}],147:[function(j,Q,k){var L=j("./_hide");Q.exports=function(h,C,D){for(var u in C)D&&h[u]?h[u]=C[u]:L(h,u,C[u]);return h}},{"./_hide":112}],148:[function(j,Q,k){Q.exports=j("./_hide")},{"./_hide":112}],149:[function(j,Q,k){"use strict";var L=j("./_global"),h=j("./_core"),C=j("./_object-dp"),D=j("./_descriptors"),u=j("./_wks")("species");Q.exports=function(f){var w=typeof h[f]=="function"?h[f]:L[f];D&&w&&!w[u]&&C.f(w,u,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(j,Q,k){var L=j("./_object-dp").f,h=j("./_has"),C=j("./_wks")("toStringTag");Q.exports=function(D,u,f){D&&!h(D=f?D:D.prototype,C)&&L(D,C,{configurable:!0,value:u})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(j,Q,k){var L=j("./_shared")("keys"),h=j("./_uid");Q.exports=function(C){return L[C]||(L[C]=h(C))}},{"./_shared":152,"./_uid":162}],152:[function(j,Q,k){var L=j("./_core"),h=j("./_global"),C="__core-js_shared__",D=h[C]||(h[C]={});(Q.exports=function(u,f){return D[u]||(D[u]=f!==void 0?f:{})})("versions",[]).push({version:L.version,mode:j("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(j,Q,k){var L=j("./_an-object"),h=j("./_a-function"),C=j("./_wks")("species");Q.exports=function(D,u){var f=L(D).constructor,w;return f===void 0||(w=L(f)[C])==null?u:h(w)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(j,Q,k){var L=j("./_to-integer"),h=j("./_defined");Q.exports=function(C){return function(D,u){var f=String(h(D)),w=L(u),d=f.length,o,l;return w<0||w>=d?C?"":void 0:(o=f.charCodeAt(w),o<55296||o>56319||w+1===d||(l=f.charCodeAt(w+1))<56320||l>57343?C?f.charAt(w):o:C?f.slice(w,w+2):(o-55296<<10)+(l-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(j,Q,k){var L=j("./_ctx"),h=j("./_invoke"),C=j("./_html"),D=j("./_dom-create"),u=j("./_global"),f=u.process,w=u.setImmediate,d=u.clearImmediate,o=u.MessageChannel,l=u.Dispatch,a=0,_={},m="onreadystatechange",c,g,v,x=function(){var i=+this;if(_.hasOwnProperty(i)){var t=_[i];delete _[i],t()}},n=function(i){x.call(i.data)};(!w||!d)&&(w=function(t){for(var S=[],E=1;arguments.length>E;)S.push(arguments[E++]);return _[++a]=function(){h(typeof t=="function"?t:Function(t),S)},c(a),a},d=function(t){delete _[t]},j("./_cof")(f)=="process"?c=function(i){f.nextTick(L(x,i,1))}:l&&l.now?c=function(i){l.now(L(x,i,1))}:o?(g=new o,v=g.port2,g.port1.onmessage=n,c=L(v.postMessage,v,1)):u.addEventListener&&typeof postMessage=="function"&&!u.importScripts?(c=function(i){u.postMessage(i+"","*")},u.addEventListener("message",n,!1)):m in D("script")?c=function(i){C.appendChild(D("script"))[m]=function(){C.removeChild(this),x.call(i)}}:c=function(i){setTimeout(L(x,i,1),0)}),Q.exports={set:w,clear:d}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(j,Q,k){var L=j("./_to-integer"),h=Math.max,C=Math.min;Q.exports=function(D,u){return D=L(D),D<0?h(D+u,0):C(D,u)}},{"./_to-integer":157}],157:[function(j,Q,k){var L=Math.ceil,h=Math.floor;Q.exports=function(C){return isNaN(C=+C)?0:(C>0?h:L)(C)}},{}],158:[function(j,Q,k){var L=j("./_iobject"),h=j("./_defined");Q.exports=function(C){return L(h(C))}},{"./_defined":102,"./_iobject":116}],159:[function(j,Q,k){var L=j("./_to-integer"),h=Math.min;Q.exports=function(C){return C>0?h(L(C),9007199254740991):0}},{"./_to-integer":157}],160:[function(j,Q,k){var L=j("./_defined");Q.exports=function(h){return Object(L(h))}},{"./_defined":102}],161:[function(j,Q,k){var L=j("./_is-object");Q.exports=function(h,C){if(!L(h))return h;var D,u;if(C&&typeof(D=h.toString)=="function"&&!L(u=D.call(h)))return u;if(typeof(D=h.valueOf)=="function"&&!L(u=D.call(h)))return u;if(!C&&typeof(D=h.toString)=="function"&&!L(u=D.call(h)))return u;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(j,Q,k){var L=0,h=Math.random();Q.exports=function(C){return"Symbol(".concat(C===void 0?"":C,")_",(++L+h).toString(36))}},{}],163:[function(j,Q,k){var L=j("./_global"),h=L.navigator;Q.exports=h&&h.userAgent||""},{"./_global":110}],164:[function(j,Q,k){var L=j("./_global"),h=j("./_core"),C=j("./_library"),D=j("./_wks-ext"),u=j("./_object-dp").f;Q.exports=function(f){var w=h.Symbol||(h.Symbol=C?{}:L.Symbol||{});f.charAt(0)!="_"&&!(f in w)&&u(w,f,{value:D.f(f)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(j,Q,k){k.f=j("./_wks")},{"./_wks":166}],166:[function(j,Q,k){var L=j("./_shared")("wks"),h=j("./_uid"),C=j("./_global").Symbol,D=typeof C=="function",u=Q.exports=function(f){return L[f]||(L[f]=D&&C[f]||(D?C:h)("Symbol."+f))};u.store=L},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(j,Q,k){var L=j("./_classof"),h=j("./_wks")("iterator"),C=j("./_iterators");Q.exports=j("./_core").getIteratorMethod=function(D){if(D!=null)return D[h]||D["@@iterator"]||C[L(D)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(j,Q,k){"use strict";var L=j("./_ctx"),h=j("./_export"),C=j("./_to-object"),D=j("./_iter-call"),u=j("./_is-array-iter"),f=j("./_to-length"),w=j("./_create-property"),d=j("./core.get-iterator-method");h(h.S+h.F*!j("./_iter-detect")(function(o){Array.from(o)}),"Array",{from:function(l){var a=C(l),_=typeof this=="function"?this:Array,m=arguments.length,c=m>1?arguments[1]:void 0,g=c!==void 0,v=0,x=d(a),n,i,t,S;if(g&&(c=L(c,m>2?arguments[2]:void 0,2)),x!=null&&!(_==Array&&u(x)))for(S=x.call(a),i=new _;!(t=S.next()).done;v++)w(i,v,g?D(S,c,[t.value,v],!0):t.value);else for(n=f(a.length),i=new _(n);n>v;v++)w(i,v,g?c(a[v],v):a[v]);return i.length=v,i}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(j,Q,k){"use strict";var L=j("./_add-to-unscopables"),h=j("./_iter-step"),C=j("./_iterators"),D=j("./_to-iobject");Q.exports=j("./_iter-define")(Array,"Array",function(u,f){this._t=D(u),this._i=0,this._k=f},function(){var u=this._t,f=this._k,w=this._i++;return!u||w>=u.length?(this._t=void 0,h(1)):f=="keys"?h(0,w):f=="values"?h(0,u[w]):h(0,[w,u[w]])},"values"),C.Arguments=C.Array,L("keys"),L("values"),L("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(j,Q,k){"use strict";var L=j("./_is-object"),h=j("./_object-gpo"),C=j("./_wks")("hasInstance"),D=Function.prototype;C in D||j("./_object-dp").f(D,C,{value:function(u){if(typeof this!="function"||!L(u))return!1;if(!L(this.prototype))return u instanceof this;for(;u=h(u);)if(this.prototype===u)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(j,Q,k){var L=j("./_export");L(L.S+L.F,"Object",{assign:j("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(j,Q,k){var L=j("./_export");L(L.S,"Object",{create:j("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(j,Q,k){var L=j("./_export");L(L.S+L.F*!j("./_descriptors"),"Object",{defineProperty:j("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(j,Q,k){j("./_object-sap")("getOwnPropertyNames",function(){return j("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(j,Q,k){var L=j("./_to-object"),h=j("./_object-gpo");j("./_object-sap")("getPrototypeOf",function(){return function(D){return h(L(D))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(j,Q,k){var L=j("./_to-object"),h=j("./_object-keys");j("./_object-sap")("keys",function(){return function(D){return h(L(D))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(j,Q,k){arguments[4][71][0].apply(k,arguments)},{dup:71}],178:[function(j,Q,k){"use strict";var L=j("./_library"),h=j("./_global"),C=j("./_ctx"),D=j("./_classof"),u=j("./_export"),f=j("./_is-object"),w=j("./_a-function"),d=j("./_an-instance"),o=j("./_for-of"),l=j("./_species-constructor"),a=j("./_task").set,_=j("./_microtask")(),m=j("./_new-promise-capability"),c=j("./_perform"),g=j("./_user-agent"),v=j("./_promise-resolve"),x="Promise",n=h.TypeError,i=h.process,t=i&&i.versions,S=t&&t.v8||"",E=h[x],s=D(i)=="process",P=function(){},O,b,y,p,T=b=m.f,M=!!function(){try{var B=E.resolve(1),G=(B.constructor={})[j("./_wks")("species")]=function(q){q(P,P)};return(s||typeof PromiseRejectionEvent=="function")&&B.then(P)instanceof G&&S.indexOf("6.6")!==0&&g.indexOf("Chrome/66")===-1}catch(q){}}(),N=function(B){var G;return f(B)&&typeof(G=B.then)=="function"?G:!1},I=function(B,G){if(B._n)return;B._n=!0;var q=B._c;_(function(){for(var ae=B._v,se=B._s==1,we=0,Se=function(de){var xe=se?de.ok:de.fail,he=de.resolve,ne=de.reject,oe=de.domain,te,le,Y;try{xe?(se||(B._h==2&&W(B),B._h=1),xe===!0?te=ae:(oe&&oe.enter(),te=xe(ae),oe&&(oe.exit(),Y=!0)),te===de.promise?ne(n("Promise-chain cycle")):(le=N(te))?le.call(te,he,ne):he(te)):ne(ae)}catch(Z){oe&&!Y&&oe.exit(),ne(Z)}};q.length>we;)Se(q[we++]);B._c=[],B._n=!1,G&&!B._h&&K(B)})},K=function(B){a.call(h,function(){var G=B._v,q=H(B),ae,se,we;if(q&&(ae=c(function(){s?i.emit("unhandledRejection",G,B):(se=h.onunhandledrejection)?se({promise:B,reason:G}):(we=h.console)&&we.error&&we.error("Unhandled promise rejection",G)}),B._h=s||H(B)?2:1),B._a=void 0,q&&ae.e)throw ae.v})},H=function(B){return B._h!==1&&(B._a||B._c).length===0},W=function(B){a.call(h,function(){var G;s?i.emit("rejectionHandled",B):(G=h.onrejectionhandled)&&G({promise:B,reason:B._v})})},z=function(B){var G=this;if(G._d)return;G._d=!0,G=G._w||G,G._v=B,G._s=2,G._a||(G._a=G._c.slice()),I(G,!0)},U=function(B){var G=this,q;if(G._d)return;G._d=!0,G=G._w||G;try{if(G===B)throw n("Promise can't be resolved itself");(q=N(B))?_(function(){var ae={_w:G,_d:!1};try{q.call(B,C(U,ae,1),C(z,ae,1))}catch(se){z.call(ae,se)}}):(G._v=B,G._s=1,I(G,!1))}catch(ae){z.call({_w:G,_d:!1},ae)}};M||(E=function(G){d(this,E,x,"_h"),w(G),O.call(this);try{G(C(U,this,1),C(z,this,1))}catch(q){z.call(this,q)}},O=function(G){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=j("./_redefine-all")(E.prototype,{then:function(G,q){var ae=T(l(this,E));return ae.ok=typeof G=="function"?G:!0,ae.fail=typeof q=="function"&&q,ae.domain=s?i.domain:void 0,this._c.push(ae),this._a&&this._a.push(ae),this._s&&I(this,!1),ae.promise},catch:function(B){return this.then(void 0,B)}}),y=function(){var B=new O;this.promise=B,this.resolve=C(U,B,1),this.reject=C(z,B,1)},m.f=T=function(B){return B===E||B===p?new y(B):b(B)}),u(u.G+u.W+u.F*!M,{Promise:E}),j("./_set-to-string-tag")(E,x),j("./_set-species")(x),p=j("./_core")[x],u(u.S+u.F*!M,x,{reject:function(G){var q=T(this),ae=q.reject;return ae(G),q.promise}}),u(u.S+u.F*(L||!M),x,{resolve:function(G){return v(L&&this===p?E:this,G)}}),u(u.S+u.F*!(M&&j("./_iter-detect")(function(B){E.all(B).catch(P)})),x,{all:function(G){var q=this,ae=T(q),se=ae.resolve,we=ae.reject,Se=c(function(){var de=[],xe=0,he=1;o(G,!1,function(ne){var oe=xe++,te=!1;de.push(void 0),he++,q.resolve(ne).then(function(le){if(te)return;te=!0,de[oe]=le,--he||se(de)},we)}),--he||se(de)});return Se.e&&we(Se.v),ae.promise},race:function(G){var q=this,ae=T(q),se=ae.reject,we=c(function(){o(G,!1,function(Se){q.resolve(Se).then(ae.resolve,se)})});return we.e&&se(we.v),ae.promise}})},{"./_a-function":92,"./_an-instance":94,"./_classof":97,"./_core":99,"./_ctx":101,"./_export":107,"./_for-of":109,"./_global":110,"./_is-object":119,"./_iter-detect":123,"./_library":126,"./_microtask":128,"./_new-promise-capability":129,"./_perform":144,"./_promise-resolve":145,"./_redefine-all":147,"./_set-species":149,"./_set-to-string-tag":150,"./_species-constructor":153,"./_task":155,"./_user-agent":163,"./_wks":166}],179:[function(j,Q,k){var L=j("./_export"),h=j("./_to-absolute-index"),C=String.fromCharCode,D=String.fromCodePoint;L(L.S+L.F*(!!D&&D.length!=1),"String",{fromCodePoint:function(f){for(var w=[],d=arguments.length,o=0,l;d>o;){if(l=+arguments[o++],h(l,1114111)!==l)throw RangeError(l+" is not a valid code point");w.push(l<65536?C(l):C(((l-=65536)>>10)+55296,l%1024+56320))}return w.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(j,Q,k){"use strict";var L=j("./_string-at")(!0);j("./_iter-define")(String,"String",function(h){this._t=String(h),this._i=0},function(){var h=this._t,C=this._i,D;return C>=h.length?{value:void 0,done:!0}:(D=L(h,C),this._i+=D.length,{value:D,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(j,Q,k){"use strict";var L=j("./_global"),h=j("./_has"),C=j("./_descriptors"),D=j("./_export"),u=j("./_redefine"),f=j("./_meta").KEY,w=j("./_fails"),d=j("./_shared"),o=j("./_set-to-string-tag"),l=j("./_uid"),a=j("./_wks"),_=j("./_wks-ext"),m=j("./_wks-define"),c=j("./_enum-keys"),g=j("./_is-array"),v=j("./_an-object"),x=j("./_is-object"),n=j("./_to-object"),i=j("./_to-iobject"),t=j("./_to-primitive"),S=j("./_property-desc"),E=j("./_object-create"),s=j("./_object-gopn-ext"),P=j("./_object-gopd"),O=j("./_object-gops"),b=j("./_object-dp"),y=j("./_object-keys"),p=P.f,T=b.f,M=s.f,N=L.Symbol,I=L.JSON,K=I&&I.stringify,H="prototype",W=a("_hidden"),z=a("toPrimitive"),U={}.propertyIsEnumerable,B=d("symbol-registry"),G=d("symbols"),q=d("op-symbols"),ae=Object[H],se=typeof N=="function"&&!!O.f,we=L.QObject,Se=!we||!we[H]||!we[H].findChild,de=C&&w(function(){return E(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a!=7})?function(ue,_e,He){var $e=p(ae,_e);$e&&delete ae[_e],T(ue,_e,He),$e&&ue!==ae&&T(ae,_e,$e)}:T,xe=function(ue){var _e=G[ue]=E(N[H]);return _e._k=ue,_e},he=se&&typeof N.iterator=="symbol"?function(ue){return typeof ue=="symbol"}:function(ue){return ue instanceof N},ne=function(_e,He,$e){return _e===ae&&ne(q,He,$e),v(_e),He=t(He,!0),v($e),h(G,He)?($e.enumerable?(h(_e,W)&&_e[W][He]&&(_e[W][He]=!1),$e=E($e,{enumerable:S(0,!1)})):(h(_e,W)||T(_e,W,S(1,{})),_e[W][He]=!0),de(_e,He,$e)):T(_e,He,$e)},oe=function(_e,He){v(_e);for(var $e=c(He=i(He)),Ye=0,tt=$e.length,nt;tt>Ye;)ne(_e,nt=$e[Ye++],He[nt]);return _e},te=function(_e,He){return He===void 0?E(_e):oe(E(_e),He)},le=function(_e){var He=U.call(this,_e=t(_e,!0));return this===ae&&h(G,_e)&&!h(q,_e)?!1:He||!h(this,_e)||!h(G,_e)||h(this,W)&&this[W][_e]?He:!0},Y=function(_e,He){if(_e=i(_e),He=t(He,!0),_e===ae&&h(G,He)&&!h(q,He))return;var $e=p(_e,He);return $e&&h(G,He)&&!(h(_e,W)&&_e[W][He])&&($e.enumerable=!0),$e},Z=function(_e){for(var He=M(i(_e)),$e=[],Ye=0,tt;He.length>Ye;)!h(G,tt=He[Ye++])&&tt!=W&&tt!=f&&$e.push(tt);return $e},ge=function(_e){for(var He=_e===ae,$e=M(He?q:i(_e)),Ye=[],tt=0,nt;$e.length>tt;)h(G,nt=$e[tt++])&&(He?h(ae,nt):!0)&&Ye.push(G[nt]);return Ye};se||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var _e=l(arguments.length>0?arguments[0]:void 0),He=function($e){this===ae&&He.call(q,$e),h(this,W)&&h(this[W],_e)&&(this[W][_e]=!1),de(this,_e,S(1,$e))};return C&&Se&&de(ae,_e,{configurable:!0,set:He}),xe(_e)},u(N[H],"toString",function(){return this._k}),P.f=Y,b.f=ne,j("./_object-gopn").f=s.f=Z,j("./_object-pie").f=le,O.f=ge,C&&!j("./_library")&&u(ae,"propertyIsEnumerable",le,!0),_.f=function(ue){return xe(a(ue))}),D(D.G+D.W+D.F*!se,{Symbol:N});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),$=0;ee.length>$;)a(ee[$++]);for(var X=y(a.store),J=0;X.length>J;)m(X[J++]);D(D.S+D.F*!se,"Symbol",{for:function(ue){return h(B,ue+="")?B[ue]:B[ue]=N(ue)},keyFor:function(_e){if(!he(_e))throw TypeError(_e+" is not a symbol!");for(var He in B)if(B[He]===_e)return He},useSetter:function(){Se=!0},useSimple:function(){Se=!1}}),D(D.S+D.F*!se,"Object",{create:te,defineProperty:ne,defineProperties:oe,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z,getOwnPropertySymbols:ge});var me=w(function(){O.f(1)});D(D.S+D.F*me,"Object",{getOwnPropertySymbols:function(_e){return O.f(n(_e))}}),I&&D(D.S+D.F*(!se||w(function(){var ue=N();return K([ue])!="[null]"||K({a:ue})!="{}"||K(Object(ue))!="{}"})),"JSON",{stringify:function(_e){for(var He=[_e],$e=1,Ye,tt;arguments.length>$e;)He.push(arguments[$e++]);return tt=Ye=He[1],!x(Ye)&&_e===void 0||he(_e)?void 0:(g(Ye)||(Ye=function(nt,it){if(typeof tt=="function"&&(it=tt.call(this,nt,it)),!he(it))return it}),He[1]=Ye,K.apply(I,He))}}),N[H][z]||j("./_hide")(N[H],z,N[H].valueOf),o(N,"Symbol"),o(Math,"Math",!0),o(L.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(j,Q,k){var L=j("./_export"),h=j("./_object-to-array")(!0);L(L.S,"Object",{entries:function(D){return h(D)}})},{"./_export":107,"./_object-to-array":143}],183:[function(j,Q,k){"use strict";var L=j("./_export"),h=j("./_core"),C=j("./_global"),D=j("./_species-constructor"),u=j("./_promise-resolve");L(L.P+L.R,"Promise",{finally:function(f){var w=D(this,h.Promise||C.Promise),d=typeof f=="function";return this.then(d?function(o){return u(w,f()).then(function(){return o})}:f,d?function(o){return u(w,f()).then(function(){throw o})}:f)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(j,Q,k){"use strict";var L=j("./_export"),h=j("./_new-promise-capability"),C=j("./_perform");L(L.S,"Promise",{try:function(D){var u=h.f(this),f=C(D);return(f.e?u.reject:u.resolve)(f.v),u.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(j,Q,k){j("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(j,Q,k){j("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(j,Q,k){j("./es6.array.iterator");for(var L=j("./_global"),h=j("./_hide"),C=j("./_iterators"),D=j("./_wks")("toStringTag"),u="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(","),f=0;f<u.length;f++){var w=u[f],d=L[w],o=d&&d.prototype;o&&!o[D]&&h(o,D,w),C[w]=C.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(j,Q,k){var L=j("./_export"),h=j("./_task");L(L.G+L.B,{setImmediate:h.set,clearImmediate:h.clear})},{"./_export":107,"./_task":155}],189:[function(j,Q,k){(function(L){"use strict";var h=j("babel-runtime/helpers/typeof"),C=D(h);function D(t){return t&&t.__esModule?t:{default:t}}function u(t){return Array.isArray?Array.isArray(t):i(t)==="[object Array]"}k.isArray=u;function f(t){return typeof t=="boolean"}k.isBoolean=f;function w(t){return t===null}k.isNull=w;function d(t){return t==null}k.isNullOrUndefined=d;function o(t){return typeof t=="number"}k.isNumber=o;function l(t){return typeof t=="string"}k.isString=l;function a(t){return(typeof t=="undefined"?"undefined":(0,C.default)(t))==="symbol"}k.isSymbol=a;function _(t){return t===void 0}k.isUndefined=_;function m(t){return i(t)==="[object RegExp]"}k.isRegExp=m;function c(t){return(typeof t=="undefined"?"undefined":(0,C.default)(t))==="object"&&t!==null}k.isObject=c;function g(t){return i(t)==="[object Date]"}k.isDate=g;function v(t){return i(t)==="[object Error]"||t instanceof Error}k.isError=v;function x(t){return typeof t=="function"}k.isFunction=x;function n(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||(typeof t=="undefined"?"undefined":(0,C.default)(t))==="symbol"||typeof t=="undefined"}k.isPrimitive=n,k.isBuffer=L.isBuffer;function i(t){return Object.prototype.toString.call(t)}}).call(this,{isBuffer:j("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(j,Q,k){"use strict";var L=j("babel-runtime/helpers/typeof"),h=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(D){"use strict";var u=function(){var l=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,a=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,_=/[^-+\dA-Z]/g;return function(m,c,g,v){if(arguments.length===1&&o(m)==="string"&&!/\d/.test(m)&&(c=m,m=void 0),m=m||new Date,m instanceof Date||(m=new Date(m)),isNaN(m))throw TypeError("Invalid date");c=String(u.masks[c]||c||u.masks.default);var x=c.slice(0,4);(x==="UTC:"||x==="GMT:")&&(c=c.slice(4),g=!0,x==="GMT:"&&(v=!0));var n=g?"getUTC":"get",i=m[n+"Date"](),t=m[n+"Day"](),S=m[n+"Month"](),E=m[n+"FullYear"](),s=m[n+"Hours"](),P=m[n+"Minutes"](),O=m[n+"Seconds"](),b=m[n+"Milliseconds"](),y=g?0:m.getTimezoneOffset(),p=w(m),T=d(m),M={d:i,dd:f(i),ddd:u.i18n.dayNames[t],dddd:u.i18n.dayNames[t+7],m:S+1,mm:f(S+1),mmm:u.i18n.monthNames[S],mmmm:u.i18n.monthNames[S+12],yy:String(E).slice(2),yyyy:E,h:s%12||12,hh:f(s%12||12),H:s,HH:f(s),M:P,MM:f(P),s:O,ss:f(O),l:f(b,3),L:f(Math.round(b/10)),t:s<12?"a":"p",tt:s<12?"am":"pm",T:s<12?"A":"P",TT:s<12?"AM":"PM",Z:v?"GMT":g?"UTC":(String(m).match(a)||[""]).pop().replace(_,""),o:(y>0?"-":"+")+f(Math.floor(Math.abs(y)/60)*100+Math.abs(y)%60,4),S:["th","st","nd","rd"][i%10>3?0:(i%100-i%10!=10)*i%10],W:p,N:T};return c.replace(l,function(N){return N in M?M[N]:N.slice(1,N.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"]};function f(l,a){for(l=String(l),a=a||2;l.length<a;)l="0"+l;return l}function w(l){var a=new Date(l.getFullYear(),l.getMonth(),l.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);var _=new Date(a.getFullYear(),0,4);_.setDate(_.getDate()-(_.getDay()+6)%7+3);var m=a.getTimezoneOffset()-_.getTimezoneOffset();a.setHours(a.getHours()-m);var c=(a-_)/(864e5*7);return 1+Math.floor(c)}function d(l){var a=l.getDay();return a===0&&(a=7),a}function o(l){return l===null?"null":l===void 0?"undefined":(typeof l=="undefined"?"undefined":(0,h.default)(l))!=="object"?typeof l=="undefined"?"undefined":(0,h.default)(l):Array.isArray(l)?"array":{}.toString.call(l).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return u}):(typeof k=="undefined"?"undefined":(0,h.default)(k))==="object"?Q.exports=u:D.dateFormat=u})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(j,Q,k){/*!
|
|
|
* escape-html
|
|
|
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
|
* Copyright(c) 2015 Andreas Lubbe
|
|
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var L=/["'&<>]/;Q.exports=h;function h(C){var D=""+C,u=L.exec(D);if(!u)return D;var f,w="",d=0,o=0;for(d=u.index;d<D.length;d++){switch(D.charCodeAt(d)){case 34:f=""";break;case 38:f="&";break;case 39:f="'";break;case 60:f="<";break;case 62:f=">";break;default:continue}o!==d&&(w+=D.substring(o,d)),o=d+1,w+=f}return o!==d?w+D.substring(o,d):w}},{}],192:[function(j,Q,k){function L(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}Q.exports=L,L.EventEmitter=L,L.prototype._events=void 0,L.prototype._maxListeners=void 0,L.defaultMaxListeners=10,L.prototype.setMaxListeners=function(f){if(!C(f)||f<0||isNaN(f))throw TypeError("n must be a positive number");return this._maxListeners=f,this},L.prototype.emit=function(f){var w,d,o,l,a,_;if(this._events||(this._events={}),f==="error"&&(!this._events.error||D(this._events.error)&&!this._events.error.length)){if(w=arguments[1],w instanceof Error)throw w;var m=new Error('Uncaught, unspecified "error" event. ('+w+")");throw m.context=w,m}if(d=this._events[f],u(d))return!1;if(h(d))switch(arguments.length){case 1:d.call(this);break;case 2:d.call(this,arguments[1]);break;case 3:d.call(this,arguments[1],arguments[2]);break;default:l=Array.prototype.slice.call(arguments,1),d.apply(this,l)}else if(D(d))for(l=Array.prototype.slice.call(arguments,1),_=d.slice(),o=_.length,a=0;a<o;a++)_[a].apply(this,l);return!0},L.prototype.addListener=function(f,w){var d;if(!h(w))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",f,h(w.listener)?w.listener:w),this._events[f]?D(this._events[f])?this._events[f].push(w):this._events[f]=[this._events[f],w]:this._events[f]=w,D(this._events[f])&&!this._events[f].warned&&(u(this._maxListeners)?d=L.defaultMaxListeners:d=this._maxListeners,d&&d>0&&this._events[f].length>d&&(this._events[f].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[f].length),typeof console.trace=="function"&&console.trace())),this},L.prototype.on=L.prototype.addListener,L.prototype.once=function(f,w){if(!h(w))throw TypeError("listener must be a function");var d=!1;function o(){this.removeListener(f,o),d||(d=!0,w.apply(this,arguments))}return o.listener=w,this.on(f,o),this},L.prototype.removeListener=function(f,w){var d,o,l,a;if(!h(w))throw TypeError("listener must be a function");if(!this._events||!this._events[f])return this;if(d=this._events[f],l=d.length,o=-1,d===w||h(d.listener)&&d.listener===w)delete this._events[f],this._events.removeListener&&this.emit("removeListener",f,w);else if(D(d)){for(a=l;a-- >0;)if(d[a]===w||d[a].listener&&d[a].listener===w){o=a;break}if(o<0)return this;d.length===1?(d.length=0,delete this._events[f]):d.splice(o,1),this._events.removeListener&&this.emit("removeListener",f,w)}return this},L.prototype.removeAllListeners=function(f){var w,d;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[f]&&delete this._events[f],this;if(arguments.length===0){for(w in this._events){if(w==="removeListener")continue;this.removeAllListeners(w)}return this.removeAllListeners("removeListener"),this._events={},this}if(d=this._events[f],h(d))this.removeListener(f,d);else if(d)for(;d.length;)this.removeListener(f,d[d.length-1]);return delete this._events[f],this},L.prototype.listeners=function(f){var w;return!this._events||!this._events[f]?w=[]:h(this._events[f])?w=[this._events[f]]:w=this._events[f].slice(),w},L.prototype.listenerCount=function(f){if(this._events){var w=this._events[f];if(h(w))return 1;if(w)return w.length}return 0},L.listenerCount=function(f,w){return f.listenerCount(w)};function h(f){return typeof f=="function"}function C(f){return typeof f=="number"}function D(f){return typeof f=="object"&&f!==null}function u(f){return f===void 0}},{}],193:[function(j,Q,k){var L=j("http"),h=Q.exports;for(var C in L)L.hasOwnProperty(C)&&(h[C]=L[C]);h.request=function(D,u){return D||(D={}),D.scheme="https",D.protocol="https:",L.request.call(this,D,u)}},{http:231}],194:[function(j,Q,k){/*!
|
|
|
* humanize-ms - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var L=j("util"),h=j("ms");Q.exports=function(C){if(typeof C=="number")return C;var D=h(C);if(D===void 0){var u=new Error(L.format("humanize-ms(%j) result undefined",C));console.warn(u.stack)}return D}},{ms:204,util:243}],195:[function(j,Q,k){k.read=function(L,h,C,D,u){var f,w,d=u*8-D-1,o=(1<<d)-1,l=o>>1,a=-7,_=C?u-1:0,m=C?-1:1,c=L[h+_];for(_+=m,f=c&(1<<-a)-1,c>>=-a,a+=d;a>0;f=f*256+L[h+_],_+=m,a-=8);for(w=f&(1<<-a)-1,f>>=-a,a+=D;a>0;w=w*256+L[h+_],_+=m,a-=8);if(f===0)f=1-l;else{if(f===o)return w?NaN:(c?-1:1)*Infinity;w=w+Math.pow(2,D),f=f-l}return(c?-1:1)*w*Math.pow(2,f-D)},k.write=function(L,h,C,D,u,f){var w,d,o,l=f*8-u-1,a=(1<<l)-1,_=a>>1,m=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=D?0:f-1,g=D?1:-1,v=h<0||h===0&&1/h<0?1:0;for(h=Math.abs(h),isNaN(h)||h===Infinity?(d=isNaN(h)?1:0,w=a):(w=Math.floor(Math.log(h)/Math.LN2),h*(o=Math.pow(2,-w))<1&&(w--,o*=2),w+_>=1?h+=m/o:h+=m*Math.pow(2,1-_),h*o>=2&&(w++,o/=2),w+_>=a?(d=0,w=a):w+_>=1?(d=(h*o-1)*Math.pow(2,u),w=w+_):(d=h*Math.pow(2,_-1)*Math.pow(2,u),w=0));u>=8;L[C+c]=d&255,c+=g,d/=256,u-=8);for(w=w<<u|d,l+=u;l>0;L[C+c]=w&255,c+=g,w/=256,l-=8);L[C+c-g]|=v*128}},{}],196:[function(j,Q,k){typeof Object.create=="function"?Q.exports=function(h,C){C&&(h.super_=C,h.prototype=Object.create(C.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}))}:Q.exports=function(h,C){if(C){h.super_=C;var D=function(){};D.prototype=C.prototype,h.prototype=new D,h.prototype.constructor=h}}},{}],197:[function(j,Q,k){/*!
|
|
|
* Determine if an object is a Buffer
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
|
* @license MIT
|
|
|
*/Q.exports=function(C){return C!=null&&(L(C)||h(C)||!!C._isBuffer)};function L(C){return!!C.constructor&&typeof C.constructor.isBuffer=="function"&&C.constructor.isBuffer(C)}function h(C){return typeof C.readFloatLE=="function"&&typeof C.slice=="function"&&L(C.slice(0,0))}},{}],198:[function(j,Q,k){var L={}.toString;Q.exports=Array.isArray||function(h){return L.call(h)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(j,Q){typeof exports=="object"&&typeof module!="undefined"?module.exports=Q(j):typeof define=="function"&&define.amd?define(Q):Q(j)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:this,function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.2",buffer;if(typeof module!="undefined"&&module.exports)try{buffer=eval("require('buffer').Buffer")}catch(j){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(j){for(var Q={},k=0,L=j.length;k<L;k++)Q[j.charAt(k)]=k;return Q}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(j){if(j.length<2){var Q=j.charCodeAt(0);return Q<128?j:Q<2048?fromCharCode(192|Q>>>6)+fromCharCode(128|Q&63):fromCharCode(224|Q>>>12&15)+fromCharCode(128|Q>>>6&63)+fromCharCode(128|Q&63)}else{var Q=65536+(j.charCodeAt(0)-55296)*1024+(j.charCodeAt(1)-56320);return fromCharCode(240|Q>>>18&7)+fromCharCode(128|Q>>>12&63)+fromCharCode(128|Q>>>6&63)+fromCharCode(128|Q&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(j){return j.replace(re_utob,cb_utob)},cb_encode=function(j){var Q=[0,2,1][j.length%3],k=j.charCodeAt(0)<<16|(j.length>1?j.charCodeAt(1):0)<<8|(j.length>2?j.charCodeAt(2):0),L=[b64chars.charAt(k>>>18),b64chars.charAt(k>>>12&63),Q>=2?"=":b64chars.charAt(k>>>6&63),Q>=1?"=":b64chars.charAt(k&63)];return L.join("")},btoa=global.btoa?function(j){return global.btoa(j)}:function(j){return j.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(j){var Q=Object.prototype.toString.call(j)==="[object Uint8Array]";return Q?j.toString("base64"):btoa(utob(String(j)))},encode=function(j,Q){return Q?_encode(String(j)).replace(/[+\/]/g,function(k){return k=="+"?"-":"_"}).replace(/=/g,""):_encode(j)},encodeURI=function(j){return encode(j,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(j){switch(j.length){case 4:var Q=(7&j.charCodeAt(0))<<18|(63&j.charCodeAt(1))<<12|(63&j.charCodeAt(2))<<6|63&j.charCodeAt(3),k=Q-65536;return fromCharCode((k>>>10)+55296)+fromCharCode((k&1023)+56320);case 3:return fromCharCode((15&j.charCodeAt(0))<<12|(63&j.charCodeAt(1))<<6|63&j.charCodeAt(2));default:return fromCharCode((31&j.charCodeAt(0))<<6|63&j.charCodeAt(1))}},btou=function(j){return j.replace(re_btou,cb_btou)},cb_decode=function(j){var Q=j.length,k=Q%4,L=(Q>0?b64tab[j.charAt(0)]<<18:0)|(Q>1?b64tab[j.charAt(1)]<<12:0)|(Q>2?b64tab[j.charAt(2)]<<6:0)|(Q>3?b64tab[j.charAt(3)]:0),h=[fromCharCode(L>>>16),fromCharCode(L>>>8&255),fromCharCode(L&255)];return h.length-=[0,0,2,1][k],h.join("")},_atob=global.atob?function(j){return global.atob(j)}:function(j){return j.replace(/\S{1,4}/g,cb_decode)},atob=function(j){return _atob(String(j).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(j){return(j.constructor===buffer.constructor?j:buffer.from(j,"base64")).toString()}:function(j){return(j.constructor===buffer.constructor?j:new buffer(j,"base64")).toString()}:function(j){return btou(_atob(j))},decode=function(j){return _decode(String(j).replace(/[-_]/g,function(Q){return Q=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var j=global.Base64;return global.Base64=_Base64,j};if(global.Base64={VERSION:version,atob,btoa,fromBase64:decode,toBase64:encode,utob,encode,encodeURI,btou,decode,noConflict,__buffer__:buffer},typeof Object.defineProperty=="function"){var noEnum=function(j){return{value:j,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(j){return encode(this,j)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),typeof module!="undefined"&&module.exports?module.exports.Base64=global.Base64:typeof define=="function"&&define.amd&&define([],function(){return global.Base64}),{Base64:global.Base64}})}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],200:[function(j,Q,k){/*!
|
|
|
* merge-descriptors
|
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
|
* MIT Licensed
|
|
|
*/"use strict";Q.exports=h;var L=Object.prototype.hasOwnProperty;function h(C,D,u){if(!C)throw new TypeError("argument dest is required");if(!D)throw new TypeError("argument src is required");return u===void 0&&(u=!0),Object.getOwnPropertyNames(D).forEach(function(w){if(!u&&L.call(C,w))return;var d=Object.getOwnPropertyDescriptor(D,w);Object.defineProperty(C,w,d)}),C}},{}],201:[function(j,Q,k){"use strict";function L(){this._types=Object.create(null),this._extensions=Object.create(null);for(var h=0;h<arguments.length;h++)this.define(arguments[h]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}L.prototype.define=function(h,C){for(var D in h){var u=h[D].map(function(d){return d.toLowerCase()});D=D.toLowerCase();for(var f=0;f<u.length;f++){var w=u[f];if(w[0]=="*")continue;if(!C&&w in this._types)throw new Error('Attempt to change mapping for "'+w+'" extension from "'+this._types[w]+'" to "'+D+'". Pass `force=true` to allow this, otherwise remove "'+w+'" from the list of extensions for "'+D+'".');this._types[w]=D}if(C||!this._extensions[D]){var w=u[0];this._extensions[D]=w[0]!="*"?w:w.substr(1)}}},L.prototype.getType=function(h){h=String(h);var C=h.replace(/^.*[/\\]/,"").toLowerCase(),D=C.replace(/^.*\./,"").toLowerCase(),u=C.length<h.length,f=D.length<C.length-1;return(f||!u)&&this._types[D]||null},L.prototype.getExtension=function(h){return h=/^\s*([^;\s]*)/.test(h)&&RegExp.$1,h&&this._extensions[h.toLowerCase()]||null},Q.exports=L},{}],202:[function(j,Q,k){"use strict";var L=j("./Mime");Q.exports=new L(j("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(j,Q,k){Q.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"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","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"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/lgr+xml":["lgr"],"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/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"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/p2p-overlay+xml":["relo"],"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/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"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/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"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/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"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/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"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":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*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":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"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":["*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"]}},{}],204:[function(j,Q,k){var L=1e3,h=L*60,C=h*60,D=C*24,u=D*7,f=D*365.25;Q.exports=function(a,_){_=_||{};var m=typeof a;if(m==="string"&&a.length>0)return w(a);if(m==="number"&&isFinite(a))return _.long?o(a):d(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function w(a){if(a=String(a),a.length>100)return;var _=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!_)return;var m=parseFloat(_[1]),c=(_[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return m*f;case"weeks":case"week":case"w":return m*u;case"days":case"day":case"d":return m*D;case"hours":case"hour":case"hrs":case"hr":case"h":return m*C;case"minutes":case"minute":case"mins":case"min":case"m":return m*h;case"seconds":case"second":case"secs":case"sec":case"s":return m*L;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return m;default:return}}function d(a){var _=Math.abs(a);return _>=D?Math.round(a/D)+"d":_>=C?Math.round(a/C)+"h":_>=h?Math.round(a/h)+"m":_>=L?Math.round(a/L)+"s":a+"ms"}function o(a){var _=Math.abs(a);return _>=D?l(a,_,D,"day"):_>=C?l(a,_,C,"hour"):_>=h?l(a,_,h,"minute"):_>=L?l(a,_,L,"second"):a+" ms"}function l(a,_,m,c){var g=_>=m*1.5;return Math.round(a/m)+" "+c+(g?"s":"")}},{}],205:[function(j,Q,k){(function(L){function h(f,w){for(var d=0,o=f.length-1;o>=0;o--){var l=f[o];l==="."?f.splice(o,1):l===".."?(f.splice(o,1),d++):d&&(f.splice(o,1),d--)}if(w)for(;d--;d)f.unshift("..");return f}k.resolve=function(){for(var f="",w=!1,d=arguments.length-1;d>=-1&&!w;d--){var o=d>=0?arguments[d]:L.cwd();if(typeof o!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!o)continue;f=o+"/"+f,w=o.charAt(0)==="/"}return f=h(D(f.split("/"),function(l){return!!l}),!w).join("/"),(w?"/":"")+f||"."},k.normalize=function(f){var w=k.isAbsolute(f),d=u(f,-1)==="/";return f=h(D(f.split("/"),function(o){return!!o}),!w).join("/"),!f&&!w&&(f="."),f&&d&&(f+="/"),(w?"/":"")+f},k.isAbsolute=function(f){return f.charAt(0)==="/"},k.join=function(){var f=Array.prototype.slice.call(arguments,0);return k.normalize(D(f,function(w,d){if(typeof w!="string")throw new TypeError("Arguments to path.join must be strings");return w}).join("/"))},k.relative=function(f,w){f=k.resolve(f).substr(1),w=k.resolve(w).substr(1);function d(g){for(var v=0;v<g.length&&!(g[v]!=="");v++);for(var x=g.length-1;x>=0&&!(g[x]!=="");x--);return v>x?[]:g.slice(v,x-v+1)}for(var o=d(f.split("/")),l=d(w.split("/")),a=Math.min(o.length,l.length),_=a,m=0;m<a;m++)if(o[m]!==l[m]){_=m;break}for(var c=[],m=_;m<o.length;m++)c.push("..");return c=c.concat(l.slice(_)),c.join("/")},k.sep="/",k.delimiter=":",k.dirname=function(f){if(typeof f!="string"&&(f=f+""),f.length===0)return".";for(var w=f.charCodeAt(0),d=w===47,o=-1,l=!0,a=f.length-1;a>=1;--a)if(w=f.charCodeAt(a),w===47){if(!l){o=a;break}}else l=!1;return o===-1?d?"/":".":d&&o===1?"/":f.slice(0,o)};function C(f){typeof f!="string"&&(f=f+"");var w=0,d=-1,o=!0,l;for(l=f.length-1;l>=0;--l)if(f.charCodeAt(l)===47){if(!o){w=l+1;break}}else d===-1&&(o=!1,d=l+1);return d===-1?"":f.slice(w,d)}k.basename=function(f,w){var d=C(f);return w&&d.substr(-1*w.length)===w&&(d=d.substr(0,d.length-w.length)),d},k.extname=function(f){typeof f!="string"&&(f=f+"");for(var w=-1,d=0,o=-1,l=!0,a=0,_=f.length-1;_>=0;--_){var m=f.charCodeAt(_);if(m===47){if(!l){d=_+1;break}continue}o===-1&&(l=!1,o=_+1),m===46?w===-1?w=_:a!==1&&(a=1):w!==-1&&(a=-1)}return w===-1||o===-1||a===0||a===1&&w===o-1&&w===d+1?"":f.slice(w,o)};function D(f,w){if(f.filter)return f.filter(w);for(var d=[],o=0;o<f.length;o++)w(f[o],o,f)&&d.push(f[o]);return d}var u="ab".substr(-1)==="b"?function(f,w,d){return f.substr(w,d)}:function(f,w,d){return w<0&&(w=f.length+w),f.substr(w,d)}}).call(this,j("_process"))},{_process:208}],206:[function(j,Q,k){(function(L){/*!
|
|
|
* Platform.js <https://mths.be/platform>
|
|
|
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
|
|
|
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
|
|
* Available under MIT license <https://mths.be/mit>
|
|
|
*/(function(){"use strict";var h={function:!0,object:!0},C=h[typeof window]&&window||this,D=C,u=h[typeof k]&&k,f=h[typeof Q]&&Q&&!Q.nodeType&&Q,w=u&&f&&typeof L=="object"&&L;w&&(w.global===w||w.window===w||w.self===w)&&(C=w);var d=Math.pow(2,53)-1,o=/\bOpera/,l=this,a=Object.prototype,_=a.hasOwnProperty,m=a.toString;function c(b){return b=String(b),b.charAt(0).toUpperCase()+b.slice(1)}function g(b,y,p){var T={"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 y&&p&&/^Win/i.test(b)&&!/^Windows Phone /i.test(b)&&(T=T[/[\d.]+$/.exec(b)])&&(b="Windows "+T),b=String(b),y&&p&&(b=b.replace(RegExp(y,"i"),p)),b=x(b.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]),b}function v(b,y){var p=-1,T=b?b.length:0;if(typeof T=="number"&&T>-1&&T<=d)for(;++p<T;)y(b[p],p,b);else n(b,y)}function x(b){return b=s(b),/^(?:webOS|i(?:OS|P))/.test(b)?b:c(b)}function n(b,y){for(var p in b)_.call(b,p)&&y(b[p],p,b)}function i(b){return b==null?c(b):m.call(b).slice(8,-1)}function t(b,y){var p=b!=null?typeof b[y]:"number";return!/^(?:boolean|number|string|undefined)$/.test(p)&&(p=="object"?!!b[y]:!0)}function S(b){return String(b).replace(/([ -])(?!$)/g,"$1?")}function E(b,y){var p=null;return v(b,function(T,M){p=y(p,T,M,b)}),p}function s(b){return String(b).replace(/^ +| +$/g,"")}function P(b){var y=C,p=b&&typeof b=="object"&&i(b)!="String";p&&(y=b,b=null);var T=y.navigator||{},M=T.userAgent||"";b||(b=M);var N=p||l==D,I=p?!!T.likeChrome:/\bChrome\b/.test(b)&&!/internal|\n/i.test(m.toString()),K="Object",H=p?K:"ScriptBridgingProxyObject",W=p?K:"Environment",z=p&&y.java?"JavaPackage":i(y.java),U=p?K:"RuntimeObject",B=/\bJava/.test(z)&&y.java,G=B&&i(y.environment)==W,q=B?"a":"\u03B1",ae=B?"b":"\u03B2",se=y.document||{},we=y.operamini||y.opera,Se=o.test(Se=p&&we?we["[[Class]]"]:i(we))?Se:we=null,de,xe=b,he=[],ne=null,oe=b==M,te=oe&&we&&typeof we.version=="function"&&we.version(),le,Y=X([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Z=me(["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"]),ge=_e([{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=J({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}}),$=ue(["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 "]);function X(tt){return E(tt,function(nt,it){return nt||RegExp("\\b"+(it.pattern||S(it))+"\\b","i").exec(b)&&(it.label||it)})}function J(tt){return E(tt,function(nt,it,Me){return nt||(it[ge]||it[/^[a-z]+(?: +[a-z]+\b)*/i.exec(ge)]||RegExp("\\b"+S(Me)+"(?:\\b|\\w*\\d)","i").exec(b))&&Me})}function me(tt){return E(tt,function(nt,it){return nt||RegExp("\\b"+(it.pattern||S(it))+"\\b","i").exec(b)&&(it.label||it)})}function ue(tt){return E(tt,function(nt,it){var Me=it.pattern||S(it);return!nt&&(nt=RegExp("\\b"+Me+"(?:/[\\d.]+|[ \\w.]*)","i").exec(b))&&(nt=g(nt,Me,it.label||it)),nt})}function _e(tt){return E(tt,function(nt,it){var Me=it.pattern||S(it);return!nt&&(nt=RegExp("\\b"+Me+" *\\d+[.\\w_]*","i").exec(b)||RegExp("\\b"+Me+" *\\w+-[\\w]*","i").exec(b)||RegExp("\\b"+Me+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(b))&&((nt=String(it.label&&!RegExp(Me,"i").test(it.label)?it.label:nt).split("/"))[1]&&!/[\d.]+/.test(nt[0])&&(nt[0]+=" "+nt[1]),it=it.label||it,nt=x(nt[0].replace(RegExp(Me,"i"),it).replace(RegExp("; *(?:"+it+"[_-])?","i")," ").replace(RegExp("("+it+")[-_.]?(\\w)","i"),"$1 $2"))),nt})}function He(tt){return E(tt,function(nt,it){return nt||(RegExp(it+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(b)||0)[1]||null})}function $e(){return this.description||""}if(Y&&(Y=[Y]),ee&&!ge&&(ge=_e([ee])),(de=/\bGoogle TV\b/.exec(ge))&&(ge=de[0]),/\bSimulator\b/i.test(b)&&(ge=(ge?ge+" ":"")+"Simulator"),Z=="Opera Mini"&&/\bOPiOS\b/.test(b)&&he.push("running in Turbo/Uncompressed mode"),Z=="IE"&&/\blike iPhone OS\b/.test(b)?(de=P(b.replace(/like iPhone OS/,"")),ee=de.manufacturer,ge=de.product):/^iP/.test(ge)?(Z||(Z="Safari"),$="iOS"+((de=/ OS ([\d_]+)/i.exec(b))?" "+de[1].replace(/_/g,"."):"")):Z=="Konqueror"&&!/buntu/i.test($)?$="Kubuntu":ee&&ee!="Google"&&(/Chrome/.test(Z)&&!/\bMobile Safari\b/i.test(b)||/\bVita\b/.test(ge))||/\bAndroid\b/.test($)&&/^Chrome/.test(Z)&&/\bVersion\//i.test(b)?(Z="Android Browser",$=/\bAndroid\b/.test($)?$:"Android"):Z=="Silk"?(/\bMobi/i.test(b)||($="Android",he.unshift("desktop mode")),/Accelerated *= *true/i.test(b)&&he.unshift("accelerated")):Z=="PaleMoon"&&(de=/\bFirefox\/([\d.]+)\b/.exec(b))?he.push("identifying as Firefox "+de[1]):Z=="Firefox"&&(de=/\b(Mobile|Tablet|TV)\b/i.exec(b))?($||($="Firefox OS"),ge||(ge=de[1])):!Z||(de=!/\bMinefield\b/i.test(b)&&/\b(?:Firefox|Safari)\b/.exec(Z))?(Z&&!ge&&/[\/,]|^[^(]+?\)/.test(b.slice(b.indexOf(de+"/")+8))&&(Z=null),(de=ge||ee||$)&&(ge||ee||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test($))&&(Z=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test($)?$:de)+" Browser")):Z=="Electron"&&(de=(/\bChrome\/([\d.]+)\b/.exec(b)||0)[1])&&he.push("Chromium "+de),te||(te=He(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",S(Z),"(?:Firefox|Minefield|NetFront)"])),(de=Y=="iCab"&&parseFloat(te)>3&&"WebKit"||/\bOpera\b/.test(Z)&&(/\bOPR\b/.test(b)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(b)&&!/^(?:Trident|EdgeHTML)$/.test(Y)&&"WebKit"||!Y&&/\bMSIE\b/i.test(b)&&($=="Mac OS"?"Tasman":"Trident")||Y=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Z)&&"NetFront")&&(Y=[de]),Z=="IE"&&(de=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(b)||0)[1])?(Z+=" Mobile",$="Windows Phone "+(/\+$/.test(de)?de:de+".x"),he.unshift("desktop mode")):/\bWPDesktop\b/i.test(b)?(Z="IE Mobile",$="Windows Phone 8.x",he.unshift("desktop mode"),te||(te=(/\brv:([\d.]+)/.exec(b)||0)[1])):Z!="IE"&&Y=="Trident"&&(de=/\brv:([\d.]+)/.exec(b))&&(Z&&he.push("identifying as "+Z+(te?" "+te:"")),Z="IE",te=de[1]),oe){if(t(y,"global"))if(B&&(de=B.lang.System,xe=de.getProperty("os.arch"),$=$||de.getProperty("os.name")+" "+de.getProperty("os.version")),G){try{te=y.require("ringo/engine").version.join("."),Z="RingoJS"}catch(tt){(de=y.system)&&de.global.system==y.system&&(Z="Narwhal",$||($=de[0].os||null))}Z||(Z="Rhino")}else typeof y.process=="object"&&!y.process.browser&&(de=y.process)&&(typeof de.versions=="object"&&(typeof de.versions.electron=="string"?(he.push("Node "+de.versions.node),Z="Electron",te=de.versions.electron):typeof de.versions.nw=="string"&&(he.push("Chromium "+te,"Node "+de.versions.node),Z="NW.js",te=de.versions.nw)),Z||(Z="Node.js",xe=de.arch,$=de.platform,te=/[\d.]+/.exec(de.version),te=te?te[0]:null));else i(de=y.runtime)==H?(Z="Adobe AIR",$=de.flash.system.Capabilities.os):i(de=y.phantom)==U?(Z="PhantomJS",te=(de=de.version||null)&&de.major+"."+de.minor+"."+de.patch):typeof se.documentMode=="number"&&(de=/\bTrident\/(\d+)/i.exec(b))?(te=[te,se.documentMode],(de=+de[1]+4)!=te[1]&&(he.push("IE "+te[1]+" mode"),Y&&(Y[1]=""),te[1]=de),te=Z=="IE"?String(te[1].toFixed(1)):te[0]):typeof se.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Z)&&(he.push("masking as "+Z+" "+te),Z="IE",te="11.0",Y=["Trident"],$="Windows");$=$&&x($)}if(te&&(de=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(te)||/(?:alpha|beta)(?: ?\d)?/i.exec(b+";"+(oe&&T.appMinorVersion))||/\bMinefield\b/i.test(b)&&"a")&&(ne=/b/i.test(de)?"beta":"alpha",te=te.replace(RegExp(de+"\\+?$"),"")+(ne=="beta"?ae:q)+(/\d+\+?/.exec(de)||"")),Z=="Fennec"||Z=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test($))Z="Firefox Mobile";else if(Z=="Maxthon"&&te)te=te.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(ge))ge=="Xbox 360"&&($=null),ge=="Xbox 360"&&/\bIEMobile\b/.test(b)&&he.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Z)||Z&&!ge&&!/Browser|Mobi/.test(Z))&&($=="Windows CE"||/Mobi/i.test(b)))Z+=" Mobile";else if(Z=="IE"&&oe)try{y.external===null&&he.unshift("platform preview")}catch(tt){he.unshift("embedded")}else(/\bBlackBerry\b/.test(ge)||/\bBB10\b/.test(b))&&(de=(RegExp(ge.replace(/ +/g," *")+"/([.\\d]+)","i").exec(b)||0)[1]||te)?(de=[de,/BB10/.test(b)],$=(de[1]?(ge=null,ee="BlackBerry"):"Device Software")+" "+de[0],te=null):this!=n&&ge!="Wii"&&(oe&&we||/Opera/.test(Z)&&/\b(?:MSIE|Firefox)\b/i.test(b)||Z=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test($)||Z=="IE"&&($&&!/^Win/.test($)&&te>5.5||/\bWindows XP\b/.test($)&&te>8||te==8&&!/\bTrident\b/.test(b)))&&!o.test(de=P.call(n,b.replace(o,"")+";"))&&de.name&&(de="ing as "+de.name+((de=de.version)?" "+de:""),o.test(Z)?(/\bIE\b/.test(de)&&$=="Mac OS"&&($=null),de="identify"+de):(de="mask"+de,Se?Z=x(Se.replace(/([a-z])([A-Z])/g,"$1 $2")):Z="Opera",/\bIE\b/.test(de)&&($=null),oe||(te=null)),Y=["Presto"],he.push(de));(de=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(b)||0)[1])&&(de=[parseFloat(de.replace(/\.(\d)$/,".0$1")),de],Z=="Safari"&&de[1].slice(-1)=="+"?(Z="WebKit Nightly",ne="alpha",te=de[1].slice(0,-1)):(te==de[1]||te==(de[2]=(/\bSafari\/([\d.]+\+?)/i.exec(b)||0)[1]))&&(te=null),de[1]=(/\bChrome\/([\d.]+)/i.exec(b)||0)[1],de[0]==537.36&&de[2]==537.36&&parseFloat(de[1])>=28&&Y=="WebKit"&&(Y=["Blink"]),!oe||!I&&!de[1]?(Y&&(Y[1]="like Safari"),de=(de=de[0],de<400?1:de<500?2:de<526?3:de<533?4:de<534?"4+":de<535?5:de<537?6:de<538?7:de<601?8:"8")):(Y&&(Y[1]="like Chrome"),de=de[1]||(de=de[0],de<530?1:de<532?2:de<532.05?3:de<533?4:de<534.03?5:de<534.07?6:de<534.1?7:de<534.13?8:de<534.16?9:de<534.24?10:de<534.3?11:de<535.01?12:de<535.02?"13+":de<535.07?15:de<535.11?16:de<535.19?17:de<536.05?18:de<536.1?19:de<537.01?20:de<537.11?"21+":de<537.13?23:de<537.18?24:de<537.24?25:de<537.36?26:Y!="Blink"?"27":"28")),Y&&(Y[1]+=" "+(de+=typeof de=="number"?".x":/[.+]/.test(de)?"":"+")),Z=="Safari"&&(!te||parseInt(te)>45)&&(te=de)),Z=="Opera"&&(de=/\bzbov|zvav$/.exec($))?(Z+=" ",he.unshift("desktop mode"),de=="zvav"?(Z+="Mini",te=null):Z+="Mobile",$=$.replace(RegExp(" *"+de+"$"),"")):Z=="Safari"&&/\bChrome\b/.exec(Y&&Y[1])&&(he.unshift("desktop mode"),Z="Chrome Mobile",te=null,/\bOS X\b/.test($)?(ee="Apple",$="iOS 4.3+"):$=null),te&&te.indexOf(de=/[\d.]+$/.exec($))==0&&b.indexOf("/"+de+"-")>-1&&($=s($.replace(de,""))),Y&&!/\b(?:Avant|Nook)\b/.test(Z)&&(/Browser|Lunascape|Maxthon/.test(Z)||Z!="Safari"&&/^iOS/.test($)&&/\bSafari\b/.test(Y[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Z)&&Y[1])&&((de=Y[Y.length-1])&&he.push(de)),he.length&&(he=["("+he.join("; ")+")"]),ee&&ge&&ge.indexOf(ee)<0&&he.push("on "+ee),ge&&he.push((/^on /.test(he[he.length-1])?"":"on ")+ge),$&&(de=/ ([\d.+]+)$/.exec($),le=de&&$.charAt($.length-de[0].length-1)=="/",$={architecture:32,family:de&&!le?$.replace(de[0],""):$,version:de?de[1]:null,toString:function(){var tt=this.version;return this.family+(tt&&!le?" "+tt:"")+(this.architecture==64?" 64-bit":"")}}),(de=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(xe))&&!/\bi686\b/i.test(xe)?($&&($.architecture=64,$.family=$.family.replace(RegExp(" *"+de),"")),Z&&(/\bWOW64\b/i.test(b)||oe&&/\w(?:86|32)$/.test(T.cpuClass||T.platform)&&!/\bWin64; x64\b/i.test(b))&&he.unshift("32-bit")):$&&/^OS X/.test($.family)&&Z=="Chrome"&&parseFloat(te)>=39&&($.architecture=64),b||(b=null);var Ye={};return Ye.description=b,Ye.layout=Y&&Y[0],Ye.manufacturer=ee,Ye.name=Z,Ye.prerelease=ne,Ye.product=ge,Ye.ua=b,Ye.version=Z&&te,Ye.os=$||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ye.parse=P,Ye.toString=$e,Ye.version&&he.unshift(te),Ye.name&&he.unshift(Z),$&&Z&&!($==String($).split(" ")[0]&&($==Z.split(" ")[0]||ge))&&he.push(ge?"("+$+")":"on "+$),he.length&&(Ye.description=he.join(" ")),Ye}var O=P();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(C.platform=O,define(function(){return O})):u&&f?n(O,function(b,y){u[y]=b}):C.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(j,Q,k){(function(L){"use strict";typeof L=="undefined"||!L.version||L.version.indexOf("v0.")===0||L.version.indexOf("v1.")===0&&L.version.indexOf("v1.8.")!==0?Q.exports={nextTick:h}:Q.exports=L;function h(C,D,u,f){if(typeof C!="function")throw new TypeError('"callback" argument must be a function');var w=arguments.length,d,o;switch(w){case 0:case 1:return L.nextTick(C);case 2:return L.nextTick(function(){C.call(null,D)});case 3:return L.nextTick(function(){C.call(null,D,u)});case 4:return L.nextTick(function(){C.call(null,D,u,f)});default:for(d=new Array(w-1),o=0;o<d.length;)d[o++]=arguments[o];return L.nextTick(function(){C.apply(null,d)})}}}).call(this,j("_process"))},{_process:208}],208:[function(j,Q,k){var L=Q.exports={},h,C;function D(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?h=setTimeout:h=D}catch(v){h=D}try{typeof clearTimeout=="function"?C=clearTimeout:C=u}catch(v){C=u}})();function f(v){if(h===setTimeout)return setTimeout(v,0);if((h===D||!h)&&setTimeout)return h=setTimeout,setTimeout(v,0);try{return h(v,0)}catch(x){try{return h.call(null,v,0)}catch(n){return h.call(this,v,0)}}}function w(v){if(C===clearTimeout)return clearTimeout(v);if((C===u||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(v);try{return C(v)}catch(x){try{return C.call(null,v)}catch(n){return C.call(this,v)}}}var d=[],o=!1,l,a=-1;function _(){if(!o||!l)return;o=!1,l.length?d=l.concat(d):a=-1,d.length&&m()}function m(){if(o)return;var v=f(_);o=!0;for(var x=d.length;x;){for(l=d,d=[];++a<x;)l&&l[a].run();a=-1,x=d.length}l=null,o=!1,w(v)}L.nextTick=function(v){var x=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)x[n-1]=arguments[n];d.push(new c(v,x)),d.length===1&&!o&&f(m)};function c(v,x){this.fun=v,this.array=x}c.prototype.run=function(){this.fun.apply(null,this.array)},L.title="browser",L.browser=!0,L.env={},L.argv=[],L.version="",L.versions={};function g(){}L.on=g,L.addListener=g,L.once=g,L.off=g,L.removeListener=g,L.removeAllListeners=g,L.emit=g,L.prependListener=g,L.prependOnceListener=g,L.listeners=function(v){return[]},L.binding=function(v){throw new Error("process.binding is not supported")},L.cwd=function(){return"/"},L.chdir=function(v){throw new Error("process.chdir is not supported")},L.umask=function(){return 0}},{}],209:[function(j,Q,k){(function(L){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(h){var C=typeof k=="object"&&k&&!k.nodeType&&k,D=typeof Q=="object"&&Q&&!Q.nodeType&&Q,u=typeof L=="object"&&L;(u.global===u||u.window===u||u.self===u)&&(h=u);var f,w=2147483647,d=36,o=1,l=26,a=38,_=700,m=72,c=128,g="-",v=/^xn--/,x=/[^\x20-\x7E]/,n=/[\x2E\u3002\uFF0E\uFF61]/g,i={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},t=d-o,S=Math.floor,E=String.fromCharCode,s;function P(z){throw new RangeError(i[z])}function O(z,U){for(var B=z.length,G=[];B--;)G[B]=U(z[B]);return G}function b(z,U){var B=z.split("@"),G="";B.length>1&&(G=B[0]+"@",z=B[1]),z=z.replace(n,".");var q=z.split("."),ae=O(q,U).join(".");return G+ae}function y(z){for(var U=[],B=0,G=z.length,q,ae;B<G;)q=z.charCodeAt(B++),q>=55296&&q<=56319&&B<G?(ae=z.charCodeAt(B++),(ae&64512)==56320?U.push(((q&1023)<<10)+(ae&1023)+65536):(U.push(q),B--)):U.push(q);return U}function p(z){return O(z,function(U){var B="";return U>65535&&(U-=65536,B+=E(U>>>10&1023|55296),U=56320|U&1023),B+=E(U),B}).join("")}function T(z){return z-48<10?z-22:z-65<26?z-65:z-97<26?z-97:d}function M(z,U){return z+22+75*(z<26)-((U!=0)<<5)}function N(z,U,B){var G=0;for(z=B?S(z/_):z>>1,z+=S(z/U);z>t*l>>1;G+=d)z=S(z/t);return S(G+(t+1)*z/(z+a))}function I(z){var U=[],B=z.length,G,q=0,ae=c,se=m,we,Se,de,xe,he,ne,oe,te,le;for(we=z.lastIndexOf(g),we<0&&(we=0),Se=0;Se<we;++Se)z.charCodeAt(Se)>=128&&P("not-basic"),U.push(z.charCodeAt(Se));for(de=we>0?we+1:0;de<B;){for(xe=q,he=1,ne=d;!(de>=B&&P("invalid-input"),oe=T(z.charCodeAt(de++)),(oe>=d||oe>S((w-q)/he))&&P("overflow"),q+=oe*he,te=ne<=se?o:ne>=se+l?l:ne-se,oe<te);ne+=d)le=d-te,he>S(w/le)&&P("overflow"),he*=le;G=U.length+1,se=N(q-xe,G,xe==0),S(q/G)>w-ae&&P("overflow"),ae+=S(q/G),q%=G,U.splice(q++,0,ae)}return p(U)}function K(z){var U,B,G,q,ae,se,we,Se,de,xe,he,ne=[],oe,te,le,Y;for(z=y(z),oe=z.length,U=c,B=0,ae=m,se=0;se<oe;++se)he=z[se],he<128&&ne.push(E(he));for(G=q=ne.length,q&&ne.push(g);G<oe;){for(we=w,se=0;se<oe;++se)he=z[se],he>=U&&he<we&&(we=he);for(te=G+1,we-U>S((w-B)/te)&&P("overflow"),B+=(we-U)*te,U=we,se=0;se<oe;++se)if(he=z[se],he<U&&++B>w&&P("overflow"),he==U){for(Se=B,de=d;!(xe=de<=ae?o:de>=ae+l?l:de-ae,Se<xe);de+=d)Y=Se-xe,le=d-xe,ne.push(E(M(xe+Y%le,0))),Se=S(Y/le);ne.push(E(M(Se,0))),ae=N(B,te,G==q),B=0,++G}++B,++U}return ne.join("")}function H(z){return b(z,function(U){return v.test(U)?I(U.slice(4).toLowerCase()):U})}function W(z){return b(z,function(U){return x.test(U)?"xn--"+K(U):U})}if(f={version:"1.4.1",ucs2:{decode:y,encode:p},decode:I,encode:K,toASCII:W,toUnicode:H},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return f});else if(C&&D)if(Q.exports==C)D.exports=f;else for(s in f)f.hasOwnProperty(s)&&(C[s]=f[s]);else h.punycode=f})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(j,Q,k){"use strict";function L(C,D){return Object.prototype.hasOwnProperty.call(C,D)}Q.exports=function(C,D,u,f){D=D||"&",u=u||"=";var w={};if(typeof C!="string"||C.length===0)return w;var d=/\+/g;C=C.split(D);var o=1e3;f&&typeof f.maxKeys=="number"&&(o=f.maxKeys);var l=C.length;o>0&&l>o&&(l=o);for(var a=0;a<l;++a){var _=C[a].replace(d,"%20"),m=_.indexOf(u),c,g,v,x;m>=0?(c=_.substr(0,m),g=_.substr(m+1)):(c=_,g=""),v=decodeURIComponent(c),x=decodeURIComponent(g),L(w,v)?h(w[v])?w[v].push(x):w[v]=[w[v],x]:w[v]=x}return w};var h=Array.isArray||function(C){return Object.prototype.toString.call(C)==="[object Array]"}},{}],211:[function(j,Q,k){"use strict";var L=function(u){switch(typeof u){case"string":return u;case"boolean":return u?"true":"false";case"number":return isFinite(u)?u:"";default:return""}};Q.exports=function(u,f,w,d){return f=f||"&",w=w||"=",u===null&&(u=void 0),typeof u=="object"?C(D(u),function(o){var l=encodeURIComponent(L(o))+w;return h(u[o])?C(u[o],function(a){return l+encodeURIComponent(L(a))}).join(f):l+encodeURIComponent(L(u[o]))}).join(f):d?encodeURIComponent(L(d))+w+encodeURIComponent(L(u)):""};var h=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"};function C(u,f){if(u.map)return u.map(f);for(var w=[],d=0;d<u.length;d++)w.push(f(u[d],d));return w}var D=Object.keys||function(u){var f=[];for(var w in u)Object.prototype.hasOwnProperty.call(u,w)&&f.push(w);return f}},{}],212:[function(j,Q,k){"use strict";k.decode=k.parse=j("./decode"),k.encode=k.stringify=j("./encode")},{"./decode":210,"./encode":211}],213:[function(j,Q,k){Q.exports=j("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/create"),h=u(L),C=j("babel-runtime/core-js/object/keys"),D=u(C);function u(x){return x&&x.__esModule?x:{default:x}}var f=j("process-nextick-args"),w=D.default||function(x){var n=[];for(var i in x)n.push(i);return n};Q.exports=c;var d=(0,h.default)(j("core-util-is"));d.inherits=j("inherits");var o=j("./_stream_readable"),l=j("./_stream_writable");d.inherits(c,o);for(var a=w(l.prototype),_=0;_<a.length;_++){var m=a[_];c.prototype[m]||(c.prototype[m]=l.prototype[m])}function c(x){if(!(this instanceof c))return new c(x);o.call(this,x),l.call(this,x),x&&x.readable===!1&&(this.readable=!1),x&&x.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,x&&x.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",g)}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function g(){if(this.allowHalfOpen||this._writableState.ended)return;f.nextTick(v,this)}function v(x){x.end()}Object.defineProperty(c.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(n){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=n,this._writableState.destroyed=n}}),c.prototype._destroy=function(x,n){this.push(null),this.end(),f.nextTick(n,x)}},{"./_stream_readable":216,"./_stream_writable":218,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60,"core-util-is":189,inherits:196,"process-nextick-args":207}],215:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/create"),h=C(L);function C(w){return w&&w.__esModule?w:{default:w}}Q.exports=f;var D=j("./_stream_transform"),u=(0,h.default)(j("core-util-is"));u.inherits=j("inherits"),u.inherits(f,D);function f(w){if(!(this instanceof f))return new f(w);D.call(this,w)}f.prototype._transform=function(w,d,o){o(null,w)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(j,Q,k){(function(L,h){"use strict";var C=j("babel-runtime/core-js/object/get-prototype-of"),D=w(C),u=j("babel-runtime/core-js/object/create"),f=w(u);function w(Y){return Y&&Y.__esModule?Y:{default:Y}}var d=j("process-nextick-args");Q.exports=y;var o=j("isarray"),l;y.ReadableState=b;var a=j("events").EventEmitter,_=function(Z,ge){return Z.listeners(ge).length},m=j("./internal/streams/stream"),c=j("safe-buffer").Buffer,g=h.Uint8Array||function(){};function v(Y){return c.from(Y)}function x(Y){return c.isBuffer(Y)||Y instanceof g}var n=(0,f.default)(j("core-util-is"));n.inherits=j("inherits");var i=j("util"),t=void 0;i&&i.debuglog?t=i.debuglog("stream"):t=function(){};var S=j("./internal/streams/BufferList"),E=j("./internal/streams/destroy"),s;n.inherits(y,m);var P=["error","close","destroy","pause","resume"];function O(Y,Z,ge){if(typeof Y.prependListener=="function")return Y.prependListener(Z,ge);!Y._events||!Y._events[Z]?Y.on(Z,ge):o(Y._events[Z])?Y._events[Z].unshift(ge):Y._events[Z]=[ge,Y._events[Z]]}function b(Y,Z){l=l||j("./_stream_duplex"),Y=Y||{};var ge=Z instanceof l;this.objectMode=!!Y.objectMode,ge&&(this.objectMode=this.objectMode||!!Y.readableObjectMode);var ee=Y.highWaterMark,$=Y.readableHighWaterMark,X=this.objectMode?16:16*1024;ee||ee===0?this.highWaterMark=ee:ge&&($||$===0)?this.highWaterMark=$:this.highWaterMark=X,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new S,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=Y.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Y.encoding&&(s||(s=j("string_decoder/").StringDecoder),this.decoder=new s(Y.encoding),this.encoding=Y.encoding)}function y(Y){if(l=l||j("./_stream_duplex"),!(this instanceof y))return new y(Y);this._readableState=new b(Y,this),this.readable=!0,Y&&(typeof Y.read=="function"&&(this._read=Y.read),typeof Y.destroy=="function"&&(this._destroy=Y.destroy)),m.call(this)}Object.defineProperty(y.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Z){if(!this._readableState)return;this._readableState.destroyed=Z}}),y.prototype.destroy=E.destroy,y.prototype._undestroy=E.undestroy,y.prototype._destroy=function(Y,Z){this.push(null),Z(Y)},y.prototype.push=function(Y,Z){var ge=this._readableState,ee;return ge.objectMode?ee=!0:typeof Y=="string"&&(Z=Z||ge.defaultEncoding,Z!==ge.encoding&&(Y=c.from(Y,Z),Z=""),ee=!0),p(this,Y,Z,!1,ee)},y.prototype.unshift=function(Y){return p(this,Y,null,!0,!1)};function p(Y,Z,ge,ee,$){var X=Y._readableState;if(Z===null)X.reading=!1,W(Y,X);else{var J;$||(J=M(X,Z)),J?Y.emit("error",J):X.objectMode||Z&&Z.length>0?(typeof Z!="string"&&!X.objectMode&&(0,D.default)(Z)!==c.prototype&&(Z=v(Z)),ee?X.endEmitted?Y.emit("error",new Error("stream.unshift() after end event")):T(Y,X,Z,!0):X.ended?Y.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!ge?(Z=X.decoder.write(Z),X.objectMode||Z.length!==0?T(Y,X,Z,!1):B(Y,X)):T(Y,X,Z,!1))):ee||(X.reading=!1)}return N(X)}function T(Y,Z,ge,ee){Z.flowing&&Z.length===0&&!Z.sync?(Y.emit("data",ge),Y.read(0)):(Z.length+=Z.objectMode?1:ge.length,ee?Z.buffer.unshift(ge):Z.buffer.push(ge),Z.needReadable&&z(Y)),B(Y,Z)}function M(Y,Z){var ge;return!x(Z)&&typeof Z!="string"&&Z!==void 0&&!Y.objectMode&&(ge=new TypeError("Invalid non-string/buffer chunk")),ge}function N(Y){return!Y.ended&&(Y.needReadable||Y.length<Y.highWaterMark||Y.length===0)}y.prototype.isPaused=function(){return this._readableState.flowing===!1},y.prototype.setEncoding=function(Y){return s||(s=j("string_decoder/").StringDecoder),this._readableState.decoder=new s(Y),this._readableState.encoding=Y,this};var I=8388608;function K(Y){return Y>=I?Y=I:(Y--,Y|=Y>>>1,Y|=Y>>>2,Y|=Y>>>4,Y|=Y>>>8,Y|=Y>>>16,Y++),Y}function H(Y,Z){return Y<=0||Z.length===0&&Z.ended?0:Z.objectMode?1:Y!==Y?Z.flowing&&Z.length?Z.buffer.head.data.length:Z.length:(Y>Z.highWaterMark&&(Z.highWaterMark=K(Y)),Y<=Z.length?Y:Z.ended?Z.length:(Z.needReadable=!0,0))}y.prototype.read=function(Y){t("read",Y),Y=parseInt(Y,10);var Z=this._readableState,ge=Y;if(Y!==0&&(Z.emittedReadable=!1),Y===0&&Z.needReadable&&(Z.length>=Z.highWaterMark||Z.ended))return t("read: emitReadable",Z.length,Z.ended),Z.length===0&&Z.ended?oe(this):z(this),null;if(Y=H(Y,Z),Y===0&&Z.ended)return Z.length===0&&oe(this),null;var ee=Z.needReadable;t("need readable",ee),(Z.length===0||Z.length-Y<Z.highWaterMark)&&(ee=!0,t("length less than watermark",ee)),Z.ended||Z.reading?(ee=!1,t("reading or ended",ee)):ee&&(t("do read"),Z.reading=!0,Z.sync=!0,Z.length===0&&(Z.needReadable=!0),this._read(Z.highWaterMark),Z.sync=!1,Z.reading||(Y=H(ge,Z)));var $;return Y>0?$=de(Y,Z):$=null,$===null?(Z.needReadable=!0,Y=0):Z.length-=Y,Z.length===0&&(Z.ended||(Z.needReadable=!0),ge!==Y&&Z.ended&&oe(this)),$!==null&&this.emit("data",$),$};function W(Y,Z){if(Z.ended)return;if(Z.decoder){var ge=Z.decoder.end();ge&&ge.length&&(Z.buffer.push(ge),Z.length+=Z.objectMode?1:ge.length)}Z.ended=!0,z(Y)}function z(Y){var Z=Y._readableState;Z.needReadable=!1,Z.emittedReadable||(t("emitReadable",Z.flowing),Z.emittedReadable=!0,Z.sync?d.nextTick(U,Y):U(Y))}function U(Y){t("emit readable"),Y.emit("readable"),Se(Y)}function B(Y,Z){Z.readingMore||(Z.readingMore=!0,d.nextTick(G,Y,Z))}function G(Y,Z){for(var ge=Z.length;!Z.reading&&!Z.flowing&&!Z.ended&&Z.length<Z.highWaterMark&&!(t("maybeReadMore read 0"),Y.read(0),ge===Z.length);)ge=Z.length;Z.readingMore=!1}y.prototype._read=function(Y){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(Y,Z){var ge=this,ee=this._readableState;switch(ee.pipesCount){case 0:ee.pipes=Y;break;case 1:ee.pipes=[ee.pipes,Y];break;default:ee.pipes.push(Y);break}ee.pipesCount+=1,t("pipe count=%d opts=%j",ee.pipesCount,Z);var $=(!Z||Z.end!==!1)&&Y!==L.stdout&&Y!==L.stderr,X=$?me:Me;ee.endEmitted?d.nextTick(X):ge.once("end",X),Y.on("unpipe",J);function J(Ce,Je){t("onunpipe"),Ce===ge&&(Je&&Je.hasUnpiped===!1&&(Je.hasUnpiped=!0,He()))}function me(){t("onend"),Y.end()}var ue=q(ge);Y.on("drain",ue);var _e=!1;function He(){t("cleanup"),Y.removeListener("close",nt),Y.removeListener("finish",it),Y.removeListener("drain",ue),Y.removeListener("error",tt),Y.removeListener("unpipe",J),ge.removeListener("end",me),ge.removeListener("end",Me),ge.removeListener("data",Ye),_e=!0,ee.awaitDrain&&(!Y._writableState||Y._writableState.needDrain)&&ue()}var $e=!1;ge.on("data",Ye);function Ye(Ce){t("ondata"),$e=!1;var Je=Y.write(Ce);Je===!1&&!$e&&((ee.pipesCount===1&&ee.pipes===Y||ee.pipesCount>1&&le(ee.pipes,Y)!==-1)&&!_e&&(t("false write response, pause",ge._readableState.awaitDrain),ge._readableState.awaitDrain++,$e=!0),ge.pause())}function tt(Ce){t("onerror",Ce),Me(),Y.removeListener("error",tt),_(Y,"error")===0&&Y.emit("error",Ce)}O(Y,"error",tt);function nt(){Y.removeListener("finish",it),Me()}Y.once("close",nt);function it(){t("onfinish"),Y.removeListener("close",nt),Me()}Y.once("finish",it);function Me(){t("unpipe"),ge.unpipe(Y)}return Y.emit("pipe",ge),ee.flowing||(t("pipe resume"),ge.resume()),Y};function q(Y){return function(){var Z=Y._readableState;t("pipeOnDrain",Z.awaitDrain),Z.awaitDrain&&Z.awaitDrain--,Z.awaitDrain===0&&_(Y,"data")&&(Z.flowing=!0,Se(Y))}}y.prototype.unpipe=function(Y){var Z=this._readableState,ge={hasUnpiped:!1};if(Z.pipesCount===0)return this;if(Z.pipesCount===1)return Y&&Y!==Z.pipes?this:(Y||(Y=Z.pipes),Z.pipes=null,Z.pipesCount=0,Z.flowing=!1,Y&&Y.emit("unpipe",this,ge),this);if(!Y){var ee=Z.pipes,$=Z.pipesCount;Z.pipes=null,Z.pipesCount=0,Z.flowing=!1;for(var X=0;X<$;X++)ee[X].emit("unpipe",this,ge);return this}var J=le(Z.pipes,Y);return J===-1?this:(Z.pipes.splice(J,1),Z.pipesCount-=1,Z.pipesCount===1&&(Z.pipes=Z.pipes[0]),Y.emit("unpipe",this,ge),this)},y.prototype.on=function(Y,Z){var ge=m.prototype.on.call(this,Y,Z);if(Y==="data")this._readableState.flowing!==!1&&this.resume();else if(Y==="readable"){var ee=this._readableState;!ee.endEmitted&&!ee.readableListening&&(ee.readableListening=ee.needReadable=!0,ee.emittedReadable=!1,ee.reading?ee.length&&z(this):d.nextTick(ae,this))}return ge},y.prototype.addListener=y.prototype.on;function ae(Y){t("readable nexttick read 0"),Y.read(0)}y.prototype.resume=function(){var Y=this._readableState;return Y.flowing||(t("resume"),Y.flowing=!0,se(this,Y)),this};function se(Y,Z){Z.resumeScheduled||(Z.resumeScheduled=!0,d.nextTick(we,Y,Z))}function we(Y,Z){Z.reading||(t("resume read 0"),Y.read(0)),Z.resumeScheduled=!1,Z.awaitDrain=0,Y.emit("resume"),Se(Y),Z.flowing&&!Z.reading&&Y.read(0)}y.prototype.pause=function(){return t("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(t("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Se(Y){var Z=Y._readableState;for(t("flow",Z.flowing);Z.flowing&&Y.read()!==null;);}y.prototype.wrap=function(Y){var Z=this,ge=this._readableState,ee=!1;Y.on("end",function(){if(t("wrapped end"),ge.decoder&&!ge.ended){var J=ge.decoder.end();J&&J.length&&Z.push(J)}Z.push(null)}),Y.on("data",function(J){if(t("wrapped data"),ge.decoder&&(J=ge.decoder.write(J)),ge.objectMode&&J==null)return;if(!ge.objectMode&&(!J||!J.length))return;var me=Z.push(J);me||(ee=!0,Y.pause())});for(var $ in Y)this[$]===void 0&&typeof Y[$]=="function"&&(this[$]=function(J){return function(){return Y[J].apply(Y,arguments)}}($));for(var X=0;X<P.length;X++)Y.on(P[X],this.emit.bind(this,P[X]));return this._read=function(J){t("wrapped _read",J),ee&&(ee=!1,Y.resume())},this},Object.defineProperty(y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),y._fromList=de;function de(Y,Z){if(Z.length===0)return null;var ge;return Z.objectMode?ge=Z.buffer.shift():!Y||Y>=Z.length?(Z.decoder?ge=Z.buffer.join(""):Z.buffer.length===1?ge=Z.buffer.head.data:ge=Z.buffer.concat(Z.length),Z.buffer.clear()):ge=xe(Y,Z.buffer,Z.decoder),ge}function xe(Y,Z,ge){var ee;return Y<Z.head.data.length?(ee=Z.head.data.slice(0,Y),Z.head.data=Z.head.data.slice(Y)):Y===Z.head.data.length?ee=Z.shift():ee=ge?he(Y,Z):ne(Y,Z),ee}function he(Y,Z){var ge=Z.head,ee=1,$=ge.data;for(Y-=$.length;ge=ge.next;){var X=ge.data,J=Y>X.length?X.length:Y;if(J===X.length?$+=X:$+=X.slice(0,Y),Y-=J,Y===0){J===X.length?(++ee,ge.next?Z.head=ge.next:Z.head=Z.tail=null):(Z.head=ge,ge.data=X.slice(J));break}++ee}return Z.length-=ee,$}function ne(Y,Z){var ge=c.allocUnsafe(Y),ee=Z.head,$=1;for(ee.data.copy(ge),Y-=ee.data.length;ee=ee.next;){var X=ee.data,J=Y>X.length?X.length:Y;if(X.copy(ge,ge.length-Y,0,J),Y-=J,Y===0){J===X.length?(++$,ee.next?Z.head=ee.next:Z.head=Z.tail=null):(Z.head=ee,ee.data=X.slice(J));break}++$}return Z.length-=$,ge}function oe(Y){var Z=Y._readableState;if(Z.length>0)throw new Error('"endReadable()" called on non-empty stream');Z.endEmitted||(Z.ended=!0,d.nextTick(te,Z,Y))}function te(Y,Z){!Y.endEmitted&&Y.length===0&&(Y.endEmitted=!0,Z.readable=!1,Z.emit("end"))}function le(Y,Z){for(var ge=0,ee=Y.length;ge<ee;ge++)if(Y[ge]===Z)return ge;return-1}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/BufferList":219,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/get-prototype-of":59,"core-util-is":189,events:192,inherits:196,isarray:198,"process-nextick-args":207,"safe-buffer":228,"string_decoder/":235,util:71}],217:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/create"),h=C(L);function C(l){return l&&l.__esModule?l:{default:l}}Q.exports=w;var D=j("./_stream_duplex"),u=(0,h.default)(j("core-util-is"));u.inherits=j("inherits"),u.inherits(w,D);function f(l,a){var _=this._transformState;_.transforming=!1;var m=_.writecb;if(!m)return this.emit("error",new Error("write callback called multiple times"));_.writechunk=null,_.writecb=null,a!=null&&this.push(a),m(l);var c=this._readableState;c.reading=!1,(c.needReadable||c.length<c.highWaterMark)&&this._read(c.highWaterMark)}function w(l){if(!(this instanceof w))return new w(l);D.call(this,l),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&(typeof l.transform=="function"&&(this._transform=l.transform),typeof l.flush=="function"&&(this._flush=l.flush)),this.on("prefinish",d)}function d(){var l=this;typeof this._flush=="function"?this._flush(function(a,_){o(l,a,_)}):o(this,null,null)}w.prototype.push=function(l,a){return this._transformState.needTransform=!1,D.prototype.push.call(this,l,a)},w.prototype._transform=function(l,a,_){throw new Error("_transform() is not implemented")},w.prototype._write=function(l,a,_){var m=this._transformState;if(m.writecb=_,m.writechunk=l,m.writeencoding=a,!m.transforming){var c=this._readableState;(m.needTransform||c.needReadable||c.length<c.highWaterMark)&&this._read(c.highWaterMark)}},w.prototype._read=function(l){var a=this._transformState;a.writechunk!==null&&a.writecb&&!a.transforming?(a.transforming=!0,this._transform(a.writechunk,a.writeencoding,a.afterTransform)):a.needTransform=!0},w.prototype._destroy=function(l,a){var _=this;D.prototype._destroy.call(this,l,function(m){a(m),_.emit("close")})};function o(l,a,_){if(a)return l.emit("error",a);if(_!=null&&l.push(_),l._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(l._transformState.transforming)throw new Error("Calling transform done when still transforming");return l.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(j,Q,k){(function(L,h){"use strict";var C=j("babel-runtime/core-js/object/define-property"),D=m(C),u=j("babel-runtime/core-js/symbol/has-instance"),f=m(u),w=j("babel-runtime/core-js/symbol"),d=m(w),o=j("babel-runtime/core-js/object/create"),l=m(o),a=j("babel-runtime/core-js/set-immediate"),_=m(a);function m(ne){return ne&&ne.__esModule?ne:{default:ne}}var c=j("process-nextick-args");Q.exports=M;function g(ne,oe,te){this.chunk=ne,this.encoding=oe,this.callback=te,this.next=null}function v(ne){var oe=this;this.next=null,this.entry=null,this.finish=function(){he(oe,ne)}}var x=!L.browser&&["v0.10","v0.9."].indexOf(L.version.slice(0,5))>-1?_.default:c.nextTick,n;M.WritableState=p;var i=(0,l.default)(j("core-util-is"));i.inherits=j("inherits");var t={deprecate:j("util-deprecate")},S=j("./internal/streams/stream"),E=j("safe-buffer").Buffer,s=h.Uint8Array||function(){};function P(ne){return E.from(ne)}function O(ne){return E.isBuffer(ne)||ne instanceof s}var b=j("./internal/streams/destroy");i.inherits(M,S);function y(){}function p(ne,oe){n=n||j("./_stream_duplex"),ne=ne||{};var te=oe instanceof n;this.objectMode=!!ne.objectMode,te&&(this.objectMode=this.objectMode||!!ne.writableObjectMode);var le=ne.highWaterMark,Y=ne.writableHighWaterMark,Z=this.objectMode?16:16*1024;le||le===0?this.highWaterMark=le:te&&(Y||Y===0)?this.highWaterMark=Y:this.highWaterMark=Z,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 ge=ne.decodeStrings===!1;this.decodeStrings=!ge,this.defaultEncoding=ne.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ee){B(oe,ee)},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 v(this)}p.prototype.getBuffer=function(){for(var oe=this.bufferedRequest,te=[];oe;)te.push(oe),oe=oe.next;return te},function(){try{Object.defineProperty(p.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ne){}}();var T;typeof d.default=="function"&&f.default&&typeof Function.prototype[f.default]=="function"?(T=Function.prototype[f.default],(0,D.default)(M,f.default,{value:function(oe){return T.call(this,oe)?!0:this!==M?!1:oe&&oe._writableState instanceof p}})):T=function(oe){return oe instanceof this};function M(ne){if(n=n||j("./_stream_duplex"),!T.call(M,this)&&!(this instanceof n))return new M(ne);this._writableState=new p(ne,this),this.writable=!0,ne&&(typeof ne.write=="function"&&(this._write=ne.write),typeof ne.writev=="function"&&(this._writev=ne.writev),typeof ne.destroy=="function"&&(this._destroy=ne.destroy),typeof ne.final=="function"&&(this._final=ne.final)),S.call(this)}M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function N(ne,oe){var te=new Error("write after end");ne.emit("error",te),c.nextTick(oe,te)}function I(ne,oe,te,le){var Y=!0,Z=!1;return te===null?Z=new TypeError("May not write null values to stream"):typeof te!="string"&&te!==void 0&&!oe.objectMode&&(Z=new TypeError("Invalid non-string/buffer chunk")),Z&&(ne.emit("error",Z),c.nextTick(le,Z),Y=!1),Y}M.prototype.write=function(ne,oe,te){var le=this._writableState,Y=!1,Z=!le.objectMode&&O(ne);return Z&&!E.isBuffer(ne)&&(ne=P(ne)),typeof oe=="function"&&(te=oe,oe=null),Z?oe="buffer":oe||(oe=le.defaultEncoding),typeof te!="function"&&(te=y),le.ended?N(this,te):(Z||I(this,le,ne,te))&&(le.pendingcb++,Y=H(this,le,Z,ne,oe,te)),Y},M.prototype.cork=function(){var ne=this._writableState;ne.corked++},M.prototype.uncork=function(){var ne=this._writableState;ne.corked&&(ne.corked--,!ne.writing&&!ne.corked&&!ne.finished&&!ne.bufferProcessing&&ne.bufferedRequest&&ae(this,ne))},M.prototype.setDefaultEncoding=function(oe){if(typeof oe=="string"&&(oe=oe.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((oe+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+oe);return this._writableState.defaultEncoding=oe,this};function K(ne,oe,te){return!ne.objectMode&&ne.decodeStrings!==!1&&typeof oe=="string"&&(oe=E.from(oe,te)),oe}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(ne,oe,te,le,Y,Z){if(!te){var ge=K(oe,le,Y);le!==ge&&(te=!0,Y="buffer",le=ge)}var ee=oe.objectMode?1:le.length;oe.length+=ee;var $=oe.length<oe.highWaterMark;if($||(oe.needDrain=!0),oe.writing||oe.corked){var X=oe.lastBufferedRequest;oe.lastBufferedRequest={chunk:le,encoding:Y,isBuf:te,callback:Z,next:null},X?X.next=oe.lastBufferedRequest:oe.bufferedRequest=oe.lastBufferedRequest,oe.bufferedRequestCount+=1}else W(ne,oe,!1,ee,le,Y,Z);return $}function W(ne,oe,te,le,Y,Z,ge){oe.writelen=le,oe.writecb=ge,oe.writing=!0,oe.sync=!0,te?ne._writev(Y,oe.onwrite):ne._write(Y,Z,oe.onwrite),oe.sync=!1}function z(ne,oe,te,le,Y){--oe.pendingcb,te?(c.nextTick(Y,le),c.nextTick(de,ne,oe),ne._writableState.errorEmitted=!0,ne.emit("error",le)):(Y(le),ne._writableState.errorEmitted=!0,ne.emit("error",le),de(ne,oe))}function U(ne){ne.writing=!1,ne.writecb=null,ne.length-=ne.writelen,ne.writelen=0}function B(ne,oe){var te=ne._writableState,le=te.sync,Y=te.writecb;if(U(te),oe)z(ne,te,le,oe,Y);else{var Z=se(te);!Z&&!te.corked&&!te.bufferProcessing&&te.bufferedRequest&&ae(ne,te),le?x(G,ne,te,Z,Y):G(ne,te,Z,Y)}}function G(ne,oe,te,le){te||q(ne,oe),oe.pendingcb--,le(),de(ne,oe)}function q(ne,oe){oe.length===0&&oe.needDrain&&(oe.needDrain=!1,ne.emit("drain"))}function ae(ne,oe){oe.bufferProcessing=!0;var te=oe.bufferedRequest;if(ne._writev&&te&&te.next){var le=oe.bufferedRequestCount,Y=new Array(le),Z=oe.corkedRequestsFree;Z.entry=te;for(var ge=0,ee=!0;te;)Y[ge]=te,te.isBuf||(ee=!1),te=te.next,ge+=1;Y.allBuffers=ee,W(ne,oe,!0,oe.length,Y,"",Z.finish),oe.pendingcb++,oe.lastBufferedRequest=null,Z.next?(oe.corkedRequestsFree=Z.next,Z.next=null):oe.corkedRequestsFree=new v(oe),oe.bufferedRequestCount=0}else{for(;te;){var $=te.chunk,X=te.encoding,J=te.callback,me=oe.objectMode?1:$.length;if(W(ne,oe,!1,me,$,X,J),te=te.next,oe.bufferedRequestCount--,oe.writing)break}te===null&&(oe.lastBufferedRequest=null)}oe.bufferedRequest=te,oe.bufferProcessing=!1}M.prototype._write=function(ne,oe,te){te(new Error("_write() is not implemented"))},M.prototype._writev=null,M.prototype.end=function(ne,oe,te){var le=this._writableState;typeof ne=="function"?(te=ne,ne=null,oe=null):typeof oe=="function"&&(te=oe,oe=null),ne!=null&&this.write(ne,oe),le.corked&&(le.corked=1,this.uncork()),!le.ending&&!le.finished&&xe(this,le,te)};function se(ne){return ne.ending&&ne.length===0&&ne.bufferedRequest===null&&!ne.finished&&!ne.writing}function we(ne,oe){ne._final(function(te){oe.pendingcb--,te&&ne.emit("error",te),oe.prefinished=!0,ne.emit("prefinish"),de(ne,oe)})}function Se(ne,oe){!oe.prefinished&&!oe.finalCalled&&(typeof ne._final=="function"?(oe.pendingcb++,oe.finalCalled=!0,c.nextTick(we,ne,oe)):(oe.prefinished=!0,ne.emit("prefinish")))}function de(ne,oe){var te=se(oe);return te&&(Se(ne,oe),oe.pendingcb===0&&(oe.finished=!0,ne.emit("finish"))),te}function xe(ne,oe,te){oe.ending=!0,de(ne,oe),te&&(oe.finished?c.nextTick(te):ne.once("finish",te)),oe.ended=!0,ne.writable=!1}function he(ne,oe,te){var le=ne.entry;for(ne.entry=null;le;){var Y=le.callback;oe.pendingcb--,Y(te),le=le.next}oe.corkedRequestsFree?oe.corkedRequestsFree.next=ne:oe.corkedRequestsFree=ne}Object.defineProperty(M.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(oe){if(!this._writableState)return;this._writableState.destroyed=oe}}),M.prototype.destroy=b.destroy,M.prototype._undestroy=b.undestroy,M.prototype._destroy=function(ne,oe){this.end(),oe(ne)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/set-immediate":62,"babel-runtime/core-js/symbol":64,"babel-runtime/core-js/symbol/has-instance":65,"core-util-is":189,inherits:196,"process-nextick-args":207,"safe-buffer":228,"util-deprecate":240}],219:[function(j,Q,k){"use strict";function L(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}var h=j("safe-buffer").Buffer,C=j("util");function D(u,f,w){u.copy(f,w)}Q.exports=function(){function u(){L(this,u),this.head=null,this.tail=null,this.length=0}return u.prototype.push=function(w){var d={data:w,next:null};this.length>0?this.tail.next=d:this.head=d,this.tail=d,++this.length},u.prototype.unshift=function(w){var d={data:w,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length},u.prototype.shift=function(){if(this.length===0)return;var w=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,w},u.prototype.clear=function(){this.head=this.tail=null,this.length=0},u.prototype.join=function(w){if(this.length===0)return"";for(var d=this.head,o=""+d.data;d=d.next;)o+=w+d.data;return o},u.prototype.concat=function(w){if(this.length===0)return h.alloc(0);if(this.length===1)return this.head.data;for(var d=h.allocUnsafe(w>>>0),o=this.head,l=0;o;)D(o.data,d,l),l+=o.data.length,o=o.next;return d},u}(),C&&C.inspect&&C.inspect.custom&&(Q.exports.prototype[C.inspect.custom]=function(){var u=C.inspect({length:this.length});return this.constructor.name+" "+u})},{"safe-buffer":228,util:71}],220:[function(j,Q,k){"use strict";var L=j("process-nextick-args");function h(u,f){var w=this,d=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return d||o?(f?f(u):u&&(!this._writableState||!this._writableState.errorEmitted)&&L.nextTick(D,this,u),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(l){!f&&l?(L.nextTick(D,w,l),w._writableState&&(w._writableState.errorEmitted=!0)):f&&f(l)}),this)}function C(){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 D(u,f){u.emit("error",f)}Q.exports={destroy:h,undestroy:C}},{"process-nextick-args":207}],221:[function(j,Q,k){"use strict";Q.exports=j("events").EventEmitter},{events:192}],222:[function(j,Q,k){Q.exports=j("./readable").PassThrough},{"./readable":223}],223:[function(j,Q,k){k=Q.exports=j("./lib/_stream_readable.js"),k.Stream=k,k.Readable=k,k.Writable=j("./lib/_stream_writable.js"),k.Duplex=j("./lib/_stream_duplex.js"),k.Transform=j("./lib/_stream_transform.js"),k.PassThrough=j("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":214,"./lib/_stream_passthrough.js":215,"./lib/_stream_readable.js":216,"./lib/_stream_transform.js":217,"./lib/_stream_writable.js":218}],224:[function(j,Q,k){Q.exports=j("./readable").Transform},{"./readable":223}],225:[function(j,Q,k){Q.exports=j("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(j,Q,k){var L=function(){return this}()||Function("return this")(),h=L.regeneratorRuntime&&Object.getOwnPropertyNames(L).indexOf("regeneratorRuntime")>=0,C=h&&L.regeneratorRuntime;if(L.regeneratorRuntime=void 0,Q.exports=j("./runtime"),h)L.regeneratorRuntime=C;else try{delete L.regeneratorRuntime}catch(D){L.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(j,Q,k){!function(L){"use strict";var h=Object.prototype,C=h.hasOwnProperty,D,u=typeof Symbol=="function"?Symbol:{},f=u.iterator||"@@iterator",w=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag",o=typeof Q=="object",l=L.regeneratorRuntime;if(l){o&&(Q.exports=l);return}l=L.regeneratorRuntime=o?Q.exports:{};function a(H,W,z,U){var B=W&&W.prototype instanceof n?W:n,G=Object.create(B.prototype),q=new N(U||[]);return G._invoke=y(H,z,q),G}l.wrap=a;function _(H,W,z){try{return{type:"normal",arg:H.call(W,z)}}catch(U){return{type:"throw",arg:U}}}var m="suspendedStart",c="suspendedYield",g="executing",v="completed",x={};function n(){}function i(){}function t(){}var S={};S[f]=function(){return this};var E=Object.getPrototypeOf,s=E&&E(E(I([])));s&&s!==h&&C.call(s,f)&&(S=s);var P=t.prototype=n.prototype=Object.create(S);i.prototype=P.constructor=t,t.constructor=i,t[d]=i.displayName="GeneratorFunction";function O(H){["next","throw","return"].forEach(function(W){H[W]=function(z){return this._invoke(W,z)}})}l.isGeneratorFunction=function(H){var W=typeof H=="function"&&H.constructor;return W?W===i||(W.displayName||W.name)==="GeneratorFunction":!1},l.mark=function(H){return Object.setPrototypeOf?Object.setPrototypeOf(H,t):(H.__proto__=t,d in H||(H[d]="GeneratorFunction")),H.prototype=Object.create(P),H},l.awrap=function(H){return{__await:H}};function b(H){function W(B,G,q,ae){var se=_(H[B],H,G);if(se.type==="throw")ae(se.arg);else{var we=se.arg,Se=we.value;return Se&&typeof Se=="object"&&C.call(Se,"__await")?Promise.resolve(Se.__await).then(function(de){W("next",de,q,ae)},function(de){W("throw",de,q,ae)}):Promise.resolve(Se).then(function(de){we.value=de,q(we)},ae)}}var z;function U(B,G){function q(){return new Promise(function(ae,se){W(B,G,ae,se)})}return z=z?z.then(q,q):q()}this._invoke=U}O(b.prototype),b.prototype[w]=function(){return this},l.AsyncIterator=b,l.async=function(H,W,z,U){var B=new b(a(H,W,z,U));return l.isGeneratorFunction(W)?B:B.next().then(function(G){return G.done?G.value:B.next()})};function y(H,W,z){var U=m;return function(G,q){if(U===g)throw new Error("Generator is already running");if(U===v){if(G==="throw")throw q;return K()}for(z.method=G,z.arg=q;;){var ae=z.delegate;if(ae){var se=p(ae,z);if(se){if(se===x)continue;return se}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(U===m)throw U=v,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);U=g;var we=_(H,W,z);if(we.type==="normal"){if(U=z.done?v:c,we.arg===x)continue;return{value:we.arg,done:z.done}}else we.type==="throw"&&(U=v,z.method="throw",z.arg=we.arg)}}}function p(H,W){var z=H.iterator[W.method];if(z===D){if(W.delegate=null,W.method==="throw"){if(H.iterator.return&&(W.method="return",W.arg=D,p(H,W),W.method==="throw"))return x;W.method="throw",W.arg=new TypeError("The iterator does not provide a 'throw' method")}return x}var U=_(z,H.iterator,W.arg);if(U.type==="throw")return W.method="throw",W.arg=U.arg,W.delegate=null,x;var B=U.arg;if(!B)return W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,x;if(B.done)W[H.resultName]=B.value,W.next=H.nextLoc,W.method!=="return"&&(W.method="next",W.arg=D);else return B;return W.delegate=null,x}O(P),P[d]="Generator",P[f]=function(){return this},P.toString=function(){return"[object Generator]"};function T(H){var W={tryLoc:H[0]};1 in H&&(W.catchLoc=H[1]),2 in H&&(W.finallyLoc=H[2],W.afterLoc=H[3]),this.tryEntries.push(W)}function M(H){var W=H.completion||{};W.type="normal",delete W.arg,H.completion=W}function N(H){this.tryEntries=[{tryLoc:"root"}],H.forEach(T,this),this.reset(!0)}l.keys=function(H){var W=[];for(var z in H)W.push(z);return W.reverse(),function U(){for(;W.length;){var B=W.pop();if(B in H)return U.value=B,U.done=!1,U}return U.done=!0,U}};function I(H){if(H){var W=H[f];if(W)return W.call(H);if(typeof H.next=="function")return H;if(!isNaN(H.length)){var z=-1,U=function B(){for(;++z<H.length;)if(C.call(H,z))return B.value=H[z],B.done=!1,B;return B.value=D,B.done=!0,B};return U.next=U}}return{next:K}}l.values=I;function K(){return{value:D,done:!0}}N.prototype={constructor:N,reset:function(H){if(this.prev=0,this.next=0,this.sent=this._sent=D,this.done=!1,this.delegate=null,this.method="next",this.arg=D,this.tryEntries.forEach(M),!H)for(var W in this)W.charAt(0)==="t"&&C.call(this,W)&&!isNaN(+W.slice(1))&&(this[W]=D)},stop:function(){this.done=!0;var H=this.tryEntries[0],W=H.completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(H){if(this.done)throw H;var W=this;function z(se,we){return G.type="throw",G.arg=H,W.next=se,we&&(W.method="next",W.arg=D),!!we}for(var U=this.tryEntries.length-1;U>=0;--U){var B=this.tryEntries[U],G=B.completion;if(B.tryLoc==="root")return z("end");if(B.tryLoc<=this.prev){var q=C.call(B,"catchLoc"),ae=C.call(B,"finallyLoc");if(q&&ae){if(this.prev<B.catchLoc)return z(B.catchLoc,!0);if(this.prev<B.finallyLoc)return z(B.finallyLoc)}else if(q){if(this.prev<B.catchLoc)return z(B.catchLoc,!0)}else if(ae){if(this.prev<B.finallyLoc)return z(B.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(H,W){for(var z=this.tryEntries.length-1;z>=0;--z){var U=this.tryEntries[z];if(U.tryLoc<=this.prev&&C.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var B=U;break}}B&&(H==="break"||H==="continue")&&B.tryLoc<=W&&W<=B.finallyLoc&&(B=null);var G=B?B.completion:{};return G.type=H,G.arg=W,B?(this.method="next",this.next=B.finallyLoc,x):this.complete(G)},complete:function(H,W){if(H.type==="throw")throw H.arg;return H.type==="break"||H.type==="continue"?this.next=H.arg:H.type==="return"?(this.rval=this.arg=H.arg,this.method="return",this.next="end"):H.type==="normal"&&W&&(this.next=W),x},finish:function(H){for(var W=this.tryEntries.length-1;W>=0;--W){var z=this.tryEntries[W];if(z.finallyLoc===H)return this.complete(z.completion,z.afterLoc),M(z),x}},catch:function(H){for(var W=this.tryEntries.length-1;W>=0;--W){var z=this.tryEntries[W];if(z.tryLoc===H){var U=z.completion;if(U.type==="throw"){var B=U.arg;M(z)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(H,W,z){return this.delegate={iterator:I(H),resultName:W,nextLoc:z},this.method==="next"&&(this.arg=D),x}}}(function(){return this}()||Function("return this")())},{}],228:[function(j,Q,k){var L=j("buffer"),h=L.Buffer;function C(u,f){for(var w in u)f[w]=u[w]}h.from&&h.alloc&&h.allocUnsafe&&h.allocUnsafeSlow?Q.exports=L:(C(L,k),k.Buffer=D);function D(u,f,w){return h(u,f,w)}C(h,D),D.from=function(u,f,w){if(typeof u=="number")throw new TypeError("Argument must not be a number");return h(u,f,w)},D.alloc=function(u,f,w){if(typeof u!="number")throw new TypeError("Argument must be a number");var d=h(u);return f!==void 0?typeof w=="string"?d.fill(f,w):d.fill(f):d.fill(0),d},D.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return h(u)},D.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return L.SlowBuffer(u)}},{buffer:73}],229:[function(j,Q,k){(function(L){"use strict";var h=j("babel-runtime/core-js/string/from-code-point"),C=c(h),D=j("babel-runtime/core-js/json/stringify"),u=c(D),f=j("babel-runtime/helpers/typeof"),w=c(f),d=j("babel-runtime/core-js/object/define-property"),o=c(d),l=j("babel-runtime/core-js/object/keys"),a=c(l),_=j("babel-runtime/core-js/object/create"),m=c(_);function c(g){return g&&g.__esModule?g:{default:g}}(function(g){g.parser=function(X,J){return new x(X,J)},g.SAXParser=x,g.SAXStream=P,g.createStream=s,g.MAX_BUFFER_LENGTH=64*1024;var v=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];g.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function x(X,J){if(!(this instanceof x))return new x(X,J);var me=this;i(me),me.q=me.c="",me.bufferCheckPosition=g.MAX_BUFFER_LENGTH,me.opt=J||{},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=!!X,me.noscript=!!(X||me.opt.noscript),me.state=G.BEGIN,me.strictEntities=me.opt.strictEntities,me.ENTITIES=me.strictEntities?(0,m.default)(g.XML_ENTITIES):(0,m.default)(g.ENTITIES),me.attribList=[],me.opt.xmlns&&(me.ns=(0,m.default)(T)),me.trackPosition=me.opt.position!==!1,me.trackPosition&&(me.position=me.line=me.column=0),ae(me,"onready")}m.default||(Object.create=function(X){function J(){}J.prototype=X;var me=new J;return me}),a.default||(Object.keys=function(X){var J=[];for(var me in X)X.hasOwnProperty(me)&&J.push(me);return J});function n(X){for(var J=Math.max(g.MAX_BUFFER_LENGTH,10),me=0,ue=0,_e=v.length;ue<_e;ue++){var He=X[v[ue]].length;if(He>J)switch(v[ue]){case"textNode":we(X);break;case"cdata":se(X,"oncdata",X.cdata),X.cdata="";break;case"script":se(X,"onscript",X.script),X.script="";break;default:de(X,"Max buffer length exceeded: "+v[ue])}me=Math.max(me,He)}var $e=g.MAX_BUFFER_LENGTH-me;X.bufferCheckPosition=$e+X.position}function i(X){for(var J=0,me=v.length;J<me;J++)X[v[J]]=""}function t(X){we(X),X.cdata!==""&&(se(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(se(X,"onscript",X.script),X.script="")}x.prototype={end:function(){xe(this)},write:$,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){t(this)}};var S;try{S=j("stream").Stream}catch(X){S=function(){}}var E=g.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});function s(X,J){return new P(X,J)}function P(X,J){if(!(this instanceof P))return new P(X,J);S.apply(this),this._parser=new x(X,J),this.writable=!0,this.readable=!0;var me=this;this._parser.onend=function(){me.emit("end")},this._parser.onerror=function(ue){me.emit("error",ue),me._parser.error=null},this._decoder=null,E.forEach(function(ue){(0,o.default)(me,"on"+ue,{get:function(){return me._parser["on"+ue]},set:function(He){if(!He)return me.removeAllListeners(ue),me._parser["on"+ue]=He,He;me.on(ue,He)},enumerable:!0,configurable:!1})})}P.prototype=(0,m.default)(S.prototype,{constructor:{value:P}}),P.prototype.write=function(X){if(typeof L=="function"&&typeof L.isBuffer=="function"&&L.isBuffer(X)){if(!this._decoder){var J=j("string_decoder").StringDecoder;this._decoder=new J("utf8")}X=this._decoder.write(X)}return this._parser.write(X.toString()),this.emit("data",X),!0},P.prototype.end=function(X){return X&&X.length&&this.write(X),this._parser.end(),!0},P.prototype.on=function(X,J){var me=this;return!me._parser["on"+X]&&E.indexOf(X)!==-1&&(me._parser["on"+X]=function(){var ue=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ue.splice(0,0,X),me.emit.apply(me,ue)}),S.prototype.on.call(me,X,J)};var O="[CDATA[",b="DOCTYPE",y="http://www.w3.org/XML/1998/namespace",p="http://www.w3.org/2000/xmlns/",T={xml:y,xmlns:p},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]/,N=/[:_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-]/,I=/[#:_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]/,K=/[#:_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-]/;function H(X){return X===" "||X===`
|
|
|
`||X==="\r"||X===" "}function W(X){return X==='"'||X==="'"}function z(X){return X===">"||H(X)}function U(X,J){return X.test(J)}function B(X,J){return!U(X,J)}var G=0;g.STATE={BEGIN:G++,BEGIN_WHITESPACE:G++,TEXT:G++,TEXT_ENTITY:G++,OPEN_WAKA:G++,SGML_DECL:G++,SGML_DECL_QUOTED:G++,DOCTYPE:G++,DOCTYPE_QUOTED:G++,DOCTYPE_DTD:G++,DOCTYPE_DTD_QUOTED:G++,COMMENT_STARTING:G++,COMMENT:G++,COMMENT_ENDING:G++,COMMENT_ENDED:G++,CDATA:G++,CDATA_ENDING:G++,CDATA_ENDING_2:G++,PROC_INST:G++,PROC_INST_BODY:G++,PROC_INST_ENDING:G++,OPEN_TAG:G++,OPEN_TAG_SLASH:G++,ATTRIB:G++,ATTRIB_NAME:G++,ATTRIB_NAME_SAW_WHITE:G++,ATTRIB_VALUE:G++,ATTRIB_VALUE_QUOTED:G++,ATTRIB_VALUE_CLOSED:G++,ATTRIB_VALUE_UNQUOTED:G++,ATTRIB_VALUE_ENTITY_Q:G++,ATTRIB_VALUE_ENTITY_U:G++,CLOSE_TAG:G++,CLOSE_TAG_SAW_WHITE:G++,SCRIPT:G++,SCRIPT_ENDING:G++},g.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},g.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,a.default)(g.ENTITIES).forEach(function(X){var J=g.ENTITIES[X],me=typeof J=="number"?String.fromCharCode(J):J;g.ENTITIES[X]=me});for(var q in g.STATE)g.STATE[g.STATE[q]]=q;G=g.STATE;function ae(X,J,me){X[J]&&X[J](me)}function se(X,J,me){X.textNode&&we(X),ae(X,J,me)}function we(X){X.textNode=Se(X.opt,X.textNode),X.textNode&&ae(X,"ontext",X.textNode),X.textNode=""}function Se(X,J){return X.trim&&(J=J.trim()),X.normalize&&(J=J.replace(/\s+/g," ")),J}function de(X,J){return we(X),X.trackPosition&&(J+=`
|
|
|
Line: `+X.line+`
|
|
|
Column: `+X.column+`
|
|
|
Char: `+X.c),J=new Error(J),X.error=J,ae(X,"onerror",J),X}function xe(X){return X.sawRoot&&!X.closedRoot&&he(X,"Unclosed root tag"),X.state!==G.BEGIN&&X.state!==G.BEGIN_WHITESPACE&&X.state!==G.TEXT&&de(X,"Unexpected end"),we(X),X.c="",X.closed=!0,ae(X,"onend"),x.call(X,X.strict,X.opt),X}function he(X,J){if((typeof X=="undefined"?"undefined":(0,w.default)(X))!=="object"||!(X instanceof x))throw new Error("bad call to strictFail");X.strict&&de(X,J)}function ne(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var J=X.tags[X.tags.length-1]||X,me=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(me.ns=J.ns),X.attribList.length=0,se(X,"onopentagstart",me)}function oe(X,J){var me=X.indexOf(":"),ue=me<0?["",X]:X.split(":"),_e=ue[0],He=ue[1];return J&&X==="xmlns"&&(_e="xmlns",He=""),{prefix:_e,local:He}}function te(X){if(X.strict||(X.attribName=X.attribName[X.looseCase]()),X.attribList.indexOf(X.attribName)!==-1||X.tag.attributes.hasOwnProperty(X.attribName)){X.attribName=X.attribValue="";return}if(X.opt.xmlns){var J=oe(X.attribName,!0),me=J.prefix,ue=J.local;if(me==="xmlns")if(ue==="xml"&&X.attribValue!==y)he(X,"xml: prefix must be bound to "+y+`
|
|
|
Actual: `+X.attribValue);else if(ue==="xmlns"&&X.attribValue!==p)he(X,"xmlns: prefix must be bound to "+p+`
|
|
|
Actual: `+X.attribValue);else{var _e=X.tag,He=X.tags[X.tags.length-1]||X;_e.ns===He.ns&&(_e.ns=(0,m.default)(He.ns)),_e.ns[ue]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,se(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function le(X,J){if(X.opt.xmlns){var me=X.tag,ue=oe(X.tagName);me.prefix=ue.prefix,me.local=ue.local,me.uri=me.ns[ue.prefix]||"",me.prefix&&!me.uri&&(he(X,"Unbound namespace prefix: "+(0,u.default)(X.tagName)),me.uri=ue.prefix);var _e=X.tags[X.tags.length-1]||X;me.ns&&_e.ns!==me.ns&&(0,a.default)(me.ns).forEach(function(ze){se(X,"onopennamespace",{prefix:ze,uri:me.ns[ze]})});for(var He=0,$e=X.attribList.length;He<$e;He++){var Ye=X.attribList[He],tt=Ye[0],nt=Ye[1],it=oe(tt,!0),Me=it.prefix,Ce=it.local,Je=Me===""?"":me.ns[Me]||"",rt={name:tt,value:nt,prefix:Me,local:Ce,uri:Je};Me&&Me!=="xmlns"&&!Je&&(he(X,"Unbound namespace prefix: "+(0,u.default)(Me)),rt.uri=Me),X.tag.attributes[tt]=rt,se(X,"onattribute",rt)}X.attribList.length=0}X.tag.isSelfClosing=!!J,X.sawRoot=!0,X.tags.push(X.tag),se(X,"onopentag",X.tag),J||(!X.noscript&&X.tagName.toLowerCase()==="script"?X.state=G.SCRIPT:X.state=G.TEXT,X.tag=null,X.tagName=""),X.attribName=X.attribValue="",X.attribList.length=0}function Y(X){if(!X.tagName){he(X,"Weird empty close tag."),X.textNode+="</>",X.state=G.TEXT;return}if(X.script){if(X.tagName!=="script"){X.script+="</"+X.tagName+">",X.tagName="",X.state=G.SCRIPT;return}se(X,"onscript",X.script),X.script=""}var J=X.tags.length,me=X.tagName;X.strict||(me=me[X.looseCase]());for(var ue=me;J--;){var _e=X.tags[J];if(_e.name!==ue)he(X,"Unexpected close tag");else break}if(J<0){he(X,"Unmatched closing tag: "+X.tagName),X.textNode+="</"+X.tagName+">",X.state=G.TEXT;return}X.tagName=me;for(var He=X.tags.length;He-- >J;){var $e=X.tag=X.tags.pop();X.tagName=X.tag.name,se(X,"onclosetag",X.tagName);var Ye={};for(var tt in $e.ns)Ye[tt]=$e.ns[tt];var nt=X.tags[X.tags.length-1]||X;X.opt.xmlns&&$e.ns!==nt.ns&&(0,a.default)($e.ns).forEach(function(it){var Me=$e.ns[it];se(X,"onclosenamespace",{prefix:it,uri:Me})})}J===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=G.TEXT}function Z(X){var J=X.entity,me=J.toLowerCase(),ue,_e="";return X.ENTITIES[J]?X.ENTITIES[J]:X.ENTITIES[me]?X.ENTITIES[me]:(J=me,J.charAt(0)==="#"&&(J.charAt(1)==="x"?(J=J.slice(2),ue=parseInt(J,16),_e=ue.toString(16)):(J=J.slice(1),ue=parseInt(J,10),_e=ue.toString(10))),J=J.replace(/^0+/,""),isNaN(ue)||_e.toLowerCase()!==J?(he(X,"Invalid character entity"),"&"+X.entity+";"):(0,C.default)(ue))}function ge(X,J){J==="<"?(X.state=G.OPEN_WAKA,X.startTagPosition=X.position):H(J)||(he(X,"Non-whitespace before first tag."),X.textNode=J,X.state=G.TEXT)}function ee(X,J){var me="";return J<X.length&&(me=X.charAt(J)),me}function $(X){var J=this;if(this.error)throw this.error;if(J.closed)return de(J,"Cannot write after close. Assign an onready handler.");if(X===null)return xe(J);(typeof X=="undefined"?"undefined":(0,w.default)(X))==="object"&&(X=X.toString());for(var me=0,ue="";!(ue=ee(X,me++),J.c=ue,!ue);){J.trackPosition&&(J.position++,ue===`
|
|
|
`?(J.line++,J.column=0):J.column++);switch(J.state){case G.BEGIN:if(J.state=G.BEGIN_WHITESPACE,ue==="\uFEFF")continue;ge(J,ue);continue;case G.BEGIN_WHITESPACE:ge(J,ue);continue;case G.TEXT:if(J.sawRoot&&!J.closedRoot){for(var _e=me-1;ue&&ue!=="<"&&ue!=="&";)ue=ee(X,me++),ue&&J.trackPosition&&(J.position++,ue===`
|
|
|
`?(J.line++,J.column=0):J.column++);J.textNode+=X.substring(_e,me-1)}ue==="<"&&!(J.sawRoot&&J.closedRoot&&!J.strict)?(J.state=G.OPEN_WAKA,J.startTagPosition=J.position):(!H(ue)&&(!J.sawRoot||J.closedRoot)&&he(J,"Text data outside of root node."),ue==="&"?J.state=G.TEXT_ENTITY:J.textNode+=ue);continue;case G.SCRIPT:ue==="<"?J.state=G.SCRIPT_ENDING:J.script+=ue;continue;case G.SCRIPT_ENDING:ue==="/"?J.state=G.CLOSE_TAG:(J.script+="<"+ue,J.state=G.SCRIPT);continue;case G.OPEN_WAKA:if(ue==="!")J.state=G.SGML_DECL,J.sgmlDecl="";else if(!H(ue))if(U(M,ue))J.state=G.OPEN_TAG,J.tagName=ue;else if(ue==="/")J.state=G.CLOSE_TAG,J.tagName="";else if(ue==="?")J.state=G.PROC_INST,J.procInstName=J.procInstBody="";else{if(he(J,"Unencoded <"),J.startTagPosition+1<J.position){var He=J.position-J.startTagPosition;ue=new Array(He).join(" ")+ue}J.textNode+="<"+ue,J.state=G.TEXT}continue;case G.SGML_DECL:(J.sgmlDecl+ue).toUpperCase()===O?(se(J,"onopencdata"),J.state=G.CDATA,J.sgmlDecl="",J.cdata=""):J.sgmlDecl+ue==="--"?(J.state=G.COMMENT,J.comment="",J.sgmlDecl=""):(J.sgmlDecl+ue).toUpperCase()===b?(J.state=G.DOCTYPE,(J.doctype||J.sawRoot)&&he(J,"Inappropriately located doctype declaration"),J.doctype="",J.sgmlDecl=""):ue===">"?(se(J,"onsgmldeclaration",J.sgmlDecl),J.sgmlDecl="",J.state=G.TEXT):(W(ue)&&(J.state=G.SGML_DECL_QUOTED),J.sgmlDecl+=ue);continue;case G.SGML_DECL_QUOTED:ue===J.q&&(J.state=G.SGML_DECL,J.q=""),J.sgmlDecl+=ue;continue;case G.DOCTYPE:ue===">"?(J.state=G.TEXT,se(J,"ondoctype",J.doctype),J.doctype=!0):(J.doctype+=ue,ue==="["?J.state=G.DOCTYPE_DTD:W(ue)&&(J.state=G.DOCTYPE_QUOTED,J.q=ue));continue;case G.DOCTYPE_QUOTED:J.doctype+=ue,ue===J.q&&(J.q="",J.state=G.DOCTYPE);continue;case G.DOCTYPE_DTD:J.doctype+=ue,ue==="]"?J.state=G.DOCTYPE:W(ue)&&(J.state=G.DOCTYPE_DTD_QUOTED,J.q=ue);continue;case G.DOCTYPE_DTD_QUOTED:J.doctype+=ue,ue===J.q&&(J.state=G.DOCTYPE_DTD,J.q="");continue;case G.COMMENT:ue==="-"?J.state=G.COMMENT_ENDING:J.comment+=ue;continue;case G.COMMENT_ENDING:ue==="-"?(J.state=G.COMMENT_ENDED,J.comment=Se(J.opt,J.comment),J.comment&&se(J,"oncomment",J.comment),J.comment=""):(J.comment+="-"+ue,J.state=G.COMMENT);continue;case G.COMMENT_ENDED:ue!==">"?(he(J,"Malformed comment"),J.comment+="--"+ue,J.state=G.COMMENT):J.state=G.TEXT;continue;case G.CDATA:ue==="]"?J.state=G.CDATA_ENDING:J.cdata+=ue;continue;case G.CDATA_ENDING:ue==="]"?J.state=G.CDATA_ENDING_2:(J.cdata+="]"+ue,J.state=G.CDATA);continue;case G.CDATA_ENDING_2:ue===">"?(J.cdata&&se(J,"oncdata",J.cdata),se(J,"onclosecdata"),J.cdata="",J.state=G.TEXT):ue==="]"?J.cdata+="]":(J.cdata+="]]"+ue,J.state=G.CDATA);continue;case G.PROC_INST:ue==="?"?J.state=G.PROC_INST_ENDING:H(ue)?J.state=G.PROC_INST_BODY:J.procInstName+=ue;continue;case G.PROC_INST_BODY:if(!J.procInstBody&&H(ue))continue;ue==="?"?J.state=G.PROC_INST_ENDING:J.procInstBody+=ue;continue;case G.PROC_INST_ENDING:ue===">"?(se(J,"onprocessinginstruction",{name:J.procInstName,body:J.procInstBody}),J.procInstName=J.procInstBody="",J.state=G.TEXT):(J.procInstBody+="?"+ue,J.state=G.PROC_INST_BODY);continue;case G.OPEN_TAG:U(N,ue)?J.tagName+=ue:(ne(J),ue===">"?le(J):ue==="/"?J.state=G.OPEN_TAG_SLASH:(H(ue)||he(J,"Invalid character in tag name"),J.state=G.ATTRIB));continue;case G.OPEN_TAG_SLASH:ue===">"?(le(J,!0),Y(J)):(he(J,"Forward-slash in opening tag not followed by >"),J.state=G.ATTRIB);continue;case G.ATTRIB:if(H(ue))continue;ue===">"?le(J):ue==="/"?J.state=G.OPEN_TAG_SLASH:U(M,ue)?(J.attribName=ue,J.attribValue="",J.state=G.ATTRIB_NAME):he(J,"Invalid attribute name");continue;case G.ATTRIB_NAME:ue==="="?J.state=G.ATTRIB_VALUE:ue===">"?(he(J,"Attribute without value"),J.attribValue=J.attribName,te(J),le(J)):H(ue)?J.state=G.ATTRIB_NAME_SAW_WHITE:U(N,ue)?J.attribName+=ue:he(J,"Invalid attribute name");continue;case G.ATTRIB_NAME_SAW_WHITE:if(ue==="=")J.state=G.ATTRIB_VALUE;else{if(H(ue))continue;he(J,"Attribute without value"),J.tag.attributes[J.attribName]="",J.attribValue="",se(J,"onattribute",{name:J.attribName,value:""}),J.attribName="",ue===">"?le(J):U(M,ue)?(J.attribName=ue,J.state=G.ATTRIB_NAME):(he(J,"Invalid attribute name"),J.state=G.ATTRIB)}continue;case G.ATTRIB_VALUE:if(H(ue))continue;W(ue)?(J.q=ue,J.state=G.ATTRIB_VALUE_QUOTED):(he(J,"Unquoted attribute value"),J.state=G.ATTRIB_VALUE_UNQUOTED,J.attribValue=ue);continue;case G.ATTRIB_VALUE_QUOTED:if(ue!==J.q){ue==="&"?J.state=G.ATTRIB_VALUE_ENTITY_Q:J.attribValue+=ue;continue}te(J),J.q="",J.state=G.ATTRIB_VALUE_CLOSED;continue;case G.ATTRIB_VALUE_CLOSED:H(ue)?J.state=G.ATTRIB:ue===">"?le(J):ue==="/"?J.state=G.OPEN_TAG_SLASH:U(M,ue)?(he(J,"No whitespace between attributes"),J.attribName=ue,J.attribValue="",J.state=G.ATTRIB_NAME):he(J,"Invalid attribute name");continue;case G.ATTRIB_VALUE_UNQUOTED:if(!z(ue)){ue==="&"?J.state=G.ATTRIB_VALUE_ENTITY_U:J.attribValue+=ue;continue}te(J),ue===">"?le(J):J.state=G.ATTRIB;continue;case G.CLOSE_TAG:if(J.tagName)ue===">"?Y(J):U(N,ue)?J.tagName+=ue:J.script?(J.script+="</"+J.tagName,J.tagName="",J.state=G.SCRIPT):(H(ue)||he(J,"Invalid tagname in closing tag"),J.state=G.CLOSE_TAG_SAW_WHITE);else{if(H(ue))continue;B(M,ue)?J.script?(J.script+="</"+ue,J.state=G.SCRIPT):he(J,"Invalid tagname in closing tag."):J.tagName=ue}continue;case G.CLOSE_TAG_SAW_WHITE:if(H(ue))continue;ue===">"?Y(J):he(J,"Invalid characters in closing tag");continue;case G.TEXT_ENTITY:case G.ATTRIB_VALUE_ENTITY_Q:case G.ATTRIB_VALUE_ENTITY_U:var $e,Ye;switch(J.state){case G.TEXT_ENTITY:$e=G.TEXT,Ye="textNode";break;case G.ATTRIB_VALUE_ENTITY_Q:$e=G.ATTRIB_VALUE_QUOTED,Ye="attribValue";break;case G.ATTRIB_VALUE_ENTITY_U:$e=G.ATTRIB_VALUE_UNQUOTED,Ye="attribValue";break}ue===";"?(J[Ye]+=Z(J),J.entity="",J.state=$e):U(J.entity.length?K:I,ue)?J.entity+=ue:(he(J,"Invalid character in entity name"),J[Ye]+="&"+J.entity+ue,J.entity="",J.state=$e);continue;default:throw new Error(J,"Unknown state: "+J.state)}}return J.position>=J.bufferCheckPosition&&n(J),J}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */C.default||function(){var X=String.fromCharCode,J=Math.floor,me=function(){var _e=16384,He=[],$e,Ye,tt=-1,nt=arguments.length;if(!nt)return"";for(var it="";++tt<nt;){var Me=Number(arguments[tt]);if(!isFinite(Me)||Me<0||Me>1114111||J(Me)!==Me)throw RangeError("Invalid code point: "+Me);Me<=65535?He.push(Me):(Me-=65536,$e=(Me>>10)+55296,Ye=Me%1024+56320,He.push($e,Ye)),(tt+1===nt||He.length>_e)&&(it+=X.apply(null,He),He.length=0)}return it};o.default?Object.defineProperty(String,"fromCodePoint",{value:me,configurable:!0,writable:!0}):String.fromCodePoint=me}()})(typeof k=="undefined"?(void 0).sax={}:k)}).call(this,j("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/string/from-code-point":63,"babel-runtime/helpers/typeof":67,buffer:73,stream:230,string_decoder:72}],230:[function(j,Q,k){Q.exports=C;var L=j("events").EventEmitter,h=j("inherits");h(C,L),C.Readable=j("readable-stream/readable.js"),C.Writable=j("readable-stream/writable.js"),C.Duplex=j("readable-stream/duplex.js"),C.Transform=j("readable-stream/transform.js"),C.PassThrough=j("readable-stream/passthrough.js"),C.Stream=C;function C(){L.call(this)}C.prototype.pipe=function(D,u){var f=this;function w(c){D.writable&&(D.write(c)===!1&&f.pause&&f.pause())}f.on("data",w);function d(){f.readable&&f.resume&&f.resume()}D.on("drain",d),!D._isStdio&&(!u||u.end!==!1)&&(f.on("end",l),f.on("close",a));var o=!1;function l(){if(o)return;o=!0,D.end()}function a(){if(o)return;o=!0,typeof D.destroy=="function"&&D.destroy()}function _(c){if(m(),L.listenerCount(this,"error")===0)throw c}f.on("error",_),D.on("error",_);function m(){f.removeListener("data",w),D.removeListener("drain",d),f.removeListener("end",l),f.removeListener("close",a),f.removeListener("error",_),D.removeListener("error",_),f.removeListener("end",m),f.removeListener("close",m),D.removeListener("close",m)}return f.on("end",m),f.on("close",m),D.on("close",m),D.emit("pipe",f),D}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(j,Q,k){(function(L){var h=j("./lib/request"),C=j("./lib/response"),D=j("xtend"),u=j("builtin-status-codes"),f=j("url"),w=k;w.request=function(d,o){typeof d=="string"?d=f.parse(d):d=D(d);var l=L.location.protocol.search(/^https?:$/)===-1?"http:":"",a=d.protocol||l,_=d.hostname||d.host,m=d.port,c=d.path||"/";_&&_.indexOf(":")!==-1&&(_="["+_+"]"),d.url=(_?a+"//"+_:"")+(m?":"+m:"")+c,d.method=(d.method||"GET").toUpperCase(),d.headers=d.headers||{};var g=new h(d);return o&&g.on("response",o),g},w.get=function(o,l){var a=w.request(o,l);return a.end(),a},w.ClientRequest=h,w.IncomingMessage=C.IncomingMessage,w.Agent=function(){},w.Agent.defaultMaxSockets=4,w.globalAgent=new w.Agent,w.STATUS_CODES=u,w.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 global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":233,"./lib/response":234,"builtin-status-codes":74,url:238,xtend:283}],232:[function(j,Q,k){(function(L){"use strict";k.fetch=w(L.fetch)&&w(L.ReadableStream),k.writableStream=w(L.WritableStream),k.abortController=w(L.AbortController),k.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),k.blobConstructor=!0}catch(d){}var h;function C(){if(h!==void 0)return h;if(L.XMLHttpRequest){h=new L.XMLHttpRequest;try{h.open("GET",L.XDomainRequest?"/":"https://example.com")}catch(d){h=null}}else h=null;return h}function D(d){var o=C();if(!o)return!1;try{return o.responseType=d,o.responseType===d}catch(l){}return!1}var u=typeof L.ArrayBuffer!="undefined",f=u&&w(L.ArrayBuffer.prototype.slice);k.arraybuffer=k.fetch||u&&D("arraybuffer"),k.msstream=!k.fetch&&f&&D("ms-stream"),k.mozchunkedarraybuffer=!k.fetch&&u&&D("moz-chunked-arraybuffer"),k.overrideMimeType=k.fetch||(C()?w(C().overrideMimeType):!1),k.vbArray=w(L.VBArray);function w(d){return typeof d=="function"}h=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(j,Q,k){(function(L,h,C){"use strict";var D=j("babel-runtime/core-js/object/keys"),u=f(D);function f(n){return n&&n.__esModule?n:{default:n}}var w=j("./capability"),d=j("inherits"),o=j("./response"),l=j("readable-stream"),a=j("to-arraybuffer"),_=o.IncomingMessage,m=o.readyStates;function c(n,i){return w.fetch&&i?"fetch":w.mozchunkedarraybuffer?"moz-chunked-arraybuffer":w.msstream?"ms-stream":w.arraybuffer&&n?"arraybuffer":w.vbArray&&n?"text:vbarray":"text"}var g=Q.exports=function(n){var i=this;l.Writable.call(i),i._opts=n,i._body=[],i._headers={},n.auth&&i.setHeader("Authorization","Basic "+new C(n.auth).toString("base64")),(0,u.default)(n.headers).forEach(function(E){i.setHeader(E,n.headers[E])});var t,S=!0;if(n.mode==="disable-fetch"||"requestTimeout"in n&&!w.abortController)S=!1,t=!0;else if(n.mode==="prefer-streaming")t=!1;else if(n.mode==="allow-wrong-content-type")t=!w.overrideMimeType;else if(!n.mode||n.mode==="default"||n.mode==="prefer-fast")t=!0;else throw new Error("Invalid value for opts.mode");i._mode=c(t,S),i._fetchTimer=null,i.on("finish",function(){i._onFinish()})};d(g,l.Writable),g.prototype.setHeader=function(n,i){var t=this,S=n.toLowerCase();if(x.indexOf(S)!==-1)return;t._headers[S]={name:n,value:i}},g.prototype.getHeader=function(n){var i=this._headers[n.toLowerCase()];return i?i.value:null},g.prototype.removeHeader=function(n){var i=this;delete i._headers[n.toLowerCase()]},g.prototype._onFinish=function(){var n=this;if(n._destroyed)return;var i=n._opts,t=n._headers,S=null;i.method!=="GET"&&i.method!=="HEAD"&&(w.arraybuffer?S=a(C.concat(n._body)):w.blobConstructor?S=new h.Blob(n._body.map(function(y){return a(y)}),{type:(t["content-type"]||{}).value||""}):S=C.concat(n._body).toString());var E=[];if((0,u.default)(t).forEach(function(y){var p=t[y].name,T=t[y].value;Array.isArray(T)?T.forEach(function(M){E.push([p,M])}):E.push([p,T])}),n._mode==="fetch"){var s=null,P=null;if(w.abortController){var O=new AbortController;s=O.signal,n._fetchAbortController=O,"requestTimeout"in i&&i.requestTimeout!==0&&(n._fetchTimer=h.setTimeout(function(){n.emit("requestTimeout"),n._fetchAbortController&&n._fetchAbortController.abort()},i.requestTimeout))}h.fetch(n._opts.url,{method:n._opts.method,headers:E,body:S||void 0,mode:"cors",credentials:i.withCredentials?"include":"same-origin",signal:s}).then(function(y){n._fetchResponse=y,n._connect()},function(y){h.clearTimeout(n._fetchTimer),n._destroyed||n.emit("error",y)})}else{var b=n._xhr=new h.XMLHttpRequest;try{b.open(n._opts.method,n._opts.url,!0)}catch(y){L.nextTick(function(){n.emit("error",y)});return}"responseType"in b&&(b.responseType=n._mode.split(":")[0]),"withCredentials"in b&&(b.withCredentials=!!i.withCredentials),n._mode==="text"&&"overrideMimeType"in b&&b.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in i&&(b.timeout=i.requestTimeout,b.ontimeout=function(){n.emit("requestTimeout")}),E.forEach(function(y){b.setRequestHeader(y[0],y[1])}),n._response=null,b.onreadystatechange=function(){switch(b.readyState){case m.LOADING:case m.DONE:n._onXHRProgress();break}},n._mode==="moz-chunked-arraybuffer"&&(b.onprogress=function(){n._onXHRProgress()}),b.onerror=function(){if(n._destroyed)return;n.emit("error",new Error("XHR error"))};try{b.send(S)}catch(y){L.nextTick(function(){n.emit("error",y)});return}}};function v(n){try{var i=n.status;return i!==null&&i!==0}catch(t){return!1}}g.prototype._onXHRProgress=function(){var n=this;if(!v(n._xhr)||n._destroyed)return;n._response||n._connect(),n._response._onXHRProgress()},g.prototype._connect=function(){var n=this;if(n._destroyed)return;n._response=new _(n._xhr,n._fetchResponse,n._mode,n._fetchTimer),n._response.on("error",function(i){n.emit("error",i)}),n.emit("response",n._response)},g.prototype._write=function(n,i,t){var S=this;S._body.push(n),t()},g.prototype.abort=g.prototype.destroy=function(){var n=this;n._destroyed=!0,h.clearTimeout(n._fetchTimer),n._response&&(n._response._destroyed=!0),n._xhr?n._xhr.abort():n._fetchAbortController&&n._fetchAbortController.abort()},g.prototype.end=function(n,i,t){var S=this;typeof n=="function"&&(t=n,n=void 0),l.Writable.prototype.end.call(S,n,i,t)},g.prototype.flushHeaders=function(){},g.prototype.setTimeout=function(){},g.prototype.setNoDelay=function(){},g.prototype.setSocketKeepAlive=function(){};var x=["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,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"./capability":232,"./response":234,_process:208,"babel-runtime/core-js/object/keys":60,buffer:73,inherits:196,"readable-stream":223,"to-arraybuffer":237}],234:[function(j,Q,k){(function(L,h,C){"use strict";var D=j("babel-runtime/core-js/promise"),u=f(D);function f(_){return _&&_.__esModule?_:{default:_}}var w=j("./capability"),d=j("inherits"),o=j("readable-stream"),l=k.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},a=k.IncomingMessage=function(_,m,c,g){var v=this;if(o.Readable.call(v),v._mode=c,v.headers={},v.rawHeaders=[],v.trailers={},v.rawTrailers=[],v.on("end",function(){L.nextTick(function(){v.emit("close")})}),c==="fetch"){var x=function s(){i.read().then(function(P){if(v._destroyed)return;if(P.done){h.clearTimeout(g),v.push(null);return}v.push(new C(P.value)),s()}).catch(function(P){h.clearTimeout(g),v._destroyed||v.emit("error",P)})};if(v._fetchResponse=m,v.url=m.url,v.statusCode=m.status,v.statusMessage=m.statusText,m.headers.forEach(function(s,P){v.headers[P.toLowerCase()]=s,v.rawHeaders.push(P,s)}),w.writableStream){var n=new WritableStream({write:function(P){return new u.default(function(O,b){v._destroyed?b():v.push(new C(P))?O():v._resumeFetch=O})},close:function(){h.clearTimeout(g),v._destroyed||v.push(null)},abort:function(P){v._destroyed||v.emit("error",P)}});try{m.body.pipeTo(n).catch(function(s){h.clearTimeout(g),v._destroyed||v.emit("error",s)});return}catch(s){}}var i=m.body.getReader();x()}else{v._xhr=_,v._pos=0,v.url=_.responseURL,v.statusCode=_.status,v.statusMessage=_.statusText;var t=_.getAllResponseHeaders().split(/\r?\n/);if(t.forEach(function(s){var P=s.match(/^([^:]+):\s*(.*)/);if(P){var O=P[1].toLowerCase();O==="set-cookie"?(v.headers[O]===void 0&&(v.headers[O]=[]),v.headers[O].push(P[2])):v.headers[O]!==void 0?v.headers[O]+=", "+P[2]:v.headers[O]=P[2],v.rawHeaders.push(P[1],P[2])}}),v._charset="x-user-defined",!w.overrideMimeType){var S=v.rawHeaders["mime-type"];if(S){var E=S.match(/;\s*charset=([^;])(;|$)/);E&&(v._charset=E[1].toLowerCase())}v._charset||(v._charset="utf-8")}}};d(a,o.Readable),a.prototype._read=function(){var _=this,m=_._resumeFetch;m&&(_._resumeFetch=null,m())},a.prototype._onXHRProgress=function(){var _=this,m=_._xhr,c=null;switch(_._mode){case"text:vbarray":if(m.readyState!==l.DONE)break;try{c=new h.VBArray(m.responseBody).toArray()}catch(i){}if(c!==null){_.push(new C(c));break}case"text":try{c=m.responseText}catch(i){_._mode="text:vbarray";break}if(c.length>_._pos){var g=c.substr(_._pos);if(_._charset==="x-user-defined"){for(var v=new C(g.length),x=0;x<g.length;x++)v[x]=g.charCodeAt(x)&255;_.push(v)}else _.push(g,_._charset);_._pos=c.length}break;case"arraybuffer":if(m.readyState!==l.DONE||!m.response)break;c=m.response,_.push(new C(new Uint8Array(c)));break;case"moz-chunked-arraybuffer":if(c=m.response,m.readyState!==l.LOADING||!c)break;_.push(new C(new Uint8Array(c)));break;case"ms-stream":if(c=m.response,m.readyState!==l.LOADING)break;var n=new h.MSStreamReader;n.onprogress=function(){n.result.byteLength>_._pos&&(_.push(new C(new Uint8Array(n.result.slice(_._pos)))),_._pos=n.result.byteLength)},n.onload=function(){_.push(null)},n.readAsArrayBuffer(c);break}_._xhr.readyState===l.DONE&&_._mode!=="ms-stream"&&_.push(null)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(j,Q,k){"use strict";var L=j("safe-buffer").Buffer,h=L.isEncoding||function(n){n=""+n;switch(n&&n.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}};function C(n){if(!n)return"utf8";for(var i;;)switch(n){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 n;default:if(i)return;n=(""+n).toLowerCase(),i=!0}}function D(n){var i=C(n);if(typeof i!="string"&&(L.isEncoding===h||!h(n)))throw new Error("Unknown encoding: "+n);return i||n}k.StringDecoder=u;function u(n){this.encoding=D(n);var i;switch(this.encoding){case"utf16le":this.text=_,this.end=m,i=4;break;case"utf8":this.fillLast=o,i=4;break;case"base64":this.text=c,this.end=g,i=3;break;default:this.write=v,this.end=x;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=L.allocUnsafe(i)}u.prototype.write=function(n){if(n.length===0)return"";var i,t;if(this.lastNeed){if(i=this.fillLast(n),i===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<n.length?i?i+this.text(n,t):this.text(n,t):i||""},u.prototype.end=a,u.prototype.text=l,u.prototype.fillLast=function(n){if(this.lastNeed<=n.length)return n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,n.length),this.lastNeed-=n.length};function f(n){return n<=127?0:n>>5===6?2:n>>4===14?3:n>>3===30?4:n>>6===2?-1:-2}function w(n,i,t){var S=i.length-1;if(S<t)return 0;var E=f(i[S]);return E>=0?(E>0&&(n.lastNeed=E-1),E):--S<t||E===-2?0:(E=f(i[S]),E>=0?(E>0&&(n.lastNeed=E-2),E):--S<t||E===-2?0:(E=f(i[S]),E>=0?(E>0&&(E===2?E=0:n.lastNeed=E-3),E):0))}function d(n,i,t){if((i[0]&192)!==128)return n.lastNeed=0,"\uFFFD";if(n.lastNeed>1&&i.length>1){if((i[1]&192)!==128)return n.lastNeed=1,"\uFFFD";if(n.lastNeed>2&&i.length>2&&(i[2]&192)!==128)return n.lastNeed=2,"\uFFFD"}}function o(n){var i=this.lastTotal-this.lastNeed,t=d(this,n,i);if(t!==void 0)return t;if(this.lastNeed<=n.length)return n.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,i,0,n.length),this.lastNeed-=n.length}function l(n,i){var t=w(this,n,i);if(!this.lastNeed)return n.toString("utf8",i);this.lastTotal=t;var S=n.length-(t-this.lastNeed);return n.copy(this.lastChar,0,S),n.toString("utf8",i,S)}function a(n){var i=n&&n.length?this.write(n):"";return this.lastNeed?i+"\uFFFD":i}function _(n,i){if((n.length-i)%2===0){var t=n.toString("utf16le",i);if(t){var S=t.charCodeAt(t.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=n[n.length-1],n.toString("utf16le",i,n.length-1)}function m(n){var i=n&&n.length?this.write(n):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,t)}return i}function c(n,i){var t=(n.length-i)%3;return t===0?n.toString("base64",i):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=n[n.length-1]:(this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1]),n.toString("base64",i,n.length-t))}function g(n){var i=n&&n.length?this.write(n):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}function v(n){return n.toString(this.encoding)}function x(n){return n&&n.length?this.write(n):""}},{"safe-buffer":228}],236:[function(j,Q,k){(function(L,h){var C=j("process/browser.js").nextTick,D=Function.prototype.apply,u=Array.prototype.slice,f={},w=0;k.setTimeout=function(){return new d(D.call(setTimeout,window,arguments),clearTimeout)},k.setInterval=function(){return new d(D.call(setInterval,window,arguments),clearInterval)},k.clearTimeout=k.clearInterval=function(o){o.close()};function d(o,l){this._id=o,this._clearFn=l}d.prototype.unref=d.prototype.ref=function(){},d.prototype.close=function(){this._clearFn.call(window,this._id)},k.enroll=function(o,l){clearTimeout(o._idleTimeoutId),o._idleTimeout=l},k.unenroll=function(o){clearTimeout(o._idleTimeoutId),o._idleTimeout=-1},k._unrefActive=k.active=function(o){clearTimeout(o._idleTimeoutId);var l=o._idleTimeout;l>=0&&(o._idleTimeoutId=setTimeout(function(){o._onTimeout&&o._onTimeout()},l))},k.setImmediate=typeof L=="function"?L:function(o){var l=w++,a=arguments.length<2?!1:u.call(arguments,1);return f[l]=!0,C(function(){f[l]&&(a?o.apply(null,a):o.call(null),k.clearImmediate(l))}),l},k.clearImmediate=typeof h=="function"?h:function(o){delete f[o]}}).call(this,j("timers").setImmediate,j("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(j,Q,k){var L=j("buffer").Buffer;Q.exports=function(h){if(h instanceof Uint8Array){if(h.byteOffset===0&&h.byteLength===h.buffer.byteLength)return h.buffer;if(typeof h.buffer.slice=="function")return h.buffer.slice(h.byteOffset,h.byteOffset+h.byteLength)}if(L.isBuffer(h)){for(var C=new Uint8Array(h.length),D=h.length,u=0;u<D;u++)C[u]=h[u];return C.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(j,Q,k){"use strict";var L=j("punycode"),h=j("./util");k.parse=i,k.resolve=S,k.resolveObject=E,k.format=t,k.Url=C;function C(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var D=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,w=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],d=["{","}","|","\\","^","`"].concat(w),o=["'"].concat(d),l=["%","/","?",";","#"].concat(o),a=["/","?","#"],_=255,m=/^[+a-z0-9A-Z_-]{0,63}$/,c=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},n=j("querystring");function i(s,P,O){if(s&&h.isObject(s)&&s instanceof C)return s;var b=new C;return b.parse(s,P,O),b}C.prototype.parse=function(s,P,O){if(!h.isString(s))throw new TypeError("Parameter 'url' must be a string, not "+typeof s);var b=s.indexOf("?"),y=b!==-1&&b<s.indexOf("#")?"?":"#",p=s.split(y),T=/\\/g;p[0]=p[0].replace(T,"/"),s=p.join(y);var M=s;if(M=M.trim(),!O&&s.split("#").length===1){var N=f.exec(M);if(N)return this.path=M,this.href=M,this.pathname=N[1],N[2]?(this.search=N[2],P?this.query=n.parse(this.search.substr(1)):this.query=this.search.substr(1)):P&&(this.search="",this.query={}),this}var I=D.exec(M);if(I){I=I[0];var K=I.toLowerCase();this.protocol=K,M=M.substr(I.length)}if(O||I||M.match(/^\/\/[^@\/]+@[^@\/]+/)){var H=M.substr(0,2)==="//";H&&!(I&&v[I])&&(M=M.substr(2),this.slashes=!0)}if(!v[I]&&(H||I&&!x[I])){for(var W=-1,z=0;z<a.length;z++){var U=M.indexOf(a[z]);U!==-1&&(W===-1||U<W)&&(W=U)}var B,G;W===-1?G=M.lastIndexOf("@"):G=M.lastIndexOf("@",W),G!==-1&&(B=M.slice(0,G),M=M.slice(G+1),this.auth=decodeURIComponent(B)),W=-1;for(var z=0;z<l.length;z++){var U=M.indexOf(l[z]);U!==-1&&(W===-1||U<W)&&(W=U)}W===-1&&(W=M.length),this.host=M.slice(0,W),M=M.slice(W),this.parseHost(),this.hostname=this.hostname||"";var q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!q)for(var ae=this.hostname.split(/\./),z=0,se=ae.length;z<se;z++){var we=ae[z];if(!we)continue;if(!we.match(m)){for(var Se="",de=0,xe=we.length;de<xe;de++)we.charCodeAt(de)>127?Se+="x":Se+=we[de];if(!Se.match(m)){var he=ae.slice(0,z),ne=ae.slice(z+1),oe=we.match(c);oe&&(he.push(oe[1]),ne.unshift(oe[2])),ne.length&&(M="/"+ne.join(".")+M),this.hostname=he.join(".");break}}}this.hostname.length>_?this.hostname="":this.hostname=this.hostname.toLowerCase(),q||(this.hostname=L.toASCII(this.hostname));var te=this.port?":"+this.port:"",le=this.hostname||"";this.host=le+te,this.href+=this.host,q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),M[0]!=="/"&&(M="/"+M))}if(!g[K])for(var z=0,se=o.length;z<se;z++){var Y=o[z];if(M.indexOf(Y)===-1)continue;var Z=encodeURIComponent(Y);Z===Y&&(Z=escape(Y)),M=M.split(Y).join(Z)}var ge=M.indexOf("#");ge!==-1&&(this.hash=M.substr(ge),M=M.slice(0,ge));var ee=M.indexOf("?");if(ee!==-1?(this.search=M.substr(ee),this.query=M.substr(ee+1),P&&(this.query=n.parse(this.query)),M=M.slice(0,ee)):P&&(this.search="",this.query={}),M&&(this.pathname=M),x[K]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var te=this.pathname||"",$=this.search||"";this.path=te+$}return this.href=this.format(),this};function t(s){return h.isString(s)&&(s=i(s)),s instanceof C?s.format():C.prototype.format.call(s)}C.prototype.format=function(){var s=this.auth||"";s&&(s=encodeURIComponent(s),s=s.replace(/%3A/i,":"),s+="@");var P=this.protocol||"",O=this.pathname||"",b=this.hash||"",y=!1,p="";this.host?y=s+this.host:this.hostname&&(y=s+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(y+=":"+this.port)),this.query&&h.isObject(this.query)&&Object.keys(this.query).length&&(p=n.stringify(this.query));var T=this.search||p&&"?"+p||"";return P&&P.substr(-1)!==":"&&(P+=":"),this.slashes||(!P||x[P])&&y!==!1?(y="//"+(y||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):y||(y=""),b&&b.charAt(0)!=="#"&&(b="#"+b),T&&T.charAt(0)!=="?"&&(T="?"+T),O=O.replace(/[?#]/g,function(M){return encodeURIComponent(M)}),T=T.replace("#","%23"),P+y+O+T+b};function S(s,P){return i(s,!1,!0).resolve(P)}C.prototype.resolve=function(s){return this.resolveObject(i(s,!1,!0)).format()};function E(s,P){return s?i(s,!1,!0).resolveObject(P):P}C.prototype.resolveObject=function(s){if(h.isString(s)){var P=new C;P.parse(s,!1,!0),s=P}for(var O=new C,b=Object.keys(this),y=0;y<b.length;y++){var p=b[y];O[p]=this[p]}if(O.hash=s.hash,s.href==="")return O.href=O.format(),O;if(s.slashes&&!s.protocol){for(var T=Object.keys(s),M=0;M<T.length;M++){var N=T[M];N!=="protocol"&&(O[N]=s[N])}return x[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(s.protocol&&s.protocol!==O.protocol){if(!x[s.protocol]){for(var I=Object.keys(s),K=0;K<I.length;K++){var H=I[K];O[H]=s[H]}return O.href=O.format(),O}if(O.protocol=s.protocol,!s.host&&!v[s.protocol]){for(var se=(s.pathname||"").split("/");se.length&&!(s.host=se.shift()););s.host||(s.host=""),s.hostname||(s.hostname=""),se[0]!==""&&se.unshift(""),se.length<2&&se.unshift(""),O.pathname=se.join("/")}else O.pathname=s.pathname;if(O.search=s.search,O.query=s.query,O.host=s.host||"",O.auth=s.auth,O.hostname=s.hostname||s.host,O.port=s.port,O.pathname||O.search){var W=O.pathname||"",z=O.search||"";O.path=W+z}return O.slashes=O.slashes||s.slashes,O.href=O.format(),O}var U=O.pathname&&O.pathname.charAt(0)==="/",B=s.host||s.pathname&&s.pathname.charAt(0)==="/",G=B||U||O.host&&s.pathname,q=G,ae=O.pathname&&O.pathname.split("/")||[],se=s.pathname&&s.pathname.split("/")||[],we=O.protocol&&!x[O.protocol];if(we&&(O.hostname="",O.port=null,O.host&&(ae[0]===""?ae[0]=O.host:ae.unshift(O.host)),O.host="",s.protocol&&(s.hostname=null,s.port=null,s.host&&(se[0]===""?se[0]=s.host:se.unshift(s.host)),s.host=null),G=G&&(se[0]===""||ae[0]==="")),B)O.host=s.host||s.host===""?s.host:O.host,O.hostname=s.hostname||s.hostname===""?s.hostname:O.hostname,O.search=s.search,O.query=s.query,ae=se;else if(se.length)ae||(ae=[]),ae.pop(),ae=ae.concat(se),O.search=s.search,O.query=s.query;else if(!h.isNullOrUndefined(s.search)){if(we){O.hostname=O.host=ae.shift();var Se=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Se&&(O.auth=Se.shift(),O.host=O.hostname=Se.shift())}return O.search=s.search,O.query=s.query,(!h.isNull(O.pathname)||!h.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!ae.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var de=ae.slice(-1)[0],xe=(O.host||s.host||ae.length>1)&&(de==="."||de==="..")||de==="",he=0,ne=ae.length;ne>=0;ne--)de=ae[ne],de==="."?ae.splice(ne,1):de===".."?(ae.splice(ne,1),he++):he&&(ae.splice(ne,1),he--);if(!G&&!q)for(;he--;he)ae.unshift("..");G&&ae[0]!==""&&(!ae[0]||ae[0].charAt(0)!=="/")&&ae.unshift(""),xe&&ae.join("/").substr(-1)!=="/"&&ae.push("");var oe=ae[0]===""||ae[0]&&ae[0].charAt(0)==="/";if(we){O.hostname=O.host=oe?"":ae.length?ae.shift():"";var Se=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Se&&(O.auth=Se.shift(),O.host=O.hostname=Se.shift())}return G=G||O.host&&ae.length,G&&!oe&&ae.unshift(""),ae.length?O.pathname=ae.join("/"):(O.pathname=null,O.path=null),(!h.isNull(O.pathname)||!h.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=s.auth||O.auth,O.slashes=O.slashes||s.slashes,O.href=O.format(),O},C.prototype.parseHost=function(){var s=this.host,P=u.exec(s);P&&(P=P[0],P!==":"&&(this.port=P.substr(1)),s=s.substr(0,s.length-P.length)),s&&(this.hostname=s)}},{"./util":239,punycode:209,querystring:212}],239:[function(j,Q,k){"use strict";Q.exports={isString:function(L){return typeof L=="string"},isObject:function(L){return typeof L=="object"&&L!==null},isNull:function(L){return L===null},isNullOrUndefined:function(L){return L==null}}},{}],240:[function(j,Q,k){(function(L){Q.exports=h;function h(D,u){if(C("noDeprecation"))return D;var f=!1;function w(){if(!f){if(C("throwDeprecation"))throw new Error(u);C("traceDeprecation")?console.trace(u):console.warn(u),f=!0}return D.apply(this,arguments)}return w}function C(D){try{if(!L.localStorage)return!1}catch(f){return!1}var u=L.localStorage[D];return u==null?!1:String(u).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(j,Q,k){typeof Object.create=="function"?Q.exports=function(h,C){h.super_=C,h.prototype=Object.create(C.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}})}:Q.exports=function(h,C){h.super_=C;var D=function(){};D.prototype=C.prototype,h.prototype=new D,h.prototype.constructor=h}},{}],242:[function(j,Q,k){Q.exports=function(h){return h&&typeof h=="object"&&typeof h.copy=="function"&&typeof h.fill=="function"&&typeof h.readUInt8=="function"}},{}],243:[function(j,Q,k){(function(L,h){var C=/%[sdj%]/g;k.format=function(W){if(!S(W)){for(var z=[],U=0;U<arguments.length;U++)z.push(f(arguments[U]));return z.join(" ")}for(var U=1,B=arguments,G=B.length,q=String(W).replace(C,function(se){if(se==="%%")return"%";if(U>=G)return se;switch(se){case"%s":return String(B[U++]);case"%d":return Number(B[U++]);case"%j":try{return JSON.stringify(B[U++])}catch(we){return"[Circular]"}default:return se}}),ae=B[U];U<G;ae=B[++U])n(ae)||!O(ae)?q+=" "+ae:q+=" "+f(ae);return q},k.deprecate=function(W,z){if(s(h.process))return function(){return k.deprecate(W,z).apply(this,arguments)};if(L.noDeprecation===!0)return W;var U=!1;function B(){if(!U){if(L.throwDeprecation)throw new Error(z);L.traceDeprecation?console.trace(z):console.error(z),U=!0}return W.apply(this,arguments)}return B};var D={},u;k.debuglog=function(W){if(s(u)&&(u=L.env.NODE_DEBUG||""),W=W.toUpperCase(),!D[W])if(new RegExp("\\b"+W+"\\b","i").test(u)){var z=L.pid;D[W]=function(){var U=k.format.apply(k,arguments);console.error("%s %d: %s",W,z,U)}}else D[W]=function(){};return D[W]};function f(W,z){var U={seen:[],stylize:d};return arguments.length>=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),x(z)?U.showHidden=z:z&&k._extend(U,z),s(U.showHidden)&&(U.showHidden=!1),s(U.depth)&&(U.depth=2),s(U.colors)&&(U.colors=!1),s(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=w),l(U,W,U.depth)}k.inspect=f,f.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]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function w(W,z){var U=f.styles[z];return U?"["+f.colors[U][0]+"m"+W+"["+f.colors[U][1]+"m":W}function d(W,z){return W}function o(W){var z={};return W.forEach(function(U,B){z[U]=!0}),z}function l(W,z,U){if(W.customInspect&&z&&p(z.inspect)&&z.inspect!==k.inspect&&!(z.constructor&&z.constructor.prototype===z)){var B=z.inspect(U,W);return S(B)||(B=l(W,B,U)),B}var G=a(W,z);if(G)return G;var q=Object.keys(z),ae=o(q);if(W.showHidden&&(q=Object.getOwnPropertyNames(z)),y(z)&&(q.indexOf("message")>=0||q.indexOf("description")>=0))return _(z);if(q.length===0){if(p(z)){var se=z.name?": "+z.name:"";return W.stylize("[Function"+se+"]","special")}if(P(z))return W.stylize(RegExp.prototype.toString.call(z),"regexp");if(b(z))return W.stylize(Date.prototype.toString.call(z),"date");if(y(z))return _(z)}var we="",Se=!1,de=["{","}"];if(v(z)&&(Se=!0,de=["[","]"]),p(z)){var xe=z.name?": "+z.name:"";we=" [Function"+xe+"]"}if(P(z)&&(we=" "+RegExp.prototype.toString.call(z)),b(z)&&(we=" "+Date.prototype.toUTCString.call(z)),y(z)&&(we=" "+_(z)),q.length===0&&(!Se||z.length==0))return de[0]+we+de[1];if(U<0)return P(z)?W.stylize(RegExp.prototype.toString.call(z),"regexp"):W.stylize("[Object]","special");W.seen.push(z);var he;return Se?he=m(W,z,U,ae,q):he=q.map(function(ne){return c(W,z,U,ae,ne,Se)}),W.seen.pop(),g(he,we,de)}function a(W,z){if(s(z))return W.stylize("undefined","undefined");if(S(z)){var U="'"+JSON.stringify(z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return W.stylize(U,"string")}if(t(z))return W.stylize(""+z,"number");if(x(z))return W.stylize(""+z,"boolean");if(n(z))return W.stylize("null","null")}function _(W){return"["+Error.prototype.toString.call(W)+"]"}function m(W,z,U,B,G){for(var q=[],ae=0,se=z.length;ae<se;++ae)H(z,String(ae))?q.push(c(W,z,U,B,String(ae),!0)):q.push("");return G.forEach(function(we){we.match(/^\d+$/)||q.push(c(W,z,U,B,we,!0))}),q}function c(W,z,U,B,G,q){var ae,se,we;if(we=Object.getOwnPropertyDescriptor(z,G)||{value:z[G]},we.get?we.set?se=W.stylize("[Getter/Setter]","special"):se=W.stylize("[Getter]","special"):we.set&&(se=W.stylize("[Setter]","special")),H(B,G)||(ae="["+G+"]"),se||(W.seen.indexOf(we.value)<0?(n(U)?se=l(W,we.value,null):se=l(W,we.value,U-1),se.indexOf(`
|
|
|
`)>-1&&(q?se=se.split(`
|
|
|
`).map(function(Se){return" "+Se}).join(`
|
|
|
`).substr(2):se=`
|
|
|
`+se.split(`
|
|
|
`).map(function(Se){return" "+Se}).join(`
|
|
|
`))):se=W.stylize("[Circular]","special")),s(ae)){if(q&&G.match(/^\d+$/))return se;ae=JSON.stringify(""+G),ae.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ae=ae.substr(1,ae.length-2),ae=W.stylize(ae,"name")):(ae=ae.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ae=W.stylize(ae,"string"))}return ae+": "+se}function g(W,z,U){var B=0,G=W.reduce(function(q,ae){return B++,ae.indexOf(`
|
|
|
`)>=0&&B++,q+ae.replace(/\u001b\[\d\d?m/g,"").length+1},0);return G>60?U[0]+(z===""?"":z+`
|
|
|
`)+" "+W.join(`,
|
|
|
`)+" "+U[1]:U[0]+z+" "+W.join(", ")+" "+U[1]}function v(W){return Array.isArray(W)}k.isArray=v;function x(W){return typeof W=="boolean"}k.isBoolean=x;function n(W){return W===null}k.isNull=n;function i(W){return W==null}k.isNullOrUndefined=i;function t(W){return typeof W=="number"}k.isNumber=t;function S(W){return typeof W=="string"}k.isString=S;function E(W){return typeof W=="symbol"}k.isSymbol=E;function s(W){return W===void 0}k.isUndefined=s;function P(W){return O(W)&&M(W)==="[object RegExp]"}k.isRegExp=P;function O(W){return typeof W=="object"&&W!==null}k.isObject=O;function b(W){return O(W)&&M(W)==="[object Date]"}k.isDate=b;function y(W){return O(W)&&(M(W)==="[object Error]"||W instanceof Error)}k.isError=y;function p(W){return typeof W=="function"}k.isFunction=p;function T(W){return W===null||typeof W=="boolean"||typeof W=="number"||typeof W=="string"||typeof W=="symbol"||typeof W=="undefined"}k.isPrimitive=T,k.isBuffer=j("./support/isBuffer");function M(W){return Object.prototype.toString.call(W)}function N(W){return W<10?"0"+W.toString(10):W.toString(10)}var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function K(){var W=new Date,z=[N(W.getHours()),N(W.getMinutes()),N(W.getSeconds())].join(":");return[W.getDate(),I[W.getMonth()],z].join(" ")}k.log=function(){console.log("%s - %s",K(),k.format.apply(k,arguments))},k.inherits=j("inherits"),k._extend=function(W,z){if(!z||!O(z))return W;for(var U=Object.keys(z),B=U.length;B--;)W[U[B]]=z[U[B]];return W};function H(W,z){return Object.prototype.hasOwnProperty.call(W,z)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(j,Q,k){"use strict";(function(){"use strict";k.stripBOM=function(L){return L[0]==="\uFEFF"?L.substring(1):L}}).call(void 0)},{}],245:[function(j,Q,k){"use strict";var L=j("babel-runtime/helpers/typeof"),h=u(L),C=j("babel-runtime/core-js/object/keys"),D=u(C);function u(f){return f&&f.__esModule?f:{default:f}}(function(){"use strict";var f,w,d,o,l,a={}.hasOwnProperty;f=j("xmlbuilder"),w=j("./defaults").defaults,o=function(m){return typeof m=="string"&&(m.indexOf("&")>=0||m.indexOf(">")>=0||m.indexOf("<")>=0)},l=function(m){return"<![CDATA["+d(m)+"]]>"},d=function(m){return m.replace("]]>","]]]]><![CDATA[>")},k.Builder=function(){function _(m){var c,g,v;this.options={},g=w["0.2"];for(c in g){if(!a.call(g,c))continue;v=g[c],this.options[c]=v}for(c in m){if(!a.call(m,c))continue;v=m[c],this.options[c]=v}}return _.prototype.buildObject=function(m){var c,g,v,x,n;return c=this.options.attrkey,g=this.options.charkey,(0,D.default)(m).length===1&&this.options.rootName===w["0.2"].rootName?(n=(0,D.default)(m)[0],m=m[n]):n=this.options.rootName,v=function(i){return function(t,S){var E,s,P,O,b,y;if((typeof S=="undefined"?"undefined":(0,h.default)(S))!=="object")i.options.cdata&&o(S)?t.raw(l(S)):t.txt(S);else if(Array.isArray(S))for(O in S){if(!a.call(S,O))continue;s=S[O];for(b in s)P=s[b],t=v(t.ele(b),P).up()}else for(b in S){if(!a.call(S,b))continue;if(s=S[b],b===c){if((typeof s=="undefined"?"undefined":(0,h.default)(s))==="object")for(E in s)y=s[E],t=t.att(E,y)}else if(b===g)i.options.cdata&&o(s)?t=t.raw(l(s)):t=t.txt(s);else if(Array.isArray(s))for(O in s){if(!a.call(s,O))continue;P=s[O],typeof P=="string"?i.options.cdata&&o(P)?t=t.ele(b).raw(l(P)).up():t=t.ele(b,P).up():t=v(t.ele(b),P).up()}else(typeof s=="undefined"?"undefined":(0,h.default)(s))==="object"?t=v(t.ele(b),s).up():typeof s=="string"&&i.options.cdata&&o(s)?t=t.ele(b).raw(l(s)).up():(s==null&&(s=""),t=t.ele(b,s.toString()).up())}return t}}(this),x=f.create(n,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),v(x,m).end(this.options.renderOpts)},_}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(j,Q,k){"use strict";(function(){k.defaults={"0.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:""},"0.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)},{}],247:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/promise"),h=o(L),C=j("babel-runtime/core-js/object/get-own-property-names"),D=o(C),u=j("babel-runtime/core-js/object/keys"),f=o(u),w=j("babel-runtime/helpers/typeof"),d=o(w);function o(l){return l&&l.__esModule?l:{default:l}}(function(){"use strict";var l,a,_,m,c,g,v,x,n=function(E,s){return function(){return E.apply(s,arguments)}},i=function(E,s){for(var P in s)t.call(s,P)&&(E[P]=s[P]);function O(){this.constructor=E}return O.prototype=s.prototype,E.prototype=new O,E.__super__=s.prototype,E},t={}.hasOwnProperty;v=j("sax"),_=j("events"),l=j("./bom"),g=j("./processors"),x=j("timers").setImmediate,a=j("./defaults").defaults,m=function(E){return(typeof E=="undefined"?"undefined":(0,d.default)(E))==="object"&&E!=null&&(0,f.default)(E).length===0},c=function(E,s,P){var O,b,y;for(O=0,b=E.length;O<b;O++)y=E[O],s=y(s,P);return s},k.Parser=function(S){i(E,S);function E(s){this.parseStringPromise=n(this.parseStringPromise,this),this.parseString=n(this.parseString,this),this.reset=n(this.reset,this),this.assignOrPush=n(this.assignOrPush,this),this.processAsync=n(this.processAsync,this);var P,O,b;if(!(this instanceof k.Parser))return new k.Parser(s);this.options={},O=a["0.2"];for(P in O){if(!t.call(O,P))continue;b=O[P],this.options[P]=b}for(P in s){if(!t.call(s,P))continue;b=s[P],this.options[P]=b}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(g.normalize)),this.reset()}return E.prototype.processAsync=function(){var s,P;try{return this.remaining.length<=this.options.chunkSize?(s=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(s),this.saxParser.close()):(s=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(s),x(this.processAsync))}catch(O){if(P=O,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(P)}},E.prototype.assignOrPush=function(s,P,O){return P in s?(s[P]instanceof Array||(s[P]=[s[P]]),s[P].push(O)):this.options.explicitArray?s[P]=[O]:s[P]=O},E.prototype.reset=function(){var s,P,O,b;return this.removeAllListeners(),this.saxParser=v.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(y){return function(p){if(y.saxParser.resume(),!y.saxParser.errThrown)return y.saxParser.errThrown=!0,y.emit("error",p)}}(this),this.saxParser.onend=function(y){return function(){if(!y.saxParser.ended)return y.saxParser.ended=!0,y.emit("end",y.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,b=[],s=this.options.attrkey,P=this.options.charkey,this.saxParser.onopentag=function(y){return function(p){var T,M,N,I,K;if(N={},N[P]="",!y.options.ignoreAttrs){K=p.attributes;for(T in K){if(!t.call(K,T))continue;!(s in N)&&!y.options.mergeAttrs&&(N[s]={}),M=y.options.attrValueProcessors?c(y.options.attrValueProcessors,p.attributes[T],T):p.attributes[T],I=y.options.attrNameProcessors?c(y.options.attrNameProcessors,T):T,y.options.mergeAttrs?y.assignOrPush(N,I,M):N[s][I]=M}}return N["#name"]=y.options.tagNameProcessors?c(y.options.tagNameProcessors,p.name):p.name,y.options.xmlns&&(N[y.options.xmlnskey]={uri:p.uri,local:p.local}),b.push(N)}}(this),this.saxParser.onclosetag=function(y){return function(){var p,T,M,N,I,K,H,W,z,U;if(K=b.pop(),I=K["#name"],(!y.options.explicitChildren||!y.options.preserveChildrenOrder)&&delete K["#name"],K.cdata===!0&&(p=K.cdata,delete K.cdata),z=b[b.length-1],K[P].match(/^\s*$/)&&!p?(T=K[P],delete K[P]):(y.options.trim&&(K[P]=K[P].trim()),y.options.normalize&&(K[P]=K[P].replace(/\s{2,}/g," ").trim()),K[P]=y.options.valueProcessors?c(y.options.valueProcessors,K[P],I):K[P],(0,f.default)(K).length===1&&P in K&&!y.EXPLICIT_CHARKEY&&(K=K[P])),m(K)&&(K=y.options.emptyTag!==""?y.options.emptyTag:T),y.options.validator!=null&&(U="/"+function(){var B,G,q;for(q=[],B=0,G=b.length;B<G;B++)N=b[B],q.push(N["#name"]);return q}().concat(I).join("/"),function(){var B;try{return K=y.options.validator(U,z&&z[I],K)}catch(G){return B=G,y.emit("error",B)}}()),y.options.explicitChildren&&!y.options.mergeAttrs&&(typeof K=="undefined"?"undefined":(0,d.default)(K))==="object"){if(!y.options.preserveChildrenOrder)N={},y.options.attrkey in K&&(N[y.options.attrkey]=K[y.options.attrkey],delete K[y.options.attrkey]),!y.options.charsAsChildren&&y.options.charkey in K&&(N[y.options.charkey]=K[y.options.charkey],delete K[y.options.charkey]),(0,D.default)(K).length>0&&(N[y.options.childkey]=K),K=N;else if(z){z[y.options.childkey]=z[y.options.childkey]||[],H={};for(M in K){if(!t.call(K,M))continue;H[M]=K[M]}z[y.options.childkey].push(H),delete K["#name"],(0,f.default)(K).length===1&&P in K&&!y.EXPLICIT_CHARKEY&&(K=K[P])}}return b.length>0?y.assignOrPush(z,I,K):(y.options.explicitRoot&&(W=K,K={},K[I]=W),y.resultObject=K,y.saxParser.ended=!0,y.emit("end",y.resultObject))}}(this),O=function(y){return function(p){var T,M;if(M=b[b.length-1],M)return M[P]+=p,y.options.explicitChildren&&y.options.preserveChildrenOrder&&y.options.charsAsChildren&&(y.options.includeWhiteChars||p.replace(/\\n/g,"").trim()!=="")&&(M[y.options.childkey]=M[y.options.childkey]||[],T={"#name":"__text__"},T[P]=p,y.options.normalize&&(T[P]=T[P].replace(/\s{2,}/g," ").trim()),M[y.options.childkey].push(T)),M}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(y){return function(p){var T;if(T=O(p),T)return T.cdata=!0}}(this)},E.prototype.parseString=function(s,P){var O;P!=null&&typeof P=="function"&&(this.on("end",function(b){return this.reset(),P(null,b)}),this.on("error",function(b){return this.reset(),P(b)}));try{return s=s.toString(),s.trim()===""?(this.emit("end",null),!0):(s=l.stripBOM(s),this.options.async?(this.remaining=s,x(this.processAsync),this.saxParser):this.saxParser.write(s).close())}catch(b){if(O=b,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},E.prototype.parseStringPromise=function(s){return new h.default(function(P){return function(O,b){return P.parseString(s,function(y,p){return y?b(y):O(p)})}}(this))},E}(_),k.parseString=function(S,E,s){var P,O,b;return s!=null?(typeof s=="function"&&(P=s),(typeof E=="undefined"?"undefined":(0,d.default)(E))==="object"&&(O=E)):(typeof E=="function"&&(P=E),O={}),b=new k.Parser(O),b.parseString(S,P)},k.parseStringPromise=function(S,E){var s,P;return(typeof E=="undefined"?"undefined":(0,d.default)(E))==="object"&&(s=E),P=new k.Parser(s),P.parseStringPromise(S)}}).call(void 0)},{"./bom":244,"./defaults":246,"./processors":248,"babel-runtime/core-js/object/get-own-property-names":58,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/helpers/typeof":67,events:192,sax:229,timers:236}],248:[function(j,Q,k){"use strict";(function(){"use strict";var L;L=new RegExp(/(?!xmlns)^.*:/),k.normalize=function(h){return h.toLowerCase()},k.firstCharLowerCase=function(h){return h.charAt(0).toLowerCase()+h.slice(1)},k.stripPrefix=function(h){return h.replace(L,"")},k.parseNumbers=function(h){return isNaN(h)||(h=h%1===0?parseInt(h,10):parseFloat(h)),h},k.parseBooleans=function(h){return/^(?:true|false)$/i.test(h)&&(h=h.toLowerCase()==="true"),h}}).call(void 0)},{}],249:[function(j,Q,k){"use strict";(function(){"use strict";var L,h,C,D,u=function(d,o){for(var l in o)f.call(o,l)&&(d[l]=o[l]);function a(){this.constructor=d}return a.prototype=o.prototype,d.prototype=new a,d.__super__=o.prototype,d},f={}.hasOwnProperty;h=j("./defaults"),L=j("./builder"),C=j("./parser"),D=j("./processors"),k.defaults=h.defaults,k.processors=D,k.ValidationError=function(w){u(d,w);function d(o){this.message=o}return d}(Error),k.Builder=L.Builder,k.Parser=C.Parser,k.parseString=C.parseString,k.parseStringPromise=C.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(j,Q,k){"use strict";(function(){Q.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(j,Q,k){"use strict";(function(){Q.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/get-prototype-of"),h=w(L),C=j("babel-runtime/helpers/typeof"),D=w(C),u=j("babel-runtime/core-js/object/assign"),f=w(u);function w(d){return d&&d.__esModule?d:{default:d}}(function(){var d,o,l,a,_,m,c,g=[].slice,v={}.hasOwnProperty;d=function(){var n,i,t,S,E,s;if(s=arguments[0],E=2<=arguments.length?g.call(arguments,1):[],_(f.default))f.default.apply(null,arguments);else for(n=0,t=E.length;n<t;n++)if(S=E[n],S!=null)for(i in S){if(!v.call(S,i))continue;s[i]=S[i]}return s},_=function(n){return!!n&&Object.prototype.toString.call(n)==="[object Function]"},m=function(n){var i;return!!n&&((i=typeof n=="undefined"?"undefined":(0,D.default)(n))==="function"||i==="object")},l=function(n){return _(Array.isArray)?Array.isArray(n):Object.prototype.toString.call(n)==="[object Array]"},a=function(n){var i;if(l(n))return!n.length;for(i in n){if(!v.call(n,i))continue;return!1}return!0},c=function(n){var i,t;return m(n)&&(t=(0,h.default)(n))&&(i=t.constructor)&&typeof i=="function"&&i instanceof i&&Function.prototype.toString.call(i)===Function.prototype.toString.call(Object)},o=function(n){return _(n.valueOf)?n.valueOf():n},Q.exports.assign=d,Q.exports.isFunction=_,Q.exports.isObject=m,Q.exports.isArray=l,Q.exports.isEmpty=a,Q.exports.isPlainObject=c,Q.exports.getValue=o}).call(void 0)},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/get-prototype-of":59,"babel-runtime/helpers/typeof":67}],253:[function(j,Q,k){"use strict";(function(){Q.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/create"),h=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,f;D=j("./NodeType"),f=j("./XMLNode"),Q.exports=u=function(){function w(d,o,l){if(this.parent=d,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),o==null)throw new Error("Missing attribute name. "+this.debugInfo(o));this.name=this.stringify.name(o),this.value=this.stringify.attValue(l),this.type=D.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(w.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(w.prototype,"textContent",{get:function(){return this.value},set:function(o){return this.value=o||""}}),Object.defineProperty(w.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(w.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(w.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(w.prototype,"specified",{get:function(){return!0}}),w.prototype.clone=function(){return(0,h.default)(this)},w.prototype.toString=function(d){return this.options.writer.attribute(this,this.options.writer.filterOptions(d))},w.prototype.debugInfo=function(d){return d=d||this.name,d==null?"parent: <"+this.parent.name+">":"attribute: {"+d+"}, parent: <"+this.parent.name+">"},w.prototype.isEqualNode=function(d){return d.namespaceURI!==this.namespaceURI||(d.prefix!==this.prefix||d.localName!==this.localName)?!1:!(d.value!==this.value)},w}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/create"),h=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,f,w=function(l,a){for(var _ in a)d.call(a,_)&&(l[_]=a[_]);function m(){this.constructor=l}return m.prototype=a.prototype,l.prototype=new m,l.__super__=a.prototype,l},d={}.hasOwnProperty;D=j("./NodeType"),f=j("./XMLCharacterData"),Q.exports=u=function(o){w(l,o);function l(a,_){if(l.__super__.constructor.call(this,a),_==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=D.CData,this.value=this.stringify.cdata(_)}return l.prototype.clone=function(){return(0,h.default)(this)},l.prototype.toString=function(a){return this.options.writer.cdata(this,this.options.writer.filterOptions(a))},l}(f)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/create"),h=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,f=function(o,l){for(var a in l)w.call(l,a)&&(o[a]=l[a]);function _(){this.constructor=o}return _.prototype=l.prototype,o.prototype=new _,o.__super__=l.prototype,o},w={}.hasOwnProperty;u=j("./XMLNode"),Q.exports=D=function(d){f(o,d);function o(l){o.__super__.constructor.call(this,l),this.value=""}return Object.defineProperty(o.prototype,"data",{get:function(){return this.value},set:function(a){return this.value=a||""}}),Object.defineProperty(o.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(o.prototype,"textContent",{get:function(){return this.value},set:function(a){return this.value=a||""}}),o.prototype.clone=function(){return(0,h.default)(this)},o.prototype.substringData=function(l,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.appendData=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.insertData=function(l,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.deleteData=function(l,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceData=function(l,a,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isEqualNode=function(l){return o.__super__.isEqualNode.apply(this,arguments).isEqualNode(l)?!(l.data!==this.data):!1},o}(u)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/create"),h=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,f,w=function(l,a){for(var _ in a)d.call(a,_)&&(l[_]=a[_]);function m(){this.constructor=l}return m.prototype=a.prototype,l.prototype=new m,l.__super__=a.prototype,l},d={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLCharacterData"),Q.exports=f=function(o){w(l,o);function l(a,_){if(l.__super__.constructor.call(this,a),_==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=D.Comment,this.value=this.stringify.comment(_)}return l.prototype.clone=function(){return(0,h.default)(this)},l.prototype.toString=function(a){return this.options.writer.comment(this,this.options.writer.filterOptions(a))},l}(u)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/keys"),h=u(L),C=j("babel-runtime/core-js/object/create"),D=u(C);function u(f){return f&&f.__esModule?f:{default:f}}(function(){var f,w,d;w=j("./XMLDOMErrorHandler"),d=j("./XMLDOMStringList"),Q.exports=f=function(){function o(){var l;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new w,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=l=(0,D.default)(this.defaultParams)}return Object.defineProperty(o.prototype,"parameterNames",{get:function(){return new d((0,h.default)(this.defaultParams))}}),o.prototype.getParameter=function(l){return this.params.hasOwnProperty(l)?this.params[l]:null},o.prototype.canSetParameter=function(l,a){return!0},o.prototype.setParameter=function(l,a){return a!=null?this.params[l]=a:delete this.params[l]},o}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(j,Q,k){"use strict";(function(){var L;Q.exports=L=function(){function h(){}return h.prototype.handleError=function(C){throw new Error(C)},h}()}).call(void 0)},{}],260:[function(j,Q,k){"use strict";(function(){var L;Q.exports=L=function(){function h(){}return h.prototype.hasFeature=function(C,D){return!0},h.prototype.createDocumentType=function(C,D,u){throw new Error("This DOM method is not implemented.")},h.prototype.createDocument=function(C,D,u){throw new Error("This DOM method is not implemented.")},h.prototype.createHTMLDocument=function(C){throw new Error("This DOM method is not implemented.")},h.prototype.getFeature=function(C,D){throw new Error("This DOM method is not implemented.")},h}()}).call(void 0)},{}],261:[function(j,Q,k){"use strict";(function(){var L;Q.exports=L=function(){function h(C){this.arr=C||[]}return Object.defineProperty(h.prototype,"length",{get:function(){return this.arr.length}}),h.prototype.item=function(C){return this.arr[C]||null},h.prototype.contains=function(C){return this.arr.indexOf(C)!==-1},h}()}).call(void 0)},{}],262:[function(j,Q,k){"use strict";(function(){var L,h,C,D=function(w,d){for(var o in d)u.call(d,o)&&(w[o]=d[o]);function l(){this.constructor=w}return l.prototype=d.prototype,w.prototype=new l,w.__super__=d.prototype,w},u={}.hasOwnProperty;C=j("./XMLNode"),L=j("./NodeType"),Q.exports=h=function(f){D(w,f);function w(d,o,l,a,_,m){if(w.__super__.constructor.call(this,d),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(l==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(o));if(!a)throw new Error("Missing DTD attribute type. "+this.debugInfo(o));if(!_)throw new Error("Missing DTD attribute default. "+this.debugInfo(o));if(_.indexOf("#")!==0&&(_="#"+_),!_.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(o));if(m&&!_.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(o));this.elementName=this.stringify.name(o),this.type=L.AttributeDeclaration,this.attributeName=this.stringify.name(l),this.attributeType=this.stringify.dtdAttType(a),m&&(this.defaultValue=this.stringify.dtdAttDefault(m)),this.defaultValueType=_}return w.prototype.toString=function(d){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(d))},w}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(j,Q,k){"use strict";(function(){var L,h,C,D=function(w,d){for(var o in d)u.call(d,o)&&(w[o]=d[o]);function l(){this.constructor=w}return l.prototype=d.prototype,w.prototype=new l,w.__super__=d.prototype,w},u={}.hasOwnProperty;C=j("./XMLNode"),L=j("./NodeType"),Q.exports=h=function(f){D(w,f);function w(d,o,l){if(w.__super__.constructor.call(this,d),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());l||(l="(#PCDATA)"),Array.isArray(l)&&(l="("+l.join(",")+")"),this.name=this.stringify.name(o),this.type=L.ElementDeclaration,this.value=this.stringify.dtdElementValue(l)}return w.prototype.toString=function(d){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(d))},w}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(j,Q,k){"use strict";(function(){var L,h,C,D,u=function(d,o){for(var l in o)f.call(o,l)&&(d[l]=o[l]);function a(){this.constructor=d}return a.prototype=o.prototype,d.prototype=new a,d.__super__=o.prototype,d},f={}.hasOwnProperty;D=j("./Utility").isObject,C=j("./XMLNode"),L=j("./NodeType"),Q.exports=h=function(w){u(d,w);function d(o,l,a,_){if(d.__super__.constructor.call(this,o),a==null)throw new Error("Missing DTD entity name. "+this.debugInfo(a));if(_==null)throw new Error("Missing DTD entity value. "+this.debugInfo(a));if(this.pe=!!l,this.name=this.stringify.name(a),this.type=L.EntityDeclaration,!D(_))this.value=this.stringify.dtdEntityValue(_),this.internal=!0;else{if(!_.pubID&&!_.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(a));if(_.pubID&&!_.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(a));if(this.internal=!1,_.pubID!=null&&(this.pubID=this.stringify.dtdPubID(_.pubID)),_.sysID!=null&&(this.sysID=this.stringify.dtdSysID(_.sysID)),_.nData!=null&&(this.nData=this.stringify.dtdNData(_.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(a))}}return Object.defineProperty(d.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(d.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(d.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(d.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(d.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(d.prototype,"xmlVersion",{get:function(){return null}}),d.prototype.toString=function(o){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(o))},d}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(j,Q,k){"use strict";(function(){var L,h,C,D=function(w,d){for(var o in d)u.call(d,o)&&(w[o]=d[o]);function l(){this.constructor=w}return l.prototype=d.prototype,w.prototype=new l,w.__super__=d.prototype,w},u={}.hasOwnProperty;C=j("./XMLNode"),L=j("./NodeType"),Q.exports=h=function(f){D(w,f);function w(d,o,l){if(w.__super__.constructor.call(this,d),o==null)throw new Error("Missing DTD notation name. "+this.debugInfo(o));if(!l.pubID&&!l.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(o));this.name=this.stringify.name(o),this.type=L.NotationDeclaration,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID))}return Object.defineProperty(w.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(w.prototype,"systemId",{get:function(){return this.sysID}}),w.prototype.toString=function(d){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(d))},w}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(j,Q,k){"use strict";(function(){var L,h,C,D,u=function(d,o){for(var l in o)f.call(o,l)&&(d[l]=o[l]);function a(){this.constructor=d}return a.prototype=o.prototype,d.prototype=new a,d.__super__=o.prototype,d},f={}.hasOwnProperty;D=j("./Utility").isObject,C=j("./XMLNode"),L=j("./NodeType"),Q.exports=h=function(w){u(d,w);function d(o,l,a,_){var m;d.__super__.constructor.call(this,o),D(l)&&(m=l,l=m.version,a=m.encoding,_=m.standalone),l||(l="1.0"),this.type=L.Declaration,this.version=this.stringify.xmlVersion(l),a!=null&&(this.encoding=this.stringify.xmlEncoding(a)),_!=null&&(this.standalone=this.stringify.xmlStandalone(_))}return d.prototype.toString=function(o){return this.options.writer.declaration(this,this.options.writer.filterOptions(o))},d}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(j,Q,k){"use strict";(function(){var L,h,C,D,u,f,w,d,o,l=function(m,c){for(var g in c)a.call(c,g)&&(m[g]=c[g]);function v(){this.constructor=m}return v.prototype=c.prototype,m.prototype=new v,m.__super__=c.prototype,m},a={}.hasOwnProperty;o=j("./Utility").isObject,d=j("./XMLNode"),L=j("./NodeType"),h=j("./XMLDTDAttList"),D=j("./XMLDTDEntity"),C=j("./XMLDTDElement"),u=j("./XMLDTDNotation"),w=j("./XMLNamedNodeMap"),Q.exports=f=function(_){l(m,_);function m(c,g,v){var x,n,i,t,S,E;if(m.__super__.constructor.call(this,c),this.type=L.DocType,c.children){for(t=c.children,n=0,i=t.length;n<i;n++)if(x=t[n],x.type===L.Element){this.name=x.name;break}}this.documentObject=c,o(g)&&(S=g,g=S.pubID,v=S.sysID),v==null&&(E=[g,v],v=E[0],g=E[1]),g!=null&&(this.pubID=this.stringify.dtdPubID(g)),v!=null&&(this.sysID=this.stringify.dtdSysID(v))}return Object.defineProperty(m.prototype,"entities",{get:function(){var g,v,x,n,i;for(n={},i=this.children,v=0,x=i.length;v<x;v++)g=i[v],g.type===L.EntityDeclaration&&!g.pe&&(n[g.name]=g);return new w(n)}}),Object.defineProperty(m.prototype,"notations",{get:function(){var g,v,x,n,i;for(n={},i=this.children,v=0,x=i.length;v<x;v++)g=i[v],g.type===L.NotationDeclaration&&(n[g.name]=g);return new w(n)}}),Object.defineProperty(m.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(m.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(m.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),m.prototype.element=function(c,g){var v;return v=new C(this,c,g),this.children.push(v),this},m.prototype.attList=function(c,g,v,x,n){var i;return i=new h(this,c,g,v,x,n),this.children.push(i),this},m.prototype.entity=function(c,g){var v;return v=new D(this,!1,c,g),this.children.push(v),this},m.prototype.pEntity=function(c,g){var v;return v=new D(this,!0,c,g),this.children.push(v),this},m.prototype.notation=function(c,g){var v;return v=new u(this,c,g),this.children.push(v),this},m.prototype.toString=function(c){return this.options.writer.docType(this,this.options.writer.filterOptions(c))},m.prototype.ele=function(c,g){return this.element(c,g)},m.prototype.att=function(c,g,v,x,n){return this.attList(c,g,v,x,n)},m.prototype.ent=function(c,g){return this.entity(c,g)},m.prototype.pent=function(c,g){return this.pEntity(c,g)},m.prototype.not=function(c,g){return this.notation(c,g)},m.prototype.up=function(){return this.root()||this.documentObject},m.prototype.isEqualNode=function(c){return m.__super__.isEqualNode.apply(this,arguments).isEqualNode(c)?c.name!==this.name||c.publicId!==this.publicId?!1:!(c.systemId!==this.systemId):!1},m}(d)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(j,Q,k){"use strict";(function(){var L,h,C,D,u,f,w,d,o=function(_,m){for(var c in m)l.call(m,c)&&(_[c]=m[c]);function g(){this.constructor=_}return g.prototype=m.prototype,_.prototype=new g,_.__super__=m.prototype,_},l={}.hasOwnProperty;d=j("./Utility").isPlainObject,C=j("./XMLDOMImplementation"),h=j("./XMLDOMConfiguration"),u=j("./XMLNode"),L=j("./NodeType"),w=j("./XMLStringifier"),f=j("./XMLStringWriter"),Q.exports=D=function(a){o(_,a);function _(m){_.__super__.constructor.call(this,null),this.name="#document",this.type=L.Document,this.documentURI=null,this.domConfig=new h,m||(m={}),m.writer||(m.writer=new f),this.options=m,this.stringify=new w(m)}return Object.defineProperty(_.prototype,"implementation",{value:new C}),Object.defineProperty(_.prototype,"doctype",{get:function(){var c,g,v,x;for(x=this.children,g=0,v=x.length;g<v;g++)if(c=x[g],c.type===L.DocType)return c;return null}}),Object.defineProperty(_.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(_.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(_.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(_.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].encoding:null}}),Object.defineProperty(_.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(_.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(_.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(_.prototype,"origin",{get:function(){return null}}),Object.defineProperty(_.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(_.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(_.prototype,"contentType",{get:function(){return null}}),_.prototype.end=function(m){var c;return c={},m?d(m)&&(c=m,m=this.options.writer):m=this.options.writer,m.document(this,m.filterOptions(c))},_.prototype.toString=function(m){return this.options.writer.document(this,this.options.writer.filterOptions(m))},_.prototype.createElement=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createTextNode=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createComment=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createCDATASection=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createProcessingInstruction=function(m,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createAttribute=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createEntityReference=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagName=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.importNode=function(m,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createElementNS=function(m,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createAttributeNS=function(m,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagNameNS=function(m,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementById=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.adoptNode=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.renameNode=function(m,c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByClassName=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createEvent=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createNodeIterator=function(m,c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createTreeWalker=function(m,c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},_}(u)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(j,Q,k){"use strict";(function(){var L,h,C,D,u,f,w,d,o,l,a,_,m,c,g,v,x,n,i,t,S,E,s,P,O={}.hasOwnProperty;P=j("./Utility"),E=P.isObject,S=P.isFunction,s=P.isPlainObject,t=P.getValue,L=j("./NodeType"),_=j("./XMLDocument"),c=j("./XMLElement"),D=j("./XMLCData"),u=j("./XMLComment"),v=j("./XMLRaw"),i=j("./XMLText"),g=j("./XMLProcessingInstruction"),l=j("./XMLDeclaration"),a=j("./XMLDocType"),f=j("./XMLDTDAttList"),d=j("./XMLDTDEntity"),w=j("./XMLDTDElement"),o=j("./XMLDTDNotation"),C=j("./XMLAttribute"),n=j("./XMLStringifier"),x=j("./XMLStringWriter"),h=j("./WriterState"),Q.exports=m=function(){function b(y,p,T){var M;this.name="?xml",this.type=L.Document,y||(y={}),M={},y.writer?s(y.writer)&&(M=y.writer,y.writer=new x):y.writer=new x,this.options=y,this.writer=y.writer,this.writerOptions=this.writer.filterOptions(M),this.stringify=new n(y),this.onDataCallback=p||function(){},this.onEndCallback=T||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return b.prototype.createChildNode=function(y){var p,T,M,N,I,K,H,W;switch(y.type){case L.CData:this.cdata(y.value);break;case L.Comment:this.comment(y.value);break;case L.Element:M={},H=y.attribs;for(T in H){if(!O.call(H,T))continue;p=H[T],M[T]=p.value}this.node(y.name,M);break;case L.Dummy:this.dummy();break;case L.Raw:this.raw(y.value);break;case L.Text:this.text(y.value);break;case L.ProcessingInstruction:this.instruction(y.target,y.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+y.constructor.name)}for(W=y.children,I=0,K=W.length;I<K;I++)N=W[I],this.createChildNode(N),N.type===L.Element&&this.up();return this},b.prototype.dummy=function(){return this},b.prototype.node=function(y,p,T){var M;if(y==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(y));return this.openCurrent(),y=t(y),p==null&&(p={}),p=t(p),E(p)||(M=[p,T],T=M[0],p=M[1]),this.currentNode=new c(this,y,p),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,T!=null&&this.text(T),this},b.prototype.element=function(y,p,T){var M,N,I,K,H,W;if(this.currentNode&&this.currentNode.type===L.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(y)||E(y)||S(y))for(K=this.options.noValidation,this.options.noValidation=!0,W=new _(this.options).element("TEMP_ROOT"),W.element(y),this.options.noValidation=K,H=W.children,N=0,I=H.length;N<I;N++)M=H[N],this.createChildNode(M),M.type===L.Element&&this.up();else this.node(y,p,T);return this},b.prototype.attribute=function(y,p){var T,M;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(y));if(y!=null&&(y=t(y)),E(y))for(T in y){if(!O.call(y,T))continue;M=y[T],this.attribute(T,M)}else S(p)&&(p=p.apply()),this.options.keepNullAttributes&&p==null?this.currentNode.attribs[y]=new C(this,y,""):p!=null&&(this.currentNode.attribs[y]=new C(this,y,p));return this},b.prototype.text=function(y){var p;return this.openCurrent(),p=new i(this,y),this.onData(this.writer.text(p,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.cdata=function(y){var p;return this.openCurrent(),p=new D(this,y),this.onData(this.writer.cdata(p,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.comment=function(y){var p;return this.openCurrent(),p=new u(this,y),this.onData(this.writer.comment(p,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.raw=function(y){var p;return this.openCurrent(),p=new v(this,y),this.onData(this.writer.raw(p,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.instruction=function(y,p){var T,M,N,I,K;if(this.openCurrent(),y!=null&&(y=t(y)),p!=null&&(p=t(p)),Array.isArray(y))for(T=0,I=y.length;T<I;T++)M=y[T],this.instruction(M);else if(E(y))for(M in y){if(!O.call(y,M))continue;N=y[M],this.instruction(M,N)}else S(p)&&(p=p.apply()),K=new g(this,y,p),this.onData(this.writer.processingInstruction(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},b.prototype.declaration=function(y,p,T){var M;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return M=new l(this,y,p,T),this.onData(this.writer.declaration(M,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.doctype=function(y,p,T){if(this.openCurrent(),y==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 a(this,p,T),this.currentNode.rootNodeName=y,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},b.prototype.dtdElement=function(y,p){var T;return this.openCurrent(),T=new w(this,y,p),this.onData(this.writer.dtdElement(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.attList=function(y,p,T,M,N){var I;return this.openCurrent(),I=new f(this,y,p,T,M,N),this.onData(this.writer.dtdAttList(I,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.entity=function(y,p){var T;return this.openCurrent(),T=new d(this,!1,y,p),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.pEntity=function(y,p){var T;return this.openCurrent(),T=new d(this,!0,y,p),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.notation=function(y,p){var T;return this.openCurrent(),T=new o(this,y,p),this.onData(this.writer.dtdNotation(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.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},b.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},b.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},b.prototype.openNode=function(y){var p,T,M,N;if(!y.isOpen){if(!this.root&&this.currentLevel===0&&y.type===L.Element&&(this.root=y),T="",y.type===L.Element){this.writerOptions.state=h.OpenTag,T=this.writer.indent(y,this.writerOptions,this.currentLevel)+"<"+y.name,N=y.attribs;for(M in N){if(!O.call(N,M))continue;p=N[M],T+=this.writer.attribute(p,this.writerOptions,this.currentLevel)}T+=(y.children?">":"/>")+this.writer.endline(y,this.writerOptions,this.currentLevel),this.writerOptions.state=h.InsideTag}else this.writerOptions.state=h.OpenTag,T=this.writer.indent(y,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+y.rootNodeName,y.pubID&&y.sysID?T+=' PUBLIC "'+y.pubID+'" "'+y.sysID+'"':y.sysID&&(T+=' SYSTEM "'+y.sysID+'"'),y.children?(T+=" [",this.writerOptions.state=h.InsideTag):(this.writerOptions.state=h.CloseTag,T+=">"),T+=this.writer.endline(y,this.writerOptions,this.currentLevel);return this.onData(T,this.currentLevel),y.isOpen=!0}},b.prototype.closeNode=function(y){var p;if(!y.isClosed)return p="",this.writerOptions.state=h.CloseTag,y.type===L.Element?p=this.writer.indent(y,this.writerOptions,this.currentLevel)+"</"+y.name+">"+this.writer.endline(y,this.writerOptions,this.currentLevel):p=this.writer.indent(y,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(y,this.writerOptions,this.currentLevel),this.writerOptions.state=h.None,this.onData(p,this.currentLevel),y.isClosed=!0},b.prototype.onData=function(y,p){return this.documentStarted=!0,this.onDataCallback(y,p+1)},b.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},b.prototype.debugInfo=function(y){return y==null?"":"node: <"+y+">"},b.prototype.ele=function(){return this.element.apply(this,arguments)},b.prototype.nod=function(y,p,T){return this.node(y,p,T)},b.prototype.txt=function(y){return this.text(y)},b.prototype.dat=function(y){return this.cdata(y)},b.prototype.com=function(y){return this.comment(y)},b.prototype.ins=function(y,p){return this.instruction(y,p)},b.prototype.dec=function(y,p,T){return this.declaration(y,p,T)},b.prototype.dtd=function(y,p,T){return this.doctype(y,p,T)},b.prototype.e=function(y,p,T){return this.element(y,p,T)},b.prototype.n=function(y,p,T){return this.node(y,p,T)},b.prototype.t=function(y){return this.text(y)},b.prototype.d=function(y){return this.cdata(y)},b.prototype.c=function(y){return this.comment(y)},b.prototype.r=function(y){return this.raw(y)},b.prototype.i=function(y,p){return this.instruction(y,p)},b.prototype.att=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},b.prototype.a=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},b.prototype.ent=function(y,p){return this.entity(y,p)},b.prototype.pent=function(y,p){return this.pEntity(y,p)},b.prototype.not=function(y,p){return this.notation(y,p)},b}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/create"),h=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,f,w=function(l,a){for(var _ in a)d.call(a,_)&&(l[_]=a[_]);function m(){this.constructor=l}return m.prototype=a.prototype,l.prototype=new m,l.__super__=a.prototype,l},d={}.hasOwnProperty;f=j("./XMLNode"),D=j("./NodeType"),Q.exports=u=function(o){w(l,o);function l(a){l.__super__.constructor.call(this,a),this.type=D.Dummy}return l.prototype.clone=function(){return(0,h.default)(this)},l.prototype.toString=function(a){return""},l}(f)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/create"),h=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,f,w,d,o,l,a,_,m=function(v,x){for(var n in x)c.call(x,n)&&(v[n]=x[n]);function i(){this.constructor=v}return i.prototype=x.prototype,v.prototype=new i,v.__super__=x.prototype,v},c={}.hasOwnProperty;_=j("./Utility"),a=_.isObject,l=_.isFunction,o=_.getValue,d=j("./XMLNode"),D=j("./NodeType"),u=j("./XMLAttribute"),w=j("./XMLNamedNodeMap"),Q.exports=f=function(g){m(v,g);function v(x,n,i){var t,S,E,s;if(v.__super__.constructor.call(this,x),n==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(n),this.type=D.Element,this.attribs={},this.schemaTypeInfo=null,i!=null&&this.attribute(i),x.type===D.Document&&(this.isRoot=!0,this.documentObject=x,x.rootObject=this,x.children)){for(s=x.children,S=0,E=s.length;S<E;S++)if(t=s[S],t.type===D.DocType){t.name=this.name;break}}}return Object.defineProperty(v.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(v.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(v.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(v.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(v.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(v.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(v.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(v.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new w(this.attribs)),this.attributeMap}}),v.prototype.clone=function(){var x,n,i,t;i=(0,h.default)(this),i.isRoot&&(i.documentObject=null),i.attribs={},t=this.attribs;for(n in t){if(!c.call(t,n))continue;x=t[n],i.attribs[n]=x.clone()}return i.children=[],this.children.forEach(function(S){var E;return E=S.clone(),E.parent=i,i.children.push(E)}),i},v.prototype.attribute=function(x,n){var i,t;if(x!=null&&(x=o(x)),a(x))for(i in x){if(!c.call(x,i))continue;t=x[i],this.attribute(i,t)}else l(n)&&(n=n.apply()),this.options.keepNullAttributes&&n==null?this.attribs[x]=new u(this,x,""):n!=null&&(this.attribs[x]=new u(this,x,n));return this},v.prototype.removeAttribute=function(x){var n,i,t;if(x==null)throw new Error("Missing attribute name. "+this.debugInfo());if(x=o(x),Array.isArray(x))for(i=0,t=x.length;i<t;i++)n=x[i],delete this.attribs[n];else delete this.attribs[x];return this},v.prototype.toString=function(x){return this.options.writer.element(this,this.options.writer.filterOptions(x))},v.prototype.att=function(x,n){return this.attribute(x,n)},v.prototype.a=function(x,n){return this.attribute(x,n)},v.prototype.getAttribute=function(x){return this.attribs.hasOwnProperty(x)?this.attribs[x].value:null},v.prototype.setAttribute=function(x,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getAttributeNode=function(x){return this.attribs.hasOwnProperty(x)?this.attribs[x]:null},v.prototype.setAttributeNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.removeAttributeNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getElementsByTagName=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getAttributeNS=function(x,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.setAttributeNS=function(x,n,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.removeAttributeNS=function(x,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getAttributeNodeNS=function(x,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.setAttributeNodeNS=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getElementsByTagNameNS=function(x,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.hasAttribute=function(x){return this.attribs.hasOwnProperty(x)},v.prototype.hasAttributeNS=function(x,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.setIdAttribute=function(x,n){return this.attribs.hasOwnProperty(x)?this.attribs[x].isId:n},v.prototype.setIdAttributeNS=function(x,n,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.setIdAttributeNode=function(x,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getElementsByTagName=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getElementsByTagNameNS=function(x,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getElementsByClassName=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.isEqualNode=function(x){var n,i,t;if(!v.__super__.isEqualNode.apply(this,arguments).isEqualNode(x))return!1;if(x.namespaceURI!==this.namespaceURI)return!1;if(x.prefix!==this.prefix)return!1;if(x.localName!==this.localName)return!1;if(x.attribs.length!==this.attribs.length)return!1;for(n=i=0,t=this.attribs.length-1;0<=t?i<=t:i>=t;n=0<=t?++i:--i)if(!this.attribs[n].isEqualNode(x.attribs[n]))return!1;return!0},v}(d)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/keys"),h=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D;Q.exports=D=function(){function u(f){this.nodes=f}return Object.defineProperty(u.prototype,"length",{get:function(){return(0,h.default)(this.nodes).length||0}}),u.prototype.clone=function(){return this.nodes=null},u.prototype.getNamedItem=function(f){return this.nodes[f]},u.prototype.setNamedItem=function(f){var w;return w=this.nodes[f.nodeName],this.nodes[f.nodeName]=f,w||null},u.prototype.removeNamedItem=function(f){var w;return w=this.nodes[f],delete this.nodes[f],w||null},u.prototype.item=function(f){return this.nodes[(0,h.default)(this.nodes)[f]]||null},u.prototype.getNamedItemNS=function(f,w){throw new Error("This DOM method is not implemented.")},u.prototype.setNamedItemNS=function(f){throw new Error("This DOM method is not implemented.")},u.prototype.removeNamedItemNS=function(f,w){throw new Error("This DOM method is not implemented.")},u}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(j,Q,k){"use strict";(function(){var L,h,C,D,u,f,w,d,o,l,a,_,m,c,g,v,x,n,i,t={}.hasOwnProperty;i=j("./Utility"),n=i.isObject,x=i.isFunction,v=i.isEmpty,g=i.getValue,d=null,C=null,D=null,u=null,f=null,m=null,c=null,_=null,w=null,h=null,a=null,o=null,L=null,Q.exports=l=function(){function S(E){this.parent=E,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,d||(d=j("./XMLElement"),C=j("./XMLCData"),D=j("./XMLComment"),u=j("./XMLDeclaration"),f=j("./XMLDocType"),m=j("./XMLRaw"),c=j("./XMLText"),_=j("./XMLProcessingInstruction"),w=j("./XMLDummy"),h=j("./NodeType"),a=j("./XMLNodeList"),o=j("./XMLNamedNodeMap"),L=j("./DocumentPosition"))}return Object.defineProperty(S.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(S.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(S.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(S.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new a(this.children)),this.childNodeList}}),Object.defineProperty(S.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(S.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(S.prototype,"previousSibling",{get:function(){var s;return s=this.parent.children.indexOf(this),this.parent.children[s-1]||null}}),Object.defineProperty(S.prototype,"nextSibling",{get:function(){var s;return s=this.parent.children.indexOf(this),this.parent.children[s+1]||null}}),Object.defineProperty(S.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(S.prototype,"textContent",{get:function(){var s,P,O,b,y;if(this.nodeType===h.Element||this.nodeType===h.DocumentFragment){for(y="",b=this.children,P=0,O=b.length;P<O;P++)s=b[P],s.textContent&&(y+=s.textContent);return y}else return null},set:function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),S.prototype.setParent=function(E){var s,P,O,b,y;for(this.parent=E,E&&(this.options=E.options,this.stringify=E.stringify),b=this.children,y=[],P=0,O=b.length;P<O;P++)s=b[P],y.push(s.setParent(this));return y},S.prototype.element=function(E,s,P){var O,b,y,p,T,M,N,I,K,H,W;if(M=null,s===null&&P==null&&(K=[{},null],s=K[0],P=K[1]),s==null&&(s={}),s=g(s),n(s)||(H=[s,P],P=H[0],s=H[1]),E!=null&&(E=g(E)),Array.isArray(E))for(y=0,N=E.length;y<N;y++)b=E[y],M=this.element(b);else if(x(E))M=this.element(E.apply());else if(n(E))for(T in E){if(!t.call(E,T))continue;if(W=E[T],x(W)&&(W=W.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&T.indexOf(this.stringify.convertAttKey)===0)M=this.attribute(T.substr(this.stringify.convertAttKey.length),W);else if(!this.options.separateArrayItems&&Array.isArray(W)&&v(W))M=this.dummy();else if(n(W)&&v(W))M=this.element(T);else if(!this.options.keepNullNodes&&W==null)M=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(W))for(p=0,I=W.length;p<I;p++)b=W[p],O={},O[T]=b,M=this.element(O);else n(W)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&T.indexOf(this.stringify.convertTextKey)===0?M=this.element(W):(M=this.element(T),M.element(W)):M=this.element(T,W)}else!this.options.keepNullNodes&&P===null?M=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&E.indexOf(this.stringify.convertTextKey)===0?M=this.text(P):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&E.indexOf(this.stringify.convertCDataKey)===0?M=this.cdata(P):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&E.indexOf(this.stringify.convertCommentKey)===0?M=this.comment(P):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&E.indexOf(this.stringify.convertRawKey)===0?M=this.raw(P):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&E.indexOf(this.stringify.convertPIKey)===0?M=this.instruction(E.substr(this.stringify.convertPIKey.length),P):M=this.node(E,s,P);if(M==null)throw new Error("Could not create any elements with: "+E+". "+this.debugInfo());return M},S.prototype.insertBefore=function(E,s,P){var O,b,y,p,T;if(E!=null?E.type:void 0)return y=E,p=s,y.setParent(this),p?(b=children.indexOf(p),T=children.splice(b),children.push(y),Array.prototype.push.apply(children,T)):children.push(y),y;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(E));return b=this.parent.children.indexOf(this),T=this.parent.children.splice(b),O=this.parent.element(E,s,P),Array.prototype.push.apply(this.parent.children,T),O},S.prototype.insertAfter=function(E,s,P){var O,b,y;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(E));return b=this.parent.children.indexOf(this),y=this.parent.children.splice(b+1),O=this.parent.element(E,s,P),Array.prototype.push.apply(this.parent.children,y),O},S.prototype.remove=function(){var E,s;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return E=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[E,E-E+1].concat(s=[])),this.parent},S.prototype.node=function(E,s,P){var O,b;return E!=null&&(E=g(E)),s||(s={}),s=g(s),n(s)||(b=[s,P],P=b[0],s=b[1]),O=new d(this,E,s),P!=null&&O.text(P),this.children.push(O),O},S.prototype.text=function(E){var s;return n(E)&&this.element(E),s=new c(this,E),this.children.push(s),this},S.prototype.cdata=function(E){var s;return s=new C(this,E),this.children.push(s),this},S.prototype.comment=function(E){var s;return s=new D(this,E),this.children.push(s),this},S.prototype.commentBefore=function(E){var s,P,O;return P=this.parent.children.indexOf(this),O=this.parent.children.splice(P),s=this.parent.comment(E),Array.prototype.push.apply(this.parent.children,O),this},S.prototype.commentAfter=function(E){var s,P,O;return P=this.parent.children.indexOf(this),O=this.parent.children.splice(P+1),s=this.parent.comment(E),Array.prototype.push.apply(this.parent.children,O),this},S.prototype.raw=function(E){var s;return s=new m(this,E),this.children.push(s),this},S.prototype.dummy=function(){var E;return E=new w(this),E},S.prototype.instruction=function(E,s){var P,O,b,y,p;if(E!=null&&(E=g(E)),s!=null&&(s=g(s)),Array.isArray(E))for(y=0,p=E.length;y<p;y++)P=E[y],this.instruction(P);else if(n(E))for(P in E){if(!t.call(E,P))continue;O=E[P],this.instruction(P,O)}else x(s)&&(s=s.apply()),b=new _(this,E,s),this.children.push(b);return this},S.prototype.instructionBefore=function(E,s){var P,O,b;return O=this.parent.children.indexOf(this),b=this.parent.children.splice(O),P=this.parent.instruction(E,s),Array.prototype.push.apply(this.parent.children,b),this},S.prototype.instructionAfter=function(E,s){var P,O,b;return O=this.parent.children.indexOf(this),b=this.parent.children.splice(O+1),P=this.parent.instruction(E,s),Array.prototype.push.apply(this.parent.children,b),this},S.prototype.declaration=function(E,s,P){var O,b;return O=this.document(),b=new u(O,E,s,P),O.children.length===0?O.children.unshift(b):O.children[0].type===h.Declaration?O.children[0]=b:O.children.unshift(b),O.root()||O},S.prototype.dtd=function(E,s){var P,O,b,y,p,T,M,N,I,K;for(O=this.document(),b=new f(O,E,s),I=O.children,y=p=0,M=I.length;p<M;y=++p)if(P=I[y],P.type===h.DocType)return O.children[y]=b,b;for(K=O.children,y=T=0,N=K.length;T<N;y=++T)if(P=K[y],P.isRoot)return O.children.splice(y,0,b),b;return O.children.push(b),b},S.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},S.prototype.root=function(){var E;for(E=this;E;){if(E.type===h.Document)return E.rootObject;if(E.isRoot)return E;E=E.parent}},S.prototype.document=function(){var E;for(E=this;E;){if(E.type===h.Document)return E;E=E.parent}},S.prototype.end=function(E){return this.document().end(E)},S.prototype.prev=function(){var E;if(E=this.parent.children.indexOf(this),E<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[E-1]},S.prototype.next=function(){var E;if(E=this.parent.children.indexOf(this),E===-1||E===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[E+1]},S.prototype.importDocument=function(E){var s;return s=E.root().clone(),s.parent=this,s.isRoot=!1,this.children.push(s),this},S.prototype.debugInfo=function(E){var s,P;return E=E||this.name,E==null&&!((s=this.parent)!=null?s.name:void 0)?"":E==null?"parent: <"+this.parent.name+">":((P=this.parent)!=null?P.name:void 0)?"node: <"+E+">, parent: <"+this.parent.name+">":"node: <"+E+">"},S.prototype.ele=function(E,s,P){return this.element(E,s,P)},S.prototype.nod=function(E,s,P){return this.node(E,s,P)},S.prototype.txt=function(E){return this.text(E)},S.prototype.dat=function(E){return this.cdata(E)},S.prototype.com=function(E){return this.comment(E)},S.prototype.ins=function(E,s){return this.instruction(E,s)},S.prototype.doc=function(){return this.document()},S.prototype.dec=function(E,s,P){return this.declaration(E,s,P)},S.prototype.e=function(E,s,P){return this.element(E,s,P)},S.prototype.n=function(E,s,P){return this.node(E,s,P)},S.prototype.t=function(E){return this.text(E)},S.prototype.d=function(E){return this.cdata(E)},S.prototype.c=function(E){return this.comment(E)},S.prototype.r=function(E){return this.raw(E)},S.prototype.i=function(E,s){return this.instruction(E,s)},S.prototype.u=function(){return this.up()},S.prototype.importXMLBuilder=function(E){return this.importDocument(E)},S.prototype.replaceChild=function(E,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.removeChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.appendChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.hasChildNodes=function(){return this.children.length!==0},S.prototype.cloneNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isSupported=function(E,s){return!0},S.prototype.hasAttributes=function(){return this.attribs.length!==0},S.prototype.compareDocumentPosition=function(E){var s,P;return s=this,s===E?0:this.document()!==E.document()?(P=L.Disconnected|L.ImplementationSpecific,Math.random()<.5?P|=L.Preceding:P|=L.Following,P):s.isAncestor(E)?L.Contains|L.Preceding:s.isDescendant(E)?L.Contains|L.Following:s.isPreceding(E)?L.Preceding:L.Following},S.prototype.isSameNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupPrefix=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isDefaultNamespace=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupNamespaceURI=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isEqualNode=function(E){var s,P,O;if(E.nodeType!==this.nodeType)return!1;if(E.children.length!==this.children.length)return!1;for(s=P=0,O=this.children.length-1;0<=O?P<=O:P>=O;s=0<=O?++P:--P)if(!this.children[s].isEqualNode(E.children[s]))return!1;return!0},S.prototype.getFeature=function(E,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setUserData=function(E,s,P){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getUserData=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.contains=function(E){return E?E===this||this.isDescendant(E):!1},S.prototype.isDescendant=function(E){var s,P,O,b,y;for(y=this.children,O=0,b=y.length;O<b;O++){if(s=y[O],E===s)return!0;if(P=s.isDescendant(E),P)return!0}return!1},S.prototype.isAncestor=function(E){return E.isDescendant(this)},S.prototype.isPreceding=function(E){var s,P;return s=this.treePosition(E),P=this.treePosition(this),s===-1||P===-1?!1:s<P},S.prototype.isFollowing=function(E){var s,P;return s=this.treePosition(E),P=this.treePosition(this),s===-1||P===-1?!1:s>P},S.prototype.treePosition=function(E){var s,P;return P=0,s=!1,this.foreachTreeNode(this.document(),function(O){if(P++,!s&&O===E)return s=!0}),s?P:-1},S.prototype.foreachTreeNode=function(E,s){var P,O,b,y,p;for(E||(E=this.document()),y=E.children,O=0,b=y.length;O<b;O++){if(P=y[O],p=s(P))return p;if(p=this.foreachTreeNode(P,s),p)return p}},S}()}).call(void 0)},{"./DocumentPosition":250,"./NodeType":251,"./Utility":252,"./XMLCData":255,"./XMLComment":257,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLNamedNodeMap":272,"./XMLNodeList":274,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],274:[function(j,Q,k){"use strict";(function(){var L;Q.exports=L=function(){function h(C){this.nodes=C}return Object.defineProperty(h.prototype,"length",{get:function(){return this.nodes.length||0}}),h.prototype.clone=function(){return this.nodes=null},h.prototype.item=function(C){return this.nodes[C]||null},h}()}).call(void 0)},{}],275:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/create"),h=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,f,w=function(l,a){for(var _ in a)d.call(a,_)&&(l[_]=a[_]);function m(){this.constructor=l}return m.prototype=a.prototype,l.prototype=new m,l.__super__=a.prototype,l},d={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLCharacterData"),Q.exports=f=function(o){w(l,o);function l(a,_,m){if(l.__super__.constructor.call(this,a),_==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=D.ProcessingInstruction,this.target=this.stringify.insTarget(_),this.name=this.target,m&&(this.value=this.stringify.insValue(m))}return l.prototype.clone=function(){return(0,h.default)(this)},l.prototype.toString=function(a){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(a))},l.prototype.isEqualNode=function(a){return l.__super__.isEqualNode.apply(this,arguments).isEqualNode(a)?!(a.target!==this.target):!1},l}(u)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/create"),h=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,f,w=function(l,a){for(var _ in a)d.call(a,_)&&(l[_]=a[_]);function m(){this.constructor=l}return m.prototype=a.prototype,l.prototype=new m,l.__super__=a.prototype,l},d={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLNode"),Q.exports=f=function(o){w(l,o);function l(a,_){if(l.__super__.constructor.call(this,a),_==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=D.Raw,this.value=this.stringify.raw(_)}return l.prototype.clone=function(){return(0,h.default)(this)},l.prototype.toString=function(a){return this.options.writer.raw(this,this.options.writer.filterOptions(a))},l}(u)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(j,Q,k){"use strict";(function(){var L,h,C,D,u=function(d,o){for(var l in o)f.call(o,l)&&(d[l]=o[l]);function a(){this.constructor=d}return a.prototype=o.prototype,d.prototype=new a,d.__super__=o.prototype,d},f={}.hasOwnProperty;L=j("./NodeType"),D=j("./XMLWriterBase"),h=j("./WriterState"),Q.exports=C=function(w){u(d,w);function d(o,l){this.stream=o,d.__super__.constructor.call(this,l)}return d.prototype.endline=function(o,l,a){return o.isLastRootNode&&l.state===h.CloseTag?"":d.__super__.endline.call(this,o,l,a)},d.prototype.document=function(o,l){var a,_,m,c,g,v,x,n,i;for(x=o.children,_=m=0,g=x.length;m<g;_=++m)a=x[_],a.isLastRootNode=_===o.children.length-1;for(l=this.filterOptions(l),n=o.children,i=[],c=0,v=n.length;c<v;c++)a=n[c],i.push(this.writeChildNode(a,l,0));return i},d.prototype.attribute=function(o,l,a){return this.stream.write(d.__super__.attribute.call(this,o,l,a))},d.prototype.cdata=function(o,l,a){return this.stream.write(d.__super__.cdata.call(this,o,l,a))},d.prototype.comment=function(o,l,a){return this.stream.write(d.__super__.comment.call(this,o,l,a))},d.prototype.declaration=function(o,l,a){return this.stream.write(d.__super__.declaration.call(this,o,l,a))},d.prototype.docType=function(o,l,a){var _,m,c,g;if(a||(a=0),this.openNode(o,l,a),l.state=h.OpenTag,this.stream.write(this.indent(o,l,a)),this.stream.write("<!DOCTYPE "+o.root().name),o.pubID&&o.sysID?this.stream.write(' PUBLIC "'+o.pubID+'" "'+o.sysID+'"'):o.sysID&&this.stream.write(' SYSTEM "'+o.sysID+'"'),o.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(o,l,a)),l.state=h.InsideTag,g=o.children,m=0,c=g.length;m<c;m++)_=g[m],this.writeChildNode(_,l,a+1);l.state=h.CloseTag,this.stream.write("]")}return l.state=h.CloseTag,this.stream.write(l.spaceBeforeSlash+">"),this.stream.write(this.endline(o,l,a)),l.state=h.None,this.closeNode(o,l,a)},d.prototype.element=function(o,l,a){var _,m,c,g,v,x,n,i,t,S;a||(a=0),this.openNode(o,l,a),l.state=h.OpenTag,this.stream.write(this.indent(o,l,a)+"<"+o.name),t=o.attribs;for(n in t){if(!f.call(t,n))continue;_=t[n],this.attribute(_,l,a)}if(c=o.children.length,g=c===0?null:o.children[0],c===0||o.children.every(function(E){return(E.type===L.Text||E.type===L.Raw)&&E.value===""}))l.allowEmpty?(this.stream.write(">"),l.state=h.CloseTag,this.stream.write("</"+o.name+">")):(l.state=h.CloseTag,this.stream.write(l.spaceBeforeSlash+"/>"));else if(l.pretty&&c===1&&(g.type===L.Text||g.type===L.Raw)&&g.value!=null)this.stream.write(">"),l.state=h.InsideTag,l.suppressPrettyCount++,i=!0,this.writeChildNode(g,l,a+1),l.suppressPrettyCount--,i=!1,l.state=h.CloseTag,this.stream.write("</"+o.name+">");else{for(this.stream.write(">"+this.endline(o,l,a)),l.state=h.InsideTag,S=o.children,v=0,x=S.length;v<x;v++)m=S[v],this.writeChildNode(m,l,a+1);l.state=h.CloseTag,this.stream.write(this.indent(o,l,a)+"</"+o.name+">")}return this.stream.write(this.endline(o,l,a)),l.state=h.None,this.closeNode(o,l,a)},d.prototype.processingInstruction=function(o,l,a){return this.stream.write(d.__super__.processingInstruction.call(this,o,l,a))},d.prototype.raw=function(o,l,a){return this.stream.write(d.__super__.raw.call(this,o,l,a))},d.prototype.text=function(o,l,a){return this.stream.write(d.__super__.text.call(this,o,l,a))},d.prototype.dtdAttList=function(o,l,a){return this.stream.write(d.__super__.dtdAttList.call(this,o,l,a))},d.prototype.dtdElement=function(o,l,a){return this.stream.write(d.__super__.dtdElement.call(this,o,l,a))},d.prototype.dtdEntity=function(o,l,a){return this.stream.write(d.__super__.dtdEntity.call(this,o,l,a))},d.prototype.dtdNotation=function(o,l,a){return this.stream.write(d.__super__.dtdNotation.call(this,o,l,a))},d}(D)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(j,Q,k){"use strict";(function(){var L,h,C=function(f,w){for(var d in w)D.call(w,d)&&(f[d]=w[d]);function o(){this.constructor=f}return o.prototype=w.prototype,f.prototype=new o,f.__super__=w.prototype,f},D={}.hasOwnProperty;h=j("./XMLWriterBase"),Q.exports=L=function(u){C(f,u);function f(w){f.__super__.constructor.call(this,w)}return f.prototype.document=function(w,d){var o,l,a,_,m;for(d=this.filterOptions(d),_="",m=w.children,l=0,a=m.length;l<a;l++)o=m[l],_+=this.writeChildNode(o,d,0);return d.pretty&&_.slice(-d.newline.length)===d.newline&&(_=_.slice(0,-d.newline.length)),_},f}(h)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(j,Q,k){"use strict";(function(){var L,h=function(u,f){return function(){return u.apply(f,arguments)}},C={}.hasOwnProperty;Q.exports=L=function(){function D(u){this.assertLegalName=h(this.assertLegalName,this),this.assertLegalChar=h(this.assertLegalChar,this);var f,w,d;u||(u={}),this.options=u,this.options.version||(this.options.version="1.0"),w=u.stringify||{};for(f in w){if(!C.call(w,f))continue;d=w[f],this[f]=d}}return D.prototype.name=function(u){return this.options.noValidation?u:this.assertLegalName(""+u||"")},D.prototype.text=function(u){return this.options.noValidation?u:this.assertLegalChar(this.textEscape(""+u||""))},D.prototype.cdata=function(u){return this.options.noValidation?u:(u=""+u||"",u=u.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(u))},D.prototype.comment=function(u){if(this.options.noValidation)return u;if(u=""+u||"",u.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+u);return this.assertLegalChar(u)},D.prototype.raw=function(u){return this.options.noValidation?u:""+u||""},D.prototype.attValue=function(u){return this.options.noValidation?u:this.assertLegalChar(this.attEscape(u=""+u||""))},D.prototype.insTarget=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.insValue=function(u){if(this.options.noValidation)return u;if(u=""+u||"",u.match(/\?>/))throw new Error("Invalid processing instruction value: "+u);return this.assertLegalChar(u)},D.prototype.xmlVersion=function(u){if(this.options.noValidation)return u;if(u=""+u||"",!u.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+u);return u},D.prototype.xmlEncoding=function(u){if(this.options.noValidation)return u;if(u=""+u||"",!u.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+u);return this.assertLegalChar(u)},D.prototype.xmlStandalone=function(u){return this.options.noValidation?u:u?"yes":"no"},D.prototype.dtdPubID=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdSysID=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdElementValue=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdAttType=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdAttDefault=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdEntityValue=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdNData=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.convertAttKey="@",D.prototype.convertPIKey="?",D.prototype.convertTextKey="#text",D.prototype.convertCDataKey="#cdata",D.prototype.convertCommentKey="#comment",D.prototype.convertRawKey="#raw",D.prototype.assertLegalChar=function(u){var f,w;if(this.options.noValidation)return u;if(f="",this.options.version==="1.0"){if(f=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=u.match(f))throw new Error("Invalid character in string: "+u+" at index "+w.index)}else if(this.options.version==="1.1"&&(f=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=u.match(f)))throw new Error("Invalid character in string: "+u+" at index "+w.index);return u},D.prototype.assertLegalName=function(u){var f;if(this.options.noValidation)return u;if(this.assertLegalChar(u),f=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!u.match(f))throw new Error("Invalid character in name");return u},D.prototype.textEscape=function(u){var f;return this.options.noValidation?u:(f=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,u.replace(f,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},D.prototype.attEscape=function(u){var f;return this.options.noValidation?u:(f=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,u.replace(f,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},D}()}).call(void 0)},{}],280:[function(j,Q,k){"use strict";var L=j("babel-runtime/core-js/object/create"),h=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,f,w=function(l,a){for(var _ in a)d.call(a,_)&&(l[_]=a[_]);function m(){this.constructor=l}return m.prototype=a.prototype,l.prototype=new m,l.__super__=a.prototype,l},d={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLCharacterData"),Q.exports=f=function(o){w(l,o);function l(a,_){if(l.__super__.constructor.call(this,a),_==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=D.Text,this.value=this.stringify.text(_)}return Object.defineProperty(l.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(l.prototype,"wholeText",{get:function(){var _,m,c;for(c="",m=this.previousSibling;m;)c=m.data+c,m=m.previousSibling;for(c+=this.data,_=this.nextSibling;_;)c=c+_.data,_=_.nextSibling;return c}}),l.prototype.clone=function(){return(0,h.default)(this)},l.prototype.toString=function(a){return this.options.writer.text(this,this.options.writer.filterOptions(a))},l.prototype.splitText=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.replaceWholeText=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},l}(u)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(j,Q,k){"use strict";(function(){var L,h,C,D,u,f,w,d,o,l,a,_,m,c,g,v,x,n={}.hasOwnProperty;x=j("./Utility").assign,L=j("./NodeType"),o=j("./XMLDeclaration"),l=j("./XMLDocType"),C=j("./XMLCData"),D=j("./XMLComment"),_=j("./XMLElement"),c=j("./XMLRaw"),g=j("./XMLText"),m=j("./XMLProcessingInstruction"),a=j("./XMLDummy"),u=j("./XMLDTDAttList"),f=j("./XMLDTDElement"),w=j("./XMLDTDEntity"),d=j("./XMLDTDNotation"),h=j("./WriterState"),Q.exports=v=function(){function i(t){var S,E,s;t||(t={}),this.options=t,E=t.writer||{};for(S in E){if(!n.call(E,S))continue;s=E[S],this["_"+S]=this[S],this[S]=s}}return i.prototype.filterOptions=function(t){var S,E,s,P,O,b,y,p;return t||(t={}),t=x({},this.options,t),S={writer:this},S.pretty=t.pretty||!1,S.allowEmpty=t.allowEmpty||!1,S.indent=(E=t.indent)!=null?E:" ",S.newline=(s=t.newline)!=null?s:`
|
|
|
`,S.offset=(P=t.offset)!=null?P:0,S.dontPrettyTextNodes=(O=(b=t.dontPrettyTextNodes)!=null?b:t.dontprettytextnodes)!=null?O:0,S.spaceBeforeSlash=(y=(p=t.spaceBeforeSlash)!=null?p:t.spacebeforeslash)!=null?y:"",S.spaceBeforeSlash===!0&&(S.spaceBeforeSlash=" "),S.suppressPrettyCount=0,S.user={},S.state=h.None,S},i.prototype.indent=function(t,S,E){var s;return!S.pretty||S.suppressPrettyCount?"":S.pretty&&(s=(E||0)+S.offset+1,s>0)?new Array(s).join(S.indent):""},i.prototype.endline=function(t,S,E){return!S.pretty||S.suppressPrettyCount?"":S.newline},i.prototype.attribute=function(t,S,E){var s;return this.openAttribute(t,S,E),s=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,S,E),s},i.prototype.cdata=function(t,S,E){var s;return this.openNode(t,S,E),S.state=h.OpenTag,s=this.indent(t,S,E)+"<![CDATA[",S.state=h.InsideTag,s+=t.value,S.state=h.CloseTag,s+="]]>"+this.endline(t,S,E),S.state=h.None,this.closeNode(t,S,E),s},i.prototype.comment=function(t,S,E){var s;return this.openNode(t,S,E),S.state=h.OpenTag,s=this.indent(t,S,E)+"<!-- ",S.state=h.InsideTag,s+=t.value,S.state=h.CloseTag,s+=" -->"+this.endline(t,S,E),S.state=h.None,this.closeNode(t,S,E),s},i.prototype.declaration=function(t,S,E){var s;return this.openNode(t,S,E),S.state=h.OpenTag,s=this.indent(t,S,E)+"<?xml",S.state=h.InsideTag,s+=' version="'+t.version+'"',t.encoding!=null&&(s+=' encoding="'+t.encoding+'"'),t.standalone!=null&&(s+=' standalone="'+t.standalone+'"'),S.state=h.CloseTag,s+=S.spaceBeforeSlash+"?>",s+=this.endline(t,S,E),S.state=h.None,this.closeNode(t,S,E),s},i.prototype.docType=function(t,S,E){var s,P,O,b,y;if(E||(E=0),this.openNode(t,S,E),S.state=h.OpenTag,b=this.indent(t,S,E),b+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?b+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(b+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(b+=" [",b+=this.endline(t,S,E),S.state=h.InsideTag,y=t.children,P=0,O=y.length;P<O;P++)s=y[P],b+=this.writeChildNode(s,S,E+1);S.state=h.CloseTag,b+="]"}return S.state=h.CloseTag,b+=S.spaceBeforeSlash+">",b+=this.endline(t,S,E),S.state=h.None,this.closeNode(t,S,E),b},i.prototype.element=function(t,S,E){var s,P,O,b,y,p,T,M,N,I,K,H,W,z;E||(E=0),I=!1,K="",this.openNode(t,S,E),S.state=h.OpenTag,K+=this.indent(t,S,E)+"<"+t.name,H=t.attribs;for(N in H){if(!n.call(H,N))continue;s=H[N],K+=this.attribute(s,S,E)}if(O=t.children.length,b=O===0?null:t.children[0],O===0||t.children.every(function(U){return(U.type===L.Text||U.type===L.Raw)&&U.value===""}))S.allowEmpty?(K+=">",S.state=h.CloseTag,K+="</"+t.name+">"+this.endline(t,S,E)):(S.state=h.CloseTag,K+=S.spaceBeforeSlash+"/>"+this.endline(t,S,E));else if(S.pretty&&O===1&&(b.type===L.Text||b.type===L.Raw)&&b.value!=null)K+=">",S.state=h.InsideTag,S.suppressPrettyCount++,I=!0,K+=this.writeChildNode(b,S,E+1),S.suppressPrettyCount--,I=!1,S.state=h.CloseTag,K+="</"+t.name+">"+this.endline(t,S,E);else{if(S.dontPrettyTextNodes){for(W=t.children,y=0,T=W.length;y<T;y++)if(P=W[y],(P.type===L.Text||P.type===L.Raw)&&P.value!=null){S.suppressPrettyCount++,I=!0;break}}for(K+=">"+this.endline(t,S,E),S.state=h.InsideTag,z=t.children,p=0,M=z.length;p<M;p++)P=z[p],K+=this.writeChildNode(P,S,E+1);S.state=h.CloseTag,K+=this.indent(t,S,E)+"</"+t.name+">",I&&S.suppressPrettyCount--,K+=this.endline(t,S,E),S.state=h.None}return this.closeNode(t,S,E),K},i.prototype.writeChildNode=function(t,S,E){switch(t.type){case L.CData:return this.cdata(t,S,E);case L.Comment:return this.comment(t,S,E);case L.Element:return this.element(t,S,E);case L.Raw:return this.raw(t,S,E);case L.Text:return this.text(t,S,E);case L.ProcessingInstruction:return this.processingInstruction(t,S,E);case L.Dummy:return"";case L.Declaration:return this.declaration(t,S,E);case L.DocType:return this.docType(t,S,E);case L.AttributeDeclaration:return this.dtdAttList(t,S,E);case L.ElementDeclaration:return this.dtdElement(t,S,E);case L.EntityDeclaration:return this.dtdEntity(t,S,E);case L.NotationDeclaration:return this.dtdNotation(t,S,E);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},i.prototype.processingInstruction=function(t,S,E){var s;return this.openNode(t,S,E),S.state=h.OpenTag,s=this.indent(t,S,E)+"<?",S.state=h.InsideTag,s+=t.target,t.value&&(s+=" "+t.value),S.state=h.CloseTag,s+=S.spaceBeforeSlash+"?>",s+=this.endline(t,S,E),S.state=h.None,this.closeNode(t,S,E),s},i.prototype.raw=function(t,S,E){var s;return this.openNode(t,S,E),S.state=h.OpenTag,s=this.indent(t,S,E),S.state=h.InsideTag,s+=t.value,S.state=h.CloseTag,s+=this.endline(t,S,E),S.state=h.None,this.closeNode(t,S,E),s},i.prototype.text=function(t,S,E){var s;return this.openNode(t,S,E),S.state=h.OpenTag,s=this.indent(t,S,E),S.state=h.InsideTag,s+=t.value,S.state=h.CloseTag,s+=this.endline(t,S,E),S.state=h.None,this.closeNode(t,S,E),s},i.prototype.dtdAttList=function(t,S,E){var s;return this.openNode(t,S,E),S.state=h.OpenTag,s=this.indent(t,S,E)+"<!ATTLIST",S.state=h.InsideTag,s+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,t.defaultValueType!=="#DEFAULT"&&(s+=" "+t.defaultValueType),t.defaultValue&&(s+=' "'+t.defaultValue+'"'),S.state=h.CloseTag,s+=S.spaceBeforeSlash+">"+this.endline(t,S,E),S.state=h.None,this.closeNode(t,S,E),s},i.prototype.dtdElement=function(t,S,E){var s;return this.openNode(t,S,E),S.state=h.OpenTag,s=this.indent(t,S,E)+"<!ELEMENT",S.state=h.InsideTag,s+=" "+t.name+" "+t.value,S.state=h.CloseTag,s+=S.spaceBeforeSlash+">"+this.endline(t,S,E),S.state=h.None,this.closeNode(t,S,E),s},i.prototype.dtdEntity=function(t,S,E){var s;return this.openNode(t,S,E),S.state=h.OpenTag,s=this.indent(t,S,E)+"<!ENTITY",S.state=h.InsideTag,t.pe&&(s+=" %"),s+=" "+t.name,t.value?s+=' "'+t.value+'"':(t.pubID&&t.sysID?s+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(s+=' SYSTEM "'+t.sysID+'"'),t.nData&&(s+=" NDATA "+t.nData)),S.state=h.CloseTag,s+=S.spaceBeforeSlash+">"+this.endline(t,S,E),S.state=h.None,this.closeNode(t,S,E),s},i.prototype.dtdNotation=function(t,S,E){var s;return this.openNode(t,S,E),S.state=h.OpenTag,s=this.indent(t,S,E)+"<!NOTATION",S.state=h.InsideTag,s+=" "+t.name,t.pubID&&t.sysID?s+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?s+=' PUBLIC "'+t.pubID+'"':t.sysID&&(s+=' SYSTEM "'+t.sysID+'"'),S.state=h.CloseTag,s+=S.spaceBeforeSlash+">"+this.endline(t,S,E),S.state=h.None,this.closeNode(t,S,E),s},i.prototype.openNode=function(t,S,E){},i.prototype.closeNode=function(t,S,E){},i.prototype.openAttribute=function(t,S,E){},i.prototype.closeAttribute=function(t,S,E){},i}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(j,Q,k){"use strict";(function(){var L,h,C,D,u,f,w,d,o,l;l=j("./Utility"),d=l.assign,o=l.isFunction,C=j("./XMLDOMImplementation"),D=j("./XMLDocument"),u=j("./XMLDocumentCB"),w=j("./XMLStringWriter"),f=j("./XMLStreamWriter"),L=j("./NodeType"),h=j("./WriterState"),Q.exports.create=function(a,_,m,c){var g,v;if(a==null)throw new Error("Root element needs a name.");return c=d({},_,m,c),g=new D(c),v=g.element(a),c.headless||(g.declaration(c),(c.pubID!=null||c.sysID!=null)&&g.dtd(c)),v},Q.exports.begin=function(a,_,m){var c;return o(a)&&(c=[a,_],_=c[0],m=c[1],a={}),_?new u(a,_,m):new D(a)},Q.exports.stringWriter=function(a){return new w(a)},Q.exports.streamWriter=function(a,_){return new f(a,_)},Q.exports.implementation=new C,Q.exports.nodeType=L,Q.exports.writerState=h}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(j,Q,k){Q.exports=h;var L=Object.prototype.hasOwnProperty;function h(){for(var C={},D=0;D<arguments.length;D++){var u=arguments[D];for(var f in u)L.call(u,f)&&(C[f]=u[f])}return C}},{}],284:[function(j,Q,k){"use strict";var L=j("buffer").Buffer,h=j("./sha"),C=j("./md5"),D={sha1:h,md5:C},u=64,f=L.alloc(u);f.fill(0);function w(l,a,_){L.isBuffer(a)||(a=L.from(a)),L.isBuffer(_)||(_=L.from(_)),a.length>u?a=l(a):a.length<u&&(a=L.concat([a,f],u));for(var m=L.alloc(u),c=L.alloc(u),g=0;g<u;g++)m[g]=a[g]^54,c[g]=a[g]^92;var v=l(L.concat([m,_]));return l(L.concat([c,v]))}function d(l,a){l=l||"sha1";var _=D[l],m=[],c=0;return _||o("algorithm:",l,"is not yet supported"),{update:function(v){return L.isBuffer(v)||(v=L.from(v)),m.push(v),c+=v.length,this},digest:function(v){var x=L.concat(m),n=a?w(_,a,x):_(x);return m=null,v?n.toString(v):n}}}function o(){var l=[].slice.call(arguments).join(" ");throw new Error([l,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}k.createHash=function(l){return d(l)},k.createHmac=function(l,a){return d(l,a)},k.createCredentials=function(){o("sorry,createCredentials is not implemented yet")},k.createCipher=function(){o("sorry,createCipher is not implemented yet")},k.createCipheriv=function(){o("sorry,createCipheriv is not implemented yet")},k.createDecipher=function(){o("sorry,createDecipher is not implemented yet")},k.createDecipheriv=function(){o("sorry,createDecipheriv is not implemented yet")},k.createSign=function(){o("sorry,createSign is not implemented yet")},k.createVerify=function(){o("sorry,createVerify is not implemented yet")},k.createDiffieHellman=function(){o("sorry,createDiffieHellman is not implemented yet")},k.pbkdf2=function(){o("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(j,Q,k){"use strict";var L=j("buffer").Buffer,h=4,C=L.alloc(h);C.fill(0);var D=8;function u(d,o){if(d.length%h!==0){var l=d.length+(h-d.length%h);d=L.concat([d,C],l)}for(var a=[],_=o?d.readInt32BE:d.readInt32LE,m=0;m<d.length;m+=h)a.push(_.call(d,m));return a}function f(d,o,l){for(var a=L.alloc(o),_=l?a.writeInt32BE:a.writeInt32LE,m=0;m<d.length;m++)_.call(a,d[m],m*4,!0);return a}function w(d,o,l,a){L.isBuffer(d)||(d=L.from(d));var _=o(u(d,a),d.length*D);return f(_,l,a)}Q.exports={hash:w}},{buffer:73}],286:[function(j,Q,k){"use strict";var L=j("./helpers");function h(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function C(a,_){a[_>>5]|=128<<_%32,a[(_+64>>>9<<4)+14]=_;for(var m=1732584193,c=-271733879,g=-1732584194,v=271733878,x=0;x<a.length;x+=16){var n=m,i=c,t=g,S=v;m=u(m,c,g,v,a[x+0],7,-680876936),v=u(v,m,c,g,a[x+1],12,-389564586),g=u(g,v,m,c,a[x+2],17,606105819),c=u(c,g,v,m,a[x+3],22,-1044525330),m=u(m,c,g,v,a[x+4],7,-176418897),v=u(v,m,c,g,a[x+5],12,1200080426),g=u(g,v,m,c,a[x+6],17,-1473231341),c=u(c,g,v,m,a[x+7],22,-45705983),m=u(m,c,g,v,a[x+8],7,1770035416),v=u(v,m,c,g,a[x+9],12,-1958414417),g=u(g,v,m,c,a[x+10],17,-42063),c=u(c,g,v,m,a[x+11],22,-1990404162),m=u(m,c,g,v,a[x+12],7,1804603682),v=u(v,m,c,g,a[x+13],12,-40341101),g=u(g,v,m,c,a[x+14],17,-1502002290),c=u(c,g,v,m,a[x+15],22,1236535329),m=f(m,c,g,v,a[x+1],5,-165796510),v=f(v,m,c,g,a[x+6],9,-1069501632),g=f(g,v,m,c,a[x+11],14,643717713),c=f(c,g,v,m,a[x+0],20,-373897302),m=f(m,c,g,v,a[x+5],5,-701558691),v=f(v,m,c,g,a[x+10],9,38016083),g=f(g,v,m,c,a[x+15],14,-660478335),c=f(c,g,v,m,a[x+4],20,-405537848),m=f(m,c,g,v,a[x+9],5,568446438),v=f(v,m,c,g,a[x+14],9,-1019803690),g=f(g,v,m,c,a[x+3],14,-187363961),c=f(c,g,v,m,a[x+8],20,1163531501),m=f(m,c,g,v,a[x+13],5,-1444681467),v=f(v,m,c,g,a[x+2],9,-51403784),g=f(g,v,m,c,a[x+7],14,1735328473),c=f(c,g,v,m,a[x+12],20,-1926607734),m=w(m,c,g,v,a[x+5],4,-378558),v=w(v,m,c,g,a[x+8],11,-2022574463),g=w(g,v,m,c,a[x+11],16,1839030562),c=w(c,g,v,m,a[x+14],23,-35309556),m=w(m,c,g,v,a[x+1],4,-1530992060),v=w(v,m,c,g,a[x+4],11,1272893353),g=w(g,v,m,c,a[x+7],16,-155497632),c=w(c,g,v,m,a[x+10],23,-1094730640),m=w(m,c,g,v,a[x+13],4,681279174),v=w(v,m,c,g,a[x+0],11,-358537222),g=w(g,v,m,c,a[x+3],16,-722521979),c=w(c,g,v,m,a[x+6],23,76029189),m=w(m,c,g,v,a[x+9],4,-640364487),v=w(v,m,c,g,a[x+12],11,-421815835),g=w(g,v,m,c,a[x+15],16,530742520),c=w(c,g,v,m,a[x+2],23,-995338651),m=d(m,c,g,v,a[x+0],6,-198630844),v=d(v,m,c,g,a[x+7],10,1126891415),g=d(g,v,m,c,a[x+14],15,-1416354905),c=d(c,g,v,m,a[x+5],21,-57434055),m=d(m,c,g,v,a[x+12],6,1700485571),v=d(v,m,c,g,a[x+3],10,-1894986606),g=d(g,v,m,c,a[x+10],15,-1051523),c=d(c,g,v,m,a[x+1],21,-2054922799),m=d(m,c,g,v,a[x+8],6,1873313359),v=d(v,m,c,g,a[x+15],10,-30611744),g=d(g,v,m,c,a[x+6],15,-1560198380),c=d(c,g,v,m,a[x+13],21,1309151649),m=d(m,c,g,v,a[x+4],6,-145523070),v=d(v,m,c,g,a[x+11],10,-1120210379),g=d(g,v,m,c,a[x+2],15,718787259),c=d(c,g,v,m,a[x+9],21,-343485551),m=o(m,n),c=o(c,i),g=o(g,t),v=o(v,S)}return Array(m,c,g,v)}function D(a,_,m,c,g,v){return o(l(o(o(_,a),o(c,v)),g),m)}function u(a,_,m,c,g,v,x){return D(_&m|~_&c,a,_,g,v,x)}function f(a,_,m,c,g,v,x){return D(_&c|m&~c,a,_,g,v,x)}function w(a,_,m,c,g,v,x){return D(_^m^c,a,_,g,v,x)}function d(a,_,m,c,g,v,x){return D(m^(_|~c),a,_,g,v,x)}function o(a,_){var m=(a&65535)+(_&65535),c=(a>>16)+(_>>16)+(m>>16);return c<<16|m&65535}function l(a,_){return a<<_|a>>>32-_}Q.exports=function(_){return L.hash(_,C,16)}},{"./helpers":285}],287:[function(j,Q,k){"use strict";var L=j("./helpers");function h(w,d){w[d>>5]|=128<<24-d%32,w[(d+64>>9<<4)+15]=d;for(var o=Array(80),l=1732584193,a=-271733879,_=-1732584194,m=271733878,c=-1009589776,g=0;g<w.length;g+=16){for(var v=l,x=a,n=_,i=m,t=c,S=0;S<80;S++){S<16?o[S]=w[g+S]:o[S]=f(o[S-3]^o[S-8]^o[S-14]^o[S-16],1);var E=u(u(f(l,5),C(S,a,_,m)),u(u(c,o[S]),D(S)));c=m,m=_,_=f(a,30),a=l,l=E}l=u(l,v),a=u(a,x),_=u(_,n),m=u(m,i),c=u(c,t)}return Array(l,a,_,m,c)}function C(w,d,o,l){return w<20?d&o|~d&l:w<40?d^o^l:w<60?d&o|d&l|o&l:d^o^l}function D(w){return w<20?1518500249:w<40?1859775393:w<60?-1894007588:-899497514}function u(w,d){var o=(w&65535)+(d&65535),l=(w>>16)+(d>>16)+(o>>16);return l<<16|o&65535}function f(w,d){return w<<d|w>>>32-d}Q.exports=function(d){return L.hash(d,h,20,!0)}},{"./helpers":285}],288:[function(j,Q,k){"use strict";Q.exports=function(){return function(){}}},{}],289:[function(j,Q,k){(function(L){"use strict";var h=j("babel-runtime/helpers/typeof"),C=D(h);function D(l){return l&&l.__esModule?l:{default:l}}var u=j("stream"),f=u.Stream,w=j("../lib/common/utils/isArray"),d=w.isArray;Q.exports.string=function(a){return typeof a=="string"},Q.exports.array=d,Q.exports.buffer=L.isBuffer;function o(l){return l instanceof f}Q.exports.writableStream=function(a){return o(a)&&typeof a._write=="function"&&(0,C.default)(a._writableState)==="object"}}).call(this,{isBuffer:j("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":42,"../node_modules/is-buffer/index.js":197,"babel-runtime/helpers/typeof":67,stream:230}],290:[function(j,Q,k){"use strict";k.encodeURIComponent=function(L){try{return encodeURIComponent(L)}catch(h){return L}},k.escape=j("escape-html"),k.timestamp=function(h){if(h){var C=h;return typeof C=="string"&&(C=Number(C)),String(h).length===10&&(C*=1e3),new Date(C)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(j,Q,k){(function(L,h){"use strict";var C=j("babel-runtime/core-js/json/stringify"),D=w(C),u=j("babel-runtime/helpers/typeof"),f=w(u);function w(S){return S&&S.__esModule?S:{default:S}}var d=j("util"),o=j("url"),l=j("http"),a=j("https"),_=j("debug")("urllib"),m=j("humanize-ms"),c,g=0,v=Math.pow(2,31)-10,x=/^https?:\/\//i;function n(S,E){return S===void 0?E:S}function i(S,E){return function(s,P,O){if(s)return E(s);S({data:P,status:O.statusCode,headers:O.headers,res:O})}}k.TIMEOUTS=[m("300s"),m("300s")];var t=["json","text"];k.request=function(E,s,P){return arguments.length===2&&typeof s=="function"&&(P=s,s=null),typeof P=="function"?k.requestWithCallback(E,s,P):(c||(c=j("any-promise")),new c(function(O,b){k.requestWithCallback(E,s,i(O,b))}))},k.requestWithCallback=function(E,s,P){if(!E||typeof E!="string"&&(typeof E=="undefined"?"undefined":(0,f.default)(E))!=="object"){var O=d.format("expect request url to be a string or a http request options, but got %j",E);throw new Error(O)}arguments.length===2&&typeof s=="function"&&(P=s,s=null),s=s||{},g>=v&&(g=0);var b=++g;s.requestUrls=s.requestUrls||[];var y={requestId:b,url:E,args:s,ctx:s.ctx};s.emitter&&s.emitter.emit("request",y),s.timeout=s.timeout||k.TIMEOUTS,s.maxRedirects=s.maxRedirects||10,s.streaming=s.streaming||s.customResponse;var p=Date.now(),T;typeof E=="string"?(x.test(E)||(E="http://"+E),T=o.parse(E)):T=E;var M=(s.type||s.method||T.method||"GET").toUpperCase(),N=T.port||80,I=l,K=n(s.agent,k.agent),H=s.fixJSONCtlChars;T.protocol==="https:"&&(I=a,K=n(s.httpsAgent,k.httpsAgent),T.port||(N=443));var W={host:T.hostname||T.host||"localhost",path:T.path||"/",method:M,port:N,agent:K,headers:s.headers||{},lookup:s.lookup};Array.isArray(s.timeout)?W.requestTimeout=s.timeout[s.timeout.length-1]:typeof s.timeout!="undefined"&&(W.requestTimeout=s.timeout);for(var z=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U<z.length;U++){var B=z[U];s.hasOwnProperty(B)&&(W[B]=s[B])}W.rejectUnauthorized===!1&&!W.hasOwnProperty("secureOptions")&&(W.secureOptions=j("constants").SSL_OP_NO_TLSv1_2);var G=s.auth||T.auth;G&&(W.auth=G);var q=s.content||s.data,ae=M==="GET"||M==="HEAD"||s.dataAsQueryString;if(!s.content&&(q&&!(typeof q=="string"||h.isBuffer(q))))if(ae)q=s.nestedQuerystring?qs.stringify(q):querystring.stringify(q);else{var se=W.headers["Content-Type"]||W.headers["content-type"];se||(s.contentType==="json"?se="application/json":se="application/x-www-form-urlencoded",W.headers["Content-Type"]=se),parseContentType(se).type==="application/json"?q=(0,D.default)(q):q=s.nestedQuerystring?qs.stringify(q):querystring.stringify(q)}ae&&q&&(W.path+=(T.query?"&":"?")+q,q=null);var we=0;if(q){var Se=q.length;h.isBuffer(q)||(Se=h.byteLength(q)),we=W.headers["Content-Length"]=Se}s.dataType==="json"&&(W.headers.Accept="application/json"),typeof s.beforeRequest=="function"&&s.beforeRequest(W);var de=null,xe=null,he=null,ne=!1,oe=!1,te=0,le=-1,Y=!1,Z="",ge="",ee=null;s.timing&&(ee={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function $(){de&&(clearTimeout(de),de=null)}function X(){xe&&(clearTimeout(xe),xe=null)}function J(Ce,Je,rt){if(X(),!P){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),b,L.pid,W.method,E),Ce&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),b,L.pid,Ce.name,Ce.message,Ce.stack);return}var ze=P;P=null;var et={};if(rt&&(le=rt.statusCode,et=rt.headers),le===401&&et["www-authenticate"]&&(!s.headers||!s.headers.Authorization)&&s.digestAuth){var ke=et["www-authenticate"];if(ke.indexOf("Digest ")>=0)return _("Request#%d %s: got digest auth header WWW-Authenticate: %s",b,E,ke),s.headers=s.headers||{},s.headers.Authorization=digestAuthHeader(W.method,W.path,ke,s.digestAuth),_("Request#%d %s: auth with digest header: %s",b,E,s.headers.Authorization),rt.headers["set-cookie"]&&(s.headers.Cookie=rt.headers["set-cookie"].join(";")),k.requestWithCallback(E,s,ze)}var Re=Date.now()-p;ee&&(ee.contentDownload=Re),_("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Re,te,le,W.method,W.host,W.path,oe,ee);var Te={status:le,statusCode:le,headers:et,size:te,aborted:Y,rt:Re,keepAliveSocket:oe,data:Je,requestUrls:s.requestUrls,timing:ee,remoteAddress:Z,remotePort:ge};if(Ce){var fe="";K&&typeof K.getCurrentStatus=="function"&&(fe=", agent status: "+(0,D.default)(K.getCurrentStatus())),Ce.message+=", "+W.method+" "+E+" "+le+" (connected: "+ne+", keepalive socket: "+oe+fe+`)
|
|
|
headers: `+(0,D.default)(et),Ce.data=Je,Ce.path=W.path,Ce.status=le,Ce.headers=et,Ce.res=Te}ze(Ce,Je,s.streaming?rt:Te),s.emitter&&(y.url=E,y.socket=it&&it.connection,y.options=W,y.size=we,s.emitter.emit("response",{requestId:b,error:Ce,ctx:s.ctx,req:y,res:Te}))}function me(Ce){var Je=null;if(s.followRedirect&&statuses.redirect[Ce.statusCode]){s._followRedirectCount=(s._followRedirectCount||0)+1;var rt=Ce.headers.location;if(!rt)Je=new Error("Got statusCode "+Ce.statusCode+" but cannot resolve next location from headers"),Je.name="FollowRedirectError";else if(s._followRedirectCount>s.maxRedirects)Je=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+E),Je.name="MaxRedirectError";else{var ze=s.formatRedirectUrl?s.formatRedirectUrl(E,rt):o.resolve(E,rt);_("Request#%d %s: `redirected` from %s to %s",b,W.path,E,ze),X(),s.headers&&s.headers.Host&&x.test(rt)&&(s.headers.Host=null);var et=P;return P=null,k.requestWithCallback(ze,s,et),{redirect:!0,error:null}}}return{redirect:!1,error:Je}}!W.headers["User-Agent"]&&!W.headers["user-agent"]&&(W.headers["User-Agent"]=navigator.userAgent),s.gzip&&(!W.headers["Accept-Encoding"]&&!W.headers["accept-encoding"]&&(W.headers["Accept-Encoding"]="gzip"));function ue(Ce,Je,rt){var ze=Ce.headers["content-encoding"];return rt(null,Je,ze)}var _e=s.writeStream;_("Request#%d %s %s with headers %j, options.path: %s",b,M,E,W.headers,W.path),s.requestUrls.push(E);function He(Ce){if(ee&&(ee.waiting=Date.now()-p),_("Request#%d %s `req response` event emit: status %d, headers: %j",b,E,Ce.statusCode,Ce.headers),s.streaming){var Je=me(Ce);if(Je.redirect){Ce.resume();return}return Je.error?(Ce.resume(),J(Je.error,null,Ce)):J(null,null,Ce)}if(Ce.on("close",function(){_("Request#%d %s: `res close` event emit, total size %d",b,E,te)}),Ce.on("error",function(){_("Request#%d %s: `res error` event emit, total size %d",b,E,te)}),Ce.on("aborted",function(){Y=!0,_("Request#%d %s: `res aborted` event emit, total size %d",b,E,te)}),_e){var Je=me(Ce);if(Je.redirect){Ce.resume();return}return Je.error?(Ce.resume(),_e.end(),J(Je.error,null,Ce)):(s.consumeWriteStream===!1?Ce.on("end",J.bind(null,null,null,Ce)):isNode010||isNode012?first([[_e,"close"],[Ce,"aborted"]],function(et,ke,Re){_("Request#%d %s: writeStream or res %s event emitted",b,E,Re),J(he||null,null,Ce)}):_e.on("close",function(){_("Request#%d %s: writeStream close event emitted",b,E),J(he||null,null,Ce)}),Ce.pipe(_e))}var rt=[];Ce.on("data",function(ze){_("Request#%d %s: `res data` event emit, size %d",b,E,ze.length),te+=ze.length,rt.push(ze)}),Ce.on("end",function(){var ze=h.concat(rt,te);if(_("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",b,E,te,Ce._dumped),he)return J(he,ze,Ce);var et=me(Ce);if(et.error)return J(et.error,ze,Ce);if(et.redirect)return;ue(Ce,ze,function(ke,Re,Te){if(ke)return J(ke,ze,Ce);if(!Te&&t.indexOf(s.dataType)>=0){try{Re=decodeBodyByCharset(Re,Ce)}catch(ye){return _("decodeBodyByCharset error: %s",ye),J(null,Re,Ce)}if(s.dataType==="json")if(te===0)Re=null;else{var fe=parseJSON(Re,H);fe.error?ke=fe.error:Re=fe.data}}Y&&_("Request#%d %s: Remote socket was terminated before `response.end()` was called",b,E),J(ke,Re,Ce)})})}var $e,Ye;Array.isArray(s.timeout)?($e=m(s.timeout[0]),Ye=m(s.timeout[1])):$e=Ye=m(s.timeout),_("ConnectTimeout: %d, ResponseTimeout: %d",$e,Ye);function tt(){_("Connect timer ticking, timeout: %d",$e),de=setTimeout(function(){de=null,le===-1&&(le=-2);var Ce="Connect timeout for "+$e+"ms",Je="ConnectionTimeoutError";it.socket||(Je="SocketAssignTimeoutError",Ce+=", working sockets is full"),he=new Error(Ce),he.name=Je,he.requestId=b,_("ConnectTimeout: Request#%d %s %s: %s, connected: %s",b,E,he.name,Ce,ne),Me()},$e)}function nt(){_("Response timer ticking, timeout: %d",Ye),xe=setTimeout(function(){xe=null;var Ce="Response timeout for "+Ye+"ms",Je="ResponseTimeoutError";he=new Error(Ce),he.name=Je,he.requestId=b,_("ResponseTimeout: Request#%d %s %s: %s, connected: %s",b,E,he.name,Ce,ne),Me()},Ye)}var it;W.mode=s.mode?s.mode:"";try{it=I.request(W,He)}catch(Ce){return J(Ce)}typeof window=="undefined"?tt():it.on("requestTimeout",function(){le===-1&&(le=-2);var Ce="Connect timeout for "+$e+"ms",Je="ConnectionTimeoutError";he=new Error(Ce),he.name=Je,he.requestId=b,Me()});function Me(){_("Request#%d %s abort, connected: %s",b,E,ne),it.socket||(he.noSocket=!0,J(he)),it.abort()}return ee&&it.on("finish",function(){ee.requestSent=Date.now()-p}),it.once("socket",function(Ce){ee&&(ee.queuing=Date.now()-p),isNode010&&Ce.socket&&(Ce=Ce.socket);var Je=Ce.readyState;if(Je==="opening"){Ce.once("lookup",function(rt,ze,et){_("Request#%d %s lookup: %s, %s, %s",b,E,rt,ze,et),ee&&(ee.dnslookup=Date.now()-p),ze&&(Z=ze)}),Ce.once("connect",function(){ee&&(ee.connected=Date.now()-p),$(),nt(),_("Request#%d %s new socket connected",b,E),ne=!0,Z||(Z=Ce.remoteAddress),ge=Ce.remotePort});return}_("Request#%d %s reuse socket connected, readyState: %s",b,E,Je),ne=!0,oe=!0,Z||(Z=Ce.remoteAddress),ge=Ce.remotePort,$(),nt()}),it.on("error",function(Ce){(Ce.name==="Error"||Ce.name==="TypeError")&&(Ce.name=ne?"ResponseError":"RequestError"),Ce.message+=' (req "error")',_("Request#%d %s `req error` event emit, %s: %s",b,E,Ce.name,Ce.message),J(he||Ce)}),_e&&_e.once("error",function(Ce){Ce.message+=' (writeStream "error")',he=Ce,_("Request#%d %s `writeStream error` event emit, %s: %s",b,E,Ce.name,Ce.message),Me()}),s.stream?(s.stream.pipe(it),s.stream.once("error",function(Ce){Ce.message+=' (stream "error")',he=Ce,_("Request#%d %s `readStream error` event emit, %s: %s",b,E,Ce.name,Ce.message),Me()})):it.end(q),it.requestId=b,it}}).call(this,j("_process"),j("buffer").Buffer)},{_process:208,"any-promise":49,"babel-runtime/core-js/json/stringify":53,"babel-runtime/helpers/typeof":67,buffer:73,constants:75,debug:288,http:231,https:193,"humanize-ms":194,url:238,util:243}]},{},[1])(1)})}).call(this,__webpack_require__("IyRk"))},n6Qo:function(j,Q,k){"use strict";k.d(Q,"a",function(){return d});var L=k("q1tI"),h=k("biw7"),C=k("fyJ8");function D(o){var l=o.className,a=o.index,_=o.children,m=o.colSpan,c=o.rowSpan,g=L.useContext(h.a),v=g.prefixCls,x=g.fixedInfoList,n=x[a];return L.createElement(C.a,Object.assign({className:l,index:a,component:"td",prefixCls:v,record:null,dataIndex:null,render:function(){return{children:_,props:{colSpan:m,rowSpan:c}}}},n))}function u(o){return L.createElement("tr",Object.assign({},o))}function f(o){var l=o.children,a=L.useContext(h.a),_=a.prefixCls;return L.createElement("tfoot",{className:"".concat(_,"-summary")},l)}var w=Q.b=f,d={Cell:D,Row:u}},oRuE:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.Iso10126={pad:function(h,C){var D=C*4,u=D-h.sigBytes%D;h.concat(L.lib.WordArray.random(u-1)).concat(L.lib.WordArray.create([u<<24],1))},unpad:function(h){var C=h.words[h.sigBytes-1>>>2]&255;h.sigBytes-=C}},L.pad.Iso10126})},osHv:function(j,Q,k){(function(L){L(k("VrN/"))})(function(L){"use strict";var h=L.Pos;function C(x,n){return x.line-n.line||x.ch-n.ch}var D="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",u=D+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",f=new RegExp("<(/?)(["+D+"]["+u+"]*)","g");function w(x,n,i,t){this.line=n,this.ch=i,this.cm=x,this.text=x.getLine(n),this.min=t?Math.max(t.from,x.firstLine()):x.firstLine(),this.max=t?Math.min(t.to-1,x.lastLine()):x.lastLine()}function d(x,n){var i=x.cm.getTokenTypeAt(h(x.line,n));return i&&/\btag\b/.test(i)}function o(x){return x.line>=x.max?void 0:(x.ch=0,x.text=x.cm.getLine(++x.line),!0)}function l(x){return x.line<=x.min?void 0:(x.text=x.cm.getLine(--x.line),x.ch=x.text.length,!0)}function a(x){for(;;){var n=x.text.indexOf(">",x.ch);if(n==-1){if(o(x))continue;return}if(!d(x,n+1)){x.ch=n+1;continue}var i=x.text.lastIndexOf("/",n),t=i>-1&&!/\S/.test(x.text.slice(i+1,n));return x.ch=n+1,t?"selfClose":"regular"}}function _(x){for(;;){var n=x.ch?x.text.lastIndexOf("<",x.ch-1):-1;if(n==-1){if(l(x))continue;return}if(!d(x,n+1)){x.ch=n;continue}f.lastIndex=n,x.ch=n;var i=f.exec(x.text);if(i&&i.index==n)return i}}function m(x){for(;;){f.lastIndex=x.ch;var n=f.exec(x.text);if(!n){if(o(x))continue;return}if(!d(x,n.index+1)){x.ch=n.index+1;continue}return x.ch=n.index+n[0].length,n}}function c(x){for(;;){var n=x.ch?x.text.lastIndexOf(">",x.ch-1):-1;if(n==-1){if(l(x))continue;return}if(!d(x,n+1)){x.ch=n;continue}var i=x.text.lastIndexOf("/",n),t=i>-1&&!/\S/.test(x.text.slice(i+1,n));return x.ch=n+1,t?"selfClose":"regular"}}function g(x,n){for(var i=[];;){var t=m(x),S,E=x.line,s=x.ch-(t?t[0].length:0);if(!t||!(S=a(x)))return;if(S=="selfClose")continue;if(t[1]){for(var P=i.length-1;P>=0;--P)if(i[P]==t[2]){i.length=P;break}if(P<0&&(!n||n==t[2]))return{tag:t[2],from:h(E,s),to:h(x.line,x.ch)}}else i.push(t[2])}}function v(x,n){for(var i=[];;){var t=c(x);if(!t)return;if(t=="selfClose"){_(x);continue}var S=x.line,E=x.ch,s=_(x);if(!s)return;if(s[1])i.push(s[2]);else{for(var P=i.length-1;P>=0;--P)if(i[P]==s[2]){i.length=P;break}if(P<0&&(!n||n==s[2]))return{tag:s[2],from:h(x.line,x.ch),to:h(S,E)}}}}L.registerHelper("fold","xml",function(x,n){for(var i=new w(x,n.line,0);;){var t=m(i);if(!t||i.line!=n.line)return;var S=a(i);if(!S)return;if(!t[1]&&S!="selfClose"){var E=h(i.line,i.ch),s=g(i,t[2]);return s&&C(s.from,E)>0?{from:E,to:s.from}:null}}}),L.findMatchingTag=function(x,n,i){var t=new w(x,n.line,n.ch,i);if(t.text.indexOf(">")==-1&&t.text.indexOf("<")==-1)return;var S=a(t),E=S&&h(t.line,t.ch),s=S&&_(t);if(!S||!s||C(t,n)>0)return;var P={from:h(t.line,t.ch),to:E,tag:s[2]};return S=="selfClose"?{open:P,close:null,at:"open"}:s[1]?{open:v(t,s[2]),close:P,at:"close"}:(t=new w(x,E.line,E.ch,i),{open:P,close:g(t,s[2]),at:"open"})},L.findEnclosingTag=function(x,n,i,t){for(var S=new w(x,n.line,n.ch,i);;){var E=v(S,t);if(!E)break;var s=new w(x,n.line,n.ch,i),P=g(s,E.tag);if(P)return{open:E,close:P}}},L.scanForClosingTag=function(x,n,i,t){var S=new w(x,n.line,n.ch,t?{from:0,to:t}:null);return g(S,i)}})},p5ED:function(j,Q,k){"use strict";var L=k("+L6B"),h=k("2/Rp"),C=k("5Dmo"),D=k("3S7+"),u=k("k1fw"),f=k("tJVT"),w=k("q1tI"),d=k.n(w),o=k("vHTk"),l=k.n(o),a=k("yEEn"),_=k("ZW9T"),m=k("1vsH");Q.a=function(c){var g=c.name,v=c.data,x=c.theme,n=c.type,i=c.filename,t=c.monacoEditor,S=c.className,E=c.style,s=c.close,P=c.onClose,O=c.hasMask,b=Object(w.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),y=Object(f.a)(b,2),p=y[0],T=y[1],M=Object(w.useState)(""),N=Object(f.a)(M,2),I=N[0],K=N[1],H=Object(w.useRef)();i&&(t.filename=i),Object(w.useEffect)(function(){var U,B,G=(U=document.cookie)===null||U===void 0||((B=U.replace(/\s/g,""))===null||B===void 0)?void 0:B.split(";");G==null||G.map(function(q){var ae=q.split("=");ae[0]==="_educoder_session"&&K(ae[1])})},[]);var W=function(){if(v.startsWith("http")||v.startsWith("/")){z();return}Object(m.y)(i||"educoder",v,i)},z=function(){Object(m.w)(i||g,v)};return console.log("data:",v,"fileanme:",i," name:",g),d.a.createElement("div",{style:Object(u.a)({},E||{}),className:"".concat(O&&l.a.bgBlack," ").concat(n?l.a.wrp:"hide")},s&&d.a.createElement("div",{className:l.a.close,ref:H},d.a.createElement(D.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return H.current}},d.a.createElement("span",{onClick:z},d.a.createElement("i",{className:"icon-quxiaozhiding"}))),d.a.createElement(D.a,{title:"\u5173\u95ED",getPopupContainer:function(){return H.current}},d.a.createElement("span",{className:"",onClick:P},d.a.createElement("i",{className:"icon-guanbi1"})))),d.a.createElement("div",{className:"".concat(l.a[S]," ").concat(S," ").concat(l.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&d.a.createElement(_.b,t)),n==="audio"&&d.a.createElement("audio",{src:"".concat(v!=null&&v.startsWith("/")||(v==null?void 0:v.indexOf("https://"))>-1?v:"data:audio/mp3;base64,").concat(v),autoPlay:!0}),n==="video"&&d.a.createElement(d.a.Fragment,null,v!=null&&v.startsWith("/")?d.a.createElement("video",{controls:!0,src:"".concat(v),autoPlay:!0}):d.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(v),autoPlay:!0})),n==="pdf"&&d.a.createElement("embed",{className:l.a.embed,src:v}),n==="image"&&d.a.createElement(d.a.Fragment,null,d.a.createElement("img",{src:"".concat(v!=null&&v.startsWith("/")||(v==null?void 0:v.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(v)})),n==="other"&&d.a.createElement("div",null,d.a.createElement(h.a,{type:"primary",size:"large",onClick:W},d.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&d.a.createElement(h.a,{type:"primary",size:"large",onClick:W},d.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(j,Q,k){},pA7S:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var h=L,C=h.lib,D=C.WordArray,u=C.BlockCipher,f=h.algo,w=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],d=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],o=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],a=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],_=f.DES=u.extend({_doReset:function(){for(var v=this._key,x=v.words,n=[],i=0;i<56;i++){var t=w[i]-1;n[i]=x[t>>>5]>>>31-t%32&1}for(var S=this._subKeys=[],E=0;E<16;E++){for(var s=S[E]=[],P=o[E],i=0;i<24;i++)s[i/6|0]|=n[(d[i]-1+P)%28]<<31-i%6,s[4+(i/6|0)]|=n[28+(d[i+24]-1+P)%28]<<31-i%6;s[0]=s[0]<<1|s[0]>>>31;for(var i=1;i<7;i++)s[i]=s[i]>>>(i-1)*4+3;s[7]=s[7]<<5|s[7]>>>27}for(var O=this._invSubKeys=[],i=0;i<16;i++)O[i]=S[15-i]},encryptBlock:function(v,x){this._doCryptBlock(v,x,this._subKeys)},decryptBlock:function(v,x){this._doCryptBlock(v,x,this._invSubKeys)},_doCryptBlock:function(v,x,n){this._lBlock=v[x],this._rBlock=v[x+1],m.call(this,4,252645135),m.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),m.call(this,1,1431655765);for(var i=0;i<16;i++){for(var t=n[i],S=this._lBlock,E=this._rBlock,s=0,P=0;P<8;P++)s|=l[P][((E^t[P])&a[P])>>>0];this._lBlock=E,this._rBlock=S^s}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,m.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),m.call(this,16,65535),m.call(this,4,252645135),v[x]=this._lBlock,v[x+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function m(v,x){var n=(this._lBlock>>>v^this._rBlock)&x;this._rBlock^=n,this._lBlock^=n<<v}function c(v,x){var n=(this._rBlock>>>v^this._lBlock)&x;this._lBlock^=n,this._rBlock^=n<<v}h.DES=u._createHelper(_);var g=f.TripleDES=u.extend({_doReset:function(){var v=this._key,x=v.words;if(x.length!==2&&x.length!==4&&x.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var n=x.slice(0,2),i=x.length<4?x.slice(0,2):x.slice(2,4),t=x.length<6?x.slice(0,2):x.slice(4,6);this._des1=_.createEncryptor(D.create(n)),this._des2=_.createEncryptor(D.create(i)),this._des3=_.createEncryptor(D.create(t))},encryptBlock:function(v,x){this._des1.encryptBlock(v,x),this._des2.decryptBlock(v,x),this._des3.encryptBlock(v,x)},decryptBlock:function(v,x){this._des3.decryptBlock(v,x),this._des2.encryptBlock(v,x),this._des1.decryptBlock(v,x)},keySize:192/32,ivSize:64/32,blockSize:64/32});h.TripleDES=u._createHelper(g)}(),L.TripleDES})},pIsd:function(j,Q,k){var L=k("BJfS"),h=function(u){var f=/[height|width]$/;return f.test(u)},C=function(u){var f="",w=Object.keys(u);return w.forEach(function(d,o){var l=u[d];d=L(d),h(d)&&typeof l=="number"&&(l=l+"px"),l===!0?f+=d:l===!1?f+="not "+d:f+="("+d+": "+l+")",o<w.length-1&&(f+=" and ")}),f},D=function(u){var f="";return typeof u=="string"?u:u instanceof Array?(u.forEach(function(w,d){f+=C(w),d<u.length-1&&(f+=", ")}),f):C(u)};j.exports=D},qBft:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.AnsiX923={pad:function(h,C){var D=h.sigBytes,u=C*4,f=u-D%u,w=D+f-1;h.clamp(),h.words[w>>>2]|=f<<24-w%4*8,h.sigBytes+=f},unpad:function(h){var C=h.words[h.sigBytes-1>>>2]&255;h.sigBytes-=C}},L.pad.Ansix923})},qHvr:function(j,Q,k){"use strict";var L=k("2qtc"),h=k("kLXV"),C=k("5NDa"),D=k("5rEg"),u=k("miYZ"),f=k("tsqr"),w=k("tJVT"),d=k("q1tI"),o=k.n(d),l=k("4i/N");function a(_){var m=_.isAddmodle,c=_.setIsAdd,g=_.createTeam,v=_.qs,x=Object(d.useState)(""),n=Object(w.a)(x,2),i=n[0],t=n[1];return o.a.createElement(h.a,{centered:!0,title:o.a.createElement("div",{style:{alignItems:"center",display:"flex"}},o.a.createElement("div",{style:{textAlign:"left",flex:"1"}},v.\u521B\u5EFA\u6218\u961F),o.a.createElement(l.a,{onClick:function(){return c(!1)},style:{cursor:"porint"}})),visible:m,closable:!1,destroyOnClose:!0,okText:v.\u786E\u5B9A,cancelText:v.\u53D6\u6D88,onOk:function(){if(!i){f.b.info(v.\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A);return}g(i)},onCancel:function(){return c(!1)}},o.a.createElement("div",null,o.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),v.\u961F\u540D,"\uFF1A",o.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},o.a.createElement(D.a,{placeholder:v.\u8BF7\u8F93\u5165\u961F\u540D,value:i,maxLength:60,addonAfter:String(i&&i.length||0)+"/60",onChange:function(E){return t(E.target.value)}}))))}Q.a=a},qM6L:function(j,Q,k){(function(L,h){j.exports=Q=h(k("Ib8C"))})(this,function(L){return function(){var h=L,C=h.lib,D=C.WordArray,u=h.enc,f=u.Utf16=u.Utf16BE={stringify:function(d){for(var o=d.words,l=d.sigBytes,a=[],_=0;_<l;_+=2){var m=o[_>>>2]>>>16-_%4*8&65535;a.push(String.fromCharCode(m))}return a.join("")},parse:function(d){for(var o=d.length,l=[],a=0;a<o;a++)l[a>>>1]|=d.charCodeAt(a)<<16-a%2*16;return D.create(l,o*2)}};u.Utf16LE={stringify:function(d){for(var o=d.words,l=d.sigBytes,a=[],_=0;_<l;_+=2){var m=w(o[_>>>2]>>>16-_%4*8&65535);a.push(String.fromCharCode(m))}return a.join("")},parse:function(d){for(var o=d.length,l=[],a=0;a<o;a++)l[a>>>1]|=w(d.charCodeAt(a)<<16-a%2*16);return D.create(l,o*2)}};function w(d){return d<<8&4278255360|d>>>8&16711935}}(),L.enc.Utf16})},qu8F:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("OLod"))})(this,function(L){/** @preserve
|
|
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
|
* derived from CryptoJS.mode.CTR
|
|
|
* Jan Hruby jhruby.web@gmail.com
|
|
|
*/return L.mode.CTRGladman=function(){var h=L.lib.BlockCipherMode.extend();function C(f){if((f>>24&255)===255){var w=f>>16&255,d=f>>8&255,o=f&255;w===255?(w=0,d===255?(d=0,o===255?o=0:++o):++d):++w,f=0,f+=w<<16,f+=d<<8,f+=o}else f+=1<<24;return f}function D(f){return(f[0]=C(f[0]))===0&&(f[1]=C(f[1])),f}var u=h.Encryptor=h.extend({processBlock:function(f,w){var d=this._cipher,o=d.blockSize,l=this._iv,a=this._counter;l&&(a=this._counter=l.slice(0),this._iv=void 0),D(a);var _=a.slice(0);d.encryptBlock(_,0);for(var m=0;m<o;m++)f[w+m]^=_[m]}});return h.Decryptor=u,h}(),L.mode.CTRGladman})},"rAM+":function(j,Q,k){"use strict";k.d(Q,"a",function(){return h});var L=k("Qw5x");function h(C,D){var u;if(typeof Symbol=="undefined"||C[Symbol.iterator]==null){if(Array.isArray(C)||(u=Object(L.a)(C))||D&&C&&typeof C.length=="number"){u&&(C=u);var f=0,w=function(){};return{s:w,n:function(){return f>=C.length?{done:!0}:{done:!1,value:C[f++]}},e:function(_){throw _},f:w}}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 d=!0,o=!1,l;return{s:function(){u=C[Symbol.iterator]()},n:function(){var _=u.next();return d=_.done,_},e:function(_){o=!0,l=_},f:function(){try{!d&&u.return!=null&&u.return()}finally{if(o)throw l}}}}},rUJ1:function(j,Q){const k=/[&<>"']/,L=/[&<>"']/g,h=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,D={"&":"&","<":"<",">":">",'"':""","'":"'"},u=O=>D[O];function f(O,b){if(b){if(k.test(O))return O.replace(L,u)}else if(h.test(O))return O.replace(C,u);return O}const w=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function d(O){return O.replace(w,(b,y)=>(y=y.toLowerCase(),y==="colon"?":":y.charAt(0)==="#"?y.charAt(1)==="x"?String.fromCharCode(parseInt(y.substring(2),16)):String.fromCharCode(+y.substring(1)):""))}const o=/(^|[^\[])\^/g;function l(O,b){O=O.source||O,b=b||"";const y={replace:(p,T)=>(T=T.source||T,T=T.replace(o,"$1"),O=O.replace(p,T),y),getRegex:()=>new RegExp(O,b)};return y}const a=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function m(O,b,y){if(O){let p;try{p=decodeURIComponent(d(y)).replace(a,"").toLowerCase()}catch(T){return null}if(p.indexOf("javascript:")===0||p.indexOf("vbscript:")===0||p.indexOf("data:")===0)return null}b&&!_.test(y)&&(y=n(b,y));try{y=encodeURI(y).replace(/%25/g,"%")}catch(p){return null}return y}const c={},g=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(O,b){c[" "+O]||(g.test(O)?c[" "+O]=O+"/":c[" "+O]=E(O,"/",!0)),O=c[" "+O];const y=O.indexOf(":")===-1;return b.substring(0,2)==="//"?y?b:O.replace(v,"$1")+b:b.charAt(0)==="/"?y?b:O.replace(x,"$1")+b:O+b}const i={exec:function(){}};function t(O){let b=1,y,p;for(;b<arguments.length;b++){y=arguments[b];for(p in y)Object.prototype.hasOwnProperty.call(y,p)&&(O[p]=y[p])}return O}function S(O,b){const y=O.replace(/\|/g,(M,N,I)=>{let K=!1,H=N;for(;--H>=0&&I[H]==="\\";)K=!K;return K?"|":" |"}),p=y.split(/ \|/);let T=0;if(p.length>b)p.splice(b);else for(;p.length<b;)p.push("");for(;T<p.length;T++)p[T]=p[T].trim().replace(/\\\|/g,"|");return p}function E(O,b,y){const p=O.length;if(p===0)return"";let T=0;for(;T<p;){const M=O.charAt(p-T-1);if(M===b&&!y)T++;else if(M!==b&&y)T++;else break}return O.substr(0,p-T)}function s(O,b){if(O.indexOf(b[1])===-1)return-1;const y=O.length;let p=0,T=0;for(;T<y;T++)if(O[T]==="\\")T++;else if(O[T]===b[0])p++;else if(O[T]===b[1]&&(p--,p<0))return T;return-1}function P(O){O&&O.sanitize&&!O.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")}j.exports={escape:f,unescape:d,edit:l,cleanUrl:m,resolveUrl:n,noopTest:i,merge:t,splitCells:S,rtrim:E,findClosingBracket:s,checkSanitizeDeprecation:P}},sR1s:function(j,Q,k){"use strict";k.d(Q,"b",function(){return D}),k.d(Q,"a",function(){return u}),k.d(Q,"c",function(){return f}),k.d(Q,"d",function(){return w});var L=k("U8pU"),h="RC_TABLE_KEY";function C(d){return d==null?[]:Array.isArray(d)?d:[d]}function D(d,o){if(!o&&typeof o!="number")return d;for(var l=C(o),a=d,_=0;_<l.length;_+=1){if(!a)return null;var m=l[_];a=a[m]}return a}function u(d){var o=[],l={};return d.forEach(function(a){for(var _=a||{},m=_.key,c=_.dataIndex,g=m||C(c).join("-")||h;l[g];)g="".concat(g,"_next");l[g]=!0,o.push(g)}),o}function f(){var d={};function o(m,c){c&&Object.keys(c).forEach(function(g){var v=c[g];v&&Object(L.a)(v)==="object"?(m[g]=m[g]||{},o(m[g],v)):m[g]=v})}for(var l=arguments.length,a=new Array(l),_=0;_<l;_++)a[_]=arguments[_];return a.forEach(function(m){o(d,m)}),d}function w(d){return d!=null}},sboe:function(j,Q,k){"use strict";k.d(Q,"a",function(){return C});var L=k("q1tI"),h=k.n(L),C=L.createContext(null)},t23M:function(j,Q,k){"use strict";var L=k("VTBJ"),h=k("1OyB"),C=k("vuIU"),D=k("Ji7U"),u=k("LK+K"),f=k("q1tI"),w=k.n(f),d=k("m+aA"),o=k("Zm9Q"),l=k("Kwbf"),a=k("c+Xe"),_=k("bdgK"),m="rc-observer-key",c=function(g){Object(D.a)(x,g);var v=Object(u.a)(x);function x(){var n;return Object(h.a)(this,x),n=v.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(i){var t=n.props.onResize,S=i[0].target,E=S.getBoundingClientRect(),s=E.width,P=E.height,O=S.offsetWidth,b=S.offsetHeight,y=Math.floor(s),p=Math.floor(P);if(n.state.width!==y||n.state.height!==p||n.state.offsetWidth!==O||n.state.offsetHeight!==b){var T={width:y,height:p,offsetWidth:O,offsetHeight:b};n.setState(T),t&&Promise.resolve().then(function(){t(Object(L.a)(Object(L.a)({},T),{},{offsetWidth:O,offsetHeight:b}))})}},n.setChildNode=function(i){n.childNode=i},n}return Object(C.a)(x,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var i=this.props.disabled;if(i){this.destroyObserver();return}var t=Object(d.a)(this.childNode||this),S=t!==this.currentElement;S&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new _.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var i=this.props.children,t=Object(o.a)(i);if(t.length>1)Object(l.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(l.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var S=t[0];if(f.isValidElement(S)&&Object(a.c)(S)){var E=S.ref;t[0]=f.cloneElement(S,{ref:Object(a.a)(E,this.setChildNode)})}return t.length===1?t[0]:t.map(function(s,P){return!f.isValidElement(s)||"key"in s&&s.key!==null?s:f.cloneElement(s,{key:"".concat(m,"-").concat(P)})})}}]),x}(f.Component);c.displayName="ResizeObserver",Q.a=c},uGsb:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("MlIO"),k("1uat"))})(this,function(L){return function(){var h=L,C=h.x64,D=C.Word,u=C.WordArray,f=h.algo,w=f.SHA512,d=f.SHA384=w.extend({_doReset:function(){this._hash=new u.init([new D.init(3418070365,3238371032),new D.init(1654270250,914150663),new D.init(2438529370,812702999),new D.init(355462360,4144912697),new D.init(1731405415,4290775857),new D.init(2394180231,1750603025),new D.init(3675008525,1694076839),new D.init(1203062813,3204075428)])},_doFinalize:function(){var o=w._doFinalize.call(this);return o.sigBytes-=16,o}});h.SHA384=w._createHelper(d),h.HmacSHA384=w._createHmacHelper(d)}(),L.SHA384})},uGxW:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.NoPadding={pad:function(){},unpad:function(){}},L.pad.NoPadding})},uK0f:function(j,Q,k){(function(L,h){j.exports=h()})(this,function(){"use strict";function L(h,C,D){D=D||{},D.childrenKeyName=D.childrenKeyName||"children";var u=h||[],f=[],w=0;do{var d=u.filter(function(o){return C(o,w)})[0];if(!d)break;f.push(d),u=d[D.childrenKeyName]||[],w+=1}while(u.length>0);return f}return L})},ulZh:function(j,Q,k){typeof window!="undefined"&&function(h,C){j.exports=C()}(this,function(){return function(L){var h={};function C(D){if(h[D])return h[D].exports;var u=h[D]={i:D,l:!1,exports:{}};return L[D].call(u.exports,u,u.exports,C),u.l=!0,u.exports}return C.m=L,C.c=h,C.d=function(D,u,f){C.o(D,u)||Object.defineProperty(D,u,{enumerable:!0,get:f})},C.r=function(D){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(D,"__esModule",{value:!0})},C.t=function(D,u){if(u&1&&(D=C(D)),u&8)return D;if(u&4&&typeof D=="object"&&D&&D.__esModule)return D;var f=Object.create(null);if(C.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:D}),u&2&&typeof D!="string")for(var w in D)C.d(f,w,function(d){return D[d]}.bind(null,w));return f},C.n=function(D){var u=D&&D.__esModule?function(){return D.default}:function(){return D};return C.d(u,"a",u),u},C.o=function(D,u){return Object.prototype.hasOwnProperty.call(D,u)},C.p="/dist/",C(C.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(L,h,C){"use strict";var D=Object.prototype.hasOwnProperty,u="~";function f(){}Object.create&&(f.prototype=Object.create(null),new f().__proto__||(u=!1));function w(a,_,m){this.fn=a,this.context=_,this.once=m||!1}function d(a,_,m,c,g){if(typeof m!="function")throw new TypeError("The listener must be a function");var v=new w(m,c||a,g),x=u?u+_:_;return a._events[x]?a._events[x].fn?a._events[x]=[a._events[x],v]:a._events[x].push(v):(a._events[x]=v,a._eventsCount++),a}function o(a,_){--a._eventsCount===0?a._events=new f:delete a._events[_]}function l(){this._events=new f,this._eventsCount=0}l.prototype.eventNames=function(){var _=[],m,c;if(this._eventsCount===0)return _;for(c in m=this._events)D.call(m,c)&&_.push(u?c.slice(1):c);return Object.getOwnPropertySymbols?_.concat(Object.getOwnPropertySymbols(m)):_},l.prototype.listeners=function(_){var m=u?u+_:_,c=this._events[m];if(!c)return[];if(c.fn)return[c.fn];for(var g=0,v=c.length,x=new Array(v);g<v;g++)x[g]=c[g].fn;return x},l.prototype.listenerCount=function(_){var m=u?u+_:_,c=this._events[m];return c?c.fn?1:c.length:0},l.prototype.emit=function(_,m,c,g,v,x){var n=u?u+_:_;if(!this._events[n])return!1;var i=this._events[n],t=arguments.length,S,E;if(i.fn){i.once&&this.removeListener(_,i.fn,void 0,!0);switch(t){case 1:return i.fn.call(i.context),!0;case 2:return i.fn.call(i.context,m),!0;case 3:return i.fn.call(i.context,m,c),!0;case 4:return i.fn.call(i.context,m,c,g),!0;case 5:return i.fn.call(i.context,m,c,g,v),!0;case 6:return i.fn.call(i.context,m,c,g,v,x),!0}for(E=1,S=new Array(t-1);E<t;E++)S[E-1]=arguments[E];i.fn.apply(i.context,S)}else{var s=i.length,P;for(E=0;E<s;E++){i[E].once&&this.removeListener(_,i[E].fn,void 0,!0);switch(t){case 1:i[E].fn.call(i[E].context);break;case 2:i[E].fn.call(i[E].context,m);break;case 3:i[E].fn.call(i[E].context,m,c);break;case 4:i[E].fn.call(i[E].context,m,c,g);break;default:if(!S)for(P=1,S=new Array(t-1);P<t;P++)S[P-1]=arguments[P];i[E].fn.apply(i[E].context,S)}}}return!0},l.prototype.on=function(_,m,c){return d(this,_,m,c,!1)},l.prototype.once=function(_,m,c){return d(this,_,m,c,!0)},l.prototype.removeListener=function(_,m,c,g){var v=u?u+_:_;if(!this._events[v])return this;if(!m)return o(this,v),this;var x=this._events[v];if(x.fn)x.fn===m&&(!g||x.once)&&(!c||x.context===c)&&o(this,v);else{for(var n=0,i=[],t=x.length;n<t;n++)(x[n].fn!==m||g&&!x[n].once||c&&x[n].context!==c)&&i.push(x[n]);i.length?this._events[v]=i.length===1?i[0]:i:o(this,v)}return this},l.prototype.removeAllListeners=function(_){var m;return _?(m=u?u+_:_,this._events[m]&&o(this,m)):(this._events=new f,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=u,l.EventEmitter=l,L.exports=l},"./node_modules/url-toolkit/src/url-toolkit.js":function(L,h,C){(function(D){var u=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,f=/^([^\/?#]*)([^]*)$/,w=/(?:\/|^)\.(?=\/)/g,d=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(l,a,_){if(_=_||{},l=l.trim(),a=a.trim(),!a){if(!_.alwaysNormalize)return l;var m=o.parseURL(l);if(!m)throw new Error("Error trying to parse base URL.");return m.path=o.normalizePath(m.path),o.buildURLFromParts(m)}var c=o.parseURL(a);if(!c)throw new Error("Error trying to parse relative URL.");if(c.scheme)return _.alwaysNormalize?(c.path=o.normalizePath(c.path),o.buildURLFromParts(c)):a;var g=o.parseURL(l);if(!g)throw new Error("Error trying to parse base URL.");if(!g.netLoc&&g.path&&g.path[0]!=="/"){var v=f.exec(g.path);g.netLoc=v[1],g.path=v[2]}g.netLoc&&!g.path&&(g.path="/");var x={scheme:g.scheme,netLoc:c.netLoc,path:null,params:c.params,query:c.query,fragment:c.fragment};if(!c.netLoc&&(x.netLoc=g.netLoc,c.path[0]!=="/"))if(!c.path)x.path=g.path,c.params||(x.params=g.params,c.query||(x.query=g.query));else{var n=g.path,i=n.substring(0,n.lastIndexOf("/")+1)+c.path;x.path=o.normalizePath(i)}return x.path===null&&(x.path=_.alwaysNormalize?o.normalizePath(c.path):c.path),o.buildURLFromParts(x)},parseURL:function(l){var a=u.exec(l);return a?{scheme:a[1]||"",netLoc:a[2]||"",path:a[3]||"",params:a[4]||"",query:a[5]||"",fragment:a[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(w,"");l.length!==(l=l.replace(d,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};L.exports=o})(this)},"./node_modules/webworkify-webpack/index.js":function(L,h,C){function D(_){var m={};function c(v){if(m[v])return m[v].exports;var x=m[v]={i:v,l:!1,exports:{}};return _[v].call(x.exports,x,x.exports,c),x.l=!0,x.exports}c.m=_,c.c=m,c.i=function(v){return v},c.d=function(v,x,n){c.o(v,x)||Object.defineProperty(v,x,{configurable:!1,enumerable:!0,get:n})},c.r=function(v){Object.defineProperty(v,"__esModule",{value:!0})},c.n=function(v){var x=v&&v.__esModule?function(){return v.default}:function(){return v};return c.d(x,"a",x),x},c.o=function(v,x){return Object.prototype.hasOwnProperty.call(v,x)},c.p="/",c.oe=function(v){throw console.error(v),v};var g=c(c.s=ENTRY_MODULE);return g.default||g}var u="[\\.|\\-|\\+|\\w|/|@]+",f="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+u+").*?\\)";function w(_){return(_+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function d(_){return!isNaN(1*_)}function o(_,m,c){var g={};g[c]=[];var v=m.toString(),x=v.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!x)return g;for(var n=x[1],i=new RegExp("(\\\\n|\\W)"+w(n)+f,"g"),t;t=i.exec(v);){if(t[3]==="dll-reference")continue;g[c].push(t[3])}for(i=new RegExp("\\("+w(n)+'\\("(dll-reference\\s('+u+'))"\\)\\)'+f,"g");t=i.exec(v);)_[t[2]]||(g[c].push(t[1]),_[t[2]]=C(t[1]).m),g[t[2]]=g[t[2]]||[],g[t[2]].push(t[4]);for(var S=Object.keys(g),E=0;E<S.length;E++)for(var s=0;s<g[S[E]].length;s++)d(g[S[E]][s])&&(g[S[E]][s]=1*g[S[E]][s]);return g}function l(_){var m=Object.keys(_);return m.reduce(function(c,g){return c||_[g].length>0},!1)}function a(_,m){for(var c={main:[m]},g={main:[]},v={main:{}};l(c);)for(var x=Object.keys(c),n=0;n<x.length;n++){var i=x[n],t=c[i],S=t.pop();if(v[i]=v[i]||{},v[i][S]||!_[i][S])continue;v[i][S]=!0,g[i]=g[i]||[],g[i].push(S);for(var E=o(_,_[i][S],i),s=Object.keys(E),P=0;P<s.length;P++)c[s[P]]=c[s[P]]||[],c[s[P]]=c[s[P]].concat(E[s[P]])}return g}L.exports=function(_,m){m=m||{};var c={main:C.m},g=m.all?{main:Object.keys(c.main)}:a(c,_),v="";Object.keys(g).filter(function(S){return S!=="main"}).forEach(function(S){for(var E=0;g[S][E];)E++;g[S].push(E),c[S][E]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",v=v+"var "+S+" = ("+D.toString().replace("ENTRY_MODULE",JSON.stringify(E))+")({"+g[S].map(function(s){return""+JSON.stringify(s)+": "+c[S][s].toString()}).join(",")+`});
|
|
|
`}),v=v+"new (("+D.toString().replace("ENTRY_MODULE",JSON.stringify(_))+")({"+g.main.map(function(S){return""+JSON.stringify(S)+": "+c.main[S].toString()}).join(",")+"}))(self);";var x=new window.Blob([v],{type:"text/javascript"});if(m.bare)return x;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,i=n.createObjectURL(x),t=new window.Worker(i);return t.objectURL=i,t}},"./src/config.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"hlsDefaultConfig",function(){return P}),C.d(h,"mergeConfig",function(){return b}),C.d(h,"enableStreamingMode",function(){return y});var D=C("./src/controller/abr-controller.ts"),u=C("./src/controller/audio-stream-controller.ts"),f=C("./src/controller/audio-track-controller.ts"),w=C("./src/controller/subtitle-stream-controller.ts"),d=C("./src/controller/subtitle-track-controller.ts"),o=C("./src/controller/buffer-controller.ts"),l=C("./src/controller/timeline-controller.ts"),a=C("./src/controller/cap-level-controller.ts"),_=C("./src/controller/fps-controller.ts"),m=C("./src/controller/eme-controller.ts"),c=C("./src/controller/cmcd-controller.ts"),g=C("./src/utils/xhr-loader.ts"),v=C("./src/utils/fetch-loader.ts"),x=C("./src/utils/cues.ts"),n=C("./src/utils/mediakeys-helper.ts"),i=C("./src/utils/logger.ts");function t(){return t=Object.assign||function(p){for(var T=1;T<arguments.length;T++){var M=arguments[T];for(var N in M)Object.prototype.hasOwnProperty.call(M,N)&&(p[N]=M[N])}return p},t.apply(this,arguments)}function S(p,T){var M=Object.keys(p);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(p);T&&(N=N.filter(function(I){return Object.getOwnPropertyDescriptor(p,I).enumerable})),M.push.apply(M,N)}return M}function E(p){for(var T=1;T<arguments.length;T++){var M=arguments[T]!=null?arguments[T]:{};T%2?S(Object(M),!0).forEach(function(N){s(p,N,M[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(M)):S(Object(M)).forEach(function(N){Object.defineProperty(p,N,Object.getOwnPropertyDescriptor(M,N))})}return p}function s(p,T,M){return T in p?Object.defineProperty(p,T,{value:M,enumerable:!0,configurable:!0,writable:!0}):p[T]=M,p}var P=E(E({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:g.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:D.default,bufferController:o.default,capLevelController:a.default,fpsController:_.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},O()),{},{subtitleStreamController:w.SubtitleStreamController,subtitleTrackController:d.default,timelineController:l.TimelineController,audioStreamController:u.default,audioTrackController:f.default,emeController:m.default,cmcdController:c.default});function O(){return{cueHandler:x.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 b(p,T){if((T.liveSyncDurationCount||T.liveMaxLatencyDurationCount)&&(T.liveSyncDuration||T.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(T.liveMaxLatencyDurationCount!==void 0&&(T.liveSyncDurationCount===void 0||T.liveMaxLatencyDurationCount<=T.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(T.liveMaxLatencyDuration!==void 0&&(T.liveSyncDuration===void 0||T.liveMaxLatencyDuration<=T.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},p,T)}function y(p){var T=p.loader;if(T!==v.default&&T!==g.default)i.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),p.progressive=!1;else{var M=Object(v.fetchSupported)();M&&(p.loader=v.default,p.progressive=!0,p.enableSoftwareAES=!0,i.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/polyfills/number.ts"),u=C("./src/utils/ewma-bandwidth-estimator.ts"),f=C("./src/events.ts"),w=C("./src/utils/buffer-helper.ts"),d=C("./src/errors.ts"),o=C("./src/types/loader.ts"),l=C("./src/utils/logger.ts");function a(c,g){for(var v=0;v<g.length;v++){var x=g[v];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(c,x.key,x)}}function _(c,g,v){return g&&a(c.prototype,g),v&&a(c,v),c}var m=function(){function c(v){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=v;var x=v.config;this.bwEstimator=new u.default(x.abrEwmaSlowVoD,x.abrEwmaFastVoD,x.abrEwmaDefaultEstimate),this.registerListeners()}var g=c.prototype;return g.registerListeners=function(){var x=this.hls;x.on(f.Events.FRAG_LOADING,this.onFragLoading,this),x.on(f.Events.FRAG_LOADED,this.onFragLoaded,this),x.on(f.Events.FRAG_BUFFERED,this.onFragBuffered,this),x.on(f.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(f.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){var x=this.hls;x.off(f.Events.FRAG_LOADING,this.onFragLoading,this),x.off(f.Events.FRAG_LOADED,this.onFragLoaded,this),x.off(f.Events.FRAG_BUFFERED,this.onFragBuffered,this),x.off(f.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(f.Events.ERROR,this.onError,this)},g.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},g.onFragLoading=function(x,n){var i=n.frag;if(i.type===o.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=i,this.partCurrent=(t=n.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},g.onLevelLoaded=function(x,n){var i=this.hls.config;n.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)},g._abandonRulesCheck=function(){var x=this.fragCurrent,n=this.partCurrent,i=this.hls,t=i.autoLevelEnabled,S=i.config,E=i.media;if(!x||!E)return;var s=n?n.stats:x.stats,P=n?n.duration:x.duration;if(s.aborted){l.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||E.paused||!E.playbackRate||!E.readyState)return;var O=performance.now()-s.loading.start,b=Math.abs(E.playbackRate);if(O<=500*P/b)return;var y=i.levels,p=i.minAutoLevel,T=y[x.level],M=s.total||Math.max(s.loaded,Math.round(P*T.maxBitrate/8)),N=Math.max(1,s.bwEstimate?s.bwEstimate/8:s.loaded*1e3/O),I=(M-s.loaded)/N,K=E.currentTime,H=(w.BufferHelper.bufferInfo(E,K,S.maxBufferHole).end-K)/b;if(H>=2*P/b||I<=H)return;var W=Number.POSITIVE_INFINITY,z;for(z=x.level-1;z>p;z--){var U=y[z].maxBitrate;if(W=P*U/(8*.8*N),W<H)break}if(W>=I)return;var B=this.bwEstimator.getEstimate();l.logger.warn("Fragment "+x.sn+(n?" part "+n.index:"")+" of level "+x.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+z+`
|
|
|
Current BW estimate: `+(Object(D.isFiniteNumber)(B)?(B/1024).toFixed(3):"Unknown")+` Kb/s
|
|
|
Estimated load time for current fragment: `+I.toFixed(3)+` s
|
|
|
Estimated load time for the next fragment: `+W.toFixed(3)+` s
|
|
|
Time to underbuffer: `+H.toFixed(3)+" s"),i.nextLoadLevel=z,this.bwEstimator.sample(O,s.loaded),this.clearTimer(),x.loader&&(this.fragCurrent=this.partCurrent=null,x.loader.abort()),i.trigger(f.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:x,part:n,stats:s})},g.onFragLoaded=function(x,n){var i=n.frag,t=n.part;if(i.type===o.PlaylistLevelType.MAIN&&Object(D.isFiniteNumber)(i.sn)){var S=t?t.stats:i.stats,E=t?t.duration:i.duration;if(this.clearTimer(),this.lastLoadedFragLevel=i.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var s=this.hls.levels[i.level],P=(s.loaded?s.loaded.bytes:0)+S.loaded,O=(s.loaded?s.loaded.duration:0)+E;s.loaded={bytes:P,duration:O},s.realBitrate=Math.round(8*P/O)}if(i.bitrateTest){var b={stats:S,frag:i,part:t,id:i.type};this.onFragBuffered(f.Events.FRAG_BUFFERED,b),i.bitrateTest=!1}}},g.onFragBuffered=function(x,n){var i=n.frag,t=n.part,S=t?t.stats:i.stats;if(S.aborted)return;if(i.type!==o.PlaylistLevelType.MAIN||i.sn==="initSegment")return;var E=S.parsing.end-S.loading.start;this.bwEstimator.sample(E,S.loaded),S.bwEstimate=this.bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=E/1e3:this.bitrateTestDelay=0},g.onError=function(x,n){switch(n.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},g.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},g.getNextABRAutoLevel=function(){var x=this.fragCurrent,n=this.partCurrent,i=this.hls,t=i.maxAutoLevel,S=i.config,E=i.minAutoLevel,s=i.media,P=n?n.duration:x?x.duration:0,O=s?s.currentTime:0,b=s&&s.playbackRate!==0?Math.abs(s.playbackRate):1,y=this.bwEstimator?this.bwEstimator.getEstimate():S.abrEwmaDefaultEstimate,p=(w.BufferHelper.bufferInfo(s,O,S.maxBufferHole).end-O)/b,T=this.findBestLevel(y,E,t,p,S.abrBandWidthFactor,S.abrBandWidthUpFactor);if(T>=0)return T;l.logger.trace((p?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var M=P?Math.min(P,S.maxStarvationDelay):S.maxStarvationDelay,N=S.abrBandWidthFactor,I=S.abrBandWidthUpFactor;if(!p){var K=this.bitrateTestDelay;if(K){var H=P?Math.min(P,S.maxLoadingDelay):S.maxLoadingDelay;M=H-K,l.logger.trace("bitrate test took "+Math.round(1e3*K)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*M)+" ms"),N=I=1}}return T=this.findBestLevel(y,E,t,p+M,N,I),Math.max(T,0)},g.findBestLevel=function(x,n,i,t,S,E){for(var s,P=this.fragCurrent,O=this.partCurrent,b=this.lastLoadedFragLevel,y=this.hls.levels,p=y[b],T=!!(p!=null&&(s=p.details)!==null&&s!==void 0&&s.live),M=p==null?void 0:p.codecSet,N=O?O.duration:P?P.duration:0,I=i;I>=n;I--){var K=y[I];if(!K||M&&K.codecSet!==M)continue;var H=K.details,W=(O?H==null?void 0:H.partTarget:H==null?void 0:H.averagetargetduration)||N,z=void 0;I<=b?z=S*x:z=E*x;var U=y[I].maxBitrate,B=U*W/z;if(l.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+I+"/"+Math.round(z)+"/"+U+"/"+W+"/"+t+"/"+B),z>U&&(!B||T&&!this.bitrateTestDelay||B<t))return I}return-1},_(c,[{key:"nextAutoLevel",get:function(){var x=this._nextAutoLevel,n=this.bwEstimator;if(x!==-1&&(!n||!n.canEstimate()))return x;var i=this.getNextABRAutoLevel();return x!==-1&&(i=Math.min(x,i)),i},set:function(x){this._nextAutoLevel=x}}]),c}();h.default=m},"./src/controller/audio-stream-controller.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/polyfills/number.ts"),u=C("./src/controller/base-stream-controller.ts"),f=C("./src/events.ts"),w=C("./src/utils/buffer-helper.ts"),d=C("./src/controller/fragment-tracker.ts"),o=C("./src/types/level.ts"),l=C("./src/types/loader.ts"),a=C("./src/loader/fragment.ts"),_=C("./src/demux/chunk-cache.ts"),m=C("./src/demux/transmuxer-interface.ts"),c=C("./src/types/transmuxer.ts"),g=C("./src/controller/fragment-finders.ts"),v=C("./src/utils/discontinuities.ts"),x=C("./src/errors.ts"),n=C("./src/utils/logger.ts");function i(){return i=Object.assign||function(P){for(var O=1;O<arguments.length;O++){var b=arguments[O];for(var y in b)Object.prototype.hasOwnProperty.call(b,y)&&(P[y]=b[y])}return P},i.apply(this,arguments)}function t(P,O){P.prototype=Object.create(O.prototype),P.prototype.constructor=P,S(P,O)}function S(P,O){return S=Object.setPrototypeOf||function(y,p){return y.__proto__=p,y},S(P,O)}var E=100,s=function(P){t(O,P);function O(y,p){var T;return T=P.call(this,y,p,"[audio-stream-controller]")||this,T.videoBuffer=null,T.videoTrackCC=-1,T.waitingVideoCC=-1,T.audioSwitch=!1,T.trackId=-1,T.waitingData=null,T.mainDetails=null,T.bufferFlushed=!1,T._registerListeners(),T}var b=O.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var p=this.hls;p.on(f.Events.MEDIA_ATTACHED,this.onMediaAttached,this),p.on(f.Events.MEDIA_DETACHING,this.onMediaDetaching,this),p.on(f.Events.MANIFEST_LOADING,this.onManifestLoading,this),p.on(f.Events.LEVEL_LOADED,this.onLevelLoaded,this),p.on(f.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),p.on(f.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),p.on(f.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),p.on(f.Events.ERROR,this.onError,this),p.on(f.Events.BUFFER_RESET,this.onBufferReset,this),p.on(f.Events.BUFFER_CREATED,this.onBufferCreated,this),p.on(f.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),p.on(f.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),p.on(f.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b._unregisterListeners=function(){var p=this.hls;p.off(f.Events.MEDIA_ATTACHED,this.onMediaAttached,this),p.off(f.Events.MEDIA_DETACHING,this.onMediaDetaching,this),p.off(f.Events.MANIFEST_LOADING,this.onManifestLoading,this),p.off(f.Events.LEVEL_LOADED,this.onLevelLoaded,this),p.off(f.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),p.off(f.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),p.off(f.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),p.off(f.Events.ERROR,this.onError,this),p.off(f.Events.BUFFER_RESET,this.onBufferReset,this),p.off(f.Events.BUFFER_CREATED,this.onBufferCreated,this),p.off(f.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),p.off(f.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),p.off(f.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b.onInitPtsFound=function(p,T){var M=T.frag,N=T.id,I=T.initPTS;if(N==="main"){var K=M.cc;this.initPTS[M.cc]=I,this.log("InitPTS for cc: "+K+" found from main: "+I),this.videoTrackCC=K,this.state===u.State.WAITING_INIT_PTS&&this.tick()}},b.startLoad=function(p){if(!this.levels){this.startPosition=p,this.state=u.State.STOPPED;return}var T=this.lastCurrentTime;this.stopLoad(),this.setInterval(E),this.fragLoadError=0,T>0&&p===-1?(this.log("Override startPosition with lastCurrentTime @"+T.toFixed(3)),this.state=u.State.IDLE):(this.loadedmetadata=!1,this.state=u.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=p,this.tick()},b.doTick=function(){switch(this.state){case u.State.IDLE:this.doTickIdle();break;case u.State.WAITING_TRACK:{var p,T=this.levels,M=this.trackId,N=T==null||((p=T[M])===null||p===void 0)?void 0:p.details;if(N){if(this.waitForCdnTuneIn(N))break;this.state=u.State.WAITING_INIT_PTS}break}case u.State.FRAG_LOADING_WAITING_RETRY:{var I,K=performance.now(),H=this.retryDate;(!H||K>=H||(I=this.media)!==null&&I!==void 0&&I.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=u.State.IDLE);break}case u.State.WAITING_INIT_PTS:{var W=this.waitingData;if(W){var z=W.frag,U=W.part,B=W.cache,G=W.complete;if(this.initPTS[z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=u.State.FRAG_LOADING;var q=B.flush(),ae={frag:z,part:U,payload:q,networkDetails:null};this._handleFragmentLoadProgress(ae),G&&P.prototype._handleFragmentLoadComplete.call(this,ae)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+z.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var se=this.getLoadPosition(),we=w.BufferHelper.bufferInfo(this.mediaBuffer,se,this.config.maxBufferHole),Se=Object(g.fragmentWithinToleranceTest)(we.end,this.config.maxFragLookUpTolerance,z);Se<0&&(n.logger.log("Waiting fragment cc ("+z.cc+") @ "+z.start+" cancelled because another fragment at "+we.end+" is needed"),this.clearWaitingFragment())}}else this.state=u.State.IDLE}}this.onTickEnd()},b.clearWaitingFragment=function(){var p=this.waitingData;p&&(this.fragmentTracker.removeFragment(p.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=u.State.IDLE)},b.onTickEnd=function(){var p=this.media;if(!p||!p.readyState)return;var T=this.mediaBuffer?this.mediaBuffer:p,M=T.buffered;!this.loadedmetadata&&M.length&&(this.loadedmetadata=!0),this.lastCurrentTime=p.currentTime},b.doTickIdle=function(){var p,T,M=this.hls,N=this.levels,I=this.media,K=this.trackId,H=M.config;if(!N||!N[K])return;if(!I&&(this.startFragRequested||!H.startFragPrefetch))return;var W=N[K],z=W.details;if(!z||z.live&&this.levelLastLoaded!==K||this.waitForCdnTuneIn(z)){this.state=u.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,a.ElementaryStreamTypes.AUDIO,l.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,l.PlaylistLevelType.AUDIO);if(U===null)return;var B=U.len,G=this.getMaxBufferLength(),q=this.audioSwitch;if(B>=G&&!q)return;if(!q&&this._streamEnded(U,z)){M.trigger(f.Events.BUFFER_EOS,{type:"audio"}),this.state=u.State.ENDED;return}var ae=z.fragments,se=ae[0].start,we=U.end;if(q){var Se=this.getLoadPosition();we=Se,z.PTSKnown&&Se<se&&((U.end>se||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),I.currentTime=se+.05))}var de=this.getNextFragment(we,z);if(!de){this.bufferFlushed=!0;return}((p=de.decryptdata)===null||p===void 0?void 0:p.keyFormat)==="identity"&&!((T=de.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(de,z):this.loadFragment(de,z,we)},b.getMaxBufferLength=function(){var p=P.prototype.getMaxBufferLength.call(this),T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,l.PlaylistLevelType.MAIN);return T===null?p:Math.max(p,T.len)},b.onMediaDetaching=function(){this.videoBuffer=null,P.prototype.onMediaDetaching.call(this)},b.onAudioTracksUpdated=function(p,T){var M=T.audioTracks;this.resetTransmuxer(),this.levels=M.map(function(N){return new o.Level(N)})},b.onAudioTrackSwitching=function(p,T){var M=!!T.url;this.trackId=T.id;var N=this.fragCurrent;N!=null&&N.loader&&N.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),M?this.setInterval(E):this.resetTransmuxer(),M?(this.audioSwitch=!0,this.state=u.State.IDLE):this.state=u.State.STOPPED,this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},b.onLevelLoaded=function(p,T){this.mainDetails=T.details},b.onAudioTrackLoaded=function(p,T){var M,N=this.levels,I=T.details,K=T.id;if(!N){this.warn("Audio tracks were reset while loading level "+K);return}this.log("Track "+K+" loaded ["+I.startSN+","+I.endSN+"],duration:"+I.totalduration);var H=N[K],W=0;if(I.live||(M=H.details)!==null&&M!==void 0&&M.live){var z=this.mainDetails;if(I.fragments[0]||(I.deltaUpdateFailed=!0),I.deltaUpdateFailed||!z)return;!H.details&&I.hasProgramDateTime&&z.hasProgramDateTime?(Object(v.alignMediaPlaylistByPDT)(I,z),W=I.fragments[0].start):W=this.alignPlaylists(I,H.details)}H.details=I,this.levelLastLoaded=K,!this.startFragRequested&&(this.mainDetails||!I.live)&&this.setStartPosition(H.details,W),this.state===u.State.WAITING_TRACK&&!this.waitForCdnTuneIn(I)&&(this.state=u.State.IDLE),this.tick()},b._handleFragmentLoadProgress=function(p){var T,M=p.frag,N=p.part,I=p.payload,K=this.config,H=this.trackId,W=this.levels;if(!W){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+M.sn+" of level "+M.level+" will not be buffered");return}var z=W[H];console.assert(z,"Audio track is defined on fragment load progress");var U=z.details;console.assert(U,"Audio track details are defined on fragment load progress");var B=K.defaultAudioCodec||z.audioCodec||"mp4a.40.2",G=this.transmuxer;G||(G=this.transmuxer=new m.default(this.hls,l.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var q=this.initPTS[M.cc],ae=(T=M.initSegment)===null||T===void 0?void 0:T.data;if(q!==void 0){var se=!1,we=N?N.index:-1,Se=we!==-1,de=new c.ChunkMetadata(M.level,M.sn,M.stats.chunkCount,I.byteLength,we,Se);G.push(I,ae,B,"",M,N,U.totalduration,se,de,q)}else{n.logger.log("Unknown video PTS for cc "+M.cc+", waiting for video PTS before demuxing audio frag "+M.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+H);var xe=this.waitingData=this.waitingData||{frag:M,part:N,cache:new _.default,complete:!1},he=xe.cache;he.push(new Uint8Array(I)),this.waitingVideoCC=this.videoTrackCC,this.state=u.State.WAITING_INIT_PTS}},b._handleFragmentLoadComplete=function(p){if(this.waitingData){this.waitingData.complete=!0;return}P.prototype._handleFragmentLoadComplete.call(this,p)},b.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},b.onBufferCreated=function(p,T){var M=T.tracks.audio;M&&(this.mediaBuffer=M.buffer),T.tracks.video&&(this.videoBuffer=T.tracks.video.buffer)},b.onFragBuffered=function(p,T){var M=T.frag,N=T.part;if(M.type!==l.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(M)){this.warn("Fragment "+M.sn+(N?" p: "+N.index:"")+" of level "+M.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}M.sn!=="initSegment"&&(this.fragPrevious=M,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(f.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(M,N)},b.onError=function(p,T){switch(T.details){case x.ErrorDetails.FRAG_LOAD_ERROR:case x.ErrorDetails.FRAG_LOAD_TIMEOUT:case x.ErrorDetails.KEY_LOAD_ERROR:case x.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(l.PlaylistLevelType.AUDIO,T);break;case x.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case x.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==u.State.ERROR&&this.state!==u.State.STOPPED&&(this.state=T.fatal?u.State.ERROR:u.State.IDLE,this.warn(T.details+" while loading frag, switching to "+this.state+" state"));break;case x.ErrorDetails.BUFFER_FULL_ERROR:if(T.parent==="audio"&&(this.state===u.State.PARSING||this.state===u.State.PARSED)){var M=!0,N=this.getFwdBufferInfo(this.mediaBuffer,l.PlaylistLevelType.AUDIO);N&&N.len>.5&&(M=!this.reduceMaxBufferLength(N.len)),M&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,P.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},b.onBufferFlushed=function(p,T){var M=T.type;M===a.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},b._handleTransmuxComplete=function(p){var T,M="audio",N=this.hls,I=p.remuxResult,K=p.chunkMeta,H=this.getCurrentContext(K);if(!H){this.warn("The loading context changed while buffering fragment "+K.sn+" of level "+K.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(K.level);return}var W=H.frag,z=H.part,U=I.audio,B=I.text,G=I.id3,q=I.initSegment;if(this.fragContextChanged(W))return;if(this.state=u.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),q!=null&&q.tracks&&(this._bufferInitSegment(q.tracks,W,K),N.trigger(f.Events.FRAG_PARSING_INIT_SEGMENT,{frag:W,id:M,tracks:q.tracks})),U){var ae=U.startPTS,se=U.endPTS,we=U.startDTS,Se=U.endDTS;z&&(z.elementaryStreams[a.ElementaryStreamTypes.AUDIO]={startPTS:ae,endPTS:se,startDTS:we,endDTS:Se}),W.setElementaryStreamInfo(a.ElementaryStreamTypes.AUDIO,ae,se,we,Se),this.bufferFragmentData(U,W,z,K)}if(G!=null&&(T=G.samples)!==null&&T!==void 0&&T.length){var de=i({frag:W,id:M},G);N.trigger(f.Events.FRAG_PARSING_METADATA,de)}if(B){var xe=i({frag:W,id:M},B);N.trigger(f.Events.FRAG_PARSING_USERDATA,xe)}},b._bufferInitSegment=function(p,T,M){if(this.state!==u.State.PARSING)return;p.video&&delete p.video;var N=p.audio;if(!N)return;N.levelCodec=N.codec,N.id="audio",this.log("Init audio buffer, container:"+N.container+", codecs[parsed]=["+N.codec+"]"),this.hls.trigger(f.Events.BUFFER_CODECS,p);var I=N.initSegment;if(I!=null&&I.byteLength){var K={type:"audio",frag:T,part:null,chunkMeta:M,parent:T.type,data:I};this.hls.trigger(f.Events.BUFFER_APPENDING,K)}this.tick()},b.loadFragment=function(p,T,M){var N=this.fragmentTracker.getState(p);this.fragCurrent=p,(this.audioSwitch||N===d.FragmentState.NOT_LOADED||N===d.FragmentState.PARTIAL)&&(p.sn==="initSegment"?this._loadInitSegment(p):T.live&&!Object(D.isFiniteNumber)(this.initPTS[p.cc])?(this.log("Waiting for video PTS in continuity counter "+p.cc+" of live stream before loading audio fragment "+p.sn+" of level "+this.trackId),this.state=u.State.WAITING_INIT_PTS):(this.startFragRequested=!0,P.prototype.loadFragment.call(this,p,T,M)))},b.completeAudioSwitch=function(){var p=this.hls,T=this.media,M=this.trackId;T&&(this.log("Switching audio track : flushing all audio"),P.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,p.trigger(f.Events.AUDIO_TRACK_SWITCHED,{id:M})},O}(u.default);h.default=s},"./src/controller/audio-track-controller.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/events.ts"),u=C("./src/errors.ts"),f=C("./src/controller/base-playlist-controller.ts"),w=C("./src/types/loader.ts");function d(m,c){for(var g=0;g<c.length;g++){var v=c[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}function o(m,c,g){return c&&d(m.prototype,c),g&&d(m,g),m}function l(m,c){m.prototype=Object.create(c.prototype),m.prototype.constructor=m,a(m,c)}function a(m,c){return a=Object.setPrototypeOf||function(v,x){return v.__proto__=x,v},a(m,c)}var _=function(m){l(c,m);function c(v){var x;return x=m.call(this,v,"[audio-track-controller]")||this,x.tracks=[],x.groupId=null,x.tracksInGroup=[],x.trackId=-1,x.trackName="",x.selectDefaultTrack=!0,x.registerListeners(),x}var g=c.prototype;return g.registerListeners=function(){var x=this.hls;x.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),x.on(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),x.on(D.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),x.on(D.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){var x=this.hls;x.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.off(D.Events.LEVEL_LOADING,this.onLevelLoading,this),x.off(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),x.off(D.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),x.off(D.Events.ERROR,this.onError,this)},g.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,m.prototype.destroy.call(this)},g.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},g.onManifestParsed=function(x,n){this.tracks=n.audioTracks||[]},g.onAudioTrackLoaded=function(x,n){var i=n.id,t=n.details,S=this.tracksInGroup[i];if(!S){this.warn("Invalid audio track id "+i);return}var E=S.details;S.details=n.details,this.log("audioTrack "+i+" loaded ["+t.startSN+"-"+t.endSN+"]"),i===this.trackId&&(this.retryCount=0,this.playlistLoaded(i,n,E))},g.onLevelLoading=function(x,n){this.switchLevel(n.level)},g.onLevelSwitching=function(x,n){this.switchLevel(n.level)},g.switchLevel=function(x){var n=this.hls.levels[x];if(!(n!=null&&n.audioGroupIds))return;var i=n.audioGroupIds[n.urlId];if(this.groupId!==i){this.groupId=i;var t=this.tracks.filter(function(E){return!i||E.groupId===i});this.selectDefaultTrack&&!t.some(function(E){return E.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var S={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+i+'" group-id'),this.hls.trigger(D.Events.AUDIO_TRACKS_UPDATED,S),this.selectInitialTrack()}},g.onError=function(x,n){if(m.prototype.onError.call(this,x,n),n.fatal||!n.context)return;n.context.type===w.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},g.setAudioTrack=function(x){var n=this.tracksInGroup;if(x<0||x>=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var i=n[this.trackId];this.log("Now switching to audio-track index "+x);var t=n[x],S=t.id,E=t.groupId,s=E===void 0?"":E,P=t.name,O=t.type,b=t.url;if(this.trackId=x,this.trackName=P,this.selectDefaultTrack=!1,this.hls.trigger(D.Events.AUDIO_TRACK_SWITCHING,{id:S,groupId:s,name:P,type:O,url:b}),t.details&&!t.details.live)return;var y=this.switchParams(t.url,i==null?void 0:i.details);this.loadPlaylist(y)},g.selectInitialTrack=function(){var x=this.tracksInGroup;console.assert(x.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,i=this.findTrackId(n)||this.findTrackId();i!==-1?this.setAudioTrack(i):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},g.findTrackId=function(x){for(var n=this.tracksInGroup,i=0;i<n.length;i++){var t=n[i];if((!this.selectDefaultTrack||t.default)&&(!x||x===t.name))return t.id}return-1},g.loadPlaylist=function(x){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var i=n.id,t=n.groupId,S=n.url;if(x)try{S=x.addDirectives(S)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("loading audio-track playlist for id: "+i),this.clearTimer(),this.hls.trigger(D.Events.AUDIO_TRACK_LOADING,{url:S,id:i,groupId:t,deliveryDirectives:x||null})}},o(c,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(x){this.selectDefaultTrack=!1,this.setAudioTrack(x)}}]),c}(f.default);h.default=_},"./src/controller/base-playlist-controller.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return o});var D=C("./src/polyfills/number.ts"),u=C("./src/types/level.ts"),f=C("./src/controller/level-helper.ts"),w=C("./src/utils/logger.ts"),d=C("./src/errors.ts"),o=function(){function l(_,m){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=w.logger.log.bind(w.logger,m+":"),this.warn=w.logger.warn.bind(w.logger,m+":"),this.hls=_}var a=l.prototype;return a.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},a.onError=function(m,c){c.fatal&&c.type===d.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},a.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},a.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},a.stopLoad=function(){this.canLoad=!1,this.clearTimer()},a.switchParams=function(m,c){var g=c==null?void 0:c.renditionReports;if(g)for(var v=0;v<g.length;v++){var x=g[v],n=""+x.URI;if(n===m.substr(-n.length)){var i=parseInt(x["LAST-MSN"]),t=parseInt(x["LAST-PART"]);if(c&&this.hls.config.lowLatencyMode){var S=Math.min(c.age-c.partTarget,c.targetduration);t!==void 0&&S>c.partTarget&&(t+=1)}if(Object(D.isFiniteNumber)(i))return new u.HlsUrlParameters(i,Object(D.isFiniteNumber)(t)?t:void 0,u.HlsSkip.No)}}},a.loadPlaylist=function(m){},a.shouldLoadTrack=function(m){return this.canLoad&&m&&!!m.url&&(!m.details||m.details.live)},a.playlistLoaded=function(m,c,g){var v=this,x=c.details,n=c.stats,i=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(x.advancedDateTime=Date.now()-i,x.live||g!=null&&g.live){if(x.reloaded(g),g&&this.log("live playlist "+m+" "+(x.advanced?"REFRESHED "+x.lastPartSn+"-"+x.lastPartIndex:"MISSED")),g&&x.fragments.length>0&&Object(f.mergeDetails)(g,x),!this.canLoad||!x.live)return;var t,S=void 0,E=void 0;if(x.canBlockReload&&x.endSN&&x.advanced){var s=this.hls.config.lowLatencyMode,P=x.lastPartSn,O=x.endSN,b=x.lastPartIndex,y=b!==-1,p=P===O,T=s?0:b;y?(S=p?O+1:P,E=p?T:b+1):S=O+1;var M=x.age,N=M+x.ageHeader,I=Math.min(N-x.partTarget,x.targetduration*1.5);if(I>0){if(g&&I>g.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+g.tuneInGoal+" to: "+I+" with playlist age: "+x.age),I=0;else{var K=Math.floor(I/x.targetduration);if(S+=K,E!==void 0){var H=Math.round(I%x.targetduration/x.partTarget);E+=H}this.log("CDN Tune-in age: "+x.ageHeader+"s last advanced "+M.toFixed(2)+"s goal: "+I+" skip sn "+K+" to part "+E)}x.tuneInGoal=I}if(t=this.getDeliveryDirectives(x,c.deliveryDirectives,S,E),s||!p){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(x,c.deliveryDirectives,S,E);var W=Object(f.computeReloadInterval)(x,n);S!==void 0&&x.canBlockReload&&(W-=x.partTarget||1),this.log("reload live playlist "+m+" in "+Math.round(W)+" ms"),this.timer=self.setTimeout(function(){return v.loadPlaylist(t)},W)}else this.clearTimer()},a.getDeliveryDirectives=function(m,c,g,v){var x=Object(u.getSkipValue)(m,g);return c!=null&&c.skip&&m.deltaUpdateFailed&&(g=c.msn,v=c.part,x=u.HlsSkip.No),new u.HlsUrlParameters(g,v,x)},a.retryLoadingOrFail=function(m){var c=this,g=this.hls.config,v=this.retryCount<g.levelLoadingMaxRetry;if(v){var x;if(this.retryCount++,m.details.indexOf("LoadTimeOut")>-1&&(x=m.context)!==null&&x!==void 0&&x.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+m.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*g.levelLoadingRetryDelay,g.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+m.details+'"')}}else this.warn('cannot recover from error "'+m.details+'"'),this.clearTimer(),m.fatal=!0;return v},l}()},"./src/controller/base-stream-controller.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"State",function(){return O}),C.d(h,"default",function(){return b});var D=C("./src/polyfills/number.ts"),u=C("./src/task-loop.ts"),f=C("./src/controller/fragment-tracker.ts"),w=C("./src/utils/buffer-helper.ts"),d=C("./src/utils/logger.ts"),o=C("./src/events.ts"),l=C("./src/errors.ts"),a=C("./src/types/transmuxer.ts"),_=C("./src/utils/mp4-tools.ts"),m=C("./src/utils/discontinuities.ts"),c=C("./src/controller/fragment-finders.ts"),g=C("./src/controller/level-helper.ts"),v=C("./src/loader/fragment-loader.ts"),x=C("./src/crypt/decrypter.ts"),n=C("./src/utils/time-ranges.ts"),i=C("./src/types/loader.ts");function t(y,p){for(var T=0;T<p.length;T++){var M=p[T];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(y,M.key,M)}}function S(y,p,T){return p&&t(y.prototype,p),T&&t(y,T),y}function E(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function s(y,p){y.prototype=Object.create(p.prototype),y.prototype.constructor=y,P(y,p)}function P(y,p){return P=Object.setPrototypeOf||function(M,N){return M.__proto__=N,M},P(y,p)}var O={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"},b=function(y){s(p,y);function p(M,N,I){var K;return K=y.call(this)||this,K.hls=void 0,K.fragPrevious=null,K.fragCurrent=null,K.fragmentTracker=void 0,K.transmuxer=null,K._state=O.STOPPED,K.media=void 0,K.mediaBuffer=void 0,K.config=void 0,K.bitrateTest=!1,K.lastCurrentTime=0,K.nextLoadPosition=0,K.startPosition=0,K.loadedmetadata=!1,K.fragLoadError=0,K.retryDate=0,K.levels=null,K.fragmentLoader=void 0,K.levelLastLoaded=null,K.startFragRequested=!1,K.decrypter=void 0,K.initPTS=[],K.onvseeking=null,K.onvended=null,K.logPrefix="",K.log=void 0,K.warn=void 0,K.logPrefix=I,K.log=d.logger.log.bind(d.logger,I+":"),K.warn=d.logger.warn.bind(d.logger,I+":"),K.hls=M,K.fragmentLoader=new v.default(M.config),K.fragmentTracker=N,K.config=M.config,K.decrypter=new x.default(M,M.config),M.on(o.Events.KEY_LOADED,K.onKeyLoaded,E(K)),K}var T=p.prototype;return T.doTick=function(){this.onTickEnd()},T.onTickEnd=function(){},T.startLoad=function(N){},T.stopLoad=function(){this.fragmentLoader.abort();var N=this.fragCurrent;N&&this.fragmentTracker.removeFragment(N),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED},T._streamEnded=function(N,I){var K=this.fragCurrent,H=this.fragmentTracker;if(!I.live&&K&&K.sn===I.endSN&&!N.nextStart){var W=H.getState(K);return W===f.FragmentState.PARTIAL||W===f.FragmentState.OK}return!1},T.onMediaAttached=function(N,I){var K=this.media=this.mediaBuffer=I.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),K.addEventListener("seeking",this.onvseeking),K.addEventListener("ended",this.onvended);var H=this.config;this.levels&&H.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(H.startPosition)},T.onMediaDetaching=function(){var N=this.media;N!=null&&N.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),N&&(N.removeEventListener("seeking",this.onvseeking),N.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},T.onMediaSeeking=function(){var N=this.config,I=this.fragCurrent,K=this.media,H=this.mediaBuffer,W=this.state,z=K?K.currentTime:0,U=w.BufferHelper.bufferInfo(H||K,z,N.maxBufferHole);if(this.log("media seeking to "+(Object(D.isFiniteNumber)(z)?z.toFixed(3):z)+", state: "+W),W===O.ENDED)this.resetLoadingState();else if(I&&!U.len){var B=N.maxFragLookUpTolerance,G=I.start-B,q=I.start+I.duration+B,ae=z>q;(z<G||ae)&&(ae&&I.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),I.loader.abort()),this.resetLoadingState())}K&&(this.lastCurrentTime=z),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=z),this.tickImmediate()},T.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},T.onKeyLoaded=function(N,I){if(this.state!==O.KEY_LOADING||I.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var K=this.levels[I.frag.level].details;K&&this.loadFragment(I.frag,K,I.frag.start)},T.onHandlerDestroying=function(){this.stopLoad(),y.prototype.onHandlerDestroying.call(this)},T.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(o.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,y.prototype.onHandlerDestroyed.call(this)},T.loadKey=function(N,I){this.log("Loading key for "+N.sn+" of ["+I.startSN+"-"+I.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+N.level),this.state=O.KEY_LOADING,this.fragCurrent=N,this.hls.trigger(o.Events.KEY_LOADING,{frag:N})},T.loadFragment=function(N,I,K){this._loadFragForPlayback(N,I,K)},T._loadFragForPlayback=function(N,I,K){var H=this,W=function(U){if(H.fragContextChanged(N)){H.warn("Fragment "+N.sn+(U.part?" p: "+U.part.index:"")+" of level "+N.level+" was dropped during download."),H.fragmentTracker.removeFragment(N);return}N.stats.chunkCount++,H._handleFragmentLoadProgress(U)};this._doFragLoad(N,I,K,W).then(function(z){if(!z)return;H.fragLoadError=0;var U=H.state;if(H.fragContextChanged(N)){(U===O.FRAG_LOADING||U===O.BACKTRACKING||!H.fragCurrent&&U===O.PARSING)&&(H.fragmentTracker.removeFragment(N),H.state=O.IDLE);return}if("payload"in z&&(H.log("Loaded fragment "+N.sn+" of level "+N.level),H.hls.trigger(o.Events.FRAG_LOADED,z),H.state===O.BACKTRACKING)){H.fragmentTracker.backtrack(N,z),H.resetFragmentLoading(N);return}H._handleFragmentLoadComplete(z)}).catch(function(z){H.warn(z),H.resetFragmentLoading(N)})},T.flushMainBuffer=function(N,I,K){if(K===void 0&&(K=null),!(N-I))return;var H={startOffset:N,endOffset:I,type:K};this.fragLoadError=0,this.hls.trigger(o.Events.BUFFER_FLUSHING,H)},T._loadInitSegment=function(N){var I=this;this._doFragLoad(N).then(function(K){if(!K||I.fragContextChanged(N)||!I.levels)throw new Error("init load aborted");return K}).then(function(K){var H=I.hls,W=K.payload,z=N.decryptdata;if(W&&W.byteLength>0&&z&&z.key&&z.iv&&z.method==="AES-128"){var U=self.performance.now();return I.decrypter.webCryptoDecrypt(new Uint8Array(W),z.key.buffer,z.iv.buffer).then(function(B){var G=self.performance.now();return H.trigger(o.Events.FRAG_DECRYPTED,{frag:N,payload:B,stats:{tstart:U,tdecrypt:G}}),K.payload=B,K})}return K}).then(function(K){var H=I.fragCurrent,W=I.hls,z=I.levels;if(!z)throw new Error("init load aborted, missing levels");var U=z[N.level].details;console.assert(U,"Level details are defined when init segment is loaded");var B=N.stats;I.state=O.IDLE,I.fragLoadError=0,N.data=new Uint8Array(K.payload),B.parsing.start=B.buffering.start=self.performance.now(),B.parsing.end=B.buffering.end=self.performance.now(),K.frag===H&&W.trigger(o.Events.FRAG_BUFFERED,{stats:B,frag:H,part:null,id:N.type}),I.tick()}).catch(function(K){I.warn(K),I.resetFragmentLoading(N)})},T.fragContextChanged=function(N){var I=this.fragCurrent;return!N||!I||N.level!==I.level||N.sn!==I.sn||N.urlId!==I.urlId},T.fragBufferedComplete=function(N,I){var K=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+N.type+" sn: "+N.sn+(I?" part: "+I.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+N.level+" "+n.default.toString(w.BufferHelper.getBuffered(K))),this.state=O.IDLE,this.tick()},T._handleFragmentLoadComplete=function(N){var I=this.transmuxer;if(!I)return;var K=N.frag,H=N.part,W=N.partsLoaded,z=!W||W.length===0||W.some(function(B){return!B}),U=new a.ChunkMetadata(K.level,K.sn,K.stats.chunkCount+1,0,H?H.index:-1,!z);I.flush(U)},T._handleFragmentLoadProgress=function(N){},T._doFragLoad=function(N,I,K,H){var W=this;if(K===void 0&&(K=null),!this.levels)throw new Error("frag load aborted, missing levels");if(K=Math.max(N.start,K||0),this.config.lowLatencyMode&&I){var z=I.partList;if(z&&H){K>N.end&&I.fragmentHint&&(N=I.fragmentHint);var U=this.getNextPart(z,N,K);if(U>-1){var B=z[U];return this.log("Loading part sn: "+N.sn+" p: "+B.index+" cc: "+N.cc+" of playlist ["+I.startSN+"-"+I.endSN+"] parts [0-"+U+"-"+(z.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+N.level+", target: "+parseFloat(K.toFixed(3))),this.nextLoadPosition=B.start+B.duration,this.state=O.FRAG_LOADING,this.hls.trigger(o.Events.FRAG_LOADING,{frag:N,part:z[U],targetBufferTime:K}),this.doFragPartsLoad(N,z,U,H).catch(function(G){return W.handleFragLoadError(G)})}else if(!N.url||this.loadedEndOfParts(z,K))return Promise.resolve(null)}}return this.log("Loading fragment "+N.sn+" cc: "+N.cc+" "+(I?"of ["+I.startSN+"-"+I.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+N.level+", target: "+parseFloat(K.toFixed(3))),Object(D.isFiniteNumber)(N.sn)&&!this.bitrateTest&&(this.nextLoadPosition=N.start+N.duration),this.state=O.FRAG_LOADING,this.hls.trigger(o.Events.FRAG_LOADING,{frag:N,targetBufferTime:K}),this.fragmentLoader.load(N,H).catch(function(G){return W.handleFragLoadError(G)})},T.doFragPartsLoad=function(N,I,K,H){var W=this;return new Promise(function(z,U){var B=[],G=function q(ae){var se=I[ae];W.fragmentLoader.loadPart(N,se,H).then(function(we){B[se.index]=we;var Se=we.part;W.hls.trigger(o.Events.FRAG_LOADED,we);var de=I[ae+1];if(de&&de.fragment===N)q(ae+1);else return z({frag:N,part:Se,partsLoaded:B})}).catch(U)};G(K)})},T.handleFragLoadError=function(N){var I=N.data;return I&&I.details===l.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(I.frag,I.part):this.hls.trigger(o.Events.ERROR,I),null},T._handleTransmuxerFlush=function(N){var I=this.getCurrentContext(N);if(!I||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var K=I.frag,H=I.part,W=I.level,z=self.performance.now();K.stats.parsing.end=z,H&&(H.stats.parsing.end=z),this.updateLevelTiming(K,H,W,N.partial)},T.getCurrentContext=function(N){var I=this.levels,K=N.level,H=N.sn,W=N.part;if(!I||!I[K])return this.warn("Levels object was unset while buffering fragment "+H+" of level "+K+". The current chunk will not be buffered."),null;var z=I[K],U=W>-1?Object(g.getPartWith)(z,H,W):null,B=U?U.fragment:Object(g.getFragmentWithSN)(z,H,this.fragCurrent);return B?{frag:B,part:U,level:z}:null},T.bufferFragmentData=function(N,I,K,H){if(!N||this.state!==O.PARSING)return;var W=N.data1,z=N.data2,U=W;if(W&&z&&(U=Object(_.appendUint8Array)(W,z)),!U||!U.length)return;var B={type:N.type,frag:I,part:K,chunkMeta:H,parent:I.type,data:U};this.hls.trigger(o.Events.BUFFER_APPENDING,B),N.dropped&&N.independent&&!K&&this.flushBufferGap(I)},T.flushBufferGap=function(N){var I=this.media;if(!I)return;if(!w.BufferHelper.isBuffered(I,I.currentTime)){this.flushMainBuffer(0,N.start);return}var K=I.currentTime,H=w.BufferHelper.bufferInfo(I,K,0),W=N.duration,z=Math.min(this.config.maxFragLookUpTolerance*2,W*.25),U=Math.max(Math.min(N.start-z,H.end-z),K+z);N.start-U>z&&this.flushMainBuffer(U,N.start)},T.getFwdBufferInfo=function(N,I){var K=this.config,H=this.getLoadPosition();if(!Object(D.isFiniteNumber)(H))return null;var W=w.BufferHelper.bufferInfo(N,H,K.maxBufferHole);if(W.len===0&&W.nextStart!==void 0){var z=this.fragmentTracker.getBufferedFrag(H,I);if(z&&W.nextStart<z.end)return w.BufferHelper.bufferInfo(N,H,Math.max(W.nextStart,K.maxBufferHole))}return W},T.getMaxBufferLength=function(N){var I=this.config,K;return N?K=Math.max(8*I.maxBufferSize/N,I.maxBufferLength):K=I.maxBufferLength,Math.min(K,I.maxMaxBufferLength)},T.reduceMaxBufferLength=function(N){var I=this.config,K=N||I.maxBufferLength;return I.maxMaxBufferLength>=K?(I.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+I.maxMaxBufferLength+"s"),!0):!1},T.getNextFragment=function(N,I){var K,H,W=I.fragments,z=W.length;if(!z)return null;var U=this.config,B=W[0].start,G;if(I.live){var q=U.initialLiveManifestSize;if(z<q)return this.warn("Not enough fragments to start playback (have: "+z+", need: "+q+")"),null;!I.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(G=this.getInitialLiveFragment(I,W),this.startPosition=G?this.hls.liveSyncPosition||G.start:N)}else N<=B&&(G=W[0]);if(!G){var ae=U.lowLatencyMode?I.partEnd:I.fragmentEnd;G=this.getFragmentAtPosition(N,ae,I)}return(K=G)!==null&&K!==void 0&&K.initSegment&&!((H=G)!==null&&H!==void 0&&H.initSegment.data)&&!this.bitrateTest&&(G=G.initSegment),G},T.getNextPart=function(N,I,K){for(var H=-1,W=!1,z=!0,U=0,B=N.length;U<B;U++){var G=N[U];if(z=z&&!G.independent,H>-1&&K<G.start)break;var q=G.loaded;!q&&(W||G.independent||z)&&G.fragment===I&&(H=U),W=q}return H},T.loadedEndOfParts=function(N,I){var K=N[N.length-1];return K&&I>K.start&&K.loaded},T.getInitialLiveFragment=function(N,I){var K=this.fragPrevious,H=null;if(K){if(N.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+K.programDateTime),H=Object(c.findFragmentByPDT)(I,K.endProgramDateTime,this.config.maxFragLookUpTolerance)),!H){var W=K.sn+1;if(W>=N.startSN&&W<=N.endSN){var z=I[W-N.startSN];K.cc===z.cc&&(H=z,this.log("Live playlist, switching playlist, load frag with next SN: "+H.sn))}H||(H=Object(c.findFragWithCC)(I,K.cc),H&&this.log("Live playlist, switching playlist, load frag with same CC: "+H.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(H=this.getFragmentAtPosition(U,this.bitrateTest?N.fragmentEnd:N.edge,N))}return H},T.getFragmentAtPosition=function(N,I,K){var H=this.config,W=this.fragPrevious,z=K.fragments,U=K.endSN,B=K.fragmentHint,G=H.maxFragLookUpTolerance,q=!!(H.lowLatencyMode&&K.partList&&B);q&&B&&!this.bitrateTest&&(z=z.concat(B),U=B.sn);var ae;if(N<I){var se=N>I-G?0:G;ae=Object(c.findFragmentByPTS)(W,z,N,se)}else ae=z[z.length-1];if(ae){var we=ae.sn-K.startSN,Se=W&&ae.level===W.level,de=z[we+1],xe=this.fragmentTracker.getState(ae);if(xe===f.FragmentState.BACKTRACKED){ae=null;for(var he=we;z[he]&&this.fragmentTracker.getState(z[he])===f.FragmentState.BACKTRACKED;)W?ae=z[he--]:ae=z[--he];ae||(ae=de)}else W&&ae.sn===W.sn&&!q&&(Se&&(ae.sn<U&&this.fragmentTracker.getState(de)!==f.FragmentState.OK?(this.log("SN "+ae.sn+" just loaded, load next one: "+de.sn),ae=de):ae=null))}return ae},T.synchronizeToLiveEdge=function(N){var I=this.config,K=this.media;if(!K)return;var H=this.hls.liveSyncPosition,W=K.currentTime,z=N.fragments[0].start,U=N.edge,B=W>=z-I.maxFragLookUpTolerance&&W<=U;if(H!==null&&K.duration>H&&(W<H||!B)){var G=I.liveMaxLatencyDuration!==void 0?I.liveMaxLatencyDuration:I.liveMaxLatencyDurationCount*N.targetduration;(!B&&K.readyState<4||W<U-G)&&(this.loadedmetadata||(this.nextLoadPosition=H),K.readyState&&(this.warn("Playback: "+W.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+H.toFixed(3)),K.currentTime=H))}},T.alignPlaylists=function(N,I){var K=this.levels,H=this.levelLastLoaded,W=this.fragPrevious,z=H!==null?K[H]:null,U=N.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var B=N.fragments[0].start,G=!I,q=N.alignedSliding&&Object(D.isFiniteNumber)(B);if(G||!q&&!B){Object(m.alignStream)(W,z,N);var ae=N.fragments[0].start;return this.log("Live playlist sliding: "+ae.toFixed(2)+" start-sn: "+(I?I.startSN:"na")+"->"+N.startSN+" prev-sn: "+(W?W.sn:"na")+" fragments: "+U),ae}return B},T.waitForCdnTuneIn=function(N){var I=3;return N.live&&N.canBlockReload&&N.tuneInGoal>Math.max(N.partHoldBack,N.partTarget*I)},T.setStartPosition=function(N,I){var K=this.startPosition;if(K<I&&(K=-1),K===-1||this.lastCurrentTime===-1){var H=N.startTimeOffset;Object(D.isFiniteNumber)(H)?(K=I+H,H<0&&(K+=N.totalduration),K=Math.min(Math.max(I,K),I+N.totalduration),this.log("Start time offset "+H+" found in playlist, adjust startPosition to "+K),this.startPosition=K):N.live?K=this.hls.liveSyncPosition||I:this.startPosition=K=0,this.lastCurrentTime=K}this.nextLoadPosition=K},T.getLoadPosition=function(){var N=this.media,I=0;return this.loadedmetadata&&N?I=N.currentTime:this.nextLoadPosition&&(I=this.nextLoadPosition),I},T.handleFragLoadAborted=function(N,I){this.transmuxer&&N.sn!=="initSegment"&&N.stats.aborted&&(this.warn("Fragment "+N.sn+(I?" part"+I.index:"")+" of level "+N.level+" was aborted"),this.resetFragmentLoading(N))},T.resetFragmentLoading=function(N){(!this.fragCurrent||!this.fragContextChanged(N))&&(this.state=O.IDLE)},T.onFragmentOrKeyLoadError=function(N,I){if(I.fatal)return;var K=I.frag;if(!K||K.type!==N)return;var H=this.fragCurrent;console.assert(H&&K.sn===H.sn&&K.level===H.level&&K.urlId===H.urlId,"Frag load error must match current frag to retry");var W=this.config;if(this.fragLoadError+1<=W.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(K.level))return;var z=Math.min(Math.pow(2,this.fragLoadError)*W.fragLoadingRetryDelay,W.fragLoadingMaxRetryTimeout);this.warn("Fragment "+K.sn+" of "+N+" "+K.level+" failed to load, retrying in "+z+"ms"),this.retryDate=self.performance.now()+z,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else I.levelRetry?(N===i.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(d.logger.error(I.details+" reaches max retry, redispatch as fatal ..."),I.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},T.afterBufferFlushed=function(N,I,K){if(!N)return;var H=w.BufferHelper.getBuffered(N);this.fragmentTracker.detectEvictedFragments(I,H,K),this.state===O.ENDED&&this.resetLoadingState()},T.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},T.resetLiveStartWhenNotLoaded=function(N){if(!this.loadedmetadata){this.startFragRequested=!1;var I=this.levels?this.levels[N].details:null;if(I!=null&&I.live)return this.startPosition=-1,this.setStartPosition(I,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},T.updateLevelTiming=function(N,I,K,H){var W=this,z=K.details;console.assert(!!z,"level.details must be defined");var U=Object.keys(N.elementaryStreams).reduce(function(B,G){var q=N.elementaryStreams[G];if(q){var ae=q.endPTS-q.startPTS;if(ae<=0)return W.warn("Could not parse fragment "+N.sn+" "+G+" duration reliably ("+ae+") resetting transmuxer to fallback to playlist timing"),W.resetTransmuxer(),B||!1;var se=H?0:Object(g.updateFragPTSDTS)(z,N,q.startPTS,q.endPTS,q.startDTS,q.endDTS);return W.hls.trigger(o.Events.LEVEL_PTS_UPDATED,{details:z,level:K,drift:se,type:G,frag:N,start:q.startPTS,end:q.endPTS}),!0}return B},!1);U?(this.state=O.PARSED,this.hls.trigger(o.Events.FRAG_PARSED,{frag:N,part:I})):this.resetLoadingState()},T.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},S(p,[{key:"state",get:function(){return this._state},set:function(N){var I=this._state;I!==N&&(this._state=N,this.log(I+"->"+N))}}]),p}(u.default)},"./src/controller/buffer-controller.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return c});var D=C("./src/polyfills/number.ts"),u=C("./src/events.ts"),f=C("./src/utils/logger.ts"),w=C("./src/errors.ts"),d=C("./src/utils/buffer-helper.ts"),o=C("./src/utils/mediasource-helper.ts"),l=C("./src/loader/fragment.ts"),a=C("./src/controller/buffer-operation-queue.ts"),_=Object(o.getMediaSource)(),m=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function g(x){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 i=n.hls,t=n.media,S=n.mediaSource;f.logger.log("[buffer-controller]: Media source opened"),t&&(n.updateMediaElementDuration(),i.trigger(u.Events.MEDIA_ATTACHED,{media:t})),S&&S.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){f.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){f.logger.log("[buffer-controller]: Media source ended")},this.hls=x,this._initSourceBuffer(),this.registerListeners()}var v=g.prototype;return v.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},v.destroy=function(){this.unregisterListeners(),this.details=null},v.registerListeners=function(){var n=this.hls;n.on(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(u.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(u.Events.BUFFER_RESET,this.onBufferReset,this),n.on(u.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(u.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(u.Events.BUFFER_EOS,this.onBufferEos,this),n.on(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(u.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(u.Events.FRAG_PARSED,this.onFragParsed,this),n.on(u.Events.FRAG_CHANGED,this.onFragChanged,this)},v.unregisterListeners=function(){var n=this.hls;n.off(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(u.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(u.Events.BUFFER_RESET,this.onBufferReset,this),n.off(u.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(u.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(u.Events.BUFFER_EOS,this.onBufferEos,this),n.off(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(u.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(u.Events.FRAG_PARSED,this.onFragParsed,this),n.off(u.Events.FRAG_CHANGED,this.onFragChanged,this)},v._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new a.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},v.onManifestParsed=function(n,i){var t=2;(i.audio&&!i.video||!i.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,f.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},v.onMediaAttaching=function(n,i){var t=this.media=i.media;if(t&&_){var S=this.mediaSource=new _;S.addEventListener("sourceopen",this._onMediaSourceOpen),S.addEventListener("sourceended",this._onMediaSourceEnded),S.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(S),this._objectUrl=t.src}},v.onMediaDetaching=function(){var n=this.media,i=this.mediaSource,t=this._objectUrl;if(i){if(f.logger.log("[buffer-controller]: media source detaching"),i.readyState==="open")try{i.endOfStream()}catch(S){f.logger.warn("[buffer-controller]: onMediaDetaching: "+S.message+" while calling endOfStream")}this.onBufferReset(),i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(t&&self.URL.revokeObjectURL(t),n.src===t?(n.removeAttribute("src"),n.load()):f.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(u.Events.MEDIA_DETACHED,void 0)},v.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(i){var t=n.sourceBuffer[i];try{t&&(n.removeBufferListeners(i),n.mediaSource&&n.mediaSource.removeSourceBuffer(t),n.sourceBuffer[i]=void 0)}catch(S){f.logger.warn("[buffer-controller]: Failed to reset the "+i+" buffer",S)}}),this._initSourceBuffer()},v.onBufferCodecs=function(n,i){var t=this,S=this.getSourceBufferTypes().length;if(Object.keys(i).forEach(function(E){if(S){var s=t.tracks[E];if(s&&typeof s.buffer.changeType=="function"){var P=i[E],O=P.codec,b=P.levelCodec,y=P.container,p=(s.levelCodec||s.codec).replace(m,"$1"),T=(b||O).replace(m,"$1");if(p!==T){var M=y+";codecs="+(b||O);t.appendChangeType(E,M)}}}else t.pendingTracks[E]=i[E]}),S)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},v.appendChangeType=function(n,i){var t=this,S=this.operationQueue,E={execute:function(){var P=t.sourceBuffer[n];P&&(f.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+i),P.changeType(i)),S.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(P){f.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",P)}};S.append(E,n)},v.onBufferAppending=function(n,i){var t=this,S=this.hls,E=this.operationQueue,s=this.tracks,P=i.data,O=i.type,b=i.frag,y=i.part,p=i.chunkMeta,T=p.buffering[O],M=self.performance.now();T.start=M;var N=b.stats.buffering,I=y?y.stats.buffering:null;N.start===0&&(N.start=M),I&&I.start===0&&(I.start=M);var K=s.audio,H=O==="audio"&&p.id===1&&(K==null?void 0:K.container)==="audio/mpeg",W={execute:function(){if(T.executeStart=self.performance.now(),H){var U=t.sourceBuffer[O];if(U){var B=b.start-U.timestampOffset;Math.abs(B)>=.1&&(f.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+b.start+" (delta: "+B+") sn: "+b.sn+")"),U.timestampOffset=b.start)}}t.appendExecutor(P,O)},onStart:function(){},onComplete:function(){var U=self.performance.now();T.executeEnd=T.end=U,N.first===0&&(N.first=U),I&&I.first===0&&(I.first=U);var B=t.sourceBuffer,G={};for(var q in B)G[q]=d.BufferHelper.getBuffered(B[q]);t.appendError=0,t.hls.trigger(u.Events.BUFFER_APPENDED,{type:O,frag:b,part:y,chunkMeta:p,parent:b.type,timeRanges:G})},onError:function(U){f.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",U);var B={type:w.ErrorTypes.MEDIA_ERROR,parent:b.type,details:w.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?B.details=w.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,B.details=w.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>S.config.appendErrorMaxRetry&&(f.logger.error("[buffer-controller]: Failed "+S.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),B.fatal=!0)),S.trigger(u.Events.ERROR,B)}};E.append(W,O)},v.onBufferFlushing=function(n,i){var t=this,S=this.operationQueue,E=function(P){return{execute:t.removeExecutor.bind(t,P,i.startOffset,i.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(u.Events.BUFFER_FLUSHED,{type:P})},onError:function(b){f.logger.warn("[buffer-controller]: Failed to remove from "+P+" SourceBuffer",b)}}};i.type?S.append(E(i.type),i.type):this.getSourceBufferTypes().forEach(function(s){S.append(E(s),s)})},v.onFragParsed=function(n,i){var t=this,S=i.frag,E=i.part,s=[],P=E?E.elementaryStreams:S.elementaryStreams;P[l.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(P[l.ElementaryStreamTypes.AUDIO]&&s.push("audio"),P[l.ElementaryStreamTypes.VIDEO]&&s.push("video"));var O=function(){var y=self.performance.now();S.stats.buffering.end=y,E&&(E.stats.buffering.end=y);var p=E?E.stats:S.stats;t.hls.trigger(u.Events.FRAG_BUFFERED,{frag:S,part:E,stats:p,id:S.type})};s.length===0&&f.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+S.type+" level: "+S.level+" sn: "+S.sn),this.blockBuffers(O,s)},v.onFragChanged=function(n,i){this.flushBackBuffer()},v.onBufferEos=function(n,i){var t=this,S=this.getSourceBufferTypes().reduce(function(E,s){var P=t.sourceBuffer[s];return(!i.type||i.type===s)&&(P&&!P.ended&&(P.ended=!0,f.logger.log("[buffer-controller]: "+s+" sourceBuffer now EOS"))),E&&!!(!P||P.ended)},!0);S&&this.blockBuffers(function(){var E=t.mediaSource;if(!E||E.readyState!=="open")return;E.endOfStream()})},v.onLevelUpdated=function(n,i){var t=i.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},v.flushBackBuffer=function(){var n=this.hls,i=this.details,t=this.media,S=this.sourceBuffer;if(!t||i===null)return;var E=this.getSourceBufferTypes();if(!E.length)return;var s=i.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(D.isFiniteNumber)(s)||s<0)return;var P=t.currentTime,O=i.levelTargetDuration,b=Math.max(s,O),y=Math.floor(P/O)*O-b;E.forEach(function(p){var T=S[p];if(T){var M=d.BufferHelper.getBuffered(T);M.length>0&&y>M.start(0)&&(n.trigger(u.Events.BACK_BUFFER_REACHED,{bufferEnd:y}),i.live&&n.trigger(u.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:y}),n.trigger(u.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:y,type:p}))}})},v.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,i=this.hls,t=this.media,S=this.mediaSource,E=n.fragments[0].start+n.totalduration,s=t.duration,P=Object(D.isFiniteNumber)(S.duration)?S.duration:0;n.live&&i.config.liveDurationInfinity?(f.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),S.duration=Infinity,this.updateSeekableRange(n)):(E>P&&E>s||!Object(D.isFiniteNumber)(s))&&(f.logger.log("[buffer-controller]: Updating Media Source duration to "+E.toFixed(3)),S.duration=E)},v.updateSeekableRange=function(n){var i=this.mediaSource,t=n.fragments,S=t.length;if(S&&n.live&&i!==null&&i!==void 0&&i.setLiveSeekableRange){var E=Math.max(0,t[0].start),s=Math.max(E,E+n.totalduration);i.setLiveSeekableRange(E,s)}},v.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,i=this.operationQueue,t=this.pendingTracks,S=Object.keys(t).length;if(S&&!n||S===2){this.createSourceBuffers(t),this.pendingTracks={};var E=this.getSourceBufferTypes();if(E.length===0){this.hls.trigger(u.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}E.forEach(function(s){i.executeNext(s)})}},v.createSourceBuffers=function(n){var i=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var S=0;for(var E in n)if(!i[E]){var s=n[E];if(!s)throw Error("source buffer exists for track "+E+", however track does not");var P=s.levelCodec||s.codec,O=s.container+";codecs="+P;f.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var b=i[E]=t.addSourceBuffer(O),y=E;this.addBufferListener(y,"updatestart",this._onSBUpdateStart),this.addBufferListener(y,"updateend",this._onSBUpdateEnd),this.addBufferListener(y,"error",this._onSBUpdateError),this.tracks[E]={buffer:b,codec:P,container:s.container,levelCodec:s.levelCodec,id:s.id},S++}catch(p){f.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+p.message),this.hls.trigger(u.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:p,mimeType:O})}}S&&this.hls.trigger(u.Events.BUFFER_CREATED,{tracks:this.tracks})},v._onSBUpdateStart=function(n){var i=this.operationQueue,t=i.current(n);t.onStart()},v._onSBUpdateEnd=function(n){var i=this.operationQueue,t=i.current(n);t.onComplete(),i.shiftAndExecuteNext(n)},v._onSBUpdateError=function(n,i){f.logger.error("[buffer-controller]: "+n+" SourceBuffer error",i),this.hls.trigger(u.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(n);t&&t.onError(i)},v.removeExecutor=function(n,i,t){var S=this.media,E=this.mediaSource,s=this.operationQueue,P=this.sourceBuffer,O=P[n];if(!S||!E||!O){f.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),s.shiftAndExecuteNext(n);return}var b=Object(D.isFiniteNumber)(S.duration)?S.duration:Infinity,y=Object(D.isFiniteNumber)(E.duration)?E.duration:Infinity,p=Math.max(0,i),T=Math.min(t,b,y);T>p?(f.logger.log("[buffer-controller]: Removing ["+p+","+T+"] from the "+n+" SourceBuffer"),console.assert(!O.updating,n+" sourceBuffer must not be updating"),O.remove(p,T)):s.shiftAndExecuteNext(n)},v.appendExecutor=function(n,i){var t=this.operationQueue,S=this.sourceBuffer,E=S[i];if(!E){f.logger.warn("[buffer-controller]: Attempting to append to the "+i+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(i);return}E.ended=!1,console.assert(!E.updating,i+" sourceBuffer must not be updating"),E.appendBuffer(n)},v.blockBuffers=function(n,i){var t=this;if(i===void 0&&(i=this.getSourceBufferTypes()),!i.length){f.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var S=this.operationQueue,E=i.map(function(s){return S.appendBlocker(s)});Promise.all(E).then(function(){n(),i.forEach(function(s){var P=t.sourceBuffer[s];(!P||!P.updating)&&S.shiftAndExecuteNext(s)})})},v.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},v.addBufferListener=function(n,i,t){var S=this.sourceBuffer[n];if(!S)return;var E=t.bind(this,n);this.listeners[n].push({event:i,listener:E}),S.addEventListener(i,E)},v.removeBufferListeners=function(n){var i=this.sourceBuffer[n];if(!i)return;this.listeners[n].forEach(function(t){i.removeEventListener(t.event,t.listener)})},g}()},"./src/controller/buffer-operation-queue.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return u});var D=C("./src/utils/logger.ts"),u=function(){function f(d){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=d}var w=f.prototype;return w.append=function(o,l){var a=this.queues[l];a.push(o),a.length===1&&this.buffers[l]&&this.executeNext(l)},w.insertAbort=function(o,l){var a=this.queues[l];a.unshift(o),this.executeNext(l)},w.appendBlocker=function(o){var l,a=new Promise(function(m){l=m}),_={execute:l,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(_,o),a},w.executeNext=function(o){var l=this.buffers,a=this.queues,_=l[o],m=a[o];if(m.length){var c=m[0];try{c.execute()}catch(g){D.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(g),(!_||!_.updating)&&(m.shift(),this.executeNext(o))}}},w.shiftAndExecuteNext=function(o){this.queues[o].shift(),this.executeNext(o)},w.current=function(o){return this.queues[o][0]},f}()},"./src/controller/cap-level-controller.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/events.ts");function u(d,o){for(var l=0;l<o.length;l++){var a=o[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}function f(d,o,l){return o&&u(d.prototype,o),l&&u(d,l),d}var w=function(){function d(l){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=l,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var o=d.prototype;return o.setStreamController=function(a){this.streamController=a},o.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},o.registerListeners=function(){var a=this.hls;a.on(D.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),a.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.unregisterListener=function(){var a=this.hls;a.off(D.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),a.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.onFpsDropLevelCapping=function(a,_){d.isLevelAllowed(_.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(_.droppedLevel)},o.onMediaAttaching=function(a,_){this.media=_.media instanceof HTMLVideoElement?_.media:null},o.onManifestParsed=function(a,_){var m=this.hls;this.restrictedLevels=[],this.firstLevel=_.firstLevel,m.config.capLevelToPlayerSize&&_.video&&this.startCapping()},o.onBufferCodecs=function(a,_){var m=this.hls;m.config.capLevelToPlayerSize&&_.video&&this.startCapping()},o.onMediaDetaching=function(){this.stopCapping()},o.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var a=this.hls.levels;if(a.length){var _=this.hls;_.autoLevelCapping=this.getMaxLevel(a.length-1),_.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=_.autoLevelCapping}}},o.getMaxLevel=function(a){var _=this,m=this.hls.levels;if(!m.length)return-1;var c=m.filter(function(g,v){return d.isLevelAllowed(v,_.restrictedLevels)&&v<=a});return this.clientRect=null,d.getMaxLevelByMediaSize(c,this.mediaWidth,this.mediaHeight)},o.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()},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var a=this.media,_={width:0,height:0};if(a){var m=a.getBoundingClientRect();_.width=m.width,_.height=m.height,!_.width&&!_.height&&(_.width=m.right-m.left||a.width||0,_.height=m.bottom-m.top||a.height||0)}return this.clientRect=_,_},d.isLevelAllowed=function(a,_){return _===void 0&&(_=[]),_.indexOf(a)===-1},d.getMaxLevelByMediaSize=function(a,_,m){if(!a||!a.length)return-1;for(var c=function(i,t){return t?i.width!==t.width||i.height!==t.height:!0},g=a.length-1,v=0;v<a.length;v+=1){var x=a[v];if((x.width>=_||x.height>=m)&&c(x,a[v+1])){g=v;break}}return g},f(d,[{key:"mediaWidth",get:function(){return this.getDimensions().width*d.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*d.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var a=1;try{a=self.devicePixelRatio}catch(_){}return a}}]),d}();h.default=w},"./src/controller/cmcd-controller.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return c});var D=C("./src/events.ts"),u=C("./src/types/cmcd.ts"),f=C("./src/utils/buffer-helper.ts"),w=C("./src/utils/logger.ts");function d(g,v){for(var x=0;x<v.length;x++){var n=v[x];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(g,n.key,n)}}function o(g,v,x){return v&&d(g.prototype,v),x&&d(g,x),g}function l(g,v){var x=typeof Symbol!="undefined"&&g[Symbol.iterator]||g["@@iterator"];if(x)return(x=x.call(g)).next.bind(x);if(Array.isArray(g)||(x=a(g))||v&&g&&typeof g.length=="number"){x&&(g=x);var n=0;return function(){return n>=g.length?{done:!0}:{done:!1,value:g[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 a(g,v){if(!g)return;if(typeof g=="string")return _(g,v);var x=Object.prototype.toString.call(g).slice(8,-1);if(x==="Object"&&g.constructor&&(x=g.constructor.name),x==="Map"||x==="Set")return Array.from(g);if(x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return _(g,v)}function _(g,v){(v==null||v>g.length)&&(v=g.length);for(var x=0,n=new Array(v);x<v;x++)n[x]=g[x];return n}function m(){return m=Object.assign||function(g){for(var v=1;v<arguments.length;v++){var x=arguments[v];for(var n in x)Object.prototype.hasOwnProperty.call(x,n)&&(g[n]=x[n])}return g},m.apply(this,arguments)}var c=function(){function g(x){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(S){try{n.apply(S,{ot:u.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(E){w.logger.warn("Could not generate manifest CMCD data.",E)}},this.applyFragmentData=function(S){try{var E=S.frag,s=n.hls.levels[E.level],P=n.getObjectType(E),O={d:E.duration*1e3,ot:P};(P===u.CMCDObjectType.VIDEO||P===u.CMCDObjectType.AUDIO||P==u.CMCDObjectType.MUXED)&&(O.br=s.bitrate/1e3,O.tb=n.getTopBandwidth(P),O.bl=n.getBufferLength(P)),n.apply(S,O)}catch(b){w.logger.warn("Could not generate segment CMCD data.",b)}},this.hls=x;var i=this.config=x.config,t=i.cmcd;t!=null&&(i.pLoader=this.createPlaylistLoader(),i.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||g.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var v=g.prototype;return v.registerListeners=function(){var n=this.hls;n.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(D.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.on(D.Events.BUFFER_CREATED,this.onBufferCreated,this)},v.unregisterListeners=function(){var n=this.hls;n.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(D.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.off(D.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},v.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},v.onMediaAttached=function(n,i){this.media=i.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},v.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},v.onBufferCreated=function(n,i){var t,S;this.audioBuffer=(t=i.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(S=i.tracks.video)===null||S===void 0?void 0:S.buffer},v.createData=function(){var n;return{v:u.CMCDVersion,sf:u.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}},v.apply=function(n,i){i===void 0&&(i={}),m(i,this.createData());var t=i.ot===u.CMCDObjectType.INIT||i.ot===u.CMCDObjectType.VIDEO||i.ot===u.CMCDObjectType.MUXED;if(this.starved&&t&&(i.bs=!0,i.su=!0,this.starved=!1),i.su==null&&(i.su=this.buffering),this.useHeaders){var S=g.toHeaders(i);if(!Object.keys(S).length)return;n.headers||(n.headers={}),m(n.headers,S)}else{var E=g.toQuery(i);if(!E)return;n.url=g.appendQueryToUri(n.url,E)}},v.getObjectType=function(n){var i=n.type;return i==="subtitle"?u.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?u.CMCDObjectType.INIT:i==="audio"?u.CMCDObjectType.AUDIO:i==="main"?this.hls.audioTracks.length?u.CMCDObjectType.VIDEO:u.CMCDObjectType.MUXED:void 0},v.getTopBandwidth=function(n){for(var i=0,t=n===u.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,S=l(t),E;!(E=S()).done;){var s=E.value;s.bitrate>i&&(i=s.bitrate)}return i>0?i:NaN},v.getBufferLength=function(n){var i=this.hls.media,t=n===u.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!i)return NaN;var S=f.BufferHelper.bufferInfo(t,i.currentTime,this.config.maxBufferHole);return S.len*1e3},v.createPlaylistLoader=function(){var n=this.config.pLoader,i=this.applyPlaylistData,t=n||this.config.loader;return function(){function S(s){this.loader=void 0,this.loader=new t(s)}var E=S.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(P,O,b){i(P),this.loader.load(P,O,b)},o(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},v.createFragmentLoader=function(){var n=this.config.fLoader,i=this.applyFragmentData,t=n||this.config.loader;return function(){function S(s){this.loader=void 0,this.loader=new t(s)}var E=S.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(P,O,b){i(P),this.loader.load(P,O,b)},o(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},g.uuid=function(){var n=URL.createObjectURL(new Blob),i=n.toString();return URL.revokeObjectURL(n),i.substr(i.lastIndexOf("/")+1)},g.serialize=function(n){for(var i=[],t=function(H){return!Number.isNaN(H)&&H!=null&&H!==""&&H!==!1},S=function(H){return Math.round(H)},E=function(H){return S(H/100)*100},s=function(H){return encodeURIComponent(H)},P={br:S,d:S,bl:E,dl:E,mtp:E,nor:s,rtp:E,tb:S},O=Object.keys(n||{}).sort(),b=l(O),y;!(y=b()).done;){var p=y.value,T=n[p];if(!t(T))continue;if(p==="v"&&T===1)continue;if(p=="pr"&&T===1)continue;var M=P[p];M&&(T=M(T));var N=typeof T,I=void 0;p==="ot"||p==="sf"||p==="st"?I=p+"="+T:N==="boolean"?I=p:N==="number"?I=p+"="+T:I=p+"="+JSON.stringify(T),i.push(I)}return i.join(",")},g.toHeaders=function(n){for(var i=Object.keys(n),t={},S=["Object","Request","Session","Status"],E=[{},{},{},{}],s={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},P=0,O=i;P<O.length;P++){var b=O[P],y=s[b]!=null?s[b]:1;E[y][b]=n[b]}for(var p=0;p<E.length;p++){var T=g.serialize(E[p]);T&&(t["CMCD-"+S[p]]=T)}return t},g.toQuery=function(n){return"CMCD="+encodeURIComponent(g.serialize(n))},g.appendQueryToUri=function(n,i){if(!i)return n;var t=n.includes("?")?"&":"?";return""+n+t+i},g}()},"./src/controller/eme-controller.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/events.ts"),u=C("./src/errors.ts"),f=C("./src/utils/logger.ts"),w=C("./src/utils/mediakeys-helper.ts");function d(c,g){for(var v=0;v<g.length;v++){var x=g[v];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(c,x.key,x)}}function o(c,g,v){return g&&d(c.prototype,g),v&&d(c,v),c}var l=3,a=function(g,v,x){var n={audioCapabilities:[],videoCapabilities:[]};return g.forEach(function(i){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+i+'"',robustness:x.audioRobustness||""})}),v.forEach(function(i){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+i+'"',robustness:x.videoRobustness||""})}),[n]},_=function(g,v,x,n){switch(g){case w.KeySystems.WIDEVINE:return a(v,x,n);default:throw new Error("Unknown key-system: "+g)}},m=function(){function c(v){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=v,this._config=v.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 g=c.prototype;return g.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},g._registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(D.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this)},g._unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(D.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this)},g.getLicenseServerUrl=function(x){switch(x){case w.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+x+'"')},g._attemptKeySystemAccess=function(x,n,i){var t=this,S=_(x,n,i,this._drmSystemOptions);f.logger.log("Requesting encrypted media key-system access");var E=this.requestMediaKeySystemAccess(x,S);this.mediaKeysPromise=E.then(function(s){return t._onMediaKeySystemAccessObtained(x,s)}),E.catch(function(s){f.logger.error('Failed to obtain key-system "'+x+'" access:',s)})},g._onMediaKeySystemAccessObtained=function(x,n){var i=this;f.logger.log('Access for key-system "'+x+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:x};this._mediaKeysList.push(t);var S=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(E){return t.mediaKeys=E,f.logger.log('Media-keys created for key-system "'+x+'"'),i._onMediaKeysCreated(),E});return S.catch(function(E){f.logger.error("Failed to create media-keys:",E)}),S},g._onMediaKeysCreated=function(){var x=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),x._onNewMediaKeySession(n.mediaKeysSession))})},g._onNewMediaKeySession=function(x){var n=this;f.logger.log("New key-system session "+x.sessionId),x.addEventListener("message",function(i){n._onKeySessionMessage(x,i.message)},!1)},g._onKeySessionMessage=function(x,n){f.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(i){f.logger.log("Received license data (length: "+(i&&i.byteLength)+"), updating key-session"),x.update(i)})},g.onMediaEncrypted=function(x){var n=this;if(f.logger.log('Media is encrypted using "'+x.initDataType+'" init data type'),!this.mediaKeysPromise){f.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var i=function(S){if(!n._media)return;n._attemptSetMediaKeys(S),n._generateRequestWithPreferredKeySession(x.initDataType,x.initData)};this.mediaKeysPromise.then(i).catch(i)},g._attemptSetMediaKeys=function(x){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){f.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}f.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},g._generateRequestWithPreferredKeySession=function(x,n){var i=this,t=this._mediaKeysList[0];if(!t){f.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){f.logger.warn("Key-Session already initialized but requested again");return}var S=t.mediaKeysSession;if(!S){f.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!n){f.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}f.logger.log('Generating key-session request for "'+x+'" init data type'),t.mediaKeysSessionInitialized=!0,S.generateRequest(x,n).then(function(){f.logger.debug("Key-session generation succeeded")}).catch(function(E){f.logger.error("Error generating key-session request:",E),i.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},g._createLicenseXhr=function(x,n,i){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,x,n,i);var S=this._licenseXhrSetup;if(S)try{S.call(this.hls,t,x),S=void 0}catch(E){f.logger.error(E)}try{t.readyState||t.open("POST",x,!0),S&&S.call(this.hls,t,x)}catch(E){throw new Error("issue setting up KeySystem license XHR "+E)}return t},g._onLicenseRequestReadyStageChange=function(x,n,i,t){switch(x.readyState){case 4:if(x.status===200){this._requestLicenseFailureCount=0,f.logger.log("License request succeeded");var S=x.response,E=this._licenseResponseCallback;if(E)try{S=E.call(this.hls,x,n)}catch(P){f.logger.error(P)}t(S)}else{if(f.logger.error("License Request XHR failed ("+n+"). Status: "+x.status+" ("+x.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>l){this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var s=l-this._requestLicenseFailureCount+1;f.logger.warn("Retrying license request, "+s+" attempts left"),this._requestLicense(i,t)}break}},g._generateLicenseRequestChallenge=function(x,n){switch(x.mediaKeySystemDomain){case w.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+x.mediaKeySystemDomain)},g._requestLicense=function(x,n){f.logger.log("Requesting content license for key-system");var i=this._mediaKeysList[0];if(!i){f.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(i.mediaKeySystemDomain),S=this._createLicenseXhr(t,x,n);f.logger.log("Sending license request to URL: "+t);var E=this._generateLicenseRequestChallenge(i,x);S.send(E)}catch(s){f.logger.error("Failure requesting DRM license: "+s),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},g.onMediaAttached=function(x,n){if(!this._emeEnabled)return;var i=n.media;this._media=i,i.addEventListener("encrypted",this._onMediaEncrypted)},g.onMediaDetached=function(){var x=this._media,n=this._mediaKeysList;if(!x)return;x.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(i){if(i.mediaKeysSession)return i.mediaKeysSession.close().catch(function(){})})).then(function(){return x.setMediaKeys(null)}).catch(function(){})},g.onManifestParsed=function(x,n){if(!this._emeEnabled)return;var i=n.levels.map(function(S){return S.audioCodec}).filter(function(S){return!!S}),t=n.levels.map(function(S){return S.videoCodec}).filter(function(S){return!!S});this._attemptKeySystemAccess(w.KeySystems.WIDEVINE,i,t)},o(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();h.default=m},"./src/controller/fps-controller.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/events.ts"),u=C("./src/utils/logger.ts"),f=function(){function w(o){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=o,this.registerListeners()}var d=w.prototype;return d.setStreamController=function(l){this.streamController=l},d.registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},d.unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching)},d.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},d.onMediaAttaching=function(l,a){var _=this.hls.config;if(_.capLevelOnFPSDrop){var m=a.media instanceof self.HTMLVideoElement?a.media:null;this.media=m,m&&typeof m.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),_.fpsDroppedMonitoringPeriod)}},d.checkFPS=function(l,a,_){var m=performance.now();if(a){if(this.lastTime){var c=m-this.lastTime,g=_-this.lastDroppedFrames,v=a-this.lastDecodedFrames,x=1e3*g/c,n=this.hls;if(n.trigger(D.Events.FPS_DROP,{currentDropped:g,currentDecoded:v,totalDroppedFrames:_}),x>0&&g>n.config.fpsDroppedMonitoringThreshold*v){var i=n.currentLevel;u.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+i),i>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=i)&&(i=i-1,n.trigger(D.Events.FPS_DROP_LEVEL_CAPPING,{level:i,droppedLevel:n.currentLevel}),n.autoLevelCapping=i,this.streamController.nextLevelSwitch())}}this.lastTime=m,this.lastDroppedFrames=_,this.lastDecodedFrames=a}},d.checkFPSInterval=function(){var l=this.media;if(l)if(this.isVideoPlaybackQualityAvailable){var a=l.getVideoPlaybackQuality();this.checkFPS(l,a.totalVideoFrames,a.droppedVideoFrames)}else this.checkFPS(l,l.webkitDecodedFrameCount,l.webkitDroppedFrameCount)},w}();h.default=f},"./src/controller/fragment-finders.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"findFragmentByPDT",function(){return f}),C.d(h,"findFragmentByPTS",function(){return w}),C.d(h,"fragmentWithinToleranceTest",function(){return d}),C.d(h,"pdtWithinToleranceTest",function(){return o}),C.d(h,"findFragWithCC",function(){return l});var D=C("./src/polyfills/number.ts"),u=C("./src/utils/binary-search.ts");function f(a,_,m){if(_===null||!Array.isArray(a)||!a.length||!Object(D.isFiniteNumber)(_))return null;var c=a[0].programDateTime;if(_<(c||0))return null;var g=a[a.length-1].endProgramDateTime;if(_>=(g||0))return null;m=m||0;for(var v=0;v<a.length;++v){var x=a[v];if(o(_,m,x))return x}return null}function w(a,_,m,c){m===void 0&&(m=0),c===void 0&&(c=0);var g=null;if(a?g=_[a.sn-_[0].sn+1]||null:m===0&&_[0].start===0&&(g=_[0]),g&&d(m,c,g)===0)return g;var v=u.default.search(_,d.bind(null,m,c));return v||g}function d(a,_,m){a===void 0&&(a=0),_===void 0&&(_=0);var c=Math.min(_,m.duration+(m.deltaPTS?m.deltaPTS:0));return m.start+m.duration-c<=a?1:m.start-c>a&&m.start?-1:0}function o(a,_,m){var c=Math.min(_,m.duration+(m.deltaPTS?m.deltaPTS:0))*1e3,g=m.endProgramDateTime||0;return g-c>a}function l(a,_){return u.default.search(a,function(m){return m.cc<_?1:m.cc>_?-1:0})}},"./src/controller/fragment-tracker.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"FragmentState",function(){return f}),C.d(h,"FragmentTracker",function(){return w});var D=C("./src/events.ts"),u=C("./src/types/loader.ts"),f;(function(l){l.NOT_LOADED="NOT_LOADED",l.BACKTRACKED="BACKTRACKED",l.APPENDING="APPENDING",l.PARTIAL="PARTIAL",l.OK="OK"})(f||(f={}));var w=function(){function l(_){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=_,this._registerListeners()}var a=l.prototype;return a._registerListeners=function(){var m=this.hls;m.on(D.Events.BUFFER_APPENDED,this.onBufferAppended,this),m.on(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),m.on(D.Events.FRAG_LOADED,this.onFragLoaded,this)},a._unregisterListeners=function(){var m=this.hls;m.off(D.Events.BUFFER_APPENDED,this.onBufferAppended,this),m.off(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),m.off(D.Events.FRAG_LOADED,this.onFragLoaded,this)},a.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},a.getAppendedFrag=function(m,c){if(c===u.PlaylistLevelType.MAIN){var g=this.activeFragment,v=this.activeParts;if(!g)return null;if(v)for(var x=v.length;x--;){var n=v[x],i=n?n.end:g.appendedPTS;if(n.start<=m&&i!==void 0&&m<=i)return x>9&&(this.activeParts=v.slice(x-9)),n}else if(g.start<=m&&g.appendedPTS!==void 0&&m<=g.appendedPTS)return g}return this.getBufferedFrag(m,c)},a.getBufferedFrag=function(m,c){for(var g=this.fragments,v=Object.keys(g),x=v.length;x--;){var n=g[v[x]];if((n==null?void 0:n.body.type)===c&&n.buffered){var i=n.body;if(i.start<=m&&m<=i.end)return i}}return null},a.detectEvictedFragments=function(m,c,g){var v=this;Object.keys(this.fragments).forEach(function(x){var n=v.fragments[x];if(!n)return;if(!n.buffered){n.body.type===g&&v.removeFragment(n.body);return}var i=n.range[m];if(!i)return;i.time.some(function(t){var S=!v.isTimeBuffered(t.startPTS,t.endPTS,c);return S&&v.removeFragment(n.body),S})})},a.detectPartialFragments=function(m){var c=this,g=this.timeRanges,v=m.frag,x=m.part;if(!g||v.sn==="initSegment")return;var n=o(v),i=this.fragments[n];if(!i)return;Object.keys(g).forEach(function(t){var S=v.elementaryStreams[t];if(!S)return;var E=g[t],s=x!==null||S.partial===!0;i.range[t]=c.getBufferedTimes(v,x,s,E)}),i.backtrack=i.loaded=null,Object.keys(i.range).length?i.buffered=!0:this.removeFragment(i.body)},a.fragBuffered=function(m){var c=o(m),g=this.fragments[c];g&&(g.backtrack=g.loaded=null,g.buffered=!0)},a.getBufferedTimes=function(m,c,g,v){for(var x={time:[],partial:g},n=c?c.start:m.start,i=c?c.end:m.end,t=m.minEndPTS||i,S=m.maxStartPTS||n,E=0;E<v.length;E++){var s=v.start(E)-this.bufferPadding,P=v.end(E)+this.bufferPadding;if(S>=s&&t<=P){x.time.push({startPTS:Math.max(n,v.start(E)),endPTS:Math.min(i,v.end(E))});break}else if(n<P&&i>s)x.partial=!0,x.time.push({startPTS:Math.max(n,v.start(E)),endPTS:Math.min(i,v.end(E))});else if(i<=s)break}return x},a.getPartialFragment=function(m){var c=null,g,v,x,n=0,i=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(S){var E=t[S];if(!E)return;d(E)&&(v=E.body.start-i,x=E.body.end+i,m>=v&&m<=x&&(g=Math.min(m-v,x-m),n<=g&&(c=E.body,n=g)))}),c},a.getState=function(m){var c=o(m),g=this.fragments[c];return g?g.buffered?d(g)?f.PARTIAL:f.OK:g.backtrack?f.BACKTRACKED:f.APPENDING:f.NOT_LOADED},a.backtrack=function(m,c){var g=o(m),v=this.fragments[g];if(!v||v.backtrack)return null;var x=v.backtrack=c||v.loaded;return v.loaded=null,x},a.getBacktrackData=function(m){var c=o(m),g=this.fragments[c];if(g){var v,x=g.backtrack;if(x!=null&&(v=x.payload)!==null&&v!==void 0&&v.byteLength)return x;this.removeFragment(m)}return null},a.isTimeBuffered=function(m,c,g){for(var v,x,n=0;n<g.length;n++){if(v=g.start(n)-this.bufferPadding,x=g.end(n)+this.bufferPadding,m>=v&&c<=x)return!0;if(c<=v)return!1}return!1},a.onFragLoaded=function(m,c){var g=c.frag,v=c.part;if(g.sn==="initSegment"||g.bitrateTest||v)return;var x=o(g);this.fragments[x]={body:g,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},a.onBufferAppended=function(m,c){var g=this,v=c.frag,x=c.part,n=c.timeRanges;if(v.type===u.PlaylistLevelType.MAIN)if(this.activeFragment=v,x){var i=this.activeParts;i||(this.activeParts=i=[]),i.push(x)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(t){var S=n[t];if(g.detectEvictedFragments(t,S),!x)for(var E=0;E<S.length;E++)v.appendedPTS=Math.max(S.end(E),v.appendedPTS||0)})},a.onFragBuffered=function(m,c){this.detectPartialFragments(c)},a.hasFragment=function(m){var c=o(m);return!!this.fragments[c]},a.removeFragmentsInRange=function(m,c,g){var v=this;Object.keys(this.fragments).forEach(function(x){var n=v.fragments[x];if(!n)return;if(n.buffered){var i=n.body;i.type===g&&i.start<c&&i.end>m&&v.removeFragment(i)}})},a.removeFragment=function(m){var c=o(m);m.stats.loaded=0,m.clearElementaryStreamInfo(),delete this.fragments[c]},a.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},l}();function d(l){var a,_;return l.buffered&&(((a=l.range.video)===null||a===void 0?void 0:a.partial)||((_=l.range.audio)===null||_===void 0?void 0:_.partial))}function o(l){return l.type+"_"+l.level+"_"+l.urlId+"_"+l.sn}},"./src/controller/gap-controller.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"STALL_MINIMUM_DURATION_MS",function(){return d}),C.d(h,"MAX_START_GAP_JUMP",function(){return o}),C.d(h,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return l}),C.d(h,"SKIP_BUFFER_RANGE_START",function(){return a}),C.d(h,"default",function(){return _});var D=C("./src/utils/buffer-helper.ts"),u=C("./src/errors.ts"),f=C("./src/events.ts"),w=C("./src/utils/logger.ts"),d=250,o=2,l=.1,a=.05,_=function(){function m(g,v,x,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=g,this.media=v,this.fragmentTracker=x,this.hls=n}var c=m.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(v){var x=this.config,n=this.media,i=this.stalled,t=n.currentTime,S=n.seeking,E=this.seeking&&!S,s=!this.seeking&&S;if(this.seeking=S,t!==v){if(this.moved=!0,i!==null){if(this.stallReported){var P=self.performance.now()-i;w.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(P)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((s||E)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!D.BufferHelper.getBuffered(n).length)return;var O=D.BufferHelper.bufferInfo(n,t,0),b=O.len>0,y=O.nextStart||0;if(!b&&!y)return;if(S){var p=O.len>o,T=!y||y-t>o&&!this.fragmentTracker.getPartialFragment(t);if(p||T)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var M,N=Math.max(y,O.start||0)-t,I=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,K=I==null||((M=I.details)===null||M===void 0)?void 0:M.live,H=K?I.details.targetduration*2:o;if(N>0&&N<=H){this._trySkipBufferHole(null);return}}var W=self.performance.now();if(i===null){this.stalled=W;return}var z=W-i;!S&&z>=d&&this._reportStall(O.len);var U=D.BufferHelper.bufferInfo(n,t,x.maxBufferHole);this._tryFixBufferStall(U,z)},c._tryFixBufferStall=function(v,x){var n=this.config,i=this.fragmentTracker,t=this.media,S=t.currentTime,E=i.getPartialFragment(S);if(E){var s=this._trySkipBufferHole(E);if(s)return}v.len>n.maxBufferHole&&x>n.highBufferWatchdogPeriod*1e3&&(w.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(v){var x=this.hls,n=this.media,i=this.stallReported;i||(this.stallReported=!0,w.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+v+")"),x.trigger(f.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:v}))},c._trySkipBufferHole=function(v){for(var x=this.config,n=this.hls,i=this.media,t=i.currentTime,S=0,E=D.BufferHelper.getBuffered(i),s=0;s<E.length;s++){var P=E.start(s);if(t+x.maxBufferHole>=S&&t<P){var O=Math.max(P+a,i.currentTime+l);return w.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+O),this.moved=!0,this.stalled=null,i.currentTime=O,v&&n.trigger(f.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+O,frag:v}),O}S=E.end(s)}return 0},c._tryNudgeBuffer=function(){var v=this.config,x=this.hls,n=this.media,i=n.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<v.nudgeMaxRetry){var S=i+t*v.nudgeOffset;w.logger.warn("Nudging 'currentTime' from "+i+" to "+S),n.currentTime=S,x.trigger(f.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else w.logger.error("Playhead still not moving while enough data buffered @"+i+" after "+v.nudgeMaxRetry+" nudges"),x.trigger(f.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},m}()},"./src/controller/id3-track-controller.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/events.ts"),u=C("./src/utils/texttrack-utils.ts"),f=C("./src/demux/id3.ts"),w=.25,d=function(){function o(a){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=a,this._registerListeners()}var l=o.prototype;return l.destroy=function(){this._unregisterListeners()},l._registerListeners=function(){var _=this.hls;_.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),_.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),_.on(D.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),_.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},l._unregisterListeners=function(){var _=this.hls;_.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),_.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),_.off(D.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),_.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},l.onMediaAttached=function(_,m){this.media=m.media},l.onMediaDetaching=function(){if(!this.id3Track)return;Object(u.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},l.getID3Track=function(_){if(!this.media)return;for(var m=0;m<_.length;m++){var c=_[m];if(c.kind==="metadata"&&c.label==="id3")return Object(u.sendAddTrackEvent)(c,this.media),c}return this.media.addTextTrack("metadata","id3")},l.onFragParsingMetadata=function(_,m){if(!this.media)return;var c=m.frag,g=m.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var v=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,x=0;x<g.length;x++){var n=f.getID3Frames(g[x].data);if(n){var i=g[x].pts,t=x<g.length-1?g[x+1].pts:c.end,S=t-i;S<=0&&(t=i+w);for(var E=0;E<n.length;E++){var s=n[E];if(!f.isTimeStampFrame(s)){var P=new v(i,t,"");P.value=s,this.id3Track.addCue(P)}}}}},l.onBufferFlushing=function(_,m){var c=m.startOffset,g=m.endOffset,v=m.type;if(!v||v==="audio"){var x=this.id3Track;x&&Object(u.removeCuesInRange)(x,c,g)}},o}();h.default=d},"./src/controller/latency-controller.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return o});var D=C("./src/errors.ts"),u=C("./src/events.ts"),f=C("./src/utils/logger.ts");function w(l,a){for(var _=0;_<a.length;_++){var m=a[_];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(l,m.key,m)}}function d(l,a,_){return a&&w(l.prototype,a),_&&w(l,_),l}var o=function(){function l(_){var m=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 m.timeupdate()},this.hls=_,this.config=_.config,this.registerListeners()}var a=l.prototype;return a.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},a.registerListeners=function(){this.hls.on(u.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(u.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(u.Events.ERROR,this.onError,this)},a.unregisterListeners=function(){this.hls.off(u.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(u.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(u.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(u.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(u.Events.ERROR,this.onError)},a.onMediaAttached=function(m,c){this.media=c.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},a.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},a.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},a.onLevelUpdated=function(m,c){var g=c.details;this.levelDetails=g,g.advanced&&this.timeupdate(),!g.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},a.onError=function(m,c){if(c.details!==D.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,f.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},a.timeupdate=function(){var m=this.media,c=this.levelDetails;if(!m||!c)return;this.currentTime=m.currentTime;var g=this.computeLatency();if(g===null)return;this._latency=g;var v=this.config,x=v.lowLatencyMode,n=v.maxLiveSyncPlaybackRate;if(!x||n===1)return;var i=this.targetLatency;if(i===null)return;var t=g-i,S=Math.min(this.maxLatency,i+c.targetduration),E=t<S;if(c.live&&E&&t>.05&&this.forwardBufferLength>1){var s=Math.min(2,Math.max(1,n)),P=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;m.playbackRate=Math.min(s,Math.max(1,P))}else m.playbackRate!==1&&m.playbackRate!==0&&(m.playbackRate=1)},a.estimateLiveEdge=function(){var m=this.levelDetails;return m===null?null:m.edge+m.age},a.computeLatency=function(){var m=this.estimateLiveEdge();return m===null?null:m-this.currentTime},d(l,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var m=this.config,c=this.levelDetails;return m.liveMaxLatencyDuration!==void 0?m.liveMaxLatencyDuration:c?m.liveMaxLatencyDurationCount*c.targetduration:0}},{key:"targetLatency",get:function(){var m=this.levelDetails;if(m===null)return null;var c=m.holdBack,g=m.partHoldBack,v=m.targetduration,x=this.config,n=x.liveSyncDuration,i=x.liveSyncDurationCount,t=x.lowLatencyMode,S=this.hls.userConfig,E=t&&g||c;(S.liveSyncDuration||S.liveSyncDurationCount||E===0)&&(E=n!==void 0?n:i*v);var s=v,P=1;return E+Math.min(this.stallCount*P,s)}},{key:"liveSyncPosition",get:function(){var m=this.estimateLiveEdge(),c=this.targetLatency,g=this.levelDetails;if(m===null||c===null||g===null)return null;var v=g.edge,x=m-c-this.edgeStalled,n=v-g.totalduration,i=v-(this.config.lowLatencyMode&&g.partTarget||g.targetduration);return Math.min(Math.max(n,x),i)}},{key:"drift",get:function(){var m=this.levelDetails;return m===null?1:m.drift}},{key:"edgeStalled",get:function(){var m=this.levelDetails;if(m===null)return 0;var c=(this.config.lowLatencyMode&&m.partTarget||m.targetduration)*3;return Math.max(m.age-c,0)}},{key:"forwardBufferLength",get:function(){var m=this.media,c=this.levelDetails;if(!m||!c)return 0;var g=m.buffered.length;return g?m.buffered.end(g-1):c.edge-this.currentTime}}]),l}()},"./src/controller/level-controller.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return x});var D=C("./src/types/level.ts"),u=C("./src/events.ts"),f=C("./src/errors.ts"),w=C("./src/utils/codecs.ts"),d=C("./src/controller/level-helper.ts"),o=C("./src/controller/base-playlist-controller.ts"),l=C("./src/types/loader.ts");function a(){return a=Object.assign||function(n){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var S in t)Object.prototype.hasOwnProperty.call(t,S)&&(n[S]=t[S])}return n},a.apply(this,arguments)}function _(n,i){for(var t=0;t<i.length;t++){var S=i[t];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(n,S.key,S)}}function m(n,i,t){return i&&_(n.prototype,i),t&&_(n,t),n}function c(n,i){n.prototype=Object.create(i.prototype),n.prototype.constructor=n,g(n,i)}function g(n,i){return g=Object.setPrototypeOf||function(S,E){return S.__proto__=E,S},g(n,i)}var v=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),x=function(n){c(i,n);function i(S){var E;return E=n.call(this,S,"[level-controller]")||this,E._levels=[],E._firstLevel=-1,E._startLevel=void 0,E.currentLevelIndex=-1,E.manualLevelIndex=-1,E.onParsedComplete=void 0,E._registerListeners(),E}var t=i.prototype;return t._registerListeners=function(){var E=this.hls;E.on(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),E.on(u.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(u.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.on(u.Events.FRAG_LOADED,this.onFragLoaded,this),E.on(u.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var E=this.hls;E.off(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),E.off(u.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(u.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.off(u.Events.FRAG_LOADED,this.onFragLoaded,this),E.off(u.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},t.startLoad=function(){var E=this._levels;E.forEach(function(s){s.loadError=0}),n.prototype.startLoad.call(this)},t.onManifestLoaded=function(E,s){var P=[],O=[],b=[],y,p={},T,M=!1,N=!1,I=!1;if(s.levels.forEach(function(z){var U=z.attrs;M=M||!!(z.width&&z.height),N=N||!!z.videoCodec,I=I||!!z.audioCodec,v&&z.audioCodec&&z.audioCodec.indexOf("mp4a.40.34")!==-1&&(z.audioCodec=void 0);var B=z.bitrate+"-"+z.attrs.RESOLUTION+"-"+z.attrs.CODECS;T=p[B],T?T.url.push(z.url):(T=new D.Level(z),p[B]=T,P.push(T)),U&&(U.AUDIO&&Object(d.addGroupId)(T,"audio",U.AUDIO),U.SUBTITLES&&Object(d.addGroupId)(T,"text",U.SUBTITLES))}),(M||N)&&I&&(P=P.filter(function(z){var U=z.videoCodec,B=z.width,G=z.height;return!!U||!!(B&&G)})),P=P.filter(function(z){var U=z.audioCodec,B=z.videoCodec;return(!U||Object(w.isCodecSupportedInMp4)(U,"audio"))&&(!B||Object(w.isCodecSupportedInMp4)(B,"video"))}),s.audioTracks&&(O=s.audioTracks.filter(function(z){return!z.audioCodec||Object(w.isCodecSupportedInMp4)(z.audioCodec,"audio")}),Object(d.assignTrackIdsByGroup)(O)),s.subtitles&&(b=s.subtitles,Object(d.assignTrackIdsByGroup)(b)),P.length>0){y=P[0].bitrate,P.sort(function(z,U){return z.bitrate-U.bitrate}),this._levels=P;for(var K=0;K<P.length;K++)if(P[K].bitrate===y){this._firstLevel=K,this.log("manifest loaded, "+P.length+" level(s) found, first bitrate: "+y);break}var H=I&&!N,W={levels:P,audioTracks:O,subtitleTracks:b,firstLevel:this._firstLevel,stats:s.stats,audio:I,video:N,altAudio:!H&&O.some(function(z){return!!z.url})};this.hls.trigger(u.Events.MANIFEST_PARSED,W),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(u.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:s.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(E,s){if(n.prototype.onError.call(this,E,s),s.fatal)return;var P=s.context,O=this._levels[this.currentLevelIndex];if(P&&(P.type===l.PlaylistContextType.AUDIO_TRACK&&O.audioGroupIds&&P.groupId===O.audioGroupIds[O.urlId]||P.type===l.PlaylistContextType.SUBTITLE_TRACK&&O.textGroupIds&&P.groupId===O.textGroupIds[O.urlId])){this.redundantFailover(this.currentLevelIndex);return}var b=!1,y=!0,p;switch(s.details){case f.ErrorDetails.FRAG_LOAD_ERROR:case f.ErrorDetails.FRAG_LOAD_TIMEOUT:case f.ErrorDetails.KEY_LOAD_ERROR:case f.ErrorDetails.KEY_LOAD_TIMEOUT:if(s.frag){var T=this._levels[s.frag.level];T?(T.fragmentError++,T.fragmentError>this.hls.config.fragLoadingMaxRetry&&(p=s.frag.level)):p=s.frag.level}break;case f.ErrorDetails.LEVEL_LOAD_ERROR:case f.ErrorDetails.LEVEL_LOAD_TIMEOUT:P&&(P.deliveryDirectives&&(y=!1),p=P.level),b=!0;break;case f.ErrorDetails.REMUX_ALLOC_ERROR:p=s.level,b=!0;break}p!==void 0&&this.recoverLevel(s,p,b,y)},t.recoverLevel=function(E,s,P,O){var b=E.details,y=this._levels[s];if(y.loadError++,P){var p=this.retryLoadingOrFail(E);if(p)E.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var T=y.url.length;if(T>1&&y.loadError<T)E.levelRetry=!0,this.redundantFailover(s);else if(this.manualLevelIndex===-1){var M=s===0?this._levels.length-1:s-1;this.currentLevelIndex!==M&&this._levels[M].loadError===0&&(this.warn(b+": switch to "+M),E.levelRetry=!0,this.hls.nextAutoLevel=M)}}},t.redundantFailover=function(E){var s=this._levels[E],P=s.url.length;if(P>1){var O=(s.urlId+1)%P;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(b){b.urlId=O}),this.level=E}},t.onFragLoaded=function(E,s){var P=s.frag;if(P!==void 0&&P.type===l.PlaylistLevelType.MAIN){var O=this._levels[P.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},t.onLevelLoaded=function(E,s){var P,O=s.level,b=s.details,y=this._levels[O];if(!y){var p;this.warn("Invalid level index "+O),(p=s.deliveryDirectives)!==null&&p!==void 0&&p.skip&&(b.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(y.fragmentError===0&&(y.loadError=0,this.retryCount=0),this.playlistLoaded(O,s,y.details)):(P=s.deliveryDirectives)!==null&&P!==void 0&&P.skip&&(b.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(E,s){var P=this.hls.levels[this.currentLevelIndex];if(!P)return;if(P.audioGroupIds){for(var O=-1,b=this.hls.audioTracks[s.id].groupId,y=0;y<P.audioGroupIds.length;y++)if(P.audioGroupIds[y]===b){O=y;break}O!==P.urlId&&(P.urlId=O,this.startLoad())}},t.loadPlaylist=function(E){var s=this.currentLevelIndex,P=this._levels[s];if(this.canLoad&&P&&P.url.length>0){var O=P.urlId,b=P.url[O];if(E)try{b=E.addDirectives(b)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("Attempt loading level index "+s+(E?" at sn "+E.msn+" part "+E.part:"")+" with URL-id "+O+" "+b),this.clearTimer(),this.hls.trigger(u.Events.LEVEL_LOADING,{url:b,level:s,id:O,deliveryDirectives:E||null})}},t.removeLevel=function(E,s){var P=function(y,p){return p!==s},O=this._levels.filter(function(b,y){return y!==E?!0:b.url.length>1&&s!==void 0?(b.url=b.url.filter(P),b.audioGroupIds&&(b.audioGroupIds=b.audioGroupIds.filter(P)),b.textGroupIds&&(b.textGroupIds=b.textGroupIds.filter(P)),b.urlId=0,!0):!1}).map(function(b,y){var p=b.details;return p!=null&&p.fragments&&p.fragments.forEach(function(T){T.level=y}),b});this._levels=O,this.hls.trigger(u.Events.LEVELS_UPDATED,{levels:O})},m(i,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(E){var s,P=this._levels;if(P.length===0)return;if(this.currentLevelIndex===E&&(s=P[E])!==null&&s!==void 0&&s.details)return;if(E<0||E>=P.length){var O=E<0;if(this.hls.trigger(u.Events.ERROR,{type:f.ErrorTypes.OTHER_ERROR,details:f.ErrorDetails.LEVEL_SWITCH_ERROR,level:E,fatal:O,reason:"invalid level idx"}),O)return;E=Math.min(E,P.length-1)}this.clearTimer();var b=this.currentLevelIndex,y=P[b],p=P[E];this.log("switching to level "+E+" from "+b),this.currentLevelIndex=E;var T=a({},p,{level:E,maxBitrate:p.maxBitrate,uri:p.uri,urlId:p.urlId});delete T._urlId,this.hls.trigger(u.Events.LEVEL_SWITCHING,T);var M=p.details;if(!M||M.live){var N=this.switchParams(p.uri,y==null?void 0:y.details);this.loadPlaylist(N)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(E){this.manualLevelIndex=E,this._startLevel===void 0&&(this._startLevel=E),E!==-1&&(this.level=E)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(E){this._firstLevel=E}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var E=this.hls.config.startLevel;return E!==void 0?E:this._firstLevel}else return this._startLevel},set:function(E){this._startLevel=E}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(E){this.level=E,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=E)}}]),i}(o.default)},"./src/controller/level-helper.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"addGroupId",function(){return f}),C.d(h,"assignTrackIdsByGroup",function(){return w}),C.d(h,"updatePTS",function(){return d}),C.d(h,"updateFragPTSDTS",function(){return l}),C.d(h,"mergeDetails",function(){return a}),C.d(h,"mapPartIntersection",function(){return _}),C.d(h,"mapFragmentIntersection",function(){return m}),C.d(h,"adjustSliding",function(){return c}),C.d(h,"addSliding",function(){return g}),C.d(h,"computeReloadInterval",function(){return v}),C.d(h,"getFragmentWithSN",function(){return x}),C.d(h,"getPartWith",function(){return n});var D=C("./src/polyfills/number.ts"),u=C("./src/utils/logger.ts");function f(i,t,S){switch(t){case"audio":i.audioGroupIds||(i.audioGroupIds=[]),i.audioGroupIds.push(S);break;case"text":i.textGroupIds||(i.textGroupIds=[]),i.textGroupIds.push(S);break}}function w(i){var t={};i.forEach(function(S){var E=S.groupId||"";S.id=t[E]=t[E]||0,t[E]++})}function d(i,t,S){var E=i[t],s=i[S];o(E,s)}function o(i,t){var S=t.startPTS;if(Object(D.isFiniteNumber)(S)){var E=0,s;t.sn>i.sn?(E=S-i.start,s=i):(E=i.start-S,s=t),s.duration!==E&&(s.duration=E)}else if(t.sn>i.sn){var P=i.cc===t.cc;P&&i.minEndPTS?t.start=i.start+(i.minEndPTS-i.start):t.start=i.start+i.duration}else t.start=Math.max(i.start-t.duration,0)}function l(i,t,S,E,s,P){var O=E-S;O<=0&&(u.logger.warn("Fragment should have a positive duration",t),E=S+t.duration,P=s+t.duration);var b=S,y=E,p=t.startPTS,T=t.endPTS;if(Object(D.isFiniteNumber)(p)){var M=Math.abs(p-S);Object(D.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(M,t.deltaPTS):t.deltaPTS=M,b=Math.max(S,p),S=Math.min(S,p),s=Math.min(s,t.startDTS),y=Math.min(E,T),E=Math.max(E,T),P=Math.max(P,t.endDTS)}t.duration=E-S;var N=S-t.start;t.appendedPTS=E,t.start=t.startPTS=S,t.maxStartPTS=b,t.startDTS=s,t.endPTS=E,t.minEndPTS=y,t.endDTS=P;var I=t.sn;if(!i||I<i.startSN||I>i.endSN)return 0;var K,H=I-i.startSN,W=i.fragments;for(W[H]=t,K=H;K>0;K--)o(W[K],W[K-1]);for(K=H;K<W.length-1;K++)o(W[K],W[K+1]);return i.fragmentHint&&o(W[W.length-1],i.fragmentHint),i.PTSKnown=i.alignedSliding=!0,N}function a(i,t){for(var S=null,E=i.fragments,s=E.length-1;s>=0;s--){var P=E[s].initSegment;if(P){S=P;break}}i.fragmentHint&&delete i.fragmentHint.endPTS;var O=0,b;if(m(i,t,function(K,H){K.relurl&&(O=K.cc-H.cc),Object(D.isFiniteNumber)(K.startPTS)&&Object(D.isFiniteNumber)(K.endPTS)&&(H.start=H.startPTS=K.startPTS,H.startDTS=K.startDTS,H.appendedPTS=K.appendedPTS,H.maxStartPTS=K.maxStartPTS,H.endPTS=K.endPTS,H.endDTS=K.endDTS,H.minEndPTS=K.minEndPTS,H.duration=K.endPTS-K.startPTS,H.duration&&(b=H),t.PTSKnown=t.alignedSliding=!0),H.elementaryStreams=K.elementaryStreams,H.loader=K.loader,H.stats=K.stats,H.urlId=K.urlId,K.initSegment&&(H.initSegment=K.initSegment,S=K.initSegment)}),S){var y=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;y.forEach(function(K){var H;(!K.initSegment||K.initSegment.relurl===((H=S)===null||H===void 0?void 0:H.relurl))&&(K.initSegment=S)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(K){return!K}),t.deltaUpdateFailed)){u.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=t.skippedSegments;p--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var T=t.fragments;if(O){u.logger.warn("discontinuity sliding from playlist, take drift into account");for(var M=0;M<T.length;M++)T[M].cc+=O}t.skippedSegments&&(t.startCC=t.fragments[0].cc),_(i.partList,t.partList,function(K,H){H.elementaryStreams=K.elementaryStreams,H.stats=K.stats}),b?l(t,b,b.startPTS,b.endPTS,b.startDTS,b.endDTS):c(i,t),T.length&&(t.totalduration=t.edge-T[0].start),t.driftStartTime=i.driftStartTime,t.driftStart=i.driftStart;var N=t.advancedDateTime;if(t.advanced&&N){var I=t.edge;t.driftStart||(t.driftStartTime=N,t.driftStart=I),t.driftEndTime=N,t.driftEnd=I}else t.driftEndTime=i.driftEndTime,t.driftEnd=i.driftEnd,t.advancedDateTime=i.advancedDateTime}function _(i,t,S){if(i&&t)for(var E=0,s=0,P=i.length;s<=P;s++){var O=i[s],b=t[s+E];O&&b&&O.index===b.index&&O.fragment.sn===b.fragment.sn?S(O,b):E--}}function m(i,t,S){for(var E=t.skippedSegments,s=Math.max(i.startSN,t.startSN)-t.startSN,P=(i.fragmentHint?1:0)+(E?t.endSN:Math.min(i.endSN,t.endSN))-t.startSN,O=t.startSN-i.startSN,b=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,y=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments,p=s;p<=P;p++){var T=y[O+p],M=b[p];E&&!M&&p<E&&(M=t.fragments[p]=T),T&&M&&S(T,M)}}function c(i,t){var S=t.startSN+t.skippedSegments-i.startSN,E=i.fragments;if(S<0||S>=E.length)return;g(t,E[S].start)}function g(i,t){if(t){for(var S=i.fragments,E=i.skippedSegments;E<S.length;E++)S[E].start+=t;i.fragmentHint&&(i.fragmentHint.start+=t)}}function v(i,t){var S=1e3*i.levelTargetDuration,E=S/2,s=i.age,P=s>0&&s<S*3,O=t.loading.end-t.loading.start,b,y=i.availabilityDelay;if(i.updated===!1)if(P){var p=333*i.misses;b=Math.max(Math.min(E,O*2),p),i.availabilityDelay=(i.availabilityDelay||0)+b}else b=E;else P?(y=Math.min(y||S/2,s),i.availabilityDelay=y,b=y+S-s):b=S-O;return Math.round(b)}function x(i,t,S){if(!i||!i.details)return null;var E=i.details,s=E.fragments[t-E.startSN];return s||(s=E.fragmentHint,s&&s.sn===t?s:t<E.startSN&&S&&S.sn===t?S:null)}function n(i,t,S){if(!i||!i.details)return null;var E=i.details.partList;if(E)for(var s=E.length;s--;){var P=E[s];if(P.index===S&&P.fragment.sn===t)return P}return null}},"./src/controller/stream-controller.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return E});var D=C("./src/polyfills/number.ts"),u=C("./src/controller/base-stream-controller.ts"),f=C("./src/is-supported.ts"),w=C("./src/events.ts"),d=C("./src/utils/buffer-helper.ts"),o=C("./src/controller/fragment-tracker.ts"),l=C("./src/types/loader.ts"),a=C("./src/loader/fragment.ts"),_=C("./src/demux/transmuxer-interface.ts"),m=C("./src/types/transmuxer.ts"),c=C("./src/controller/gap-controller.ts"),g=C("./src/errors.ts"),v=C("./src/utils/logger.ts");function x(s,P){for(var O=0;O<P.length;O++){var b=P[O];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(s,b.key,b)}}function n(s,P,O){return P&&x(s.prototype,P),O&&x(s,O),s}function i(s,P){s.prototype=Object.create(P.prototype),s.prototype.constructor=s,t(s,P)}function t(s,P){return t=Object.setPrototypeOf||function(b,y){return b.__proto__=y,b},t(s,P)}var S=100,E=function(s){i(P,s);function P(b,y){var p;return p=s.call(this,b,y,"[stream-controller]")||this,p.audioCodecSwap=!1,p.gapController=null,p.level=-1,p._forceStartLoad=!1,p.altAudio=!1,p.audioOnly=!1,p.fragPlaying=null,p.onvplaying=null,p.onvseeked=null,p.fragLastKbps=0,p.stalled=!1,p.couldBacktrack=!1,p.audioCodecSwitch=!1,p.videoBuffer=null,p._registerListeners(),p}var O=P.prototype;return O._registerListeners=function(){var y=this.hls;y.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.on(w.Events.LEVEL_LOADING,this.onLevelLoading,this),y.on(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),y.on(w.Events.ERROR,this.onError,this),y.on(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.on(w.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.on(w.Events.BUFFER_CREATED,this.onBufferCreated,this),y.on(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.on(w.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),y.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var y=this.hls;y.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.off(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),y.off(w.Events.ERROR,this.onError,this),y.off(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.off(w.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.off(w.Events.BUFFER_CREATED,this.onBufferCreated,this),y.off(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.off(w.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),y.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},O.startLoad=function(y){if(this.levels){var p=this.lastCurrentTime,T=this.hls;if(this.stopLoad(),this.setInterval(S),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var M=T.startLevel;M===-1&&(T.config.testBandwidth?(M=0,this.bitrateTest=!0):M=T.nextAutoLevel),this.level=T.nextLoadLevel=M,this.loadedmetadata=!1}p>0&&y===-1&&(this.log("Override startPosition with lastCurrentTime @"+p.toFixed(3)),y=p),this.state=u.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=y,this.tick()}else this._forceStartLoad=!0,this.state=u.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,s.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case u.State.IDLE:this.doTickIdle();break;case u.State.WAITING_LEVEL:{var y,p=this.levels,T=this.level,M=p==null||((y=p[T])===null||y===void 0)?void 0:y.details;if(M&&(!M.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(M))break;this.state=u.State.IDLE;break}break}case u.State.FRAG_LOADING_WAITING_RETRY:{var N,I=self.performance.now(),K=this.retryDate;(!K||I>=K||(N=this.media)!==null&&N!==void 0&&N.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=u.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){s.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var y,p,T=this.hls,M=this.levelLastLoaded,N=this.levels,I=this.media,K=T.config,H=T.nextLoadLevel;if(M===null||!I&&(this.startFragRequested||!K.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!N||!N[H])return;var W=N[H];this.level=T.nextLoadLevel=H;var z=W.details;if(!z||this.state===u.State.WAITING_LEVEL||z.live&&this.levelLastLoaded!==H){this.state=u.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:I,l.PlaylistLevelType.MAIN);if(U===null)return;var B=U.len,G=this.getMaxBufferLength(W.maxBitrate);if(B>=G)return;if(this._streamEnded(U,z)){var q={};this.altAudio&&(q.type="video"),this.hls.trigger(w.Events.BUFFER_EOS,q),this.state=u.State.ENDED;return}var ae=U.end,se=this.getNextFragment(ae,z);if(this.couldBacktrack&&!this.fragPrevious&&se&&se.sn!=="initSegment"){var we=se.sn-z.startSN;we>1&&(se=z.fragments[we-1],this.fragmentTracker.removeFragment(se))}if(se&&this.fragmentTracker.getState(se)===o.FragmentState.OK&&this.nextLoadPosition>ae){var Se=this.audioOnly&&!this.altAudio?a.ElementaryStreamTypes.AUDIO:a.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(I,Se,l.PlaylistLevelType.MAIN),se=this.getNextFragment(this.nextLoadPosition,z)}if(!se)return;se.initSegment&&!se.initSegment.data&&!this.bitrateTest&&(se=se.initSegment),((y=se.decryptdata)===null||y===void 0?void 0:y.keyFormat)==="identity"&&!((p=se.decryptdata)!==null&&p!==void 0&&p.key)?this.loadKey(se,z):this.loadFragment(se,z,ae)},O.loadFragment=function(y,p,T){var M,N=this.fragmentTracker.getState(y);if(this.fragCurrent=y,N===o.FragmentState.BACKTRACKED){var I=this.fragmentTracker.getBacktrackData(y);if(I){this._handleFragmentLoadProgress(I),this._handleFragmentLoadComplete(I);return}else N=o.FragmentState.NOT_LOADED}N===o.FragmentState.NOT_LOADED||N===o.FragmentState.PARTIAL?y.sn==="initSegment"?this._loadInitSegment(y):this.bitrateTest?(y.bitrateTest=!0,this.log("Fragment "+y.sn+" of level "+y.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(y)):(this.startFragRequested=!0,s.prototype.loadFragment.call(this,y,p,T)):N===o.FragmentState.APPENDING?this.reduceMaxBufferLength(y.duration)&&this.fragmentTracker.removeFragment(y):((M=this.media)===null||M===void 0?void 0:M.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(y){var p=this.fragmentTracker.getAppendedFrag(y,l.PlaylistLevelType.MAIN);return p&&"fragment"in p?p.fragment:p},O.getBufferedFrag=function(y){return this.fragmentTracker.getBufferedFrag(y,l.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(y){return y?this.getBufferedFrag(y.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var y=this.levels,p=this.media;if(p!=null&&p.readyState){var T,M=this.getAppendedFrag(p.currentTime);if(M&&M.start>1&&this.flushMainBuffer(0,M.start-1),!p.paused&&y){var N=this.hls.nextLoadLevel,I=y[N],K=this.fragLastKbps;K&&this.fragCurrent?T=this.fragCurrent.duration*I.maxBitrate/(1e3*K)+1:T=0}else T=0;var H=this.getBufferedFrag(p.currentTime+T);if(H){var W=this.followingBufferedFrag(H);if(W){this.abortCurrentFrag();var z=W.maxStartPTS?W.maxStartPTS:W.start,U=W.duration,B=Math.max(H.end,z+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(B,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var y=this.fragCurrent;this.fragCurrent=null,y!=null&&y.loader&&y.loader.abort(),this.state===u.State.KEY_LOADING&&(this.state=u.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(y,p){s.prototype.flushMainBuffer.call(this,y,p,this.altAudio?"video":null)},O.onMediaAttached=function(y,p){s.prototype.onMediaAttached.call(this,y,p);var T=p.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),T.addEventListener("playing",this.onvplaying),T.addEventListener("seeked",this.onvseeked),this.gapController=new c.default(this.config,T,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var y=this.media;y&&(y.removeEventListener("playing",this.onvplaying),y.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),s.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var y=this.media,p=y?y.currentTime:null;Object(D.isFiniteNumber)(p)&&this.log("Media seeked to "+p.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(w.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(y,p){var T=!1,M=!1,N;p.levels.forEach(function(I){N=I.audioCodec,N&&(N.indexOf("mp4a.40.2")!==-1&&(T=!0),N.indexOf("mp4a.40.5")!==-1&&(M=!0))}),this.audioCodecSwitch=T&&M&&!Object(f.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=p.levels,this.startFragRequested=!1},O.onLevelLoading=function(y,p){var T=this.levels;if(!T||this.state!==u.State.IDLE)return;var M=T[p.level];(!M.details||M.details.live&&this.levelLastLoaded!==p.level||this.waitForCdnTuneIn(M.details))&&(this.state=u.State.WAITING_LEVEL)},O.onLevelLoaded=function(y,p){var T,M=this.levels,N=p.level,I=p.details,K=I.totalduration;if(!M){this.warn("Levels were reset while loading level "+N);return}this.log("Level "+N+" loaded ["+I.startSN+","+I.endSN+"], cc ["+I.startCC+", "+I.endCC+"] duration:"+K);var H=this.fragCurrent;H&&(this.state===u.State.FRAG_LOADING||this.state===u.State.FRAG_LOADING_WAITING_RETRY)&&(H.level!==p.level&&H.loader&&(this.state=u.State.IDLE,H.loader.abort()));var W=M[N],z=0;if(I.live||(T=W.details)!==null&&T!==void 0&&T.live){if(I.fragments[0]||(I.deltaUpdateFailed=!0),I.deltaUpdateFailed)return;z=this.alignPlaylists(I,W.details)}if(W.details=I,this.levelLastLoaded=N,this.hls.trigger(w.Events.LEVEL_UPDATED,{details:I,level:N}),this.state===u.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(I))return;this.state=u.State.IDLE}this.startFragRequested?I.live&&this.synchronizeToLiveEdge(I):this.setStartPosition(I,z),this.tick()},O._handleFragmentLoadProgress=function(y){var p,T=y.frag,M=y.part,N=y.payload,I=this.levels;if(!I){this.warn("Levels were reset while fragment load was in progress. Fragment "+T.sn+" of level "+T.level+" will not be buffered");return}var K=I[T.level],H=K.details;if(!H){this.warn("Dropping fragment "+T.sn+" of level "+T.level+" after level details were reset");return}var W=K.videoCodec,z=H.PTSKnown||!H.live,U=(p=T.initSegment)===null||p===void 0?void 0:p.data,B=this._getAudioCodec(K),G=this.transmuxer=this.transmuxer||new _.default(this.hls,l.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),q=M?M.index:-1,ae=q!==-1,se=new m.ChunkMetadata(T.level,T.sn,T.stats.chunkCount,N.byteLength,q,ae),we=this.initPTS[T.cc];G.push(N,U,B,W,T,M,H.totalduration,z,se,we)},O.onAudioTrackSwitching=function(y,p){var T=this.altAudio,M=!!p.url,N=p.id;if(!M){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var I=this.fragCurrent;I!=null&&I.loader&&(this.log("Switching to main audio track, cancel main fragment load"),I.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var K=this.hls;T&&K.trigger(w.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),K.trigger(w.Events.AUDIO_TRACK_SWITCHED,{id:N})}},O.onAudioTrackSwitched=function(y,p){var T=p.id,M=!!this.hls.audioTracks[T].url;if(M){var N=this.videoBuffer;N&&this.mediaBuffer!==N&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=N)}this.altAudio=M,this.tick()},O.onBufferCreated=function(y,p){var T=p.tracks,M,N,I=!1;for(var K in T){var H=T[K];if(H.id==="main"){if(N=K,M=H,K==="video"){var W=T[K];W&&(this.videoBuffer=W.buffer)}}else I=!0}I&&M?(this.log("Alternate track found, use "+N+".buffered to schedule main fragment loading"),this.mediaBuffer=M.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(y,p){var T=p.frag,M=p.part;if(T&&T.type!==l.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(T)){this.warn("Fragment "+T.sn+(M?" p: "+M.index:"")+" of level "+T.level+" finished buffering, but was aborted. state: "+this.state),this.state===u.State.PARSED&&(this.state=u.State.IDLE);return}var N=M?M.stats:T.stats;this.fragLastKbps=Math.round(8*N.total/(N.buffering.end-N.loading.first)),T.sn!=="initSegment"&&(this.fragPrevious=T),this.fragBufferedComplete(T,M)},O.onError=function(y,p){switch(p.details){case g.ErrorDetails.FRAG_LOAD_ERROR:case g.ErrorDetails.FRAG_LOAD_TIMEOUT:case g.ErrorDetails.KEY_LOAD_ERROR:case g.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(l.PlaylistLevelType.MAIN,p);break;case g.ErrorDetails.LEVEL_LOAD_ERROR:case g.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==u.State.ERROR&&(p.fatal?(this.warn(""+p.details),this.state=u.State.ERROR):!p.levelRetry&&this.state===u.State.WAITING_LEVEL&&(this.state=u.State.IDLE));break;case g.ErrorDetails.BUFFER_FULL_ERROR:if(p.parent==="main"&&(this.state===u.State.PARSING||this.state===u.State.PARSED)){var T=!0,M=this.getFwdBufferInfo(this.media,l.PlaylistLevelType.MAIN);M&&M.len>.5&&(T=!this.reduceMaxBufferLength(M.len)),T&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var y=this.media,p=this.gapController;if(!y||!p||!y.readyState)return;var T=d.BufferHelper.getBuffered(y);!this.loadedmetadata&&T.length?(this.loadedmetadata=!0,this.seekToStartPos()):p.poll(this.lastCurrentTime),this.lastCurrentTime=y.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=u.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(y,p){var T=p.type;if(T!==a.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var M=(T===a.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(M,T,l.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(y,p){this.levels=p.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var y=this.media,p=y.currentTime,T=this.startPosition;if(T>=0&&p<T){if(y.seeking){v.logger.log("could not seek to "+T+", already seeking at "+p);return}var M=d.BufferHelper.getBuffered(y),N=M.length?M.start(0):0,I=N-T;I>0&&(I<this.config.maxBufferHole||I<this.config.maxFragLookUpTolerance)&&(v.logger.log("adjusting start position by "+I+" to match buffer start"),T+=I,this.startPosition=T),this.log("seek to target start position "+T+" from current time "+p),y.currentTime=T}},O._getAudioCodec=function(y){var p=this.config.defaultAudioCodec||y.audioCodec;return this.audioCodecSwap&&p&&(this.log("Swapping audio codec"),p.indexOf("mp4a.40.5")!==-1?p="mp4a.40.2":p="mp4a.40.5"),p},O._loadBitrateTestFrag=function(y){var p=this;this._doFragLoad(y).then(function(T){var M=p.hls;if(!T||M.nextLoadLevel||p.fragContextChanged(y))return;p.fragLoadError=0,p.state=u.State.IDLE,p.startFragRequested=!1,p.bitrateTest=!1;var N=y.stats;N.parsing.start=N.parsing.end=N.buffering.start=N.buffering.end=self.performance.now(),M.trigger(w.Events.FRAG_LOADED,T)})},O._handleTransmuxComplete=function(y){var p,T="main",M=this.hls,N=y.remuxResult,I=y.chunkMeta,K=this.getCurrentContext(I);if(!K){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=K.frag,W=K.part,z=K.level,U=N.video,B=N.text,G=N.id3,q=N.initSegment,ae=this.altAudio?void 0:N.audio;if(this.fragContextChanged(H))return;if(this.state=u.State.PARSING,q){q.tracks&&(this._bufferInitSegment(z,q.tracks,H,I),M.trigger(w.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:T,tracks:q.tracks}));var se=q.initPTS,we=q.timescale;Object(D.isFiniteNumber)(se)&&(this.initPTS[H.cc]=se,M.trigger(w.Events.INIT_PTS_FOUND,{frag:H,id:T,initPTS:se,timescale:we}))}if(U&&N.independent!==!1){if(z.details){var Se=U.startPTS,de=U.endPTS,xe=U.startDTS,he=U.endDTS;if(W)W.elementaryStreams[U.type]={startPTS:Se,endPTS:de,startDTS:xe,endDTS:he};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var ne=this.getLoadPosition()+this.config.maxBufferHole;if(ne<Se){this.backtrack(H);return}H.setElementaryStreamInfo(U.type,H.start,de,H.start,he,!0)}H.setElementaryStreamInfo(U.type,Se,de,xe,he),this.bufferFragmentData(U,H,W,I)}}else if(N.independent===!1){this.backtrack(H);return}if(ae){var oe=ae.startPTS,te=ae.endPTS,le=ae.startDTS,Y=ae.endDTS;W&&(W.elementaryStreams[a.ElementaryStreamTypes.AUDIO]={startPTS:oe,endPTS:te,startDTS:le,endDTS:Y}),H.setElementaryStreamInfo(a.ElementaryStreamTypes.AUDIO,oe,te,le,Y),this.bufferFragmentData(ae,H,W,I)}if(G!=null&&(p=G.samples)!==null&&p!==void 0&&p.length){var Z={frag:H,id:T,samples:G.samples};M.trigger(w.Events.FRAG_PARSING_METADATA,Z)}if(B){var ge={frag:H,id:T,samples:B.samples};M.trigger(w.Events.FRAG_PARSING_USERDATA,ge)}},O._bufferInitSegment=function(y,p,T,M){var N=this;if(this.state!==u.State.PARSING)return;this.audioOnly=!!p.audio&&!p.video,this.altAudio&&!this.audioOnly&&delete p.audio;var I=p.audio,K=p.video,H=p.audiovideo;if(I){var W=y.audioCodec,z=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(W&&(W.indexOf("mp4a.40.5")!==-1?W="mp4a.40.2":W="mp4a.40.5"),I.metadata.channelCount!==1&&z.indexOf("firefox")===-1&&(W="mp4a.40.5")),z.indexOf("android")!==-1&&I.container!=="audio/mpeg"&&(W="mp4a.40.2",this.log("Android: force audio codec to "+W)),y.audioCodec&&y.audioCodec!==W&&this.log('Swapping manifest audio codec "'+y.audioCodec+'" for "'+W+'"'),I.levelCodec=W,I.id="main",this.log("Init audio buffer, container:"+I.container+", codecs[selected/level/parsed]=["+(W||"")+"/"+(y.audioCodec||"")+"/"+I.codec+"]")}K&&(K.levelCodec=y.videoCodec,K.id="main",this.log("Init video buffer, container:"+K.container+", codecs[level/parsed]=["+(y.videoCodec||"")+"/"+K.codec+"]")),H&&this.log("Init audiovideo buffer, container:"+H.container+", codecs[level/parsed]=["+(y.attrs.CODECS||"")+"/"+H.codec+"]"),this.hls.trigger(w.Events.BUFFER_CODECS,p),Object.keys(p).forEach(function(U){var B=p[U],G=B.initSegment;G!=null&&G.byteLength&&N.hls.trigger(w.Events.BUFFER_APPENDING,{type:U,data:G,frag:T,part:null,chunkMeta:M,parent:T.type})}),this.tick()},O.backtrack=function(y){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(y);var p=this.fragmentTracker.backtrack(y);this.fragPrevious=null,this.nextLoadPosition=y.start,p?this.resetFragmentLoading(y):this.state=u.State.BACKTRACKING},O.checkFragmentChanged=function(){var y=this.media,p=null;if(y&&y.readyState>1&&y.seeking===!1){var T=y.currentTime;if(d.BufferHelper.isBuffered(y,T)?p=this.getAppendedFrag(T):d.BufferHelper.isBuffered(y,T+.1)&&(p=this.getAppendedFrag(T+.1)),p){var M=this.fragPlaying,N=p.level;(!M||p.sn!==M.sn||M.level!==N||p.urlId!==M.urlId)&&(this.hls.trigger(w.Events.FRAG_CHANGED,{frag:p}),(!M||M.level!==N)&&this.hls.trigger(w.Events.LEVEL_SWITCHED,{level:N}),this.fragPlaying=p)}}},n(P,[{key:"nextLevel",get:function(){var y=this.nextBufferedFrag;return y?y.level:-1}},{key:"currentLevel",get:function(){var y=this.media;if(y){var p=this.getAppendedFrag(y.currentTime);if(p)return p.level}return-1}},{key:"nextBufferedFrag",get:function(){var y=this.media;if(y){var p=this.getAppendedFrag(y.currentTime);return this.followingBufferedFrag(p)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),P}(u.default)},"./src/controller/subtitle-stream-controller.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"SubtitleStreamController",function(){return i});var D=C("./src/events.ts"),u=C("./src/utils/logger.ts"),f=C("./src/utils/buffer-helper.ts"),w=C("./src/controller/fragment-finders.ts"),d=C("./src/utils/discontinuities.ts"),o=C("./src/controller/level-helper.ts"),l=C("./src/controller/fragment-tracker.ts"),a=C("./src/controller/base-stream-controller.ts"),_=C("./src/types/loader.ts"),m=C("./src/types/level.ts");function c(t,S){for(var E=0;E<S.length;E++){var s=S[E];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function g(t,S,E){return S&&c(t.prototype,S),E&&c(t,E),t}function v(t,S){t.prototype=Object.create(S.prototype),t.prototype.constructor=t,x(t,S)}function x(t,S){return x=Object.setPrototypeOf||function(s,P){return s.__proto__=P,s},x(t,S)}var n=500,i=function(t){v(S,t);function S(s,P){var O;return O=t.call(this,s,P,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var E=S.prototype;return E.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},E._registerListeners=function(){var P=this.hls;P.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),P.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),P.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),P.on(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),P.on(D.Events.ERROR,this.onError,this),P.on(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),P.on(D.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),P.on(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),P.on(D.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),P.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E._unregisterListeners=function(){var P=this.hls;P.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),P.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),P.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),P.off(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),P.off(D.Events.ERROR,this.onError,this),P.off(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),P.off(D.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),P.off(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),P.off(D.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),P.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E.startLoad=function(){this.stopLoad(),this.state=a.State.IDLE,this.setInterval(n),this.tick()},E.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},E.onLevelLoaded=function(P,O){this.mainDetails=O.details},E.onSubtitleFragProcessed=function(P,O){var b=O.frag,y=O.success;if(this.fragPrevious=b,this.state=a.State.IDLE,!y)return;var p=this.tracksBuffered[this.currentTrackId];if(!p)return;for(var T,M=b.start,N=0;N<p.length;N++)if(M>=p[N].start&&M<=p[N].end){T=p[N];break}var I=b.start+b.duration;T?T.end=I:(T={start:M,end:I},p.push(T)),this.fragmentTracker.fragBuffered(b)},E.onBufferFlushing=function(P,O){var b=O.startOffset,y=O.endOffset;if(b===0&&y!==Number.POSITIVE_INFINITY){var p=this.currentTrackId,T=this.levels;if(!T.length||!T[p]||!T[p].details)return;var M=T[p].details,N=M.targetduration,I=y-N;if(I<=0)return;O.endOffsetSubtitles=Math.max(0,I),this.tracksBuffered.forEach(function(K){for(var H=0;H<K.length;){if(K[H].end<=I){K.shift();continue}else if(K[H].start<I)K[H].start=I;else break;H++}}),this.fragmentTracker.removeFragmentsInRange(b,I,_.PlaylistLevelType.SUBTITLE)}},E.onError=function(P,O){var b,y=O.frag;if(!y||y.type!==_.PlaylistLevelType.SUBTITLE)return;(b=this.fragCurrent)!==null&&b!==void 0&&b.loader&&this.fragCurrent.loader.abort(),this.state=a.State.IDLE},E.onSubtitleTracksUpdated=function(P,O){var b=this,y=O.subtitleTracks;this.tracksBuffered=[],this.levels=y.map(function(p){return new m.Level(p)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(p){b.tracksBuffered[p.id]=[]}),this.mediaBuffer=null},E.onSubtitleTrackSwitch=function(P,O){if(this.currentTrackId=O.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var b=this.levels[this.currentTrackId];b!=null&&b.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,b&&this.setInterval(n)},E.onSubtitleTrackLoaded=function(P,O){var b,y=O.details,p=O.id,T=this.currentTrackId,M=this.levels;if(!M.length)return;var N=M[T];if(p>=M.length||p!==T||!N)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,y.live||(b=N.details)!==null&&b!==void 0&&b.live){var I=this.mainDetails;if(y.deltaUpdateFailed||!I)return;var K=I.fragments[0];if(!N.details)y.hasProgramDateTime&&I.hasProgramDateTime?Object(d.alignMediaPlaylistByPDT)(y,I):K&&Object(o.addSliding)(y,K.start);else{var H=this.alignPlaylists(y,N.details);H===0&&K&&Object(o.addSliding)(y,K.start)}}if(N.details=y,this.levelLastLoaded=p,this.tick(),y.live&&!this.fragCurrent&&this.media&&this.state===a.State.IDLE){var W=Object(w.findFragmentByPTS)(null,y.fragments,this.media.currentTime,0);W||(this.warn("Subtitle playlist not aligned with playback"),N.details=void 0)}},E._handleFragmentLoadComplete=function(P){var O=P.frag,b=P.payload,y=O.decryptdata,p=this.hls;if(this.fragContextChanged(O))return;if(b&&b.byteLength>0&&y&&y.key&&y.iv&&y.method==="AES-128"){var T=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(b),y.key.buffer,y.iv.buffer).then(function(M){var N=performance.now();p.trigger(D.Events.FRAG_DECRYPTED,{frag:O,payload:M,stats:{tstart:T,tdecrypt:N}})})}},E.doTick=function(){if(!this.media){this.state=a.State.IDLE;return}if(this.state===a.State.IDLE){var P,O=this.currentTrackId,b=this.levels;if(!b.length||!b[O]||!b[O].details)return;var y=b[O].details,p=y.targetduration,T=this.config,M=this.media,N=f.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,M.currentTime-p,T.maxBufferHole),I=N.end,K=N.len,H=this.getMaxBufferLength()+p;if(K>H)return;console.assert(y,"Subtitle track details are defined on idle subtitle stream controller tick");var W=y.fragments,z=W.length,U=y.edge,B,G=this.fragPrevious;if(I<U){var q=T.maxFragLookUpTolerance;G&&y.hasProgramDateTime&&(B=Object(w.findFragmentByPDT)(W,G.endProgramDateTime,q)),B||(B=Object(w.findFragmentByPTS)(G,W,I,q),!B&&G&&G.start<W[0].start&&(B=W[0]))}else B=W[z-1];(P=B)!==null&&P!==void 0&&P.encrypted?(u.logger.log("Loading key for "+B.sn),this.state=a.State.KEY_LOADING,this.hls.trigger(D.Events.KEY_LOADING,{frag:B})):B&&this.fragmentTracker.getState(B)===l.FragmentState.NOT_LOADED&&this.loadFragment(B,y,I)}},E.loadFragment=function(P,O,b){this.fragCurrent=P,t.prototype.loadFragment.call(this,P,O,b)},g(S,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),S}(a.default)},"./src/controller/subtitle-track-controller.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/events.ts"),u=C("./src/utils/texttrack-utils.ts"),f=C("./src/controller/base-playlist-controller.ts"),w=C("./src/types/loader.ts");function d(c,g){for(var v=0;v<g.length;v++){var x=g[v];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(c,x.key,x)}}function o(c,g,v){return g&&d(c.prototype,g),v&&d(c,v),c}function l(c,g){c.prototype=Object.create(g.prototype),c.prototype.constructor=c,a(c,g)}function a(c,g){return a=Object.setPrototypeOf||function(x,n){return x.__proto__=n,x},a(c,g)}var _=function(c){l(g,c);function g(x){var n;return n=c.call(this,x,"[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 v=g.prototype;return v.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,c.prototype.destroy.call(this)},v.registerListeners=function(){var n=this.hls;n.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.on(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.on(D.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){var n=this.hls;n.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(D.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.off(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.off(D.Events.ERROR,this.onError,this)},v.onMediaAttached=function(n,i){if(this.media=i.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)},v.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},v.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=m(this.media.textTracks);n.forEach(function(i){Object(u.clearCurrentCues)(i)}),this.subtitleTrack=-1,this.media=null},v.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},v.onManifestParsed=function(n,i){this.tracks=i.subtitleTracks},v.onSubtitleTrackLoaded=function(n,i){var t=i.id,S=i.details,E=this.trackId,s=this.tracksInGroup[E];if(!s){this.warn("Invalid subtitle track id "+t);return}var P=s.details;s.details=i.details,this.log("subtitle track "+t+" loaded ["+S.startSN+"-"+S.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,i,P))},v.onLevelLoading=function(n,i){this.switchLevel(i.level)},v.onLevelSwitching=function(n,i){this.switchLevel(i.level)},v.switchLevel=function(n){var i=this.hls.levels[n];if(!(i!=null&&i.textGroupIds))return;var t=i.textGroupIds[i.urlId];if(this.groupId!==t){var S=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,E=this.tracks.filter(function(O){return!t||O.groupId===t});this.tracksInGroup=E;var s=this.findTrackId(S==null?void 0:S.name)||this.findTrackId();this.groupId=t;var P={subtitleTracks:E};this.log("Updating subtitle tracks, "+E.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(D.Events.SUBTITLE_TRACKS_UPDATED,P),s!==-1&&this.setSubtitleTrack(s,S)}},v.findTrackId=function(n){for(var i=this.tracksInGroup,t=0;t<i.length;t++){var S=i[t];if((!this.selectDefaultTrack||S.default)&&(!n||n===S.name))return S.id}return-1},v.onError=function(n,i){if(c.prototype.onError.call(this,n,i),i.fatal||!i.context)return;i.context.type===w.PlaylistContextType.SUBTITLE_TRACK&&i.context.id===this.trackId&&i.context.groupId===this.groupId&&this.retryLoadingOrFail(i)},v.loadPlaylist=function(n){var i=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(i)){var t=i.id,S=i.groupId,E=i.url;if(n)try{E=n.addDirectives(E)}catch(s){this.warn("Could not construct new URL with HLS Delivery Directives: "+s)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(D.Events.SUBTITLE_TRACK_LOADING,{url:E,id:t,groupId:S,deliveryDirectives:n||null})}},v.toggleTrackModes=function(n){var i=this,t=this.media,S=this.subtitleDisplay,E=this.trackId;if(!t)return;var s=m(t.textTracks),P=s.filter(function(y){return y.groupId===i.groupId});if(n===-1)[].slice.call(s).forEach(function(y){y.mode="disabled"});else{var O=P[E];O&&(O.mode="disabled")}var b=P[n];b&&(b.mode=S?"showing":"hidden")},v.setSubtitleTrack=function(n,i){var t,S=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(t=S[n])!==null&&t!==void 0&&t.details)||n<-1||n>=S.length)return;this.clearTimer();var E=S[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,E){var s=E.id,P=E.groupId,O=P===void 0?"":P,b=E.name,y=E.type,p=E.url;this.hls.trigger(D.Events.SUBTITLE_TRACK_SWITCH,{id:s,groupId:O,name:b,type:y,url:p});var T=this.switchParams(E.url,i==null?void 0:i.details);this.loadPlaylist(T)}else this.hls.trigger(D.Events.SUBTITLE_TRACK_SWITCH,{id:n})},v.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,i=m(this.media.textTracks),t=0;t<i.length;t++)if(i[t].mode==="hidden")n=t;else if(i[t].mode==="showing"){n=t;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},o(g,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,i)}}]),g}(f.default);function m(c){for(var g=[],v=0;v<c.length;v++){var x=c[v];x.kind==="subtitles"&&x.label&&g.push(c[v])}return g}h.default=_},"./src/controller/timeline-controller.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"TimelineController",function(){return m});var D=C("./src/polyfills/number.ts"),u=C("./src/events.ts"),f=C("./src/utils/cea-608-parser.ts"),w=C("./src/utils/output-filter.ts"),d=C("./src/utils/webvtt-parser.ts"),o=C("./src/utils/texttrack-utils.ts"),l=C("./src/utils/imsc1-ttml-parser.ts"),a=C("./src/types/loader.ts"),_=C("./src/utils/logger.ts"),m=function(){function x(i){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=v(),this.captionsProperties=void 0,this.hls=i,this.config=i.config,this.Cues=i.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 t=new w.default(this,"textTrack1"),S=new w.default(this,"textTrack2"),E=new w.default(this,"textTrack3"),s=new w.default(this,"textTrack4");this.cea608Parser1=new f.default(1,t,S),this.cea608Parser2=new f.default(3,E,s)}i.on(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),i.on(u.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),i.on(u.Events.FRAG_LOADING,this.onFragLoading,this),i.on(u.Events.FRAG_LOADED,this.onFragLoaded,this),i.on(u.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),i.on(u.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),i.on(u.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),i.on(u.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),i.on(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=x.prototype;return n.destroy=function(){var t=this.hls;t.off(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(u.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(u.Events.FRAG_LOADING,this.onFragLoading,this),t.off(u.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(u.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(u.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(u.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(u.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(t,S,E,s,P){for(var O=!1,b=P.length;b--;){var y=P[b],p=g(y[0],y[1],S,E);if(p>=0&&(y[0]=Math.min(y[0],S),y[1]=Math.max(y[1],E),O=!0,p/(E-S)>.5))return}if(O||P.push([S,E]),this.config.renderTextTracksNatively){var T=this.captionsTracks[t];this.Cues.newCue(T,S,E,s)}else{var M=this.Cues.newCue(null,S,E,s);this.hls.trigger(u.Events.CUES_PARSED,{type:"captions",cues:M,track:t})}},n.onInitPtsFound=function(t,S){var E=this,s=S.frag,P=S.id,O=S.initPTS,b=S.timescale,y=this.unparsedVttFrags;P==="main"&&(this.initPTS[s.cc]=O,this.timescale[s.cc]=b),y.length&&(this.unparsedVttFrags=[],y.forEach(function(p){E.onFragLoaded(u.Events.FRAG_LOADED,p)}))},n.getExistingTrack=function(t){var S=this.media;if(S)for(var E=0;E<S.textTracks.length;E++){var s=S.textTracks[E];if(s[t])return s}return null},n.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},n.createNativeTrack=function(t){if(this.captionsTracks[t])return;var S=this.captionsProperties,E=this.captionsTracks,s=this.media,P=S[t],O=P.label,b=P.languageCode,y=this.getExistingTrack(t);if(y)E[t]=y,Object(o.clearCurrentCues)(E[t]),Object(o.sendAddTrackEvent)(E[t],s);else{var p=this.createTextTrack("captions",O,b);p&&(p[t]=!0,E[t]=p)}},n.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var S=this.captionsProperties[t];if(!S)return;var E=S.label,s={_id:t,label:E,kind:"captions",default:S.media?!!S.media.default:!1,closedCaptions:S.media};this.nonNativeCaptionsTracks[t]=s,this.hls.trigger(u.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[s]})},n.createTextTrack=function(t,S,E){var s=this.media;return s?s.addTextTrack(t,S,E):void 0},n.onMediaAttaching=function(t,S){this.media=S.media,this._cleanTracks()},n.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(S){Object(o.clearCurrentCues)(t[S]),delete t[S]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=v(),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 t=this.media;if(!t)return;var S=t.textTracks;if(S)for(var E=0;E<S.length;E++)Object(o.clearCurrentCues)(S[E])},n.onSubtitleTracksUpdated=function(t,S){var E=this;this.textTracks=[];var s=S.subtitleTracks||[],P=s.some(function(p){return p.textCodec===l.IMSC1_CODEC});if(this.config.enableWebVTT||P&&this.config.enableIMSC1){var O=this.tracks&&s&&this.tracks.length===s.length;if(this.tracks=s||[],this.config.renderTextTracksNatively){var b=this.media?this.media.textTracks:[];this.tracks.forEach(function(p,T){var M;if(T<b.length){for(var N=null,I=0;I<b.length;I++)if(c(b[I],p)){N=b[I];break}N&&(M=N)}M?Object(o.clearCurrentCues)(M):(M=E.createTextTrack("subtitles",p.name,p.lang),M&&(M.mode="disabled")),M&&(M.groupId=p.groupId,E.textTracks.push(M))})}else if(!O&&this.tracks&&this.tracks.length){var y=this.tracks.map(function(p){return{label:p.name,kind:p.type.toLowerCase(),default:p.default,subtitleTrack:p}});this.hls.trigger(u.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:y})}}},n.onManifestLoaded=function(t,S){var E=this;this.config.enableCEA708Captions&&S.captions&&S.captions.forEach(function(s){var P=/(?:CC|SERVICE)([1-4])/.exec(s.instreamId);if(!P)return;var O="textTrack"+P[1],b=E.captionsProperties[O];if(!b)return;b.label=s.name,s.lang&&(b.languageCode=s.lang),b.media=s})},n.onFragLoading=function(t,S){var E=this.cea608Parser1,s=this.cea608Parser2,P=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(E&&s))return;if(S.frag.type===a.PlaylistLevelType.MAIN){var b,y,p=S.frag.sn,T=(b=S==null||((y=S.part)===null||y===void 0)?void 0:y.index)!=null?b:-1;p===P+1||p===P&&T===O+1||(E.reset(),s.reset()),this.lastSn=p,this.lastPartIndex=T}},n.onFragLoaded=function(t,S){var E=S.frag,s=S.payload,P=this.initPTS,O=this.unparsedVttFrags;if(E.type===a.PlaylistLevelType.SUBTITLE)if(s.byteLength){if(!Object(D.isFiniteNumber)(P[E.cc])){O.push(S),P.length&&this.hls.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E,error:new Error("Missing initial subtitle PTS")});return}var b=E.decryptdata;if(b==null||b.key==null||b.method!=="AES-128"){var y=this.tracks[E.level],p=this.vttCCs;p[E.cc]||(p[E.cc]={start:E.start,prevCC:this.prevCC,new:!0},this.prevCC=E.cc),y&&y.textCodec===l.IMSC1_CODEC?this._parseIMSC1(E,s):this._parseVTTs(E,s,p)}}else this.hls.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(t,S){var E=this,s=this.hls;Object(l.parseIMSC1)(S,this.initPTS[t.cc],this.timescale[t.cc],function(P){E._appendCues(P,t.level),s.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(P){_.logger.log("Failed to parse IMSC1: "+P),s.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:P})})},n._parseVTTs=function(t,S,E){var s=this,P=this.hls;Object(d.parseWebVTT)(S,this.initPTS[t.cc],this.timescale[t.cc],E,t.cc,t.start,function(O){s._appendCues(O,t.level),P.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(O){s._fallbackToIMSC1(t,S),_.logger.log("Failed to parse VTT cue: "+O),P.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:O})})},n._fallbackToIMSC1=function(t,S){var E=this,s=this.tracks[t.level];s.textCodec||Object(l.parseIMSC1)(S,this.initPTS[t.cc],this.timescale[t.cc],function(){s.textCodec=l.IMSC1_CODEC,E._parseIMSC1(t,S)},function(){s.textCodec="wvtt"})},n._appendCues=function(t,S){var E=this.hls;if(this.config.renderTextTracksNatively){var s=this.textTracks[S];if(s.mode==="disabled")return;t.forEach(function(b){return Object(o.addCueToTrack)(s,b)})}else{var P=this.tracks[S],O=P.default?"default":"subtitles"+S;E.trigger(u.Events.CUES_PARSED,{type:"subtitles",cues:t,track:O})}},n.onFragDecrypted=function(t,S){var E=S.frag;if(E.type===a.PlaylistLevelType.SUBTITLE){if(!Object(D.isFiniteNumber)(this.initPTS[E.cc])){this.unparsedVttFrags.push(S);return}this.onFragLoaded(u.Events.FRAG_LOADED,S)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(t,S){var E=this.cea608Parser1,s=this.cea608Parser2;if(!this.enabled||!(E&&s))return;for(var P=0;P<S.samples.length;P++){var O=S.samples[P].bytes;if(O){var b=this.extractCea608Data(O);E.addData(S.samples[P].pts,b[0]),s.addData(S.samples[P].pts,b[1])}}},n.onBufferFlushing=function(t,S){var E=S.startOffset,s=S.endOffset,P=S.endOffsetSubtitles,O=S.type,b=this.media;if(!b||b.currentTime<s)return;if(!O||O==="video"){var y=this.captionsTracks;Object.keys(y).forEach(function(T){return Object(o.removeCuesInRange)(y[T],E,s)})}if(this.config.renderTextTracksNatively&&(E===0&&P!==void 0)){var p=this.textTracks;Object.keys(p).forEach(function(T){return Object(o.removeCuesInRange)(p[T],E,P)})}},n.extractCea608Data=function(t){for(var S=t[0]&31,E=2,s=[[],[]],P=0;P<S;P++){var O=t[E++],b=127&t[E++],y=127&t[E++],p=(4&O)!==0,T=3&O;if(b===0&&y===0)continue;p&&((T===0||T===1)&&(s[T].push(b),s[T].push(y)))}return s},x}();function c(x,n){return x&&x.label===n.name&&!(x.textTrack1||x.textTrack2)}function g(x,n,i,t){return Math.min(n,t)-Math.max(x,i)}function v(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return D});var D=function(){function u(w,d){this.subtle=void 0,this.aesIV=void 0,this.subtle=w,this.aesIV=d}var f=u.prototype;return f.decrypt=function(d,o){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},o,d)},u}()},"./src/crypt/aes-decryptor.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"removePadding",function(){return u}),C.d(h,"default",function(){return f});var D=C("./src/utils/typed-array.ts");function u(w){var d=w.byteLength,o=d&&new DataView(w.buffer).getUint8(d-1);return o?Object(D.sliceUint8)(w,0,d-o):w}var f=function(){function w(){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 d=w.prototype;return d.uint8ArrayToUint32Array_=function(l){for(var a=new DataView(l),_=new Uint32Array(4),m=0;m<4;m++)_[m]=a.getUint32(m*4);return _},d.initTable=function(){var l=this.sBox,a=this.invSBox,_=this.subMix,m=_[0],c=_[1],g=_[2],v=_[3],x=this.invSubMix,n=x[0],i=x[1],t=x[2],S=x[3],E=new Uint32Array(256),s=0,P=0,O=0;for(O=0;O<256;O++)O<128?E[O]=O<<1:E[O]=O<<1^283;for(O=0;O<256;O++){var b=P^P<<1^P<<2^P<<3^P<<4;b=b>>>8^b&255^99,l[s]=b,a[b]=s;var y=E[s],p=E[y],T=E[p],M=E[b]*257^b*16843008;m[s]=M<<24|M>>>8,c[s]=M<<16|M>>>16,g[s]=M<<8|M>>>24,v[s]=M,M=T*16843009^p*65537^y*257^s*16843008,n[b]=M<<24|M>>>8,i[b]=M<<16|M>>>16,t[b]=M<<8|M>>>24,S[b]=M,s?(s=y^E[E[E[T^y]]],P^=E[E[P]]):s=P=1}},d.expandKey=function(l){for(var a=this.uint8ArrayToUint32Array_(l),_=!0,m=0;m<a.length&&_;)_=a[m]===this.key[m],m++;if(_)return;this.key=a;var c=this.keySize=a.length;if(c!==4&&c!==6&&c!==8)throw new Error("Invalid aes key size="+c);var g=this.ksRows=(c+6+1)*4,v,x,n=this.keySchedule=new Uint32Array(g),i=this.invKeySchedule=new Uint32Array(g),t=this.sBox,S=this.rcon,E=this.invSubMix,s=E[0],P=E[1],O=E[2],b=E[3],y,p;for(v=0;v<g;v++){if(v<c){y=n[v]=a[v];continue}p=y,v%c===0?(p=p<<8|p>>>24,p=t[p>>>24]<<24|t[p>>>16&255]<<16|t[p>>>8&255]<<8|t[p&255],p^=S[v/c|0]<<24):c>6&&v%c===4&&(p=t[p>>>24]<<24|t[p>>>16&255]<<16|t[p>>>8&255]<<8|t[p&255]),n[v]=y=(n[v-c]^p)>>>0}for(x=0;x<g;x++)v=g-x,x&3?p=n[v]:p=n[v-4],x<4||v<=4?i[x]=p:i[x]=s[t[p>>>24]]^P[t[p>>>16&255]]^O[t[p>>>8&255]]^b[t[p&255]],i[x]=i[x]>>>0},d.networkToHostOrderSwap=function(l){return l<<24|(l&65280)<<8|(l&16711680)>>8|l>>>24},d.decrypt=function(l,a,_){for(var m=this.keySize+6,c=this.invKeySchedule,g=this.invSBox,v=this.invSubMix,x=v[0],n=v[1],i=v[2],t=v[3],S=this.uint8ArrayToUint32Array_(_),E=S[0],s=S[1],P=S[2],O=S[3],b=new Int32Array(l),y=new Int32Array(b.length),p,T,M,N,I,K,H,W,z,U,B,G,q,ae,se=this.networkToHostOrderSwap;a<b.length;){for(z=se(b[a]),U=se(b[a+1]),B=se(b[a+2]),G=se(b[a+3]),I=z^c[0],K=G^c[1],H=B^c[2],W=U^c[3],q=4,ae=1;ae<m;ae++)p=x[I>>>24]^n[K>>16&255]^i[H>>8&255]^t[W&255]^c[q],T=x[K>>>24]^n[H>>16&255]^i[W>>8&255]^t[I&255]^c[q+1],M=x[H>>>24]^n[W>>16&255]^i[I>>8&255]^t[K&255]^c[q+2],N=x[W>>>24]^n[I>>16&255]^i[K>>8&255]^t[H&255]^c[q+3],I=p,K=T,H=M,W=N,q=q+4;p=g[I>>>24]<<24^g[K>>16&255]<<16^g[H>>8&255]<<8^g[W&255]^c[q],T=g[K>>>24]<<24^g[H>>16&255]<<16^g[W>>8&255]<<8^g[I&255]^c[q+1],M=g[H>>>24]<<24^g[W>>16&255]<<16^g[I>>8&255]<<8^g[K&255]^c[q+2],N=g[W>>>24]<<24^g[I>>16&255]<<16^g[K>>8&255]<<8^g[H&255]^c[q+3],y[a]=se(p^E),y[a+1]=se(N^s),y[a+2]=se(M^P),y[a+3]=se(T^O),E=z,s=U,P=B,O=G,a=a+4}return y.buffer},w}()},"./src/crypt/decrypter.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return a});var D=C("./src/crypt/aes-crypto.ts"),u=C("./src/crypt/fast-aes-key.ts"),f=C("./src/crypt/aes-decryptor.ts"),w=C("./src/utils/logger.ts"),d=C("./src/utils/mp4-tools.ts"),o=C("./src/utils/typed-array.ts"),l=16,a=function(){function _(c,g,v){var x=v===void 0?{}:v,n=x.removePKCS7Padding,i=n===void 0?!0:n;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=c,this.config=g,this.removePKCS7Padding=i,i)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(S){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var m=_.prototype;return m.destroy=function(){this.observer=null},m.isSync=function(){return this.config.enableSoftwareAES},m.flush=function(){var g=this.currentResult;if(!g){this.reset();return}var v=new Uint8Array(g);return this.reset(),this.removePKCS7Padding?Object(f.removePadding)(v):v},m.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},m.decrypt=function(g,v,x,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(g),v,x);var i=this.flush();i&&n(i.buffer)}else this.webCryptoDecrypt(new Uint8Array(g),v,x).then(n)},m.softwareDecrypt=function(g,v,x){var n=this.currentIV,i=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(g=Object(d.appendUint8Array)(t,g),this.remainderData=null);var S=this.getValidChunk(g);if(!S.length)return null;n&&(x=n);var E=this.softwareDecrypter;E||(E=this.softwareDecrypter=new f.default),E.expandKey(v);var s=i;return this.currentResult=E.decrypt(S.buffer,0,x),this.currentIV=Object(o.sliceUint8)(S,-16).buffer,s||null},m.webCryptoDecrypt=function(g,v,x){var n=this,i=this.subtle;return(this.key!==v||!this.fastAesKey)&&(this.key=v,this.fastAesKey=new u.default(i,v)),this.fastAesKey.expandKey().then(function(t){if(!i)return Promise.reject(new Error("web crypto not initialized"));var S=new D.default(i,x);return S.decrypt(g.buffer,t)}).catch(function(t){return n.onWebCryptoError(t,g,v,x)})},m.onWebCryptoError=function(g,v,x,n){return w.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",g),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(v,x,n)},m.getValidChunk=function(g){var v=g,x=g.length-g.length%l;return x!==g.length&&(v=Object(o.sliceUint8)(g,0,x),this.remainderData=Object(o.sliceUint8)(g,x)),v},m.logOnce=function(g){if(!this.logEnabled)return;w.logger.log("[decrypter.ts]: "+g),this.logEnabled=!1},_}()},"./src/crypt/fast-aes-key.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return D});var D=function(){function u(w,d){this.subtle=void 0,this.key=void 0,this.subtle=w,this.key=d}var f=u.prototype;return f.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},u}()},"./src/demux/aacdemuxer.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/demux/base-audio-demuxer.ts"),u=C("./src/demux/adts.ts"),f=C("./src/utils/logger.ts"),w=C("./src/demux/id3.ts");function d(a,_){a.prototype=Object.create(_.prototype),a.prototype.constructor=a,o(a,_)}function o(a,_){return o=Object.setPrototypeOf||function(c,g){return c.__proto__=g,c},o(a,_)}var l=function(a){d(_,a);function _(c,g){var v;return v=a.call(this)||this,v.observer=void 0,v.config=void 0,v.observer=c,v.config=g,v}var m=_.prototype;return m.resetInitSegment=function(g,v,x){a.prototype.resetInitSegment.call(this,g,v,x),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:g,duration:x,inputTimeScale:9e4,dropped:0}},_.probe=function(g){if(!g)return!1;for(var v=w.getID3Data(g,0)||[],x=v.length,n=g.length;x<n;x++)if(u.probe(g,x))return f.logger.log("ADTS sync word found !"),!0;return!1},m.canParse=function(g,v){return u.canParse(g,v)},m.appendFrame=function(g,v,x){u.initTrackConfig(g,this.observer,v,x,g.manifestCodec);var n=u.appendFrame(g,v,x,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},_}(D.default);l.minProbeByteLength=9,h.default=l},"./src/demux/adts.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"getAudioConfig",function(){return w}),C.d(h,"isHeaderPattern",function(){return d}),C.d(h,"getHeaderLength",function(){return o}),C.d(h,"getFullFrameLength",function(){return l}),C.d(h,"canGetFrameLength",function(){return a}),C.d(h,"isHeader",function(){return _}),C.d(h,"canParse",function(){return m}),C.d(h,"probe",function(){return c}),C.d(h,"initTrackConfig",function(){return g}),C.d(h,"getFrameDuration",function(){return v}),C.d(h,"parseFrameHeader",function(){return x}),C.d(h,"appendFrame",function(){return n});var D=C("./src/utils/logger.ts"),u=C("./src/errors.ts"),f=C("./src/events.ts");function w(i,t,S,E){var s,P,O,b,y=navigator.userAgent.toLowerCase(),p=E,T=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=((t[S+2]&192)>>>6)+1;var M=(t[S+2]&60)>>>2;if(M>T.length-1){i.trigger(f.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+M});return}return O=(t[S+2]&1)<<2,O|=(t[S+3]&192)>>>6,D.logger.log("manifest codec:"+E+", ADTS type:"+s+", samplingIndex:"+M),/firefox/i.test(y)?M>=6?(s=5,b=new Array(4),P=M-3):(s=2,b=new Array(2),P=M):y.indexOf("android")!==-1?(s=2,b=new Array(2),P=M):(s=5,b=new Array(4),E&&(E.indexOf("mp4a.40.29")!==-1||E.indexOf("mp4a.40.5")!==-1)||!E&&M>=6?P=M-3:((E&&E.indexOf("mp4a.40.2")!==-1&&(M>=6&&O===1||/vivaldi/i.test(y))||!E&&O===1)&&(s=2,b=new Array(2)),P=M)),b[0]=s<<3,b[0]|=(M&14)>>1,b[1]|=(M&1)<<7,b[1]|=O<<3,s===5&&(b[1]|=(P&14)>>1,b[2]=(P&1)<<7,b[2]|=2<<2,b[3]=0),{config:b,samplerate:T[M],channelCount:O,codec:"mp4a.40."+s,manifestCodec:p}}function d(i,t){return i[t]===255&&(i[t+1]&246)===240}function o(i,t){return i[t+1]&1?7:9}function l(i,t){return(i[t+3]&3)<<11|i[t+4]<<3|(i[t+5]&224)>>>5}function a(i,t){return t+5<i.length}function _(i,t){return t+1<i.length&&d(i,t)}function m(i,t){return a(i,t)&&d(i,t)&&l(i,t)<=i.length-t}function c(i,t){if(_(i,t)){var S=o(i,t);if(t+S>=i.length)return!1;var E=l(i,t);if(E<=S)return!1;var s=t+E;return s===i.length||_(i,s)}return!1}function g(i,t,S,E,s){if(!i.samplerate){var P=w(t,S,E,s);if(!P)return;i.config=P.config,i.samplerate=P.samplerate,i.channelCount=P.channelCount,i.codec=P.codec,i.manifestCodec=P.manifestCodec,D.logger.log("parsed codec:"+i.codec+", rate:"+P.samplerate+", channels:"+P.channelCount)}}function v(i){return 1024*9e4/i}function x(i,t,S,E,s){var P=o(i,t),O=l(i,t);if(O-=P,O>0){var b=S+E*s;return{headerLength:P,frameLength:O,stamp:b}}}function n(i,t,S,E,s){var P=v(i.samplerate),O=x(t,S,E,s,P);if(O){var b=O.frameLength,y=O.headerLength,p=O.stamp,T=y+b,M=Math.max(0,S+T-t.length),N;M?(N=new Uint8Array(T-y),N.set(t.subarray(S+y,t.length),0)):N=t.subarray(S+y,S+T);var I={unit:N,pts:p};return M||i.samples.push(I),{sample:I,length:T,missing:M}}}},"./src/demux/base-audio-demuxer.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"initPTSFn",function(){return l});var D=C("./src/polyfills/number.ts"),u=C("./src/demux/id3.ts"),f=C("./src/demux/dummy-demuxed-track.ts"),w=C("./src/utils/mp4-tools.ts"),d=C("./src/utils/typed-array.ts"),o=function(){function a(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var _=a.prototype;return _.resetInitSegment=function(c,g,v){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},_.resetTimeStamp=function(){},_.resetContiguity=function(){},_.canParse=function(c,g){return!1},_.appendFrame=function(c,g,v){},_.demux=function(c,g){this.cachedData&&(c=Object(w.appendUint8Array)(this.cachedData,c),this.cachedData=null);var v=u.getID3Data(c,0),x=v?v.length:0,n,i,t=this._audioTrack,S=this._id3Track,E=v?u.getTimeStamp(v):void 0,s=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=l(E,g)),v&&v.length>0&&S.samples.push({pts:this.initPTS,dts:this.initPTS,data:v}),i=this.initPTS;x<s;){if(this.canParse(c,x)){var P=this.appendFrame(t,c,x);P?(this.frameIndex++,i=P.sample.pts,x+=P.length,n=x):x=s}else u.canParse(c,x)?(v=u.getID3Data(c,x),S.samples.push({pts:i,dts:i,data:v}),x+=v.length,n=x):x++;if(x===s&&n!==s){var O=Object(d.sliceUint8)(c,n);this.cachedData?this.cachedData=Object(w.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:t,avcTrack:Object(f.dummyTrack)(),id3Track:S,textTrack:Object(f.dummyTrack)()}},_.demuxSampleAes=function(c,g,v){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},_.flush=function(c){var g=this.cachedData;return g&&(this.cachedData=null,this.demux(g,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(f.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(f.dummyTrack)()}},_.destroy=function(){},a}(),l=function(_,m){return Object(D.isFiniteNumber)(_)?_*90:m*9e4};h.default=o},"./src/demux/chunk-cache.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return D});var D=function(){function f(){this.chunks=[],this.dataLength=0}var w=f.prototype;return w.push=function(o){this.chunks.push(o),this.dataLength+=o.length},w.flush=function(){var o=this.chunks,l=this.dataLength,a;if(o.length)o.length===1?a=o[0]:a=u(o,l);else return new Uint8Array(0);return this.reset(),a},w.reset=function(){this.chunks.length=0,this.dataLength=0},f}();function u(f,w){for(var d=new Uint8Array(w),o=0,l=0;l<f.length;l++){var a=f[l];d.set(a,o),o+=a.length}return d}},"./src/demux/dummy-demuxed-track.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"dummyTrack",function(){return D});function D(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/utils/logger.ts"),u=function(){function f(d){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=d,this.bytesAvailable=d.byteLength,this.word=0,this.bitsAvailable=0}var w=f.prototype;return w.loadWord=function(){var o=this.data,l=this.bytesAvailable,a=o.byteLength-l,_=new Uint8Array(4),m=Math.min(4,l);if(m===0)throw new Error("no bytes available");_.set(o.subarray(a,a+m)),this.word=new DataView(_.buffer).getUint32(0),this.bitsAvailable=m*8,this.bytesAvailable-=m},w.skipBits=function(o){var l;this.bitsAvailable>o?(this.word<<=o,this.bitsAvailable-=o):(o-=this.bitsAvailable,l=o>>3,o-=l>>3,this.bytesAvailable-=l,this.loadWord(),this.word<<=o,this.bitsAvailable-=o)},w.readBits=function(o){var l=Math.min(this.bitsAvailable,o),a=this.word>>>32-l;return o>32&&D.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=l,this.bitsAvailable>0?this.word<<=l:this.bytesAvailable>0&&this.loadWord(),l=o-l,l>0&&this.bitsAvailable?a<<l|this.readBits(l):a},w.skipLZ=function(){var o;for(o=0;o<this.bitsAvailable;++o)if((this.word&2147483648>>>o)!==0)return this.word<<=o,this.bitsAvailable-=o,o;return this.loadWord(),o+this.skipLZ()},w.skipUEG=function(){this.skipBits(1+this.skipLZ())},w.skipEG=function(){this.skipBits(1+this.skipLZ())},w.readUEG=function(){var o=this.skipLZ();return this.readBits(o+1)-1},w.readEG=function(){var o=this.readUEG();return 1&o?1+o>>>1:-1*(o>>>1)},w.readBoolean=function(){return this.readBits(1)===1},w.readUByte=function(){return this.readBits(8)},w.readUShort=function(){return this.readBits(16)},w.readUInt=function(){return this.readBits(32)},w.skipScalingList=function(o){for(var l=8,a=8,_,m=0;m<o;m++)a!==0&&(_=this.readEG(),a=(l+_+256)%256),l=a===0?l:a},w.readSPS=function(){var o=0,l=0,a=0,_=0,m,c,g,v=this.readUByte.bind(this),x=this.readBits.bind(this),n=this.readUEG.bind(this),i=this.readBoolean.bind(this),t=this.skipBits.bind(this),S=this.skipEG.bind(this),E=this.skipUEG.bind(this),s=this.skipScalingList.bind(this);v();var P=v();if(x(5),t(3),v(),E(),P===100||P===110||P===122||P===244||P===44||P===83||P===86||P===118||P===128){var O=n();if(O===3&&t(1),E(),E(),t(1),i())for(c=O!==3?8:12,g=0;g<c;g++)i()&&(g<6?s(16):s(64))}E();var b=n();if(b===0)n();else if(b===1)for(t(1),S(),S(),m=n(),g=0;g<m;g++)S();E(),t(1);var y=n(),p=n(),T=x(1);T===0&&t(1),t(1),i()&&(o=n(),l=n(),a=n(),_=n());var M=[1,1];if(i()&&i()){var N=v();switch(N){case 1:M=[1,1];break;case 2:M=[12,11];break;case 3:M=[10,11];break;case 4:M=[16,11];break;case 5:M=[40,33];break;case 6:M=[24,11];break;case 7:M=[20,11];break;case 8:M=[32,11];break;case 9:M=[80,33];break;case 10:M=[18,11];break;case 11:M=[15,11];break;case 12:M=[64,33];break;case 13:M=[160,99];break;case 14:M=[4,3];break;case 15:M=[3,2];break;case 16:M=[2,1];break;case 255:{M=[v()<<8|v(),v()<<8|v()];break}}}return{width:Math.ceil((y+1)*16-o*2-l*2),height:(2-T)*(p+1)*16-(T?2:4)*(a+_),pixelRatio:M}},w.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},f}();h.default=u},"./src/demux/id3.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"isHeader",function(){return D}),C.d(h,"isFooter",function(){return u}),C.d(h,"getID3Data",function(){return f}),C.d(h,"canParse",function(){return d}),C.d(h,"getTimeStamp",function(){return o}),C.d(h,"isTimeStampFrame",function(){return l}),C.d(h,"getID3Frames",function(){return _}),C.d(h,"decodeFrame",function(){return m}),C.d(h,"utf8ArrayToStr",function(){return n}),C.d(h,"testables",function(){return i});var D=function(s,P){return P+10<=s.length&&(s[P]===73&&s[P+1]===68&&s[P+2]===51&&(s[P+3]<255&&s[P+4]<255&&(s[P+6]<128&&s[P+7]<128&&s[P+8]<128&&s[P+9]<128)))},u=function(s,P){return P+10<=s.length&&(s[P]===51&&s[P+1]===68&&s[P+2]===73&&(s[P+3]<255&&s[P+4]<255&&(s[P+6]<128&&s[P+7]<128&&s[P+8]<128&&s[P+9]<128)))},f=function(s,P){for(var O=P,b=0;D(s,P);){b+=10;var y=w(s,P+6);b+=y,u(s,P+10)&&(b+=10),P+=b}return b>0?s.subarray(O,O+b):void 0},w=function(s,P){var O=0;return O=(s[P]&127)<<21,O|=(s[P+1]&127)<<14,O|=(s[P+2]&127)<<7,O|=s[P+3]&127,O},d=function(s,P){return D(s,P)&&w(s,P+6)+10<=s.length-P},o=function(s){for(var P=_(s),O=0;O<P.length;O++){var b=P[O];if(l(b))return x(b)}return},l=function(s){return s&&s.key==="PRIV"&&s.info==="com.apple.streaming.transportStreamTimestamp"},a=function(s){var P=String.fromCharCode(s[0],s[1],s[2],s[3]),O=w(s,4),b=10;return{type:P,size:O,data:s.subarray(b,b+O)}},_=function(s){for(var P=0,O=[];D(s,P);){var b=w(s,P+6);P+=10;for(var y=P+b;P+8<y;){var p=a(s.subarray(P)),T=m(p);T&&O.push(T),P+=p.size+10}u(s,P)&&(P+=10)}return O},m=function(s){return s.type==="PRIV"?c(s):s.type[0]==="W"?v(s):g(s)},c=function(s){if(s.size<2)return;var P=n(s.data,!0),O=new Uint8Array(s.data.subarray(P.length+1));return{key:s.type,info:P,data:O.buffer}},g=function(s){if(s.size<2)return;if(s.type==="TXXX"){var P=1,O=n(s.data.subarray(P),!0);P+=O.length+1;var b=n(s.data.subarray(P));return{key:s.type,info:O,data:b}}var y=n(s.data.subarray(1));return{key:s.type,data:y}},v=function(s){if(s.type==="WXXX"){if(s.size<2)return;var P=1,O=n(s.data.subarray(P),!0);P+=O.length+1;var b=n(s.data.subarray(P));return{key:s.type,info:O,data:b}}var y=n(s.data);return{key:s.type,data:y}},x=function(s){if(s.data.byteLength===8){var P=new Uint8Array(s.data),O=P[3]&1,b=(P[4]<<23)+(P[5]<<15)+(P[6]<<7)+P[7];return b/=45,O&&(b+=4772185884e-2),Math.round(b)}return},n=function(s,P){P===void 0&&(P=!1);var O=S();if(O){var b=O.decode(s);if(P){var y=b.indexOf("\0");return y!==-1?b.substring(0,y):b}return b.replace(/\0/g,"")}for(var p=s.length,T,M,N,I="",K=0;K<p;){if(T=s[K++],T===0&&P)return I;if(T===0||T===3)continue;switch(T>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:I+=String.fromCharCode(T);break;case 12:case 13:M=s[K++],I+=String.fromCharCode((T&31)<<6|M&63);break;case 14:M=s[K++],N=s[K++],I+=String.fromCharCode((T&15)<<12|(M&63)<<6|(N&63)<<0);break;default:}}return I},i={decodeTextFrame:g},t;function S(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/demux/base-audio-demuxer.ts"),u=C("./src/demux/id3.ts"),f=C("./src/utils/logger.ts"),w=C("./src/demux/mpegaudio.ts");function d(a,_){a.prototype=Object.create(_.prototype),a.prototype.constructor=a,o(a,_)}function o(a,_){return o=Object.setPrototypeOf||function(c,g){return c.__proto__=g,c},o(a,_)}var l=function(a){d(_,a);function _(){return a.apply(this,arguments)||this}var m=_.prototype;return m.resetInitSegment=function(g,v,x){a.prototype.resetInitSegment.call(this,g,v,x),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:g,duration:x,inputTimeScale:9e4,dropped:0}},_.probe=function(g){if(!g)return!1;for(var v=u.getID3Data(g,0)||[],x=v.length,n=g.length;x<n;x++)if(w.probe(g,x))return f.logger.log("MPEG Audio sync word found !"),!0;return!1},m.canParse=function(g,v){return w.canParse(g,v)},m.appendFrame=function(g,v,x){return this.initPTS===null?void 0:w.appendFrame(g,v,x,this.initPTS,this.frameIndex)},_}(D.default);l.minProbeByteLength=4,h.default=l},"./src/demux/mp4demuxer.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/utils/mp4-tools.ts"),u=C("./src/demux/dummy-demuxed-track.ts"),f=function(){function w(o,l){this.remainderData=null,this.config=void 0,this.config=l}var d=w.prototype;return d.resetTimeStamp=function(){},d.resetInitSegment=function(){},d.resetContiguity=function(){},w.probe=function(l){return Object(D.findBox)({data:l,start:0,end:Math.min(l.length,16384)},["moof"]).length>0},d.demux=function(l){var a=l,_=Object(u.dummyTrack)();if(this.config.progressive){this.remainderData&&(a=Object(D.appendUint8Array)(this.remainderData,l));var m=Object(D.segmentValidRange)(a);this.remainderData=m.remainder,_.samples=m.valid||new Uint8Array}else _.samples=a;return{audioTrack:Object(u.dummyTrack)(),avcTrack:_,id3Track:Object(u.dummyTrack)(),textTrack:Object(u.dummyTrack)()}},d.flush=function(){var l=Object(u.dummyTrack)();return l.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(u.dummyTrack)(),avcTrack:l,id3Track:Object(u.dummyTrack)(),textTrack:Object(u.dummyTrack)()}},d.demuxSampleAes=function(l,a,_){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},d.destroy=function(){},w}();f.minProbeByteLength=1024,h.default=f},"./src/demux/mpegaudio.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"appendFrame",function(){return o}),C.d(h,"parseHeader",function(){return l}),C.d(h,"isHeaderPattern",function(){return a}),C.d(h,"isHeader",function(){return _}),C.d(h,"canParse",function(){return m}),C.d(h,"probe",function(){return c});var D=null,u=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],f=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],w=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],d=[0,1,1,4];function o(g,v,x,n,i){if(x+24>v.length)return;var t=l(v,x);if(t&&x+t.frameLength<=v.length){var S=t.samplesPerFrame*9e4/t.sampleRate,E=n+i*S,s={unit:v.subarray(x,x+t.frameLength),pts:E,dts:E};return g.config=[],g.channelCount=t.channelCount,g.samplerate=t.sampleRate,g.samples.push(s),{sample:s,length:t.frameLength,missing:0}}}function l(g,v){var x=g[v+1]>>3&3,n=g[v+1]>>1&3,i=g[v+2]>>4&15,t=g[v+2]>>2&3;if(x!==1&&i!==0&&i!==15&&t!==3){var S=g[v+2]>>1&1,E=g[v+3]>>6,s=x===3?3-n:n===3?3:4,P=u[s*14+i-1]*1e3,O=x===3?0:x===2?1:2,b=f[O*3+t],y=E===3?1:2,p=w[x][n],T=d[n],M=p*8*T,N=Math.floor(p*P/b+S)*T;if(D===null){var I=navigator.userAgent||"",K=I.match(/Chrome\/(\d+)/i);D=K?parseInt(K[1]):0}var H=!!D&&D<=87;return H&&n===2&&P>=224e3&&E===0&&(g[v+3]=g[v+3]|128),{sampleRate:b,channelCount:y,frameLength:N,samplesPerFrame:M}}}function a(g,v){return g[v]===255&&(g[v+1]&224)===224&&(g[v+1]&6)!==0}function _(g,v){return v+1<g.length&&a(g,v)}function m(g,v){var x=4;return a(g,v)&&x<=g.length-v}function c(g,v){if(v+1<g.length&&a(g,v)){var x=4,n=l(g,v),i=x;n!=null&&n.frameLength&&(i=n.frameLength);var t=v+i;return t===g.length||_(g,t)}return!1}},"./src/demux/sample-aes.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/crypt/decrypter.ts"),u=C("./src/demux/tsdemuxer.ts"),f=function(){function w(o,l,a){this.keyData=void 0,this.decrypter=void 0,this.keyData=a,this.decrypter=new D.default(o,l,{removePKCS7Padding:!1})}var d=w.prototype;return d.decryptBuffer=function(l,a){this.decrypter.decrypt(l,this.keyData.key.buffer,this.keyData.iv.buffer,a)},d.decryptAacSample=function(l,a,_,m){var c=l[a].unit,g=c.subarray(16,c.length-c.length%16),v=g.buffer.slice(g.byteOffset,g.byteOffset+g.length),x=this;this.decryptBuffer(v,function(n){var i=new Uint8Array(n);c.set(i,16),m||x.decryptAacSamples(l,a+1,_)})},d.decryptAacSamples=function(l,a,_){for(;;a++){if(a>=l.length){_();return}if(l[a].unit.length<32)continue;var m=this.decrypter.isSync();if(this.decryptAacSample(l,a,_,m),!m)return}},d.getAvcEncryptedData=function(l){for(var a=Math.floor((l.length-48)/160)*16+16,_=new Int8Array(a),m=0,c=32;c<=l.length-16;c+=160,m+=16)_.set(l.subarray(c,c+16),m);return _},d.getAvcDecryptedUnit=function(l,a){for(var _=new Uint8Array(a),m=0,c=32;c<=l.length-16;c+=160,m+=16)l.set(_.subarray(m,m+16),c);return l},d.decryptAvcSample=function(l,a,_,m,c,g){var v=Object(u.discardEPB)(c.data),x=this.getAvcEncryptedData(v),n=this;this.decryptBuffer(x.buffer,function(i){c.data=n.getAvcDecryptedUnit(v,i),g||n.decryptAvcSamples(l,a,_+1,m)})},d.decryptAvcSamples=function(l,a,_,m){if(l instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;a++,_=0){if(a>=l.length){m();return}for(var c=l[a].units;!(_>=c.length);_++){var g=c[_];if(g.data.length<=48||g.type!==1&&g.type!==5)continue;var v=this.decrypter.isSync();if(this.decryptAvcSample(l,a,_,m,g,v),!v)return}}},w}();h.default=f},"./src/demux/transmuxer-interface.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return c});var D=C("./node_modules/webworkify-webpack/index.js"),u=C.n(D),f=C("./src/events.ts"),w=C("./src/demux/transmuxer.ts"),d=C("./src/utils/logger.ts"),o=C("./src/errors.ts"),l=C("./src/utils/mediasource-helper.ts"),a=C("./node_modules/eventemitter3/index.js"),_=C.n(a),m=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function g(x,n,i,t){var S=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=x,this.id=n,this.onTransmuxComplete=i,this.onFlush=t;var E=x.config,s=function(p,T){T=T||{},T.frag=S.frag,T.id=S.id,x.trigger(p,T)};this.observer=new a.EventEmitter,this.observer.on(f.Events.FRAG_DECRYPTED,s),this.observer.on(f.Events.ERROR,s);var P={mp4:m.isTypeSupported("video/mp4"),mpeg:m.isTypeSupported("audio/mpeg"),mp3:m.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(E.enableWorker&&typeof Worker!="undefined"){d.logger.log("demuxing in webworker");var b;try{b=this.worker=D("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),b.addEventListener("message",this.onwmsg),b.onerror=function(y){x.trigger(f.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(y.message+" ("+y.filename+":"+y.lineno+")")})},b.postMessage({cmd:"init",typeSupported:P,vendor:O,id:n,config:JSON.stringify(E)})}catch(y){d.logger.warn("Error in worker:",y),d.logger.error("Error while initializing DemuxerWorker, fallback to inline"),b&&self.URL.revokeObjectURL(b.objectURL),this.transmuxer=new w.default(this.observer,P,E,O,n),this.worker=null}}else this.transmuxer=new w.default(this.observer,P,E,O,n)}var v=g.prototype;return v.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var i=this.transmuxer;i&&(i.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},v.push=function(n,i,t,S,E,s,P,O,b,y){var p=this;b.transmuxing.start=self.performance.now();var T=this.transmuxer,M=this.worker,N=s?s.start:E.start,I=E.decryptdata,K=this.frag,H=!(K&&E.cc===K.cc),W=!(K&&b.level===K.level),z=K?b.sn-K.sn:-1,U=this.part?b.part-this.part.index:1,B=!W&&(z===1||z===0&&U===1),G=self.performance.now();(W||z||E.stats.parsing.start===0)&&(E.stats.parsing.start=G),s&&(U||!B)&&(s.stats.parsing.start=G);var q=new w.TransmuxState(H,B,O,W,N);if(!B||H){d.logger.log("[transmuxer-interface, "+E.type+"]: Starting new transmux session for sn: "+b.sn+" p: "+b.part+" level: "+b.level+" id: "+b.id+`
|
|
|
discontinuity: `+H+`
|
|
|
trackSwitch: `+W+`
|
|
|
contiguous: `+B+`
|
|
|
accurateTimeOffset: `+O+`
|
|
|
timeOffset: `+N);var ae=new w.TransmuxConfig(t,S,i,P,y);this.configureTransmuxer(ae)}if(this.frag=E,this.part=s,M)M.postMessage({cmd:"demux",data:n,decryptdata:I,chunkMeta:b,state:q},n instanceof ArrayBuffer?[n]:[]);else if(T){var se=T.push(n,I,b,q);Object(w.isPromise)(se)?se.then(function(we){p.handleTransmuxComplete(we)}):this.handleTransmuxComplete(se)}},v.flush=function(n){var i=this;n.transmuxing.start=self.performance.now();var t=this.transmuxer,S=this.worker;if(S)S.postMessage({cmd:"flush",chunkMeta:n});else if(t){var E=t.flush(n);Object(w.isPromise)(E)?E.then(function(s){i.handleFlushResult(s,n)}):this.handleFlushResult(E,n)}},v.handleFlushResult=function(n,i){var t=this;n.forEach(function(S){t.handleTransmuxComplete(S)}),this.onFlush(i)},v.onWorkerMessage=function(n){var i=n.data,t=this.hls;switch(i.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(i.data);break}case"flush":{this.onFlush(i.data);break}default:{i.data=i.data||{},i.data.frag=this.frag,i.data.id=this.id,t.trigger(i.event,i.data);break}}},v.configureTransmuxer=function(n){var i=this.worker,t=this.transmuxer;i?i.postMessage({cmd:"configure",config:n}):t&&t.configure(n)},v.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},g}()},"./src/demux/transmuxer-worker.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return o});var D=C("./src/demux/transmuxer.ts"),u=C("./src/events.ts"),f=C("./src/utils/logger.ts"),w=C("./node_modules/eventemitter3/index.js"),d=C.n(w);function o(c){var g=new w.EventEmitter,v=function(n,i){c.postMessage({event:n,data:i})};g.on(u.Events.FRAG_DECRYPTED,v),g.on(u.Events.ERROR,v),c.addEventListener("message",function(x){var n=x.data;switch(n.cmd){case"init":{var i=JSON.parse(n.config);c.transmuxer=new D.default(g,n.typeSupported,i,n.vendor,n.id),Object(f.enableLogs)(i.debug),v("init",null);break}case"configure":{c.transmuxer.configure(n.config);break}case"demux":{var t=c.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(D.isPromise)(t)?t.then(function(s){l(c,s)}):l(c,t);break}case"flush":{var S=n.chunkMeta,E=c.transmuxer.flush(S);Object(D.isPromise)(E)?E.then(function(s){_(c,s,S)}):_(c,E,S);break}default:break}})}function l(c,g){if(m(g.remuxResult))return;var v=[],x=g.remuxResult,n=x.audio,i=x.video;n&&a(v,n),i&&a(v,i),c.postMessage({event:"transmuxComplete",data:g},v)}function a(c,g){g.data1&&c.push(g.data1.buffer),g.data2&&c.push(g.data2.buffer)}function _(c,g,v){g.forEach(function(x){l(c,x)}),c.postMessage({event:"flush",data:v})}function m(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return i}),C.d(h,"isPromise",function(){return E}),C.d(h,"TransmuxConfig",function(){return s}),C.d(h,"TransmuxState",function(){return P});var D=C("./src/events.ts"),u=C("./src/errors.ts"),f=C("./src/crypt/decrypter.ts"),w=C("./src/demux/aacdemuxer.ts"),d=C("./src/demux/mp4demuxer.ts"),o=C("./src/demux/tsdemuxer.ts"),l=C("./src/demux/mp3demuxer.ts"),a=C("./src/remux/mp4-remuxer.ts"),_=C("./src/remux/passthrough-remuxer.ts"),m=C("./src/demux/chunk-cache.ts"),c=C("./src/utils/mp4-tools.ts"),g=C("./src/utils/logger.ts"),v;try{v=self.performance.now.bind(self.performance)}catch(O){g.logger.debug("Unable to use Performance API on this environment"),v=self.Date.now}var x=[{demux:o.default,remux:a.default},{demux:d.default,remux:_.default},{demux:w.default,remux:a.default},{demux:l.default,remux:a.default}],n=1024;x.forEach(function(O){var b=O.demux;n=Math.max(n,b.minProbeByteLength)});var i=function(){function O(y,p,T,M,N){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 m.default,this.observer=y,this.typeSupported=p,this.config=T,this.vendor=M,this.id=N}var b=O.prototype;return b.configure=function(p){this.transmuxConfig=p,this.decrypter&&this.decrypter.reset()},b.push=function(p,T,M,N){var I=this,K=M.transmuxing;K.executeStart=v();var H=new Uint8Array(p),W=this.cache,z=this.config,U=this.currentTransmuxState,B=this.transmuxConfig;N&&(this.currentTransmuxState=N);var G=t(H,T);if(G&&G.method==="AES-128"){var q=this.getDecrypter();if(z.enableSoftwareAES){var ae=q.softwareDecrypt(H,G.key.buffer,G.iv.buffer);if(!ae)return K.executeEnd=v(),S(M);H=new Uint8Array(ae)}else return this.decryptionPromise=q.webCryptoDecrypt(H,G.key.buffer,G.iv.buffer).then(function($){var X=I.push($,null,M);return I.decryptionPromise=null,X}),this.decryptionPromise}var se=N||U,we=se.contiguous,Se=se.discontinuity,de=se.trackSwitch,xe=se.accurateTimeOffset,he=se.timeOffset,ne=B.audioCodec,oe=B.videoCodec,te=B.defaultInitPts,le=B.duration,Y=B.initSegmentData;if((Se||de)&&this.resetInitSegment(Y,ne,oe,le),Se&&this.resetInitialTimestamp(te),we||this.resetContiguity(),this.needsProbing(H,Se,de)){if(W.dataLength){var Z=W.flush();H=Object(c.appendUint8Array)(Z,H)}this.configureTransmuxer(H,B)}var ge=this.transmux(H,G,he,xe,M),ee=this.currentTransmuxState;return ee.contiguous=!0,ee.discontinuity=!1,ee.trackSwitch=!1,K.executeEnd=v(),ge},b.flush=function(p){var T=this,M=p.transmuxing;M.executeStart=v();var N=this.decrypter,I=this.cache,K=this.currentTransmuxState,H=this.decryptionPromise;if(H)return H.then(function(){return T.flush(p)});var W=[],z=K.timeOffset;if(N){var U=N.flush();U&&W.push(this.push(U,null,p))}var B=I.dataLength;I.reset();var G=this.demuxer,q=this.remuxer;if(!G||!q)return B>=n&&this.observer.emit(D.Events.ERROR,D.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),M.executeEnd=v(),[S(p)];var ae=G.flush(z);return E(ae)?ae.then(function(se){return T.flushRemux(W,se,p),W}):(this.flushRemux(W,ae,p),W)},b.flushRemux=function(p,T,M){var N=T.audioTrack,I=T.avcTrack,K=T.id3Track,H=T.textTrack,W=this.currentTransmuxState,z=W.accurateTimeOffset,U=W.timeOffset;g.logger.log("[transmuxer.ts]: Flushed fragment "+M.sn+(M.part>-1?" p: "+M.part:"")+" of level "+M.level);var B=this.remuxer.remux(N,I,K,H,U,z,!0,this.id);p.push({remuxResult:B,chunkMeta:M}),M.transmuxing.executeEnd=v()},b.resetInitialTimestamp=function(p){var T=this.demuxer,M=this.remuxer;if(!T||!M)return;T.resetTimeStamp(p),M.resetTimeStamp(p)},b.resetContiguity=function(){var p=this.demuxer,T=this.remuxer;if(!p||!T)return;p.resetContiguity(),T.resetNextTimestamp()},b.resetInitSegment=function(p,T,M,N){var I=this.demuxer,K=this.remuxer;if(!I||!K)return;I.resetInitSegment(T,M,N),K.resetInitSegment(p,T,M)},b.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},b.transmux=function(p,T,M,N,I){var K;return T&&T.method==="SAMPLE-AES"?K=this.transmuxSampleAes(p,T,M,N,I):K=this.transmuxUnencrypted(p,M,N,I),K},b.transmuxUnencrypted=function(p,T,M,N){var I=this.demuxer.demux(p,T,!1,!this.config.progressive),K=I.audioTrack,H=I.avcTrack,W=I.id3Track,z=I.textTrack,U=this.remuxer.remux(K,H,W,z,T,M,!1,this.id);return{remuxResult:U,chunkMeta:N}},b.transmuxSampleAes=function(p,T,M,N,I){var K=this;return this.demuxer.demuxSampleAes(p,T,M).then(function(H){var W=K.remuxer.remux(H.audioTrack,H.avcTrack,H.id3Track,H.textTrack,M,N,!1,K.id);return{remuxResult:W,chunkMeta:I}})},b.configureTransmuxer=function(p,T){for(var M=this.config,N=this.observer,I=this.typeSupported,K=this.vendor,H=T.audioCodec,W=T.defaultInitPts,z=T.duration,U=T.initSegmentData,B=T.videoCodec,G,q=0,ae=x.length;q<ae;q++)if(x[q].demux.probe(p)){G=x[q];break}G||(g.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),G={demux:d.default,remux:_.default});var se=this.demuxer,we=this.remuxer,Se=G.remux,de=G.demux;(!we||!(we instanceof Se))&&(this.remuxer=new Se(N,M,I,K)),(!se||!(se instanceof de))&&(this.demuxer=new de(N,M,I),this.probe=de.probe),this.resetInitSegment(U,H,B,z),this.resetInitialTimestamp(W)},b.needsProbing=function(p,T,M){return!this.demuxer||!this.remuxer||T||M},b.getDecrypter=function(){var p=this.decrypter;return p||(p=this.decrypter=new f.default(this.observer,this.config)),p},O}();function t(O,b){var y=null;return O.byteLength>0&&b!=null&&b.key!=null&&b.iv!==null&&b.method!=null&&(y=b),y}var S=function(b){return{remuxResult:{},chunkMeta:b}};function E(O){return"then"in O&&O.then instanceof Function}var s=function(b,y,p,T,M){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=b,this.videoCodec=y,this.initSegmentData=p,this.duration=T,this.defaultInitPts=M},P=function(b,y,p,T,M){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=b,this.contiguous=y,this.accurateTimeOffset=p,this.trackSwitch=T,this.timeOffset=M}},"./src/demux/tsdemuxer.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"discardEPB",function(){return S});var D=C("./src/demux/adts.ts"),u=C("./src/demux/mpegaudio.ts"),f=C("./src/demux/exp-golomb.ts"),w=C("./src/demux/id3.ts"),d=C("./src/demux/sample-aes.ts"),o=C("./src/events.ts"),l=C("./src/utils/mp4-tools.ts"),a=C("./src/utils/logger.ts"),_=C("./src/errors.ts"),m={video:1,audio:2,id3:3,text:4},c=function(){function E(P,O,b){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=P,this.config=O,this.typeSupported=b}E.probe=function(O){var b=E.syncOffset(O);return b<0?!1:(b&&a.logger.warn("MPEG2-TS detected but first sync word found @ offset "+b+", junk ahead ?"),!0)},E.syncOffset=function(O){for(var b=Math.min(1e3,O.length-3*188),y=0;y<b;){if(O[y]===71&&O[y+188]===71&&O[y+2*188]===71)return y;y++}return-1},E.createTrack=function(O,b){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:m[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?b:void 0}};var s=E.prototype;return s.resetInitSegment=function(O,b,y){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=E.createTrack("video",y),this._audioTrack=E.createTrack("audio",y),this._id3Track=E.createTrack("id3",y),this._txtTrack=E.createTrack("text",y),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=b,this._duration=y},s.resetTimeStamp=function(){},s.resetContiguity=function(){var O=this._audioTrack,b=this._avcTrack,y=this._id3Track;O&&(O.pesData=null),b&&(b.pesData=null),y&&(y.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},s.demux=function(O,b,y,p){y===void 0&&(y=!1),p===void 0&&(p=!1),y||(this.sampleAes=null);var T,M=this._avcTrack,N=this._audioTrack,I=this._id3Track,K=M.pid,H=M.pesData,W=N.pid,z=I.pid,U=N.pesData,B=I.pesData,G=!1,q=this.pmtParsed,ae=this._pmtId,se=O.length;if(this.remainderData&&(O=Object(l.appendUint8Array)(this.remainderData,O),se=O.length,this.remainderData=null),se<188&&!p)return this.remainderData=O,{audioTrack:N,avcTrack:M,id3Track:I,textTrack:this._txtTrack};var we=Math.max(0,E.syncOffset(O));se-=(se+we)%188,se<O.byteLength&&!p&&(this.remainderData=new Uint8Array(O.buffer,se,O.buffer.byteLength-se));for(var Se=we;Se<se;Se+=188)if(O[Se]===71){var de=!!(O[Se+1]&64),xe=((O[Se+1]&31)<<8)+O[Se+2],he=(O[Se+3]&48)>>4,ne=void 0;if(he>1){if(ne=Se+5+O[Se+4],ne===Se+188)continue}else ne=Se+4;switch(xe){case K:de&&(H&&(T=n(H))&&this.parseAVCPES(T,!1),H={data:[],size:0}),H&&(H.data.push(O.subarray(ne,Se+188)),H.size+=Se+188-ne);break;case W:de&&(U&&(T=n(U))&&(N.isAAC?this.parseAACPES(T):this.parseMPEGPES(T)),U={data:[],size:0}),U&&(U.data.push(O.subarray(ne,Se+188)),U.size+=Se+188-ne);break;case z:de&&(B&&(T=n(B))&&this.parseID3PES(T),B={data:[],size:0}),B&&(B.data.push(O.subarray(ne,Se+188)),B.size+=Se+188-ne);break;case 0:de&&(ne+=O[ne]+1),ae=this._pmtId=v(O,ne);break;case ae:{de&&(ne+=O[ne]+1);var oe=x(O,ne,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,y);K=oe.avc,K>0&&(M.pid=K),W=oe.audio,W>0&&(N.pid=W,N.isAAC=oe.isAAC),z=oe.id3,z>0&&(I.pid=z),G&&!q&&(a.logger.log("reparse from beginning"),G=!1,Se=we-188),q=this.pmtParsed=!0;break}case 17:case 8191:break;default:G=!0;break}}else this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});M.pesData=H,N.pesData=U,I.pesData=B;var te={audioTrack:N,avcTrack:M,id3Track:I,textTrack:this._txtTrack};return p&&this.extractRemainingSamples(te),te},s.flush=function(){var O=this.remainderData;this.remainderData=null;var b;return O?b=this.demux(O,-1,!1,!0):b={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(b),this.sampleAes?this.decrypt(b,this.sampleAes):b},s.extractRemainingSamples=function(O){var b=O.audioTrack,y=O.avcTrack,p=O.id3Track,T=y.pesData,M=b.pesData,N=p.pesData,I;T&&(I=n(T))?(this.parseAVCPES(I,!0),y.pesData=null):y.pesData=T,M&&(I=n(M))?(b.isAAC?this.parseAACPES(I):this.parseMPEGPES(I),b.pesData=null):(M!=null&&M.size&&a.logger.log("last AAC PES packet truncated,might overlap between fragments"),b.pesData=M),N&&(I=n(N))?(this.parseID3PES(I),p.pesData=null):p.pesData=N},s.demuxSampleAes=function(O,b,y){var p=this.demux(O,y,!0,!this.config.progressive),T=this.sampleAes=new d.default(this.observer,this.config,b);return this.decrypt(p,T)},s.decrypt=function(O,b){return new Promise(function(y){var p=O.audioTrack,T=O.avcTrack;p.samples&&p.isAAC?b.decryptAacSamples(p.samples,0,function(){T.samples?b.decryptAvcSamples(T.samples,0,0,function(){y(O)}):y(O)}):T.samples&&b.decryptAvcSamples(T.samples,0,0,function(){y(O)})})},s.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},s.parseAVCPES=function(O,b){var y=this,p=this._avcTrack,T=this.parseAVCNALu(O.data),M=!1,N=this.avcSample,I,K=!1;O.data=null,N&&T.length&&!p.audFound&&(i(N,p),N=this.avcSample=g(!1,O.pts,O.dts,"")),T.forEach(function(H){switch(H.type){case 1:{I=!0,N||(N=y.avcSample=g(!0,O.pts,O.dts,"")),M&&(N.debug+="NDR "),N.frame=!0;var W=H.data;if(K&&W.length>4){var z=new f.default(W).readSliceType();(z===2||z===4||z===7||z===9)&&(N.key=!0)}break}case 5:I=!0,N||(N=y.avcSample=g(!0,O.pts,O.dts,"")),M&&(N.debug+="IDR "),N.key=!0,N.frame=!0;break;case 6:{I=!0,M&&N&&(N.debug+="SEI ");var U=new f.default(S(H.data));U.readUByte();for(var B=0,G=0,q=!1,ae=0;!q&&U.bytesAvailable>1;){B=0;do ae=U.readUByte(),B+=ae;while(ae===255);G=0;do ae=U.readUByte(),G+=ae;while(ae===255);if(B===4&&U.bytesAvailable!==0){q=!0;var se=U.readUByte();if(se===181){var we=U.readUShort();if(we===49){var Se=U.readUInt();if(Se===1195456820){var de=U.readUByte();if(de===3){for(var xe=U.readUByte(),he=U.readUByte(),ne=31&xe,oe=[xe,he],te=0;te<ne;te++)oe.push(U.readUByte()),oe.push(U.readUByte()),oe.push(U.readUByte());t(y._txtTrack.samples,{type:3,pts:O.pts,bytes:oe})}}}}}else if(B===5&&U.bytesAvailable!==0){if(q=!0,G>16){for(var le=[],Y=0;Y<16;Y++)le.push(U.readUByte().toString(16)),(Y===3||Y===5||Y===7||Y===9)&&le.push("-");for(var Z=G-16,ge=new Uint8Array(Z),ee=0;ee<Z;ee++)ge[ee]=U.readUByte();t(y._txtTrack.samples,{pts:O.pts,payloadType:B,uuid:le.join(""),userData:Object(w.utf8ArrayToStr)(ge),userDataBytes:ge})}}else if(G<U.bytesAvailable)for(var $=0;$<G;$++)U.readUByte()}break}case 7:if(I=!0,K=!0,M&&N&&(N.debug+="SPS "),!p.sps){var X=new f.default(H.data),J=X.readSPS();p.width=J.width,p.height=J.height,p.pixelRatio=J.pixelRatio,p.sps=[H.data],p.duration=y._duration;for(var me=H.data.subarray(1,4),ue="avc1.",_e=0;_e<3;_e++){var He=me[_e].toString(16);He.length<2&&(He="0"+He),ue+=He}p.codec=ue}break;case 8:I=!0,M&&N&&(N.debug+="PPS "),p.pps||(p.pps=[H.data]);break;case 9:I=!1,p.audFound=!0,N&&i(N,p),N=y.avcSample=g(!1,O.pts,O.dts,M?"AUD ":"");break;case 12:I=!1;break;default:I=!1,N&&(N.debug+="unknown NAL "+H.type+" ");break}if(N&&I){var $e=N.units;$e.push(H)}}),b&&N&&(i(N,p),this.avcSample=null)},s.getLastNalUnit=function(){var O,b=this.avcSample,y;if(!b||b.units.length===0){var p=this._avcTrack.samples;b=p[p.length-1]}if((O=b)!==null&&O!==void 0&&O.units){var T=b.units;y=T[T.length-1]}return y},s.parseAVCNALu=function(O){var b=O.byteLength,y=this._avcTrack,p=y.naluState||0,T=p,M=[],N=0,I,K,H,W=-1,z=0;for(p===-1&&(W=0,z=O[0]&31,p=0,N=1);N<b;){if(I=O[N++],!p){p=I?0:1;continue}if(p===1){p=I?0:2;continue}if(!I)p=3;else if(I===1){if(W>=0){var U={data:O.subarray(W,N-p-1),type:z};M.push(U)}else{var B=this.getLastNalUnit();if(B&&(T&&N<=4-T&&(B.state&&(B.data=B.data.subarray(0,B.data.byteLength-T))),K=N-p-1,K>0)){var G=new Uint8Array(B.data.byteLength+K);G.set(B.data,0),G.set(O.subarray(0,K),B.data.byteLength),B.data=G,B.state=0}}N<b?(H=O[N]&31,W=N,z=H,p=0):p=-1}else p=0}if(W>=0&&p>=0){var q={data:O.subarray(W,b),type:z,state:p};M.push(q)}if(M.length===0){var ae=this.getLastNalUnit();if(ae){var se=new Uint8Array(ae.data.byteLength+O.byteLength);se.set(ae.data,0),se.set(O,ae.data.byteLength),ae.data=se}}return y.naluState=p,M},s.parseAACPES=function(O){var b=0,y=this._audioTrack,p=this.aacOverFlow,T=O.data;if(p){this.aacOverFlow=null;var M=p.sample.unit.byteLength,N=Math.min(p.missing,M),I=M-N;p.sample.unit.set(T.subarray(0,N),I),y.samples.push(p.sample),b=p.missing}var K,H;for(K=b,H=T.length;K<H-1&&!D.isHeader(T,K);K++);if(K!==b){var W,z;if(K<H-1?(W="AAC PES did not start with ADTS header,offset:"+K,z=!1):(W="no ADTS header found in AAC PES",z=!0),a.logger.warn("parsing error:"+W),this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.FRAG_PARSING_ERROR,fatal:z,reason:W}),z)return}D.initTrackConfig(y,this.observer,T,K,this.audioCodec);var U;if(O.pts!==void 0)U=O.pts;else if(p){var B=D.getFrameDuration(y.samplerate);U=p.sample.pts+B}else{a.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var G=0;K<H;)if(D.isHeader(T,K)){if(K+5<H){var q=D.appendFrame(y,T,K,U,G);if(q)if(q.missing)this.aacOverFlow=q;else{K+=q.length,G++;continue}}break}else K++},s.parseMPEGPES=function(O){var b=O.data,y=b.length,p=0,T=0,M=O.pts;if(M===void 0){a.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;T<y;)if(u.isHeader(b,T)){var N=u.appendFrame(this._audioTrack,b,T,M,p);if(N)T+=N.length,p++;else break}else T++},s.parseID3PES=function(O){if(O.pts===void 0){a.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},E}();c.minProbeByteLength=188;function g(E,s,P,O){return{key:E,frame:!1,pts:s,dts:P,units:[],debug:O,length:0}}function v(E,s){return(E[s+10]&31)<<8|E[s+11]}function x(E,s,P,O){var b={audio:-1,avc:-1,id3:-1,isAAC:!0},y=(E[s+1]&15)<<8|E[s+2],p=s+3+y-4,T=(E[s+10]&15)<<8|E[s+11];for(s+=12+T;s<p;){var M=(E[s+1]&31)<<8|E[s+2];switch(E[s]){case 207:if(!O){a.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:b.audio===-1&&(b.audio=M);break;case 21:b.id3===-1&&(b.id3=M);break;case 219:if(!O){a.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:b.avc===-1&&(b.avc=M);break;case 3:case 4:P?b.audio===-1&&(b.audio=M,b.isAAC=!1):a.logger.log("MPEG audio found, not supported in this browser");break;case 36:a.logger.warn("Unsupported HEVC stream type found");break;default:break}s+=((E[s+3]&15)<<8|E[s+4])+5}return b}function n(E){var s=0,P,O,b,y,p,T=E.data;if(!E||E.size===0)return null;for(;T[0].length<19&&T.length>1;){var M=new Uint8Array(T[0].length+T[1].length);M.set(T[0]),M.set(T[1],T[0].length),T[0]=M,T.splice(1,1)}P=T[0];var N=(P[0]<<16)+(P[1]<<8)+P[2];if(N===1){if(O=(P[4]<<8)+P[5],O&&O>E.size-6)return null;var I=P[7];I&192&&(y=(P[9]&14)*536870912+(P[10]&255)*4194304+(P[11]&254)*16384+(P[12]&255)*128+(P[13]&254)/2,I&64?(p=(P[14]&14)*536870912+(P[15]&255)*4194304+(P[16]&254)*16384+(P[17]&255)*128+(P[18]&254)/2,y-p>60*9e4&&(a.logger.warn(Math.round((y-p)/9e4)+"s delta between PTS and DTS, align them"),y=p)):p=y),b=P[8];var K=b+9;if(E.size<=K)return null;E.size-=K;for(var H=new Uint8Array(E.size),W=0,z=T.length;W<z;W++){P=T[W];var U=P.byteLength;if(K)if(K>U){K-=U;continue}else P=P.subarray(K),U-=K,K=0;H.set(P,s),s+=U}return O&&(O-=b+3),{data:H,pts:y,dts:p,len:O}}return null}function i(E,s){if(E.units.length&&E.frame){if(E.pts===void 0){var P=s.samples,O=P.length;if(O){var b=P[O-1];E.pts=b.pts,E.dts=b.dts}else{s.dropped++;return}}s.samples.push(E)}E.debug.length&&a.logger.log(E.pts+"/"+E.dts+":"+E.debug)}function t(E,s){var P=E.length;if(P>0){if(s.pts>=E[P-1].pts)E.push(s);else for(var O=P-1;O>=0;O--)if(s.pts<E[O].pts){E.splice(O,0,s);break}}else E.push(s)}function S(E){for(var s=E.byteLength,P=[],O=1;O<s-2;)E[O]===0&&E[O+1]===0&&E[O+2]===3?(P.push(O+2),O+=2):O++;if(P.length===0)return E;var b=s-P.length,y=new Uint8Array(b),p=0;for(O=0;O<b;p++,O++)p===P[0]&&(p++,P.shift()),y[O]=E[p];return y}h.default=c},"./src/errors.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"ErrorTypes",function(){return D}),C.d(h,"ErrorDetails",function(){return u});var D;(function(f){f.NETWORK_ERROR="networkError",f.MEDIA_ERROR="mediaError",f.KEY_SYSTEM_ERROR="keySystemError",f.MUX_ERROR="muxError",f.OTHER_ERROR="otherError"})(D||(D={}));var u;(function(f){f.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",f.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",f.KEY_SYSTEM_NO_SESSION="keySystemNoSession",f.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",f.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",f.MANIFEST_LOAD_ERROR="manifestLoadError",f.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",f.MANIFEST_PARSING_ERROR="manifestParsingError",f.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",f.LEVEL_EMPTY_ERROR="levelEmptyError",f.LEVEL_LOAD_ERROR="levelLoadError",f.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",f.LEVEL_SWITCH_ERROR="levelSwitchError",f.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",f.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",f.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",f.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",f.FRAG_LOAD_ERROR="fragLoadError",f.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",f.FRAG_DECRYPT_ERROR="fragDecryptError",f.FRAG_PARSING_ERROR="fragParsingError",f.REMUX_ALLOC_ERROR="remuxAllocError",f.KEY_LOAD_ERROR="keyLoadError",f.KEY_LOAD_TIMEOUT="keyLoadTimeOut",f.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",f.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",f.BUFFER_APPEND_ERROR="bufferAppendError",f.BUFFER_APPENDING_ERROR="bufferAppendingError",f.BUFFER_STALLED_ERROR="bufferStalledError",f.BUFFER_FULL_ERROR="bufferFullError",f.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",f.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",f.INTERNAL_EXCEPTION="internalException",f.INTERNAL_ABORTED="aborted",f.UNKNOWN="unknown"})(u||(u={}))},"./src/events.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"Events",function(){return D});var D;(function(u){u.MEDIA_ATTACHING="hlsMediaAttaching",u.MEDIA_ATTACHED="hlsMediaAttached",u.MEDIA_DETACHING="hlsMediaDetaching",u.MEDIA_DETACHED="hlsMediaDetached",u.BUFFER_RESET="hlsBufferReset",u.BUFFER_CODECS="hlsBufferCodecs",u.BUFFER_CREATED="hlsBufferCreated",u.BUFFER_APPENDING="hlsBufferAppending",u.BUFFER_APPENDED="hlsBufferAppended",u.BUFFER_EOS="hlsBufferEos",u.BUFFER_FLUSHING="hlsBufferFlushing",u.BUFFER_FLUSHED="hlsBufferFlushed",u.MANIFEST_LOADING="hlsManifestLoading",u.MANIFEST_LOADED="hlsManifestLoaded",u.MANIFEST_PARSED="hlsManifestParsed",u.LEVEL_SWITCHING="hlsLevelSwitching",u.LEVEL_SWITCHED="hlsLevelSwitched",u.LEVEL_LOADING="hlsLevelLoading",u.LEVEL_LOADED="hlsLevelLoaded",u.LEVEL_UPDATED="hlsLevelUpdated",u.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",u.LEVELS_UPDATED="hlsLevelsUpdated",u.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",u.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",u.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",u.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",u.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",u.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",u.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",u.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",u.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",u.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",u.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",u.CUES_PARSED="hlsCuesParsed",u.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",u.INIT_PTS_FOUND="hlsInitPtsFound",u.FRAG_LOADING="hlsFragLoading",u.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",u.FRAG_LOADED="hlsFragLoaded",u.FRAG_DECRYPTED="hlsFragDecrypted",u.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",u.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",u.FRAG_PARSING_METADATA="hlsFragParsingMetadata",u.FRAG_PARSED="hlsFragParsed",u.FRAG_BUFFERED="hlsFragBuffered",u.FRAG_CHANGED="hlsFragChanged",u.FPS_DROP="hlsFpsDrop",u.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",u.ERROR="hlsError",u.DESTROYING="hlsDestroying",u.KEY_LOADING="hlsKeyLoading",u.KEY_LOADED="hlsKeyLoaded",u.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",u.BACK_BUFFER_REACHED="hlsBackBufferReached"})(D||(D={}))},"./src/hls.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return E});var D=C("./node_modules/url-toolkit/src/url-toolkit.js"),u=C.n(D),f=C("./src/loader/playlist-loader.ts"),w=C("./src/loader/key-loader.ts"),d=C("./src/controller/id3-track-controller.ts"),o=C("./src/controller/latency-controller.ts"),l=C("./src/controller/level-controller.ts"),a=C("./src/controller/fragment-tracker.ts"),_=C("./src/controller/stream-controller.ts"),m=C("./src/is-supported.ts"),c=C("./src/utils/logger.ts"),g=C("./src/config.ts"),v=C("./node_modules/eventemitter3/index.js"),x=C.n(v),n=C("./src/events.ts"),i=C("./src/errors.ts");function t(s,P){for(var O=0;O<P.length;O++){var b=P[O];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(s,b.key,b)}}function S(s,P,O){return P&&t(s.prototype,P),O&&t(s,O),s}var E=function(){s.isSupported=function(){return Object(m.isSupported)()};function s(O){O===void 0&&(O={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new v.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 b=this.config=Object(g.mergeConfig)(s.DefaultConfig,O);this.userConfig=O,Object(c.enableLogs)(b.debug),this._autoLevelCapping=-1,b.progressive&&Object(g.enableStreamingMode)(b);var y=b.abrController,p=b.bufferController,T=b.capLevelController,M=b.fpsController,N=this.abrController=new y(this),I=this.bufferController=new p(this),K=this.capLevelController=new T(this),H=new M(this),W=new f.default(this),z=new w.default(this),U=new d.default(this),B=this.levelController=new l.default(this),G=new a.FragmentTracker(this),q=this.streamController=new _.default(this,G);K.setStreamController(q),H.setStreamController(q);var ae=[B,q];this.networkControllers=ae;var se=[W,z,N,I,K,H,U,G];this.audioTrackController=this.createController(b.audioTrackController,null,ae),this.createController(b.audioStreamController,G,ae),this.subtitleTrackController=this.createController(b.subtitleTrackController,null,ae),this.createController(b.subtitleStreamController,G,ae),this.createController(b.timelineController,null,se),this.emeController=this.createController(b.emeController,null,se),this.cmcdController=this.createController(b.cmcdController,null,se),this.latencyController=this.createController(o.default,null,se),this.coreComponents=se}var P=s.prototype;return P.createController=function(b,y,p){if(b){var T=y?new b(this,y):new b(this);return p&&p.push(T),T}return null},P.on=function(b,y,p){p===void 0&&(p=this),this._emitter.on(b,y,p)},P.once=function(b,y,p){p===void 0&&(p=this),this._emitter.once(b,y,p)},P.removeAllListeners=function(b){this._emitter.removeAllListeners(b)},P.off=function(b,y,p,T){p===void 0&&(p=this),this._emitter.off(b,y,p,T)},P.listeners=function(b){return this._emitter.listeners(b)},P.emit=function(b,y,p){return this._emitter.emit(b,y,p)},P.trigger=function(b,y){if(this.config.debug)return this.emit(b,b,y);try{return this.emit(b,b,y)}catch(p){c.logger.error("An internal error happened while handling event "+b+'. Error message: "'+p.message+'". Here is a stacktrace:',p),this.trigger(n.Events.ERROR,{type:i.ErrorTypes.OTHER_ERROR,details:i.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:b,error:p})}return!1},P.listenerCount=function(b){return this._emitter.listenerCount(b)},P.destroy=function(){c.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(b){return b.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(b){return b.destroy()}),this.coreComponents.length=0},P.attachMedia=function(b){c.logger.log("attachMedia"),this._media=b,this.trigger(n.Events.MEDIA_ATTACHING,{media:b})},P.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},P.loadSource=function(b){this.stopLoad();var y=this.media,p=this.url,T=this.url=D.buildAbsoluteURL(self.location.href,b,{alwaysNormalize:!0});c.logger.log("loadSource:"+T),y&&p&&p!==T&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(y)),this.trigger(n.Events.MANIFEST_LOADING,{url:b})},P.startLoad=function(b){b===void 0&&(b=-1),c.logger.log("startLoad("+b+")"),this.networkControllers.forEach(function(y){y.startLoad(b)})},P.stopLoad=function(){c.logger.log("stopLoad"),this.networkControllers.forEach(function(b){b.stopLoad()})},P.swapAudioCodec=function(){c.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},P.recoverMediaError=function(){c.logger.log("recoverMediaError");var b=this._media;this.detachMedia(),b&&this.attachMedia(b)},P.removeLevel=function(b,y){y===void 0&&(y=0),this.levelController.removeLevel(b,y)},S(s,[{key:"levels",get:function(){var b=this.levelController.levels;return b||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(b){c.logger.log("set currentLevel:"+b),this.loadLevel=b,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(b){c.logger.log("set nextLevel:"+b),this.levelController.manualLevel=b,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(b){c.logger.log("set loadLevel:"+b),this.levelController.manualLevel=b}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(b){this.levelController.nextLoadLevel=b}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(b){c.logger.log("set firstLevel:"+b),this.levelController.firstLevel=b}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(b){c.logger.log("set startLevel:"+b),b!==-1&&(b=Math.max(b,this.minAutoLevel)),this.levelController.startLevel=b}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(b){var y=!!b;y!==this.config.capLevelToPlayerSize&&(y?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=y)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(b){this._autoLevelCapping!==b&&(c.logger.log("set autoLevelCapping:"+b),this._autoLevelCapping=b)}},{key:"bandwidthEstimate",get:function(){var b=this.abrController.bwEstimator;return b?b.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var b=this.levels,y=this.config.minAutoBitrate;if(!b)return 0;for(var p=b.length,T=0;T<p;T++)if(b[T].maxBitrate>y)return T;return 0}},{key:"maxAutoLevel",get:function(){var b=this.levels,y=this.autoLevelCapping,p;return y===-1&&b&&b.length?p=b.length-1:p=y,p}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(b){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,b)}},{key:"audioTracks",get:function(){var b=this.audioTrackController;return b?b.audioTracks:[]}},{key:"audioTrack",get:function(){var b=this.audioTrackController;return b?b.audioTrack:-1},set:function(b){var y=this.audioTrackController;y&&(y.audioTrack=b)}},{key:"subtitleTracks",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTrack:-1},set:function(b){var y=this.subtitleTrackController;y&&(y.subtitleTrack=b)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var b=this.subtitleTrackController;return b?b.subtitleDisplay:!1},set:function(b){var y=this.subtitleTrackController;y&&(y.subtitleDisplay=b)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(b){this.config.lowLatencyMode=b}},{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 i.ErrorTypes}},{key:"ErrorDetails",get:function(){return i.ErrorDetails}},{key:"DefaultConfig",get:function(){return s.defaultConfig?s.defaultConfig:g.hlsDefaultConfig},set:function(b){s.defaultConfig=b}}]),s}();E.defaultConfig=void 0},"./src/is-supported.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"isSupported",function(){return f}),C.d(h,"changeTypeSupported",function(){return w});var D=C("./src/utils/mediasource-helper.ts");function u(){return self.SourceBuffer||self.WebKitSourceBuffer}function f(){var d=Object(D.getMediaSource)();if(!d)return!1;var o=u(),l=d&&typeof d.isTypeSupported=="function"&&d.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),a=!o||o.prototype&&typeof o.prototype.appendBuffer=="function"&&typeof o.prototype.remove=="function";return!!l&&!!a}function w(){var d,o=u();return typeof(o==null||((d=o.prototype)===null||d===void 0)?void 0:d.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return c}),C.d(h,"LoadError",function(){return v});var D=C("./src/polyfills/number.ts"),u=C("./src/errors.ts");function f(x,n){x.prototype=Object.create(n.prototype),x.prototype.constructor=x,a(x,n)}function w(x){var n=typeof Map=="function"?new Map:void 0;return w=function(t){if(t===null||!l(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(t))return n.get(t);n.set(t,S)}function S(){return d(t,arguments,_(this).constructor)}return S.prototype=Object.create(t.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),a(S,t)},w(x)}function d(x,n,i){return o()?d=Reflect.construct:d=function(S,E,s){var P=[null];P.push.apply(P,E);var O=Function.bind.apply(S,P),b=new O;return s&&a(b,s.prototype),b},d.apply(null,arguments)}function o(){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(x){return!1}}function l(x){return Function.toString.call(x).indexOf("[native code]")!==-1}function a(x,n){return a=Object.setPrototypeOf||function(t,S){return t.__proto__=S,t},a(x,n)}function _(x){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},_(x)}var m=Math.pow(2,17),c=function(){function x(i){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=i}var n=x.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(t,S){var E=this,s=t.url;if(!s)return Promise.reject(new v({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(s?"part list":"url")));this.abort();var P=this.config,O=P.fLoader,b=P.loader;return new Promise(function(y,p){E.loader&&E.loader.destroy();var T=E.loader=t.loader=O?new O(P):new b(P),M=g(t),N={timeout:P.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:P.fragLoadingMaxRetryTimeout,highWaterMark:m};t.stats=T.stats,T.load(M,N,{onSuccess:function(K,H,W,z){E.resetLoader(t,T),y({frag:t,part:null,payload:K.data,networkDetails:z})},onError:function(K,H,W){E.resetLoader(t,T),p(new v({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:K,networkDetails:W}))},onAbort:function(K,H,W){E.resetLoader(t,T),p(new v({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:W}))},onTimeout:function(K,H,W){E.resetLoader(t,T),p(new v({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:W}))},onProgress:function(K,H,W,z){S&&S({frag:t,part:null,payload:W,networkDetails:z})}})})},n.loadPart=function(t,S,E){var s=this;this.abort();var P=this.config,O=P.fLoader,b=P.loader;return new Promise(function(y,p){s.loader&&s.loader.destroy();var T=s.loader=t.loader=O?new O(P):new b(P),M=g(t,S),N={timeout:P.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:P.fragLoadingMaxRetryTimeout,highWaterMark:m};S.stats=T.stats,T.load(M,N,{onSuccess:function(K,H,W,z){s.resetLoader(t,T),s.updateStatsFromPart(t,S);var U={frag:t,part:S,payload:K.data,networkDetails:z};E(U),y(U)},onError:function(K,H,W){s.resetLoader(t,T),p(new v({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:S,response:K,networkDetails:W}))},onAbort:function(K,H,W){t.stats.aborted=S.stats.aborted,s.resetLoader(t,T),p(new v({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:S,networkDetails:W}))},onTimeout:function(K,H,W){s.resetLoader(t,T),p(new v({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:S,networkDetails:W}))}})})},n.updateStatsFromPart=function(t,S){var E=t.stats,s=S.stats,P=s.total;if(E.loaded+=s.loaded,P){var O=Math.round(t.duration/S.duration),b=Math.min(Math.round(E.loaded/P),O),y=O-b,p=y*Math.round(E.loaded/b);E.total=E.loaded+p}else E.total=Math.max(E.loaded,E.total);var T=E.loading,M=s.loading;T.start?T.first+=M.first-M.start:(T.start=M.start,T.first=M.first),T.end=M.end},n.resetLoader=function(t,S){t.loader=null,this.loader===S&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),S.destroy()},x}();function g(x,n){n===void 0&&(n=null);var i=n||x,t={frag:x,part:n,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},S=i.byteRangeStartOffset,E=i.byteRangeEndOffset;return Object(D.isFiniteNumber)(S)&&Object(D.isFiniteNumber)(E)&&(t.rangeStart=S,t.rangeEnd=E),t}var v=function(x){f(n,x);function n(i){for(var t,S=arguments.length,E=new Array(S>1?S-1:0),s=1;s<S;s++)E[s-1]=arguments[s];return t=x.call.apply(x,[this].concat(E))||this,t.data=void 0,t.data=i,t}return n}(w(Error))},"./src/loader/fragment.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"ElementaryStreamTypes",function(){return c}),C.d(h,"BaseSegment",function(){return g}),C.d(h,"Fragment",function(){return v}),C.d(h,"Part",function(){return x});var D=C("./src/polyfills/number.ts"),u=C("./node_modules/url-toolkit/src/url-toolkit.js"),f=C.n(u),w=C("./src/utils/logger.ts"),d=C("./src/loader/level-key.ts"),o=C("./src/loader/load-stats.ts");function l(n,i){n.prototype=Object.create(i.prototype),n.prototype.constructor=n,a(n,i)}function a(n,i){return a=Object.setPrototypeOf||function(S,E){return S.__proto__=E,S},a(n,i)}function _(n,i){for(var t=0;t<i.length;t++){var S=i[t];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(n,S.key,S)}}function m(n,i,t){return i&&_(n.prototype,i),t&&_(n,t),n}var c;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(c||(c={}));var g=function(){function n(t){var S;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(S={},S[c.AUDIO]=null,S[c.VIDEO]=null,S[c.AUDIOVIDEO]=null,S),this.baseurl=t}var i=n.prototype;return i.setByteRange=function(S,E){var s=S.split("@",2),P=[];s.length===1?P[0]=E?E.byteRangeEndOffset:0:P[0]=parseInt(s[1]),P[1]=parseInt(s[0])+P[0],this._byteRange=P},m(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(u.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(S){this._url=S}}]),n}(),v=function(n){l(i,n);function i(S,E){var s;return s=n.call(this,E)||this,s._decryptdata=null,s.rawProgramDateTime=null,s.programDateTime=null,s.tagList=[],s.duration=0,s.sn=0,s.levelkey=void 0,s.type=void 0,s.loader=null,s.level=-1,s.cc=0,s.startPTS=void 0,s.endPTS=void 0,s.appendedPTS=void 0,s.startDTS=void 0,s.endDTS=void 0,s.start=0,s.deltaPTS=void 0,s.maxStartPTS=void 0,s.minEndPTS=void 0,s.stats=new o.LoadStats,s.urlId=0,s.data=void 0,s.bitrateTest=!1,s.title=null,s.initSegment=null,s.type=S,s}var t=i.prototype;return t.createInitializationVector=function(E){for(var s=new Uint8Array(16),P=12;P<16;P++)s[P]=E>>8*(15-P)&255;return s},t.setDecryptDataFromLevelKey=function(E,s){var P=E;return(E==null?void 0:E.method)==="AES-128"&&E.uri&&!E.iv&&(P=d.LevelKey.fromURI(E.uri),P.method=E.method,P.iv=this.createInitializationVector(s),P.keyFormat="identity"),P},t.setElementaryStreamInfo=function(E,s,P,O,b,y){y===void 0&&(y=!1);var p=this.elementaryStreams,T=p[E];if(!T){p[E]={startPTS:s,endPTS:P,startDTS:O,endDTS:b,partial:y};return}T.startPTS=Math.min(T.startPTS,s),T.endPTS=Math.max(T.endPTS,P),T.startDTS=Math.min(T.startDTS,O),T.endDTS=Math.max(T.endDTS,b)},t.clearElementaryStreamInfo=function(){var E=this.elementaryStreams;E[c.AUDIO]=null,E[c.VIDEO]=null,E[c.AUDIOVIDEO]=null},m(i,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var E=this.sn;typeof E!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&w.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),E=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,E)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(D.isFiniteNumber)(this.programDateTime))return null;var E=Object(D.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+E*1e3}},{key:"encrypted",get:function(){var E;return!!((E=this.decryptdata)!==null&&E!==void 0&&E.keyFormat&&this.decryptdata.uri)}}]),i}(g),x=function(n){l(i,n);function i(t,S,E,s,P){var O;O=n.call(this,E)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new o.LoadStats,O.duration=t.decimalFloatingPoint("DURATION"),O.gap=t.bool("GAP"),O.independent=t.bool("INDEPENDENT"),O.relurl=t.enumeratedString("URI"),O.fragment=S,O.index=s;var b=t.enumeratedString("BYTERANGE");return b&&O.setByteRange(b,P),P&&(O.fragOffset=P.fragOffset+P.duration),O}return m(i,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var S=this.elementaryStreams;return!!(S.audio||S.video||S.audiovideo)}}]),i}(g)},"./src/loader/key-loader.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return w});var D=C("./src/events.ts"),u=C("./src/errors.ts"),f=C("./src/utils/logger.ts"),w=function(){function d(l){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=l,this._registerListeners()}var o=d.prototype;return o._registerListeners=function(){this.hls.on(D.Events.KEY_LOADING,this.onKeyLoading,this)},o._unregisterListeners=function(){this.hls.off(D.Events.KEY_LOADING,this.onKeyLoading)},o.destroy=function(){this._unregisterListeners();for(var a in this.loaders){var _=this.loaders[a];_&&_.destroy()}this.loaders={}},o.onKeyLoading=function(a,_){var m=_.frag,c=m.type,g=this.loaders[c];if(!m.decryptdata){f.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var v=m.decryptdata.uri;if(v!==this.decrypturl||this.decryptkey===null){var x=this.hls.config;if(g&&(f.logger.warn("abort previous key loader for type:"+c),g.abort()),!v){f.logger.warn("key uri is falsy");return}var n=x.loader,i=m.loader=this.loaders[c]=new n(x);this.decrypturl=v,this.decryptkey=null;var t={url:v,frag:m,responseType:"arraybuffer"},S={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:x.fragLoadingRetryDelay,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:0},E={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};i.load(t,S,E)}else this.decryptkey&&(m.decryptdata.key=this.decryptkey,this.hls.trigger(D.Events.KEY_LOADED,{frag:m}))},o.loadsuccess=function(a,_,m){var c=m.frag;if(!c.decryptdata){f.logger.error("after key load, decryptdata unset");return}this.decryptkey=c.decryptdata.key=new Uint8Array(a.data),c.loader=null,delete this.loaders[c.type],this.hls.trigger(D.Events.KEY_LOADED,{frag:c})},o.loaderror=function(a,_){var m=_.frag,c=m.loader;c&&c.abort(),delete this.loaders[m.type],this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:m,response:a})},o.loadtimeout=function(a,_){var m=_.frag,c=m.loader;c&&c.abort(),delete this.loaders[m.type],this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:m})},d}()},"./src/loader/level-details.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"LevelDetails",function(){return d});var D=C("./src/polyfills/number.ts");function u(o,l){for(var a=0;a<l.length;a++){var _=l[a];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(o,_.key,_)}}function f(o,l,a){return l&&u(o.prototype,l),a&&u(o,a),o}var w=10,d=function(){function o(a){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=a}var l=o.prototype;return l.reloaded=function(_){if(!_){this.advanced=!0,this.updated=!0;return}var m=this.lastPartSn-_.lastPartSn,c=this.lastPartIndex-_.lastPartIndex;this.updated=this.endSN!==_.endSN||!!c||!!m,this.advanced=this.endSN>_.endSN||m>0||m===0&&c>0,this.updated||this.advanced?this.misses=Math.floor(_.misses*.6):this.misses=_.misses+1,this.availabilityDelay=_.availabilityDelay},f(o,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(D.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||w}},{key:"drift",get:function(){var _=this.driftEndTime-this.driftStartTime;if(_>0){var m=this.driftEnd-this.driftStart;return m*1e3/_}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var _;return(_=this.partList)!==null&&_!==void 0&&_.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var _;return(_=this.fragments)!==null&&_!==void 0&&_.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 _;return(_=this.partList)!==null&&_!==void 0&&_.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var _;return(_=this.partList)!==null&&_!==void 0&&_.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),o}()},"./src/loader/level-key.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"LevelKey",function(){return d});var D=C("./node_modules/url-toolkit/src/url-toolkit.js"),u=C.n(D);function f(o,l){for(var a=0;a<l.length;a++){var _=l[a];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(o,_.key,_)}}function w(o,l,a){return l&&f(o.prototype,l),a&&f(o,a),o}var d=function(){o.fromURL=function(a,_){return new o(a,_)},o.fromURI=function(a){return new o(a)};function o(l,a){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,a?this._uri=Object(D.buildAbsoluteURL)(l,a,{alwaysNormalize:!0}):this._uri=l}return w(o,[{key:"uri",get:function(){return this._uri}}]),o}()},"./src/loader/load-stats.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"LoadStats",function(){return D});var D=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(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return i});var D=C("./src/polyfills/number.ts"),u=C("./node_modules/url-toolkit/src/url-toolkit.js"),f=C.n(u),w=C("./src/loader/fragment.ts"),d=C("./src/loader/level-details.ts"),o=C("./src/loader/level-key.ts"),l=C("./src/utils/attr-list.ts"),a=C("./src/utils/logger.ts"),_=C("./src/utils/codecs.ts"),m=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,c=/#EXT-X-MEDIA:(.*)/g,g=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),v=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("|")),x=/\.(mp4|m4s|m4v|m4a)$/i;function n(P){var O,b;return x.test((O=(b=u.parseURL(P))===null||b===void 0?void 0:b.path)!=null?O:"")}var i=function(){function P(){}return P.findGroup=function(b,y){for(var p=0;p<b.length;p++){var T=b[p];if(T.id===y)return T}},P.convertAVC1ToAVCOTI=function(b){var y=b.split(".");if(y.length>2){var p=y.shift()+".";return p+=parseInt(y.shift()).toString(16),p+=("000"+parseInt(y.shift()).toString(16)).substr(-4),p}return b},P.resolve=function(b,y){return u.buildAbsoluteURL(y,b,{alwaysNormalize:!0})},P.parseMasterPlaylist=function(b,y){var p=[],T={},M=!1;m.lastIndex=0;for(var N;(N=m.exec(b))!=null;)if(N[1]){var I=new l.AttrList(N[1]),K={attrs:I,bitrate:I.decimalInteger("AVERAGE-BANDWIDTH")||I.decimalInteger("BANDWIDTH"),name:I.NAME,url:P.resolve(N[2],y)},H=I.decimalResolution("RESOLUTION");H&&(K.width=H.width,K.height=H.height),t((I.CODECS||"").split(/[ ,]+/).filter(function(z){return z}),K),K.videoCodec&&K.videoCodec.indexOf("avc1")!==-1&&(K.videoCodec=P.convertAVC1ToAVCOTI(K.videoCodec)),p.push(K)}else if(N[3]){var W=new l.AttrList(N[3]);W["DATA-ID"]&&(M=!0,T[W["DATA-ID"]]=W)}return{levels:p,sessionData:M?T:null}},P.parseMasterPlaylistMedia=function(b,y,p,T){T===void 0&&(T=[]);var M,N=[],I=0;for(c.lastIndex=0;(M=c.exec(b))!==null;){var K=new l.AttrList(M[1]);if(K.TYPE===p){var H={attrs:K,bitrate:0,id:I++,groupId:K["GROUP-ID"],instreamId:K["INSTREAM-ID"],name:K.NAME||K.LANGUAGE||"",type:p,default:K.bool("DEFAULT"),autoselect:K.bool("AUTOSELECT"),forced:K.bool("FORCED"),lang:K.LANGUAGE,url:K.URI?P.resolve(K.URI,y):""};if(T.length){var W=P.findGroup(T,H.groupId)||T[0];S(H,W,"audioCodec"),S(H,W,"textCodec")}N.push(H)}}return N},P.parseLevelPlaylist=function(b,y,p,T,M){var N=new d.LevelDetails(y),I=N.fragments,K=null,H=0,W=0,z=0,U=0,B=null,G=new w.Fragment(T,y),q,ae,se,we=-1,Se=!1;for(g.lastIndex=0,N.m3u8=b;(q=g.exec(b))!==null;){Se&&(Se=!1,G=new w.Fragment(T,y),G.start=z,G.sn=H,G.cc=U,G.level=p,K&&(G.initSegment=K,G.rawProgramDateTime=K.rawProgramDateTime));var de=q[1];if(de){G.duration=parseFloat(de);var xe=(" "+q[2]).slice(1);G.title=xe||null,G.tagList.push(xe?["INF",de,xe]:["INF",de])}else if(q[3])Object(D.isFiniteNumber)(G.duration)&&(G.start=z,se&&(G.levelkey=se),G.sn=H,G.level=p,G.cc=U,G.urlId=M,I.push(G),G.relurl=(" "+q[3]).slice(1),s(G,B),B=G,z+=G.duration,H++,W=0,Se=!0);else if(q[4]){var he=(" "+q[4]).slice(1);B?G.setByteRange(he,B):G.setByteRange(he)}else if(q[5])G.rawProgramDateTime=(" "+q[5]).slice(1),G.tagList.push(["PROGRAM-DATE-TIME",G.rawProgramDateTime]),we===-1&&(we=I.length);else{if(q=q[0].match(v),!q){a.logger.warn("No matches on slow regex match for level playlist!");continue}for(ae=1;ae<q.length&&!(typeof q[ae]!="undefined");ae++);var ne=(" "+q[ae]).slice(1),oe=(" "+q[ae+1]).slice(1),te=q[ae+2]?(" "+q[ae+2]).slice(1):"";switch(ne){case"PLAYLIST-TYPE":N.type=oe.toUpperCase();break;case"MEDIA-SEQUENCE":H=N.startSN=parseInt(oe);break;case"SKIP":{var le=new l.AttrList(oe),Y=le.decimalInteger("SKIPPED-SEGMENTS");if(Object(D.isFiniteNumber)(Y)){N.skippedSegments=Y;for(var Z=Y;Z--;)I.unshift(null);H+=Y}var ge=le.enumeratedString("RECENTLY-REMOVED-DATERANGES");ge&&(N.recentlyRemovedDateranges=ge.split(" "));break}case"TARGETDURATION":N.targetduration=parseFloat(oe);break;case"VERSION":N.version=parseInt(oe);break;case"EXTM3U":break;case"ENDLIST":N.live=!1;break;case"#":(oe||te)&&G.tagList.push(te?[oe,te]:[oe]);break;case"DIS":U++;case"GAP":G.tagList.push([ne]);break;case"BITRATE":G.tagList.push([ne,oe]);break;case"DISCONTINUITY-SEQ":U=parseInt(oe);break;case"KEY":{var ee,$=new l.AttrList(oe),X=$.enumeratedString("METHOD"),J=$.URI,me=$.hexadecimalInteger("IV"),ue=$.enumeratedString("KEYFORMATVERSIONS"),_e=$.enumeratedString("KEYID"),He=(ee=$.enumeratedString("KEYFORMAT"))!=null?ee:"identity",$e=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if($e.indexOf(He)>-1){a.logger.warn("Keyformat "+He+" is not supported from the manifest");continue}else if(He!=="identity")continue;X&&(se=o.LevelKey.fromURL(y,J),J&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(se.method=X,se.keyFormat=He,_e&&(se.keyID=_e),ue&&(se.keyFormatVersions=ue),se.iv=me));break}case"START":{var Ye=new l.AttrList(oe),tt=Ye.decimalFloatingPoint("TIME-OFFSET");Object(D.isFiniteNumber)(tt)&&(N.startTimeOffset=tt);break}case"MAP":{var nt=new l.AttrList(oe);G.relurl=nt.URI,nt.BYTERANGE&&G.setByteRange(nt.BYTERANGE),G.level=p,G.sn="initSegment",se&&(G.levelkey=se),G.initSegment=null,K=G,Se=!0;break}case"SERVER-CONTROL":{var it=new l.AttrList(oe);N.canBlockReload=it.bool("CAN-BLOCK-RELOAD"),N.canSkipUntil=it.optionalFloat("CAN-SKIP-UNTIL",0),N.canSkipDateRanges=N.canSkipUntil>0&&it.bool("CAN-SKIP-DATERANGES"),N.partHoldBack=it.optionalFloat("PART-HOLD-BACK",0),N.holdBack=it.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Me=new l.AttrList(oe);N.partTarget=Me.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ce=N.partList;Ce||(Ce=N.partList=[]);var Je=W>0?Ce[Ce.length-1]:void 0,rt=W++,ze=new w.Part(new l.AttrList(oe),G,y,rt,Je);Ce.push(ze),G.duration+=ze.duration;break}case"PRELOAD-HINT":{var et=new l.AttrList(oe);N.preloadHint=et;break}case"RENDITION-REPORT":{var ke=new l.AttrList(oe);N.renditionReports=N.renditionReports||[],N.renditionReports.push(ke);break}default:a.logger.warn("line parsed but not handled: "+q);break}}}B&&!B.relurl?(I.pop(),z-=B.duration,N.partList&&(N.fragmentHint=B)):N.partList&&(s(G,B),G.cc=U,N.fragmentHint=G);var Re=I.length,Te=I[0],fe=I[Re-1];if(z+=N.skippedSegments*N.targetduration,z>0&&Re&&fe){N.averagetargetduration=z/Re;var ye=fe.sn;N.endSN=ye!=="initSegment"?ye:0,Te&&(N.startCC=Te.cc,Te.initSegment||N.fragments.every(function(Ee){return Ee.relurl&&n(Ee.relurl)})&&(a.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),G=new w.Fragment(T,y),G.relurl=fe.relurl,G.level=p,G.sn="initSegment",Te.initSegment=G,N.needSidxRanges=!0))}else N.endSN=0,N.startCC=0;return N.fragmentHint&&(z+=N.fragmentHint.duration),N.totalduration=z,N.endCC=U,we>0&&E(I,we),N},P}();function t(P,O){["video","audio","text"].forEach(function(b){var y=P.filter(function(T){return Object(_.isCodecType)(T,b)});if(y.length){var p=y.filter(function(T){return T.lastIndexOf("avc1",0)===0||T.lastIndexOf("mp4a",0)===0});O[b+"Codec"]=p.length>0?p[0]:y[0],P=P.filter(function(T){return y.indexOf(T)===-1})}}),O.unknownCodecs=P}function S(P,O,b){var y=O[b];y&&(P[b]=y)}function E(P,O){for(var b=P[O],y=O;y--;){var p=P[y];if(!p)return;p.programDateTime=b.programDateTime-p.duration*1e3,b=p}}function s(P,O){P.rawProgramDateTime?P.programDateTime=Date.parse(P.rawProgramDateTime):O!=null&&O.programDateTime&&(P.programDateTime=O.endProgramDateTime),Object(D.isFiniteNumber)(P.programDateTime)||(P.programDateTime=null,P.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/polyfills/number.ts"),u=C("./src/events.ts"),f=C("./src/errors.ts"),w=C("./src/utils/logger.ts"),d=C("./src/utils/mp4-tools.ts"),o=C("./src/loader/m3u8-parser.ts"),l=C("./src/types/loader.ts"),a=C("./src/utils/attr-list.ts");function _(g){var v=g.type;switch(v){case l.PlaylistContextType.AUDIO_TRACK:return l.PlaylistLevelType.AUDIO;case l.PlaylistContextType.SUBTITLE_TRACK:return l.PlaylistLevelType.SUBTITLE;default:return l.PlaylistLevelType.MAIN}}function m(g,v){var x=g.url;return(x===void 0||x.indexOf("data:")===0)&&(x=v.url),x}var c=function(){function g(x){this.hls=void 0,this.loaders=Object.create(null),this.hls=x,this.registerListeners()}var v=g.prototype;return v.registerListeners=function(){var n=this.hls;n.on(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(u.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(u.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(u.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},v.unregisterListeners=function(){var n=this.hls;n.off(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(u.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(u.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(u.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},v.createInternalLoader=function(n){var i=this.hls.config,t=i.pLoader,S=i.loader,E=t||S,s=new E(i);return n.loader=s,this.loaders[n.type]=s,s},v.getInternalLoader=function(n){return this.loaders[n.type]},v.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},v.destroyInternalLoaders=function(){for(var n in this.loaders){var i=this.loaders[n];i&&i.destroy(),this.resetInternalLoader(n)}},v.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},v.onManifestLoading=function(n,i){var t=i.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:l.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},v.onLevelLoading=function(n,i){var t=i.id,S=i.level,E=i.url,s=i.deliveryDirectives;this.load({id:t,groupId:null,level:S,responseType:"text",type:l.PlaylistContextType.LEVEL,url:E,deliveryDirectives:s})},v.onAudioTrackLoading=function(n,i){var t=i.id,S=i.groupId,E=i.url,s=i.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:l.PlaylistContextType.AUDIO_TRACK,url:E,deliveryDirectives:s})},v.onSubtitleTrackLoading=function(n,i){var t=i.id,S=i.groupId,E=i.url,s=i.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:l.PlaylistContextType.SUBTITLE_TRACK,url:E,deliveryDirectives:s})},v.load=function(n){var i,t=this.hls.config,S=this.getInternalLoader(n);if(S){var E=S.context;if(E&&E.url===n.url){w.logger.trace("[playlist-loader]: playlist request ongoing");return}w.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),S.abort()}var s,P,O,b;switch(n.type){case l.PlaylistContextType.MANIFEST:s=t.manifestLoadingMaxRetry,P=t.manifestLoadingTimeOut,O=t.manifestLoadingRetryDelay,b=t.manifestLoadingMaxRetryTimeout;break;case l.PlaylistContextType.LEVEL:case l.PlaylistContextType.AUDIO_TRACK:case l.PlaylistContextType.SUBTITLE_TRACK:s=0,P=t.levelLoadingTimeOut;break;default:s=t.levelLoadingMaxRetry,P=t.levelLoadingTimeOut,O=t.levelLoadingRetryDelay,b=t.levelLoadingMaxRetryTimeout;break}if(S=this.createInternalLoader(n),(i=n.deliveryDirectives)!==null&&i!==void 0&&i.part){var y;if(n.type===l.PlaylistContextType.LEVEL&&n.level!==null?y=this.hls.levels[n.level].details:n.type===l.PlaylistContextType.AUDIO_TRACK&&n.id!==null?y=this.hls.audioTracks[n.id].details:n.type===l.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(y=this.hls.subtitleTracks[n.id].details),y){var p=y.partTarget,T=y.targetduration;p&&T&&(P=Math.min(Math.max(p*3,T*.8)*1e3,P))}}var M={timeout:P,maxRetry:s,retryDelay:O,maxRetryDelay:b,highWaterMark:0},N={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};S.load(n,M,N)},v.loadsuccess=function(n,i,t,S){if(S===void 0&&(S=null),t.isSidxRequest){this.handleSidxRequest(n,t),this.handlePlaylistLoaded(n,i,t,S);return}this.resetInternalLoader(t.type);var E=n.data;if(E.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,t,"no EXTM3U delimiter",S);return}i.parsing.start=performance.now(),E.indexOf("#EXTINF:")>0||E.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,i,t,S):this.handleMasterPlaylist(n,i,t,S)},v.loaderror=function(n,i,t){t===void 0&&(t=null),this.handleNetworkError(i,t,!1,n)},v.loadtimeout=function(n,i,t){t===void 0&&(t=null),this.handleNetworkError(i,t,!0)},v.handleMasterPlaylist=function(n,i,t,S){var E=this.hls,s=n.data,P=m(n,t),O=o.default.parseMasterPlaylist(s,P),b=O.levels,y=O.sessionData;if(!b.length){this.handleManifestParsingError(n,t,"no level found in manifest",S);return}var p=b.map(function(H){return{id:H.attrs.AUDIO,audioCodec:H.audioCodec}}),T=b.map(function(H){return{id:H.attrs.SUBTITLES,textCodec:H.textCodec}}),M=o.default.parseMasterPlaylistMedia(s,P,"AUDIO",p),N=o.default.parseMasterPlaylistMedia(s,P,"SUBTITLES",T),I=o.default.parseMasterPlaylistMedia(s,P,"CLOSED-CAPTIONS");if(M.length){var K=M.some(function(H){return!H.url});!K&&b[0].audioCodec&&!b[0].attrs.AUDIO&&(w.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),M.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new a.AttrList({}),bitrate:0,url:""}))}E.trigger(u.Events.MANIFEST_LOADED,{levels:b,audioTracks:M,subtitles:N,captions:I,url:P,stats:i,networkDetails:S,sessionData:y})},v.handleTrackOrLevelPlaylist=function(n,i,t,S){var E=this.hls,s=t.id,P=t.level,O=t.type,b=m(n,t),y=Object(D.isFiniteNumber)(s)?s:0,p=Object(D.isFiniteNumber)(P)?P:y,T=_(t),M=o.default.parseLevelPlaylist(n.data,b,p,T,y);if(!M.fragments.length){E.trigger(u.Events.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:b,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(O===l.PlaylistContextType.MANIFEST){var N={attrs:new a.AttrList({}),bitrate:0,details:M,name:"",url:b};E.trigger(u.Events.MANIFEST_LOADED,{levels:[N],audioTracks:[],url:b,stats:i,networkDetails:S,sessionData:null})}if(i.parsing.end=performance.now(),M.needSidxRanges){var I,K=(I=M.fragments[0].initSegment)===null||I===void 0?void 0:I.url;this.load({url:K,isSidxRequest:!0,type:O,level:P,levelDetails:M,id:s,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=M,this.handlePlaylistLoaded(n,i,t,S)},v.handleSidxRequest=function(n,i){var t=Object(d.parseSegmentIndex)(new Uint8Array(n.data));if(!t)return;var S=t.references,E=i.levelDetails;S.forEach(function(s,P){var O=s.info,b=E.fragments[P];b.byteRange.length===0&&b.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),b.initSegment&&b.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},v.handleManifestParsingError=function(n,i,t,S){this.hls.trigger(u.Events.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:i.type===l.PlaylistContextType.MANIFEST,url:n.url,reason:t,response:n,context:i,networkDetails:S})},v.handleNetworkError=function(n,i,t,S){t===void 0&&(t=!1),w.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var E=f.ErrorDetails.UNKNOWN,s=!1,P=this.getInternalLoader(n);switch(n.type){case l.PlaylistContextType.MANIFEST:E=t?f.ErrorDetails.MANIFEST_LOAD_TIMEOUT:f.ErrorDetails.MANIFEST_LOAD_ERROR,s=!0;break;case l.PlaylistContextType.LEVEL:E=t?f.ErrorDetails.LEVEL_LOAD_TIMEOUT:f.ErrorDetails.LEVEL_LOAD_ERROR,s=!1;break;case l.PlaylistContextType.AUDIO_TRACK:E=t?f.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:f.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,s=!1;break;case l.PlaylistContextType.SUBTITLE_TRACK:E=t?f.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:f.ErrorDetails.SUBTITLE_LOAD_ERROR,s=!1;break}P&&this.resetInternalLoader(n.type);var O={type:f.ErrorTypes.NETWORK_ERROR,details:E,fatal:s,url:n.url,loader:P,context:n,networkDetails:i};S&&(O.response=S),this.hls.trigger(u.Events.ERROR,O)},v.handlePlaylistLoaded=function(n,i,t,S){var E=t.type,s=t.level,P=t.id,O=t.groupId,b=t.loader,y=t.levelDetails,p=t.deliveryDirectives;if(!(y!=null&&y.targetduration)){this.handleManifestParsingError(n,t,"invalid target duration",S);return}if(!b)return;y.live&&(b.getCacheAge&&(y.ageHeader=b.getCacheAge()||0),(!b.getCacheAge||isNaN(y.ageHeader))&&(y.ageHeader=0));switch(E){case l.PlaylistContextType.MANIFEST:case l.PlaylistContextType.LEVEL:this.hls.trigger(u.Events.LEVEL_LOADED,{details:y,level:s||0,id:P||0,stats:i,networkDetails:S,deliveryDirectives:p});break;case l.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(u.Events.AUDIO_TRACK_LOADED,{details:y,id:P||0,groupId:O||"",stats:i,networkDetails:S,deliveryDirectives:p});break;case l.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(u.Events.SUBTITLE_TRACK_LOADED,{details:y,id:P||0,groupId:O||"",stats:i,networkDetails:S,deliveryDirectives:p});break}},g}();h.default=c},"./src/polyfills/number.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"isFiniteNumber",function(){return D}),C.d(h,"MAX_SAFE_INTEGER",function(){return u});var D=Number.isFinite||function(f){return typeof f=="number"&&isFinite(f)},u=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(L,h,C){"use strict";C.r(h);var D=function(){function u(){}return u.getSilentFrame=function(w,d){switch(w){case"mp4a.40.2":if(d===1)return new Uint8Array([0,200,0,128,35,128]);if(d===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(d===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(d===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(d===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(d===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(d===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(d===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(d===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},u}();h.default=D},"./src/remux/mp4-generator.ts":function(L,h,C){"use strict";C.r(h);var D=Math.pow(2,32)-1,u=function(){function f(){}return f.init=function(){f.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 d;for(d in f.types)f.types.hasOwnProperty(d)&&(f.types[d]=[d.charCodeAt(0),d.charCodeAt(1),d.charCodeAt(2),d.charCodeAt(3)]);var o=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]),l=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]);f.HDLR_TYPES={video:o,audio:l};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),_=new Uint8Array([0,0,0,0,0,0,0,0]);f.STTS=f.STSC=f.STCO=_,f.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),f.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),f.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),f.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var m=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),g=new Uint8Array([0,0,0,1]);f.FTYP=f.box(f.types.ftyp,m,g,m,c),f.DINF=f.box(f.types.dinf,f.box(f.types.dref,a))},f.box=function(d){for(var o=8,l=arguments.length,a=new Array(l>1?l-1:0),_=1;_<l;_++)a[_-1]=arguments[_];for(var m=a.length,c=m;m--;)o+=a[m].byteLength;var g=new Uint8Array(o);for(g[0]=o>>24&255,g[1]=o>>16&255,g[2]=o>>8&255,g[3]=o&255,g.set(d,4),m=0,o=8;m<c;m++)g.set(a[m],o),o+=a[m].byteLength;return g},f.hdlr=function(d){return f.box(f.types.hdlr,f.HDLR_TYPES[d])},f.mdat=function(d){return f.box(f.types.mdat,d)},f.mdhd=function(d,o){o*=d;var l=Math.floor(o/(D+1)),a=Math.floor(o%(D+1));return f.box(f.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,d>>24&255,d>>16&255,d>>8&255,d&255,l>>24,l>>16&255,l>>8&255,l&255,a>>24,a>>16&255,a>>8&255,a&255,85,196,0,0]))},f.mdia=function(d){return f.box(f.types.mdia,f.mdhd(d.timescale,d.duration),f.hdlr(d.type),f.minf(d))},f.mfhd=function(d){return f.box(f.types.mfhd,new Uint8Array([0,0,0,0,d>>24,d>>16&255,d>>8&255,d&255]))},f.minf=function(d){return d.type==="audio"?f.box(f.types.minf,f.box(f.types.smhd,f.SMHD),f.DINF,f.stbl(d)):f.box(f.types.minf,f.box(f.types.vmhd,f.VMHD),f.DINF,f.stbl(d))},f.moof=function(d,o,l){return f.box(f.types.moof,f.mfhd(d),f.traf(l,o))},f.moov=function(d){for(var o=d.length,l=[];o--;)l[o]=f.trak(d[o]);return f.box.apply(null,[f.types.moov,f.mvhd(d[0].timescale,d[0].duration)].concat(l).concat(f.mvex(d)))},f.mvex=function(d){for(var o=d.length,l=[];o--;)l[o]=f.trex(d[o]);return f.box.apply(null,[f.types.mvex].concat(l))},f.mvhd=function(d,o){o*=d;var l=Math.floor(o/(D+1)),a=Math.floor(o%(D+1)),_=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,d>>24&255,d>>16&255,d>>8&255,d&255,l>>24,l>>16&255,l>>8&255,l&255,a>>24,a>>16&255,a>>8&255,a&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 f.box(f.types.mvhd,_)},f.sdtp=function(d){var o=d.samples||[],l=new Uint8Array(4+o.length),a,_;for(a=0;a<o.length;a++)_=o[a].flags,l[a+4]=_.dependsOn<<4|_.isDependedOn<<2|_.hasRedundancy;return f.box(f.types.sdtp,l)},f.stbl=function(d){return f.box(f.types.stbl,f.stsd(d),f.box(f.types.stts,f.STTS),f.box(f.types.stsc,f.STSC),f.box(f.types.stsz,f.STSZ),f.box(f.types.stco,f.STCO))},f.avc1=function(d){var o=[],l=[],a,_,m;for(a=0;a<d.sps.length;a++)_=d.sps[a],m=_.byteLength,o.push(m>>>8&255),o.push(m&255),o=o.concat(Array.prototype.slice.call(_));for(a=0;a<d.pps.length;a++)_=d.pps[a],m=_.byteLength,l.push(m>>>8&255),l.push(m&255),l=l.concat(Array.prototype.slice.call(_));var c=f.box(f.types.avcC,new Uint8Array([1,o[3],o[4],o[5],252|3,224|d.sps.length].concat(o).concat([d.pps.length]).concat(l))),g=d.width,v=d.height,x=d.pixelRatio[0],n=d.pixelRatio[1];return f.box(f.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,g>>8&255,g&255,v>>8&255,v&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,f.box(f.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),f.box(f.types.pasp,new Uint8Array([x>>24,x>>16&255,x>>8&255,x&255,n>>24,n>>16&255,n>>8&255,n&255])))},f.esds=function(d){var o=d.config.length;return new Uint8Array([0,0,0,0,3,23+o,0,1,0,4,15+o,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([o]).concat(d.config).concat([6,1,2]))},f.mp4a=function(d){var o=d.samplerate;return f.box(f.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,d.channelCount,0,16,0,0,0,0,o>>8&255,o&255,0,0]),f.box(f.types.esds,f.esds(d)))},f.mp3=function(d){var o=d.samplerate;return f.box(f.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,d.channelCount,0,16,0,0,0,0,o>>8&255,o&255,0,0]))},f.stsd=function(d){return d.type==="audio"?!d.isAAC&&d.codec==="mp3"?f.box(f.types.stsd,f.STSD,f.mp3(d)):f.box(f.types.stsd,f.STSD,f.mp4a(d)):f.box(f.types.stsd,f.STSD,f.avc1(d))},f.tkhd=function(d){var o=d.id,l=d.duration*d.timescale,a=d.width,_=d.height,m=Math.floor(l/(D+1)),c=Math.floor(l%(D+1));return f.box(f.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,o>>24&255,o>>16&255,o>>8&255,o&255,0,0,0,0,m>>24,m>>16&255,m>>8&255,m&255,c>>24,c>>16&255,c>>8&255,c&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,a&255,0,0,_>>8&255,_&255,0,0]))},f.traf=function(d,o){var l=f.sdtp(d),a=d.id,_=Math.floor(o/(D+1)),m=Math.floor(o%(D+1));return f.box(f.types.traf,f.box(f.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255])),f.box(f.types.tfdt,new Uint8Array([1,0,0,0,_>>24,_>>16&255,_>>8&255,_&255,m>>24,m>>16&255,m>>8&255,m&255])),f.trun(d,l.length+16+20+8+16+8+8),l)},f.trak=function(d){return d.duration=d.duration||4294967295,f.box(f.types.trak,f.tkhd(d),f.mdia(d))},f.trex=function(d){var o=d.id;return f.box(f.types.trex,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},f.trun=function(d,o){var l=d.samples||[],a=l.length,_=12+16*a,m=new Uint8Array(_),c,g,v,x,n,i;for(o+=8+_,m.set([0,0,15,1,a>>>24&255,a>>>16&255,a>>>8&255,a&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255],0),c=0;c<a;c++)g=l[c],v=g.duration,x=g.size,n=g.flags,i=g.cts,m.set([v>>>24&255,v>>>16&255,v>>>8&255,v&255,x>>>24&255,x>>>16&255,x>>>8&255,x&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,i>>>24&255,i>>>16&255,i>>>8&255,i&255],12+16*c);return f.box(f.types.trun,m)},f.initSegment=function(d){f.types||f.init();var o=f.moov(d),l=new Uint8Array(f.FTYP.byteLength+o.byteLength);return l.set(f.FTYP),l.set(o,f.FTYP.byteLength),l},f}();u.types=void 0,u.HDLR_TYPES=void 0,u.STTS=void 0,u.STSC=void 0,u.STCO=void 0,u.STSZ=void 0,u.VMHD=void 0,u.SMHD=void 0,u.STSD=void 0,u.FTYP=void 0,u.DINF=void 0,h.default=u},"./src/remux/mp4-remuxer.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return i}),C.d(h,"normalizePts",function(){return t});var D=C("./src/polyfills/number.ts"),u=C("./src/remux/aac-helper.ts"),f=C("./src/remux/mp4-generator.ts"),w=C("./src/events.ts"),d=C("./src/errors.ts"),o=C("./src/utils/logger.ts"),l=C("./src/types/loader.ts"),a=C("./src/utils/timescale-conversion.ts");function _(){return _=Object.assign||function(P){for(var O=1;O<arguments.length;O++){var b=arguments[O];for(var y in b)Object.prototype.hasOwnProperty.call(b,y)&&(P[y]=b[y])}return P},_.apply(this,arguments)}var m=10*1e3,c=1024,g=1152,v=null,x=null,n=!1,i=function(){function P(b,y,p,T){if(T===void 0&&(T=""),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=b,this.config=y,this.typeSupported=p,this.ISGenerated=!1,v===null){var M=navigator.userAgent||"",N=M.match(/Chrome\/(\d+)/i);v=N?parseInt(N[1]):0}if(x===null){var I=navigator.userAgent.match(/Safari\/(\d+)/i);x=I?parseInt(I[1]):0}n=!!v&&v<75||!!x&&x<600}var O=P.prototype;return O.destroy=function(){},O.resetTimeStamp=function(y){o.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=y},O.resetNextTimestamp=function(){o.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){o.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(y){var p=!1,T=y.reduce(function(M,N){var I=N.pts-M;return I<-4294967296?(p=!0,t(M,N.pts)):I>0?M:N.pts},y[0].pts);return p&&o.logger.debug("PTS rollover detected"),T},O.remux=function(y,p,T,M,N,I,K,H){var W,z,U,B,G,q,ae=N,se=N,we=y.pid>-1,Se=p.pid>-1,de=p.samples.length,xe=y.samples.length>0,he=de>1,ne=(!we||xe)&&(!Se||he)||this.ISGenerated||K;if(ne){this.ISGenerated||(U=this.generateIS(y,p,N));var oe=this.isVideoContiguous,te=-1;if(he&&(te=S(p.samples),!oe&&this.config.forceKeyFrameOnDiscontinuity))if(q=!0,te>0){o.logger.warn("[mp4-remuxer]: Dropped "+te+" out of "+de+" video samples due to a missing keyframe");var le=this.getVideoStartPts(p.samples);p.samples=p.samples.slice(te),p.dropped+=te,se+=(p.samples[0].pts-le)/(p.timescale||9e4)}else te===-1&&(o.logger.warn("[mp4-remuxer]: No keyframe found out of "+de+" video samples"),q=!1);if(this.ISGenerated){if(xe&&he){var Y=this.getVideoStartPts(p.samples),Z=t(y.samples[0].pts,Y)-Y,ge=Z/p.inputTimeScale;ae+=Math.max(0,ge),se+=Math.max(0,-ge)}if(xe){if(y.samplerate||(o.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(y,p,N)),z=this.remuxAudio(y,ae,this.isAudioContiguous,I,Se||he||H===l.PlaylistLevelType.AUDIO?se:void 0),he){var ee=z?z.endPTS-z.startPTS:0;p.inputTimeScale||(o.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(y,p,N)),W=this.remuxVideo(p,se,oe,ee)}}else he&&(W=this.remuxVideo(p,se,oe,0));W&&(W.firstKeyFrame=te,W.independent=te!==-1)}}return this.ISGenerated&&(T.samples.length&&(G=this.remuxID3(T,N)),M.samples.length&&(B=this.remuxText(M,N))),{audio:z,video:W,initSegment:U,independent:q,text:B,id3:G}},O.generateIS=function(y,p,T){var M=y.samples,N=p.samples,I=this.typeSupported,K={},H=!Object(D.isFiniteNumber)(this._initPTS),W="audio/mp4",z,U,B;if(H&&(z=U=Infinity),y.config&&M.length&&(y.timescale=y.samplerate,y.isAAC||(I.mpeg?(W="audio/mpeg",y.codec=""):I.mp3&&(y.codec="mp3")),K.audio={id:"audio",container:W,codec:y.codec,initSegment:!y.isAAC&&I.mpeg?new Uint8Array(0):f.default.initSegment([y]),metadata:{channelCount:y.channelCount}},H&&(B=y.inputTimeScale,z=U=M[0].pts-Math.round(B*T))),p.sps&&p.pps&&N.length&&(p.timescale=p.inputTimeScale,K.video={id:"main",container:"video/mp4",codec:p.codec,initSegment:f.default.initSegment([p]),metadata:{width:p.width,height:p.height}},H)){B=p.inputTimeScale;var G=this.getVideoStartPts(N),q=Math.round(B*T);U=Math.min(U,t(N[0].dts,G)-q),z=Math.min(z,G-q)}if(Object.keys(K).length)return this.ISGenerated=!0,H&&(this._initPTS=z,this._initDTS=U),{tracks:K,initPTS:z,timescale:B}},O.remuxVideo=function(y,p,T,M){var N=y.inputTimeScale,I=y.samples,K=[],H=I.length,W=this._initPTS,z=this.nextAvcDts,U=8,B,G,q,ae=Number.POSITIVE_INFINITY,se=Number.NEGATIVE_INFINITY,we=0,Se=!1;if(!T||z===null){var de=p*N,xe=I[0].pts-t(I[0].dts,I[0].pts);z=de-xe}for(var he=0;he<H;he++){var ne=I[he];if(ne.pts=t(ne.pts-W,z),ne.dts=t(ne.dts-W,z),ne.dts>ne.pts){var oe=9e4*.2;we=Math.max(Math.min(we,ne.pts-ne.dts),-1*oe)}ne.dts<I[he>0?he-1:he].dts&&(Se=!0)}Se&&I.sort(function(lr,dr){var Tt=lr.dts-dr.dts,$r=lr.pts-dr.pts;return Tt||$r}),G=I[0].dts,q=I[I.length-1].dts;var te=Math.round((q-G)/(H-1));if(we<0){if(we<te*-2){o.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(a.toMsFromMpegTsClock)(-te,!0)+" ms");for(var le=we,Y=0;Y<H;Y++)I[Y].dts=le=Math.max(le,I[Y].pts-te),I[Y].pts=Math.max(le,I[Y].pts)}else{o.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(a.toMsFromMpegTsClock)(we,!0)+" ms to overcome this issue");for(var Z=0;Z<H;Z++)I[Z].dts=I[Z].dts+we}G=I[0].dts}if(T){var ge=G-z,ee=ge>te,$=ge<-1;if(ee||$){ee?o.logger.warn("AVC: "+Object(a.toMsFromMpegTsClock)(ge,!0)+" ms ("+ge+"dts) hole between fragments detected, filling it"):o.logger.warn("AVC: "+Object(a.toMsFromMpegTsClock)(-ge,!0)+" ms ("+ge+"dts) overlapping between fragments detected"),G=z;var X=I[0].pts-ge;I[0].dts=G,I[0].pts=X,o.logger.log("Video: First PTS/DTS adjusted: "+Object(a.toMsFromMpegTsClock)(X,!0)+"/"+Object(a.toMsFromMpegTsClock)(G,!0)+", delta: "+Object(a.toMsFromMpegTsClock)(ge,!0)+" ms")}}n&&(G=Math.max(0,G));for(var J=0,me=0,ue=0;ue<H;ue++){for(var _e=I[ue],He=_e.units,$e=He.length,Ye=0,tt=0;tt<$e;tt++)Ye+=He[tt].data.length;me+=Ye,J+=$e,_e.length=Ye,_e.dts=Math.max(_e.dts,G),_e.pts=Math.max(_e.pts,_e.dts,0),ae=Math.min(_e.pts,ae),se=Math.max(_e.pts,se)}q=I[H-1].dts;var nt=me+4*J+8,it;try{it=new Uint8Array(nt)}catch(lr){this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:d.ErrorTypes.MUX_ERROR,details:d.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:nt,reason:"fail allocating video mdat "+nt});return}var Me=new DataView(it.buffer);Me.setUint32(0,nt),it.set(f.default.types.mdat,4);for(var Ce=0;Ce<H;Ce++){for(var Je=I[Ce],rt=Je.units,ze=0,et=0,ke=rt.length;et<ke;et++){var Re=rt[et],Te=Re.data,fe=Re.data.byteLength;Me.setUint32(U,fe),U+=4,it.set(Te,U),U+=fe,ze+=4+fe}if(Ce<H-1)B=I[Ce+1].dts-Je.dts;else{var ye=this.config,Ee=Je.dts-I[Ce>0?Ce-1:Ce].dts;if(ye.stretchShortVideoTrack&&this.nextAudioPts!==null){var Oe=Math.floor(ye.maxBufferHole*N),We=(M?ae+M*N:this.nextAudioPts)-Je.pts;We>Oe?(B=We-Ee,B<0&&(B=Ee),o.logger.log("[mp4-remuxer]: It is approximately "+We/90+" ms to the next segment; using duration "+B/90+" ms for the last video frame.")):B=Ee}else B=Ee}var Ve=Math.round(Je.pts-Je.dts);K.push(new E(Je.key,B,ze,Ve))}if(K.length&&v&&v<70){var ut=K[0].flags;ut.dependsOn=2,ut.isNonSync=0}console.assert(B!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=z=q+B,this.isVideoContiguous=!0;var ft=f.default.moof(y.sequenceNumber++,G,_({},y,{samples:K})),Dt="video",Mt={data1:ft,data2:it,startPTS:ae/N,endPTS:(se+B)/N,startDTS:G/N,endDTS:z/N,type:Dt,hasAudio:!1,hasVideo:!0,nb:K.length,dropped:y.dropped};return y.samples=[],y.dropped=0,console.assert(it.length,"MDAT length must not be zero"),Mt},O.remuxAudio=function(y,p,T,M,N){var I=y.inputTimeScale,K=y.samplerate?y.samplerate:I,H=I/K,W=y.isAAC?c:g,z=W*H,U=this._initPTS,B=!y.isAAC&&this.typeSupported.mpeg,G=[],q=y.samples,ae=B?0:8,se=this.nextAudioPts||-1,we=p*I;if(this.isAudioContiguous=T=T||q.length&&se>0&&(M&&Math.abs(we-se)<9e3||Math.abs(t(q[0].pts-U,we)-se)<20*z),q.forEach(function(Te){Te.pts=t(Te.pts-U,we)}),!T||se<0){if(q=q.filter(function(Te){return Te.pts>=0}),!q.length)return;N===0?se=0:M?se=Math.max(0,we):se=q[0].pts}if(y.isAAC)for(var Se=N!==void 0,de=this.config.maxAudioFramesDrift,xe=0,he=se;xe<q.length;xe++){var ne=q[xe],oe=ne.pts,te=oe-he,le=Math.abs(1e3*te/I);if(te<=-de*z&&Se)xe===0&&(o.logger.warn("Audio frame @ "+(oe/I).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*te/I)+" ms."),this.nextAudioPts=se=he=oe);else if(te>=de*z&&le<m&&Se){var Y=Math.round(te/z);he=oe-Y*z,he<0&&(Y--,he+=z),xe===0&&(this.nextAudioPts=se=he),o.logger.warn("[mp4-remuxer]: Injecting "+Y+" audio frame @ "+(he/I).toFixed(3)+"s due to "+Math.round(1e3*te/I)+" ms gap.");for(var Z=0;Z<Y;Z++){var ge=Math.max(he,0),ee=u.default.getSilentFrame(y.manifestCodec||y.codec,y.channelCount);ee||(o.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ee=ne.unit.subarray()),q.splice(xe,0,{unit:ee,pts:ge}),he+=z,xe++}}ne.pts=he,he+=z}for(var $=null,X=null,J,me=0,ue=q.length;ue--;)me+=q[ue].unit.byteLength;for(var _e=0,He=q.length;_e<He;_e++){var $e=q[_e],Ye=$e.unit,tt=$e.pts;if(X!==null){var nt=G[_e-1];nt.duration=Math.round((tt-X)/H)}else if(T&&y.isAAC&&(tt=se),$=tt,me>0){me+=ae;try{J=new Uint8Array(me)}catch(Te){this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:d.ErrorTypes.MUX_ERROR,details:d.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:me,reason:"fail allocating audio mdat "+me});return}if(!B){var it=new DataView(J.buffer);it.setUint32(0,me),J.set(f.default.types.mdat,4)}}else return;J.set(Ye,ae);var Me=Ye.byteLength;ae+=Me,G.push(new E(!0,W,Me,0)),X=tt}var Ce=G.length;if(!Ce)return;var Je=G[G.length-1];this.nextAudioPts=se=X+H*Je.duration;var rt=B?new Uint8Array(0):f.default.moof(y.sequenceNumber++,$/H,_({},y,{samples:G}));y.samples=[];var ze=$/I,et=se/I,ke="audio",Re={data1:rt,data2:J,startPTS:ze,endPTS:et,startDTS:ze,endDTS:et,type:ke,hasAudio:!0,hasVideo:!1,nb:Ce};return this.isAudioContiguous=!0,console.assert(J.length,"MDAT length must not be zero"),Re},O.remuxEmptyAudio=function(y,p,T,M){var N=y.inputTimeScale,I=y.samplerate?y.samplerate:N,K=N/I,H=this.nextAudioPts,W=(H!==null?H:M.startDTS*N)+this._initDTS,z=M.endDTS*N+this._initDTS,U=K*c,B=Math.ceil((z-W)/U),G=u.default.getSilentFrame(y.manifestCodec||y.codec,y.channelCount);if(o.logger.warn("[mp4-remuxer]: remux empty Audio"),!G){o.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var q=[],ae=0;ae<B;ae++){var se=W+ae*U;q.push({unit:G,pts:se,dts:se})}return y.samples=q,this.remuxAudio(y,p,T,!1)},O.remuxID3=function(y,p){var T=y.samples.length;if(!T)return;for(var M=y.inputTimeScale,N=this._initPTS,I=this._initDTS,K=0;K<T;K++){var H=y.samples[K];H.pts=t(H.pts-N,p*M)/M,H.dts=t(H.dts-I,p*M)/M}var W=y.samples;return y.samples=[],{samples:W}},O.remuxText=function(y,p){var T=y.samples.length;if(!T)return;for(var M=y.inputTimeScale,N=this._initPTS,I=0;I<T;I++){var K=y.samples[I];K.pts=t(K.pts-N,p*M)/M}y.samples.sort(function(W,z){return W.pts-z.pts});var H=y.samples;return y.samples=[],{samples:H}},P}();function t(P,O){var b;if(O===null)return P;for(O<P?b=-8589934592:b=8589934592;Math.abs(P-O)>4294967296;)P+=b;return P}function S(P){for(var O=0;O<P.length;O++)if(P[O].key)return O;return-1}var E=function(O,b,y,p){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=b,this.size=y,this.cts=p,this.flags=new s(O)},s=function(O){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=O?2:1,this.isNonSync=O?0:1}},"./src/remux/passthrough-remuxer.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/polyfills/number.ts"),u=C("./src/utils/mp4-tools.ts"),f=C("./src/loader/fragment.ts"),w=C("./src/utils/logger.ts"),d=function(){function a(){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 _=a.prototype;return _.destroy=function(){},_.resetTimeStamp=function(c){this.initPTS=c,this.lastEndDTS=null},_.resetNextTimestamp=function(){this.lastEndDTS=null},_.resetInitSegment=function(c,g,v){this.audioCodec=g,this.videoCodec=v,this.generateInitSegment(c),this.emitInitSegment=!0},_.generateInitSegment=function(c){var g=this.audioCodec,v=this.videoCodec;if(!c||!c.byteLength){this.initTracks=void 0,this.initData=void 0;return}var x=this.initData=Object(u.parseInitSegment)(c);g||(g=l(x.audio,f.ElementaryStreamTypes.AUDIO)),v||(v=l(x.video,f.ElementaryStreamTypes.VIDEO));var n={};x.audio&&x.video?n.audiovideo={container:"video/mp4",codec:g+","+v,initSegment:c,id:"main"}:x.audio?n.audio={container:"audio/mp4",codec:g,initSegment:c,id:"audio"}:x.video?n.video={container:"video/mp4",codec:v,initSegment:c,id:"main"}:w.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},_.remux=function(c,g,v,x,n){var i=this.initPTS,t=this.lastEndDTS,S={audio:void 0,video:void 0,text:x,id3:v,initSegment:void 0};Object(D.isFiniteNumber)(t)||(t=this.lastEndDTS=n||0);var E=g.samples;if(!E||!E.length)return S;var s={initPTS:void 0,timescale:1},P=this.initData;if((!P||!P.length)&&(this.generateInitSegment(E),P=this.initData),!P||!P.length)return w.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),S;this.emitInitSegment&&(s.tracks=this.initTracks,this.emitInitSegment=!1),Object(D.isFiniteNumber)(i)||(this.initPTS=s.initPTS=i=o(P,E,t));var O=Object(u.getDuration)(E,P),b=t,y=O+b;Object(u.offsetStartDTS)(P,E,i),O>0?this.lastEndDTS=y:(w.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var p=!!P.audio,T=!!P.video,M="";p&&(M+="audio"),T&&(M+="video");var N={data1:E,startPTS:b,startDTS:b,endPTS:y,endDTS:y,type:M,hasAudio:p,hasVideo:T,nb:1,dropped:0};return S.audio=N.type==="audio"?N:void 0,S.video=N.type!=="audio"?N:void 0,S.text=x,S.id3=v,S.initSegment=s,S},a}(),o=function(_,m,c){return Object(u.getStartDTS)(_,m)-c};function l(a,_){var m=a==null?void 0:a.codec;return m&&m.length>4?m:m==="hvc1"?"hvc1.1.c.L120.90":m==="av01"?"av01.0.04M.08":m==="avc1"||_===f.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}h.default=d},"./src/task-loop.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return D});var D=function(){function u(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var f=u.prototype;return f.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},f.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},f.onHandlerDestroyed=function(){},f.hasInterval=function(){return!!this._tickInterval},f.hasNextTick=function(){return!!this._tickTimer},f.setInterval=function(d){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,d),!0)},f.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},f.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},f.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},f.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},f.doTick=function(){},u}()},"./src/types/cmcd.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"CMCDVersion",function(){return D}),C.d(h,"CMCDObjectType",function(){return u}),C.d(h,"CMCDStreamingFormat",function(){return f}),C.d(h,"CMCDStreamType",function(){return w});var D=1,u;(function(d){d.MANIFEST="m",d.AUDIO="a",d.VIDEO="v",d.MUXED="av",d.INIT="i",d.CAPTION="c",d.TIMED_TEXT="tt",d.KEY="k",d.OTHER="o"})(u||(u={}));var f;(function(d){d.DASH="d",d.HLS="h",d.SMOOTH="s",d.OTHER="o"})(f||(f={}));var w;(function(d){d.VOD="v",d.LIVE="l"})(w||(w={}))},"./src/types/level.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"HlsSkip",function(){return f}),C.d(h,"getSkipValue",function(){return w}),C.d(h,"HlsUrlParameters",function(){return d}),C.d(h,"Level",function(){return o});function D(l,a){for(var _=0;_<a.length;_++){var m=a[_];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(l,m.key,m)}}function u(l,a,_){return a&&D(l.prototype,a),_&&D(l,_),l}var f;(function(l){l.No="",l.Yes="YES",l.v2="v2"})(f||(f={}));function w(l,a){var _=l.canSkipUntil,m=l.canSkipDateRanges,c=l.endSN,g=a!==void 0?a-c:0;return _&&g<_?m?f.v2:f.Yes:f.No}var d=function(){function l(_,m,c){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=_,this.part=m,this.skip=c}var a=l.prototype;return a.addDirectives=function(m){var c=new self.URL(m);return this.msn!==void 0&&c.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&c.searchParams.set("_HLS_part",this.part.toString()),this.skip&&c.searchParams.set("_HLS_skip",this.skip),c.toString()},l}(),o=function(){function l(a){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=[a.url],this.attrs=a.attrs,this.bitrate=a.bitrate,a.details&&(this.details=a.details),this.id=a.id||0,this.name=a.name,this.width=a.width||0,this.height=a.height||0,this.audioCodec=a.audioCodec,this.videoCodec=a.videoCodec,this.unknownCodecs=a.unknownCodecs,this.codecSet=[a.videoCodec,a.audioCodec].filter(function(_){return _}).join(",").replace(/\.[^.,]+/g,"")}return u(l,[{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(_){var m=_%this.url.length;this._urlId!==m&&(this.details=void 0,this._urlId=m)}}]),l}()},"./src/types/loader.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"PlaylistContextType",function(){return D}),C.d(h,"PlaylistLevelType",function(){return u});var D;(function(f){f.MANIFEST="manifest",f.LEVEL="level",f.AUDIO_TRACK="audioTrack",f.SUBTITLE_TRACK="subtitleTrack"})(D||(D={}));var u;(function(f){f.MAIN="main",f.AUDIO="audio",f.SUBTITLE="subtitle"})(u||(u={}))},"./src/types/transmuxer.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"ChunkMetadata",function(){return D});var D=function(w,d,o,l,a,_){l===void 0&&(l=0),a===void 0&&(a=-1),_===void 0&&(_=!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=u(),this.buffering={audio:u(),video:u(),audiovideo:u()},this.level=w,this.sn=d,this.id=o,this.size=l,this.part=a,this.partial=_};function u(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"AttrList",function(){return f});var D=/^(\d+)x(\d+)$/,u=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,f=function(){function w(o){typeof o=="string"&&(o=w.parseAttrList(o));for(var l in o)o.hasOwnProperty(l)&&(this[l]=o[l])}var d=w.prototype;return d.decimalInteger=function(l){var a=parseInt(this[l],10);return a>Number.MAX_SAFE_INTEGER?Infinity:a},d.hexadecimalInteger=function(l){if(this[l]){var a=(this[l]||"0x").slice(2);a=(a.length&1?"0":"")+a;for(var _=new Uint8Array(a.length/2),m=0;m<a.length/2;m++)_[m]=parseInt(a.slice(m*2,m*2+2),16);return _}else return null},d.hexadecimalIntegerAsNumber=function(l){var a=parseInt(this[l],16);return a>Number.MAX_SAFE_INTEGER?Infinity:a},d.decimalFloatingPoint=function(l){return parseFloat(this[l])},d.optionalFloat=function(l,a){var _=this[l];return _?parseFloat(_):a},d.enumeratedString=function(l){return this[l]},d.bool=function(l){return this[l]==="YES"},d.decimalResolution=function(l){var a=D.exec(this[l]);return a===null?void 0:{width:parseInt(a[1],10),height:parseInt(a[2],10)}},w.parseAttrList=function(l){var a,_={},m='"';for(u.lastIndex=0;(a=u.exec(l))!==null;){var c=a[2];c.indexOf(m)===0&&c.lastIndexOf(m)===c.length-1&&(c=c.slice(1,-1)),_[a[1]]=c}return _},w}()},"./src/utils/binary-search.ts":function(L,h,C){"use strict";C.r(h);var D={search:function(f,w){for(var d=0,o=f.length-1,l=null,a=null;d<=o;){l=(d+o)/2|0,a=f[l];var _=w(a);if(_>0)d=l+1;else if(_<0)o=l-1;else return a}return null}};h.default=D},"./src/utils/buffer-helper.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"BufferHelper",function(){return f});var D=C("./src/utils/logger.ts"),u={length:0,start:function(){return 0},end:function(){return 0}},f=function(){function w(){}return w.isBuffered=function(o,l){try{if(o){for(var a=w.getBuffered(o),_=0;_<a.length;_++)if(l>=a.start(_)&&l<=a.end(_))return!0}}catch(m){}return!1},w.bufferInfo=function(o,l,a){try{if(o){var _=w.getBuffered(o),m=[],c;for(c=0;c<_.length;c++)m.push({start:_.start(c),end:_.end(c)});return this.bufferedInfo(m,l,a)}}catch(g){}return{len:0,start:l,end:l,nextStart:void 0}},w.bufferedInfo=function(o,l,a){l=Math.max(0,l),o.sort(function(s,P){var O=s.start-P.start;return O||P.end-s.end});var _=[];if(a)for(var m=0;m<o.length;m++){var c=_.length;if(c){var g=_[c-1].end;o[m].start-g<a?o[m].end>g&&(_[c-1].end=o[m].end):_.push(o[m])}else _.push(o[m])}else _=o;for(var v=0,x,n=l,i=l,t=0;t<_.length;t++){var S=_[t].start,E=_[t].end;if(l+a>=S&&l<E)n=S,i=E,v=i-l;else if(l+a<S){x=S;break}}return{len:v,start:n||0,end:i||0,nextStart:x}},w.getBuffered=function(o){try{return o.buffered}catch(l){return D.logger.log("failed to get media.buffered",l),u}},w}()},"./src/utils/cea-608-parser.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"Row",function(){return i}),C.d(h,"CaptionScreen",function(){return t});var D=C("./src/utils/logger.ts"),u={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},f=function(y){var p=y;return u.hasOwnProperty(y)&&(p=u[y]),String.fromCharCode(p)},w=15,d=100,o={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},l={17:2,18:4,21:6,22:8,23:10,19:13,20:15},a={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},_={25:2,26:4,29:6,30:8,31:10,27:13,28:15},m=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c;(function(b){b[b.ERROR=0]="ERROR",b[b.TEXT=1]="TEXT",b[b.WARNING=2]="WARNING",b[b.INFO=2]="INFO",b[b.DEBUG=3]="DEBUG",b[b.DATA=3]="DATA"})(c||(c={}));var g=function(){function b(){this.time=null,this.verboseLevel=c.ERROR}var y=b.prototype;return y.log=function(T,M){this.verboseLevel>=T&&D.logger.log(this.time+" ["+T+"] "+M)},b}(),v=function(y){for(var p=[],T=0;T<y.length;T++)p.push(y[T].toString(16));return p},x=function(){function b(p,T,M,N,I){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=p||"white",this.underline=T||!1,this.italics=M||!1,this.background=N||"black",this.flash=I||!1}var y=b.prototype;return y.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},y.setStyles=function(T){for(var M=["foreground","underline","italics","background","flash"],N=0;N<M.length;N++){var I=M[N];T.hasOwnProperty(I)&&(this[I]=T[I])}},y.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},y.equals=function(T){return this.foreground===T.foreground&&this.underline===T.underline&&this.italics===T.italics&&this.background===T.background&&this.flash===T.flash},y.copy=function(T){this.foreground=T.foreground,this.underline=T.underline,this.italics=T.italics,this.background=T.background,this.flash=T.flash},y.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},b}(),n=function(){function b(p,T,M,N,I,K){this.uchar=void 0,this.penState=void 0,this.uchar=p||" ",this.penState=new x(T,M,N,I,K)}var y=b.prototype;return y.reset=function(){this.uchar=" ",this.penState.reset()},y.setChar=function(T,M){this.uchar=T,this.penState.copy(M)},y.setPenState=function(T){this.penState.copy(T)},y.equals=function(T){return this.uchar===T.uchar&&this.penState.equals(T.penState)},y.copy=function(T){this.uchar=T.uchar,this.penState.copy(T.penState)},y.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},b}(),i=function(){function b(p){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var T=0;T<d;T++)this.chars.push(new n);this.logger=p,this.pos=0,this.currPenState=new x}var y=b.prototype;return y.equals=function(T){for(var M=!0,N=0;N<d;N++)if(!this.chars[N].equals(T.chars[N])){M=!1;break}return M},y.copy=function(T){for(var M=0;M<d;M++)this.chars[M].copy(T.chars[M])},y.isEmpty=function(){for(var T=!0,M=0;M<d;M++)if(!this.chars[M].isEmpty()){T=!1;break}return T},y.setCursor=function(T){this.pos!==T&&(this.pos=T),this.pos<0?(this.logger.log(c.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>d&&(this.logger.log(c.DEBUG,"Too large cursor position "+this.pos),this.pos=d)},y.moveCursor=function(T){var M=this.pos+T;if(T>1)for(var N=this.pos+1;N<M+1;N++)this.chars[N].setPenState(this.currPenState);this.setCursor(M)},y.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},y.insertChar=function(T){T>=144&&this.backSpace();var M=f(T);if(this.pos>=d){this.logger.log(c.ERROR,"Cannot insert "+T.toString(16)+" ("+M+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(M,this.currPenState),this.moveCursor(1)},y.clearFromPos=function(T){var M;for(M=T;M<d;M++)this.chars[M].reset()},y.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},y.clearToEndOfRow=function(){this.clearFromPos(this.pos)},y.getTextString=function(){for(var T=[],M=!0,N=0;N<d;N++){var I=this.chars[N].uchar;I!==" "&&(M=!1),T.push(I)}return M?"":T.join("")},y.setPenStyles=function(T){this.currPenState.setStyles(T);var M=this.chars[this.pos];M.setPenState(this.currPenState)},b}(),t=function(){function b(p){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var T=0;T<w;T++)this.rows.push(new i(p));this.logger=p,this.currRow=w-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var y=b.prototype;return y.reset=function(){for(var T=0;T<w;T++)this.rows[T].clear();this.currRow=w-1},y.equals=function(T){for(var M=!0,N=0;N<w;N++)if(!this.rows[N].equals(T.rows[N])){M=!1;break}return M},y.copy=function(T){for(var M=0;M<w;M++)this.rows[M].copy(T.rows[M])},y.isEmpty=function(){for(var T=!0,M=0;M<w;M++)if(!this.rows[M].isEmpty()){T=!1;break}return T},y.backSpace=function(){var T=this.rows[this.currRow];T.backSpace()},y.clearToEndOfRow=function(){var T=this.rows[this.currRow];T.clearToEndOfRow()},y.insertChar=function(T){var M=this.rows[this.currRow];M.insertChar(T)},y.setPen=function(T){var M=this.rows[this.currRow];M.setPenStyles(T)},y.moveCursor=function(T){var M=this.rows[this.currRow];M.moveCursor(T)},y.setCursor=function(T){this.logger.log(c.INFO,"setCursor: "+T);var M=this.rows[this.currRow];M.setCursor(T)},y.setPAC=function(T){this.logger.log(c.INFO,"pacData = "+JSON.stringify(T));var M=T.row-1;if(this.nrRollUpRows&&M<this.nrRollUpRows-1&&(M=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==M){for(var N=0;N<w;N++)this.rows[N].clear();var I=this.currRow+1-this.nrRollUpRows,K=this.lastOutputScreen;if(K){var H=K.rows[I].cueStartTime,W=this.logger.time;if(H&&W!==null&&H<W)for(var z=0;z<this.nrRollUpRows;z++)this.rows[M-this.nrRollUpRows+z+1].copy(K.rows[I+z])}}this.currRow=M;var U=this.rows[this.currRow];if(T.indent!==null){var B=T.indent,G=Math.max(B-1,0);U.setCursor(T.indent),T.color=U.chars[G].penState.foreground}var q={foreground:T.color,underline:T.underline,italics:T.italics,background:"black",flash:!1};this.setPen(q)},y.setBkgData=function(T){this.logger.log(c.INFO,"bkgData = "+JSON.stringify(T)),this.backSpace(),this.setPen(T),this.insertChar(32)},y.setRollUpRows=function(T){this.nrRollUpRows=T},y.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(c.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(c.TEXT,this.getDisplayText());var T=this.currRow+1-this.nrRollUpRows,M=this.rows.splice(T,1)[0];M.clear(),this.rows.splice(this.currRow,0,M),this.logger.log(c.INFO,"Rolling up")},y.getDisplayText=function(T){T=T||!1;for(var M=[],N="",I=-1,K=0;K<w;K++){var H=this.rows[K].getTextString();H&&(I=K+1,T?M.push("Row "+I+": '"+H+"'"):M.push(H.trim()))}return M.length>0&&(T?N="["+M.join(" | ")+"]":N=M.join(`
|
|
|
`)),N},y.getTextAndFormat=function(){return this.rows},b}(),S=function(){function b(p,T,M){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=p,this.outputFilter=T,this.mode=null,this.verbose=0,this.displayedMemory=new t(M),this.nonDisplayedMemory=new t(M),this.lastOutputScreen=new t(M),this.currRollUpRow=this.displayedMemory.rows[w-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=M}var y=b.prototype;return y.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[w-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},y.getHandler=function(){return this.outputFilter},y.setHandler=function(T){this.outputFilter=T},y.setPAC=function(T){this.writeScreen.setPAC(T)},y.setBkgData=function(T){this.writeScreen.setBkgData(T)},y.setMode=function(T){if(T===this.mode)return;this.mode=T,this.logger.log(c.INFO,"MODE="+T),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=T},y.insertChars=function(T){for(var M=0;M<T.length;M++)this.writeScreen.insertChar(T[M]);var N=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(c.INFO,N+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(c.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},y.ccRCL=function(){this.logger.log(c.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},y.ccBS=function(){if(this.logger.log(c.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},y.ccAOF=function(){},y.ccAON=function(){},y.ccDER=function(){this.logger.log(c.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},y.ccRU=function(T){this.logger.log(c.INFO,"RU("+T+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(T)},y.ccFON=function(){this.logger.log(c.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},y.ccRDC=function(){this.logger.log(c.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},y.ccTR=function(){this.logger.log(c.INFO,"TR"),this.setMode("MODE_TEXT")},y.ccRTD=function(){this.logger.log(c.INFO,"RTD"),this.setMode("MODE_TEXT")},y.ccEDM=function(){this.logger.log(c.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},y.ccCR=function(){this.logger.log(c.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},y.ccENM=function(){this.logger.log(c.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},y.ccEOC=function(){if(this.logger.log(c.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var T=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=T,this.writeScreen=this.nonDisplayedMemory,this.logger.log(c.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},y.ccTO=function(T){this.logger.log(c.INFO,"TO("+T+") - Tab Offset"),this.writeScreen.moveCursor(T)},y.ccMIDROW=function(T){var M={flash:!1};if(M.underline=T%2===1,M.italics=T>=46,M.italics)M.foreground="white";else{var N=Math.floor(T/2)-16,I=["white","green","blue","cyan","red","yellow","magenta"];M.foreground=I[N]}this.logger.log(c.INFO,"MIDROW: "+JSON.stringify(M)),this.writeScreen.setPen(M)},y.outputDataUpdate=function(T){T===void 0&&(T=!1);var M=this.logger.time;if(M===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=M:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,M,this.lastOutputScreen),T&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:M),this.lastOutputScreen.copy(this.displayedMemory))},y.cueSplitAtTime=function(T){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,T,this.displayedMemory),this.cueStartTime=T))},b}(),E=function(){function b(p,T,M){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var N=new g;this.channels=[null,new S(p,T,N),new S(p+1,M,N)],this.cmdHistory=O(),this.logger=N}var y=b.prototype;return y.getHandler=function(T){return this.channels[T].getHandler()},y.setHandler=function(T,M){this.channels[T].setHandler(M)},y.addData=function(T,M){var N,I,K,H=!1;this.logger.time=T;for(var W=0;W<M.length;W+=2){if(I=M[W]&127,K=M[W+1]&127,I===0&&K===0)continue;if(this.logger.log(c.DATA,"["+v([M[W],M[W+1]])+"] -> ("+v([I,K])+")"),N=this.parseCmd(I,K),N||(N=this.parseMidrow(I,K)),N||(N=this.parsePAC(I,K)),N||(N=this.parseBackgroundAttributes(I,K)),!N&&(H=this.parseChars(I,K),H)){var z=this.currentChannel;if(z&&z>0){var U=this.channels[z];U.insertChars(H)}else this.logger.log(c.WARNING,"No channel found yet. TEXT-MODE?")}!N&&!H&&this.logger.log(c.WARNING,"Couldn't parse cleaned data "+v([I,K])+" orig: "+v([M[W],M[W+1]]))}},y.parseCmd=function(T,M){var N=this.cmdHistory,I=(T===20||T===28||T===21||T===29)&&M>=32&&M<=47,K=(T===23||T===31)&&M>=33&&M<=35;if(!(I||K))return!1;if(P(T,M,N))return s(null,null,N),this.logger.log(c.DEBUG,"Repeated command ("+v([T,M])+") is dropped"),!0;var H=T===20||T===21||T===23?1:2,W=this.channels[H];return T===20||T===21||T===28||T===29?M===32?W.ccRCL():M===33?W.ccBS():M===34?W.ccAOF():M===35?W.ccAON():M===36?W.ccDER():M===37?W.ccRU(2):M===38?W.ccRU(3):M===39?W.ccRU(4):M===40?W.ccFON():M===41?W.ccRDC():M===42?W.ccTR():M===43?W.ccRTD():M===44?W.ccEDM():M===45?W.ccCR():M===46?W.ccENM():M===47&&W.ccEOC():W.ccTO(M-32),s(T,M,N),this.currentChannel=H,!0},y.parseMidrow=function(T,M){var N=0;if((T===17||T===25)&&M>=32&&M<=47){if(T===17?N=1:N=2,N!==this.currentChannel)return this.logger.log(c.ERROR,"Mismatch channel in midrow parsing"),!1;var I=this.channels[N];return I?(I.ccMIDROW(M),this.logger.log(c.DEBUG,"MIDROW ("+v([T,M])+")"),!0):!1}return!1},y.parsePAC=function(T,M){var N,I=this.cmdHistory,K=(T>=17&&T<=23||T>=25&&T<=31)&&M>=64&&M<=127,H=(T===16||T===24)&&M>=64&&M<=95;if(!(K||H))return!1;if(P(T,M,I))return s(null,null,I),!0;var W=T<=23?1:2;M>=64&&M<=95?N=W===1?o[T]:a[T]:N=W===1?l[T]:_[T];var z=this.channels[W];return z?(z.setPAC(this.interpretPAC(N,M)),s(T,M,I),this.currentChannel=W,!0):!1},y.interpretPAC=function(T,M){var N,I={color:null,italics:!1,indent:null,underline:!1,row:T};return M>95?N=M-96:N=M-64,I.underline=(N&1)===1,N<=13?I.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(N/2)]:N<=15?(I.italics=!0,I.color="white"):I.indent=Math.floor((N-16)/2)*4,I},y.parseChars=function(T,M){var N,I=null,K=null;if(T>=25?(N=2,K=T-8):(N=1,K=T),K>=17&&K<=19){var H;K===17?H=M+80:K===18?H=M+112:H=M+144,this.logger.log(c.INFO,"Special char '"+f(H)+"' in channel "+N),I=[H]}else T>=32&&T<=127&&(I=M===0?[T]:[T,M]);if(I){var W=v(I);this.logger.log(c.DEBUG,"Char codes = "+W.join(",")),s(T,M,this.cmdHistory)}return I},y.parseBackgroundAttributes=function(T,M){var N=(T===16||T===24)&&M>=32&&M<=47,I=(T===23||T===31)&&M>=45&&M<=47;if(!(N||I))return!1;var K,H={};T===16||T===24?(K=Math.floor((M-32)/2),H.background=m[K],M%2===1&&(H.background=H.background+"_semi")):M===45?H.background="transparent":(H.foreground="black",M===47&&(H.underline=!0));var W=T<=23?1:2,z=this.channels[W];return z.setBkgData(H),s(T,M,this.cmdHistory),!0},y.reset=function(){for(var T=0;T<Object.keys(this.channels).length;T++){var M=this.channels[T];M&&M.reset()}this.cmdHistory=O()},y.cueSplitAtTime=function(T){for(var M=0;M<this.channels.length;M++){var N=this.channels[M];N&&N.cueSplitAtTime(T)}},b}();function s(b,y,p){p.a=b,p.b=y}function P(b,y,p){return p.a===b&&p.b===y}function O(){return{a:null,b:null}}h.default=E},"./src/utils/codecs.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"isCodecType",function(){return u}),C.d(h,"isCodecSupportedInMp4",function(){return f});var D={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 u(w,d){var o=D[d];return!!o&&o[w.slice(0,4)]===!0}function f(w,d){return MediaSource.isTypeSupported((d||"video")+'/mp4;codecs="'+w+'"')}},"./src/utils/cues.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/utils/vttparser.ts"),u=C("./src/utils/webvtt-parser.ts"),f=C("./src/utils/texttrack-utils.ts"),w=/\s/,d={newCue:function(l,a,_,m){for(var c=[],g,v,x,n,i,t=self.VTTCue||self.TextTrackCue,S=0;S<m.rows.length;S++)if(g=m.rows[S],x=!0,n=0,i="",!g.isEmpty()){for(var E=0;E<g.chars.length;E++)w.test(g.chars[E].uchar)&&x?n++:(i+=g.chars[E].uchar,x=!1);g.cueStartTime=a,a===_&&(_+=1e-4),n>=16?n--:n++;var s=Object(D.fixLineBreaks)(i.trim()),P=Object(u.generateCueId)(a,_,s);(!l||!l.cues||!l.cues.getCueById(P))&&(v=new t(a,_,s),v.id=P,v.line=S+1,v.align="left",v.position=10+Math.min(80,Math.floor(n*8/32)*10),c.push(v))}return l&&c.length&&(c.sort(function(O,b){return O.line==="auto"||b.line==="auto"?0:O.line>8&&b.line>8?b.line-O.line:O.line-b.line}),c.forEach(function(O){return Object(f.addCueToTrack)(l,O)})),c}};h.default=d},"./src/utils/discontinuities.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"findFirstFragWithCC",function(){return w}),C.d(h,"shouldAlignOnDiscontinuities",function(){return d}),C.d(h,"findDiscontinuousReferenceFrag",function(){return o}),C.d(h,"adjustSlidingStart",function(){return a}),C.d(h,"alignStream",function(){return _}),C.d(h,"alignPDT",function(){return c}),C.d(h,"alignFragmentByPDTDelta",function(){return g}),C.d(h,"alignMediaPlaylistByPDT",function(){return v});var D=C("./src/polyfills/number.ts"),u=C("./src/utils/logger.ts"),f=C("./src/controller/level-helper.ts");function w(x,n){for(var i=null,t=0,S=x.length;t<S;t++){var E=x[t];if(E&&E.cc===n){i=E;break}}return i}function d(x,n,i){return!!(n.details&&(i.endCC>i.startCC||x&&x.cc<i.startCC))}function o(x,n){var i=x.fragments,t=n.fragments;if(!t.length||!i.length){u.logger.log("No fragments to align");return}var S=w(i,t[0].cc);if(!S||S&&!S.startPTS){u.logger.log("No frag in previous level to align on");return}return S}function l(x,n){if(x){var i=x.start+n;x.start=x.startPTS=i,x.endPTS=i+x.duration}}function a(x,n){for(var i=n.fragments,t=0,S=i.length;t<S;t++)l(i[t],x);n.fragmentHint&&l(n.fragmentHint,x),n.alignedSliding=!0}function _(x,n,i){if(!n)return;m(x,i,n),!i.alignedSliding&&n.details&&c(i,n.details),!i.alignedSliding&&n.details&&!i.skippedSegments&&Object(f.adjustSliding)(n.details,i)}function m(x,n,i){if(d(x,i,n)){var t=o(i.details,n);t&&Object(D.isFiniteNumber)(t.start)&&(u.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),a(t.start,n))}}function c(x,n){if(!n.fragments.length||!x.hasProgramDateTime||!n.hasProgramDateTime)return;var i=n.fragments[0].programDateTime,t=x.fragments[0].programDateTime,S=(t-i)/1e3+n.fragments[0].start;S&&Object(D.isFiniteNumber)(S)&&(u.logger.log("Adjusting PTS using programDateTime delta "+(t-i)+"ms, sliding:"+S.toFixed(3)+" "+x.url+" "),a(S,x))}function g(x,n){var i=x.programDateTime;if(!i)return;var t=(i-n)/1e3;x.start=x.startPTS=t,x.endPTS=t+x.duration}function v(x,n){if(!n.fragments.length||!x.hasProgramDateTime||!n.hasProgramDateTime)return;var i=n.fragments[0].programDateTime,t=n.fragments[0].start,S=i-t*1e3;x.fragments.forEach(function(E){g(E,S)}),x.fragmentHint&&g(x.fragmentHint,S),x.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/utils/ewma.ts"),u=function(){function f(d,o,l){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=l,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new D.default(d),this.fast_=new D.default(o)}var w=f.prototype;return w.update=function(o,l){var a=this.slow_,_=this.fast_;this.slow_.halfLife!==o&&(this.slow_=new D.default(o,a.getEstimate(),a.getTotalWeight())),this.fast_.halfLife!==l&&(this.fast_=new D.default(l,_.getEstimate(),_.getTotalWeight()))},w.sample=function(o,l){o=Math.max(o,this.minDelayMs_);var a=8*l,_=o/1e3,m=a/_;this.fast_.sample(_,m),this.slow_.sample(_,m)},w.canEstimate=function(){var o=this.fast_;return o&&o.getTotalWeight()>=this.minWeight_},w.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},w.destroy=function(){},f}();h.default=u},"./src/utils/ewma.ts":function(L,h,C){"use strict";C.r(h);var D=function(){function u(w,d,o){d===void 0&&(d=0),o===void 0&&(o=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=w,this.alpha_=w?Math.exp(Math.log(.5)/w):0,this.estimate_=d,this.totalWeight_=o}var f=u.prototype;return f.sample=function(d,o){var l=Math.pow(this.alpha_,d);this.estimate_=o*(1-l)+l*this.estimate_,this.totalWeight_+=d},f.getTotalWeight=function(){return this.totalWeight_},f.getEstimate=function(){if(this.alpha_){var d=1-Math.pow(this.alpha_,this.totalWeight_);if(d)return this.estimate_/d}return this.estimate_},u}();h.default=D},"./src/utils/fetch-loader.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"fetchSupported",function(){return g});var D=C("./src/polyfills/number.ts"),u=C("./src/loader/load-stats.ts"),f=C("./src/demux/chunk-cache.ts");function w(t,S){t.prototype=Object.create(S.prototype),t.prototype.constructor=t,_(t,S)}function d(t){var S=typeof Map=="function"?new Map:void 0;return d=function(s){if(s===null||!a(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof S!="undefined"){if(S.has(s))return S.get(s);S.set(s,P)}function P(){return o(s,arguments,m(this).constructor)}return P.prototype=Object.create(s.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),_(P,s)},d(t)}function o(t,S,E){return l()?o=Reflect.construct:o=function(P,O,b){var y=[null];y.push.apply(y,O);var p=Function.bind.apply(P,y),T=new p;return b&&_(T,b.prototype),T},o.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(t){return!1}}function a(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function _(t,S){return _=Object.setPrototypeOf||function(s,P){return s.__proto__=P,s},_(t,S)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},m(t)}function c(){return c=Object.assign||function(t){for(var S=1;S<arguments.length;S++){var E=arguments[S];for(var s in E)Object.prototype.hasOwnProperty.call(E,s)&&(t[s]=E[s])}return t},c.apply(this,arguments)}function g(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var v=function(){function t(E){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=E.fetchSetup||n,this.controller=new self.AbortController,this.stats=new u.LoadStats}var S=t.prototype;return S.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},S.abortInternal=function(){var s=this.response;(!s||!s.ok)&&(this.stats.aborted=!0,this.controller.abort())},S.abort=function(){var s;this.abortInternal(),(s=this.callbacks)!==null&&s!==void 0&&s.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},S.load=function(s,P,O){var b=this,y=this.stats;if(y.loading.start)throw new Error("Loader can only be used once.");y.loading.start=self.performance.now();var p=x(s,this.controller.signal),T=O.onProgress,M=s.responseType==="arraybuffer",N=M?"byteLength":"length";this.context=s,this.config=P,this.callbacks=O,this.request=this.fetchSetup(s,p),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){b.abortInternal(),O.onTimeout(y,s,b.response)},P.timeout),self.fetch(this.request).then(function(I){if(b.response=b.loader=I,!I.ok){var K=I.status,H=I.statusText;throw new i(H||"fetch, bad network response",K,I)}return y.loading.first=Math.max(self.performance.now(),y.loading.start),y.total=parseInt(I.headers.get("Content-Length")||"0"),T&&Object(D.isFiniteNumber)(P.highWaterMark)?b.loadProgressively(I,y,s,P.highWaterMark,T):M?I.arrayBuffer():I.text()}).then(function(I){var K=b.response;self.clearTimeout(b.requestTimeout),y.loading.end=Math.max(self.performance.now(),y.loading.first),y.loaded=y.total=I[N];var H={url:K.url,data:I};T&&!Object(D.isFiniteNumber)(P.highWaterMark)&&T(y,s,I,K),O.onSuccess(H,y,s,K)}).catch(function(I){if(self.clearTimeout(b.requestTimeout),y.aborted)return;var K=I.code||0;O.onError({code:K,text:I.message},s,I.details)})},S.getCacheAge=function(){var s=null;if(this.response){var P=this.response.headers.get("age");s=P?parseFloat(P):null}return s},S.loadProgressively=function(s,P,O,b,y){b===void 0&&(b=0);var p=new f.default,T=s.body.getReader(),M=function N(){return T.read().then(function(I){if(I.done)return p.dataLength&&y(P,O,p.flush(),s),Promise.resolve(new ArrayBuffer(0));var K=I.value,H=K.length;return P.loaded+=H,H<b||p.dataLength?(p.push(K),p.dataLength>=b&&y(P,O,p.flush(),s)):y(P,O,K,s),N()}).catch(function(){return Promise.reject()})};return M()},t}();function x(t,S){var E={method:"GET",mode:"cors",credentials:"same-origin",signal:S,headers:new self.Headers(c({},t.headers))};return t.rangeEnd&&E.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),E}function n(t,S){return new self.Request(t.url,S)}var i=function(t){w(S,t);function S(E,s,P){var O;return O=t.call(this,E)||this,O.code=void 0,O.details=void 0,O.code=s,O.details=P,O}return S}(d(Error));h.default=v},"./src/utils/imsc1-ttml-parser.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"IMSC1_CODEC",function(){return a}),C.d(h,"parseIMSC1",function(){return g});var D=C("./src/utils/mp4-tools.ts"),u=C("./src/utils/vttparser.ts"),f=C("./src/utils/vttcue.ts"),w=C("./src/demux/id3.ts"),d=C("./src/utils/timescale-conversion.ts"),o=C("./src/utils/webvtt-parser.ts");function l(){return l=Object.assign||function(b){for(var y=1;y<arguments.length;y++){var p=arguments[y];for(var T in p)Object.prototype.hasOwnProperty.call(p,T)&&(b[T]=p[T])}return b},l.apply(this,arguments)}var a="stpp.ttml.im1t",_=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,m=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,c={left:"start",center:"center",right:"end",start:"start",end:"end"};function g(b,y,p,T,M){var N=Object(D.findBox)(new Uint8Array(b),["mdat"]);if(N.length===0){M(new Error("Could not parse IMSC1 mdat"));return}var I=N[0],K=Object(w.utf8ArrayToStr)(new Uint8Array(b,I.start,I.end-I.start)),H=Object(d.toTimescaleFromScale)(y,1,p);try{T(v(K,H))}catch(W){M(W)}}function v(b,y){var p=new DOMParser,T=p.parseFromString(b,"text/xml"),M=T.getElementsByTagName("tt")[0];if(!M)throw new Error("Invalid ttml");var N={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},I=Object.keys(N).reduce(function(U,B){return U[B]=M.getAttribute("ttp:"+B)||N[B],U},{}),K=M.getAttribute("xml:space")!=="preserve",H=n(x(M,"styling","style")),W=n(x(M,"layout","region")),z=x(M,"body","[begin]");return[].map.call(z,function(U){var B=i(U,K);if(!B||!U.hasAttribute("begin"))return null;var G=s(U.getAttribute("begin"),I),q=s(U.getAttribute("dur"),I),ae=s(U.getAttribute("end"),I);if(G===null)throw E(U);if(ae===null){if(q===null)throw E(U);ae=G+q}var se=new f.default(G-y,ae-y,B);se.id=Object(o.generateCueId)(se.startTime,se.endTime,se.text);var we=W[U.getAttribute("region")],Se=H[U.getAttribute("style")];se.position=10,se.size=80;var de=t(we,Se),xe=de.textAlign;if(xe){var he=c[xe];he&&(se.lineAlign=he),se.align=xe}return l(se,de),se}).filter(function(U){return U!==null})}function x(b,y,p){var T=b.getElementsByTagName(y)[0];return T?[].slice.call(T.querySelectorAll(p)):[]}function n(b){return b.reduce(function(y,p){var T=p.getAttribute("xml:id");return T&&(y[T]=p),y},{})}function i(b,y){return[].slice.call(b.childNodes).reduce(function(p,T,M){var N;return T.nodeName==="br"&&M?p+`
|
|
|
`:(N=T.childNodes)!==null&&N!==void 0&&N.length?i(T,y):y?p+T.textContent.trim().replace(/\s+/g," "):p+T.textContent},"")}function t(b,y){var p="http://www.w3.org/ns/ttml#styling",T=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return T.reduce(function(M,N){var I=S(y,p,N)||S(b,p,N);return I&&(M[N]=I),M},{})}function S(b,y,p){return b.hasAttributeNS(y,p)?b.getAttributeNS(y,p):null}function E(b){return new Error("Could not parse ttml timestamp "+b)}function s(b,y){if(!b)return null;var p=Object(u.parseTimeStamp)(b);return p===null&&(_.test(b)?p=P(b,y):m.test(b)&&(p=O(b,y))),p}function P(b,y){var p=_.exec(b),T=(p[4]|0)+(p[5]|0)/y.subFrameRate;return(p[1]|0)*3600+(p[2]|0)*60+(p[3]|0)+T/y.frameRate}function O(b,y){var p=m.exec(b),T=Number(p[1]),M=p[2];switch(M){case"h":return T*3600;case"m":return T*60;case"ms":return T*1e3;case"f":return T/y.frameRate;case"t":return T/y.tickRate}return T}},"./src/utils/logger.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"enableLogs",function(){return o}),C.d(h,"logger",function(){return l});var D=function(){},u={trace:D,debug:D,log:D,warn:D,info:D,error:D},f=u;function w(a){var _=self.console[a];return _?_.bind(self.console,"["+a+"] >"):D}function d(a){for(var _=arguments.length,m=new Array(_>1?_-1:0),c=1;c<_;c++)m[c-1]=arguments[c];m.forEach(function(g){f[g]=a[g]?a[g].bind(a):w(g)})}function o(a){if(self.console&&a===!0||typeof a=="object"){d(a,"debug","log","info","warn","error");try{f.log()}catch(_){f=u}}else f=u}var l=f},"./src/utils/mediakeys-helper.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"KeySystems",function(){return D}),C.d(h,"requestMediaKeySystemAccess",function(){return u});var D;(function(f){f.WIDEVINE="com.widevine.alpha",f.PLAYREADY="com.microsoft.playready"})(D||(D={}));var u=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"getMediaSource",function(){return D});function D(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"bin2str",function(){return d}),C.d(h,"readUint16",function(){return o}),C.d(h,"readUint32",function(){return l}),C.d(h,"writeUint32",function(){return a}),C.d(h,"findBox",function(){return _}),C.d(h,"parseSegmentIndex",function(){return m}),C.d(h,"parseInitSegment",function(){return c}),C.d(h,"getStartDTS",function(){return g}),C.d(h,"getDuration",function(){return v}),C.d(h,"computeRawDurationFromSamples",function(){return x}),C.d(h,"offsetStartDTS",function(){return n}),C.d(h,"segmentValidRange",function(){return i}),C.d(h,"appendUint8Array",function(){return t});var D=C("./src/utils/typed-array.ts"),u=C("./src/loader/fragment.ts"),f=Math.pow(2,32)-1,w=[].push;function d(S){return String.fromCharCode.apply(null,S)}function o(S,E){"data"in S&&(E+=S.start,S=S.data);var s=S[E]<<8|S[E+1];return s<0?65536+s:s}function l(S,E){"data"in S&&(E+=S.start,S=S.data);var s=S[E]<<24|S[E+1]<<16|S[E+2]<<8|S[E+3];return s<0?4294967296+s:s}function a(S,E,s){"data"in S&&(E+=S.start,S=S.data),S[E]=s>>24,S[E+1]=s>>16&255,S[E+2]=s>>8&255,S[E+3]=s&255}function _(S,E){var s=[];if(!E.length)return s;var P,O,b;"data"in S?(P=S.data,O=S.start,b=S.end):(P=S,O=0,b=P.byteLength);for(var y=O;y<b;){var p=l(P,y),T=d(P.subarray(y+4,y+8)),M=p>1?y+p:b;if(T===E[0])if(E.length===1)s.push({data:P,start:y+8,end:M});else{var N=_({data:P,start:y+8,end:M},E.slice(1));N.length&&w.apply(s,N)}y=M}return s}function m(S){var E=_(S,["moov"]),s=E[0],P=s?s.end:null,O=_(S,["sidx"]);if(!O||!O[0])return null;var b=[],y=O[0],p=y.data[0],T=p===0?8:16,M=l(y,T);T+=4;var N=0,I=0;p===0?T+=8:T+=16,T+=2;var K=y.end+I,H=o(y,T);T+=2;for(var W=0;W<H;W++){var z=T,U=l(y,z);z+=4;var B=U&2147483647,G=(U&2147483648)>>>31;if(G===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var q=l(y,z);z+=4,b.push({referenceSize:B,subsegmentDuration:q,info:{duration:q/M,start:K,end:K+B-1}}),K+=B,z+=4,T=z}return{earliestPresentationTime:N,timescale:M,version:p,referencesCount:H,references:b,moovEndOffset:P}}function c(S){for(var E=[],s=_(S,["moov","trak"]),P=0;P<s.length;P++){var O=s[P],b=_(O,["tkhd"])[0];if(b){var y=b.data[b.start],p=y===0?12:20,T=l(b,p),M=_(O,["mdia","mdhd"])[0];if(M){y=M.data[M.start],p=y===0?12:20;var N=l(M,p),I=_(O,["mdia","hdlr"])[0];if(I){var K=d(I.data.subarray(I.start+8,I.start+12)),H={soun:u.ElementaryStreamTypes.AUDIO,vide:u.ElementaryStreamTypes.VIDEO}[K];if(H){var W=_(O,["mdia","minf","stbl","stsd"])[0],z=void 0;W&&(z=d(W.data.subarray(W.start+12,W.start+16))),E[T]={timescale:N,type:H},E[H]={timescale:N,id:T,codec:z}}}}}}var U=_(S,["moov","mvex","trex"]);return U.forEach(function(B){var G=l(B,4),q=E[G];q&&(q.default={duration:l(B,12),flags:l(B,20)})}),E}function g(S,E){return _(E,["moof","traf"]).reduce(function(s,P){var O=_(P,["tfdt"])[0],b=O.data[O.start],y=_(P,["tfhd"]).reduce(function(p,T){var M=l(T,4),N=S[M];if(N){var I=l(O,4);b===1&&(I*=Math.pow(2,32),I+=l(O,8));var K=N.timescale||9e4,H=I/K;if(isFinite(H)&&(p===null||H<p))return H}return p},null);return y!==null&&isFinite(y)&&(s===null||y<s)?y:s},null)||0}function v(S,E){for(var s=0,P=0,O=0,b=_(S,["moof","traf"]),y=0;y<b.length;y++){var p=b[y],T=_(p,["tfhd"])[0],M=l(T,4),N=E[M];if(!N)continue;var I=N.default,K=l(T,0)|(I==null?void 0:I.flags),H=I==null?void 0:I.duration;K&8&&(K&2?H=l(T,12):H=l(T,8));for(var W=N.timescale||9e4,z=_(p,["trun"]),U=0;U<z.length;U++){if(H){var B=l(z[U],4);s=H*B}else s=x(z[U]);N.type===u.ElementaryStreamTypes.VIDEO?P+=s/W:N.type===u.ElementaryStreamTypes.AUDIO&&(O+=s/W)}}if(P===0&&O===0){var G=m(S);if(G!=null&&G.references)return G.references.reduce(function(q,ae){return q+ae.info.duration||0},0)}return P||O}function x(S){var E=l(S,0),s=8;E&1&&(s+=4),E&4&&(s+=4);for(var P=0,O=l(S,4),b=0;b<O;b++){if(E&256){var y=l(S,s);P+=y,s+=4}E&512&&(s+=4),E&1024&&(s+=4),E&2048&&(s+=4)}return P}function n(S,E,s){_(E,["moof","traf"]).forEach(function(P){_(P,["tfhd"]).forEach(function(O){var b=l(O,4),y=S[b];if(!y)return;var p=y.timescale||9e4;_(P,["tfdt"]).forEach(function(T){var M=T.data[T.start],N=l(T,4);if(M===0)a(T,4,N-s*p);else{N*=Math.pow(2,32),N+=l(T,8),N-=s*p,N=Math.max(N,0);var I=Math.floor(N/(f+1)),K=Math.floor(N%(f+1));a(T,4,I),a(T,8,K)}})})})}function i(S){var E={valid:null,remainder:null},s=_(S,["moof"]);if(s){if(s.length<2)return E.remainder=S,E}else return E;var P=s[s.length-1];return E.valid=Object(D.sliceUint8)(S,0,P.start-8),E.remainder=Object(D.sliceUint8)(S,P.start-8),E}function t(S,E){var s=new Uint8Array(S.length+E.length);return s.set(S),s.set(E,S.length),s}},"./src/utils/output-filter.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"default",function(){return D});var D=function(){function u(w,d){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=w,this.trackName=d}var f=u.prototype;return f.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},f.newCue=function(d,o,l){(this.startTime===null||this.startTime>d)&&(this.startTime=d),this.endTime=o,this.screen=l,this.timelineController.createCaptionsTrack(this.trackName)},f.reset=function(){this.cueRanges=[]},u}()},"./src/utils/texttrack-utils.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"sendAddTrackEvent",function(){return u}),C.d(h,"addCueToTrack",function(){return f}),C.d(h,"clearCurrentCues",function(){return w}),C.d(h,"removeCuesInRange",function(){return d}),C.d(h,"getCuesInRange",function(){return l});var D=C("./src/utils/logger.ts");function u(a,_){var m;try{m=new Event("addtrack")}catch(c){m=document.createEvent("Event"),m.initEvent("addtrack",!1,!1)}m.track=a,_.dispatchEvent(m)}function f(a,_){var m=a.mode;if(m==="disabled"&&(a.mode="hidden"),a.cues&&!a.cues.getCueById(_.id))try{if(a.addCue(_),!a.cues.getCueById(_.id))throw new Error("addCue is failed for: "+_)}catch(g){D.logger.debug("[texttrack-utils]: "+g);var c=new self.TextTrackCue(_.startTime,_.endTime,_.text);c.id=_.id,a.addCue(c)}m==="disabled"&&(a.mode=m)}function w(a){var _=a.mode;if(_==="disabled"&&(a.mode="hidden"),a.cues)for(var m=a.cues.length;m--;)a.removeCue(a.cues[m]);_==="disabled"&&(a.mode=_)}function d(a,_,m){var c=a.mode;if(c==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0)for(var g=l(a.cues,_,m),v=0;v<g.length;v++)a.removeCue(g[v]);c==="disabled"&&(a.mode=c)}function o(a,_){if(_<a[0].startTime)return 0;var m=a.length-1;if(_>a[m].endTime)return-1;for(var c=0,g=m;c<=g;){var v=Math.floor((g+c)/2);if(_<a[v].startTime)g=v-1;else if(_>a[v].startTime&&c<m)c=v+1;else return v}return a[c].startTime-_<_-a[g].startTime?c:g}function l(a,_,m){var c=[],g=o(a,_);if(g>-1)for(var v=g,x=a.length;v<x;v++){var n=a[v];if(n.startTime>=_&&n.endTime<=m)c.push(n);else if(n.startTime>m)return c}return c}},"./src/utils/time-ranges.ts":function(L,h,C){"use strict";C.r(h);var D={toString:function(f){for(var w="",d=f.length,o=0;o<d;o++)w+="["+f.start(o).toFixed(3)+","+f.end(o).toFixed(3)+"]";return w}};h.default=D},"./src/utils/timescale-conversion.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"toTimescaleFromBase",function(){return u}),C.d(h,"toTimescaleFromScale",function(){return f}),C.d(h,"toMsFromMpegTsClock",function(){return w}),C.d(h,"toMpegTsClockFromTimescale",function(){return d});var D=9e4;function u(o,l,a,_){a===void 0&&(a=1),_===void 0&&(_=!1);var m=o*l*a;return _?Math.round(m):m}function f(o,l,a,_){return a===void 0&&(a=1),_===void 0&&(_=!1),u(o,l,1/a,_)}function w(o,l){return l===void 0&&(l=!1),u(o,1e3,1/D,l)}function d(o,l){return l===void 0&&(l=1),u(o,D,1/l)}},"./src/utils/typed-array.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"sliceUint8",function(){return D});function D(u,f,w){return Uint8Array.prototype.slice?u.slice(f,w):new Uint8Array(Array.prototype.slice.call(u,f,w))}},"./src/utils/vttcue.ts":function(L,h,C){"use strict";C.r(h),h.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var D=["","lr","rl"],u=["start","middle","end","left","right"];function f(a,_){if(typeof _!="string")return!1;if(!Array.isArray(a))return!1;var m=_.toLowerCase();return~a.indexOf(m)?m:!1}function w(a){return f(D,a)}function d(a){return f(u,a)}function o(a){for(var _=arguments.length,m=new Array(_>1?_-1:0),c=1;c<_;c++)m[c-1]=arguments[c];for(var g=1;g<arguments.length;g++){var v=arguments[g];for(var x in v)a[x]=v[x]}return a}function l(a,_,m){var c=this,g={enumerable:!0};c.hasBeenReset=!1;var v="",x=!1,n=a,i=_,t=m,S=null,E="",s=!0,P="auto",O="start",b=50,y="middle",p=50,T="middle";Object.defineProperty(c,"id",o({},g,{get:function(){return v},set:function(N){v=""+N}})),Object.defineProperty(c,"pauseOnExit",o({},g,{get:function(){return x},set:function(N){x=!!N}})),Object.defineProperty(c,"startTime",o({},g,{get:function(){return n},set:function(N){if(typeof N!="number")throw new TypeError("Start time must be set to a number.");n=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",o({},g,{get:function(){return i},set:function(N){if(typeof N!="number")throw new TypeError("End time must be set to a number.");i=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",o({},g,{get:function(){return t},set:function(N){t=""+N,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",o({},g,{get:function(){return S},set:function(N){S=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",o({},g,{get:function(){return E},set:function(N){var I=w(N);if(I===!1)throw new SyntaxError("An invalid or illegal string was specified.");E=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",o({},g,{get:function(){return s},set:function(N){s=!!N,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",o({},g,{get:function(){return P},set:function(N){if(typeof N!="number"&&N!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");P=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",o({},g,{get:function(){return O},set:function(N){var I=d(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");O=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",o({},g,{get:function(){return b},set:function(N){if(N<0||N>100)throw new Error("Position must be between 0 and 100.");b=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",o({},g,{get:function(){return y},set:function(N){var I=d(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");y=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",o({},g,{get:function(){return p},set:function(N){if(N<0||N>100)throw new Error("Size must be between 0 and 100.");p=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",o({},g,{get:function(){return T},set:function(N){var I=d(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");T=I,this.hasBeenReset=!0}})),c.displayState=void 0}return l.prototype.getCueAsHTML=function(){var a=self.WebVTT;return a.convertCueToDOMTree(self,this.text)},l}()},"./src/utils/vttparser.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"parseTimeStamp",function(){return f}),C.d(h,"fixLineBreaks",function(){return _}),C.d(h,"VTTParser",function(){return m});var D=C("./src/utils/vttcue.ts"),u=function(){function c(){}var g=c.prototype;return g.decode=function(x,n){if(!x)return"";if(typeof x!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(x))},c}();function f(c){function g(x,n,i,t){return(x|0)*3600+(n|0)*60+(i|0)+parseFloat(t||0)}var v=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return v?parseFloat(v[2])>59?g(v[2],v[3],0,v[4]):g(v[1],v[2],v[3],v[4]):null}var w=function(){function c(){this.values=Object.create(null)}var g=c.prototype;return g.set=function(x,n){!this.get(x)&&n!==""&&(this.values[x]=n)},g.get=function(x,n,i){return i?this.has(x)?this.values[x]:n[i]:this.has(x)?this.values[x]:n},g.has=function(x){return x in this.values},g.alt=function(x,n,i){for(var t=0;t<i.length;++t)if(n===i[t]){this.set(x,n);break}},g.integer=function(x,n){/^-?\d+$/.test(n)&&this.set(x,parseInt(n,10))},g.percent=function(x,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var i=parseFloat(n);if(i>=0&&i<=100)return this.set(x,i),!0}return!1},c}();function d(c,g,v,x){var n=x?c.split(x):[c];for(var i in n){if(typeof n[i]!="string")continue;var t=n[i].split(v);if(t.length!==2)continue;var S=t[0],E=t[1];g(S,E)}}var o=new D.default(0,0,""),l=o.align==="middle"?"middle":"center";function a(c,g,v){var x=c;function n(){var S=f(c);if(S===null)throw new Error("Malformed timestamp: "+x);return c=c.replace(/^[^\sa-zA-Z-]+/,""),S}function i(S,E){var s=new w;d(S,function(b,y){var p;switch(b){case"region":for(var T=v.length-1;T>=0;T--)if(v[T].id===y){s.set(b,v[T].region);break}break;case"vertical":s.alt(b,y,["rl","lr"]);break;case"line":p=y.split(","),s.integer(b,p[0]),s.percent(b,p[0])&&s.set("snapToLines",!1),s.alt(b,p[0],["auto"]),p.length===2&&s.alt("lineAlign",p[1],["start",l,"end"]);break;case"position":p=y.split(","),s.percent(b,p[0]),p.length===2&&s.alt("positionAlign",p[1],["start",l,"end","line-left","line-right","auto"]);break;case"size":s.percent(b,y);break;case"align":s.alt(b,y,["start",l,"end","left","right"]);break}},/:/,/\s/),E.region=s.get("region",null),E.vertical=s.get("vertical","");var P=s.get("line","auto");P==="auto"&&o.line===-1&&(P=-1),E.line=P,E.lineAlign=s.get("lineAlign","start"),E.snapToLines=s.get("snapToLines",!0),E.size=s.get("size",100),E.align=s.get("align",l);var O=s.get("position","auto");O==="auto"&&o.position===50&&(O=E.align==="start"||E.align==="left"?0:E.align==="end"||E.align==="right"?100:50),E.position=O}function t(){c=c.replace(/^\s+/,"")}if(t(),g.startTime=n(),t(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+x);c=c.substr(3),t(),g.endTime=n(),t(),i(c,g)}function _(c){return c.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}var m=function(){function c(){this.state="INITIAL",this.buffer="",this.decoder=new u,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var g=c.prototype;return g.parse=function(x){var n=this;x&&(n.buffer+=n.decoder.decode(x,{stream:!0}));function i(){var O=n.buffer,b=0;for(O=_(O);b<O.length&&O[b]!=="\r"&&O[b]!==`
|
|
|
`;)++b;var y=O.substr(0,b);return O[b]==="\r"&&++b,O[b]===`
|
|
|
`&&++b,n.buffer=O.substr(b),y}function t(O){d(O,function(b,y){},/:/)}try{var S="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;S=i();var E=S.match(/^()?WEBVTT([ \t].*)?$/);if(!E||!E[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var s=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;s?s=!1:S=i();switch(n.state){case"HEADER":/:/.test(S)?t(S):S||(n.state="ID");continue;case"NOTE":S||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(S)){n.state="NOTE";break}if(!S)continue;if(n.cue=new D.default(0,0,""),n.state="CUE",S.indexOf("-->")===-1){n.cue.id=S;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{a(S,n.cue,n.regionList)}catch(O){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var P=S.indexOf("-->")!==-1;if(!S||P&&(s=!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+=S}continue;case"BADCUE":S||(n.state="ID")}}}catch(O){n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},g.flush=function(){var x=this;try{if((x.cue||x.state==="HEADER")&&(x.buffer+=`
|
|
|
|
|
|
`,x.parse()),x.state==="INITIAL"||x.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){x.onparsingerror&&x.onparsingerror(n)}return x.onflush&&x.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(L,h,C){"use strict";C.r(h),C.d(h,"generateCueId",function(){return m}),C.d(h,"parseWebVTT",function(){return g});var D=C("./src/polyfills/number.ts"),u=C("./src/utils/vttparser.ts"),f=C("./src/demux/id3.ts"),w=C("./src/utils/timescale-conversion.ts"),d=C("./src/remux/mp4-remuxer.ts"),o=/\r\n|\n\r|\n|\r/g,l=function(x,n,i){return i===void 0&&(i=0),x.substr(i,n.length)===n},a=function(x){var n=parseInt(x.substr(-3)),i=parseInt(x.substr(-6,2)),t=parseInt(x.substr(-9,2)),S=x.length>9?parseInt(x.substr(0,x.indexOf(":"))):0;if(!Object(D.isFiniteNumber)(n)||!Object(D.isFiniteNumber)(i)||!Object(D.isFiniteNumber)(t)||!Object(D.isFiniteNumber)(S))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+x);return n+=1e3*i,n+=60*1e3*t,n+=60*60*1e3*S,n},_=function(x){for(var n=5381,i=x.length;i;)n=n*33^x.charCodeAt(--i);return(n>>>0).toString()};function m(v,x,n){return _(v.toString())+_(x.toString())+_(n)}var c=function(x,n,i){var t=x[n],S=x[t.prevCC];if(!S||!S.new&&t.new){x.ccOffset=x.presentationOffset=t.start,t.new=!1;return}for(;(E=S)!==null&&E!==void 0&&E.new;){var E;x.ccOffset+=t.start-S.start,t.new=!1,t=S,S=x[t.prevCC]}x.presentationOffset=i};function g(v,x,n,i,t,S,E,s){var P=new u.VTTParser,O=Object(f.utf8ArrayToStr)(new Uint8Array(v)).trim().replace(o,`
|
|
|
`).split(`
|
|
|
`),b=[],y=Object(w.toMpegTsClockFromTimescale)(x,n),p="00:00.000",T=0,M=0,N,I=!0,K=!1;P.oncue=function(H){var W=i[t],z=i.ccOffset,U=(T-y)/9e4;if(W!=null&&W.new&&(M!==void 0?z=i.ccOffset=W.start:c(i,t,U)),U&&(z=U-i.presentationOffset),K){var B=H.endTime-H.startTime,G=Object(d.normalizePts)((H.startTime+z-M)*9e4,S*9e4)/9e4;H.startTime=G,H.endTime=G+B}var q=H.text.trim();H.text=decodeURIComponent(encodeURIComponent(q)),H.id||(H.id=m(H.startTime,H.endTime,q)),H.endTime>0&&b.push(H)},P.onparsingerror=function(H){N=H},P.onflush=function(){if(N){s(N);return}E(b)},O.forEach(function(H){if(I)if(l(H,"X-TIMESTAMP-MAP=")){I=!1,K=!0,H.substr(16).split(",").forEach(function(W){l(W,"LOCAL:")?p=W.substr(6):l(W,"MPEGTS:")&&(T=parseInt(W.substr(7)))});try{M=a(p)/1e3}catch(W){K=!1,N=W}return}else H===""&&(I=!1);P.parse(H+`
|
|
|
`)}),P.flush()}},"./src/utils/xhr-loader.ts":function(L,h,C){"use strict";C.r(h);var D=C("./src/utils/logger.ts"),u=C("./src/loader/load-stats.ts"),f=/^age:\s*[\d.]+\s*$/m,w=function(){function d(l){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=l?l.xhrSetup:null,this.stats=new u.LoadStats,this.retryDelay=0}var o=d.prototype;return o.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},o.abortInternal=function(){var a=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),a&&(a.onreadystatechange=null,a.onprogress=null,a.readyState!==4&&(this.stats.aborted=!0,a.abort()))},o.abort=function(){var a;this.abortInternal(),(a=this.callbacks)!==null&&a!==void 0&&a.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},o.load=function(a,_,m){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=a,this.config=_,this.callbacks=m,this.retryDelay=_.retryDelay,this.loadInternal()},o.loadInternal=function(){var a=this.config,_=this.context;if(!a)return;var m=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var g=this.xhrSetup;try{if(g)try{g(m,_.url)}catch(n){m.open("GET",_.url,!0),g(m,_.url)}m.readyState||m.open("GET",_.url,!0);var v=this.context.headers;if(v)for(var x in v)m.setRequestHeader(x,v[x])}catch(n){this.callbacks.onError({code:m.status,text:n.message},_,m);return}_.rangeEnd&&m.setRequestHeader("Range","bytes="+_.rangeStart+"-"+(_.rangeEnd-1)),m.onreadystatechange=this.readystatechange.bind(this),m.onprogress=this.loadprogress.bind(this),m.responseType=_.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout),m.send()},o.readystatechange=function(){var a=this.context,_=this.loader,m=this.stats;if(!a||!_)return;var c=_.readyState,g=this.config;if(m.aborted)return;if(c>=2)if(self.clearTimeout(this.requestTimeout),m.loading.first===0&&(m.loading.first=Math.max(self.performance.now(),m.loading.start)),c===4){_.onreadystatechange=null,_.onprogress=null;var v=_.status;if(v>=200&&v<300){m.loading.end=Math.max(self.performance.now(),m.loading.first);var x,n;if(a.responseType==="arraybuffer"?(x=_.response,n=x.byteLength):(x=_.responseText,n=x.length),m.loaded=m.total=n,!this.callbacks)return;var i=this.callbacks.onProgress;if(i&&i(m,a,x,_),!this.callbacks)return;var t={url:_.responseURL,data:x};this.callbacks.onSuccess(t,m,a,_)}else m.retry>=g.maxRetry||v>=400&&v<499?(D.logger.error(v+" while loading "+a.url),this.callbacks.onError({code:v,text:_.statusText},a,_)):(D.logger.warn(v+" while loading "+a.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,g.maxRetryDelay),m.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),g.timeout)},o.loadtimeout=function(){D.logger.warn("timeout while loading "+this.context.url);var a=this.callbacks;a&&(this.abortInternal(),a.onTimeout(this.stats,this.context,this.loader))},o.loadprogress=function(a){var _=this.stats;_.loaded=a.loaded,a.lengthComputable&&(_.total=a.total)},o.getCacheAge=function(){var a=null;if(this.loader&&f.test(this.loader.getAllResponseHeaders())){var _=this.loader.getResponseHeader("age");a=_?parseFloat(_):null}return a},d}();h.default=w}}).default})},vHTk:function(j,Q,k){j.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var h=L,C=h.lib,D=C.StreamCipher,u=h.algo,f=u.RC4=D.extend({_doReset:function(){for(var o=this._key,l=o.words,a=o.sigBytes,_=this._S=[],m=0;m<256;m++)_[m]=m;for(var m=0,c=0;m<256;m++){var g=m%a,v=l[g>>>2]>>>24-g%4*8&255;c=(c+_[m]+v)%256;var x=_[m];_[m]=_[c],_[c]=x}this._i=this._j=0},_doProcessBlock:function(o,l){o[l]^=w.call(this)},keySize:256/32,ivSize:0});function w(){for(var o=this._S,l=this._i,a=this._j,_=0,m=0;m<4;m++){l=(l+1)%256,a=(a+o[l])%256;var c=o[l];o[l]=o[a],o[a]=c,_|=o[(o[l]+o[a])%256]<<24-m*8}return this._i=l,this._j=a,_}h.RC4=D._createHelper(f);var d=u.RC4Drop=f.extend({cfg:f.cfg.extend({drop:192}),_doReset:function(){f._doReset.call(this);for(var o=this.cfg.drop;o>0;o--)w.call(this)}});h.RC4Drop=D._createHelper(d)}(),L.RC4})},wCXF:function(j,Q,k){"use strict";k.d(Q,"a",function(){return Ye});var L=k("rePB"),h=k("VTBJ"),C=k("KQm4"),D=k("U8pU"),u=k("ODXe"),f=k("q1tI"),w=k("TSYQ"),d=k.n(w),o=k("Gytx"),l=k.n(o),a=k("Kwbf"),_=k("t23M"),m=k("qx4F"),c=k("6eGT"),g=k("IBYe"),v=k("Ff2n"),x=k("c+Xe"),n=k("fyJ8"),i=k("biw7");function t(Me,Ce,Je,rt,ze){var et=Je[Me]||{},ke=Je[Ce]||{},Re,Te;et.fixed==="left"?Re=rt.left[Me]:ke.fixed==="right"&&(Te=rt.right[Ce]);var fe=!1,ye=!1,Ee=!1,Oe=!1,We=Je[Ce+1],Ve=Je[Me-1];if(ze==="rtl"){if(Re!==void 0){var ut=Ve&&Ve.fixed==="left";Oe=!ut}else if(Te!==void 0){var ft=We&&We.fixed==="right";Ee=!ft}}else if(Re!==void 0){var Dt=We&&We.fixed==="left";fe=!Dt}else if(Te!==void 0){var Mt=Ve&&Ve.fixed==="right";ye=!Mt}return{fixLeft:Re,fixRight:Te,lastFixLeft:fe,firstFixRight:ye,lastFixRight:Ee,firstFixLeft:Oe,isSticky:rt.isSticky}}var S=k("sR1s");function E(Me){var Ce=Me.cells,Je=Me.stickyOffsets,rt=Me.flattenColumns,ze=Me.rowComponent,et=Me.cellComponent,ke=Me.onHeaderRow,Re=Me.index,Te=f.useContext(i.a),fe=Te.prefixCls,ye=Te.direction,Ee;ke&&(Ee=ke(Ce.map(function(We){return We.column}),Re));var Oe=Object(S.a)(Ce.map(function(We){return We.column}));return f.createElement(ze,Object.assign({},Ee),Ce.map(function(We,Ve){var ut=We.column,ft=t(We.colStart,We.colEnd,rt,Je,ye),Dt;return ut&&ut.onHeaderCell&&(Dt=We.column.onHeaderCell(ut)),f.createElement(n.a,Object.assign({},We,{ellipsis:ut.ellipsis,align:ut.align,component:et,prefixCls:fe,key:Oe[Ve]},ft,{additionalProps:Dt,rowType:"header"}))}))}E.displayName="HeaderRow";var s=E;function P(Me){var Ce=[];function Je(ke,Re){var Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ce[Te]=Ce[Te]||[];var fe=Re,ye=ke.filter(Boolean).map(function(Ee){var Oe={key:Ee.key,className:Ee.className||"",children:Ee.title,column:Ee,colStart:fe},We=1,Ve=Ee.children;return Ve&&Ve.length>0&&(We=Je(Ve,fe,Te+1).reduce(function(ut,ft){return ut+ft},0),Oe.hasSubColumns=!0),"colSpan"in Ee&&(We=Ee.colSpan),"rowSpan"in Ee&&(Oe.rowSpan=Ee.rowSpan),Oe.colSpan=We,Oe.colEnd=Oe.colStart+We-1,Ce[Te].push(Oe),fe+=We,We});return ye}Je(Me,0);for(var rt=Ce.length,ze=function(Re){Ce[Re].forEach(function(Te){!("rowSpan"in Te)&&!Te.hasSubColumns&&(Te.rowSpan=rt-Re)})},et=0;et<rt;et+=1)ze(et);return Ce}function O(Me){var Ce=Me.stickyOffsets,Je=Me.columns,rt=Me.flattenColumns,ze=Me.onHeaderRow,et=f.useContext(i.a),ke=et.prefixCls,Re=et.getComponent,Te=f.useMemo(function(){return P(Je)},[Je]),fe=Re(["header","wrapper"],"thead"),ye=Re(["header","row"],"tr"),Ee=Re(["header","cell"],"th");return f.createElement(fe,{className:"".concat(ke,"-thead")},Te.map(function(Oe,We){var Ve=f.createElement(s,{key:We,flattenColumns:rt,cells:Oe,stickyOffsets:Ce,rowComponent:ye,cellComponent:Ee,onHeaderRow:ze,index:We});return Ve}))}var b=O,y=k("hW8S");function p(Me){for(var Ce=Me.colWidths,Je=Me.columns,rt=Me.columCount,ze=[],et=rt||Je.length,ke=!1,Re=et-1;Re>=0;Re-=1){var Te=Ce[Re],fe=Je&&Je[Re],ye=fe&&fe[y.a];(Te||ye||ke)&&(ze.unshift(f.createElement("col",Object.assign({key:Re,style:{width:Te,minWidth:Te}},ye))),ke=!0)}return f.createElement("colgroup",null,ze)}var T=p;function M(Me,Ce){return Object(f.useMemo)(function(){for(var Je=[],rt=0;rt<Ce;rt+=1){var ze=Me[rt];if(ze!==void 0)Je[rt]=ze;else return null}return Je},[Me.join("_"),Ce])}var N=f.forwardRef(function(Me,Ce){var Je=Me.noData,rt=Me.columns,ze=Me.flattenColumns,et=Me.colWidths,ke=Me.columCount,Re=Me.stickyOffsets,Te=Me.direction,fe=Me.fixHeader,ye=Me.offsetHeader,Ee=Me.stickyClassName,Oe=Me.onScroll,We=Object(v.a)(Me,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Ve=f.useContext(i.a),ut=Ve.prefixCls,ft=Ve.scrollbarSize,Dt=Ve.isSticky,Mt=Dt&&!fe?0:ft,lr=f.useRef(null),dr=f.useCallback(function(Zr){Object(x.b)(Ce,Zr),Object(x.b)(lr,Zr)},[]);f.useEffect(function(){var Zr;function qr(Pr){var fn=Pr.currentTarget,bn=Pr.deltaX;bn&&(Oe({currentTarget:fn,scrollLeft:fn.scrollLeft+bn}),Pr.preventDefault())}return(Zr=lr.current)===null||Zr===void 0||Zr.addEventListener("wheel",qr),function(){var Pr;(Pr=lr.current)===null||Pr===void 0||Pr.removeEventListener("wheel",qr)}},[]);var Tt=ze[ze.length-1],$r={fixed:Tt?Tt.fixed:null,onHeaderCell:function(){return{className:"".concat(ut,"-cell-scrollbar")}}},Ur=Object(f.useMemo)(function(){return Mt?[].concat(Object(C.a)(rt),[$r]):rt},[Mt,rt]),Br=Object(f.useMemo)(function(){return Mt?[].concat(Object(C.a)(ze),[$r]):ze},[Mt,ze]),ln=Object(f.useMemo)(function(){var Zr=Re.right,qr=Re.left;return Object(h.a)(Object(h.a)({},Re),{},{left:Te==="rtl"?[].concat(Object(C.a)(qr.map(function(Pr){return Pr+Mt})),[0]):qr,right:Te==="rtl"?Zr:[].concat(Object(C.a)(Zr.map(function(Pr){return Pr+Mt})),[0]),isSticky:Dt})},[Mt,Re,Dt]),br=M(et,ke);return f.createElement("div",{style:Object(h.a)({overflow:"hidden"},Dt?{top:ye}:{}),ref:dr,className:d()("".concat(ut,"-header"),Object(L.a)({},Ee,!!Ee))},f.createElement("table",{style:{tableLayout:"fixed",visibility:Je||br?null:"hidden"}},f.createElement(T,{colWidths:br?[].concat(Object(C.a)(br),[Mt]):[],columCount:ke+1,columns:Br}),f.createElement(b,Object.assign({},We,{stickyOffsets:ln,columns:Ur,flattenColumns:Br}))))});N.displayName="FixedHeader";var I=N,K=f.createContext(null),H=K;function W(Me){var Ce=Me.prefixCls,Je=Me.children,rt=Me.component,ze=Me.cellComponent,et=Me.fixHeader,ke=Me.fixColumn,Re=Me.horizonScroll,Te=Me.className,fe=Me.expanded,ye=Me.componentWidth,Ee=Me.colSpan,Oe=f.useContext(i.a),We=Oe.scrollbarSize;return f.useMemo(function(){var Ve=Je;return ke&&(Ve=f.createElement("div",{style:{width:ye-(et?We:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ce,"-expanded-row-fixed")},Ve)),f.createElement(rt,{className:Te,style:{display:fe?null:"none"}},f.createElement(n.a,{component:ze,prefixCls:Ce,colSpan:Ee},Ve))},[Je,rt,et,Re,Te,fe,ye,Ee,We])}var z=W;function U(Me){var Ce=Me.className,Je=Me.style,rt=Me.record,ze=Me.index,et=Me.rowKey,ke=Me.getRowKey,Re=Me.rowExpandable,Te=Me.expandedKeys,fe=Me.onRow,ye=Me.indent,Ee=ye===void 0?0:ye,Oe=Me.rowComponent,We=Me.cellComponent,Ve=Me.childrenColumnName,ut=f.useContext(i.a),ft=ut.prefixCls,Dt=ut.fixedInfoList,Mt=f.useContext(H),lr=Mt.fixHeader,dr=Mt.fixColumn,Tt=Mt.horizonScroll,$r=Mt.componentWidth,Ur=Mt.flattenColumns,Br=Mt.expandableType,ln=Mt.expandRowByClick,br=Mt.onTriggerExpand,Zr=Mt.rowClassName,qr=Mt.expandedRowClassName,Pr=Mt.indentSize,fn=Mt.expandIcon,bn=Mt.expandedRowRender,Gn=Mt.expandIconColumnIndex,hn=f.useState(!1),ca=Object(u.a)(hn,2),wa=ca[0],mn=ca[1],Yt=Te&&Te.has(Me.recordKey);f.useEffect(function(){Yt&&mn(!0)},[Yt]);var kn=Br==="row"&&(!Re||Re(rt)),va=Br==="nest",Vn=Ve&&rt&&rt[Ve],Xr=kn||va,Fn;fe&&(Fn=fe(rt,ze));var da=function(cr){if(ln&&Xr&&br(rt,cr),Fn&&Fn.onClick){for(var Mn,Wn=arguments.length,Jn=new Array(Wn>1?Wn-1:0),Nn=1;Nn<Wn;Nn++)Jn[Nn-1]=arguments[Nn];(Mn=Fn).onClick.apply(Mn,[cr].concat(Jn))}},Zn;typeof Zr=="string"?Zn=Zr:typeof Zr=="function"&&(Zn=Zr(rt,ze,Ee));var St=Object(S.a)(Ur),ir=f.createElement(Oe,Object.assign({},Fn,{"data-row-key":et,className:d()(Ce,"".concat(ft,"-row"),"".concat(ft,"-row-level-").concat(Ee),Zn,Fn&&Fn.className),style:Object(h.a)(Object(h.a)({},Je),Fn?Fn.style:null),onClick:da}),Ur.map(function(Yn,cr){var Mn=Yn.render,Wn=Yn.dataIndex,Jn=Yn.className,Nn=St[cr],fa=Dt[cr],Er;cr===(Gn||0)&&va&&(Er=f.createElement(f.Fragment,null,f.createElement("span",{style:{paddingLeft:"".concat(Pr*Ee,"px")},className:"".concat(ft,"-row-indent indent-level-").concat(Ee)}),fn({prefixCls:ft,expanded:Yt,expandable:Vn,record:rt,onExpand:br})));var ot;return Yn.onCell&&(ot=Yn.onCell(rt,ze)),f.createElement(n.a,Object.assign({className:Jn,ellipsis:Yn.ellipsis,align:Yn.align,component:We,prefixCls:ft,key:Nn,record:rt,index:ze,dataIndex:Wn,render:Mn,shouldCellUpdate:Yn.shouldCellUpdate},fa,{appendNode:Er,additionalProps:ot}))})),$n;if(kn&&(wa||Yt)){var na=bn(rt,ze,Ee+1,Yt),It=qr&&qr(rt,ze,Ee);$n=f.createElement(z,{expanded:Yt,className:d()("".concat(ft,"-expanded-row"),"".concat(ft,"-expanded-row-level-").concat(Ee+1),It),prefixCls:ft,fixHeader:lr,fixColumn:dr,horizonScroll:Tt,component:Oe,componentWidth:$r,cellComponent:We,colSpan:Ur.length},na)}var ga;return Vn&&Yt&&(ga=(rt[Ve]||[]).map(function(Yn,cr){var Mn=ke(Yn,cr);return f.createElement(U,Object.assign({},Me,{key:Mn,rowKey:Mn,record:Yn,recordKey:Mn,index:cr,indent:Ee+1}))})),f.createElement(f.Fragment,null,ir,$n,ga)}U.displayName="BodyRow";var B=U,G=f.createContext(null),q=G;function ae(Me){var Ce=Me.columnKey,Je=Me.onColumnResize,rt=f.useRef();return f.useEffect(function(){rt.current&&Je(Ce,rt.current.offsetWidth)},[]),f.createElement(_.a,{onResize:function(et){var ke=et.offsetWidth;Je(Ce,ke)}},f.createElement("td",{ref:rt,style:{padding:0,border:0,height:0}},f.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function se(Me){var Ce=Me.data,Je=Me.getRowKey,rt=Me.measureColumnWidth,ze=Me.expandedKeys,et=Me.onRow,ke=Me.rowExpandable,Re=Me.emptyNode,Te=Me.childrenColumnName,fe=f.useContext(q),ye=fe.onColumnResize,Ee=f.useContext(i.a),Oe=Ee.prefixCls,We=Ee.getComponent,Ve=f.useContext(H),ut=Ve.fixHeader,ft=Ve.horizonScroll,Dt=Ve.flattenColumns,Mt=Ve.componentWidth;return f.useMemo(function(){var lr=We(["body","wrapper"],"tbody"),dr=We(["body","row"],"tr"),Tt=We(["body","cell"],"td"),$r;Ce.length?$r=Ce.map(function(Br,ln){var br=Je(Br,ln);return f.createElement(B,{key:br,rowKey:br,record:Br,recordKey:br,index:ln,rowComponent:dr,cellComponent:Tt,expandedKeys:ze,onRow:et,getRowKey:Je,rowExpandable:ke,childrenColumnName:Te})}):$r=f.createElement(z,{expanded:!0,className:"".concat(Oe,"-placeholder"),prefixCls:Oe,fixHeader:ut,fixColumn:ft,horizonScroll:ft,component:dr,componentWidth:Mt,cellComponent:Tt,colSpan:Dt.length},Re);var Ur=Object(S.a)(Dt);return f.createElement(lr,{className:"".concat(Oe,"-tbody")},rt&&f.createElement("tr",{"aria-hidden":"true",className:"".concat(Oe,"-measure-row"),style:{height:0}},Ur.map(function(Br){return f.createElement(ae,{key:Br,columnKey:Br,onColumnResize:ye})})),$r)},[Ce,Oe,et,rt,ze,Je,We,Mt,Re,Dt])}var we=f.memo(se);we.displayName="Body";var Se=we,de=k("wRmb"),xe=k("xEkU"),he=k.n(xe);function ne(Me){var Ce=Object(f.useRef)(Me),Je=Object(f.useState)({}),rt=Object(u.a)(Je,2),ze=rt[1],et=Object(f.useRef)(null),ke=Object(f.useRef)([]);function Re(Te){et.current===null&&(ke.current=[],et.current=he()(function(){ke.current.forEach(function(fe){Ce.current=fe(Ce.current)}),et.current=null,ze({})})),ke.current.push(Te)}return Object(f.useEffect)(function(){return function(){he.a.cancel(et.current)}},[]),[Ce.current,Re]}function oe(Me){var Ce=Object(f.useRef)(Me),Je=Object(f.useRef)(null);function rt(){window.clearTimeout(Je.current)}function ze(ke){Ce.current=ke,rt(),Je.current=window.setTimeout(function(){Ce.current=null,Je.current=null},100)}function et(){return Ce.current}return Object(f.useEffect)(function(){return rt},[]),[ze,et]}function te(Me,Ce,Je){var rt=Object(f.useMemo)(function(){for(var ze=[],et=[],ke=0,Re=0,Te=0;Te<Ce;Te+=1)if(Je==="rtl"){et[Te]=Re,Re+=Me[Te]||0;var fe=Ce-Te-1;ze[fe]=ke,ke+=Me[fe]||0}else{ze[Te]=ke,ke+=Me[Te]||0;var ye=Ce-Te-1;et[ye]=Re,Re+=Me[ye]||0}return{left:ze,right:et}},[Me,Ce,Je]);return rt}var le=te;function Y(Me){var Ce=Me.className,Je=Me.children;return f.createElement("div",{className:Ce},Je)}var Z=Y,ge=k("n6Qo");function ee(Me){var Ce,Je=Me.prefixCls,rt=Me.record,ze=Me.onExpand,et=Me.expanded,ke=Me.expandable,Re="".concat(Je,"-row-expand-icon");if(!ke)return f.createElement("span",{className:d()(Re,"".concat(Je,"-row-spaced"))});var Te=function(ye){ze(rt,ye),ye.stopPropagation()};return f.createElement("span",{className:d()(Re,(Ce={},Object(L.a)(Ce,"".concat(Je,"-row-expanded"),et),Object(L.a)(Ce,"".concat(Je,"-row-collapsed"),!et),Ce)),onClick:Te})}function $(Me,Ce,Je){var rt=[];function ze(et){(et||[]).forEach(function(ke,Re){rt.push(Ce(ke,Re)),ze(ke[Je])})}return ze(Me),rt}var X=k("zT1h"),J=k("y0+3"),me=function(Ce,Je){var rt,ze,et=Ce.scrollBodyRef,ke=Ce.onScroll,Re=Ce.offsetScroll,Te=f.useContext(i.a),fe=Te.prefixCls,ye=((rt=et.current)===null||rt===void 0?void 0:rt.scrollWidth)||0,Ee=((ze=et.current)===null||ze===void 0?void 0:ze.clientWidth)||0,Oe=ye&&Ee*(Ee/ye),We=f.useRef(),Ve=ne({scrollLeft:0,isHiddenScrollBar:!1}),ut=Object(u.a)(Ve,2),ft=ut[0],Dt=ut[1],Mt=f.useRef({delta:0,x:0}),lr=f.useState(!1),dr=Object(u.a)(lr,2),Tt=dr[0],$r=dr[1],Ur=function(){$r(!1)},Br=function(Pr){Pr.persist(),Mt.current.delta=Pr.pageX-ft.scrollLeft,Mt.current.x=0,$r(!0),Pr.preventDefault()},ln=function(Pr){var fn,bn=Pr||((fn=window)===null||fn===void 0?void 0:fn.event),Gn=bn.buttons;if(!Tt||Gn===0){Tt&&$r(!1);return}var hn=Mt.current.x+Pr.pageX-Mt.current.x-Mt.current.delta;hn<=0&&(hn=0),hn+Oe>=Ee&&(hn=Ee-Oe),ke({scrollLeft:hn/Ee*(ye+2)}),Mt.current.x=Pr.pageX},br=function(){var Pr=Object(J.b)(et.current).top,fn=Pr+et.current.offsetHeight,bn=document.documentElement.scrollTop+window.innerHeight;fn-Object(m.a)()<=bn||Pr>=bn-Re?Dt(function(Gn){return Object(h.a)(Object(h.a)({},Gn),{},{isHiddenScrollBar:!0})}):Dt(function(Gn){return Object(h.a)(Object(h.a)({},Gn),{},{isHiddenScrollBar:!1})})},Zr=function(Pr){Dt(function(fn){return Object(h.a)(Object(h.a)({},fn),{},{scrollLeft:Pr/ye*Ee||0})})};return f.useImperativeHandle(Je,function(){return{setScrollLeft:Zr}}),f.useEffect(function(){var qr=Object(X.a)(document.body,"mouseup",Ur,!1),Pr=Object(X.a)(document.body,"mousemove",ln,!1);return br(),function(){qr.remove(),Pr.remove()}},[Oe,Tt]),f.useEffect(function(){var qr=Object(X.a)(window,"scroll",br,!1),Pr=Object(X.a)(window,"resize",br,!1);return function(){qr.remove(),Pr.remove()}},[]),f.useEffect(function(){ft.isHiddenScrollBar||Dt(function(qr){var Pr,fn;return Object(h.a)(Object(h.a)({},qr),{},{scrollLeft:et.current.scrollLeft/((Pr=et.current)===null||Pr===void 0?void 0:Pr.scrollWidth)*((fn=et.current)===null||fn===void 0?void 0:fn.clientWidth)})})},[ft.isHiddenScrollBar]),ye<=Ee||!Oe||ft.isHiddenScrollBar?null:f.createElement("div",{style:{height:Object(m.a)(),width:Ee,bottom:Re},className:"".concat(fe,"-sticky-scroll")},f.createElement("div",{onMouseDown:Br,ref:We,className:d()("".concat(fe,"-sticky-scroll-bar"),Object(L.a)({},"".concat(fe,"-sticky-scroll-bar-active"),Tt)),style:{width:"".concat(Oe,"px"),transform:"translate3d(".concat(ft.scrollLeft,"px, 0, 0)")}}))},ue=f.forwardRef(me);function _e(Me,Ce){return f.useMemo(function(){var Je=!!Me;return{isSticky:Je,stickyClassName:Je?"".concat(Ce,"-sticky-header"):"",offsetHeader:Object(D.a)(Me)==="object"&&Me.offsetHeader||0,offsetScroll:Object(D.a)(Me)==="object"&&Me.offsetScroll||0}},[Me,Ce])}var He=[],$e={},Ye="rc-table-internal-hook",tt=f.memo(function(Me){var Ce=Me.children;return Ce},function(Me,Ce){return l()(Me.props,Ce.props)?Me.pingLeft!==Ce.pingLeft||Me.pingRight!==Ce.pingRight:!1});function nt(Me){var Ce,Je=Me.prefixCls,rt=Me.className,ze=Me.rowClassName,et=Me.style,ke=Me.data,Re=Me.rowKey,Te=Me.scroll,fe=Me.tableLayout,ye=Me.direction,Ee=Me.title,Oe=Me.footer,We=Me.summary,Ve=Me.id,ut=Me.showHeader,ft=Me.components,Dt=Me.emptyText,Mt=Me.onRow,lr=Me.onHeaderRow,dr=Me.internalHooks,Tt=Me.transformColumns,$r=Me.internalRefs,Ur=Me.sticky,Br=ke||He,ln=!!Br.length,br=f.useState(0),Zr=Object(u.a)(br,2),qr=Zr[0],Pr=Zr[1];f.useEffect(function(){Pr(Object(m.a)())});var fn=f.useMemo(function(){return Object(S.c)(ft,{})},[ft]),bn=f.useCallback(function(gr,Gt){return Object(S.b)(fn,gr)||Gt},[fn]),Gn=f.useMemo(function(){return typeof Re=="function"?Re:function(gr){var Gt=gr&&gr[Re];return Gt}},[Re]),hn=Object(y.c)(Me),ca=hn.expandIcon,wa=hn.expandedRowKeys,mn=hn.defaultExpandedRowKeys,Yt=hn.defaultExpandAllRows,kn=hn.expandedRowRender,va=hn.onExpand,Vn=hn.onExpandedRowsChange,Xr=hn.expandRowByClick,Fn=hn.rowExpandable,da=hn.expandIconColumnIndex,Zn=hn.expandedRowClassName,St=hn.childrenColumnName,ir=hn.indentSize,$n=ca||ee,na=St||"children",It=f.useMemo(function(){return kn?"row":Me.expandable&&dr===Ye&&Me.expandable.__PARENT_RENDER_ICON__||Br.some(function(gr){return gr&&Object(D.a)(gr)==="object"&&gr[na]})?"nest":!1},[!!kn,Br]),ga=f.useState(function(){return mn||(Yt?$(Br,Gn,na):[])}),Yn=Object(u.a)(ga,2),cr=Yn[0],Mn=Yn[1],Wn=f.useMemo(function(){return new Set(wa||cr||[])},[wa,cr]),Jn=f.useCallback(function(gr){var Gt=Gn(gr,Br.indexOf(gr)),zt,Mr=Wn.has(Gt);Mr?(Wn.delete(Gt),zt=Object(C.a)(Wn)):zt=[].concat(Object(C.a)(Wn),[Gt]),Mn(zt),va&&va(!Mr,gr),Vn&&Vn(zt)},[Gn,Wn,Br,va,Vn]),Nn=f.useState(0),fa=Object(u.a)(Nn,2),Er=fa[0],ot=fa[1],ar=Object(de.b)(Object(h.a)(Object(h.a)(Object(h.a)({},Me),hn),{},{expandable:!!kn,expandedKeys:Wn,getRowKey:Gn,onTriggerExpand:Jn,expandIcon:$n,expandIconColumnIndex:da,direction:ye}),dr===Ye?Tt:null),xr=Object(u.a)(ar,2),on=xr[0],un=xr[1],_n=f.useMemo(function(){return{columns:on,flattenColumns:un}},[on,un]),Tn=f.useRef(),Sn=f.useRef(),ya=f.useRef(),Ta=f.useState(!1),Sa=Object(u.a)(Ta,2),qn=Sa[0],vi=Sa[1],gi=f.useState(!1),Ka=Object(u.a)(gi,2),Ma=Ka[0],wi=Ka[1],ui=ne(new Map),Ti=Object(u.a)(ui,2),ci=Ti[0],za=Ti[1],Ca=Object(S.a)(un),Qa=Ca.map(function(gr){return ci.get(gr)}),ei=f.useMemo(function(){return Qa},[Qa.join("_")]),ht=le(ei,un.length,ye),Ze=Te&&Object(S.d)(Te.y),dt=Te&&Object(S.d)(Te.x),Et=dt&&un.some(function(gr){var Gt=gr.fixed;return Gt}),Ut=f.useRef(),Pt=_e(Ur,Je),Zt=Pt.isSticky,kt=Pt.offsetHeader,lt=Pt.offsetScroll,mt=Pt.stickyClassName,xt,_t,wt;Ze&&(_t={overflowY:"scroll",maxHeight:Te.y}),dt&&(xt={overflowX:"auto"},Ze||(_t={overflowY:"hidden"}),wt={width:Te.x===!0?"auto":Te.x,minWidth:"100%"});var yt=f.useCallback(function(gr,Gt){za(function(zt){var Mr=new Map(zt);return Mr.set(gr,Gt),Mr})},[]),Ct=oe(null),At=Object(u.a)(Ct,2),jt=At[0],Vt=At[1];function Xe(gr,Gt){if(!Gt)return;typeof Gt=="function"?Gt(gr):Gt.scrollLeft!==gr&&(Gt.scrollLeft=gr)}var qt=function(Gt){var zt=Gt.currentTarget,Mr=Gt.scrollLeft,tr=typeof Mr=="number"?Mr:zt.scrollLeft,pt=zt||$e;if(!Vt()||Vt()===pt){var Lt;jt(pt),Xe(tr,Sn.current),Xe(tr,ya.current),Xe(tr,(Lt=Ut.current)===null||Lt===void 0?void 0:Lt.setScrollLeft)}if(zt){var vt=zt.scrollWidth,ct=zt.clientWidth;vi(tr>0),wi(tr<vt-ct)}},sr=function(){ya.current&&qt({currentTarget:ya.current})},er=function(Gt){var zt=Gt.width;sr(),ot(Tn.current?Tn.current.offsetWidth:zt)};f.useEffect(function(){return sr},[]),f.useEffect(function(){dt&&sr()},[dt]),f.useEffect(function(){dr===Ye&&$r&&($r.body.current=ya.current)});var Bt=bn(["table"],"table"),Nt=f.useMemo(function(){return fe||(Et?Te.x==="max-content"?"auto":"fixed":Ze||un.some(function(gr){var Gt=gr.ellipsis;return Gt})?"fixed":"auto")},[Ze,Et,un,fe]),$t,Ft={colWidths:ei,columCount:un.length,stickyOffsets:ht,onHeaderRow:lr,fixHeader:Ze},Sr=f.useMemo(function(){return ln?null:typeof Dt=="function"?Dt():Dt},[ln,Dt]),Ar=f.createElement(Se,{data:Br,measureColumnWidth:Ze||dt||Zt,expandedKeys:Wn,rowExpandable:Fn,getRowKey:Gn,onRow:Mt,emptyNode:Sr,childrenColumnName:na}),Yr=f.createElement(T,{colWidths:un.map(function(gr){var Gt=gr.width;return Gt}),columns:un}),vn=We&&f.createElement(ge.b,null,We(Br)),Jr=bn(["body"]);if(Ze||Zt){var Kt;typeof Jr=="function"?(Kt=Jr(Br,{scrollbarSize:qr,ref:ya,onScroll:qt}),Ft.colWidths=un.map(function(gr,Gt){var zt=gr.width,Mr=Gt===on.length-1?zt-qr:zt;return typeof Mr=="number"&&!Number.isNaN(Mr)?Mr:(Object(a.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Kt=f.createElement("div",{style:Object(h.a)(Object(h.a)({},xt),_t),onScroll:qt,ref:ya,className:d()("".concat(Je,"-body"))},f.createElement(Bt,{style:Object(h.a)(Object(h.a)({},wt),{},{tableLayout:Nt})},Yr,Ar,vn),Zt&&f.createElement(ue,{ref:Ut,offsetScroll:lt,scrollBodyRef:ya,onScroll:qt})),$t=f.createElement(f.Fragment,null,ut!==!1&&f.createElement(I,Object.assign({noData:!Br.length},Ft,_n,{direction:ye,offsetHeader:kt,stickyClassName:mt,ref:Sn,onScroll:qt})),Kt)}else $t=f.createElement("div",{style:Object(h.a)(Object(h.a)({},xt),_t),className:d()("".concat(Je,"-content")),onScroll:qt,ref:ya},f.createElement(Bt,{style:Object(h.a)(Object(h.a)({},wt),{},{tableLayout:Nt})},Yr,ut!==!1&&f.createElement(b,Object.assign({},Ft,_n)),Ar,vn));var st=Object(y.b)(Me),rn=f.createElement("div",Object.assign({className:d()(Je,rt,(Ce={},Object(L.a)(Ce,"".concat(Je,"-rtl"),ye==="rtl"),Object(L.a)(Ce,"".concat(Je,"-ping-left"),qn),Object(L.a)(Ce,"".concat(Je,"-ping-right"),Ma),Object(L.a)(Ce,"".concat(Je,"-layout-fixed"),fe==="fixed"),Object(L.a)(Ce,"".concat(Je,"-fixed-header"),Ze),Object(L.a)(Ce,"".concat(Je,"-fixed-column"),Et),Object(L.a)(Ce,"".concat(Je,"-scroll-horizontal"),dt),Object(L.a)(Ce,"".concat(Je,"-has-fix-left"),un[0]&&un[0].fixed),Object(L.a)(Ce,"".concat(Je,"-has-fix-right"),un[un.length-1]&&un[un.length-1].fixed==="right"),Ce)),style:et,id:Ve,ref:Tn},st),f.createElement(tt,{pingLeft:qn,pingRight:Ma,props:Object(h.a)(Object(h.a)({},Me),{},{stickyOffsets:ht,mergedExpandedKeys:Wn})},Ee&&f.createElement(Z,{className:"".concat(Je,"-title")},Ee(Br)),f.createElement("div",{className:"".concat(Je,"-container")},$t),Oe&&f.createElement(Z,{className:"".concat(Je,"-footer")},Oe(Br))));dt&&(rn=f.createElement(_.a,{onResize:er},rn));var gn=f.useMemo(function(){return{prefixCls:Je,getComponent:bn,scrollbarSize:qr,direction:ye,fixedInfoList:un.map(function(gr,Gt){return t(Gt,Gt,un,ht,ye)}),isSticky:Zt}},[Je,bn,qr,ye,un,ht,ye,Zt]),_r=f.useMemo(function(){return Object(h.a)(Object(h.a)({},_n),{},{tableLayout:Nt,rowClassName:ze,expandedRowClassName:Zn,componentWidth:Er,fixHeader:Ze,fixColumn:Et,horizonScroll:dt,expandIcon:$n,expandableType:It,expandRowByClick:Xr,expandedRowRender:kn,onTriggerExpand:Jn,expandIconColumnIndex:da,indentSize:ir})},[_n,Nt,ze,Zn,Er,Ze,Et,dt,$n,It,Xr,kn,Jn,da,ir]),fr=f.useMemo(function(){return{onColumnResize:yt}},[yt]);return f.createElement(i.a.Provider,{value:gn},f.createElement(H.Provider,{value:_r},f.createElement(q.Provider,{value:fr},rn)))}nt.Column=g.a,nt.ColumnGroup=c.a,nt.Summary=ge.a,nt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var it=Q.b=nt},wMS7:function(j,Q,k){/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.0.8/LICENSE */(function(L,h){j.exports=h()})(this,function(){"use strict";function L(Y){if(Array.isArray(Y)){for(var Z=0,ge=Array(Y.length);Z<Y.length;Z++)ge[Z]=Y[Z];return ge}else return Array.from(Y)}var h=Object.hasOwnProperty,C=Object.setPrototypeOf,D=Object.isFrozen,u=Object.keys,f=Object.freeze,w=Object.seal,d=Object.create,o=typeof Reflect!="undefined"&&Reflect,l=o.apply,a=o.construct;l||(l=function(Z,ge,ee){return Z.apply(ge,ee)}),f||(f=function(Z){return Z}),w||(w=function(Z){return Z}),a||(a=function(Z,ge){return new(Function.prototype.bind.apply(Z,[null].concat(L(ge))))});var _=b(Array.prototype.forEach),m=b(Array.prototype.indexOf),c=b(Array.prototype.join),g=b(Array.prototype.pop),v=b(Array.prototype.push),x=b(Array.prototype.slice),n=b(String.prototype.toLowerCase),i=b(String.prototype.match),t=b(String.prototype.replace),S=b(String.prototype.indexOf),E=b(String.prototype.trim),s=b(RegExp.prototype.test),P=y(RegExp),O=y(TypeError);function b(Y){return function(Z){for(var ge=arguments.length,ee=Array(ge>1?ge-1:0),$=1;$<ge;$++)ee[$-1]=arguments[$];return l(Y,Z,ee)}}function y(Y){return function(){for(var Z=arguments.length,ge=Array(Z),ee=0;ee<Z;ee++)ge[ee]=arguments[ee];return a(Y,ge)}}function p(Y,Z){C&&C(Y,null);for(var ge=Z.length;ge--;){var ee=Z[ge];if(typeof ee=="string"){var $=n(ee);$!==ee&&(D(Z)||(Z[ge]=$),ee=$)}Y[ee]=!0}return Y}function T(Y){var Z=d(null),ge=void 0;for(ge in Y)l(h,Y,[ge])&&(Z[ge]=Y[ge]);return Z}var M=f(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),N=f(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),I=f(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),K=f(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),H=f(["#text"]),W=f(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns"]),z=f(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),U=f(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),B=f(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),G=w(/\{\{[\s\S]*|[\s\S]*\}\}/gm),q=w(/<%[\s\S]*|[\s\S]*%>/gm),ae=w(/^data-[\-\w.\u00B7-\uFFFF]/),se=w(/^aria-[\-\w]+$/),we=w(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Se=w(/^(?:\w+script|data):/i),de=w(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y};function he(Y){if(Array.isArray(Y)){for(var Z=0,ge=Array(Y.length);Z<Y.length;Z++)ge[Z]=Y[Z];return ge}else return Array.from(Y)}var ne=function(){return typeof window=="undefined"?null:window},oe=function(Z,ge){if((typeof Z=="undefined"?"undefined":xe(Z))!=="object"||typeof Z.createPolicy!="function")return null;var ee=null,$="data-tt-policy-suffix";ge.currentScript&&ge.currentScript.hasAttribute($)&&(ee=ge.currentScript.getAttribute($));var X="dompurify"+(ee?"#"+ee:"");try{return Z.createPolicy(X,{createHTML:function(me){return me}})}catch(J){return console.warn("TrustedTypes policy "+X+" could not be created."),null}};function te(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ne(),Z=function(ot){return te(ot)};if(Z.version="2.0.15",Z.removed=[],!Y||!Y.document||Y.document.nodeType!==9)return Z.isSupported=!1,Z;var ge=Y.document,ee=!1,$=Y.document,X=Y.DocumentFragment,J=Y.HTMLTemplateElement,me=Y.Node,ue=Y.NodeFilter,_e=Y.NamedNodeMap,He=_e===void 0?Y.NamedNodeMap||Y.MozNamedAttrMap:_e,$e=Y.Text,Ye=Y.Comment,tt=Y.DOMParser,nt=Y.trustedTypes;if(typeof J=="function"){var it=$.createElement("template");it.content&&it.content.ownerDocument&&($=it.content.ownerDocument)}var Me=oe(nt,ge),Ce=Me&&ca?Me.createHTML(""):"",Je=$,rt=Je.implementation,ze=Je.createNodeIterator,et=Je.getElementsByTagName,ke=Je.createDocumentFragment,Re=ge.importNode,Te=T($).documentMode?$.documentMode:{},fe={};Z.isSupported=rt&&typeof rt.createHTMLDocument!="undefined"&&Te!==9;var ye=G,Ee=q,Oe=ae,We=se,Ve=Se,ut=de,ft=we,Dt=null,Mt=p({},[].concat(he(M),he(N),he(I),he(K),he(H))),lr=null,dr=p({},[].concat(he(W),he(z),he(U),he(B))),Tt=null,$r=null,Ur=!0,Br=!0,ln=!1,br=!1,Zr=!1,qr=!1,Pr=!1,fn=!1,bn=!1,Gn=!1,hn=!1,ca=!1,wa=!0,mn=!0,Yt=!1,kn={},va=p({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),Vn=null,Xr=p({},["audio","video","img","source","image","track"]),Fn=null,da=p({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Zn=null,St=$.createElement("form"),ir=function(ot){if(Zn&&Zn===ot)return;(!ot||(typeof ot=="undefined"?"undefined":xe(ot))!=="object")&&(ot={}),ot=T(ot),Dt="ALLOWED_TAGS"in ot?p({},ot.ALLOWED_TAGS):Mt,lr="ALLOWED_ATTR"in ot?p({},ot.ALLOWED_ATTR):dr,Fn="ADD_URI_SAFE_ATTR"in ot?p(T(da),ot.ADD_URI_SAFE_ATTR):da,Vn="ADD_DATA_URI_TAGS"in ot?p(T(Xr),ot.ADD_DATA_URI_TAGS):Xr,Tt="FORBID_TAGS"in ot?p({},ot.FORBID_TAGS):{},$r="FORBID_ATTR"in ot?p({},ot.FORBID_ATTR):{},kn="USE_PROFILES"in ot?ot.USE_PROFILES:!1,Ur=ot.ALLOW_ARIA_ATTR!==!1,Br=ot.ALLOW_DATA_ATTR!==!1,ln=ot.ALLOW_UNKNOWN_PROTOCOLS||!1,br=ot.SAFE_FOR_JQUERY||!1,Zr=ot.SAFE_FOR_TEMPLATES||!1,qr=ot.WHOLE_DOCUMENT||!1,bn=ot.RETURN_DOM||!1,Gn=ot.RETURN_DOM_FRAGMENT||!1,hn=ot.RETURN_DOM_IMPORT||!1,ca=ot.RETURN_TRUSTED_TYPE||!1,fn=ot.FORCE_BODY||!1,wa=ot.SANITIZE_DOM!==!1,mn=ot.KEEP_CONTENT!==!1,Yt=ot.IN_PLACE||!1,ft=ot.ALLOWED_URI_REGEXP||ft,Zr&&(Br=!1),Gn&&(bn=!0),kn&&(Dt=p({},[].concat(he(H))),lr=[],kn.html===!0&&(p(Dt,M),p(lr,W)),kn.svg===!0&&(p(Dt,N),p(lr,z),p(lr,B)),kn.svgFilters===!0&&(p(Dt,I),p(lr,z),p(lr,B)),kn.mathMl===!0&&(p(Dt,K),p(lr,U),p(lr,B))),ot.ADD_TAGS&&(Dt===Mt&&(Dt=T(Dt)),p(Dt,ot.ADD_TAGS)),ot.ADD_ATTR&&(lr===dr&&(lr=T(lr)),p(lr,ot.ADD_ATTR)),ot.ADD_URI_SAFE_ATTR&&p(Fn,ot.ADD_URI_SAFE_ATTR),mn&&(Dt["#text"]=!0),qr&&p(Dt,["html","head","body"]),Dt.table&&(p(Dt,["tbody"]),delete Tt.tbody),f&&f(ot),Zn=ot},$n=function(ot){v(Z.removed,{element:ot});try{ot.parentNode.removeChild(ot)}catch(ar){ot.outerHTML=Ce}},na=function(ot,ar){try{v(Z.removed,{attribute:ar.getAttributeNode(ot),from:ar})}catch(xr){v(Z.removed,{attribute:null,from:ar})}ar.removeAttribute(ot)},It=function(ot){var ar=void 0,xr=void 0;if(fn)ot="<remove></remove>"+ot;else{var on=i(ot,/^[\r\n\t ]+/);xr=on&&on[0]}var un=Me?Me.createHTML(ot):ot;try{ar=new tt().parseFromString(un,"text/html")}catch(Sn){}if(ee&&p(Tt,["title"]),!ar||!ar.documentElement){ar=rt.createHTMLDocument("");var _n=ar,Tn=_n.body;Tn.parentNode.removeChild(Tn.parentNode.firstElementChild),Tn.outerHTML=un}return ot&&xr&&ar.body.insertBefore($.createTextNode(xr),ar.body.childNodes[0]||null),et.call(ar,qr?"html":"body")[0]};Z.isSupported&&function(){try{var Er=It("<x/><title></title><img>");s(/<\/title/,Er.querySelector("title").innerHTML)&&(ee=!0)}catch(ot){}}();var ga=function(ot){return ze.call(ot.ownerDocument||ot,ot,ue.SHOW_ELEMENT|ue.SHOW_COMMENT|ue.SHOW_TEXT,function(){return ue.FILTER_ACCEPT},!1)},Yn=function(ot){return ot instanceof $e||ot instanceof Ye?!1:typeof ot.nodeName!="string"||typeof ot.textContent!="string"||typeof ot.removeChild!="function"||!(ot.attributes instanceof He)||typeof ot.removeAttribute!="function"||typeof ot.setAttribute!="function"||typeof ot.namespaceURI!="string"},cr=function(ot){return(typeof me=="undefined"?"undefined":xe(me))==="object"?ot instanceof me:ot&&(typeof ot=="undefined"?"undefined":xe(ot))==="object"&&typeof ot.nodeType=="number"&&typeof ot.nodeName=="string"},Mn=function(ot,ar,xr){if(!fe[ot])return;_(fe[ot],function(on){on.call(Z,ar,xr,Zn)})},Wn=function(ot){var ar=void 0;if(Mn("beforeSanitizeElements",ot,null),Yn(ot))return $n(ot),!0;if(i(ot.nodeName,/[\u0080-\uFFFF]/))return $n(ot),!0;var xr=n(ot.nodeName);if(Mn("uponSanitizeElement",ot,{tagName:xr,allowedTags:Dt}),(xr==="svg"||xr==="math")&&ot.querySelectorAll("p, br").length!==0)return $n(ot),!0;if(!Dt[xr]||Tt[xr]){if(mn&&!va[xr]&&typeof ot.insertAdjacentHTML=="function")try{var on=ot.innerHTML;ot.insertAdjacentHTML("AfterEnd",Me?Me.createHTML(on):on)}catch(un){}return $n(ot),!0}return xr==="noscript"&&s(/<\/noscript/i,ot.innerHTML)||xr==="noembed"&&s(/<\/noembed/i,ot.innerHTML)?($n(ot),!0):(br&&!cr(ot.firstElementChild)&&(!cr(ot.content)||!cr(ot.content.firstElementChild))&&s(/</g,ot.textContent)&&(v(Z.removed,{element:ot.cloneNode()}),ot.innerHTML?ot.innerHTML=t(ot.innerHTML,/</g,"<"):ot.innerHTML=t(ot.textContent,/</g,"<")),Zr&&ot.nodeType===3&&(ar=ot.textContent,ar=t(ar,ye," "),ar=t(ar,Ee," "),ot.textContent!==ar&&(v(Z.removed,{element:ot.cloneNode()}),ot.textContent=ar)),Mn("afterSanitizeElements",ot,null),!1)},Jn=function(ot,ar,xr){if(wa&&(ar==="id"||ar==="name")&&(xr in $||xr in St))return!1;if(!(Br&&s(Oe,ar))){if(!(Ur&&s(We,ar))){if(!lr[ar]||$r[ar])return!1;if(!Fn[ar]){if(!s(ft,t(xr,ut,""))){if(!((ar==="src"||ar==="xlink:href"||ar==="href")&&ot!=="script"&&S(xr,"data:")===0&&Vn[ot])){if(!(ln&&!s(Ve,t(xr,ut,"")))){if(xr)return!1}}}}}}return!0},Nn=function(ot){var ar=void 0,xr=void 0,on=void 0,un=void 0,_n=void 0;Mn("beforeSanitizeAttributes",ot,null);var Tn=ot.attributes;if(!Tn)return;var Sn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:lr};for(_n=Tn.length;_n--;){ar=Tn[_n];var ya=ar,Ta=ya.name,Sa=ya.namespaceURI;if(xr=E(ar.value),on=n(Ta),Sn.attrName=on,Sn.attrValue=xr,Sn.keepAttr=!0,Sn.forceKeepAttr=void 0,Mn("uponSanitizeAttribute",ot,Sn),xr=Sn.attrValue,Sn.forceKeepAttr)continue;if(on==="name"&&ot.nodeName==="IMG"&&Tn.id)un=Tn.id,Tn=x(Tn,[]),na("id",ot),na(Ta,ot),m(Tn,un)>_n&&ot.setAttribute("id",un.value);else{if(ot.nodeName==="INPUT"&&on==="type"&&xr==="file"&&Sn.keepAttr&&(lr[on]||!$r[on]))continue;Ta==="id"&&ot.setAttribute(Ta,""),na(Ta,ot)}if(!Sn.keepAttr)continue;if(br&&s(/\/>/i,xr)){na(Ta,ot);continue}if(s(/svg|math/i,ot.namespaceURI)&&s(P("</("+c(u(va),"|")+")","i"),xr)){na(Ta,ot);continue}Zr&&(xr=t(xr,ye," "),xr=t(xr,Ee," "));var qn=ot.nodeName.toLowerCase();if(!Jn(qn,on,xr))continue;try{Sa?ot.setAttributeNS(Sa,Ta,xr):ot.setAttribute(Ta,xr),g(Z.removed)}catch(vi){}}Mn("afterSanitizeAttributes",ot,null)},fa=function Er(ot){var ar=void 0,xr=ga(ot);for(Mn("beforeSanitizeShadowDOM",ot,null);ar=xr.nextNode();){if(Mn("uponSanitizeShadowNode",ar,null),Wn(ar))continue;ar.content instanceof X&&Er(ar.content),Nn(ar)}Mn("afterSanitizeShadowDOM",ot,null)};return Z.sanitize=function(Er,ot){var ar=void 0,xr=void 0,on=void 0,un=void 0,_n=void 0;if(Er||(Er="<!-->"),typeof Er!="string"&&!cr(Er)){if(typeof Er.toString!="function")throw O("toString is not a function");if(Er=Er.toString(),typeof Er!="string")throw O("dirty is not a string, aborting")}if(!Z.isSupported){if(xe(Y.toStaticHTML)==="object"||typeof Y.toStaticHTML=="function"){if(typeof Er=="string")return Y.toStaticHTML(Er);if(cr(Er))return Y.toStaticHTML(Er.outerHTML)}return Er}if(Pr||ir(ot),Z.removed=[],typeof Er=="string"&&(Yt=!1),!Yt)if(Er instanceof me)ar=It("<!-->"),xr=ar.ownerDocument.importNode(Er,!0),xr.nodeType===1&&xr.nodeName==="BODY"||xr.nodeName==="HTML"?ar=xr:ar.appendChild(xr);else{if(!bn&&!Zr&&!qr&&Er.indexOf("<")===-1)return Me&&ca?Me.createHTML(Er):Er;if(ar=It(Er),!ar)return bn?null:Ce}ar&&fn&&$n(ar.firstChild);for(var Tn=ga(Yt?Er:ar);on=Tn.nextNode();){if(on.nodeType===3&&on===un)continue;if(Wn(on))continue;on.content instanceof X&&fa(on.content),Nn(on),un=on}if(un=null,Yt)return Er;if(bn){if(Gn)for(_n=ke.call(ar.ownerDocument);ar.firstChild;)_n.appendChild(ar.firstChild);else _n=ar;return hn&&(_n=Re.call(ge,_n,!0)),_n}var Sn=qr?ar.outerHTML:ar.innerHTML;return Zr&&(Sn=t(Sn,ye," "),Sn=t(Sn,Ee," ")),Me&&ca?Me.createHTML(Sn):Sn},Z.setConfig=function(Er){ir(Er),Pr=!0},Z.clearConfig=function(){Zn=null,Pr=!1},Z.isValidAttribute=function(Er,ot,ar){Zn||ir({});var xr=n(Er),on=n(ot);return Jn(xr,on,ar)},Z.addHook=function(Er,ot){if(typeof ot!="function")return;fe[Er]=fe[Er]||[],v(fe[Er],ot)},Z.removeHook=function(Er){fe[Er]&&g(fe[Er])},Z.removeHooks=function(Er){fe[Er]&&(fe[Er]=[])},Z.removeAllHooks=function(){fe={}},Z}var le=te();return le})},wRmb:function(j,Q,k){"use strict";k.d(Q,"a",function(){return l});var L=k("rePB"),h=k("KQm4"),C=k("VTBJ"),D=k("Ff2n"),u=k("q1tI"),f=k.n(u),w=k("Kwbf"),d=k("Zm9Q"),o=k("hW8S");function l(g){return Object(d.a)(g).filter(function(v){return u.isValidElement(v)}).map(function(v){var x=v.key,n=v.props,i=n.children,t=Object(D.a)(n,["children"]),S=Object(C.a)({key:x},t);return i&&(S.children=l(i)),S})}function a(g){return g.reduce(function(v,x){var n=x.fixed,i=n===!0?"left":n,t=x.children;return t&&t.length>0?[].concat(Object(h.a)(v),Object(h.a)(a(t).map(function(S){return Object(C.a)({fixed:i},S)}))):[].concat(Object(h.a)(v),[Object(C.a)(Object(C.a)({},x),{},{fixed:i})])},[])}function _(g){for(var v=!0,x=0;x<g.length;x+=1){var n=g[x];if(v&&n.fixed!=="left")v=!1;else if(!v&&n.fixed==="left"){Object(w.a)(!1,"Index ".concat(x-1," of `columns` missing `fixed='left'` prop."));break}}for(var i=!0,t=g.length-1;t>=0;t-=1){var S=g[t];if(i&&S.fixed!=="right")i=!1;else if(!i&&S.fixed==="right"){Object(w.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function m(g){return g.map(function(v){var x=v.fixed,n=Object(D.a)(v,["fixed"]),i=x;return x==="left"?i="right":x==="right"&&(i="left"),Object(C.a)({fixed:i},n)})}function c(g,v){var x=g.prefixCls,n=g.columns,i=g.children,t=g.expandable,S=g.expandedKeys,E=g.getRowKey,s=g.onTriggerExpand,P=g.expandIcon,O=g.rowExpandable,b=g.expandIconColumnIndex,y=g.direction,p=g.expandRowByClick,T=u.useMemo(function(){return n||l(i)},[n,i]),M=u.useMemo(function(){if(t){var K,H=b||0,W=T[H],z=(K={},Object(L.a)(K,o.a,{className:"".concat(x,"-expand-icon-col")}),Object(L.a)(K,"title",""),Object(L.a)(K,"fixed",W?W.fixed:null),Object(L.a)(K,"className","".concat(x,"-row-expand-icon-cell")),Object(L.a)(K,"render",function(G,q,ae){var se=E(q,ae),we=S.has(se),Se=O?O(q):!0,de=P({prefixCls:x,expanded:we,expandable:Se,record:q,onExpand:s});return p?u.createElement("span",{onClick:function(he){return he.stopPropagation()}},de):de}),K),U=T.slice();return H>=0&&U.splice(H,0,z),U}return T},[t,T,E,S,P,y]),N=u.useMemo(function(){var K=M;return v&&(K=v(K)),K.length||(K=[{render:function(){return null}}]),K},[v,M,y]),I=u.useMemo(function(){return y==="rtl"?m(a(N)):a(N)},[N,y]);return[N,I]}Q.b=c},wZgz:function(j,Q,k){(function(L,h,C){j.exports=Q=h(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var h=L,C=h.lib,D=C.BlockCipher,u=h.algo,f=[],w=[],d=[],o=[],l=[],a=[],_=[],m=[],c=[],g=[];(function(){for(var n=[],i=0;i<256;i++)i<128?n[i]=i<<1:n[i]=i<<1^283;for(var t=0,S=0,i=0;i<256;i++){var E=S^S<<1^S<<2^S<<3^S<<4;E=E>>>8^E&255^99,f[t]=E,w[E]=t;var s=n[t],P=n[s],O=n[P],b=n[E]*257^E*16843008;d[t]=b<<24|b>>>8,o[t]=b<<16|b>>>16,l[t]=b<<8|b>>>24,a[t]=b;var b=O*16843009^P*65537^s*257^t*16843008;_[E]=b<<24|b>>>8,m[E]=b<<16|b>>>16,c[E]=b<<8|b>>>24,g[E]=b,t?(t=s^n[n[n[O^s]]],S^=n[n[S]]):t=S=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],x=u.AES=D.extend({_doReset:function(){var n;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var i=this._keyPriorReset=this._key,t=i.words,S=i.sigBytes/4,E=this._nRounds=S+6,s=(E+1)*4,P=this._keySchedule=[],O=0;O<s;O++)O<S?P[O]=t[O]:(n=P[O-1],O%S?S>6&&O%S==4&&(n=f[n>>>24]<<24|f[n>>>16&255]<<16|f[n>>>8&255]<<8|f[n&255]):(n=n<<8|n>>>24,n=f[n>>>24]<<24|f[n>>>16&255]<<16|f[n>>>8&255]<<8|f[n&255],n^=v[O/S|0]<<24),P[O]=P[O-S]^n);for(var b=this._invKeySchedule=[],y=0;y<s;y++){var O=s-y;if(y%4)var n=P[O];else var n=P[O-4];y<4||O<=4?b[y]=n:b[y]=_[f[n>>>24]]^m[f[n>>>16&255]]^c[f[n>>>8&255]]^g[f[n&255]]}},encryptBlock:function(n,i){this._doCryptBlock(n,i,this._keySchedule,d,o,l,a,f)},decryptBlock:function(n,i){var t=n[i+1];n[i+1]=n[i+3],n[i+3]=t,this._doCryptBlock(n,i,this._invKeySchedule,_,m,c,g,w);var t=n[i+1];n[i+1]=n[i+3],n[i+3]=t},_doCryptBlock:function(n,i,t,S,E,s,P,O){for(var b=this._nRounds,y=n[i]^t[0],p=n[i+1]^t[1],T=n[i+2]^t[2],M=n[i+3]^t[3],N=4,I=1;I<b;I++){var K=S[y>>>24]^E[p>>>16&255]^s[T>>>8&255]^P[M&255]^t[N++],H=S[p>>>24]^E[T>>>16&255]^s[M>>>8&255]^P[y&255]^t[N++],W=S[T>>>24]^E[M>>>16&255]^s[y>>>8&255]^P[p&255]^t[N++],z=S[M>>>24]^E[y>>>16&255]^s[p>>>8&255]^P[T&255]^t[N++];y=K,p=H,T=W,M=z}var K=(O[y>>>24]<<24|O[p>>>16&255]<<16|O[T>>>8&255]<<8|O[M&255])^t[N++],H=(O[p>>>24]<<24|O[T>>>16&255]<<16|O[M>>>8&255]<<8|O[y&255])^t[N++],W=(O[T>>>24]<<24|O[M>>>16&255]<<16|O[y>>>8&255]<<8|O[p&255])^t[N++],z=(O[M>>>24]<<24|O[y>>>16&255]<<16|O[p>>>8&255]<<8|O[T&255])^t[N++];n[i]=K,n[i+1]=H,n[i+2]=W,n[i+3]=z},keySize:256/32});h.AES=D._createHelper(x)}(),L.AES})},wbyO:function(j,Q,k){(function(L,h){j.exports=Q=h(k("Ib8C"))})(this,function(L){return function(){var h=L,C=h.lib,D=C.WordArray,u=h.enc,f=u.Base64url={stringify:function(d,o=!0){var l=d.words,a=d.sigBytes,_=o?this._safe_map:this._map;d.clamp();for(var m=[],c=0;c<a;c+=3)for(var g=l[c>>>2]>>>24-c%4*8&255,v=l[c+1>>>2]>>>24-(c+1)%4*8&255,x=l[c+2>>>2]>>>24-(c+2)%4*8&255,n=g<<16|v<<8|x,i=0;i<4&&c+i*.75<a;i++)m.push(_.charAt(n>>>6*(3-i)&63));var t=_.charAt(64);if(t)for(;m.length%4;)m.push(t);return m.join("")},parse:function(d,o=!0){var l=d.length,a=o?this._safe_map:this._map,_=this._reverseMap;if(!_){_=this._reverseMap=[];for(var m=0;m<a.length;m++)_[a.charCodeAt(m)]=m}var c=a.charAt(64);if(c){var g=d.indexOf(c);g!==-1&&(l=g)}return w(d,l,_)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function w(d,o,l){for(var a=[],_=0,m=0;m<o;m++)if(m%4){var c=l[d.charCodeAt(m-1)]<<m%4*2,g=l[d.charCodeAt(m)]>>>6-m%4*2,v=c|g;a[_>>>2]|=v<<24-_%4*8,_++}return D.create(a,_)}}(),L.enc.Base64url})},"y0+3":function(j,Q,k){"use strict";k.d(Q,"a",function(){return a}),k.d(Q,"b",function(){return m});var L=/margin|padding|width|height|max|min|offset/,h={left:!0,top:!0},C={cssFloat:1,styleFloat:1,float:1};function D(c){return c.nodeType===1?c.ownerDocument.defaultView.getComputedStyle(c,null):{}}function u(c,g,v){if(g=g.toLowerCase(),v==="auto"){if(g==="height")return c.offsetHeight;if(g==="width")return c.offsetWidth}return g in h||(h[g]=L.test(g)),h[g]?parseFloat(v)||0:v}function f(c,g){var v=arguments.length,x=D(c);return g=C[g]?"cssFloat"in c.style?"cssFloat":"styleFloat":g,v===1?x:u(c,g,x[g]||c.style[g])}function w(c,g,v){var x=arguments.length;if(g=C[g]?"cssFloat"in c.style?"cssFloat":"styleFloat":g,x===3)return typeof v=="number"&&L.test(g)&&(v="".concat(v,"px")),c.style[g]=v,v;for(var n in g)g.hasOwnProperty(n)&&w(c,n,g[n]);return D(c)}function d(c){return c===document.body?document.documentElement.clientWidth:c.offsetWidth}function o(c){return c===document.body?window.innerHeight||document.documentElement.clientHeight:c.offsetHeight}function l(){var c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),g=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:c,height:g}}function a(){var c=document.documentElement.clientWidth,g=window.innerHeight||document.documentElement.clientHeight;return{width:c,height:g}}function _(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function m(c){var g=c.getBoundingClientRect(),v=document.documentElement;return{left:g.left+(window.pageXOffset||v.scrollLeft)-(v.clientLeft||document.body.clientLeft||0),top:g.top+(window.pageYOffset||v.scrollTop)-(v.clientTop||document.body.clientTop||0)}}},zrhs:function(j,Q,k){"use strict";var L=k("2qtc"),h=k("kLXV"),C=k("PpiC"),D=k("q1tI"),u=k.n(D),f=k("9kvl"),w=function(o){var l=o.shixunsDetail,a=o.globalSetting,_=o.loading,m=o.dispatch,c=Object(C.a)(o,["shixunsDetail","globalSetting","loading","dispatch"]);return u.a.createElement(h.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:l.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){m({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){m({type:"shixunsDetail/setActionTabs",payload:{}})}},u.a.createElement("p",{className:"tc font16"},"\u5F53\u524D\u7ADE\u8D5B\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u8BF7\u5148\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1\u540E\u518D\u62A5\u540D\u53C2\u8D5B",u.a.createElement("br",null),"\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"))};Q.a=Object(f.a)(function(d){var o=d.shixunsDetail,l=d.loading,a=d.globalSetting;return{shixunsDetail:o,globalSetting:a,loading:l.models.index}})(w)}}]);
|