|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[134,5,6,7,8,13,20],{"+NIl":function(j,J,I){(function(L){L(I("VrN/"))})(function(L){"use strict";L.defineMode("stex",function(f,C){"use strict";function D(c,v){c.cmdState.push(v)}function u(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function m(c){var v=c.cmdState.pop();v&&v.closeBracket()}function w(c){for(var v=c.cmdState,g=v.length-1;g>=0;g--){var E=v[g];if(E.name=="DEFAULT")continue;return E}return{styleIdentifier:function(){return null}}}function p(c,v,g){return function(){this.name=c,this.bracketNo=0,this.style=v,this.styles=g,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var s={};s.importmodule=p("importmodule","tag",["string","builtin"]),s.documentclass=p("documentclass","tag",["","atom"]),s.usepackage=p("usepackage","tag",["atom"]),s.begin=p("begin","tag",["atom"]),s.end=p("end","tag",["atom"]),s.label=p("label","tag",["atom"]),s.ref=p("ref","tag",["atom"]),s.eqref=p("eqref","tag",["atom"]),s.cite=p("cite","tag",["atom"]),s.bibitem=p("bibitem","tag",["atom"]),s.Bibitem=p("Bibitem","tag",["atom"]),s.RBibitem=p("RBibitem","tag",["atom"]),s.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function l(c,v){c.f=v}function a(c,v){var g;if(c.match(/^\\[a-zA-Z@]+/)){var E=c.current().slice(1);return g=s.hasOwnProperty(E)?s[E]:s.DEFAULT,g=new g,D(v,g),l(v,h),g.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return l(v,function(o,t){return d(o,t,"\\]")}),"keyword";if(c.match("\\("))return l(v,function(o,t){return d(o,t,"\\)")}),"keyword";if(c.match("$$"))return l(v,function(o,t){return d(o,t,"$$")}),"keyword";if(c.match("$"))return l(v,function(o,t){return d(o,t,"$")}),"keyword";var n=c.next();if(n=="%")return c.skipToEnd(),"comment";if(n=="}"||n=="]"){if(g=u(v),g)g.closeBracket(n),l(v,h);else return"error";return"bracket"}else return n=="{"||n=="["?(g=s.DEFAULT,g=new g,D(v,g),"bracket"):/\d/.test(n)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),g=w(v),g.name=="begin"&&(g.argument=c.current()),g.styleIdentifier())}function d(c,v,g){if(c.eatSpace())return null;if(g&&c.match(g))return l(v,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 E=c.next();return E=="{"||E=="}"||E=="["||E=="]"||E=="("||E==")"?"bracket":E=="%"?(c.skipToEnd(),"comment"):"error"}function h(c,v){var g=c.peek(),E;return g=="{"||g=="["?(E=u(v),E.openBracket(g),c.eat(g),l(v,a),"bracket"):/[ \t\r]/.test(g)?(c.eat(g),null):(l(v,a),m(v),a(c,v))}return{startState:function(){var c=C.inMathMode?function(v,g){return d(v,g)}:a;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,v){return v.f(c,v)},blankLine:function(c){c.f=a,c.cmdState.length=0},lineComment:"%"}}),L.defineMIME("text/x-stex","stex"),L.defineMIME("text/x-latex","stex")})},"+ua5":function(j,J,I){},"19Vz":function(j,J,I){(function(L){L(I("VrN/"))})(function(L){L.defineOption("placeholder","",function(p,s,l){var a=l&&l!=L.Init;if(s&&!a)p.on("blur",u),p.on("change",m),p.on("swapDoc",m),L.on(p.getInputField(),"compositionupdate",p.state.placeholderCompose=function(){D(p)}),m(p);else if(!s&&a){p.off("blur",u),p.off("change",m),p.off("swapDoc",m),L.off(p.getInputField(),"compositionupdate",p.state.placeholderCompose),f(p);var d=p.getWrapperElement();d.className=d.className.replace(" CodeMirror-empty","")}s&&!p.hasFocus()&&u(p)});function f(p){p.state.placeholder&&(p.state.placeholder.parentNode.removeChild(p.state.placeholder),p.state.placeholder=null)}function C(p){f(p);var s=p.state.placeholder=document.createElement("pre");s.style.cssText="height: 0; overflow: visible",s.style.direction=p.getOption("direction"),s.className="CodeMirror-placeholder CodeMirror-line-like";var l=p.getOption("placeholder");typeof l=="string"&&(l=document.createTextNode(l)),s.appendChild(l),p.display.lineSpace.insertBefore(s,p.display.lineSpace.firstChild)}function D(p){setTimeout(function(){var s=!1,l=p.getInputField();l.nodeName=="TEXTAREA"?s=!l.value:p.lineCount()==1&&(s=!/[^\u200b]/.test(l.querySelector(".CodeMirror-line").textContent)),s?C(p):f(p)},20)}function u(p){w(p)&&C(p)}function m(p){var s=p.getWrapperElement(),l=w(p);s.className=s.className.replace(" CodeMirror-empty","")+(l?" CodeMirror-empty":""),l?C(p):f(p)}function w(p){return p.lineCount()===1&&p.getLine(0)===""}})},"1ZF9":function(j,J,I){j.exports=I.p+"static/Authorize.cc9c212f.png"},"1eCo":function(j,J,I){(function(L){L(I("VrN/"))})(function(L){"use strict";var f={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 m=D.indentUnit,w={},p=u.htmlMode?f:C;for(var s in p)w[s]=p[s];for(var s in u)w[s]=u[s];var l,a;function d(T,M){function k(z){return M.tokenize=z,z(T,M)}var N=T.next();if(N=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?k(v("atom","]]>")):null:T.match("--")?k(v("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),k(g(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),M.tokenize=v("meta","?>"),"meta"):(l=T.eat("/")?"closeTag":"openTag",M.tokenize=h,"tag bracket");if(N=="&"){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}d.isInText=!0;function h(T,M){var k=T.next();if(k==">"||k=="/"&&T.eat(">"))return M.tokenize=d,l=k==">"?"endTag":"selfcloseTag","tag bracket";if(k=="=")return l="equals",null;if(k=="<"){M.tokenize=d,M.state=t,M.tagName=M.tagStart=null;var N=M.tokenize(T,M);return N?N+" tag error":"tag error"}else return/[\'\"]/.test(k)?(M.tokenize=c(k),M.stringStartCol=T.column(),M.tokenize(T,M)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(T){var M=function(k,N){for(;!k.eol();)if(k.next()==T){N.tokenize=h;break}return"string"};return M.isInAttribute=!0,M}function v(T,M){return function(k,N){for(;!k.eol();){if(k.match(M)){N.tokenize=d;break}k.next()}return T}}function g(T){return function(M,k){for(var N;(N=M.next())!=null;){if(N=="<")return k.tokenize=g(T+1),k.tokenize(M,k);if(N==">")if(T==1){k.tokenize=d;break}else return k.tokenize=g(T-1),k.tokenize(M,k)}return"meta"}}function E(T,M,k){this.prev=T.context,this.tagName=M,this.indent=T.indented,this.startOfLine=k,(w.doNotIndent.hasOwnProperty(M)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function n(T){T.context&&(T.context=T.context.prev)}function o(T,M){for(var k;;){if(!T.context)return;if(k=T.context.tagName,!w.contextGrabbers.hasOwnProperty(k)||!w.contextGrabbers[k].hasOwnProperty(M))return;n(T)}}function t(T,M,k){return T=="openTag"?(k.tagStart=M.column(),S):T=="closeTag"?_:t}function S(T,M,k){return T=="word"?(k.tagName=M.current(),a="tag",O):w.allowMissingTagName&&T=="endTag"?(a="tag bracket",O(T,M,k)):(a="error",S)}function _(T,M,k){if(T=="word"){var N=M.current();return k.context&&k.context.tagName!=N&&w.implicitlyClosed.hasOwnProperty(k.context.tagName)&&n(k),k.context&&k.context.tagName==N||w.matchClosing===!1?(a="tag",i):(a="tag error",P)}else return w.allowMissingTagName&&T=="endTag"?(a="tag bracket",i(T,M,k)):(a="error",P)}function i(T,M,k){return T!="endTag"?(a="error",i):(n(k),t)}function P(T,M,k){return a="error",i(T,M,k)}function O(T,M,k){if(T=="word")return a="attribute",x;if(T=="endTag"||T=="selfcloseTag"){var N=k.tagName,K=k.tagStart;return k.tagName=k.tagStart=null,T=="selfcloseTag"||w.autoSelfClosers.hasOwnProperty(N)?o(k,N):(o(k,N),k.context=new E(k,N,K==k.indented)),t}return a="error",O}function x(T,M,k){return T=="equals"?b:(w.allowMissing||(a="error"),O(T,M,k))}function b(T,M,k){return T=="string"?y:T=="word"&&w.allowUnquoted?(a="string",O):(a="error",O(T,M,k))}function y(T,M,k){return T=="string"?y:O(T,M,k)}return{startState:function(T){var M={tokenize:d,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 k=M.tokenize(T,M);return(k||l)&&k!="comment"&&(a=null,M.state=M.state(l||k,T,M),a&&(k=a=="error"?k+" error":a)),k},indent:function(T,M,k){var N=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+m;if(N&&N.noIndent)return L.Pass;if(T.tokenize!=h&&T.tokenize!=d)return k?k.match(/^(\s*)/)[0].length:0;if(T.tagName)return w.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+m*(w.multilineTagIndentFactor||1);if(w.alignCDATA&&/<!\[CDATA\[/.test(M))return 0;var K=M&&/^<(\/)?([\w_:\.-]*)/.exec(M);if(K&&K[1])for(;N;)if(N.tagName==K[2]){N=N.prev;break}else if(w.implicitlyClosed.hasOwnProperty(N.tagName))N=N.prev;else break;else if(K)for(;N;){var z=w.contextGrabbers[N.tagName];if(z&&z.hasOwnProperty(K[2]))N=N.prev;else break}for(;N&&N.prev&&!N.startOfLine;)N=N.prev;return N?N.indent+m:T.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(T){T.state==b&&(T.state=O)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var M=[],k=T.context;k;k=k.prev)k.tagName&&M.push(k.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,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("MlIO"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.Hasher,u=f.x64,m=u.Word,w=u.WordArray,p=f.algo;function s(){return m.create.apply(m,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],a=[];(function(){for(var h=0;h<80;h++)a[h]=s()})();var d=p.SHA512=D.extend({_doReset:function(){this._hash=new w.init([new m.init(1779033703,4089235720),new m.init(3144134277,2227873595),new m.init(1013904242,4271175723),new m.init(2773480762,1595750129),new m.init(1359893119,2917565137),new m.init(2600822924,725511199),new m.init(528734635,4215389547),new m.init(1541459225,327033209)])},_doProcessBlock:function(h,c){for(var v=this._hash.words,g=v[0],E=v[1],n=v[2],o=v[3],t=v[4],S=v[5],_=v[6],i=v[7],P=g.high,O=g.low,x=E.high,b=E.low,y=n.high,T=n.low,M=o.high,k=o.low,N=t.high,K=t.low,z=S.high,B=S.low,H=_.high,U=_.low,W=i.high,G=i.low,ee=P,ie=O,ce=x,_e=b,Ce=y,le=T,ye=M,fe=k,ne=N,ae=K,q=z,se=B,Q=H,Z=U,be=W,re=G,Y=0;Y<80;Y++){var X,$,ve=a[Y];if(Y<16)$=ve.high=h[c+Y*2]|0,X=ve.low=h[c+Y*2+1]|0;else{var de=a[Y-15],xe=de.high,Ke=de.low,Ve=(xe>>>1|Ke<<31)^(xe>>>8|Ke<<24)^xe>>>7,Xe=(Ke>>>1|xe<<31)^(Ke>>>8|xe<<24)^(Ke>>>7|xe<<25),at=a[Y-2],it=at.high,lt=at.low,Me=(it>>>19|lt<<13)^(it<<3|lt>>>29)^it>>>6,Te=(lt>>>19|it<<13)^(lt<<3|it>>>29)^(lt>>>6|it<<26),Ye=a[Y-7],ot=Ye.high,ze=Ye.low,rt=a[Y-16],ke=rt.high,Oe=rt.low;X=Xe+ze,$=Ve+ot+(X>>>0<Xe>>>0?1:0),X=X+Te,$=$+Me+(X>>>0<Te>>>0?1:0),X=X+Oe,$=$+ke+(X>>>0<Oe>>>0?1:0),ve.high=$,ve.low=X}var Re=ne&q^~ne&Q,pe=ae&se^~ae&Z,Ee=ee&ce^ee&Ce^ce&Ce,we=ie&_e^ie&le^_e&le,De=(ee>>>28|ie<<4)^(ee<<30|ie>>>2)^(ee<<25|ie>>>7),Ie=(ie>>>28|ee<<4)^(ie<<30|ee>>>2)^(ie<<25|ee>>>7),$e=(ne>>>14|ae<<18)^(ne>>>18|ae<<14)^(ne<<23|ae>>>9),qe=(ae>>>14|ne<<18)^(ae>>>18|ne<<14)^(ae<<23|ne>>>9),tt=l[Y],xt=tt.high,gt=tt.low,sr=re+qe,tr=be+$e+(sr>>>0<re>>>0?1:0),sr=sr+pe,tr=tr+Re+(sr>>>0<pe>>>0?1:0),sr=sr+gt,tr=tr+xt+(sr>>>0<gt>>>0?1:0),sr=sr+X,tr=tr+$+(sr>>>0<X>>>0?1:0),St=Ie+we,Nr=De+Ee+(St>>>0<Ie>>>0?1:0);be=Q,re=Z,Q=q,Z=se,q=ne,se=ae,ae=fe+sr|0,ne=ye+tr+(ae>>>0<fe>>>0?1:0)|0,ye=Ce,fe=le,Ce=ce,le=_e,ce=ee,_e=ie,ie=sr+St|0,ee=tr+Nr+(ie>>>0<sr>>>0?1:0)|0}O=g.low=O+ie,g.high=P+ee+(O>>>0<ie>>>0?1:0),b=E.low=b+_e,E.high=x+ce+(b>>>0<_e>>>0?1:0),T=n.low=T+le,n.high=y+Ce+(T>>>0<le>>>0?1:0),k=o.low=k+fe,o.high=M+ye+(k>>>0<fe>>>0?1:0),K=t.low=K+ae,t.high=N+ne+(K>>>0<ae>>>0?1:0),B=S.low=B+se,S.high=z+q+(B>>>0<se>>>0?1:0),U=_.low=U+Z,_.high=H+Q+(U>>>0<Z>>>0?1:0),G=i.low=G+re,i.high=W+be+(G>>>0<re>>>0?1:0)},_doFinalize:function(){var h=this._data,c=h.words,v=this._nDataBytes*8,g=h.sigBytes*8;c[g>>>5]|=128<<24-g%32,c[(g+128>>>10<<5)+30]=Math.floor(v/4294967296),c[(g+128>>>10<<5)+31]=v,h.sigBytes=c.length*4,this._process();var E=this._hash.toX32();return E},clone:function(){var h=D.clone.call(this);return h._hash=this._hash.clone(),h},blockSize:1024/32});f.SHA512=D._createHelper(d),f.HmacSHA512=D._createHmacHelper(d)}(),L.SHA512})},"3y9D":function(j,J,I){(function(L,f){j.exports=J=f(I("Ib8C"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.WordArray,u=C.Hasher,m=f.algo,w=[],p=m.SHA1=u.extend({_doReset:function(){this._hash=new D.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,l){for(var a=this._hash.words,d=a[0],h=a[1],c=a[2],v=a[3],g=a[4],E=0;E<80;E++){if(E<16)w[E]=s[l+E]|0;else{var n=w[E-3]^w[E-8]^w[E-14]^w[E-16];w[E]=n<<1|n>>>31}var o=(d<<5|d>>>27)+g+w[E];E<20?o+=(h&c|~h&v)+1518500249:E<40?o+=(h^c^v)+1859775393:E<60?o+=(h&c|h&v|c&v)-1894007588:o+=(h^c^v)-899497514,g=v,v=c,c=h<<30|h>>>2,h=d,d=o}a[0]=a[0]+d|0,a[1]=a[1]+h|0,a[2]=a[2]+c|0,a[3]=a[3]+v|0,a[4]=a[4]+g|0},_doFinalize:function(){var s=this._data,l=s.words,a=this._nDataBytes*8,d=s.sigBytes*8;return l[d>>>5]|=128<<24-d%32,l[(d+64>>>9<<4)+14]=Math.floor(a/4294967296),l[(d+64>>>9<<4)+15]=a,s.sigBytes=l.length*4,this._process(),this._hash},clone:function(){var s=u.clone.call(this);return s._hash=this._hash.clone(),s}});f.SHA1=u._createHelper(p),f.HmacSHA1=u._createHmacHelper(p)}(),L.SHA1})},4:function(j,J){},"55Ip":function(j,J,I){"use strict";I.d(J,"a",function(){return o});var L=I("Ty5D"),f=I("dI71"),C=I("cDcd"),D=I.n(C),u=I("YS25"),m=I("17x9"),w=I.n(m),p=I("wx14"),s=I("zLVn"),l=I("9R94"),a=function(b){Object(f.a)(y,b);function y(){for(var M,k=arguments.length,N=new Array(k),K=0;K<k;K++)N[K]=arguments[K];return M=b.call.apply(b,[this].concat(N))||this,M.history=Object(u.a)(M.props),M}var T=y.prototype;return T.render=function(){return D.a.createElement(L.c,{history:this.history,children:this.props.children})},y}(D.a.Component),d=function(b){Object(f.a)(y,b);function y(){for(var M,k=arguments.length,N=new Array(k),K=0;K<k;K++)N[K]=arguments[K];return M=b.call.apply(b,[this].concat(N))||this,M.history=Object(u.b)(M.props),M}var T=y.prototype;return T.render=function(){return D.a.createElement(L.c,{history:this.history,children:this.props.children})},y}(D.a.Component),h=function(y,T){return typeof y=="function"?y(T):y},c=function(y,T){return typeof y=="string"?Object(u.c)(y,null,null,T):y},v=function(y){return y},g=D.a.forwardRef;typeof g=="undefined"&&(g=v);function E(b){return!!(b.metaKey||b.altKey||b.ctrlKey||b.shiftKey)}var n=g(function(b,y){var T=b.innerRef,M=b.navigate,k=b.onClick,N=Object(s.a)(b,["innerRef","navigate","onClick"]),K=N.target,z=Object(p.a)({},N,{onClick:function(H){try{k&&k(H)}catch(U){throw H.preventDefault(),U}!H.defaultPrevented&&H.button===0&&(!K||K==="_self")&&!E(H)&&(H.preventDefault(),M())}});return v!==g?z.ref=y||T:z.ref=T,D.a.createElement("a",z)}),o=g(function(b,y){var T=b.component,M=T===void 0?n:T,k=b.replace,N=b.to,K=b.innerRef,z=Object(s.a)(b,["component","replace","to","innerRef"]);return D.a.createElement(L.e.Consumer,null,function(B){B||Object(l.a)(!1);var H=B.history,U=c(h(N,B.location),B.location),W=U?H.createHref(U):"",G=Object(p.a)({},z,{href:W,navigate:function(){var ie=h(N,B.location),ce=k?H.replace:H.push;ce(ie)}});return v!==g?G.ref=y||K:G.innerRef=K,D.a.createElement(M,G)})});if(!1)var t,S;var _=function(y){return y},i=D.a.forwardRef;typeof i=="undefined"&&(i=_);function P(){for(var b=arguments.length,y=new Array(b),T=0;T<b;T++)y[T]=arguments[T];return y.filter(function(M){return M}).join(" ")}var O=i(function(b,y){var T=b["aria-current"],M=T===void 0?"page":T,k=b.activeClassName,N=k===void 0?"active":k,K=b.activeStyle,z=b.className,B=b.exact,H=b.isActive,U=b.location,W=b.sensitive,G=b.strict,ee=b.style,ie=b.to,ce=b.innerRef,_e=Object(s.a)(b,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return D.a.createElement(L.e.Consumer,null,function(Ce){Ce||Object(l.a)(!1);var le=U||Ce.location,ye=c(h(ie,le),le),fe=ye.pathname,ne=fe&&fe.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ae=ne?Object(L.f)(le.pathname,{path:ne,exact:B,sensitive:W,strict:G}):null,q=!!(H?H(ae,le):ae),se=q?P(z,N):z,Q=q?Object(p.a)({},ee,{},K):ee,Z=Object(p.a)({"aria-current":q&&M||null,className:se,style:Q,to:ye},_e);return _!==i?Z.ref=y||ce:Z.innerRef=ce,D.a.createElement(o,Z)})});if(!1)var x},"5hvy":function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("MlIO"))})(this,function(L){return function(f){var C=L,D=C.lib,u=D.WordArray,m=D.Hasher,w=C.x64,p=w.Word,s=C.algo,l=[],a=[],d=[];(function(){for(var v=1,g=0,E=0;E<24;E++){l[v+5*g]=(E+1)*(E+2)/2%64;var n=g%5,o=(2*v+3*g)%5;v=n,g=o}for(var v=0;v<5;v++)for(var g=0;g<5;g++)a[v+5*g]=g+(2*v+3*g)%5*5;for(var t=1,S=0;S<24;S++){for(var _=0,i=0,P=0;P<7;P++){if(t&1){var O=(1<<P)-1;O<32?i^=1<<O:_^=1<<O-32}t&128?t=t<<1^113:t<<=1}d[S]=p.create(_,i)}})();var h=[];(function(){for(var v=0;v<25;v++)h[v]=p.create()})();var c=s.SHA3=m.extend({cfg:m.cfg.extend({outputLength:512}),_doReset:function(){for(var v=this._state=[],g=0;g<25;g++)v[g]=new p.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(v,g){for(var E=this._state,n=this.blockSize/2,o=0;o<n;o++){var t=v[g+2*o],S=v[g+2*o+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[o];_.high^=S,_.low^=t}for(var i=0;i<24;i++){for(var P=0;P<5;P++){for(var O=0,x=0,b=0;b<5;b++){var _=E[P+5*b];O^=_.high,x^=_.low}var y=h[P];y.high=O,y.low=x}for(var P=0;P<5;P++)for(var T=h[(P+4)%5],M=h[(P+1)%5],k=M.high,N=M.low,O=T.high^(k<<1|N>>>31),x=T.low^(N<<1|k>>>31),b=0;b<5;b++){var _=E[P+5*b];_.high^=O,_.low^=x}for(var K=1;K<25;K++){var O,x,_=E[K],z=_.high,B=_.low,H=l[K];H<32?(O=z<<H|B>>>32-H,x=B<<H|z>>>32-H):(O=B<<H-32|z>>>64-H,x=z<<H-32|B>>>64-H);var U=h[a[K]];U.high=O,U.low=x}var W=h[0],G=E[0];W.high=G.high,W.low=G.low;for(var P=0;P<5;P++)for(var b=0;b<5;b++){var K=P+5*b,_=E[K],ee=h[K],ie=h[(P+1)%5+5*b],ce=h[(P+2)%5+5*b];_.high=ee.high^~ie.high&ce.high,_.low=ee.low^~ie.low&ce.low}var _=E[0],_e=d[i];_.high^=_e.high,_.low^=_e.low}},_doFinalize:function(){var v=this._data,g=v.words,E=this._nDataBytes*8,n=v.sigBytes*8,o=this.blockSize*32;g[n>>>5]|=1<<24-n%32,g[(f.ceil((n+1)/o)*o>>>5)-1]|=128,v.sigBytes=g.length*4,this._process();for(var t=this._state,S=this.cfg.outputLength/8,_=S/8,i=[],P=0;P<_;P++){var O=t[P],x=O.high,b=O.low;x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,i.push(b),i.push(x)}return new u.init(i,S)},clone:function(){for(var v=m.clone.call(this),g=v._state=this._state.slice(0),E=0;E<25;E++)g[E]=g[E].clone();return v}});C.SHA3=m._createHelper(c),C.HmacSHA3=m._createHmacHelper(c)}(Math),L.SHA3})},"6+eU":function(j,J,I){"use strict";I.d(J,"a",function(){return i});var L=I("wx14"),f=I("rePB"),C=I("VTBJ"),D=I("1OyB"),u=I("vuIU"),m=I("Ji7U"),w=I("LK+K"),p=I("cDcd"),s=I.n(p),l=I("TSYQ"),a=I.n(l),d=function(O){var x,b="".concat(O.rootPrefixCls,"-item"),y=a()(b,"".concat(b,"-").concat(O.page),(x={},Object(f.a)(x,"".concat(b,"-active"),O.active),Object(f.a)(x,O.className,!!O.className),Object(f.a)(x,"".concat(b,"-disabled"),!O.page),x)),T=function(){O.onClick(O.page)},M=function(N){O.onKeyPress(N,O.onClick,O.page)};return s.a.createElement("li",{title:O.showTitle?O.page:null,className:y,onClick:T,onKeyPress:M,tabIndex:"0"},O.itemRender(O.page,"page",s.a.createElement("a",{rel:"nofollow"},O.page)))},h=d,c={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},v=function(P){Object(m.a)(x,P);var O=Object(w.a)(x);function x(){var b;Object(D.a)(this,x);for(var y=arguments.length,T=new Array(y),M=0;M<y;M++)T[M]=arguments[M];return b=O.call.apply(O,[this].concat(T)),b.state={goInputText:""},b.buildOptionText=function(k){return"".concat(k," ").concat(b.props.locale.items_per_page)},b.changeSize=function(k){b.props.changeSize(Number(k))},b.handleChange=function(k){b.setState({goInputText:k.target.value})},b.handleBlur=function(k){var N=b.props,K=N.goButton,z=N.quickGo,B=N.rootPrefixCls,H=b.state.goInputText;if(K||H==="")return;if(k.relatedTarget&&(k.relatedTarget.className.indexOf("".concat(B,"-prev"))>=0||k.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;b.setState({goInputText:""}),z(b.getValidValue())},b.go=function(k){var N=b.state.goInputText;if(N==="")return;(k.keyCode===c.ENTER||k.type==="click")&&(b.setState({goInputText:""}),b.props.quickGo(b.getValidValue()))},b}return Object(u.a)(x,[{key:"getValidValue",value:function(){var y=this.state,T=y.goInputText,M=y.current;return!T||isNaN(T)?M:Number(T)}},{key:"getPageSizeOptions",value:function(){var y=this.props,T=y.pageSize,M=y.pageSizeOptions;return M.some(function(k){return k.toString()===T.toString()})?M:M.concat([T.toString()]).sort(function(k,N){var K=isNaN(Number(k))?0:Number(k),z=isNaN(Number(N))?0:Number(N);return K-z})}},{key:"render",value:function(){var y=this,T=this.props,M=T.pageSize,k=T.locale,N=T.rootPrefixCls,K=T.changeSize,z=T.quickGo,B=T.goButton,H=T.selectComponentClass,U=T.buildOptionText,W=T.selectPrefixCls,G=T.disabled,ee=this.state.goInputText,ie="".concat(N,"-options"),ce=H,_e=null,Ce=null,le=null;if(!K&&!z)return null;var ye=this.getPageSizeOptions();if(K&&ce){var fe=ye.map(function(ne,ae){return s.a.createElement(ce.Option,{key:ae,value:ne.toString()},(U||y.buildOptionText)(ne))});_e=s.a.createElement(ce,{disabled:G,prefixCls:W,showSearch:!1,className:"".concat(ie,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(M||ye[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ae){return ae.parentNode}},fe)}return z&&(B&&(le=typeof B=="boolean"?s.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:G,className:"".concat(ie,"-quick-jumper-button")},k.jump_to_confirm):s.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),Ce=s.a.createElement("div",{className:"".concat(ie,"-quick-jumper")},k.jump_to,s.a.createElement("input",{disabled:G,type:"text",value:ee,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),k.page,le)),s.a.createElement("li",{className:"".concat(ie)},_e,Ce)}}]),x}(s.a.Component);v.defaultProps={pageSizeOptions:["10","20","50","100"]};var g=v,E=I("N2Kk");function n(){}function o(P){return typeof P=="number"&&isFinite(P)&&Math.floor(P)===P}function t(P,O,x){return x}function S(P,O,x){var b=typeof P=="undefined"?O.pageSize:P;return Math.floor((x.total-1)/b)+1}var _=function(P){Object(m.a)(x,P);var O=Object(w.a)(x);function x(b){var y;Object(D.a)(this,x),y=O.call(this,b),y.getJumpPrevPage=function(){return Math.max(1,y.state.current-(y.props.showLessItems?3:5))},y.getJumpNextPage=function(){return Math.min(S(void 0,y.state,y.props),y.state.current+(y.props.showLessItems?3:5))},y.getItemIcon=function(K,z){var B=y.props.prefixCls,H=K||s.a.createElement("button",{type:"button","aria-label":z,className:"".concat(B,"-item-link")});return typeof K=="function"&&(H=s.a.createElement(K,Object(C.a)({},y.props))),H},y.savePaginationNode=function(K){y.paginationNode=K},y.isValid=function(K){return o(K)&&K!==y.state.current},y.shouldDisplayQuickJumper=function(){var K=y.props,z=K.showQuickJumper,B=K.pageSize,H=K.total;return H<=B?!1:z},y.handleKeyDown=function(K){(K.keyCode===c.ARROW_UP||K.keyCode===c.ARROW_DOWN)&&K.preventDefault()},y.handleKeyUp=function(K){var z=y.getValidValue(K),B=y.state.currentInputValue;z!==B&&y.setState({currentInputValue:z}),K.keyCode===c.ENTER?y.handleChange(z):K.keyCode===c.ARROW_UP?y.handleChange(z-1):K.keyCode===c.ARROW_DOWN&&y.handleChange(z+1)},y.changePageSize=function(K){var z=y.state.current,B=S(K,y.state,y.props);z=z>B?B:z,B===0&&(z=y.state.current),typeof K=="number"&&("pageSize"in y.props||y.setState({pageSize:K}),"current"in y.props||y.setState({current:z,currentInputValue:z})),y.props.onShowSizeChange(z,K),"onChange"in y.props&&y.props.onChange&&y.props.onChange(z,K)},y.handleChange=function(K){var z=y.props.disabled,B=K;if(y.isValid(B)&&!z){var H=S(void 0,y.state,y.props);B>H?B=H:B<1&&(B=1),"current"in y.props||y.setState({current:B,currentInputValue:B});var U=y.state.pageSize;return y.props.onChange(B,U),B}return y.state.current},y.prev=function(){y.hasPrev()&&y.handleChange(y.state.current-1)},y.next=function(){y.hasNext()&&y.handleChange(y.state.current+1)},y.jumpPrev=function(){y.handleChange(y.getJumpPrevPage())},y.jumpNext=function(){y.handleChange(y.getJumpNextPage())},y.hasPrev=function(){return y.state.current>1},y.hasNext=function(){return y.state.current<S(void 0,y.state,y.props)},y.runIfEnter=function(K,z){if(K.key==="Enter"||K.charCode===13){for(var B=arguments.length,H=new Array(B>2?B-2:0),U=2;U<B;U++)H[U-2]=arguments[U];z.apply(void 0,H)}},y.runIfEnterPrev=function(K){y.runIfEnter(K,y.prev)},y.runIfEnterNext=function(K){y.runIfEnter(K,y.next)},y.runIfEnterJumpPrev=function(K){y.runIfEnter(K,y.jumpPrev)},y.runIfEnterJumpNext=function(K){y.runIfEnter(K,y.jumpNext)},y.handleGoTO=function(K){(K.keyCode===c.ENTER||K.type==="click")&&y.handleChange(y.state.currentInputValue)};var T=b.onChange!==n,M="current"in b;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 k=b.defaultCurrent;"current"in b&&(k=b.current);var N=b.defaultPageSize;return"pageSize"in b&&(N=b.pageSize),k=Math.min(k,S(N,void 0,b)),y.state={current:k,currentInputValue:k,pageSize:N},y}return Object(u.a)(x,[{key:"componentDidUpdate",value:function(y,T){var M=this.props.prefixCls;if(T.current!==this.state.current&&this.paginationNode){var k=this.paginationNode.querySelector(".".concat(M,"-item-").concat(T.current));k&&document.activeElement===k&&k.blur()}}},{key:"getValidValue",value:function(y){var T=y.target.value,M=S(void 0,this.state,this.props),k=this.state.currentInputValue,N;return T===""?N=T:isNaN(Number(T))?N=k:T>=M?N=M:N=Number(T),N}},{key:"getShowSizeChanger",value:function(){var y=this.props,T=y.showSizeChanger,M=y.total,k=y.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:M>k}},{key:"renderPrev",value:function(y){var T=this.props,M=T.prevIcon,k=T.itemRender,N=k(y,"prev",this.getItemIcon(M,"prev page")),K=!this.hasPrev();return Object(p.isValidElement)(N)?Object(p.cloneElement)(N,{disabled:K}):N}},{key:"renderNext",value:function(y){var T=this.props,M=T.nextIcon,k=T.itemRender,N=k(y,"next",this.getItemIcon(M,"next page")),K=!this.hasNext();return Object(p.isValidElement)(N)?Object(p.cloneElement)(N,{disabled:K}):N}},{key:"render",value:function(){var y=this,T=this.props,M=T.prefixCls,k=T.className,N=T.style,K=T.disabled,z=T.hideOnSinglePage,B=T.total,H=T.locale,U=T.showQuickJumper,W=T.showLessItems,G=T.showTitle,ee=T.showTotal,ie=T.simple,ce=T.itemRender,_e=T.showPrevNextJumpers,Ce=T.jumpPrevIcon,le=T.jumpNextIcon,ye=T.selectComponentClass,fe=T.selectPrefixCls,ne=T.pageSizeOptions,ae=this.state,q=ae.current,se=ae.pageSize,Q=ae.currentInputValue;if(z===!0&&B<=se)return null;var Z=S(void 0,this.state,this.props),be=[],re=null,Y=null,X=null,$=null,ve=null,de=U&&U.goButton,xe=W?1:2,Ke=q-1>0?q-1:0,Ve=q+1<Z?q+1:Z,Xe=Object.keys(this.props).reduce(function(pe,Ee){return(Ee.substr(0,5)==="data-"||Ee.substr(0,5)==="aria-"||Ee==="role")&&(pe[Ee]=y.props[Ee]),pe},{});if(ie)return de&&(typeof de=="boolean"?ve=s.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},H.jump_to_confirm):ve=s.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},de),ve=s.a.createElement("li",{title:G?"".concat(H.jump_to).concat(q,"/").concat(Z):null,className:"".concat(M,"-simple-pager")},ve)),s.a.createElement("ul",Object(L.a)({className:a()(M,"".concat(M,"-simple"),Object(f.a)({},"".concat(M,"-disabled"),K),k),style:N,ref:this.savePaginationNode},Xe),s.a.createElement("li",{title:G?H.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:a()("".concat(M,"-prev"),Object(f.a)({},"".concat(M,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Ke)),s.a.createElement("li",{title:G?"".concat(q,"/").concat(Z):null,className:"".concat(M,"-simple-pager")},s.a.createElement("input",{type:"text",value:Q,disabled:K,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),s.a.createElement("span",{className:"".concat(M,"-slash")},"/"),Z),s.a.createElement("li",{title:G?H.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:a()("".concat(M,"-next"),Object(f.a)({},"".concat(M,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Ve)),ve);if(Z<=3+xe*2){var at={locale:H,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:G,itemRender:ce};Z||be.push(s.a.createElement(h,Object(L.a)({},at,{key:"noPager",page:Z,className:"".concat(M,"-disabled")})));for(var it=1;it<=Z;it+=1){var lt=q===it;be.push(s.a.createElement(h,Object(L.a)({},at,{key:it,page:it,active:lt})))}}else{var Me=W?H.prev_3:H.prev_5,Te=W?H.next_3:H.next_5;_e&&(re=s.a.createElement("li",{title:G?Me:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:a()("".concat(M,"-jump-prev"),Object(f.a)({},"".concat(M,"-jump-prev-custom-icon"),!!Ce))},ce(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Ce,"prev page"))),Y=s.a.createElement("li",{title:G?Te:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:a()("".concat(M,"-jump-next"),Object(f.a)({},"".concat(M,"-jump-next-custom-icon"),!!le))},ce(this.getJumpNextPage(),"jump-next",this.getItemIcon(le,"next page")))),$=s.a.createElement(h,{locale:H,last:!0,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Z,page:Z,active:!1,showTitle:G,itemRender:ce}),X=s.a.createElement(h,{locale:H,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:G,itemRender:ce});var Ye=Math.max(1,q-xe),ot=Math.min(q+xe,Z);q-1<=xe&&(ot=1+xe*2),Z-q<=xe&&(Ye=Z-xe*2);for(var ze=Ye;ze<=ot;ze+=1){var rt=q===ze;be.push(s.a.createElement(h,{locale:H,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ze,page:ze,active:rt,showTitle:G,itemRender:ce}))}q-1>=xe*2&&q!==1+2&&(be[0]=Object(p.cloneElement)(be[0],{className:"".concat(M,"-item-after-jump-prev")}),be.unshift(re)),Z-q>=xe*2&&q!==Z-2&&(be[be.length-1]=Object(p.cloneElement)(be[be.length-1],{className:"".concat(M,"-item-before-jump-next")}),be.push(Y)),Ye!==1&&be.unshift(X),ot!==Z&&be.push($)}var ke=null;ee&&(ke=s.a.createElement("li",{className:"".concat(M,"-total-text")},ee(B,[B===0?0:(q-1)*se+1,q*se>B?B:q*se])));var Oe=!this.hasPrev()||!Z,Re=!this.hasNext()||!Z;return s.a.createElement("ul",Object(L.a)({className:a()(M,k,Object(f.a)({},"".concat(M,"-disabled"),K)),style:N,unselectable:"unselectable",ref:this.savePaginationNode},Xe),ke,s.a.createElement("li",{title:G?H.prev_page:null,onClick:this.prev,tabIndex:Oe?null:0,onKeyPress:this.runIfEnterPrev,className:a()("".concat(M,"-prev"),Object(f.a)({},"".concat(M,"-disabled"),Oe)),"aria-disabled":Oe},this.renderPrev(Ke)),be,s.a.createElement("li",{title:G?H.next_page:null,onClick:this.next,tabIndex:Re?null:0,onKeyPress:this.runIfEnterNext,className:a()("".concat(M,"-next"),Object(f.a)({},"".concat(M,"-disabled"),Re)),"aria-disabled":Re},this.renderNext(Ve)),s.a.createElement(g,{disabled:K,locale:H,rootPrefixCls:M,selectComponentClass:ye,selectPrefixCls:fe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:q,pageSize:se,pageSizeOptions:ne,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:de}))}}],[{key:"getDerivedStateFromProps",value:function(y,T){var M={};if("current"in y&&(M.current=y.current,y.current!==T.current&&(M.currentInputValue=M.current)),"pageSize"in y&&y.pageSize!==T.pageSize){var k=T.current,N=S(y.pageSize,T,y);k=k>N?N:k,"current"in y||(M.current=k,M.currentInputValue=k),M.pageSize=y.pageSize}return M}}]),x}(s.a.Component);_.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:E.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var i=_},"6RRn":function(j,J,I){"use strict";var L=I("wCXF"),f=I("n6Qo");I.d(J,"b",function(){return f.a});var C=I("IBYe"),D=I("6eGT"),u=I("hW8S");I.d(J,"a",function(){return u.a}),J.c=L.b},"6eGT":function(j,J,I){"use strict";function L(f){return null}J.a=L},"7Cbv":function(j,J,I){"use strict";var L=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),f=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(f)}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(h){return typeof h=="string"&&D.test(h)}for(var m=u,w=[],p=0;p<256;++p)w.push((p+256).toString(16).substr(1));function s(h){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,v=(w[h[c+0]]+w[h[c+1]]+w[h[c+2]]+w[h[c+3]]+"-"+w[h[c+4]]+w[h[c+5]]+"-"+w[h[c+6]]+w[h[c+7]]+"-"+w[h[c+8]]+w[h[c+9]]+"-"+w[h[c+10]]+w[h[c+11]]+w[h[c+12]]+w[h[c+13]]+w[h[c+14]]+w[h[c+15]]).toLowerCase();if(!m(v))throw TypeError("Stringified UUID is invalid");return v}var l=s;function a(h,c,v){h=h||{};var g=h.random||(h.rng||C)();if(g[6]=g[6]&15|64,g[8]=g[8]&63|128,c){v=v||0;for(var E=0;E<16;++E)c[v+E]=g[E];return c}return l(g)}var d=J.a=a},"7ahc":function(j,J,I){"use strict";I.d(J,"a",function(){return S});var L=I("k1fw"),f=I("0Owb"),C=I("+L6B"),D=I("2/Rp"),u=I("y8nQ"),m=I("Vl3Y"),w=I("tJVT"),p=I("OaEy"),s=I("2fM7"),l=I("cDcd"),a=I.n(l),d=I("VrN/"),h=I.n(d),c=I("p77/"),v=I.n(c),g=I("c5Ni"),E=I.n(g),n=s.a.Option,o={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"]};J.b=function(_){var i=_.callback,P=_.onCancel,O=Object(l.useState)("python"),x=Object(w.a)(O,2),b=x[0],y=x[1];function T(k){y(t[k][1])}function M(k){i(k)}return a.a.createElement(m.a,Object(f.a)({},o,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:M}),a.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},a.a.createElement(s.a,{onChange:T},Object.keys(t).map(function(k){return a.a.createElement(n,{key:k,value:k},t[k][0])}))),a.a.createElement(m.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:b})),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(_){var i=_.value,P=_.onChange,O=_.mode,x=_.options,b=x===void 0?{}:x,y=Object(l.useRef)(),T=Object(l.useState)(),M=Object(w.a)(T,2),k=M[0],N=M[1];return Object(l.useEffect)(function(){if(k){function K(z){var B=z.getValue();P&&P(B)}return k.on("change",K),function(){k.off("change",K)}}},[k,P]),Object(l.useEffect)(function(){k&&k.setOption("mode",O)},[k,O]),Object(l.useEffect)(function(){k&&((i!==k.getValue()||i==="")&&setTimeout(function(){k.setValue(i||" ")},300))},[k,i]),Object(l.useEffect)(function(){if(y.current&&!k){var K=h.a.fromTextArea(y.current,Object(L.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},b));N(K)}},[y.current,k]),a.a.createElement("div",{className:"my-codemirror-container"},a.a.createElement("textarea",{ref:y}))}},"815F":function(j,J,I){"use strict";I.d(J,"e",function(){return w}),I.d(J,"c",function(){return s}),I.d(J,"d",function(){return l}),I.d(J,"a",function(){return d}),I.d(J,"f",function(){return h}),I.d(J,"b",function(){return c});var L=I("KQm4"),f=I("VTBJ"),C=I("Ff2n"),D=I("Zm9Q"),u=I("Kwbf"),m=I("OZM5");function w(v,g){return v!=null?v:g}function p(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=new Map;function E(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(t){var S=t.key,_=t.children;Object(u.a)(S!=null,"Tree node must have a certain key: [".concat(o).concat(S,"]"));var i=String(S);Object(u.a)(!g.has(i)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(i)),g.set(i,!0),E(_,"".concat(o).concat(i," > "))})}E(v)}function s(v){function g(E){var n=Object(D.a)(E);return n.map(function(o){if(!Object(m.i)(o))return Object(u.a)(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var t=o.key,S=o.props,_=S.children,i=Object(C.a)(S,["children"]),P=Object(f.a)({key:t},i),O=g(_);return O.length&&(P.children=O),P}).filter(function(o){return o})}return g(v)}function l(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],E=new Set(g===!0?[]:g),n=[];function o(t){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(_,i){var P=Object(m.h)(S?S.pos:"0",i),O=w(_.key,P),x=Object(f.a)(Object(f.a)({},_),{},{parent:S,pos:P,children:null,data:_,isStart:[].concat(Object(L.a)(S?S.isStart:[]),[i===0]),isEnd:[].concat(Object(L.a)(S?S.isEnd:[]),[i===t.length-1])});return n.push(x),g===!0||E.has(O)?x.children=o(_.children||[],x):x.children=[],x})}return o(v),n}function a(v,g,E){var n;E?typeof E=="string"?n=function(S){return S[E]}:typeof E=="function"&&(n=function(S){return E(S)}):n=function(S,_){return w(S.key,_)};function o(t,S,_){var i=t?t.children:v,P=t?Object(m.h)(_.pos,S):"0";if(t){var O=n(t,P),x={node:t,index:S,pos:P,key:O,parentPos:_.node?_.pos:null,level:_.level+1};g(x)}i&&i.forEach(function(b,y){o(b,y,{node:t,pos:P,level:_?_.level+1:-1})})}o(null)}function d(v){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=g.initWrapper,n=g.processEntity,o=g.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,S={},_={},i={posEntities:S,keyEntities:_};return E&&(i=E(i)||i),a(v,function(P){var O=P.node,x=P.index,b=P.pos,y=P.key,T=P.parentPos,M=P.level,k={node:O,index:x,key:y,pos:b,level:M},N=w(y,b);S[b]=k,_[N]=k,k.parent=S[T],k.parent&&(k.parent.children=k.parent.children||[],k.parent.children.push(k)),n&&n(k,i)},t),o&&o(i),i}function h(v,g){var E=g.expandedKeys,n=g.selectedKeys,o=g.loadedKeys,t=g.loadingKeys,S=g.checkedKeys,_=g.halfCheckedKeys,i=g.dragOverNodeKey,P=g.dropPosition,O=g.keyEntities,x=O[v],b={eventKey:v,expanded:E.indexOf(v)!==-1,selected:n.indexOf(v)!==-1,loaded:o.indexOf(v)!==-1,loading:t.indexOf(v)!==-1,checked:S.indexOf(v)!==-1,halfChecked:_.indexOf(v)!==-1,pos:String(x?x.pos:""),dragOver:i===v&&P===0,dragOverGapTop:i===v&&P===-1,dragOverGapBottom:i===v&&P===1};return b}function c(v){var g=v.data,E=v.expanded,n=v.selected,o=v.checked,t=v.loaded,S=v.loading,_=v.halfChecked,i=v.dragOver,P=v.dragOverGapTop,O=v.dragOverGapBottom,x=v.pos,b=v.active,y=Object(f.a)(Object(f.a)({},g),{},{expanded:E,selected:n,checked:o,loaded:t,loading:S,halfChecked:_,dragOver:i,dragOverGapTop:P,dragOverGapBottom:O,pos:x,active:b});return"props"in y||Object.defineProperty(y,"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`."),v}}),y}},"8EBN":function(j,J,I){(function(L){L(I("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 f=0;f<L.modeInfo.length;f++){var C=L.modeInfo[f];C.mimes&&(C.mime=C.mimes[0])}L.findModeByMIME=function(D){D=D.toLowerCase();for(var u=0;u<L.modeInfo.length;u++){var m=L.modeInfo[u];if(m.mime==D)return m;if(m.mimes){for(var w=0;w<m.mimes.length;w++)if(m.mimes[w]==D)return m}}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 m=L.modeInfo[u];if(m.ext){for(var w=0;w<m.ext.length;w++)if(m.ext[w]==D)return m}}},L.findModeByFileName=function(D){for(var u=0;u<L.modeInfo.length;u++){var m=L.modeInfo[u];if(m.file&&m.file.test(D))return m}var w=D.lastIndexOf("."),p=w>-1&&D.substring(w+1,D.length);if(p)return L.findModeByExtension(p)},L.findModeByName=function(D){D=D.toLowerCase();for(var u=0;u<L.modeInfo.length;u++){var m=L.modeInfo[u];if(m.name.toLowerCase()==D)return m;if(m.alias){for(var w=0;w<m.alias.length;w++)if(m.alias[w].toLowerCase()==D)return m}}}})},"8hTe":function(j,J,I){j.exports={button:"button___1wy9m"}},"9Bee":function(j,J,I){"use strict";var L=I("DYRE"),f=I("zeV3"),C=I("+L6B"),D=I("2/Rp"),u=I("k1fw"),m=I("tJVT"),w=I("cDcd"),p=I.n(w),s=I("vg9a"),l=I("DlQD"),a=I.n(l),d=I("rUJ1");function h(le,ye){var fe=le.match(/^(\s+)(?:```)/);if(fe===null)return ye;var ne=fe[1];return ye.split(`
|
|
|
`).map(function(ae){var q=ae.match(/^\s+/);if(q===null)return ae;var se=Object(m.a)(q,1),Q=se[0];return Q.length>=ne.length?ae.slice(ne.length):ae}).join(`
|
|
|
`)}var c=[],v=["<ul>"],g=new a.a.Renderer,E=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function n(){c.length=0,v=["<ul>"]}var o={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function t(le,ye,fe,ne){if(ye>=le.length||le[ye].level<=fe)return ye;var ae=le[ye];ne.push("<li><a href='#"+ae.anchor+"'>"+ae.text+"</a>"),ye++;var q=[];return ye=t(le,ye,ae.level,q),q.length>0&&(ne.push("<ul>"),q.forEach(function(se){ne.push(se)}),ne.push("</ul>")),ne.push("</li>"),ye=t(le,ye,fe,ne),ye}function S(){return t(c,0,0,v),v.push("</ul>"),v.join("")}var _={heading:function(ye){var fe=E.exec(ye);if(fe)return{type:"heading",raw:fe[0],depth:fe[1].length,text:fe[2]}},fences:function(ye){var fe=this.rules.block.fences.exec(ye);if(fe){var ne=fe[0],ae=h(ne,fe[3]||""),q=fe[2]?fe[2].trim():fe[2];if(["latex","katex","math"].indexOf(q)>=0){var se=O(),Q=ae;ae=se,x[se]={type:"block",expression:Q}}return{type:"code",raw:ne,lang:q,text:ae}}}},i=/(?:\${2})([^\n`]+?)(?:\${2})/gi,P=0,O=function(){return"__special_katext_id_".concat(P++,"__")},x={};function b(){return x}function y(){P=0,x={}}function T(le){return le=le.replace(i,function(ye,fe){var ne=O();return x[ne]={type:"inline",expression:fe},ne}),le}var M=g.listitem;g.listitem=function(le){return M(T(le))};var k=g.paragraph;g.paragraph=function(le){return k(T(le))};var N=g.tablecell;g.tablecell=function(le,ye){return N(T(le),ye)},g.code=function(le,ye,fe){var ne=(ye||"").match(/\S*/)[0];return ne?["latex","katex","math"].indexOf(ne)>=0?"<p class='editormd-tex'>".concat(le,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(ye,'">').concat(fe?le:Object(d.escape)(le,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(fe?le:Object(d.escape)(le,!0))+"</code></pre>"},g.heading=function(le,ye,fe){var ne=this.options.headerPrefix+fe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:ne,level:ye,text:le}),"<h"+ye+' id="'+ne+'">'+le+"</h"+ye+">"},a.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),a.a.use({tokenizer:_,renderer:g});var K=a.a,z=I("SJMd"),B=I("ulZh"),H=I.n(B),U=I("m3rI"),W=I("Oy/b"),G=I("p5ED"),ee=I("8hTe"),ie=I.n(ee),ce=/<pre[^>]*>/g;function _e(le){var ye=document.createElement("div");return ye.innerHTML=le,ye.childNodes.length===0?"":ye.childNodes[0].nodeValue}var Ce=J.a=function(le){var ye=le.value,fe=ye===void 0?"":ye,ne=le.edit,ae=ne===void 0?!1:ne,q=le.className,se=le.showTextOnly,Q=le.showLines,Z=le.replaces,be=le.zoomImg,re=le.hasMask,Y=le.style,X=Y===void 0?{}:Y,$=le.stylesPrev,ve=$===void 0?{}:$,de=String(fe),xe=Object(w.useRef)(),Ke=Object(w.useRef)(),Ve=Object(w.useState)(""),Xe=Object(m.a)(Ve,2),at=Xe[0],it=Xe[1],lt=Object(w.useState)("office"),Me=Object(m.a)(lt,2),Te=Me[0],Ye=Me[1],ot=Object(w.useMemo)(function(){try{var Re=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,pe=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ee=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;de=de.replace(Re,"("+U.a.API_SERVER+"/api/attachments/").replace(pe,'"'+U.a.API_SERVER+"/api/attachments/").replace(Ee,'"'+U.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
|
`)}catch($e){}var we=K(de),De=b();if(de.match(/\[TOC\]/)&&(we=we.replace("<p>[TOC]</p>",S()),n()),we=we.replace(/(__special_katext_id_\d+__)/g,function($e,qe){var tt=De[qe],xt=tt.type,gt=tt.expression;return Object(W.renderToString)(_e(gt)||"",{displayMode:xt==="block",throwOnError:!1,output:"html"})}),we=we.replace(/▁/g,"\u2581\u2581\u2581"),y(),se){var Ie=document.createElement("div");return Ie.innerHTML=we,Ie.innerText}return setTimeout(function(){return ke()},500),we},[de]),ze=Object(w.useRef)();o.WebkitLineClamp=Q,Q&&(X=Object(u.a)(Object(u.a)({},X),o));function rt(Re){var pe=Re.target;if(pe.tagName.toUpperCase()==="IMG"){if(be){var Ee=pe.getAttribute("src");it(Ee),Ye("image")}}else if(pe.tagName.toUpperCase()==="A"){var we=pe.getAttribute("href");if(we.indexOf("office")>-1)Re.preventDefault(),it(we),Ye("office");else if(we.indexOf("application/pdf")>-1)Re.preventDefault(),it(we),Ye("pdf");else if(we.indexOf("text/html")>-1)Re.preventDefault(),it(we),Ye("html");else if(we.startsWith("#")){Re.preventDefault();var De=document.getElementById(we.replace("#",""));De&&De.scrollIntoView(!0)}}}var ke=function(){var pe,Ee=(pe=ze.current)===null||pe===void 0?void 0:pe.querySelectorAll("video");Ee==null||Ee.forEach(function(we){if(we.oncontextmenu=function(){return!1},we.src.indexOf(".m3u8")>-1&&!we.canPlayType("application/vnd.apple.mpegurl")){if(H.a.isSupported()){var De=new H.a;De.loadSource(we.src),De.attachMedia(we)}}})};Object(w.useEffect)(function(){if(ze.current&&ot&&(ot.match(ce)&&window.PR.prettyPrint()),ze.current)return ze.current.addEventListener("click",rt),function(){ze.current.removeEventListener("click",rt),y(),n()}},[ot,ze.current,rt]);var Oe=function(pe){if(!ae)return;pe.target.nodeName==="IMG"?(xe.current.style.display="flex",xe.current.style.width=pe.target.clientWidth+"px",xe.current.style.height=pe.target.clientHeight+"px",xe.current.style.top=pe.target.offsetTop+"px",xe.current.style.left=pe.target.offsetLeft+"px",Ke.current.src=pe.target.getAttribute("src")):xe.current.style.display="none"};return p.a.createElement("div",{style:{position:"relative"}},p.a.createElement("div",{ref:ze,style:Object(u.a)({},X),className:"".concat(q||""," markdown-body ").concat(ie.a.mdBody),onMouseOver:Oe,dangerouslySetInnerHTML:{__html:ot}}),p.a.createElement("div",{ref:xe,className:ie.a.button},p.a.createElement(f.a,null,p.a.createElement(D.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),p.a.createElement(D.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),p.a.createElement("img",{ref:Ke,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),p.a.createElement(G.a,{close:!0,data:at,type:at!=null&&at.length?Te:"",style:Object(u.a)({},ve),onClose:function(){return it("")}}))}},"9OqN":function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("OLod"))})(this,function(L){return L.mode.CTR=function(){var f=L.lib.BlockCipherMode.extend(),C=f.Encryptor=f.extend({processBlock:function(D,u){var m=this._cipher,w=m.blockSize,p=this._iv,s=this._counter;p&&(s=this._counter=p.slice(0),this._iv=void 0);var l=s.slice(0);m.encryptBlock(l,0),s[w-1]=s[w-1]+1|0;for(var a=0;a<w;a++)D[u+a]^=l[a]}});return f.Decryptor=C,f}(),L.mode.CTR})},"9VGf":function(j,J,I){"use strict";I.d(J,"a",function(){return C});var L=I("cDcd"),f=I.n(L);function C(D,u){var m=Object(L.useRef)();Object(L.useEffect)(function(){m.current=D}),Object(L.useEffect)(function(){function w(){m.current()}if(u!==null){var p=setInterval(w,u);return function(){return clearInterval(p)}}},[u])}},ALsQ:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("OLod"))})(this,function(L){return L.mode.CFB=function(){var f=L.lib.BlockCipherMode.extend();f.Encryptor=f.extend({processBlock:function(D,u){var m=this._cipher,w=m.blockSize;C.call(this,D,u,w,m),this._prevBlock=D.slice(u,u+w)}}),f.Decryptor=f.extend({processBlock:function(D,u){var m=this._cipher,w=m.blockSize,p=D.slice(u,u+w);C.call(this,D,u,w,m),this._prevBlock=p}});function C(D,u,m,w){var p,s=this._iv;s?(p=s.slice(0),this._iv=void 0):p=this._prevBlock,w.encryptBlock(p,0);for(var l=0;l<m;l++)D[u+l]^=p[l]}return f}(),L.mode.CFB})},BJfS:function(j,J){var I=function(L){return L.replace(/[A-Z]/g,function(f){return"-"+f.toLowerCase()}).toLowerCase()};j.exports=I},BU3w:function(j,J,I){"use strict";I.d(J,"a",function(){return m});var L=I("MNnm"),f="rc-util-key";function C(w){if(w.attachTo)return w.attachTo;var p=document.querySelector("head");return p||document.body}function D(w){var p,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(L.a)())return null;var l=document.createElement("style");if((p=s.csp)===null||p===void 0?void 0:p.nonce){var a;l.nonce=(a=s.csp)===null||a===void 0?void 0:a.nonce}l.innerHTML=w;var d=C(s),h=d.firstChild;return s.prepend&&d.prepend?d.prepend(l):s.prepend&&h?d.insertBefore(l,h):d.appendChild(l),l}var u=new Map;function m(w,p){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=C(s);if(!u.has(l)){var a=D("",s),d=a.parentNode;u.set(l,d),d.removeChild(a)}var h=Array.from(u.get(l).children).find(function(n){return n.tagName==="STYLE"&&n[f]===p});if(h){var c,v;if(((c=s.csp)===null||c===void 0?void 0:c.nonce)&&h.nonce!==((v=s.csp)===null||v===void 0?void 0:v.nonce)){var g;h.nonce=(g=s.csp)===null||g===void 0?void 0:g.nonce}return h.innerHTML!==w&&(h.innerHTML=w),h}var E=D(w,s);return E[f]=p,E}},Bd2K:function(j,J,I){(function(L){L(I("VrN/"),I("osHv"))})(function(L){L.defineOption("autoCloseTags",!1,function(s,l,a){if(a!=L.Init&&a&&s.removeKeyMap("autoCloseTags"),!l)return;var d={name:"autoCloseTags"};(typeof l!="object"||l.whenClosing!==!1)&&(d["'/'"]=function(h){return m(h)}),(typeof l!="object"||l.whenOpening!==!1)&&(d["'>'"]=function(h){return D(h)}),s.addKeyMap(d)});var f=["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(s){if(s.getOption("disableInput"))return L.Pass;for(var l=s.listSelections(),a=[],d=s.getOption("autoCloseTags"),h=0;h<l.length;h++){if(!l[h].empty())return L.Pass;var c=l[h].head,v=s.getTokenAt(c),g=L.innerMode(s.getMode(),v.state),E=g.state,n=g.mode.xmlCurrentTag&&g.mode.xmlCurrentTag(E),o=n&&n.name;if(!o)return L.Pass;var t=g.mode.configuration=="html",S=typeof d=="object"&&d.dontCloseTags||t&&f,_=typeof d=="object"&&d.indentTags||t&&C;v.end>c.ch&&(o=o.slice(0,o.length-v.end+c.ch));var i=o.toLowerCase();if(!o||v.type=="string"&&(v.end!=c.ch||!/[\"\']/.test(v.string.charAt(v.string.length-1))||v.string.length==1)||v.type=="tag"&&n.close||v.string.indexOf("/")==c.ch-v.start-1||S&&w(S,i)>-1||p(s,g.mode.xmlCurrentContext&&g.mode.xmlCurrentContext(E)||[],o,c,!0))return L.Pass;var P=typeof d=="object"&&d.emptyTags;if(P&&w(P,o)>-1){a[h]={text:"/>",newPos:L.Pos(c.line,c.ch+2)};continue}var O=_&&w(_,i)>-1;a[h]={indent:O,text:">"+(O?`
|
|
|
|
|
|
`:"")+"</"+o+">",newPos:O?L.Pos(c.line+1,0):L.Pos(c.line,c.ch+1)}}for(var x=typeof d=="object"&&d.dontIndentOnAutoClose,h=l.length-1;h>=0;h--){var b=a[h];s.replaceRange(b.text,l[h].head,l[h].anchor,"+insert");var y=s.listSelections().slice(0);y[h]={head:b.newPos,anchor:b.newPos},s.setSelections(y),!x&&b.indent&&(s.indentLine(b.newPos.line,null,!0),s.indentLine(b.newPos.line+1,null,!0))}}function u(s,l){for(var a=s.listSelections(),d=[],h=l?"/":"</",c=s.getOption("autoCloseTags"),v=typeof c=="object"&&c.dontIndentOnSlash,g=0;g<a.length;g++){if(!a[g].empty())return L.Pass;var E=a[g].head,n=s.getTokenAt(E),o=L.innerMode(s.getMode(),n.state),t=o.state;if(l&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=E.ch-1))return L.Pass;var S,_=o.mode.name!="xml"&&s.getMode().name=="htmlmixed";if(_&&o.mode.name=="javascript")S=h+"script";else if(_&&o.mode.name=="css")S=h+"style";else{var i=o.mode.xmlCurrentContext&&o.mode.xmlCurrentContext(t);if(!i||i.length&&p(s,i,i[i.length-1],E))return L.Pass;S=h+i[i.length-1]}s.getLine(E.line).charAt(n.end)!=">"&&(S+=">"),d[g]=S}if(s.replaceSelections(d),a=s.listSelections(),!v)for(var g=0;g<a.length;g++)(g==a.length-1||a[g].head.line<a[g+1].head.line)&&s.indentLine(a[g].head.line)}function m(s){return s.getOption("disableInput")?L.Pass:u(s,!0)}L.commands.closeTag=function(s){return u(s)};function w(s,l){if(s.indexOf)return s.indexOf(l);for(var a=0,d=s.length;a<d;++a)if(s[a]==l)return a;return-1}function p(s,l,a,d,h){if(!L.scanForClosingTag)return!1;var c=Math.min(s.lastLine()+1,d.line+500),v=L.scanForClosingTag(s,d,null,c);if(!v||v.tag!=a)return!1;for(var g=h?1:0,E=l.length-1;E>=0&&l[E]==a;E--)++g;d=v.to;for(var E=1;E<g;E++){var n=L.scanForClosingTag(s,d,null,c);if(!n||n.tag!=a)return!1;d=n.to}return!0}})},BjJ7:function(j,J,I){"use strict";I.d(J,"d",function(){return f}),I.d(J,"c",function(){return C}),I.d(J,"e",function(){return D}),I.d(J,"b",function(){return u}),I.d(J,"a",function(){return w});var L=I("m3rI");function f(p){var s=!0;if(p.length>0){for(var l=0;l<p.length;l++)if(p[l].compile_success==0||!p[l].compile_success){s=!1;break}}else s=!1;return s}function C(p){for(var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",l=[],a=0;a<p.length;a++){var d=p[a],h=s?"".concat(s,"/").concat(d.name):"".concat(d.name);l.push({title:d.name,isLeaf:!(d.type==="tree"),key:h})}return l}function D(p,s,l){for(var a=0;a<p.length;a++){var d=p[a];if(d.key===s){d.children=l;break}d.children&&D(d.children,s,l)}return p}function u(p,s,l){var a;return function(){var d=this,h=arguments,c=function(){a=null,l||p.apply(d,h)},v=l&&!a;clearTimeout(a),a=setTimeout(c,s),v&&p.apply(d,h)}}var m=!0,w=L.a.API_SERVER},"C+DQ":function(j,J,I){},Dgm7:function(j,J,I){j.exports=I.p+"static/auth.ea067b42.png"},DlQD:function(j,J,I){(function(L,f){j.exports=f()})(this,function(){"use strict";function L(ke,Oe){for(var Re=0;Re<Oe.length;Re++){var pe=Oe[Re];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(ke,pe.key,pe)}}function f(ke,Oe,Re){return Oe&&L(ke.prototype,Oe),Re&&L(ke,Re),ke}function C(ke,Oe){if(!ke)return;if(typeof ke=="string")return D(ke,Oe);var Re=Object.prototype.toString.call(ke).slice(8,-1);if(Re==="Object"&&ke.constructor&&(Re=ke.constructor.name),Re==="Map"||Re==="Set")return Array.from(ke);if(Re==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Re))return D(ke,Oe)}function D(ke,Oe){(Oe==null||Oe>ke.length)&&(Oe=ke.length);for(var Re=0,pe=new Array(Oe);Re<Oe;Re++)pe[Re]=ke[Re];return pe}function u(ke,Oe){var Re;if(typeof Symbol=="undefined"||ke[Symbol.iterator]==null){if(Array.isArray(ke)||(Re=C(ke))||Oe&&ke&&typeof ke.length=="number"){Re&&(ke=Re);var pe=0;return function(){return pe>=ke.length?{done:!0}:{done:!1,value:ke[pe++]}}}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 Re=ke[Symbol.iterator](),Re.next.bind(Re)}function m(ke,Oe){return Oe={exports:{}},ke(Oe,Oe.exports),Oe.exports}var w=m(function(ke){function Oe(){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 Re(pe){ke.exports.defaults=pe}ke.exports={defaults:Oe(),getDefaults:Oe,changeDefaults:Re}}),p=w.defaults,s=w.getDefaults,l=w.changeDefaults,a=/[&<>"']/,d=/[&<>"']/g,h=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,v={"&":"&","<":"<",">":">",'"':""","'":"'"},g=function(Oe){return v[Oe]};function E(ke,Oe){if(Oe){if(a.test(ke))return ke.replace(d,g)}else if(h.test(ke))return ke.replace(c,g);return ke}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function o(ke){return ke.replace(n,function(Oe,Re){return Re=Re.toLowerCase(),Re==="colon"?":":Re.charAt(0)==="#"?Re.charAt(1)==="x"?String.fromCharCode(parseInt(Re.substring(2),16)):String.fromCharCode(+Re.substring(1)):""})}var t=/(^|[^\[])\^/g;function S(ke,Oe){ke=ke.source||ke,Oe=Oe||"";var Re={replace:function(Ee,we){return we=we.source||we,we=we.replace(t,"$1"),ke=ke.replace(Ee,we),Re},getRegex:function(){return new RegExp(ke,Oe)}};return Re}var _=/[^\w:]/g,i=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function P(ke,Oe,Re){if(ke){var pe;try{pe=decodeURIComponent(o(Re)).replace(_,"").toLowerCase()}catch(Ee){return null}if(pe.indexOf("javascript:")===0||pe.indexOf("vbscript:")===0||pe.indexOf("data:")===0)return null}Oe&&!i.test(Re)&&(Re=T(Oe,Re));try{Re=encodeURI(Re).replace(/%25/g,"%")}catch(Ee){return null}return Re}var O={},x=/^[^:]+:\/*[^/]*$/,b=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(ke,Oe){O[" "+ke]||(x.test(ke)?O[" "+ke]=ke+"/":O[" "+ke]=K(ke,"/",!0)),ke=O[" "+ke];var Re=ke.indexOf(":")===-1;return Oe.substring(0,2)==="//"?Re?Oe:ke.replace(b,"$1")+Oe:Oe.charAt(0)==="/"?Re?Oe:ke.replace(y,"$1")+Oe:ke+Oe}var M={exec:function(){}};function k(ke){for(var Oe=1,Re,pe;Oe<arguments.length;Oe++){Re=arguments[Oe];for(pe in Re)Object.prototype.hasOwnProperty.call(Re,pe)&&(ke[pe]=Re[pe])}return ke}function N(ke,Oe){var Re=ke.replace(/\|/g,function(we,De,Ie){for(var $e=!1,qe=De;--qe>=0&&Ie[qe]==="\\";)$e=!$e;return $e?"|":" |"}),pe=Re.split(/ \|/),Ee=0;if(pe.length>Oe)pe.splice(Oe);else for(;pe.length<Oe;)pe.push("");for(;Ee<pe.length;Ee++)pe[Ee]=pe[Ee].trim().replace(/\\\|/g,"|");return pe}function K(ke,Oe,Re){var pe=ke.length;if(pe===0)return"";for(var Ee=0;Ee<pe;){var we=ke.charAt(pe-Ee-1);if(we===Oe&&!Re)Ee++;else if(we!==Oe&&Re)Ee++;else break}return ke.substr(0,pe-Ee)}function z(ke,Oe){if(ke.indexOf(Oe[1])===-1)return-1;for(var Re=ke.length,pe=0,Ee=0;Ee<Re;Ee++)if(ke[Ee]==="\\")Ee++;else if(ke[Ee]===Oe[0])pe++;else if(ke[Ee]===Oe[1]&&(pe--,pe<0))return Ee;return-1}function B(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 H={escape:E,unescape:o,edit:S,cleanUrl:P,resolveUrl:T,noopTest:M,merge:k,splitCells:N,rtrim:K,findClosingBracket:z,checkSanitizeDeprecation:B},U=w.defaults,W=H.rtrim,G=H.splitCells,ee=H.escape,ie=H.findClosingBracket;function ce(ke,Oe,Re){var pe=Oe.href,Ee=Oe.title?ee(Oe.title):null,we=ke[1].replace(/\\([\[\]])/g,"$1");return ke[0].charAt(0)!=="!"?{type:"link",raw:Re,href:pe,title:Ee,text:we}:{type:"image",raw:Re,href:pe,title:Ee,text:ee(we)}}function _e(ke,Oe){var Re=ke.match(/^(\s+)(?:```)/);if(Re===null)return Oe;var pe=Re[1];return Oe.split(`
|
|
|
`).map(function(Ee){var we=Ee.match(/^\s+/);if(we===null)return Ee;var De=we[0];return De.length>=pe.length?Ee.slice(pe.length):Ee}).join(`
|
|
|
`)}var Ce=function(){function ke(Re){this.options=Re||U}var Oe=ke.prototype;return Oe.space=function(pe){var Ee=this.rules.block.newline.exec(pe);if(Ee)return Ee[0].length>1?{type:"space",raw:Ee[0]}:{raw:`
|
|
|
`}},Oe.code=function(pe,Ee){var we=this.rules.block.code.exec(pe);if(we){var De=Ee[Ee.length-1];if(De&&De.type==="paragraph")return{raw:we[0],text:we[0].trimRight()};var Ie=we[0].replace(/^ {4}/gm,"");return{type:"code",raw:we[0],codeBlockStyle:"indented",text:this.options.pedantic?Ie:W(Ie,`
|
|
|
`)}}},Oe.fences=function(pe){var Ee=this.rules.block.fences.exec(pe);if(Ee){var we=Ee[0],De=_e(we,Ee[3]||"");return{type:"code",raw:we,lang:Ee[2]?Ee[2].trim():Ee[2],text:De}}},Oe.heading=function(pe){var Ee=this.rules.block.heading.exec(pe);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[1].length,text:Ee[2]}},Oe.nptable=function(pe){var Ee=this.rules.block.nptable.exec(pe);if(Ee){var we={type:"table",header:G(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:Ee[0]};if(we.header.length===we.align.length){var De=we.align.length,Ie;for(Ie=0;Ie<De;Ie++)/^ *-+: *$/.test(we.align[Ie])?we.align[Ie]="right":/^ *:-+: *$/.test(we.align[Ie])?we.align[Ie]="center":/^ *:-+ *$/.test(we.align[Ie])?we.align[Ie]="left":we.align[Ie]=null;for(De=we.cells.length,Ie=0;Ie<De;Ie++)we.cells[Ie]=G(we.cells[Ie],we.header.length);return we}}},Oe.hr=function(pe){var Ee=this.rules.block.hr.exec(pe);if(Ee)return{type:"hr",raw:Ee[0]}},Oe.blockquote=function(pe){var Ee=this.rules.block.blockquote.exec(pe);if(Ee){var we=Ee[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ee[0],text:we}}},Oe.list=function(pe){var Ee=this.rules.block.list.exec(pe);if(Ee){for(var we=Ee[0],De=Ee[2],Ie=De.length>1,$e=De[De.length-1]===")",qe={type:"list",raw:we,ordered:Ie,start:Ie?+De.slice(0,-1):"",loose:!1,items:[]},tt=Ee[0].match(this.rules.block.item),xt=!1,gt,sr,tr,St,Nr,Ir,Fr,ln=tt.length,Cr=0;Cr<ln;Cr++)gt=tt[Cr],we=gt,sr=gt.length,gt=gt.replace(/^ *([*+-]|\d+[.)]) */,""),~gt.indexOf(`
|
|
|
`)&&(sr-=gt.length,gt=this.options.pedantic?gt.replace(/^ {1,4}/gm,""):gt.replace(new RegExp("^ {1,"+sr+"}","gm"),"")),Cr!==ln-1&&(tr=this.rules.block.bullet.exec(tt[Cr+1])[0],(Ie?tr.length===1||!$e&&tr[tr.length-1]===")":tr.length>1||this.options.smartLists&&tr!==De)&&(St=tt.slice(Cr+1).join(`
|
|
|
`),qe.raw=qe.raw.substring(0,qe.raw.length-St.length),Cr=ln-1)),Nr=xt||/\n\n(?!\s*$)/.test(gt),Cr!==ln-1&&(xt=gt.charAt(gt.length-1)===`
|
|
|
`,Nr||(Nr=xt)),Nr&&(qe.loose=!0),Ir=/^\[[ xX]\] /.test(gt),Fr=void 0,Ir&&(Fr=gt[1]!==" ",gt=gt.replace(/^\[[ xX]\] +/,"")),qe.items.push({type:"list_item",raw:we,task:Ir,checked:Fr,loose:Nr,text:gt});return qe}},Oe.html=function(pe){var Ee=this.rules.block.html.exec(pe);if(Ee)return{type:this.options.sanitize?"paragraph":"html",raw:Ee[0],pre:!this.options.sanitizer&&(Ee[1]==="pre"||Ee[1]==="script"||Ee[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ee[0]):ee(Ee[0]):Ee[0]}},Oe.def=function(pe){var Ee=this.rules.block.def.exec(pe);if(Ee){Ee[3]&&(Ee[3]=Ee[3].substring(1,Ee[3].length-1));var we=Ee[1].toLowerCase().replace(/\s+/g," ");return{tag:we,raw:Ee[0],href:Ee[2],title:Ee[3]}}},Oe.table=function(pe){var Ee=this.rules.block.table.exec(pe);if(Ee){var we={type:"table",header:G(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(we.header.length===we.align.length){we.raw=Ee[0];var De=we.align.length,Ie;for(Ie=0;Ie<De;Ie++)/^ *-+: *$/.test(we.align[Ie])?we.align[Ie]="right":/^ *:-+: *$/.test(we.align[Ie])?we.align[Ie]="center":/^ *:-+ *$/.test(we.align[Ie])?we.align[Ie]="left":we.align[Ie]=null;for(De=we.cells.length,Ie=0;Ie<De;Ie++)we.cells[Ie]=G(we.cells[Ie].replace(/^ *\| *| *\| *$/g,""),we.header.length);return we}}},Oe.lheading=function(pe){var Ee=this.rules.block.lheading.exec(pe);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[2].charAt(0)==="="?1:2,text:Ee[1]}},Oe.paragraph=function(pe){var Ee=this.rules.block.paragraph.exec(pe);if(Ee)return{type:"paragraph",raw:Ee[0],text:Ee[1].charAt(Ee[1].length-1)===`
|
|
|
`?Ee[1].slice(0,-1):Ee[1]}},Oe.text=function(pe,Ee){var we=this.rules.block.text.exec(pe);if(we){var De=Ee[Ee.length-1];return De&&De.type==="text"?{raw:we[0],text:we[0]}:{type:"text",raw:we[0],text:we[0]}}},Oe.escape=function(pe){var Ee=this.rules.inline.escape.exec(pe);if(Ee)return{type:"escape",raw:Ee[0],text:ee(Ee[1])}},Oe.tag=function(pe,Ee,we){var De=this.rules.inline.tag.exec(pe);if(De)return!Ee&&/^<a /i.test(De[0])?Ee=!0:Ee&&/^<\/a>/i.test(De[0])&&(Ee=!1),!we&&/^<(pre|code|kbd|script)(\s|>)/i.test(De[0])?we=!0:we&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(De[0])&&(we=!1),{type:this.options.sanitize?"text":"html",raw:De[0],inLink:Ee,inRawBlock:we,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):ee(De[0]):De[0]}},Oe.link=function(pe){var Ee=this.rules.inline.link.exec(pe);if(Ee){var we=ie(Ee[2],"()");if(we>-1){var De=Ee[0].indexOf("!")===0?5:4,Ie=De+Ee[1].length+we;Ee[2]=Ee[2].substring(0,we),Ee[0]=Ee[0].substring(0,Ie).trim(),Ee[3]=""}var $e=Ee[2],qe="";if(this.options.pedantic){var tt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec($e);tt?($e=tt[1],qe=tt[3]):qe=""}else qe=Ee[3]?Ee[3].slice(1,-1):"";$e=$e.trim().replace(/^<([\s\S]*)>$/,"$1");var xt=ce(Ee,{href:$e&&$e.replace(this.rules.inline._escapes,"$1"),title:qe&&qe.replace(this.rules.inline._escapes,"$1")},Ee[0]);return xt}},Oe.reflink=function(pe,Ee){var we;if((we=this.rules.inline.reflink.exec(pe))||(we=this.rules.inline.nolink.exec(pe))){var De=(we[2]||we[1]).replace(/\s+/g," ");if(De=Ee[De.toLowerCase()],!De||!De.href){var Ie=we[0].charAt(0);return{type:"text",raw:Ie,text:Ie}}var $e=ce(we,De,we[0]);return $e}},Oe.strong=function(pe,Ee,we){we===void 0&&(we="");var De=this.rules.inline.strong.start.exec(pe);if(De&&(!De[1]||De[1]&&(we===""||this.rules.inline.punctuation.exec(we)))){Ee=Ee.slice(-1*pe.length);var Ie=De[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ie.lastIndex=0;for(var $e;(De=Ie.exec(Ee))!=null;)if($e=this.rules.inline.strong.middle.exec(Ee.slice(0,De.index+3)),$e)return{type:"strong",raw:pe.slice(0,$e[0].length),text:pe.slice(2,$e[0].length-2)}}},Oe.em=function(pe,Ee,we){we===void 0&&(we="");var De=this.rules.inline.em.start.exec(pe);if(De&&(!De[1]||De[1]&&(we===""||this.rules.inline.punctuation.exec(we)))){Ee=Ee.slice(-1*pe.length);var Ie=De[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ie.lastIndex=0;for(var $e;(De=Ie.exec(Ee))!=null;)if($e=this.rules.inline.em.middle.exec(Ee.slice(0,De.index+2)),$e)return{type:"em",raw:pe.slice(0,$e[0].length),text:pe.slice(1,$e[0].length-1)}}},Oe.codespan=function(pe){var Ee=this.rules.inline.code.exec(pe);if(Ee){var we=Ee[2].replace(/\n/g," "),De=/[^ ]/.test(we),Ie=we.startsWith(" ")&&we.endsWith(" ");return De&&Ie&&(we=we.substring(1,we.length-1)),we=ee(we,!0),{type:"codespan",raw:Ee[0],text:we}}},Oe.br=function(pe){var Ee=this.rules.inline.br.exec(pe);if(Ee)return{type:"br",raw:Ee[0]}},Oe.del=function(pe){var Ee=this.rules.inline.del.exec(pe);if(Ee)return{type:"del",raw:Ee[0],text:Ee[1]}},Oe.autolink=function(pe,Ee){var we=this.rules.inline.autolink.exec(pe);if(we){var De,Ie;return we[2]==="@"?(De=ee(this.options.mangle?Ee(we[1]):we[1]),Ie="mailto:"+De):(De=ee(we[1]),Ie=De),{type:"link",raw:we[0],text:De,href:Ie,tokens:[{type:"text",raw:De,text:De}]}}},Oe.url=function(pe,Ee){var we;if(we=this.rules.inline.url.exec(pe)){var De,Ie;if(we[2]==="@")De=ee(this.options.mangle?Ee(we[0]):we[0]),Ie="mailto:"+De;else{var $e;do $e=we[0],we[0]=this.rules.inline._backpedal.exec(we[0])[0];while($e!==we[0]);De=ee(we[0]),we[1]==="www."?Ie="http://"+De:Ie=De}return{type:"link",raw:we[0],text:De,href:Ie,tokens:[{type:"text",raw:De,text:De}]}}},Oe.inlineText=function(pe,Ee,we){var De=this.rules.inline.text.exec(pe);if(De){var Ie;return Ee?Ie=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):ee(De[0]):De[0]:Ie=ee(this.options.smartypants?we(De[0]):De[0]),{type:"text",raw:De[0],text:Ie}}},ke}(),le=H.noopTest,ye=H.edit,fe=H.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:le,table:le,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=ye(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=ye(ne.item,"gm").replace(/bull/g,ne.bullet).getRegex(),ne.list=ye(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=ye(ne.html,"i").replace("comment",ne._comment).replace("tag",ne._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ne.paragraph=ye(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=ye(ne.blockquote).replace("paragraph",ne.paragraph).getRegex(),ne.normal=fe({},ne),ne.gfm=fe({},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=ye(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=ye(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=fe({},ne.normal,{html:ye(`^ *(?: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:le,paragraph:ye(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 ae={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:le,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:le,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ae._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ae.punctuation=ye(ae.punctuation).replace(/punctuation/g,ae._punctuation).getRegex(),ae._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ae._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ae.em.start=ye(ae.em.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.middle=ye(ae.em.middle).replace(/punctuation/g,ae._punctuation).replace(/overlapSkip/g,ae._overlapSkip).getRegex(),ae.em.endAst=ye(ae.em.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.endUnd=ye(ae.em.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.start=ye(ae.strong.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.middle=ye(ae.strong.middle).replace(/punctuation/g,ae._punctuation).replace(/blockSkip/g,ae._blockSkip).getRegex(),ae.strong.endAst=ye(ae.strong.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.endUnd=ye(ae.strong.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.blockSkip=ye(ae._blockSkip,"g").getRegex(),ae.overlapSkip=ye(ae._overlapSkip,"g").getRegex(),ae._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ae._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ae._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])?)+(?![-_])/,ae.autolink=ye(ae.autolink).replace("scheme",ae._scheme).replace("email",ae._email).getRegex(),ae._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ae.tag=ye(ae.tag).replace("comment",ne._comment).replace("attribute",ae._attribute).getRegex(),ae._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ae._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ae._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ae.link=ye(ae.link).replace("label",ae._label).replace("href",ae._href).replace("title",ae._title).getRegex(),ae.reflink=ye(ae.reflink).replace("label",ae._label).getRegex(),ae.reflinkSearch=ye(ae.reflinkSearch,"g").replace("reflink",ae.reflink).replace("nolink",ae.nolink).getRegex(),ae.normal=fe({},ae),ae.pedantic=fe({},ae.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ye(/^!?\[(label)\]\((.*?)\)/).replace("label",ae._label).getRegex(),reflink:ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ae._label).getRegex()}),ae.gfm=fe({},ae.normal,{escape:ye(ae.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ae.gfm.url=ye(ae.gfm.url,"i").replace("email",ae.gfm._extended_email).getRegex(),ae.breaks=fe({},ae.gfm,{br:ye(ae.br).replace("{2,}","*").getRegex(),text:ye(ae.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var q={block:ne,inline:ae},se=w.defaults,Q=q.block,Z=q.inline;function be(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 re(ke){var Oe="",Re,pe,Ee=ke.length;for(Re=0;Re<Ee;Re++)pe=ke.charCodeAt(Re),Math.random()>.5&&(pe="x"+pe.toString(16)),Oe+="&#"+pe+";";return Oe}var Y=function(){function ke(Re){this.tokens=[],this.tokens.links=Object.create(null),this.options=Re||se,this.options.tokenizer=this.options.tokenizer||new Ce,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var pe={block:Q.normal,inline:Z.normal};this.options.pedantic?(pe.block=Q.pedantic,pe.inline=Z.pedantic):this.options.gfm&&(pe.block=Q.gfm,this.options.breaks?pe.inline=Z.breaks:pe.inline=Z.gfm),this.tokenizer.rules=pe}ke.lex=function(pe,Ee){var we=new ke(Ee);return we.lex(pe)};var Oe=ke.prototype;return Oe.lex=function(pe){return pe=pe.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(pe,this.tokens,!0),this.inline(this.tokens),this.tokens},Oe.blockTokens=function(pe,Ee,we){Ee===void 0&&(Ee=[]),we===void 0&&(we=!0),pe=pe.replace(/^ +$/gm,"");for(var De,Ie,$e,qe;pe;){if(De=this.tokenizer.space(pe)){pe=pe.substring(De.raw.length),De.type&&Ee.push(De);continue}if(De=this.tokenizer.code(pe,Ee)){pe=pe.substring(De.raw.length),De.type?Ee.push(De):(qe=Ee[Ee.length-1],qe.raw+=`
|
|
|
`+De.raw,qe.text+=`
|
|
|
`+De.text);continue}if(De=this.tokenizer.fences(pe)){pe=pe.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.heading(pe)){pe=pe.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.nptable(pe)){pe=pe.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.hr(pe)){pe=pe.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.blockquote(pe)){pe=pe.substring(De.raw.length),De.tokens=this.blockTokens(De.text,[],we),Ee.push(De);continue}if(De=this.tokenizer.list(pe)){for(pe=pe.substring(De.raw.length),$e=De.items.length,Ie=0;Ie<$e;Ie++)De.items[Ie].tokens=this.blockTokens(De.items[Ie].text,[],!1);Ee.push(De);continue}if(De=this.tokenizer.html(pe)){pe=pe.substring(De.raw.length),Ee.push(De);continue}if(we&&(De=this.tokenizer.def(pe))){pe=pe.substring(De.raw.length),this.tokens.links[De.tag]||(this.tokens.links[De.tag]={href:De.href,title:De.title});continue}if(De=this.tokenizer.table(pe)){pe=pe.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.lheading(pe)){pe=pe.substring(De.raw.length),Ee.push(De);continue}if(we&&(De=this.tokenizer.paragraph(pe))){pe=pe.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.text(pe,Ee)){pe=pe.substring(De.raw.length),De.type?Ee.push(De):(qe=Ee[Ee.length-1],qe.raw+=`
|
|
|
`+De.raw,qe.text+=`
|
|
|
`+De.text);continue}if(pe){var tt="Infinite loop on byte: "+pe.charCodeAt(0);if(this.options.silent){console.error(tt);break}else throw new Error(tt)}}return Ee},Oe.inline=function(pe){var Ee,we,De,Ie,$e,qe,tt=pe.length;for(Ee=0;Ee<tt;Ee++){qe=pe[Ee];switch(qe.type){case"paragraph":case"text":case"heading":{qe.tokens=[],this.inlineTokens(qe.text,qe.tokens);break}case"table":{for(qe.tokens={header:[],cells:[]},Ie=qe.header.length,we=0;we<Ie;we++)qe.tokens.header[we]=[],this.inlineTokens(qe.header[we],qe.tokens.header[we]);for(Ie=qe.cells.length,we=0;we<Ie;we++)for($e=qe.cells[we],qe.tokens.cells[we]=[],De=0;De<$e.length;De++)qe.tokens.cells[we][De]=[],this.inlineTokens($e[De],qe.tokens.cells[we][De]);break}case"blockquote":{this.inline(qe.tokens);break}case"list":{for(Ie=qe.items.length,we=0;we<Ie;we++)this.inline(qe.items[we].tokens);break}}}return pe},Oe.inlineTokens=function(pe,Ee,we,De,Ie){Ee===void 0&&(Ee=[]),we===void 0&&(we=!1),De===void 0&&(De=!1),Ie===void 0&&(Ie="");var $e,qe=pe,tt;if(this.tokens.links){var xt=Object.keys(this.tokens.links);if(xt.length>0)for(;(tt=this.tokenizer.rules.inline.reflinkSearch.exec(qe))!=null;)xt.includes(tt[0].slice(tt[0].lastIndexOf("[")+1,-1))&&(qe=qe.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(tt=this.tokenizer.rules.inline.blockSkip.exec(qe))!=null;)qe=qe.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;pe;){if($e=this.tokenizer.escape(pe)){pe=pe.substring($e.raw.length),Ee.push($e);continue}if($e=this.tokenizer.tag(pe,we,De)){pe=pe.substring($e.raw.length),we=$e.inLink,De=$e.inRawBlock,Ee.push($e);continue}if($e=this.tokenizer.link(pe)){pe=pe.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,De)),Ee.push($e);continue}if($e=this.tokenizer.reflink(pe,this.tokens.links)){pe=pe.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,De)),Ee.push($e);continue}if($e=this.tokenizer.strong(pe,qe,Ie)){pe=pe.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],we,De),Ee.push($e);continue}if($e=this.tokenizer.em(pe,qe,Ie)){pe=pe.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],we,De),Ee.push($e);continue}if($e=this.tokenizer.codespan(pe)){pe=pe.substring($e.raw.length),Ee.push($e);continue}if($e=this.tokenizer.br(pe)){pe=pe.substring($e.raw.length),Ee.push($e);continue}if($e=this.tokenizer.del(pe)){pe=pe.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],we,De),Ee.push($e);continue}if($e=this.tokenizer.autolink(pe,re)){pe=pe.substring($e.raw.length),Ee.push($e);continue}if(!we&&($e=this.tokenizer.url(pe,re))){pe=pe.substring($e.raw.length),Ee.push($e);continue}if($e=this.tokenizer.inlineText(pe,De,be)){pe=pe.substring($e.raw.length),Ie=$e.raw.slice(-1),Ee.push($e);continue}if(pe){var gt="Infinite loop on byte: "+pe.charCodeAt(0);if(this.options.silent){console.error(gt);break}else throw new Error(gt)}}return Ee},f(ke,null,[{key:"rules",get:function(){return{block:Q,inline:Z}}}]),ke}(),X=w.defaults,$=H.cleanUrl,ve=H.escape,de=function(){function ke(Re){this.options=Re||X}var Oe=ke.prototype;return Oe.code=function(pe,Ee,we){var De=(Ee||"").match(/\S*/)[0];if(this.options.highlight){var Ie=this.options.highlight(pe,De);Ie!=null&&Ie!==pe&&(we=!0,pe=Ie)}return De?'<pre><code class="'+this.options.langPrefix+ve(De,!0)+'">'+(we?pe:ve(pe,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(we?pe:ve(pe,!0))+`</code></pre>
|
|
|
`},Oe.blockquote=function(pe){return`<blockquote>
|
|
|
`+pe+`</blockquote>
|
|
|
`},Oe.html=function(pe){return pe},Oe.heading=function(pe,Ee,we,De){return this.options.headerIds?"<h"+Ee+' id="'+this.options.headerPrefix+De.slug(we)+'">'+pe+"</h"+Ee+`>
|
|
|
`:"<h"+Ee+">"+pe+"</h"+Ee+`>
|
|
|
`},Oe.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Oe.list=function(pe,Ee,we){var De=Ee?"ol":"ul",Ie=Ee&&we!==1?' start="'+we+'"':"";return"<"+De+Ie+`>
|
|
|
`+pe+"</"+De+`>
|
|
|
`},Oe.listitem=function(pe){return"<li>"+pe+`</li>
|
|
|
`},Oe.checkbox=function(pe){return"<input "+(pe?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Oe.paragraph=function(pe){return"<p>"+pe+`</p>
|
|
|
`},Oe.table=function(pe,Ee){return Ee&&(Ee="<tbody>"+Ee+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+pe+`</thead>
|
|
|
`+Ee+`</table>
|
|
|
`},Oe.tablerow=function(pe){return`<tr>
|
|
|
`+pe+`</tr>
|
|
|
`},Oe.tablecell=function(pe,Ee){var we=Ee.header?"th":"td",De=Ee.align?"<"+we+' align="'+Ee.align+'">':"<"+we+">";return De+pe+"</"+we+`>
|
|
|
`},Oe.strong=function(pe){return"<strong>"+pe+"</strong>"},Oe.em=function(pe){return"<em>"+pe+"</em>"},Oe.codespan=function(pe){return"<code>"+pe+"</code>"},Oe.br=function(){return this.options.xhtml?"<br/>":"<br>"},Oe.del=function(pe){return"<del>"+pe+"</del>"},Oe.link=function(pe,Ee,we){if(pe=$(this.options.sanitize,this.options.baseUrl,pe),pe===null)return we;var De='<a href="'+ve(pe)+'"';return Ee&&(De+=' title="'+Ee+'"'),De+=">"+we+"</a>",De},Oe.image=function(pe,Ee,we){if(pe=$(this.options.sanitize,this.options.baseUrl,pe),pe===null)return we;var De='<img src="'+pe+'" alt="'+we+'"';return Ee&&(De+=' title="'+Ee+'"'),De+=this.options.xhtml?"/>":">",De},Oe.text=function(pe){return pe},ke}(),xe=function(){function ke(){}var Oe=ke.prototype;return Oe.strong=function(pe){return pe},Oe.em=function(pe){return pe},Oe.codespan=function(pe){return pe},Oe.del=function(pe){return pe},Oe.html=function(pe){return pe},Oe.text=function(pe){return pe},Oe.link=function(pe,Ee,we){return""+we},Oe.image=function(pe,Ee,we){return""+we},Oe.br=function(){return""},ke}(),Ke=function(){function ke(){this.seen={}}var Oe=ke.prototype;return Oe.slug=function(pe){var Ee=pe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ee)){var we=Ee;do this.seen[we]++,Ee=we+"-"+this.seen[we];while(this.seen.hasOwnProperty(Ee))}return this.seen[Ee]=0,Ee},ke}(),Ve=w.defaults,Xe=H.unescape,at=function(){function ke(Re){this.options=Re||Ve,this.options.renderer=this.options.renderer||new de,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new xe,this.slugger=new Ke}ke.parse=function(pe,Ee){var we=new ke(Ee);return we.parse(pe)};var Oe=ke.prototype;return Oe.parse=function(pe,Ee){Ee===void 0&&(Ee=!0);var we="",De,Ie,$e,qe,tt,xt,gt,sr,tr,St,Nr,Ir,Fr,ln,Cr,rn,en,Lr,un=pe.length;for(De=0;De<un;De++){St=pe[De];switch(St.type){case"space":continue;case"hr":{we+=this.renderer.hr();continue}case"heading":{we+=this.renderer.heading(this.parseInline(St.tokens),St.depth,Xe(this.parseInline(St.tokens,this.textRenderer)),this.slugger);continue}case"code":{we+=this.renderer.code(St.text,St.lang,St.escaped);continue}case"table":{for(sr="",gt="",qe=St.header.length,Ie=0;Ie<qe;Ie++)gt+=this.renderer.tablecell(this.parseInline(St.tokens.header[Ie]),{header:!0,align:St.align[Ie]});for(sr+=this.renderer.tablerow(gt),tr="",qe=St.cells.length,Ie=0;Ie<qe;Ie++){for(xt=St.tokens.cells[Ie],gt="",tt=xt.length,$e=0;$e<tt;$e++)gt+=this.renderer.tablecell(this.parseInline(xt[$e]),{header:!1,align:St.align[$e]});tr+=this.renderer.tablerow(gt)}we+=this.renderer.table(sr,tr);continue}case"blockquote":{tr=this.parse(St.tokens),we+=this.renderer.blockquote(tr);continue}case"list":{for(Nr=St.ordered,Ir=St.start,Fr=St.loose,qe=St.items.length,tr="",Ie=0;Ie<qe;Ie++)Cr=St.items[Ie],rn=Cr.checked,en=Cr.task,ln="",Cr.task&&(Lr=this.renderer.checkbox(rn),Fr?Cr.tokens.length>0&&Cr.tokens[0].type==="text"?(Cr.tokens[0].text=Lr+" "+Cr.tokens[0].text,Cr.tokens[0].tokens&&Cr.tokens[0].tokens.length>0&&Cr.tokens[0].tokens[0].type==="text"&&(Cr.tokens[0].tokens[0].text=Lr+" "+Cr.tokens[0].tokens[0].text)):Cr.tokens.unshift({type:"text",text:Lr}):ln+=Lr),ln+=this.parse(Cr.tokens,Fr),tr+=this.renderer.listitem(ln,en,rn);we+=this.renderer.list(tr,Nr,Ir);continue}case"html":{we+=this.renderer.html(St.text);continue}case"paragraph":{we+=this.renderer.paragraph(this.parseInline(St.tokens));continue}case"text":{for(tr=St.tokens?this.parseInline(St.tokens):St.text;De+1<un&&pe[De+1].type==="text";)St=pe[++De],tr+=`
|
|
|
`+(St.tokens?this.parseInline(St.tokens):St.text);we+=Ee?this.renderer.paragraph(tr):tr;continue}default:{var yn='Token with "'+St.type+'" type was not found.';if(this.options.silent){console.error(yn);return}else throw new Error(yn)}}}return we},Oe.parseInline=function(pe,Ee){Ee=Ee||this.renderer;var we="",De,Ie,$e=pe.length;for(De=0;De<$e;De++){Ie=pe[De];switch(Ie.type){case"escape":{we+=Ee.text(Ie.text);break}case"html":{we+=Ee.html(Ie.text);break}case"link":{we+=Ee.link(Ie.href,Ie.title,this.parseInline(Ie.tokens,Ee));break}case"image":{we+=Ee.image(Ie.href,Ie.title,Ie.text);break}case"strong":{we+=Ee.strong(this.parseInline(Ie.tokens,Ee));break}case"em":{we+=Ee.em(this.parseInline(Ie.tokens,Ee));break}case"codespan":{we+=Ee.codespan(Ie.text);break}case"br":{we+=Ee.br();break}case"del":{we+=Ee.del(this.parseInline(Ie.tokens,Ee));break}case"text":{we+=Ee.text(Ie.text);break}default:{var qe='Token with "'+Ie.type+'" type was not found.';if(this.options.silent){console.error(qe);return}else throw new Error(qe)}}}return we},ke}(),it=H.merge,lt=H.checkSanitizeDeprecation,Me=H.escape,Te=w.getDefaults,Ye=w.changeDefaults,ot=w.defaults;function ze(ke,Oe,Re){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 Oe=="function"&&(Re=Oe,Oe=null),Oe=it({},ze.defaults,Oe||{}),lt(Oe),Re){var pe=Oe.highlight,Ee;try{Ee=Y.lex(ke,Oe)}catch($e){return Re($e)}var we=function(qe){var tt;if(!qe)try{tt=at.parse(Ee,Oe)}catch(xt){qe=xt}return Oe.highlight=pe,qe?Re(qe):Re(null,tt)};if(!pe||pe.length<3)return we();if(delete Oe.highlight,!Ee.length)return we();var De=0;ze.walkTokens(Ee,function($e){$e.type==="code"&&(De++,setTimeout(function(){pe($e.text,$e.lang,function(qe,tt){if(qe)return we(qe);tt!=null&&tt!==$e.text&&($e.text=tt,$e.escaped=!0),De--,De===0&&we()})},0))}),De===0&&we();return}try{var Ie=Y.lex(ke,Oe);return Oe.walkTokens&&ze.walkTokens(Ie,Oe.walkTokens),at.parse(Ie,Oe)}catch($e){if($e.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Oe.silent)return"<p>An error occurred:</p><pre>"+Me($e.message+"",!0)+"</pre>";throw $e}}ze.options=ze.setOptions=function(ke){return it(ze.defaults,ke),Ye(ze.defaults),ze},ze.getDefaults=Te,ze.defaults=ot,ze.use=function(ke){var Oe=it({},ke);if(ke.renderer&&function(){var pe=ze.defaults.renderer||new de,Ee=function(Ie){var $e=pe[Ie];pe[Ie]=function(){for(var qe=arguments.length,tt=new Array(qe),xt=0;xt<qe;xt++)tt[xt]=arguments[xt];var gt=ke.renderer[Ie].apply(pe,tt);return gt===!1&&(gt=$e.apply(pe,tt)),gt}};for(var we in ke.renderer)Ee(we);Oe.renderer=pe}(),ke.tokenizer&&function(){var pe=ze.defaults.tokenizer||new Ce,Ee=function(Ie){var $e=pe[Ie];pe[Ie]=function(){for(var qe=arguments.length,tt=new Array(qe),xt=0;xt<qe;xt++)tt[xt]=arguments[xt];var gt=ke.tokenizer[Ie].apply(pe,tt);return gt===!1&&(gt=$e.apply(pe,tt)),gt}};for(var we in ke.tokenizer)Ee(we);Oe.tokenizer=pe}(),ke.walkTokens){var Re=ze.defaults.walkTokens;Oe.walkTokens=function(pe){ke.walkTokens(pe),Re&&Re(pe)}}ze.setOptions(Oe)},ze.walkTokens=function(ke,Oe){for(var Re=u(ke),pe;!(pe=Re()).done;){var Ee=pe.value;Oe(Ee);switch(Ee.type){case"table":{for(var we=u(Ee.tokens.header),De;!(De=we()).done;){var Ie=De.value;ze.walkTokens(Ie,Oe)}for(var $e=u(Ee.tokens.cells),qe;!(qe=$e()).done;)for(var tt=qe.value,xt=u(tt),gt;!(gt=xt()).done;){var sr=gt.value;ze.walkTokens(sr,Oe)}break}case"list":{ze.walkTokens(Ee.items,Oe);break}default:Ee.tokens&&ze.walkTokens(Ee.tokens,Oe)}}},ze.Parser=at,ze.parser=at.parse,ze.Renderer=de,ze.TextRenderer=xe,ze.Lexer=Y,ze.lexer=Y.lex,ze.Tokenizer=Ce,ze.Slugger=Ke,ze.parse=ze;var rt=ze;return rt})},E4JC:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.StreamCipher,u=f.algo,m=[],w=[],p=[],s=u.Rabbit=D.extend({_doReset:function(){for(var a=this._key.words,d=this.cfg.iv,h=0;h<4;h++)a[h]=(a[h]<<8|a[h]>>>24)&16711935|(a[h]<<24|a[h]>>>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],v=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 h=0;h<4;h++)l.call(this);for(var h=0;h<8;h++)v[h]^=c[h+4&7];if(d){var g=d.words,E=g[0],n=g[1],o=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,t=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,S=o>>>16|t&4294901760,_=t<<16|o&65535;v[0]^=o,v[1]^=S,v[2]^=t,v[3]^=_,v[4]^=o,v[5]^=S,v[6]^=t,v[7]^=_;for(var h=0;h<4;h++)l.call(this)}},_doProcessBlock:function(a,d){var h=this._X;l.call(this),m[0]=h[0]^h[5]>>>16^h[3]<<16,m[1]=h[2]^h[7]>>>16^h[5]<<16,m[2]=h[4]^h[1]>>>16^h[7]<<16,m[3]=h[6]^h[3]>>>16^h[1]<<16;for(var c=0;c<4;c++)m[c]=(m[c]<<8|m[c]>>>24)&16711935|(m[c]<<24|m[c]>>>8)&4278255360,a[d+c]^=m[c]},blockSize:128/32,ivSize:64/32});function l(){for(var a=this._X,d=this._C,h=0;h<8;h++)w[h]=d[h];d[0]=d[0]+1295307597+this._b|0,d[1]=d[1]+3545052371+(d[0]>>>0<w[0]>>>0?1:0)|0,d[2]=d[2]+886263092+(d[1]>>>0<w[1]>>>0?1:0)|0,d[3]=d[3]+1295307597+(d[2]>>>0<w[2]>>>0?1:0)|0,d[4]=d[4]+3545052371+(d[3]>>>0<w[3]>>>0?1:0)|0,d[5]=d[5]+886263092+(d[4]>>>0<w[4]>>>0?1:0)|0,d[6]=d[6]+1295307597+(d[5]>>>0<w[5]>>>0?1:0)|0,d[7]=d[7]+3545052371+(d[6]>>>0<w[6]>>>0?1:0)|0,this._b=d[7]>>>0<w[7]>>>0?1:0;for(var h=0;h<8;h++){var c=a[h]+d[h],v=c&65535,g=c>>>16,E=((v*v>>>17)+v*g>>>15)+g*g,n=((c&4294901760)*c|0)+((c&65535)*c|0);p[h]=E^n}a[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0,a[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0,a[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0,a[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0,a[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0,a[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0,a[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0,a[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}f.Rabbit=D._createHelper(s)}(),L.Rabbit})},ELLl:function(j,J,I){(function(L){L(I("VrN/"))})(function(L){var f={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},C=L.Pos;L.defineOption("autoCloseBrackets",!1,function(v,g,E){E&&E!=L.Init&&(v.removeKeyMap(u),v.state.closeBrackets=null),g&&(m(D(g,"pairs")),v.state.closeBrackets=g,v.addKeyMap(u))});function D(v,g){return g=="pairs"&&typeof v=="string"?v:typeof v=="object"&&v[g]!=null?v[g]:f[g]}var u={Backspace:s,Enter:l};function m(v){for(var g=0;g<v.length;g++){var E=v.charAt(g),n="'"+E+"'";u[n]||(u[n]=w(E))}}m(f.pairs+"`");function w(v){return function(g){return d(g,v)}}function p(v){var g=v.state.closeBrackets;if(!g||g.override)return g;var E=v.getModeAt(v.getCursor());return E.closeBrackets||g}function s(v){var g=p(v);if(!g||v.getOption("disableInput"))return L.Pass;for(var E=D(g,"pairs"),n=v.listSelections(),o=0;o<n.length;o++){if(!n[o].empty())return L.Pass;var t=h(v,n[o].head);if(!t||E.indexOf(t)%2!=0)return L.Pass}for(var o=n.length-1;o>=0;o--){var S=n[o].head;v.replaceRange("",C(S.line,S.ch-1),C(S.line,S.ch+1),"+delete")}}function l(v){var g=p(v),E=g&&D(g,"explode");if(!E||v.getOption("disableInput"))return L.Pass;for(var n=v.listSelections(),o=0;o<n.length;o++){if(!n[o].empty())return L.Pass;var t=h(v,n[o].head);if(!t||E.indexOf(t)%2!=0)return L.Pass}v.operation(function(){var S=v.lineSeparator()||`
|
|
|
`;v.replaceSelection(S+S,null),v.execCommand("goCharLeft"),n=v.listSelections();for(var _=0;_<n.length;_++){var i=n[_].head.line;v.indentLine(i,null,!0),v.indentLine(i+1,null,!0)}})}function a(v){var g=L.cmpPos(v.anchor,v.head)>0;return{anchor:new C(v.anchor.line,v.anchor.ch+(g?-1:1)),head:new C(v.head.line,v.head.ch+(g?1:-1))}}function d(v,g){var E=p(v);if(!E||v.getOption("disableInput"))return L.Pass;var n=D(E,"pairs"),o=n.indexOf(g);if(o==-1)return L.Pass;for(var t=D(E,"closeBefore"),S=D(E,"triples"),_=n.charAt(o+1)==g,i=v.listSelections(),P=o%2==0,O,x=0;x<i.length;x++){var b=i[x],y=b.head,T,M=v.getRange(y,C(y.line,y.ch+1));if(P&&!b.empty())T="surround";else if((_||!P)&&M==g)_&&c(v,y)?T="both":S.indexOf(g)>=0&&v.getRange(y,C(y.line,y.ch+3))==g+g+g?T="skipThree":T="skip";else if(_&&y.ch>1&&S.indexOf(g)>=0&&v.getRange(C(y.line,y.ch-2),y)==g+g){if(y.ch>2&&/\bstring/.test(v.getTokenTypeAt(C(y.line,y.ch-2))))return L.Pass;T="addFour"}else if(_){var k=y.ch==0?" ":v.getRange(C(y.line,y.ch-1),y);if(!L.isWordChar(M)&&k!=g&&!L.isWordChar(k))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 N=o%2?n.charAt(o-1):g,K=o%2?g:n.charAt(o+1);v.operation(function(){if(O=="skip")v.execCommand("goCharRight");else if(O=="skipThree")for(var z=0;z<3;z++)v.execCommand("goCharRight");else if(O=="surround"){for(var B=v.getSelections(),z=0;z<B.length;z++)B[z]=N+B[z]+K;v.replaceSelections(B,"around"),B=v.listSelections().slice();for(var z=0;z<B.length;z++)B[z]=a(B[z]);v.setSelections(B)}else O=="both"?(v.replaceSelection(N+K,null),v.triggerElectric(N+K),v.execCommand("goCharLeft")):O=="addFour"&&(v.replaceSelection(N+N+N+N,"before"),v.execCommand("goCharRight"))})}function h(v,g){var E=v.getRange(C(g.line,g.ch-1),C(g.line,g.ch+1));return E.length==2?E:null}function c(v,g){var E=v.getTokenAt(C(g.line,g.ch+1));return/\bstring/.test(E.type)&&E.start==g.ch&&(g.ch==0||!/\bstring/.test(v.getTokenTypeAt(g)))}})},ELcG:function(j,J,I){(function(L,f){j.exports=J=f(I("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(f){var C=L,D=C.lib,u=D.WordArray,m=D.Hasher,w=C.algo,p=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]),s=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]),d=u.create([0,1518500249,1859775393,2400959708,2840853838]),h=u.create([1352829926,1548603684,1836072691,2053994217,0]),c=w.RIPEMD160=m.extend({_doReset:function(){this._hash=u.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(S,_){for(var i=0;i<16;i++){var P=_+i,O=S[P];S[P]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var x=this._hash.words,b=d.words,y=h.words,T=p.words,M=s.words,k=l.words,N=a.words,K,z,B,H,U,W,G,ee,ie,ce;W=K=x[0],G=z=x[1],ee=B=x[2],ie=H=x[3],ce=U=x[4];for(var _e,i=0;i<80;i+=1)_e=K+S[_+T[i]]|0,i<16?_e+=v(z,B,H)+b[0]:i<32?_e+=g(z,B,H)+b[1]:i<48?_e+=E(z,B,H)+b[2]:i<64?_e+=n(z,B,H)+b[3]:_e+=o(z,B,H)+b[4],_e=_e|0,_e=t(_e,k[i]),_e=_e+U|0,K=U,U=H,H=t(B,10),B=z,z=_e,_e=W+S[_+M[i]]|0,i<16?_e+=o(G,ee,ie)+y[0]:i<32?_e+=n(G,ee,ie)+y[1]:i<48?_e+=E(G,ee,ie)+y[2]:i<64?_e+=g(G,ee,ie)+y[3]:_e+=v(G,ee,ie)+y[4],_e=_e|0,_e=t(_e,N[i]),_e=_e+ce|0,W=ce,ce=ie,ie=t(ee,10),ee=G,G=_e;_e=x[1]+B+ie|0,x[1]=x[2]+H+ce|0,x[2]=x[3]+U+W|0,x[3]=x[4]+K+G|0,x[4]=x[0]+z+ee|0,x[0]=_e},_doFinalize:function(){var S=this._data,_=S.words,i=this._nDataBytes*8,P=S.sigBytes*8;_[P>>>5]|=128<<24-P%32,_[(P+64>>>9<<4)+14]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,S.sigBytes=(_.length+1)*4,this._process();for(var O=this._hash,x=O.words,b=0;b<5;b++){var y=x[b];x[b]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}return O},clone:function(){var S=m.clone.call(this);return S._hash=this._hash.clone(),S}});function v(S,_,i){return S^_^i}function g(S,_,i){return S&_|~S&i}function E(S,_,i){return(S|~_)^i}function n(S,_,i){return S&i|_&~i}function o(S,_,i){return S^(_|~i)}function t(S,_){return S<<_|S>>>32-_}C.RIPEMD160=m._createHelper(c),C.HmacRIPEMD160=m._createHmacHelper(c)}(Math),L.RIPEMD160})},ETIr:function(j,J,I){(function(L,f){j.exports=J=f(I("Ib8C"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.WordArray,u=f.enc,m=u.Base64={stringify:function(p){var s=p.words,l=p.sigBytes,a=this._map;p.clamp();for(var d=[],h=0;h<l;h+=3)for(var c=s[h>>>2]>>>24-h%4*8&255,v=s[h+1>>>2]>>>24-(h+1)%4*8&255,g=s[h+2>>>2]>>>24-(h+2)%4*8&255,E=c<<16|v<<8|g,n=0;n<4&&h+n*.75<l;n++)d.push(a.charAt(E>>>6*(3-n)&63));var o=a.charAt(64);if(o)for(;d.length%4;)d.push(o);return d.join("")},parse:function(p){var s=p.length,l=this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var d=0;d<l.length;d++)a[l.charCodeAt(d)]=d}var h=l.charAt(64);if(h){var c=p.indexOf(h);c!==-1&&(s=c)}return w(p,s,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function w(p,s,l){for(var a=[],d=0,h=0;h<s;h++)if(h%4){var c=l[p.charCodeAt(h-1)]<<h%4*2,v=l[p.charCodeAt(h)]>>>6-h%4*2,g=c|v;a[d>>>2]|=g<<24-d%4*8,d++}return D.create(a,d)}}(),L.enc.Base64})},"F+F2":function(j,J,I){(function(L,f){j.exports=J=f(I("Ib8C"))})(this,function(L){return function(){if(typeof ArrayBuffer!="function")return;var f=L,C=f.lib,D=C.WordArray,u=D.init,m=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 p=w.byteLength,s=[],l=0;l<p;l++)s[l>>>2]|=w[l]<<24-l%4*8;u.call(this,s,p)}else u.apply(this,arguments)};m.prototype=D}(),L.lib.WordArray})},GRO8:function(j,J,I){"use strict";I.r(J);var L=I("k1fw"),f=I("2qtc"),C=I("kLXV"),D=I("lUTK"),u=I("BvKs"),m=I("+L6B"),w=I("2/Rp"),p=I("T2oS"),s=I("W9HT"),l=I("sPJy"),a=I("bE4q"),d=I("miYZ"),h=I("tsqr"),c=I("9og8"),v=I("tJVT"),g=I("PpiC"),E=I("WmNS"),n=I.n(E),o=I("cDcd"),t=I.n(o),S=I("Ty5D"),_=I("55Ip"),i=I("9kvl"),P=I("KeDT"),O=I.n(P),x=I("zrhs"),b=I("DZo9"),y=I("8z0m"),T=I("LtfV"),M=I("KhGG"),k=y.a.Dragger,N=function(et){var pt=et.user,_t=et.dispatch,Ut=et.classroomList,Dt=et.shixunsDetail,Gt=et.getResults,It=Object(S.i)(),ut=Object(o.useState)(),yt=Object(v.a)(ut,2),bt=yt[0],er=yt[1],Yt=Object(o.useState)([]),Wt=Object(v.a)(Yt,2),jt=Wt[0],Xt=Wt[1],Qt=Object(o.useState)(!1),Ze=Object(v.a)(Qt,2),mr=Ze[0],wr=Ze[1],rr={onRemove:function(){Xt([])},beforeUpload:function(Et){if(console.log(Et),(Et==null?void 0:Et.size)>1024*1024*500)return h.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var ht=[];return ht.push(Et),Xt([].concat(ht)),!1},fileList:jt};return t.a.createElement(C.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:Dt.actionTabs.key==="md-tab",confirmLoading:mr,onOk:Object(c.a)(n.a.mark(function ft(){var Et,ht,Ct;return n.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:if(!((jt==null?void 0:jt.length)<=0)){nr.next=3;break}return h.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),nr.abrupt("return");case 3:return wr(!0),nr.next=6,Object(M.c)(jt[0],{login:(Et=pt.userInfo)===null||Et===void 0?void 0:Et.login,container_type:"Competition",container_id:Dt.actionTabs.params.id,stage_type:Dt.actionTabs.params.value,file_name:(ht=jt[0])===null||ht===void 0?void 0:ht.name});case 6:Ct=nr.sent,(Ct==null?void 0:Ct.status)===0?(h.b.info("\u63D0\u4EA4\u6210\u529F"),_t({type:"shixunsDetail/setActionTabs",payload:{key:""}}),wr(!1),Xt([]),Gt(Dt.actionTabs.params.value)):(wr(!1),h.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return nr.stop()}},ft)})),onCancel:function(){Xt([]),_t({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},t.a.createElement(k,rr,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(i.a)(function(mt){var et=mt.user,pt=mt.classroomList,_t=mt.shixunsDetail;return{user:et,classroomList:pt,shixunsDetail:_t}})(N),z=I("14J3"),B=I("BMrR"),H=I("5NDa"),U=I("5rEg"),W=I("9Bee"),G=I("m3rI"),ee=I("ErOA"),ie=I("NLgs"),ce=I("fV52"),_e=I("3I+P"),Ce=I("OaEy"),le=I("2fM7"),ye=I("5bA4"),fe=I("UESt"),ne=le.a.Option;function ae(mt){var et=mt.rewarddata,pt=mt.getlistdatas,_t=mt.is_signed,Ut=mt.dispatch,Dt=mt.userlist,Gt=Object(o.useRef)(null),It=Object(o.useState)(!1),ut=Object(v.a)(It,2),yt=ut[0],bt=ut[1],er=Object(o.useState)(void 0),Yt=Object(v.a)(er,2),Wt=Yt[0],jt=Yt[1],Xt=Object(o.useState)(""),Qt=Object(v.a)(Xt,2),Ze=Qt[0],mr=Qt[1],wr=Object(o.useState)(void 0),rr=Object(v.a)(wr,2),ft=rr[0],Et=rr[1],ht=Object(o.useState)(void 0),Ct=Object(v.a)(ht,2),Ht=Ct[0],nr=Ct[1],Kt=Object(o.useState)(void 0),vr=Object(v.a)(Kt,2),Or=vr[0],lr=vr[1];function Qe(ar){return Mt.apply(this,arguments)}function Mt(){return Mt=Object(c.a)(n.a.mark(function ar(gr){var xr;return n.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:if(!gr.user_received){Bt.next=3;break}return window.open(gr.click_info),Bt.abrupt("return");case 3:if(Object(ie.f)(Ut)){Bt.next=5;break}return Bt.abrupt("return");case 5:if(!(_t===!1)){Bt.next=8;break}return h.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Bt.abrupt("return");case 8:if(!(gr.click_event==="Pop")){Bt.next=14;break}return mr(gr.id),bt(!0),Bt.abrupt("return");case 14:jt(void 0);case 15:return Bt.next=17,Ut({type:"competitions/Reward",payload:{competition_module_setting_id:gr.id}});case 17:xr=Bt.sent,xr&&xr.status===0&&(pt(),gr.click_event==="Link"?(h.b.info("\u9886\u53D6\u6210\u529F"),window.open(gr.click_info)):h.b.info(gr.click_info));case 19:case"end":return Bt.stop()}},ar)})),Mt.apply(this,arguments)}function Gr(){return Ur.apply(this,arguments)}function Ur(){return Ur=Object(c.a)(n.a.mark(function ar(){var gr;return n.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:if(!(Dt&&!Dt.real_name)){At.next=4;break}if(ft){At.next=4;break}return h.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),At.abrupt("return");case 4:if(!(Dt&&!Dt.email)){At.next=8;break}if(Ht){At.next=8;break}return h.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),At.abrupt("return");case 8:if(!(Dt&&!Dt.phone)){At.next=12;break}if(Or){At.next=12;break}return h.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),At.abrupt("return");case 12:if(Wt){At.next=15;break}return h.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),At.abrupt("return");case 15:return At.next=17,Ut({type:"competitions/Reward",payload:{competition_module_setting_id:Ze,className:Wt,name:ft,mail:Ht,phone:Or}});case 17:gr=At.sent,gr&&gr.status===0&&(bt(!1),pt(),h.b.info("HCIA\u8BA4\u8BC1\u8003\u8BD5\u4EE3\u91D1\u52B5\u5C06\u7531Educoder\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 At.stop()}},ar)})),Ur.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement(C.a,{visible:yt,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return bt(!1)},onOk:function(){Gr()}},t.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",t.a.createElement(U.a,{className:Dt&&Dt.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.real_name||ft,disabled:Dt&&Dt.real_name||!1,onChange:function(gr){return Et(gr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",t.a.createElement(U.a,{className:Dt&&Dt.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.email||Ht,disabled:Dt&&Dt.email||!1,onChange:function(gr){return nr(gr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",t.a.createElement(U.a,{style:{width:"300px"},className:Dt&&Dt.phone?"":"bkfff",value:Dt&&Dt.phone||Or,disabled:Dt&&Dt.phone||!1,onChange:function(gr){return lr(gr.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",t.a.createElement(le.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(gr){jt(gr)}},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")),et&&et.length>3?t.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},t.a.createElement("span",{className:O.a.spanprev,onClick:function(){Gt.current.prev()}},t.a.createElement(ye.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),t.a.createElement(_e.a,{ref:Gt,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},et&&et.map(function(ar,gr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:G.a.IMG_SERVER+"/".concat(ar.image_url)}),ar.user_received===!1||ar.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return Qe(ar)}},"\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(){Gt.current.next()}},t.a.createElement(fe.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):t.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},et&&et.map(function(ar,gr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:G.a.IMG_SERVER+"/".concat(ar.image_url)}),ar.user_received===!1||ar.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return Qe(ar)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var q=ae,se=function(et,pt){var _t=et.StaffDetail,Ut=et.HeaderDetail,Dt=et.ItemData,Gt=et.setIssee,It=et.ModelType,ut=et.dispatch,yt=et.userinfo,bt=et.Editable,er=Object(o.useState)(!1),Yt=Object(v.a)(er,2),Wt=Yt[0],jt=Yt[1],Xt=Object(o.useState)([]),Qt=Object(v.a)(Xt,2),Ze=Qt[0],mr=Qt[1],wr=Object(o.useState)(""),rr=Object(v.a)(wr,2),ft=rr[0],Et=rr[1],ht=Object(o.useState)(""),Ct=Object(v.a)(ht,2),Ht=Ct[0],nr=Ct[1],Kt=Object(o.useState)(!1),vr=Object(v.a)(Kt,2),Or=vr[0],lr=vr[1],Qe=Object(S.i)(),Mt=Qe.identifier,Gr=Object(o.useRef)(null),Ur=Object(o.useRef)(null);Gr.current=_t==null?void 0:_t.enrolled,Object(o.useEffect)(function(){var At;return(At=Ur.current)===null||At===void 0||At.addEventListener("click",ar),function(){var Bt;(Bt=Ur.current)===null||Bt===void 0||Bt.removeEventListener("click",ar)}},[]);var ar=function(Bt){var ir;if((Bt==null||((ir=Bt.target)===null||ir===void 0)?void 0:ir.id)==="modal-upload"){if(!Object(ie.e)(ut))return;if(!Gr.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}jt(!0)}};Object(o.useEffect)(function(){if(Ut!=null&&Ut.upload_file){var At,Bt,ir;mr([{name:Ut==null||((At=Ut.upload_file)===null||At===void 0)?void 0:At.title,status:"done",uid:"123456789"}]),nr(Ut==null?void 0:Ut.upload_file_url),Et(Ut==null||((Bt=Ut.upload_file)===null||Bt===void 0||((ir=Bt.url)===null||ir===void 0))?void 0:ir.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:Ze,onChange:function(Bt){var ir=Bt.file.status,zt=[Object(L.a)({},Bt.file)];if(mr(zt),Bt.file.status==="uploading"&&lr(!0),ir==="done"){var ct,dt;Et((ct=zt[0])===null||ct===void 0||((dt=ct.response)===null||dt===void 0)?void 0:dt.id),lr(!1)}ir==="error"&&(mr([]),lr(!1))},beforeUpload:function(Bt){var ir=Bt.size/1024/1024<1e3;return ir?Promise.resolve():(h.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},xr=function(){jt(!0)};return Object(o.useImperativeHandle)(pt,function(){return{handleVisible:xr}}),t.a.createElement("div",{ref:Ur},It==="reward"?t.a.createElement(q,{userlist:yt,dispatch:ut,rewarddata:Dt.reward_setting,is_signed:Dt.is_signed}):null,t.a.createElement("div",{style:{textAlign:"right"}},((yt==null?void 0:yt.admin)||(yt==null?void 0:yt.business)||bt)&&t.a.createElement(w.a,{onClick:function(){return Gt(!1)}},"\u7F16\u8F91")),t.a.createElement(W.a,{value:Dt.md_content}),Dt&&Dt.attachments&&Dt.attachments.map(function(At,Bt){return t.a.createElement("div",null,t.a.createElement("a",{href:(G.a===null||G.a===void 0?void 0:G.a.API_SERVER)+At.url,target:"_self",download:At.title},t.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),t.a.createElement("span",{style:{color:"#000000"}},At.title),t.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},At.filesize)))}),t.a.createElement(C.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:Wt,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:Or,onCancel:function(){return jt(!1)},onOk:Object(c.a)(n.a.mark(function At(){var Bt;return n.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:if(!(!ft&&!Ht)){zt.next=3;break}return jt(!1),zt.abrupt("return");case 3:return lr(!0),zt.next=6,Object(ee.a)("/api/competitions/".concat(Mt,"/upload_file.json"),{method:"post",body:{attachment_id:ft,upload_file_url:Ht}});case 6:Bt=zt.sent,Bt.status===0&&(jt(!1),lr(!1));case 8:case"end":return zt.stop()}},At)}))},t.a.createElement("div",null,t.a.createElement(B.a,{align:"middle",className:"mb20"},t.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),t.a.createElement(U.a,{style:{width:416},value:Ht,onChange:function(Bt){var ir;return nr((ir=Bt.target)===null||ir===void 0?void 0:ir.value)}})),t.a.createElement(B.a,{align:"top"},t.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),t.a.createElement(y.a,gr,t.a.createElement(w.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},Q=Object(o.forwardRef)(se),Z=I("Ot1p"),be=I("hJwl");function re(mt){var et=mt.ItemData,pt=mt.setIssee,_t=mt.MenuItem,Ut=mt.dispatch,Dt=mt.identifier,Gt=mt.ModelType,It=mt.userinfo,ut=mt.getrightdatas,yt=Object(o.useState)([]),bt=Object(v.a)(yt,2),er=bt[0],Yt=bt[1],Wt=Object(o.useState)(et.md_content),jt=Object(v.a)(Wt,2),Xt=jt[0],Qt=jt[1];Object(o.useEffect)(function(){var Et,ht=[];et==null||((Et=et.attachments)===null||Et===void 0)||Et.map(function(Ct){var Ht={uid:Ct.id,name:Ct.title,response:{id:Ct.id}};ht.push(Ht)}),Yt(ht)},[et==null?void 0:et.attachments]);function Ze(){var Et,ht=[];return et==null||((Et=et.attachments)===null||Et===void 0)||Et.map(function(Ct){var Ht={uid:Ct==null?void 0:Ct.id,name:Ct.title,response:{id:Ct.id}};ht.push(Ht)}),ht}var mr={name:"file",multiple:!0,withCredentials:!0,action:G.a.API_SERVER+"/api/attachments.json",defaultFileList:Ze(),onRemove:function(ht){Object(be.t)({id:ht.uid})},onChange:function(ht){var Ct=ht.file.status;Ct!=="uploading",Ct==="removed"&&Yt(ht.fileList),Ct==="done"?(Yt(ht.fileList),h.b.success("".concat(ht.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):Ct==="error"&&h.b.error("".concat(ht.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(ht){var Ct=ht.size/1024/1024<150;return Ct||h.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),Ct}};console.log(mr);function wr(){return rr.apply(this,arguments)}function rr(){return rr=Object(c.a)(n.a.mark(function Et(){var ht;return n.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,Ut({type:"competitions/updateMdContent",payload:{attachment_ids:ft(er),competition_module_id:et.id,md_content_id:et.md_id,content:Xt,identifier:Dt}});case 2:ht=Ht.sent,ht&&(h.b.info("\u63D0\u4EA4\u6210\u529F"),pt(!0),ut(_t));case 4:case"end":return Ht.stop()}},Et)})),rr.apply(this,arguments)}function ft(Et){var ht=[];return Et&&Et.map(function(Ct){ht.push(Ct.response.id)}),ht}return t.a.createElement("div",null,Gt==="reward"?t.a.createElement(q,{userlist:It,dispatch:Ut,rewarddata:et.reward_setting,is_signed:et.is_signed}):null,t.a.createElement(Z.a,{defaultValue:Xt,onChange:function(ht){return Qt(ht)}}),t.a.createElement(y.a,mr,t.a.createElement(w.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\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 wr()}},"\u63D0\u4EA4"),t.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return pt(!0)}},"\u53D6\u6D88")))}var Y=re,X=I("g9YV"),$=I("wCAj"),ve=I("Znn+"),de=I("ZTPi");function xe(){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 Ke=xe,Ve=I("5Dmo"),Xe=I("3S7+"),at=I("jCWc"),it=I("kPKH"),lt=I("IzEo"),Me=I("bx4M");function Te(mt){var et=mt.oneItem,pt=mt.towItem,_t=mt.threeItem;return t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement(B.a,{gutter:16,style:{justifyContent:"center"}},t.a.createElement(it.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(_.a,{to:"/users/".concat(pt==null?void 0:pt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(pt==null?void 0:pt.user_image)}),(pt==null?void 0:pt.competition_prize)&&t.a.createElement("p",{className:O.a.prize},pt==null?void 0:pt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},pt==null?void 0:pt.record_user_name)))),className:O.a.towdiv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},pt==null?void 0:pt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},pt==null?void 0:pt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(pt==null?void 0:pt.extra_score)+parseFloat(pt==null?void 0:pt.score),"\u5206"))),t.a.createElement(it.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(_.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.onediv,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"))),t.a.createElement(it.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(_.a,{to:"/users/".concat(_t==null?void 0:_t.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(_t==null?void 0:_t.user_image)}),(_t==null?void 0:_t.competition_prize)&&t.a.createElement("p",{className:O.a.prize},_t==null?void 0:_t.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},_t==null?void 0:_t.record_user_name)))),className:O.a.threediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},_t==null?void 0:_t.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},_t==null?void 0:_t.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(_t==null?void 0:_t.extra_score)+parseFloat(_t==null?void 0:_t.score),"\u5206")))))}var Ye=Te;function ot(mt){var et,pt,_t,Ut,Dt,Gt,It,ut,yt,bt,er,Yt,Wt,jt,Xt,Qt,Ze,mr,wr,rr,ft,Et,ht,Ct,Ht,nr,Kt,vr,Or,lr,Qe=mt.ItemData;return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement(Ye,{oneItem:Qe==null?void 0:Qe.teams[0],towItem:Qe==null?void 0:Qe.teams[1],threeItem:Qe==null?void 0:Qe.teams[2]}),(Qe==null||((et=Qe.user_ranks)===null||et===void 0)?void 0:et.length)>0&&t.a.createElement("div",{className:O.a.myTeam},(Qe==null||((pt=Qe.user_ranks)===null||pt===void 0||((_t=pt[0])===null||_t===void 0))?void 0:_t.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:(Qe==null||((Ut=Qe.user_ranks)===null||Ut===void 0||((Dt=Ut[0])===null||Dt===void 0))?void 0:Dt.success)===!1?"red":"green"}},(Qe==null||((Gt=Qe.user_ranks)===null||Gt===void 0||((It=Gt[0])===null||It===void 0))?void 0:It.success)===!1?"\u5426":Qe!=null&&(ut=Qe.user_ranks)!==null&&ut!==void 0&&(yt=ut[0])!==null&&yt!==void 0&&yt.success?"\u662F":"")),(Qe==null||((bt=Qe.user_ranks)===null||bt===void 0||((er=bt[0])===null||er===void 0))?void 0:er.awards)&&t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u83B7\u5956\uFF1A",t.a.createElement("span",null,(Qe==null||((Yt=Qe.user_ranks)===null||Yt===void 0||((Wt=Yt[0])===null||Wt===void 0))?void 0:Wt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(Qe==null||((jt=Qe.user_ranks)===null||jt===void 0||((Xt=jt[0])===null||Xt===void 0))?void 0:Xt.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):t.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",Qe==null||((Qt=Qe.user_ranks)===null||Qt===void 0||((Ze=Qt[0])===null||Ze===void 0))?void 0:Ze.rank),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Xe.a,{title:"\u6218\u961F\u540D"},Qe==null||((mr=Qe.user_ranks)===null||mr===void 0||((wr=mr[0])===null||wr===void 0))?void 0:wr.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Xe.a,{title:"\u65F6\u95F4"},Qe==null||((rr=Qe.user_ranks)===null||rr===void 0||((ft=rr[0])===null||ft===void 0))?void 0:ft.cost_time)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(Xe.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},Qe==null||((Et=Qe.user_ranks)===null||Et===void 0||((ht=Et[0])===null||ht===void 0))?void 0:ht.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Xe.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},Qe==null||((Ct=Qe.user_ranks)===null||Ct===void 0||((Ht=Ct[0])===null||Ht===void 0))?void 0:Ht.score)),t.a.createElement("span",null,t.a.createElement(Xe.a,{title:"\u603B\u5206"},parseFloat(Qe==null||((nr=Qe.user_ranks)===null||nr===void 0||((Kt=nr[0])===null||Kt===void 0))?void 0:Kt.extra_score)+parseFloat(Qe==null||((vr=Qe.user_ranks)===null||vr===void 0||((Or=vr[0])===null||Or===void 0))?void 0:Or.score)||0))),Qe==null||((lr=Qe.teams)===null||lr===void 0)?void 0:lr.map(function(Mt,Gr){return t.a.createElement("div",{className:O.a.bottomItem},t.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},Gr+1),t.a.createElement(_.a,{to:"/users/".concat(Mt==null?void 0:Mt.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(Mt==null?void 0:Mt.user_image)}),(Mt==null?void 0:Mt.competition_prize)&&t.a.createElement("span",{className:O.a.spanrightradius},Mt==null?void 0:Mt.competition_prize)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Xe.a,{title:"\u6218\u961F\u540D"},Mt==null?void 0:Mt.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Xe.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},Mt.school_name)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(Xe.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},Mt.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Xe.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},Mt.score)),t.a.createElement("span",{style:{color:"#0152d9"}},t.a.createElement(Xe.a,{title:"\u603B\u5206"},parseFloat(Mt.extra_score)+parseFloat(Mt.score))))}))}var ze=ot,rt=de.a.TabPane;function ke(mt){var et,pt,_t,Ut,Dt,Gt,It=mt.ChartRules,ut=mt.ItemData,yt=mt.getCharts,bt=mt.Selectkey,er=mt.getChartRules,Yt=mt.userinfo,Wt=mt.Editable,jt=mt.HeaderDetail,Xt=Object(o.useState)(!1),Qt=Object(v.a)(Xt,2),Ze=Qt[0],mr=Qt[1],wr=Object(o.useState)(""),rr=Object(v.a)(wr,2),ft=rr[0],Et=rr[1],ht=Object(o.useState)(!0),Ct=Object(v.a)(ht,2),Ht=Ct[0],nr=Ct[1],Kt=Object(o.useState)(),vr=Object(v.a)(Kt,2),Or=vr[0],lr=vr[1],Qe=Object(o.useState)(),Mt=Object(v.a)(Qe,2),Gr=Mt[0],Ur=Mt[1],ar=Object(S.i)(),gr=ar.identifier;Object(o.useEffect)(function(){if(Ht){var ir,zt=It==null||((ir=It.stages)===null||ir===void 0)?void 0:ir[0];if(lr(zt),zt!=null&&zt.id){var ct,dt,kt;((jt==null?void 0:jt.task)==="mAP"||(jt==null?void 0:jt.task)==="dog")&&yt(zt==null?void 0:zt.id),Et(((ct=It.rule_contents)===null||ct===void 0||((dt=ct.filter(function(Xr){return parseInt(Xr.competition_stage_id)===parseInt(zt==null?void 0:zt.id)}))===null||dt===void 0||((kt=dt[0])===null||kt===void 0))?void 0:kt.content)||"")}else{var Tt,yr,Kr;(jt==null?void 0:jt.task)==="mAP"||(jt==null?void 0:jt.task)==="dog",Et(((Tt=It.rule_contents)===null||Tt===void 0||((yr=Tt.filter(function(Xr){return parseInt(Xr.competition_stage_id)===0}))===null||yr===void 0||((Kr=yr[0])===null||Kr===void 0))?void 0:Kr.content)||"")}}},[It]);function xr(){return At.apply(this,arguments)}function At(){return At=Object(c.a)(n.a.mark(function ir(){var zt,ct,dt,kt,Tt,yr,Kr,Xr,pr;return n.a.wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:if(ft){Tr.next=3;break}return h.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Tr.abrupt("return");case 3:if(nr(!1),zt=Or==null?void 0:Or.id,!zt){Tr.next=12;break}return Tr.next=8,Object(ee.a)("/api/competitions/".concat(gr,"/update_md_content.json"),{method:"post",body:{competition_module_id:bt,content:ft,md_content_id:(ct=It.rule_contents)===null||ct===void 0||((dt=ct.filter(function(Jr){return parseInt(Jr.competition_stage_id)===parseInt(zt)}))===null||dt===void 0||((kt=dt[0])===null||kt===void 0))?void 0:kt.id,stage_id:Or==null?void 0:Or.id}});case 8:Tt=Tr.sent,Tt.status===0&&(h.b.info("\u66F4\u65B0\u6210\u529F"),mr(!1),er()),Tr.next=16;break;case 12:return Tr.next=14,Object(ee.a)("/api/competitions/".concat(gr,"/update_md_content.json"),{method:"post",body:{competition_module_id:bt,content:ft,md_content_id:(yr=It.rule_contents)===null||yr===void 0||((Kr=yr.filter(function(Jr){return parseInt(Jr.competition_stage_id)===0}))===null||Kr===void 0||((Xr=Kr[0])===null||Xr===void 0))?void 0:Xr.id,stage_id:Or==null?void 0:Or.id}});case 14:pr=Tr.sent,pr.status===0&&(h.b.info("\u66F4\u65B0\u6210\u529F"),mr(!1),er());case 16:case"end":return Tr.stop()}},ir)})),At.apply(this,arguments)}var Bt=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(zt,ct,dt){return t.a.createElement("span",null,dt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(zt){return t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(zt)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(zt){return t.a.createElement("span",{title:zt},zt&&(zt==null?void 0:zt.length)>=15?(zt==null?void 0:zt.substr(0,15))+"...":zt||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(zt){return t.a.createElement("span",null,zt||"--")}},{title:(jt==null?void 0:jt.task)==="mAP"?"mAP\u6307\u6807":(jt==null?void 0:jt.task)==="Jittor-3"?"\u603B\u5206":"top1\u6307\u6807",dataIndex:"score",key:"score",render:function(zt){return t.a.createElement("span",null,zt||"--")}}];return t.a.createElement("div",null,(It==null||((et=It.stages)===null||et===void 0)?void 0:et.length)>0?null:t.a.createElement(Ke,null),(It==null||((pt=It.stages)===null||pt===void 0)?void 0:pt.length)>0&&t.a.createElement(de.a,{animated:!0,tabBarExtraContent:((Yt==null?void 0:Yt.admin)||(Yt==null?void 0:Yt.business)||Wt)&&t.a.createElement(w.a,{onClick:function(){mr(!0)}},"\u7F16\u8F91"),onChange:function(zt){var ct,dt,kt,Tt,yr;mr(!1);var Kr=It==null||((ct=It.stages)===null||ct===void 0)?void 0:ct.filter(function(pr){return parseInt(zt)===parseInt(pr==null?void 0:pr.id)})[0];lr(Kr);var Xr=Kr==null||((dt=Kr.children)===null||dt===void 0)?void 0:dt[0];Ur(Xr),Et(((kt=It.rule_contents)===null||kt===void 0||((Tt=kt.filter(function(pr){return parseInt(pr.competition_stage_id)===parseInt(Kr==null?void 0:Kr.id)}))===null||Tt===void 0||((yr=Tt[0])===null||yr===void 0))?void 0:yr.content)||""),yt((Xr==null?void 0:Xr.id)||zt)}},It&&It.stages.map(function(ir,zt){return t.a.createElement(rt,{tab:ir.name,key:ir.id===null?0:ir.id},Ze===!1&&It&&It.rule_contents.map(function(ct,dt){if(ir.id===ct.competition_stage_id)return t.a.createElement(W.a,{key:dt,value:ct.content===void 0||ct.content===null?"":ct.content});if(ir.id===null&&ct.competition_stage_id===0)return t.a.createElement(W.a,{key:dt,value:ct.content===void 0||ct.content===null?"":ct.content})}))})),(Or==null||((_t=Or.children)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(de.a,{activeKey:(Gr==null?void 0:Gr.id)+"",onChange:function(zt){var ct,dt=Or==null||((ct=Or.children)===null||ct===void 0)?void 0:ct.filter(function(kt){return parseInt(zt)===parseInt(kt==null?void 0:kt.id)})[0];Ur(dt),yt(zt)}},Or==null||((Ut=Or.children)===null||Ut===void 0)?void 0:Ut.map(function(ir,zt){return t.a.createElement(rt,{tab:ir.name,key:ir.id===null?0:ir.id})})),Ze&&t.a.createElement("div",null,t.a.createElement(Z.a,{defaultValue:ft,onChange:function(zt){Et(zt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return xr()}},"\u63D0\u4EA4"),t.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return mr(!1)}},"\u53D6\u6D88"))),(ut==null||((Dt=ut.teams)===null||Dt===void 0)?void 0:Dt.length)>0&&((jt==null?void 0:jt.task)==="mAP"||(jt==null?void 0:jt.task)==="dog"||(jt==null?void 0:jt.task)==="Jittor-3")?t.a.createElement($.a,{dataSource:ut==null?void 0:ut.teams,columns:Bt,pagination:!1}):(ut==null||((Gt=ut.teams)===null||Gt===void 0)?void 0:Gt.length)>0&&t.a.createElement(ze,{ItemData:ut}))}var Oe=ke,Re=I("/zsF"),pe=I("PArb");function Ee(mt){var et,pt,_t,Ut,Dt,Gt,It,ut=mt.Prize,yt=Object(S.i)(),bt=Object(o.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"}]),er=Object(v.a)(bt,2),Yt=er[0],Wt=er[1],jt=function(){var Xt=Object(c.a)(n.a.mark(function Qt(Ze){var mr;return n.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.next=2,Object(be.u)({type:Ze.type,id:yt.identifier});case 2:mr=rr.sent,(mr==null?void 0:mr.status)===0&&(location.href="/competitions/exports?id=".concat(yt.identifier,"&type=").concat(Ze.type));case 4:case"end":return rr.stop()}},Qt)}));return function(Ze){return Xt.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"),(ut==null||((et=ut.personal_certifications)===null||et===void 0)?void 0:et.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(ut==null||((pt=ut.personal_certifications[0])===null||pt===void 0)?void 0:pt.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")),(ut==null||((_t=ut.team_certifications)===null||_t===void 0)?void 0:_t.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(ut==null||((Ut=ut.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(pe.a,null),(ut==null||((Dt=ut.teams)===null||Dt===void 0)?void 0:Dt.length)>0?t.a.createElement("div",null,t.a.createElement("p",null,(ut==null?void 0:ut.teams)&&(ut==null||((Gt=ut.teams[0])===null||Gt===void 0)?void 0:Gt.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")),(ut==null?void 0:ut.teams)&&(ut==null||((It=ut.teams[0])===null||It===void 0)?void 0:It.team_members.map(function(Xt,Qt){var Ze,mr,wr,rr,ft,Et;return t.a.createElement("p",{className:O.a.teamItem},t.a.createElement("span",{style:{width:"5%"}},Xt==null?void 0:Xt.role),t.a.createElement("span",{style:{width:"5%"}},Xt==null?void 0:Xt.name),t.a.createElement("span",{style:{width:"10%"}},(Xt==null?void 0:Xt.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(Xt==null?void 0:Xt.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},(Xt==null?void 0:Xt.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(Xt==null?void 0:Xt.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},Xt!=null&&Xt.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},Xt!=null&&Xt.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(Xt==null?void 0:Xt.role)==="\u961F\u957F"?t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(ut==null?void 0:ut.teams)&&(ut==null||((Ze=ut.teams[0])===null||Ze===void 0||((mr=Ze.bank_account)===null||mr===void 0))?void 0:mr.bank),(ut==null?void 0:ut.teams)&&(ut==null||((wr=ut.teams[0])===null||wr===void 0||((rr=wr.bank_account)===null||rr===void 0))?void 0:rr.second_bank),(ut==null?void 0:ut.teams)&&(ut==null||((ft=ut.teams[0])===null||ft===void 0||((Et=ft.bank_account)===null||Et===void 0))?void 0:Et.card_no)):t.a.createElement("span",{style:{width:"50%"}}))}))):null,t.a.createElement(B.a,{gutter:[20,20]},Yt.map(function(Xt,Qt){return t.a.createElement(it.a,{key:Qt},t.a.createElement(w.a,{type:"primary",onClick:function(){return jt(Xt)}},Xt.name))})))}var we=Ee,De=I("0Owb"),Ie=I("7Kak"),$e=I("9yH6"),qe=I("y8nQ"),tt=I("Vl3Y"),xt=I("1vsH"),gt=I("Dgm7"),sr=I.n(gt),tr=I("NnUe"),St=I.n(tr),Nr=y.a.Dragger,Ir=10,Fr=function(et){var pt=et.user,_t=et.account,Ut=et.globalSetting,Dt=et.loading,Gt=et.dispatch,It=Object(g.a)(et,["user","account","globalSetting","loading","dispatch"]),ut=tt.a.useForm(),yt=Object(v.a)(ut,1),bt=yt[0],er=Object(o.useState)({}),Yt=Object(v.a)(er,2),Wt=Yt[0],jt=Yt[1],Xt=Object(o.useState)(!0),Qt=Object(v.a)(Xt,2),Ze=Qt[0],mr=Qt[1],wr=Object(o.useState)(),rr=Object(v.a)(wr,2),ft=rr[0],Et=rr[1],ht=Object(o.useState)(),Ct=Object(v.a)(ht,2),Ht=Ct[0],nr=Ct[1],Kt=Object(o.useState)(),vr=Object(v.a)(Kt,2),Or=vr[0],lr=vr[1],Qe=Object(o.useState)(),Mt=Object(v.a)(Qe,2),Gr=Mt[0],Ur=Mt[1];Object(o.useEffect)(function(){if(!_t.basicInfo)return;var zt=_t.basicInfo,ct={name:zt.show_realname?zt.name:Object(xt.I)(zt.name),gender:zt.gender};Et(zt.name),mr(zt.show_realname),bt.setFieldsValue(ct),jt(ct)},[_t.basicInfo]);var ar=function(ct){if(ct.file.status==="uploading"){Ur(!0);return}if(ct.file.status==="done"){var dt;console.log(ct.file,ct.file.response),lr((dt=ct.file.response)===null||dt===void 0?void 0:dt.id),Object(xt.E)(ct.file.originFileObj,function(kt){nr(kt),Ur(!1)})}},gr=function(ct){jt(Object(L.a)({},bt.getFieldsValue())),"name"in ct&&Et(ct.name)},xr=function(){var ct=!Ze;mr(ct);var dt=ct?ft:Object(xt.I)(ft);bt.setFieldsValue({name:dt})},At=function(){var zt=Object(c.a)(n.a.mark(function ct(dt){var kt,Tt,yr,Kr,Xr,pr,Br,Tr;return n.a.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:if(yr=dt||{},Kr=yr.name,Xr=yr.gender,pr=yr.idNumber,Ht){Dr.next=4;break}return h.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Dr.abrupt("return");case 4:return Dr.next=6,Gt({type:"account/applyRealNameAuth",payload:{id:((kt=_t.basicInfo)===null||kt===void 0?void 0:kt.id)||((Tt=pt.userInfo)===null||Tt===void 0?void 0:Tt.login),name:Kr,gender:Xr,id_number:pr,show_realname:Ze,attachment_ids:[Or]}});case 6:Br=Dr.sent,Bt(),Br&&(h.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Gt({type:"account/getBasicInfo",payload:{login:(Tr=pt.userInfo)===null||Tr===void 0?void 0:Tr.login}}));case 9:case"end":return Dr.stop()}},ct)}));return function(dt){return zt.apply(this,arguments)}}(),Bt=function(){Gt({type:"account/setActionTabs",payload:{}})},ir={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(G.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:ar,beforeUpload:function(ct){var dt=ct.type==="image/jpeg"||ct.type==="image/png"||ct.type==="image/jpg"||ct.type==="image/bmp";return dt||h.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),dt}};return t.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:_t.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},t.a.createElement(s.a,{spinning:!!Gr},t.a.createElement(tt.a,{className:St.a.formWrap,form:bt,layout:"horizontal",onValuesChange:gr,onFinish:At},t.a.createElement(tt.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(Ir,"\u4E2A\u5B57\u7B26")},{validator:xt.L}],extra:t.a.createElement("span",null,Ze?"\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:!Ze,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Ir,"\u4E2A\u5B57\u7B26"),maxLength:Ir,addonAfter:t.a.createElement("i",{className:"iconfont ".concat(Ze?"icon-xianshi":"icon-yincang"," font18 ").concat(St.a.color0152d9),onClick:xr})})),t.a.createElement(tt.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($e.a.Group,null,t.a.createElement($e.a,{value:0},"\u7537"),t.a.createElement($e.a,{value:1},"\u5973"))),t.a.createElement(tt.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(tt.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.a.exampleImg},t.a.createElement("img",{src:sr.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement(Nr,Object(De.a)({},ir,{accept:".png,.jpg,.bmp,.jpeg"}),Ht?t.a.createElement("img",{src:Ht,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(tt.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:Bt},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Dt["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.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\u7ED3EduCoder\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(i.a)(function(mt){var et=mt.user,pt=mt.account,_t=mt.loading,Ut=mt.globalSetting;return{user:et,account:pt,globalSetting:Ut,loading:_t.effects}})(Fr),Cr=I("O3gP"),rn=I("lrIw"),en=I("KXlV"),Lr=I.n(en),un=I("Sjjz"),yn=I.n(un),Gn=U.a.TextArea,cn=function(et){var pt=et.account,_t=et.globalSetting,Ut=et.loading,Dt=et.dispatch,Gt=et.schoolName,It=et.departmentName,ut=et.visible,yt=et.onClose,bt=yt===void 0?function(){}:yt,er=et.onSuccess,Yt=er===void 0?function(){}:er,Wt=Object(g.a)(et,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),jt=tt.a.useForm(),Xt=Object(v.a)(jt,1),Qt=Xt[0],Ze=Object(o.useRef)();Object(o.useEffect)(function(){Ze.current=Wt.schoolId},[Wt.schoolId]),Object(o.useEffect)(function(){Qt.setFieldsValue({department:It})},[It]);var mr=function(){var wr=Object(c.a)(n.a.mark(function rr(ft){var Et,ht,Ct,Ht;return n.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:return Et=ft||{},ht=Et.department,Ct=Et.remarks,Kt.next=3,Dt({type:"account/appplyDepartment",payload:{school_id:Ze.current,name:ht,remarks:Ct}});case 3:Ht=Kt.sent,bt(),Ht&&(h.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),Yt(ht));case 6:case"end":return Kt.stop()}},rr)}));return function(ft){return wr.apply(this,arguments)}}();return t.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:ut,title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(tt.a,{className:yn.a.formWrap,form:Qt,labelCol:{span:4},wrapperCol:{span:20},onFinish:mr},t.a.createElement(tt.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Gt),t.a.createElement(tt.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(tt.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:yn.a.footerWrap},t.a.createElement(tt.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:function(){bt()}},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Ut["account/appplyDepartment"]},"\u4FDD\u5B58")))))},La=Object(i.a)(function(mt){var et=mt.account,pt=mt.loading,_t=mt.globalSetting;return{account:et,globalSetting:_t,loading:pt.effects}})(cn),Ha=I("6UJt"),bn=I("DFOY"),qt=I("jO45"),Xn=I("jN4g"),Ea=I("gJ3r"),Ln=I("jwmR"),$r=I.n(Ln),Pn=function(et,pt){return pt.some(function(_t){return _t.label.toLowerCase().indexOf(et.toLowerCase())>-1})},la=U.a.TextArea,fa=function(et){var pt=et.account,_t=et.globalSetting,Ut=et.loading,Dt=et.dispatch,Gt=et.schoolName,It=et.visible,ut=et.onClose,yt=ut===void 0?function(){}:ut,bt=et.onSuccess,er=bt===void 0?function(){}:bt,Yt=Object(g.a)(et,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),Wt=tt.a.useForm(),jt=Object(v.a)(Wt,1),Xt=jt[0];Object(o.useEffect)(function(){Xt.setFieldsValue({name:Gt})},[Gt]);var Qt=function(){var Ze=Object(c.a)(n.a.mark(function mr(wr){var rr,ft,Et,ht,Ct,Ht,nr;return n.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return rr=wr||{},ft=rr.name,Et=rr.city,ht=Et===void 0?[]:Et,Ct=rr.address,Ht=rr.remarks,vr.next=3,Dt({type:"account/appplySchool",payload:{name:ft,province:ht[0],city:ht[1],address:Ct,remarks:Ht}});case 3:nr=vr.sent,yt(),nr&&(h.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),er(ft));case 6:case"end":return vr.stop()}},mr)}));return function(wr){return Ze.apply(this,arguments)}}();return t.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:It,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(tt.a,{className:$r.a.formWrap,form:Xt,labelCol:{span:4},wrapperCol:{span:20},onFinish:Qt},t.a.createElement(tt.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($r.a.flexRow," ").concat($r.a.example)},t.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),t.a.createElement("div",{className:$r.a.flexColumn},t.a.createElement("div",null,t.a.createElement(qt.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(Xn.a,{style:{color:"red"}}),t.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),t.a.createElement(tt.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},t.a.createElement(bn.a,{allowClear:!0,size:"large",options:Ea.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Pn}})),t.a.createElement(tt.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(tt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(la,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:$r.a.footerWrap},t.a.createElement(tt.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:function(){yt()}},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Ut["account/appplySchool"]},"\u4FDD\u5B58")))))},Lt=Object(i.a)(function(mt){var et=mt.account,pt=mt.loading,_t=mt.globalSetting;return{account:et,globalSetting:_t,loading:pt.effects}})(fa),cr=le.a.Option,ha=y.a.Dragger,xa=function(et){var pt,_t,Ut=et.user,Dt=et.account,Gt=et.globalSetting,It=et.loading,ut=et.dispatch,yt=et.Scoid,bt=Object(g.a)(et,["user","account","globalSetting","loading","dispatch","Scoid"]),er=tt.a.useForm(),Yt=Object(v.a)(er,1),Wt=Yt[0],jt=Object(o.useState)({}),Xt=Object(v.a)(jt,2),Qt=Xt[0],Ze=Xt[1],mr=Object(o.useState)([]),wr=Object(v.a)(mr,2),rr=wr[0],ft=wr[1],Et=Object(o.useState)([]),ht=Object(v.a)(Et,2),Ct=ht[0],Ht=ht[1],nr=Object(o.useState)([]),Kt=Object(v.a)(nr,2),vr=Kt[0],Or=Kt[1],lr=Object(o.useState)([]),Qe=Object(v.a)(lr,2),Mt=Qe[0],Gr=Qe[1],Ur=Object(o.useState)(),ar=Object(v.a)(Ur,2),gr=ar[0],xr=ar[1],At=Object(o.useState)(),Bt=Object(v.a)(At,2),ir=Bt[0],zt=Bt[1],ct=Object(o.useState)(),dt=Object(v.a)(ct,2),kt=dt[0],Tt=dt[1],yr=Object(o.useState)(),Kr=Object(v.a)(yr,2),Xr=Kr[0],pr=Kr[1],Br=Object(o.useState)(),Tr=Object(v.a)(Br,2),Jr=Tr[0],Dr=Tr[1];Object(o.useEffect)(function(){Qr()},[]),Object(o.useEffect)(function(){Object(c.a)(n.a.mark(function Be(){var je;return n.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:if(yt){st.next=2;break}return st.abrupt("return");case 2:return st.next=4,kn(yt);case 4:je=st.sent,Or(je==null?void 0:je.departments);case 6:case"end":return st.stop()}},Be)}))()},[yt]);var Qr=function(){var Be=Object(c.a)(n.a.mark(function je(){var Ge;return n.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,ut({type:"account/getSchoolOption"});case 2:Ge=wt.sent,ft(Ge==null?void 0:Ge.schools);case 4:case"end":return wt.stop()}},je)}));return function(){return Be.apply(this,arguments)}}(),kn=function(je){return ut({type:"account/getDepartmentOption",payload:{id:je}})};Object(o.useEffect)(function(){if(!Dt.basicInfo)return;var Be=Dt.basicInfo,je={identity:Be.identity,school:Be.school_name,department:Be.department_name,studentNo:Be.student_id,jobTitle:Be.identity=="teacher"?Be.technical_title:"\u6559\u6388",manager:Be.identity=="professional"?Be.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};Wt.setFieldsValue(je),Ze(je)},[Dt.basicInfo]);var Ae=function(){pr(!0)},Ue=function(){if(!rr.find(function(je){return je.name===Qt.school})){h.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}Dr(!0)},He=function(je){if(Ze(Object(L.a)({},Wt.getFieldsValue())),"school"in je){Ht(rr.filter(function(st){return st.name.includes(je.school)}));var Ge=(rr.find(function(st){return st.name===je.school})||{}).id;Ge?Le(je.school):(Wt.setFieldsValue({department:""}),Ze(Object(L.a)(Object(L.a)({},Qt),{school:je.school,department:""})))}},Le=function(){var Be=Object(c.a)(n.a.mark(function je(Ge,st){var wt,Ot,Nt,br,Mr,Pr;return n.a.wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:return br=(wt=rr.find(function(Wr){return Wr.name===Ge}))===null||wt===void 0?void 0:wt.id,Ar.next=3,kn(br);case 3:if(Ar.t0=Ar.sent,Ar.t0){Ar.next=6;break}Ar.t0={};case 6:Mr=Ar.t0,Or(Mr==null?void 0:Mr.departments),Pr=st||(Mr==null||((Ot=Mr.departments)===null||Ot===void 0||((Nt=Ot[0])===null||Nt===void 0))?void 0:Nt.name),Wt.setFieldsValue({department:Pr}),Ze(Object(L.a)(Object(L.a)({},Qt),{school:Ge,department:Pr}));case 11:case"end":return Ar.stop()}},je)}));return function(Ge,st){return Be.apply(this,arguments)}}(),he=function(){var Be=Object(c.a)(n.a.mark(function je(Ge){return n.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,Qr();case 2:Wt.setFieldsValue({school:Ge,department:""}),Ze(Object(L.a)(Object(L.a)({},Qt),{school:Ge,department:""}));case 4:case"end":return wt.stop()}},je)}));return function(Ge){return Be.apply(this,arguments)}}(),Se=function(je){if(je.file.status==="uploading"){Tt(!0);return}if(je.file.status==="done"){var Ge;console.log(je.file,je.file.response),zt((Ge=je.file.response)===null||Ge===void 0?void 0:Ge.id),Object(xt.E)(je.file.originFileObj,function(st){xr(st),Tt(!1)})}},ge=function(){var Be=Object(c.a)(n.a.mark(function je(Ge){var st,wt,Ot,Nt,br,Mr,Pr,jr,Ar,Wr,Hr,qr,Vr,mn,Yr,_r;return n.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(br=Ge||{},Mr=br.school,Pr=br.department,jr=br.identity,Ar=br.studentNo,Wr=br.jobTitle,Hr=br.manager,gr){zr.next=4;break}return h.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),zr.abrupt("return");case 4:return qr=(st=rr.find(function(Zr){return Zr.name===Mr}))===null||st===void 0?void 0:st.id,Vr=(wt=vr.find(function(Zr){return Zr.name===Pr}))===null||wt===void 0?void 0:wt.id,jr==="student"?mn=Ar:jr==="teacher"?mn=Wr:mn=Hr,zr.next=9,ut({type:"account/applyProfessionalAuth",payload:{id:((Ot=Dt.basicInfo)===null||Ot===void 0?void 0:Ot.id)||((Nt=Ut.userInfo)===null||Nt===void 0?void 0:Nt.login),school_id:qr,department_id:Vr,identity:jr,extra:mn,attachment_ids:[ir]}});case 9:Yr=zr.sent,Pe(),Yr&&(h.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),ut({type:"account/getBasicInfo",payload:{login:(_r=Ut.userInfo)===null||_r===void 0?void 0:_r.login}}));case 12:case"end":return zr.stop()}},je)}));return function(Ge){return Be.apply(this,arguments)}}(),Pe=function(){ut({type:"account/setActionTabs",payload:{}})},Fe={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(G.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:Se,beforeUpload:function(je){var Ge=je.type==="image/jpeg"||je.type==="image/png"||je.type==="image/jpg"||je.type==="image/bmp";return Ge||h.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:St.a.modal,visible:Dt.actionTabs.key==="Account-ProfessionalAuth",title:t.a.createElement("div",null,t.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(St.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},t.a.createElement(s.a,{spinning:!!kt},t.a.createElement(tt.a,{className:St.a.formWrap,form:Wt,layout:"horizontal",onValuesChange:He,onFinish:ge},t.a.createElement(B.a,{gutter:[10,0]},t.a.createElement(it.a,{flex:"300px"},t.a.createElement(tt.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},t.a.createElement(le.a,null,t.a.createElement(cr,{value:"teacher"},"\u6559\u5E08"),t.a.createElement(cr,{value:"student"},"\u5B66\u751F"),t.a.createElement(cr,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),Qt.identity==="student"&&t.a.createElement(it.a,{flex:"200px"},t.a.createElement(tt.a.Item,{initialValue:Qt.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"}))),Qt.identity==="teacher"&&t.a.createElement(it.a,{flex:"200px"},t.a.createElement(tt.a.Item,{initialValue:Qt.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(le.a,null,t.a.createElement(cr,{value:"\u6559\u6388"},"\u6559\u6388"),t.a.createElement(cr,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),t.a.createElement(cr,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),t.a.createElement(cr,{value:"\u52A9\u6559"},"\u52A9\u6559")))),Qt.identity==="professional"&&t.a.createElement(it.a,{flex:"200px"},t.a.createElement(tt.a.Item,{initialValue:Qt.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(le.a,null,t.a.createElement(cr,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),t.a.createElement(cr,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),t.a.createElement(cr,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),t.a.createElement(cr,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),t.a.createElement(cr,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),t.a.createElement(tt.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"school",extra:Qt.school&&!(rr!=null&&rr.find(function(Be){return Be.name===Qt.school}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",Qt.school,"\u201D\u7684\u9AD8\u6821\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Ae},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u5B66\u6821/\u5355\u4F4D"}]},t.a.createElement(rn.a,{showSearch:!0,options:Ct==null?void 0:Ct.map(function(Be){return{value:Be.name}})})),t.a.createElement(tt.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:Qt.department&&!(vr!=null&&vr.find(function(Be){return Be.name===Qt.department}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},Qt.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(Qt.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Ue},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},t.a.createElement(rn.a,{showSearch:!0,onChange:function(je){return Gr(vr.filter(function(Ge){return Ge.name.includes(je)}))},options:Mt==null?void 0:Mt.map(function(Be){return{value:Be.name}})})),t.a.createElement(tt.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.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(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement(ha,Object(De.a)({},Fe,{accept:".png,.jpg,.bmp,.jpeg"}),gr?t.a.createElement("img",{src:gr,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(tt.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:Pe},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:It["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.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",!(Gt!=null&&(pt=Gt.setting)!==null&&pt!==void 0&&pt.is_local)&&"EduCoder","\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(Lt,{visible:Xr,onClose:function(){return pr(!1)},schoolName:Qt.school,onSuccess:he}),t.a.createElement(La,{visible:Jr,onClose:function(){return Dr(!1)},schoolId:(_t=rr.find(function(Be){return Be.name===Qt.school}))===null||_t===void 0?void 0:_t.id,schoolName:Qt.school,departmentName:Qt.department,onSuccess:function(je){return Le(Qt.school,je)}}))},Ma=Object(i.a)(function(mt){var et=mt.user,pt=mt.account,_t=mt.loading,Ut=mt.globalSetting;return{user:et,account:pt,globalSetting:Ut,loading:_t.effects}})(xa),pa=I("aCH8"),Mn=I.n(pa);function Er(mt){var et=mt.type,pt=mt.dispatch,_t=mt.userid,Ut=mt.isshow,Dt=mt.setPhoneshow,Gt=mt.setEmailshow,It="79e33abd4b6588941ab7622aed1e67e8",ut=Object(o.useState)(""),yt=Object(v.a)(ut,2),bt=yt[0],er=yt[1],Yt=Object(o.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),Wt=Object(v.a)(Yt,2),jt=Wt[0],Xt=Wt[1],Qt=Object(o.useState)(60),Ze=Object(v.a)(Qt,2),mr=Ze[0],wr=Ze[1],rr=Object(o.useState)(!1),ft=Object(v.a)(rr,2),Et=ft[0],ht=ft[1],Ct=Object(o.useState)(""),Ht=Object(v.a)(Ct,2),nr=Ht[0],Kt=Ht[1];function vr(){return Or.apply(this,arguments)}function Or(){return Or=Object(c.a)(n.a.mark(function ar(){var gr;return n.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:if(bt){At.next=3;break}return et===3?h.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):h.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),At.abrupt("return");case 3:return At.next=5,pt({type:"competitions/getVerification",payload:{type:et,login:bt,smscode:Mn()(It+bt)}});case 5:gr=At.sent,gr.status===1&&(h.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),lr(),ht(!0));case 7:case"end":return At.stop()}},ar)})),Or.apply(this,arguments)}function lr(){wr(60);var ar=setInterval(function(){--mr,mr>-1?wr(mr):(clearInterval(ar),ht(!1))},1e3)}function Qe(){return Mt.apply(this,arguments)}function Mt(){return Mt=Object(c.a)(n.a.mark(function ar(){var gr;return n.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return At.next=2,pt({type:"competitions/PhoneBind",payload:{userid:_t,code:nr,phone:bt}});case 2:gr=At.sent,gr.status===0&&(h.b.info("\u7ED1\u5B9A\u6210\u529F"),Dt("none"));case 4:case"end":return At.stop()}},ar)})),Mt.apply(this,arguments)}function Gr(){return Ur.apply(this,arguments)}function Ur(){return Ur=Object(c.a)(n.a.mark(function ar(){var gr;return n.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return At.next=2,pt({type:"competitions/EmailBind",payload:{userid:_t,code:nr,email:bt}});case 2:gr=At.sent,gr.status===0&&(h.b.info("\u7ED1\u5B9A\u6210\u529F"),Gt("none"));case 4:case"end":return At.stop()}},ar)})),Ur.apply(this,arguments)}return t.a.createElement("div",{style:{display:Ut}},t.a.createElement("p",null,t.a.createElement(U.a,{value:bt,onChange:function(gr){return er(gr.target.value)},placeholder:et===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:nr,onChange:function(gr){return Kt(gr.target.value)},placeholder:et===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:Et,onClick:function(){return vr()},type:"primary",style:{marginLeft:"20px",width:"100px"}},Et?"\u91CD\u65B0\u53D1\u9001".concat(mr,"s"):jt),t.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},t.a.createElement(w.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!nr){h.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}et===3?Qe():Gr()}},"\u786E\u8BA4"),t.a.createElement(w.a,{style:{marginLeft:"20px"},onClick:function(){et===3?Dt("none"):Gt("none")}},"\u53D6\u6D88")))}var ta=Er;function Rt(mt){var et=mt.dispatch,pt=mt.userid,_t={wrapperCol:{offset:3,span:21}},Ut=tt.a.useForm(),Dt=Object(v.a)(Ut,1),Gt=Dt[0],It=Object(S.i)(),ut=It.identifier;return t.a.createElement("div",{style:{width:"500px"}},t.a.createElement(tt.a,{form:Gt,name:"basic"},t.a.createElement(tt.a.Item,Object(De.a)({},_t,{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(tt.a.Item,Object(De.a)({},_t,{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(tt.a.Item,Object(De.a)({},_t,{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(tt.a.Item,null,t.a.createElement(w.a,{type:"primary",htmlType:"submit",onClick:Object(c.a)(n.a.mark(function yt(){return n.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:Gt.validateFields().then(function(){var Yt=Object(c.a)(n.a.mark(function Wt(jt){var Xt;return n.a.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ze.next=2,et({type:"competitions/setleader",payload:Object(L.a)({identifier:ut,user_id:pt},jt)});case 2:Xt=Ze.sent,Xt.status===0&&h.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return Ze.stop()}},Wt)}));return function(Wt){return Yt.apply(this,arguments)}}());case 1:case"end":return er.stop()}},yt)}))},"\u63D0\u4EA4"))))}var Vn=Rt,In={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function Ka(mt){var et,pt,_t,Ut,Dt,Gt,It,ut,yt=mt.Prize,bt=mt.Accounts,er=mt.dispatch,Yt=mt.userid,Wt=Object(o.useState)("none"),jt=Object(v.a)(Wt,2),Xt=jt[0],Qt=jt[1],Ze=Object(o.useState)("none"),mr=Object(v.a)(Ze,2),wr=mr[0],rr=mr[1];function ft(ht){return Et.apply(this,arguments)}function Et(){return Et=Object(c.a)(n.a.mark(function ht(Ct){var Ht;return n.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:if(!(Ct==="1")){Kt.next=6;break}return Kt.next=3,er({type:"competitions/Authentication"});case 3:Ht=Kt.sent,Kt.next=9;break;case 6:return Kt.next=8,er({type:"competitions/Professional"});case 8:Ht=Kt.sent;case 9:Ht.status===0&&h.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return Kt.stop()}},ht)})),Et.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"),(bt==null?void 0:bt.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,(bt==null?void 0:bt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){er({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,bt==null?void 0:bt.name),(bt==null?void 0:bt.authentication)==="uncertified"?null:(bt==null?void 0:bt.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 ft("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,(bt==null?void 0:bt.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"),(bt==null?void 0:bt.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,(bt==null?void 0:bt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){er({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,bt&&bt.identity&&In[bt.identity]),(bt==null?void 0:bt.authentication)==="uncertified"?null:(bt==null?void 0:bt.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 ft("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(){er({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,(bt==null?void 0:bt.student_id)||"--")),t.a.createElement("p",null,"\u5B66\u6821\uFF1A",t.a.createElement("span",null,(bt==null?void 0:bt.school_name)||"--")),t.a.createElement("p",null,"\u9662\u7CFB\uFF1A",t.a.createElement("span",null,(bt==null?void 0:bt.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"}},(bt==null?void 0:bt.phone)||"--"),Xt==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){Qt("block")}},"\u66F4\u6362"):null),t.a.createElement(ta,{type:3,dispatch:er,userid:bt==null?void 0:bt.id,isshow:Xt,setPhoneshow:Qt,setEmailshow:rr}),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"}},(bt==null?void 0:bt.mail)||"--"),wr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){rr("block")}},"\u66F4\u6362"):null),t.a.createElement(ta,{type:4,dispatch:er,userid:bt==null?void 0:bt.id,isshow:wr,setEmailshow:rr,setPhoneshow:Qt})),yt!=null&&yt.leader&&yt!==null&&yt!==void 0&&yt.teams&&yt!==null&&yt!==void 0&&(et=yt.teams[0])!==null&&et!==void 0&&(pt=et.bank_account)!==null&&pt!==void 0&&pt.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(Vn,{dispatch:er,userid:Yt})),yt!=null&&yt.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,(yt==null?void 0:yt.teams)&&(yt==null||((_t=yt.teams[0])===null||_t===void 0||((Ut=_t.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,(yt==null?void 0:yt.teams)&&(yt==null||((Dt=yt.teams[0])===null||Dt===void 0||((Gt=Dt.bank_account)===null||Gt===void 0))?void 0:Gt.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,(yt==null?void 0:yt.teams)&&(yt==null||((It=yt.teams[0])===null||It===void 0||((ut=It.bank_account)===null||ut===void 0))?void 0:ut.card_no)||"--"))):null,t.a.createElement(Ma,{Scoid:bt==null?void 0:bt.school_id}),t.a.createElement(ln,null))}var _a=Ka,Qn=de.a.TabPane;function Qa(mt){var et=mt.Prize,pt=mt.Accounts,_t=mt.getAccounts,Ut=mt.dispatch,Dt=mt.userid;return t.a.createElement("div",{className:"fr"},t.a.createElement("div",{className:"mb100 "},t.a.createElement(de.a,{defaultActiveKey:"1",onChange:function(It){It==="2"&&_t()}},t.a.createElement(Qn,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},t.a.createElement(we,{Prize:et})),t.a.createElement(Qn,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},t.a.createElement(_a,{userid:Dt,dispatch:Ut,Prize:et,Accounts:pt})))))}var Za=Qa,ra=I("xKgJ"),wn=I("wd/R"),na=I.n(wn),Ia=de.a.TabPane;function ma(mt){var et,pt,_t,Ut,Dt,Gt,It=mt.ChartRules,ut=mt.ItemData,yt=mt.getCharts,bt=mt.Selectkey,er=mt.HeaderDetail,Yt=mt.getChartRules,Wt=mt.userinfo,jt=mt.Editable,Xt=mt.dispatch,Qt=mt.StaffDetail,Ze=Object(o.useState)(!1),mr=Object(v.a)(Ze,2),wr=mr[0],rr=mr[1],ft=Object(o.useState)(""),Et=Object(v.a)(ft,2),ht=Et[0],Ct=Et[1],Ht=Object(o.useState)(!0),nr=Object(v.a)(Ht,2),Kt=nr[0],vr=nr[1],Or=Object(o.useState)(),lr=Object(v.a)(Or,2),Qe=lr[0],Mt=lr[1],Gr=Object(o.useState)(),Ur=Object(v.a)(Gr,2),ar=Ur[0],gr=Ur[1],xr=Object(S.i)(),At=xr.identifier;Object(o.useEffect)(function(){if(Kt){var ct,dt,kt,Tt,yr=It==null||((ct=It.stages)===null||ct===void 0)?void 0:ct[0];Mt(yr);var Kr=It==null||((dt=It.stages)===null||dt===void 0||((kt=dt[0])===null||kt===void 0||((Tt=kt.children)===null||Tt===void 0)))?void 0:Tt[0];if(gr(Kr),yr!=null&&yr.id){var Xr,pr,Br;yt(yr==null?void 0:yr.id),Ct(((Xr=It.rule_contents)===null||Xr===void 0||((pr=Xr.filter(function(Qr){return parseInt(Qr.competition_stage_id)===parseInt(yr==null?void 0:yr.id)}))===null||pr===void 0||((Br=pr[0])===null||Br===void 0))?void 0:Br.content)||"")}else{var Tr,Jr,Dr;yt(0),Ct(((Tr=It.rule_contents)===null||Tr===void 0||((Jr=Tr.filter(function(Qr){return parseInt(Qr.competition_stage_id)===0}))===null||Jr===void 0||((Dr=Jr[0])===null||Dr===void 0))?void 0:Dr.content)||"")}}},[It]);function Bt(){return ir.apply(this,arguments)}function ir(){return ir=Object(c.a)(n.a.mark(function ct(){var dt,kt,Tt,yr,Kr,Xr,pr,Br,Tr;return n.a.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:if(ht){Dr.next=3;break}return h.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Dr.abrupt("return");case 3:if(vr(!1),dt=Qe==null?void 0:Qe.id,!dt){Dr.next=12;break}return Dr.next=8,Object(ee.a)("/api/competitions/".concat(At,"/update_md_content.json"),{method:"post",body:{competition_module_id:bt,content:ht,md_content_id:(kt=It.rule_contents)===null||kt===void 0||((Tt=kt.filter(function(Qr){return parseInt(Qr.competition_stage_id)===parseInt(dt)}))===null||Tt===void 0||((yr=Tt[0])===null||yr===void 0))?void 0:yr.id,stage_id:Qe==null?void 0:Qe.id}});case 8:Kr=Dr.sent,Kr.status===0&&(h.b.info("\u66F4\u65B0\u6210\u529F"),rr(!1),Yt()),Dr.next=16;break;case 12:return Dr.next=14,Object(ee.a)("/api/competitions/".concat(At,"/update_md_content.json"),{method:"post",body:{competition_module_id:bt,content:ht,md_content_id:(Xr=It.rule_contents)===null||Xr===void 0||((pr=Xr.filter(function(Qr){return parseInt(Qr.competition_stage_id)===0}))===null||pr===void 0||((Br=pr[0])===null||Br===void 0))?void 0:Br.id,stage_id:Qe==null?void 0:Qe.id}});case 14:Tr=Dr.sent,Tr.status===0&&(h.b.info("\u66F4\u65B0\u6210\u529F"),rr(!1),Yt());case 16:case"end":return Dr.stop()}},ct)})),ir.apply(this,arguments)}var zt=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(dt,kt,Tt){return t.a.createElement("span",null,dt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(dt){return t.a.createElement(Xe.a,{title:dt},t.a.createElement("span",{title:dt},dt&&(dt==null?void 0:dt.length)>=10?(dt==null?void 0:dt.substr(0,10))+"...":dt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(dt){return t.a.createElement("span",{title:dt},dt&&(dt==null?void 0:dt.length)>=6?(dt==null?void 0:dt.substr(0,6))+"...":dt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(dt){return t.a.createElement("span",null,dt===1?"\u8BA1\u7B97\u4E2D":dt===2?"\u5B8C\u6210":dt===0?"\u5F85\u8BA1\u7B97":dt===3&&"\u9519\u8BEF")}},!(Qe!=null&&Qe.display_four_indicators)&&(Qe==null?void 0:Qe.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(dt){return t.a.createElement("span",null,dt||"--")}},!(Qe!=null&&Qe.display_four_indicators)&&(Qe==null?void 0:Qe.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){return(dt==null?void 0:dt.length)>0?dt==null?void 0:dt.map(function(kt,Tt){return t.a.createElement("span",null,kt==null?void 0:kt.name,"\uFF1A",kt==null?void 0:kt.value," ",t.a.createElement("br",null))}):t.a.createElement("span",null,"--")}},(Qe==null?void 0:Qe.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(dt){return t.a.createElement("span",null,dt||"--")}},(Qe==null?void 0:Qe.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){var kt;return t.a.createElement("span",null,(dt==null||((kt=dt.find(function(Tt){return(Tt==null?void 0:Tt.name)==="score"}))===null||kt===void 0)?void 0:kt.value)||"--")}},(Qe==null?void 0:Qe.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){var kt;return t.a.createElement("span",null,(dt==null||((kt=dt.find(function(Tt){return(Tt==null?void 0:Tt.name)==="fid"}))===null||kt===void 0)?void 0:kt.value)||"--")}},(Qe==null?void 0:Qe.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){var kt;return t.a.createElement("span",null,(dt==null||((kt=dt.find(function(Tt){return(Tt==null?void 0:Tt.name)==="total_score"}))===null||kt===void 0)?void 0:kt.value)||"--")}},!(Qe!=null&&Qe.display_four_indicators)&&(Qe==null?void 0:Qe.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(dt){return t.a.createElement("span",null,dt||"--")}},!(Qe!=null&&Qe.display_four_indicators)&&(Qe==null?void 0:Qe.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(dt){var kt;return t.a.createElement("span",null,(dt==null||((kt=dt.find(function(Tt){return(Tt==null?void 0:Tt.name)==="Coffee"}))===null||kt===void 0)?void 0:kt.value)||"--")}},!(Qe!=null&&Qe.display_four_indicators)&&(Qe==null?void 0:Qe.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(dt){var kt;return t.a.createElement("span",null,(dt==null||((kt=dt.find(function(Tt){return(Tt==null?void 0:Tt.name)==="Easyship"}))===null||kt===void 0)?void 0:kt.value)||"--")}},!(Qe!=null&&Qe.display_four_indicators)&&(Qe==null?void 0:Qe.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(dt){var kt;return t.a.createElement("span",null,(dt==null||((kt=dt.find(function(Tt){return(Tt==null?void 0:Tt.name)==="Scar"}))===null||kt===void 0)?void 0:kt.value)||"--")}},!(Qe!=null&&Qe.display_four_indicators)&&(Qe==null?void 0:Qe.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(dt){var kt;return t.a.createElement("span",null,(dt==null||((kt=dt.find(function(Tt){return(Tt==null?void 0:Tt.name)==="Scarf"}))===null||kt===void 0)?void 0:kt.value)||"--")}},!(Qe!=null&&Qe.display_four_indicators)&&(Qe==null?void 0:Qe.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(dt){var kt;return t.a.createElement("span",null,(dt==null||((kt=dt.find(function(Tt){return(Tt==null?void 0:Tt.name)==="Total"}))===null||kt===void 0)?void 0:kt.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(dt){return t.a.createElement("a",{href:dt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(ct){return!!ct});return t.a.createElement("div",null,(It==null||((et=It.stages)===null||et===void 0)?void 0:et.length)>0?null:t.a.createElement(Ke,null),(It==null||((pt=It.stages)===null||pt===void 0)?void 0:pt.length)>0&&t.a.createElement(de.a,{animated:!0,tabBarExtraContent:Wt!=null&&Wt.admin||Wt!=null&&Wt.business||jt?t.a.createElement(w.a,{onClick:function(){rr(!0)}},"\u7F16\u8F91"):Qt.enrolled&&(Qe==null?void 0:Qe.start_time)&&(Qe==null?void 0:Qe.end_time)&&t.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",na()(Qe==null?void 0:Qe.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",na()(Qe==null?void 0:Qe.end_time).format("YYYY-MM-DD HH:mm:ss"),t.a.createElement(w.a,{style:{marginLeft:"20px"},disabled:na()(Qe==null?void 0:Qe.start_time).unix()>na()(na()().format("YYYY-MM-DD HH:mm:s")).unix()||na()(na()().format("YYYY-MM-DD HH:mm:s")).unix()>na()(Qe==null?void 0:Qe.end_time).unix(),onClick:function(){Xt({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(ar==null?void 0:ar.id)||(Qe==null?void 0:Qe.id),id:er==null?void 0:er.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(dt){var kt,Tt,yr,Kr,Xr;rr(!1);var pr=It==null||((kt=It.stages)===null||kt===void 0)?void 0:kt.filter(function(Tr){return parseInt(dt)===parseInt(Tr==null?void 0:Tr.id)})[0],Br=pr==null||((Tt=pr.children)===null||Tt===void 0)?void 0:Tt[0];gr(Br),Mt(pr),Ct(((yr=It.rule_contents)===null||yr===void 0||((Kr=yr.filter(function(Tr){return parseInt(Tr.competition_stage_id)===parseInt(pr==null?void 0:pr.id)}))===null||Kr===void 0||((Xr=Kr[0])===null||Xr===void 0))?void 0:Xr.content)||""),yt((Br==null?void 0:Br.id)||dt)}},It&&It.stages.map(function(ct,dt){return t.a.createElement(Ia,{tab:ct.name,key:ct.id===null?0:ct.id},wr===!1&&It&&It.rule_contents.map(function(kt,Tt){if(ct.id===kt.competition_stage_id)return t.a.createElement(W.a,{key:Tt,value:kt.content===void 0||kt.content===null?"":kt.content});if(ct.id===null&&kt.competition_stage_id===0)return t.a.createElement(W.a,{key:Tt,value:kt.content===void 0||kt.content===null?"":kt.content})}))})),(Qe==null||((_t=Qe.children)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(de.a,{activeKey:(ar==null?void 0:ar.id)+"",onChange:function(dt){var kt,Tt=Qe==null||((kt=Qe.children)===null||kt===void 0)?void 0:kt.filter(function(yr){return parseInt(dt)===parseInt(yr==null?void 0:yr.id)})[0];gr(Tt),yt(dt)}},Qe==null||((Ut=Qe.children)===null||Ut===void 0)?void 0:Ut.map(function(ct,dt){return t.a.createElement(Ia,{tab:ct.name,key:ct.id===null?0:ct.id})})),wr&&t.a.createElement("div",null,t.a.createElement(Z.a,{defaultValue:ht,onChange:function(dt){Ct(dt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return Bt()}},"\u63D0\u4EA4"),t.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return rr(!1)}},"\u53D6\u6D88"))),((Dt=er.competition_modules.filter(function(ct){return ct.id===bt}))===null||Dt===void 0||((Gt=Dt[0])===null||Gt===void 0)?void 0:Gt.show_leaderboard)&&t.a.createElement($.a,{dataSource:ut==null?void 0:ut.results,columns:zt}))}var va=ma,Pi=I("DjyN"),Xa=I("NUBc"),Nn=de.a.TabPane;function za(mt){var et,pt,_t,Ut,Dt,Gt,It=mt.loading,ut=mt.ChartRules,yt=mt.ItemData,bt=mt.getCharts,er=mt.Selectkey,Yt=mt.HeaderDetail,Wt=mt.getChartRules,jt=mt.userinfo,Xt=mt.Editable,Qt=mt.dispatch,Ze=mt.StaffDetail,mr=Object(o.useState)(!1),wr=Object(v.a)(mr,2),rr=wr[0],ft=wr[1],Et=Object(o.useState)(""),ht=Object(v.a)(Et,2),Ct=ht[0],Ht=ht[1],nr=Object(o.useState)(!0),Kt=Object(v.a)(nr,2),vr=Kt[0],Or=Kt[1],lr=Object(o.useState)(),Qe=Object(v.a)(lr,2),Mt=Qe[0],Gr=Qe[1],Ur=Object(o.useState)(),ar=Object(v.a)(Ur,2),gr=ar[0],xr=ar[1],At=Object(S.i)(),Bt=At.identifier,ir=Object(o.useState)({page:1,limit:10,sort:"desc"}),zt=Object(v.a)(ir,2),ct=zt[0],dt=zt[1];Object(o.useEffect)(function(){var Tt;vr&&ut!==null&&ut!==void 0&&(Tt=ut.stages)!==null&&Tt!==void 0&&Tt[0]&&kt()},[ut==null||((et=ut.stages)===null||et===void 0)?void 0:et[0]]);var kt=function(){var Tt=Object(c.a)(n.a.mark(function yr(){var Kr,Xr,pr,Br,Tr,Jr;return n.a.wrap(function(Qr){for(;;)switch(Qr.prev=Qr.next){case 0:return Tr=ut==null||((Kr=ut.stages)===null||Kr===void 0)?void 0:Kr[0],Gr(Tr),Jr=ut==null||((Xr=ut.stages)===null||Xr===void 0||((pr=Xr[0])===null||pr===void 0||((Br=pr.children)===null||Br===void 0)))?void 0:Br[0],xr(Jr),ct.id=(Jr==null?void 0:Jr.id)||(Tr==null?void 0:Tr.id),dt(Object(L.a)({},ct)),Qr.next=7,bt(Object(L.a)(Object(L.a)({},ct),{},{stage_id:ct.id}));case 7:case"end":return Qr.stop()}},yr)}));return function(){return Tt.apply(this,arguments)}}();return t.a.createElement("div",null,(ut==null||((pt=ut.stages)===null||pt===void 0)?void 0:pt.length)>0?null:t.a.createElement(Ke,null),(ut==null||((_t=ut.stages)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(de.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Tt=Object(c.a)(n.a.mark(function yr(Kr){var Xr,pr,Br,Tr,Jr,Dr,Qr;return n.a.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return ft(!1),Dr=ut==null||((Xr=ut.stages)===null||Xr===void 0)?void 0:Xr.filter(function(Ue){return parseInt(Kr)===parseInt(Ue==null?void 0:Ue.id)})[0],Qr=Dr==null||((pr=Dr.children)===null||pr===void 0)?void 0:pr[0],xr(Qr),Gr(Dr),Ht(((Br=ut.rule_contents)===null||Br===void 0||((Tr=Br.filter(function(Ue){return parseInt(Ue.competition_stage_id)===parseInt(Dr==null?void 0:Dr.id)}))===null||Tr===void 0||((Jr=Tr[0])===null||Jr===void 0))?void 0:Jr.content)||""),ct.page=1,ct.limit=10,ct.id=(Qr==null?void 0:Qr.id)||Kr,dt(Object(L.a)({},ct)),Ae.next=9,bt(Object(L.a)({},ct));case 9:case"end":return Ae.stop()}},yr)}));return function(yr){return Tt.apply(this,arguments)}}()},ut&&ut.stages.map(function(Tt,yr){return t.a.createElement(Nn,{tab:Tt.name,key:Tt.id===null?0:Tt.id})})),(Mt==null||((Ut=Mt.children)===null||Ut===void 0)?void 0:Ut.length)>0&&t.a.createElement(de.a,{activeKey:(gr==null?void 0:gr.id)+"",onChange:function(){var Tt=Object(c.a)(n.a.mark(function yr(Kr){var Xr,pr;return n.a.wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:return pr=Mt==null||((Xr=Mt.children)===null||Xr===void 0)?void 0:Xr.filter(function(Jr){return parseInt(Kr)===parseInt(Jr==null?void 0:Jr.id)})[0],xr(pr),ct.page=1,ct.limit=10,ct.id=Kr,dt(Object(L.a)({},ct)),Tr.next=5,bt(Object(L.a)({},ct));case 5:case"end":return Tr.stop()}},yr)}));return function(yr){return Tt.apply(this,arguments)}}()},Mt==null||((Dt=Mt.children)===null||Dt===void 0)?void 0:Dt.map(function(Tt,yr){return t.a.createElement(Nn,{tab:Tt.name,key:Tt.id===null?0:Tt.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(){ct.page=1,ct.sort=ct.sort==="desc"?"asc":"desc",dt(Object(L.a)({},ct)),bt(Object(L.a)({},ct))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",ct.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F ",t.a.createElement("i",{className:"iconfont font14 ".concat(ct.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",t.a.createElement(U.a.Search,{onSearch:function(yr){ct.page=1,ct.search=yr,dt(Object(L.a)({},ct)),bt(Object(L.a)({},ct))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),t.a.createElement(s.a,{spinning:It},yt==null||((Gt=yt.results)===null||Gt===void 0)?void 0:Gt.map(function(Tt,yr){return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:yr===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/"+(Tt==null?void 0:Tt.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"}},Tt==null?void 0:Tt.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"}},(Tt==null?void 0:Tt.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"}},(Tt==null?void 0:Tt.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",Tt==null?void 0:Tt.created_at),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(Tt==null?void 0:Tt.ts_mem)||"- -","MB"),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(Tt==null?void 0:Tt.ts_time)||"- -","\u79D2")),t.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(Tt==null?void 0:Tt.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(Xa.a,{total:yt==null?void 0:yt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:ct.page,onChange:function(yr,Kr){ct.page=yr,dt(Object(L.a)({},ct)),bt(Object(L.a)({},ct))}})))}var Ei=za,ka=function(et){var pt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],_t=["","\u5341","\u767E","\u5343","\u4E07"];et=parseInt(et);var Ut=function(ut){for(var yt=ut.toString().split("").reverse(),bt="",er=0;er<yt.length;er++)bt=(er==0&&yt[er]==0||er>0&&yt[er]==0&&yt[er-1]==0?"":pt[yt[er]]+(yt[er]==0?_t[0]:_t[er]))+bt;return bt},Dt=Math.floor(et/1e4),Gt=et%1e4;return Gt.toString().length<4&&(Gt="0"+Gt),Dt?Ut(Dt)+"\u4E07"+Ut(Gt):Ut(et)};function aa(mt){var et,pt=mt.item,_t=mt.index,Ut=mt.StaffDetail,Dt=Object(o.useState)(!0),Gt=Object(v.a)(Dt,2),It=Gt[0],ut=Gt[1],yt=Object(o.useState)(!0),bt=Object(v.a)(yt,2),er=bt[0],Yt=bt[1],Wt=Object(o.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+"/"+(pt==null?void 0:pt.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(_t+1),"\uFF1A",t.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},pt==null?void 0:pt.name)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},pt==null?void 0:pt.challenges_count)," ")),t.a.createElement("div",{ref:Wt},t.a.createElement(W.a,{style:{maxHeight:It&&100},value:pt==null?void 0:pt.description})),t.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){ut(!It)}},It?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",t.a.createElement("i",{className:"iconfont font14 ".concat(It?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),t.a.createElement("div",{style:{marginTop:14,maxHeight:er&&58,overflow:"hidden"}},pt==null||((et=pt.challenges)===null||et===void 0)?void 0:et.map(function(jt,Xt){return t.a.createElement("div",{style:{marginTop:Xt===0?0:12}},t.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),t.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",Xt+1,"\u5173",jt==null?void 0:jt.name))})),t.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},t.a.createElement("span",{onClick:function(){Yt(!er)}},er?"\u5C55\u5F00":"\u6536\u8D77"," ",t.a.createElement("i",{className:"iconfont font14 ".concat(er?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Ut==null?void 0:Ut.enrolled)&&t.a.createElement(w.a,{onClick:function(){window.open("/shixuns/".concat(pt==null?void 0:pt.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var oi=aa,pi=de.a.TabPane;function si(mt){var et,pt,_t,Ut,Dt,Gt,It=mt.loading,ut=mt.ChartRules,yt=mt.ItemData,bt=mt.getCharts,er=mt.Selectkey,Yt=mt.HeaderDetail,Wt=mt.getChartRules,jt=mt.userinfo,Xt=mt.Editable,Qt=mt.dispatch,Ze=mt.StaffDetail,mr=Object(o.useState)(!1),wr=Object(v.a)(mr,2),rr=wr[0],ft=wr[1],Et=Object(o.useState)(""),ht=Object(v.a)(Et,2),Ct=ht[0],Ht=ht[1],nr=Object(o.useState)(!0),Kt=Object(v.a)(nr,2),vr=Kt[0],Or=Kt[1],lr=Object(o.useState)(),Qe=Object(v.a)(lr,2),Mt=Qe[0],Gr=Qe[1],Ur=Object(o.useState)(),ar=Object(v.a)(Ur,2),gr=ar[0],xr=ar[1],At=Object(S.i)(),Bt=At.identifier,ir=Object(o.useState)({page:1,limit:10}),zt=Object(v.a)(ir,2),ct=zt[0],dt=zt[1],kt=Object(o.useState)(),Tt=Object(v.a)(kt,2),yr=Tt[0],Kr=Tt[1];Object(o.useEffect)(function(){var pr;vr&&ut!==null&&ut!==void 0&&(pr=ut.stages)!==null&&pr!==void 0&&pr[0]&&Xr()},[ut==null||((et=ut.stages)===null||et===void 0)?void 0:et[0]]);var Xr=function(){var pr=Object(c.a)(n.a.mark(function Br(){var Tr,Jr,Dr,Qr,kn,Ae;return n.a.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:return kn=ut==null||((Tr=ut.stages)===null||Tr===void 0)?void 0:Tr[0],Gr(kn),Ae=ut==null||((Jr=ut.stages)===null||Jr===void 0||((Dr=Jr[0])===null||Dr===void 0||((Qr=Dr.children)===null||Qr===void 0)))?void 0:Qr[0],xr(Ae),ct.id=(Ae==null?void 0:Ae.id)||(kn==null?void 0:kn.id),dt(Object(L.a)({},ct)),He.next=7,bt(Object(L.a)(Object(L.a)({},ct),{},{stage_id:ct.id}));case 7:case"end":return He.stop()}},Br)}));return function(){return pr.apply(this,arguments)}}();return t.a.createElement("div",null,(ut==null||((pt=ut.stages)===null||pt===void 0)?void 0:pt.length)>0?null:t.a.createElement(Ke,null),(ut==null||((_t=ut.stages)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(de.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var pr=Object(c.a)(n.a.mark(function Br(Tr){var Jr,Dr,Qr,kn,Ae,Ue,He;return n.a.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return ft(!1),Ue=ut==null||((Jr=ut.stages)===null||Jr===void 0)?void 0:Jr.filter(function(Se){return parseInt(Tr)===parseInt(Se==null?void 0:Se.id)})[0],He=Ue==null||((Dr=Ue.children)===null||Dr===void 0)?void 0:Dr[0],xr(He),Gr(Ue),Ht(((Qr=ut.rule_contents)===null||Qr===void 0||((kn=Qr.filter(function(Se){return parseInt(Se.competition_stage_id)===parseInt(Ue==null?void 0:Ue.id)}))===null||kn===void 0||((Ae=kn[0])===null||Ae===void 0))?void 0:Ae.content)||""),ct.page=1,ct.limit=10,ct.id=(He==null?void 0:He.id)||Tr,dt(Object(L.a)({},ct)),he.next=9,bt(Object(L.a)({},ct));case 9:case"end":return he.stop()}},Br)}));return function(Br){return pr.apply(this,arguments)}}()},ut&&ut.stages.map(function(pr,Br){return t.a.createElement(pi,{tab:pr.name,key:pr.id===null?0:pr.id})})),(Mt==null||((Ut=Mt.children)===null||Ut===void 0)?void 0:Ut.length)>0&&t.a.createElement(de.a,{activeKey:(gr==null?void 0:gr.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var pr=Object(c.a)(n.a.mark(function Br(Tr){var Jr,Dr;return n.a.wrap(function(kn){for(;;)switch(kn.prev=kn.next){case 0:return Dr=Mt==null||((Jr=Mt.children)===null||Jr===void 0)?void 0:Jr.filter(function(Ae){return parseInt(Tr)===parseInt(Ae==null?void 0:Ae.id)})[0],xr(Dr),ct.page=1,ct.limit=10,ct.id=Tr,dt(Object(L.a)({},ct)),kn.next=5,bt(Object(L.a)({},ct));case 5:case"end":return kn.stop()}},Br)}));return function(Br){return pr.apply(this,arguments)}}()},Mt==null||((Dt=Mt.children)===null||Dt===void 0)?void 0:Dt.map(function(pr,Br){return t.a.createElement(pi,{tab:pr.name,key:pr.id===null?0:pr.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}},yt==null?void 0:yt.start_time,"~",yt==null?void 0:yt.end_time)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(yt==null?void 0:yt.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),t.a.createElement(s.a,{spinning:It},yt==null||((Gt=yt.results)===null||Gt===void 0)?void 0:Gt.map(function(pr,Br){return t.a.createElement(oi,{StaffDetail:Ze,item:pr,index:Br})})),t.a.createElement(Xa.a,{total:yt==null?void 0:yt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:ct.page,onChange:function(Br,Tr){ct.page=Br,dt(Object(L.a)({},ct)),bt(Object(L.a)({},ct))}})))}var mi=si,qa=I("UfjD"),wa=I("qHvr"),ei=function(et){var pt,_t,Ut,Dt,Gt,It,ut,yt,bt=et.globalSetting,er=et.loading,Yt=et.dispatch,Wt=et.user,jt=Object(g.a)(et,["globalSetting","loading","dispatch","user"]),Xt=Object(o.useState)({avatar_url:""}),Qt=Object(v.a)(Xt,2),Ze=Qt[0],mr=Qt[1],wr=Object(o.useState)([]),rr=Object(v.a)(wr,2),ft=rr[0],Et=rr[1],ht=Object(S.i)(),Ct=ht.identifier,Ht=Object(o.useState)([]),nr=Object(v.a)(Ht,2),Kt=nr[0],vr=nr[1],Or=Object(o.useState)(!0),lr=Object(v.a)(Or,2),Qe=lr[0],Mt=lr[1],Gr=Object(o.useState)([]),Ur=Object(v.a)(Gr,2),ar=Ur[0],gr=Ur[1],xr=Object(o.useState)([]),At=Object(v.a)(xr,2),Bt=At[0],ir=At[1],zt=Object(o.useState)(!1),ct=Object(v.a)(zt,2),dt=ct[0],kt=ct[1],Tt=Object(o.useState)(!1),yr=Object(v.a)(Tt,2),Kr=yr[0],Xr=yr[1],pr=Object(o.useState)(!1),Br=Object(v.a)(pr,2),Tr=Br[0],Jr=Br[1],Dr=Object(o.useState)([]),Qr=Object(v.a)(Dr,2),kn=Qr[0],Ae=Qr[1],Ue=Object(o.useState)([]),He=Object(v.a)(Ue,2),Le=He[0],he=He[1],Se=Object(o.useState)([]),ge=Object(v.a)(Se,2),Pe=ge[0],Fe=ge[1],Be=Object(o.useState)(!1),je=Object(v.a)(Be,2),Ge=je[0],st=je[1],wt=Object(o.useState)([]),Ot=Object(v.a)(wt,2),Nt=Ot[0],br=Ot[1],Mr=Object(o.useState)(),Pr=Object(v.a)(Mr,2),jr=Pr[0],Ar=Pr[1],Wr=Object(o.useState)(!0),Hr=Object(v.a)(Wr,2),qr=Hr[0],Vr=Hr[1],mn=Object(o.useState)(!1),Yr=Object(v.a)(mn,2),_r=Yr[0],Sr=Yr[1],zr=Object(o.useState)(!1),Zr=Object(v.a)(zr,2),dr=Zr[0],nn=Zr[1],On=Object(o.useState)(!1),sn=Object(v.a)(On,2),En=sn[0],dn=sn[1],jn=Object(o.useState)(!1),Hn=Object(v.a)(jn,2),An=Hn[0],Zn=Hn[1],Na=Object(o.useState)(!1),ua=Object(v.a)(Na,2),Kn=ua[0],xn=ua[1],_n=Object(o.useState)(!0),Rn=Object(v.a)(_n,2),Cn=Rn[0],Un=Rn[1],ga=Object(S.h)(),Va=Object(o.useRef)(null);Object(o.useEffect)(function(){Ct&&hn(),Object(xt.Z)("\u7ADE\u8D5B")},[Ct]);function hn(){return Ca.apply(this,arguments)}function Ca(){return Ca=Object(c.a)(n.a.mark(function ur(){var fr;return n.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return an.t0=Et,an.next=3,Yt({type:"competitions/getStaff",payload:{identifier:Ct}});case 3:return an.t1=an.sent,(0,an.t0)(an.t1),an.next=7,Yt({type:"competitions/getHeader",payload:{identifier:Ct}});case 7:fr=an.sent,mr(fr),Object(xt.Z)((fr==null?void 0:fr.name)||"\u7ADE\u8D5B");case 10:case"end":return an.stop()}},ur)})),Ca.apply(this,arguments)}Object(o.useEffect)(function(){var ur;Ar(parseInt(ga==null||((ur=ga.query)===null||ur===void 0)?void 0:ur.type)===1)},[ga]),Object(o.useEffect)(function(){var ur;if((Ze==null||((ur=Ze.competition_modules)===null||ur===void 0)?void 0:ur.length)>0){var fr,Jt;if((ga==null||((fr=ga.query)===null||fr===void 0)?void 0:fr.active)==="\u8D5B\u9898\u53D1\u5E03"){var an,Zt=Ze==null||((an=Ze.competition_modules)===null||an===void 0)?void 0:an.find(function(ui){return ui.name==="\u8D5B\u9898\u53D1\u5E03"});if(Zt){Oa(Zt);return}}Oa(Ze==null||((Jt=Ze.competition_modules)===null||Jt===void 0)?void 0:Jt[0])}},[Ze]);function Oa(ur){return vn.apply(this,arguments)}function vn(){return vn=Object(c.a)(n.a.mark(function ur(fr){var Jt;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(Fe(fr.id),Pe=fr.id,gr(fr),!(fr.module_type==="entrance")){Zt.next=9;break}return Zt.next=6,Yt({type:"competitions/getItem",payload:{url:fr.module_url,module_type:"entrance"}});case 6:Jt=Zt.sent,Zt.next=12;break;case 9:return Zt.next=11,Yt({type:"competitions/getItem",payload:{url:fr.module_url}});case 11:Jt=Zt.sent;case 12:kt(!1),Jr(!1),st(!1),vr(Jt),Sr(!1),nn(!1),ir(fr.module_type),fr.module_type==="chart"?(kt(!0),Mt(!1),Bi()):fr.module_type==="certificate"?(Jr(!0),kt(!1),Mt(!1),vi()):fr.module_type==="md_tab"?(st(!0),Mt(!1),localStorage.setItem("issee","2"),kt(!1),Jr(!1),ni()):fr.module_type==="md_shixun"?(Sr(!0),Mt(!1),ni()):fr.module_type==="entrance"?(nn(!0),Mt(!1),ni()):(Mt(!0),localStorage.setItem("issee","1"));case 20:case"end":return Zt.stop()}},ur)})),vn.apply(this,arguments)}function fn(ur,fr,Jt){return Bn.apply(this,arguments)}function Bn(){return Bn=Object(c.a)(n.a.mark(function ur(fr,Jt,an){var Zt,ui;return n.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:if(fr.stopPropagation(),Object(ie.e)(Yt)){Tn.next=3;break}return Tn.abrupt("return");case 3:if(!(Ze!=null&&Ze.is_authentication&&!(Wt!=null&&(Zt=Wt.userInfo)!==null&&Zt!==void 0&&Zt.authentication))){Tn.next=6;break}return Yt({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),Tn.abrupt("return");case 6:if(!(Ze!=null&&Ze.enroll_url)){Tn.next=9;break}return Object(xt.U)(Ze==null?void 0:Ze.enroll_url),Tn.abrupt("return");case 9:if(!(an==="ismodel")){Tn.next=23;break}if(!(Jt.member_of_course===!0)){Tn.next=14;break}Object(xt.U)("/classrooms/".concat(Jt.course_id)),Tn.next=21;break;case 14:if(Jt.invite_code){Tn.next=17;break}return h.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"),Tn.abrupt("return");case 17:return Tn.next=19,Yt({type:"competitions/addApplytojoincourse",payload:{invite_code:Jt.invite_code,student:1}});case 19:ui=Tn.sent,ui.status===0&&Object(xt.U)("/classrooms/".concat(Jt.course_id));case 21:Tn.next=27;break;case 23:if(!(ft.enrolled===!0)){Tn.next=26;break}return Object(xt.U)(an),Tn.abrupt("return");case 26:dn(!0);case 27:case"end":return Tn.stop()}},ur)})),Bn.apply(this,arguments)}function Bi(){return _i.apply(this,arguments)}function _i(){return _i=Object(c.a)(n.a.mark(function ur(){return n.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return Jt.t0=Xr,Jt.next=3,Yt({type:"competitions/ChartRules",payload:{identifier:Ct}});case 3:return Jt.t1=Jt.sent,Jt.next=6,(0,Jt.t0)(Jt.t1);case 6:case"end":return Jt.stop()}},ur)})),_i.apply(this,arguments)}function ti(ur){return ri.apply(this,arguments)}function ri(){return ri=Object(c.a)(n.a.mark(function ur(fr){var Jt;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,Yt({type:"competitions/Charts",payload:{identifier:Ct,stage_id:fr}});case 2:Jt=Zt.sent,vr(Jt);case 4:case"end":return Zt.stop()}},ur)})),ri.apply(this,arguments)}function Li(ur){return wi.apply(this,arguments)}function wi(){return wi=Object(c.a)(n.a.mark(function ur(fr){var Jt;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Vr(!0),Zt.next=3,Yt({type:"competitions/Results",payload:Object(L.a)({identifier:Ct,stage_id:fr==null?void 0:fr.id},fr)});case 3:Jt=Zt.sent,vr(Jt),Vr(!1);case 6:case"end":return Zt.stop()}},ur)})),wi.apply(this,arguments)}function Mi(ur){return Wi.apply(this,arguments)}function Wi(){return Wi=Object(c.a)(n.a.mark(function ur(fr){var Jt;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Vr(!0),Zt.next=3,Yt({type:"competitions/Results",payload:Object(L.a)({identifier:Ct,stage_id:fr==null?void 0:fr.id,module_type:"entrance"},fr)});case 3:Jt=Zt.sent,vr(Jt),Vr(!1);case 6:case"end":return Zt.stop()}},ur)})),Wi.apply(this,arguments)}function Vi(ur){return Ii.apply(this,arguments)}function Ii(){return Ii=Object(c.a)(n.a.mark(function ur(fr){var Jt;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,Yt({type:"competitions/Results",payload:{identifier:Ct,stage_id:fr}});case 2:if(Jt=Zt.sent,!(localStorage.getItem("issee")==="1")){Zt.next=5;break}return Zt.abrupt("return");case 5:vr(Jt);case 6:case"end":return Zt.stop()}},ur)})),Ii.apply(this,arguments)}function ni(){return Ti.apply(this,arguments)}function Ti(){return Ti=Object(c.a)(n.a.mark(function ur(){return n.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return Jt.t0=br,Jt.next=3,Yt({type:"competitions/TabResults",payload:{identifier:Ct,competition_module_id:Pe}});case 3:Jt.t1=Jt.sent,(0,Jt.t0)(Jt.t1);case 5:case"end":return Jt.stop()}},ur)})),Ti.apply(this,arguments)}function vi(){return ai.apply(this,arguments)}function ai(){return ai=Object(c.a)(n.a.mark(function ur(){var fr,Jt;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,Yt({type:"competitions/Prize",payload:{identifier:Ct,user_id:Wt==null||((fr=Wt.userInfo)===null||fr===void 0)?void 0:fr.user_id}});case 2:Jt=Zt.sent,Ae(Jt);case 4:case"end":return Zt.stop()}},ur)})),ai.apply(this,arguments)}function co(){return gi.apply(this,arguments)}function gi(){return gi=Object(c.a)(n.a.mark(function ur(){var fr,Jt;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,Yt({type:"competitions/Accounts",payload:{id:Wt==null||((fr=Wt.userInfo)===null||fr===void 0)?void 0:fr.user_id}});case 2:Jt=Zt.sent,he(Jt);case 4:case"end":return Zt.stop()}},ur)})),gi.apply(this,arguments)}function Si(ur){return ii.apply(this,arguments)}function ii(){return ii=Object(c.a)(n.a.mark(function ur(fr){var Jt;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(Cn){Zt.next=2;break}return Zt.abrupt("return");case 2:if(Un(!1),!li()){Zt.next=5;break}return Zt.abrupt("return");case 5:return Zt.next=7,Yt({type:"competitions/AddTeam",payload:{identifier:Ct,name:fr}});case 7:Jt=Zt.sent,Jt&&Jt.status===0?(h.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),hn(),Zn(!1)):Un(!0);case 9:case"end":return Zt.stop()}},ur)})),ii.apply(this,arguments)}function li(){var ur,fr;if(Wt!=null&&(ur=Wt.userInfo)!==null&&ur!==void 0&&ur.is_teacher){var Jt;if(ft!=null&&(Jt=ft.teacher_staff)!==null&&Jt!==void 0&&Jt.mutiple_limited&&(ft!=null&&ft.enrolled))return h.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Un(!0),!0}else{var an;if(ft!=null&&(an=ft.member_staff)!==null&&an!==void 0&&an.mutiple_limited&&(ft!=null&&ft.enrolled))return h.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Un(!0),!0}if(ft!=null&&ft.enroll_ended)return h.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),Un(!0),!0;if(Wt!=null&&(fr=Wt.userInfo)!==null&&fr!==void 0&&fr.is_teacher){if(!ft.teacher_staff)return h.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),Un(!0),!0}else if(!(ft!=null&&ft.member_staff))return h.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),Un(!0),!0}function ja(ur){return $a.apply(this,arguments)}function $a(){return $a=Object(c.a)(n.a.mark(function ur(fr){var Jt;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(Cn){Zt.next=2;break}return Zt.abrupt("return");case 2:if(!li()){Zt.next=4;break}return Zt.abrupt("return");case 4:return Un(!1),Zt.next=7,Yt({type:"competitions/JoinTeam",payload:{identifier:Ct,invite_code:fr}});case 7:Jt=Zt.sent,Jt&&Jt.status===0?(h.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),xn(!1),Un(!0),hn()):Un(!0);case 9:case"end":return Zt.stop()}},ur)})),$a.apply(this,arguments)}return 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(_.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),t.a.createElement(a.a.Item,null,Ze.name,Ze.sub_title?"-"+Ze.sub_title:null)),t.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},t.a.createElement(s.a,{spinning:er.effects["competitions/getHeader"]},t.a.createElement("div",{style:{height:"355px",width:"800px"}},(Ze==null?void 0:Ze.avatar_url)&&(Ze==null?void 0:Ze.avatar_url)!==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:G.a.IMG_SERVER+"/"+(Ze==null?void 0:Ze.avatar_url)}),!(Ze!=null&&Ze.avatar_url)&&(Ze==null?void 0:Ze.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"}},t.a.createElement("p",{className:"".concat(O.a.titlesize)},Ze.name,Ze.sub_title?"-"+Ze.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,"\u5956\u91D1"),Ze!=null&&Ze.bonus?t.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(Ze&&Ze.bonus).toLocaleString()):t.a.createElement("span",{style:{fontSize:"24px"}},"\u6682\u65E0")),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u6D4F\u89C8"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(Ze&&Ze.visits_count).toLocaleString())),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u62A5\u540D"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(Ze&&Ze.member_count).toLocaleString()))),t.a.createElement("p",{className:O.a.timesize,style:{marginTop:30}},t.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"\u7ADE\u8D5B\u65F6\u95F4\uFF1A"),Ze.start_time,"~",Ze.end_time),t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),Ze.enroll_end_time),Ze.competition_status==="ended"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u5DF2\u7ED3\u675F"):null,Ze.competition_status==="nearly_published"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u672A\u53D1\u5E03"):null,Ze.competition_status==="progressing"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u8FDB\u884C\u4E2D"):null,t.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(Ze==null?void 0:Ze.mode)<=2&&ft.enrolled&&t.a.createElement(w.a,{onClick:function(fr){if((Ze==null?void 0:Ze.mode)===1){var Jt;Oa((Jt=Ze.competition_modules)===null||Jt===void 0?void 0:Jt.find(function(an){return an.module_type==="entrance"}))}else fn(fr,Ze,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(Ze==null?void 0:Ze.mode)===2||(Ze==null?void 0:Ze.mode)===1&&((pt=Ze.competition_modules)===null||pt===void 0||((_t=pt.filter(function(ur){return ur.module_type==="entrance"}))===null||_t===void 0)?void 0:_t.length)>0?"":"none"},className:O.a.buttonsize},(Ze==null?void 0:Ze.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(Ze==null?void 0:Ze.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),Ze.competition_status==="ended"?t.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,Ze.competition_status==="nearly_published"?t.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,Ze.competition_status!=="nearly_published"&&Ze.enroll_end&&Ze.competition_status!=="ended"?t.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,Ze.competition_status==="progressing"&&Ze.enroll_end!=!0?t.a.createElement(w.a,{type:"primary",disabled:ft.enrolled&&!Ze.need_attachment,className:O.a.buttonsize,onClick:function(fr){if(ft.enrolled&&Ze.need_attachment){var Jt;(Jt=Va.current)===null||Jt===void 0||Jt.handleVisible();return}fn(fr,Ze,Ze.mode===2?"ismodel":Ze.personal?"personal":"/competitions/index/".concat(Ze.identifier,"/enroll"))}},ft.enrolled?Ze.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":Ze!=null&&Ze.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),Wt.userInfo.real_name!="\u6E38\u5BA2"&&!(Ze!=null&&Ze.enroll_url)&&t.a.createElement("span",{onClick:function(fr){return fn(fr,Ze,Ze.mode===2?"ismodel":Ze.personal?"personal":"/competitions/index/".concat(Ze.identifier,"/enroll"))},className:O.a.myteam},Object(ra.u)()?"\u53C2\u8D5B\u6218\u961F>>":"\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(Pe)]},Ze&&Ze.competition_modules&&Ze.competition_modules.map(function(ur,fr){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(ie.e)(Yt))return;h.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Oa(ur)},key:ur.id},ur.name)}))),t.a.createElement("div",{className:O.a.flex6,style:{padding:(_r||dr)&&0}},Tr?t.a.createElement(Za,{dispatch:Yt,userid:Wt==null||((Ut=Wt.userInfo)===null||Ut===void 0)?void 0:Ut.user_id,Prize:kn,Accounts:Le,getAccounts:co}):null,dt?t.a.createElement(Oe,{HeaderDetail:Ze,userinfo:Wt.userInfo,Editable:Ze==null||((Dt=Ze.permission)===null||Dt===void 0)?void 0:Dt.editable,getCharts:ti,getChartRules:Bi,Selectkey:Pe,ChartRules:Kr,ItemData:Kt}):null,Qe?t.a.createElement(Q,{ref:Va,StaffDetail:ft,HeaderDetail:Ze,userinfo:Wt.userInfo,Editable:Ze==null||((Gt=Ze.permission)===null||Gt===void 0)?void 0:Gt.editable,ItemData:Kt,setIssee:Mt,ModelType:Bt,dispatch:Yt}):null,!Qe&&!_r&&!dr&&!dt&&!Tr&&!Ge?t.a.createElement(Y,{userinfo:Wt.userInfo,ModelType:Bt,getrightdatas:Oa,dispatch:Yt,MenuItem:ar,setIssee:Mt,identifier:Ct,ItemData:Kt}):null,Ge&&t.a.createElement(va,{dispatch:Yt,StaffDetail:ft,userinfo:Wt.userInfo,HeaderDetail:Ze,Editable:Ze==null||((It=Ze.permission)===null||It===void 0)?void 0:It.editable,getCharts:Vi,getChartRules:ni,Selectkey:Pe,ChartRules:Nt,ItemData:Kt}),_r&&t.a.createElement(Ei,{loading:qr,dispatch:Yt,StaffDetail:ft,userinfo:Wt.userInfo,HeaderDetail:Ze,Editable:Ze==null||((ut=Ze.permission)===null||ut===void 0)?void 0:ut.editable,getCharts:Li,getChartRules:ni,Selectkey:Pe,ChartRules:Nt,ItemData:Kt}),dr&&t.a.createElement(mi,{loading:qr,dispatch:Yt,StaffDetail:ft,userinfo:Wt.userInfo,HeaderDetail:Ze,Editable:Ze==null||((yt=Ze.permission)===null||yt===void 0)?void 0:yt.editable,getCharts:Mi,getChartRules:ni,Selectkey:Pe,ChartRules:Nt,ItemData:Kt}))),t.a.createElement(x.a,null),t.a.createElement(K,{getResults:Vi}),t.a.createElement(C.a,{visible:jr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return Ar(!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(xt.U)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),t.a.createElement(C.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:En,onCancel:function(){dn(!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(){xn(!0),dn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),t.a.createElement(w.a,{style:{height:40},onClick:function(){Zn(!0),dn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),Kn?t.a.createElement(qa.a,{isjoin:Kn,setJoin:xn,JoinTeams:ja}):null,An?t.a.createElement(wa.a,{isAddmodle:An,setIsAdd:Zn,createTeam:Si}):null)},xi=J.default=Object(i.a)(function(mt){var et=mt.loading,pt=mt.globalSetting,_t=mt.user;return{globalSetting:pt,loading:et,user:_t}})(ei)},GRuw:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("lPiR"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.WordArray,u=f.algo,m=u.SHA256,w=u.SHA224=m.extend({_doReset:function(){this._hash=new D.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var p=m._doFinalize.call(this);return p.sigBytes-=4,p}});f.SHA224=m._createHelper(w),f.HmacSHA224=m._createHmacHelper(w)}(),L.SHA224})},GfqC:function(j,J,I){"use strict";var L=I("cDcd"),f=I.n(L),C=I("TSYQ"),D=I.n(C);function u(H,U){var W="cannot "+H.method+" "+H.action+" "+U.status+"'",G=new Error(W);return G.status=U.status,G.method=H.method,G.url=H.action,G}function m(H){var U=H.responseText||H.response;if(!U)return U;try{return JSON.parse(U)}catch(W){return U}}function w(H){var U=new XMLHttpRequest;H.onProgress&&U.upload&&(U.upload.onprogress=function(ie){ie.total>0&&(ie.percent=ie.loaded/ie.total*100),H.onProgress(ie)});var W=new FormData;H.data&&Object.keys(H.data).forEach(function(ee){var ie=H.data[ee];if(Array.isArray(ie)){ie.forEach(function(ce){W.append(ee+"[]",ce)});return}W.append(ee,H.data[ee])}),H.file instanceof Blob?W.append(H.filename,H.file,H.file.name):W.append(H.filename,H.file),U.onerror=function(ie){H.onError(ie)},U.onload=function(){return U.status<200||U.status>=300?H.onError(u(H,U),m(U)):H.onSuccess(m(U),U)},U.open(H.method,H.action,!0),H.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var G=H.headers||{};return G["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(G).forEach(function(ee){G[ee]!==null&&U.setRequestHeader(ee,G[ee])}),U.send(W),{abort:function(){U.abort()}}}var p=+new Date,s=0;function l(){return"rc-upload-"+p+"-"+ ++s}function a(H,U){return H.indexOf(U,H.length-U.length)!==-1}var d=function(H,U){if(H&&U){var W=Array.isArray(U)?U:U.split(","),G=H.name||"",ee=H.type||"",ie=ee.replace(/\/.*$/,"");return W.some(function(ce){var _e=ce.trim();return _e.charAt(0)==="."?a(G.toLowerCase(),_e.toLowerCase()):/\/\*$/.test(_e)?ie===_e.replace(/\/.*$/,""):ee===_e})}return!0};function h(H,U){var W=H.createReader(),G=[];function ee(){W.readEntries(function(ie){var ce=Array.prototype.slice.apply(ie);G=G.concat(ce);var _e=!ce.length;_e?U(G):ee()})}ee()}var c=function(U,W,G){var ee=function ie(ce,_e){_e=_e||"",ce.isFile?ce.file(function(Ce){G(Ce)&&(ce.fullPath&&!Ce.webkitRelativePath&&(Object.defineProperties(Ce,{webkitRelativePath:{writable:!0}}),Ce.webkitRelativePath=ce.fullPath.replace(/^\//,""),Object.defineProperties(Ce,{webkitRelativePath:{writable:!1}})),W([Ce]))}):ce.isDirectory&&h(ce,function(Ce){Ce.forEach(function(le){ie(le,""+_e+ce.name+"/")})})};U.forEach(function(ie){ee(ie.webkitGetAsEntry())})},v=c,g=Object.assign||function(H){for(var U=1;U<arguments.length;U++){var W=arguments[U];for(var G in W)Object.prototype.hasOwnProperty.call(W,G)&&(H[G]=W[G])}return H},E=function(){function H(U,W){var G=[],ee=!0,ie=!1,ce=void 0;try{for(var _e=U[Symbol.iterator](),Ce;!(ee=(Ce=_e.next()).done)&&!(G.push(Ce.value),W&&G.length===W);ee=!0);}catch(le){ie=!0,ce=le}finally{try{!ee&&_e.return&&_e.return()}finally{if(ie)throw ce}}return G}return function(U,W){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return H(U,W);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function H(U,W){for(var G=0;G<W.length;G++){var ee=W[G];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(U,ee.key,ee)}}return function(U,W,G){return W&&H(U.prototype,W),G&&H(U,G),U}}();function o(H,U,W){return U in H?Object.defineProperty(H,U,{value:W,enumerable:!0,configurable:!0,writable:!0}):H[U]=W,H}function t(H,U){var W={};for(var G in H){if(U.indexOf(G)>=0)continue;if(!Object.prototype.hasOwnProperty.call(H,G))continue;W[G]=H[G]}return W}function S(H,U){if(!(H instanceof U))throw new TypeError("Cannot call a class as a function")}function _(H,U){if(!H)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:H}function i(H,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);H.prototype=Object.create(U&&U.prototype,{constructor:{value:H,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(H,U):H.__proto__=U)}var P=function(U){return Object.keys(U).reduce(function(W,G){return(G.substr(0,5)==="data-"||G.substr(0,5)==="aria-"||G==="role")&&(W[G]=U[G]),W},{})},O=function(H){i(U,H);function U(){var W,G,ee,ie;S(this,U);for(var ce=arguments.length,_e=Array(ce),Ce=0;Ce<ce;Ce++)_e[Ce]=arguments[Ce];return ie=(G=(ee=_(this,(W=U.__proto__||Object.getPrototypeOf(U)).call.apply(W,[this].concat(_e))),ee),ee.state={uid:l()},ee.reqs={},ee.onChange=function(le){var ye=le.target.files;ee.uploadFiles(ye),ee.reset()},ee.onClick=function(le){var ye=ee.fileInput;if(!ye)return;var fe=ee.props,ne=fe.children,ae=fe.onClick;ne&&ne.type==="button"&&(ye.parentNode.focus(),ye.parentNode.querySelector("button").blur()),ye.click(),ae&&ae(le)},ee.onKeyDown=function(le){le.key==="Enter"&&ee.onClick()},ee.onFileDrop=function(le){var ye=ee.props.multiple;if(le.preventDefault(),le.type==="dragover")return;if(ee.props.directory)v(Array.prototype.slice.call(le.dataTransfer.items),ee.uploadFiles,function(ne){return d(ne,ee.props.accept)});else{var fe=Array.prototype.slice.call(le.dataTransfer.files).filter(function(ne){return d(ne,ee.props.accept)});ye===!1&&(fe=fe.slice(0,1)),ee.uploadFiles(fe)}},ee.uploadFiles=function(le){var ye=Array.prototype.slice.call(le);ye.map(function(fe){return fe.uid=l(),fe}).forEach(function(fe){ee.upload(fe,ye)})},ee.saveFileInput=function(le){ee.fileInput=le},G),_(ee,ie)}return n(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(G,ee){var ie=this,ce=this.props;if(!ce.beforeUpload)return setTimeout(function(){return ie.post(G)},0);var _e=ce.beforeUpload(G,ee);_e&&_e.then?_e.then(function(Ce){var le=Object.prototype.toString.call(Ce);return le==="[object File]"||le==="[object Blob]"?ie.post(Ce):ie.post(G)}).catch(function(Ce){console.log(Ce)}):_e!==!1&&setTimeout(function(){return ie.post(G)},0);return}},{key:"post",value:function(G){var ee=this;if(!this._isMounted)return;var ie=this.props,ce=ie.onStart,_e=ie.onProgress,Ce=ie.transformFile,le=Ce===void 0?function(ye){return ye}:Ce;new Promise(function(ye){var fe=ie.action;return typeof fe=="function"&&(fe=fe(G)),ye(fe)}).then(function(ye){var fe=G.uid,ne=ie.customRequest||w,ae=Promise.resolve(le(G)).then(function(q){var se=ie.data;return typeof se=="function"&&(se=se(q)),Promise.all([q,se])}).catch(function(q){console.error(q)});ae.then(function(q){var se=E(q,2),Q=se[0],Z=se[1],be={action:ye,filename:ie.name,data:Z,file:Q,headers:ie.headers,withCredentials:ie.withCredentials,method:ie.method||"post",onProgress:_e?function(re){_e(re,G)}:null,onSuccess:function(Y,X){delete ee.reqs[fe],ie.onSuccess(Y,G,X)},onError:function(Y,X){delete ee.reqs[fe],ie.onError(Y,X,G)}};ce(G),ee.reqs[fe]=ne(be)})})}},{key:"reset",value:function(){this.setState({uid:l()})}},{key:"abort",value:function(G){var ee=this.reqs;if(G){var ie=G;G&&G.uid&&(ie=G.uid),ee[ie]&&ee[ie].abort&&ee[ie].abort(),delete ee[ie]}else Object.keys(ee).forEach(function(ce){ee[ce]&&ee[ce].abort&&ee[ce].abort(),delete ee[ce]})}},{key:"render",value:function(){var G,ee=this.props,ie=ee.component,ce=ee.prefixCls,_e=ee.className,Ce=ee.disabled,le=ee.id,ye=ee.style,fe=ee.multiple,ne=ee.accept,ae=ee.children,q=ee.directory,se=ee.openFileDialogOnClick,Q=ee.onMouseEnter,Z=ee.onMouseLeave,be=t(ee,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),re=D()((G={},o(G,ce,!0),o(G,ce+"-disabled",Ce),o(G,_e,_e),G)),Y=Ce?{}:{onClick:se?this.onClick:function(){},onKeyDown:se?this.onKeyDown:function(){},onMouseEnter:Q,onMouseLeave:Z,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return f.a.createElement(ie,g({},Y,{className:re,role:"button",style:ye}),f.a.createElement("input",g({},P(be),{id:le,type:"file",ref:this.saveFileInput,onClick:function($){return $.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ne,directory:q?"directory":null,webkitdirectory:q?"webkitdirectory":null,multiple:fe,onChange:this.onChange})),ae)}}]),U}(L.Component),x=O,b=Object.assign||function(H){for(var U=1;U<arguments.length;U++){var W=arguments[U];for(var G in W)Object.prototype.hasOwnProperty.call(W,G)&&(H[G]=W[G])}return H},y=function(){function H(U,W){for(var G=0;G<W.length;G++){var ee=W[G];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(U,ee.key,ee)}}return function(U,W,G){return W&&H(U.prototype,W),G&&H(U,G),U}}();function T(H,U){if(!(H instanceof U))throw new TypeError("Cannot call a class as a function")}function M(H,U){if(!H)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:H}function k(H,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);H.prototype=Object.create(U&&U.prototype,{constructor:{value:H,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(H,U):H.__proto__=U)}function N(){}var K=function(H){k(U,H);function U(){var W,G,ee,ie;T(this,U);for(var ce=arguments.length,_e=Array(ce),Ce=0;Ce<ce;Ce++)_e[Ce]=arguments[Ce];return ie=(G=(ee=M(this,(W=U.__proto__||Object.getPrototypeOf(U)).call.apply(W,[this].concat(_e))),ee),ee.saveUploader=function(le){ee.uploader=le},G),M(ee,ie)}return y(U,[{key:"abort",value:function(G){this.uploader.abort(G)}},{key:"render",value:function(){return f.a.createElement(x,b({},this.props,{ref:this.saveUploader}))}}]),U}(L.Component);K.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:N,onError:N,onSuccess:N,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var z=K,B=J.a=z},HmJG:function(j,J,I){},IBYe:function(j,J,I){"use strict";function L(f){return null}J.a=L},Ib8C:function(j,J,I){(function(L){(function(f,C){j.exports=J=C()})(this,function(){var f=f||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=I(4)}catch(o){}var m=function(){if(u){if(typeof u.getRandomValues=="function")try{return u.getRandomValues(new Uint32Array(1))[0]}catch(o){}if(typeof u.randomBytes=="function")try{return u.randomBytes(4).readInt32LE()}catch(o){}}throw new Error("Native crypto module could not be used to get secure random number.")},w=Object.create||function(){function o(){}return function(t){var S;return o.prototype=t,S=new o,o.prototype=null,S}}(),p={},s=p.lib={},l=s.Base=function(){return{extend:function(o){var t=w(this);return o&&t.mixIn(o),(!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 o=this.extend();return o.init.apply(o,arguments),o},init:function(){},mixIn:function(o){for(var t in o)o.hasOwnProperty(t)&&(this[t]=o[t]);o.hasOwnProperty("toString")&&(this.toString=o.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=s.WordArray=l.extend({init:function(o,t){o=this.words=o||[],t!=D?this.sigBytes=t:this.sigBytes=o.length*4},toString:function(o){return(o||h).stringify(this)},concat:function(o){var t=this.words,S=o.words,_=this.sigBytes,i=o.sigBytes;if(this.clamp(),_%4)for(var P=0;P<i;P++){var O=S[P>>>2]>>>24-P%4*8&255;t[_+P>>>2]|=O<<24-(_+P)%4*8}else for(var x=0;x<i;x+=4)t[_+x>>>2]=S[x>>>2];return this.sigBytes+=i,this},clamp:function(){var o=this.words,t=this.sigBytes;o[t>>>2]&=4294967295<<32-t%4*8,o.length=C.ceil(t/4)},clone:function(){var o=l.clone.call(this);return o.words=this.words.slice(0),o},random:function(o){for(var t=[],S=0;S<o;S+=4)t.push(m());return new a.init(t,o)}}),d=p.enc={},h=d.Hex={stringify:function(o){for(var t=o.words,S=o.sigBytes,_=[],i=0;i<S;i++){var P=t[i>>>2]>>>24-i%4*8&255;_.push((P>>>4).toString(16)),_.push((P&15).toString(16))}return _.join("")},parse:function(o){for(var t=o.length,S=[],_=0;_<t;_+=2)S[_>>>3]|=parseInt(o.substr(_,2),16)<<24-_%8*4;return new a.init(S,t/2)}},c=d.Latin1={stringify:function(o){for(var t=o.words,S=o.sigBytes,_=[],i=0;i<S;i++){var P=t[i>>>2]>>>24-i%4*8&255;_.push(String.fromCharCode(P))}return _.join("")},parse:function(o){for(var t=o.length,S=[],_=0;_<t;_++)S[_>>>2]|=(o.charCodeAt(_)&255)<<24-_%4*8;return new a.init(S,t)}},v=d.Utf8={stringify:function(o){try{return decodeURIComponent(escape(c.stringify(o)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(o){return c.parse(unescape(encodeURIComponent(o)))}},g=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(o){typeof o=="string"&&(o=v.parse(o)),this._data.concat(o),this._nDataBytes+=o.sigBytes},_process:function(o){var t,S=this._data,_=S.words,i=S.sigBytes,P=this.blockSize,O=P*4,x=i/O;o?x=C.ceil(x):x=C.max((x|0)-this._minBufferSize,0);var b=x*P,y=C.min(b*4,i);if(b){for(var T=0;T<b;T+=P)this._doProcessBlock(_,T);t=_.splice(0,b),S.sigBytes-=y}return new a.init(t,y)},clone:function(){var o=l.clone.call(this);return o._data=this._data.clone(),o},_minBufferSize:0}),E=s.Hasher=g.extend({cfg:l.extend(),init:function(o){this.cfg=this.cfg.extend(o),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(o){return this._append(o),this._process(),this},finalize:function(o){o&&this._append(o);var t=this._doFinalize();return t},blockSize:512/32,_createHelper:function(o){return function(t,S){return new o.init(S).finalize(t)}},_createHmacHelper:function(o){return function(t,S){return new n.HMAC.init(o,S).finalize(t)}}}),n=p.algo={};return p}(Math);return f})}).call(this,I("IyRk"))},K3mO:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("3y9D"),I("WYAk"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.Base,u=C.WordArray,m=f.algo,w=m.MD5,p=m.EvpKDF=D.extend({cfg:D.extend({keySize:128/32,hasher:w,iterations:1}),init:function(s){this.cfg=this.cfg.extend(s)},compute:function(s,l){for(var a,d=this.cfg,h=d.hasher.create(),c=u.create(),v=c.words,g=d.keySize,E=d.iterations;v.length<g;){a&&h.update(a),a=h.update(s).finalize(l),h.reset();for(var n=1;n<E;n++)a=h.finalize(a),h.reset();c.concat(a)}return c.sigBytes=g*4,c}});f.EvpKDF=function(s,l,a){return p.create(a).compute(s,l)}}(),L.EvpKDF})},KXlV:function(j,J,I){j.exports=I.p+"static/job.65c6034f.png"},KeDT:function(j,J,I){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,J,I){"use strict";I.d(J,"a",function(){return i}),I.d(J,"c",function(){return x});var L=I("0Owb"),f=I("miYZ"),C=I("tsqr"),D=I("oBTY"),u=I("tJVT"),m=I("PpiC"),w=I("k1fw"),p=I("9og8"),s=I("DZo9"),l=I("8z0m"),a=I("WmNS"),d=I.n(a),h=I("cDcd"),c=I.n(h),v=I("ErOA"),g=I("NFKh"),E=I.n(g),n=I("7Cbv"),o=I("9kvl"),t=I("mxV5"),S=I.n(t),_=l.a.Dragger,i=function(T){var M="bf3c199c2470cb477d907b1e0917c17b",k="5183666c72eec9e4",N=E.a.enc.Utf8.parse(M),K=E.a.enc.Utf8.parse(k),z=E.a.AES.decrypt(T,N,{iv:K,mode:E.a.mode.CBC});return z.toString(E.a.enc.Utf8)},P,O=function(){var y=Object(p.a)(d.a.mark(function T(M){var k,N,K,z,B,H,U,W,G,ee,ie;return d.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return U=M.identifier,W=M.oldFilename,G=M.newFilename,_e.next=3,Object(v.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return ee=_e.sent,ee.data=JSON.parse(i(ee.data)),ie=new S.a({endpoint:ee==null||((k=ee.data)===null||k===void 0)?void 0:k.end_point,region:ee==null||((N=ee.data)===null||N===void 0)?void 0:N.region,accessKeyId:ee==null||((K=ee.data)===null||K===void 0)?void 0:K.access_key_id,accessKeySecret:ee==null||((z=ee.data)===null||z===void 0)?void 0:z.access_key_secret,bucket:ee==null||((B=ee.data)===null||B===void 0)?void 0:B.bucket,stsToken:ee==null||((H=ee.data)===null||H===void 0)?void 0:H.security_token}),_e.abrupt("return",new Promise(function(Ce,le){console.log(11111,"".concat(U,"/").concat(W),"".concat(U,"/").concat(G),ee.data),ie.copy("/".concat(U,"/").concat(W),"/".concat(U,"/").concat(G)).then(function(ye){console.log("\u62F7\u8D1D\u6210\u529F",ye)}).catch(function(ye){console.log(ye);debugger})}));case 7:case"end":return _e.stop()}},T)}));return function(M){return y.apply(this,arguments)}}(),x=function(){var y=Object(p.a)(d.a.mark(function T(M,k,N){var K,z,B,H,U,W,G,ee,ie,ce;return d.a.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return k.file_name=M.name,Ce.next=3,Object(v.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return G=Ce.sent,console.log("decrypt(res.data):",i(G.data)),G.data=JSON.parse(i(G.data)),ee=M.name.split("."),ee.pop(),ie=k.realFileName?ee:Object(n.a)(),ce=new S.a({endpoint:G==null||((K=G.data)===null||K===void 0)?void 0:K.end_point,region:G==null||((z=G.data)===null||z===void 0)?void 0:z.region,accessKeyId:G==null||((B=G.data)===null||B===void 0)?void 0:B.access_key_id,accessKeySecret:G==null||((H=G.data)===null||H===void 0)?void 0:H.access_key_secret,bucket:G==null||((U=G.data)===null||U===void 0)?void 0:U.bucket,stsToken:G==null||((W=G.data)===null||W===void 0)?void 0:W.security_token}),Ce.abrupt("return",new Promise(function(le,ye){var fe;ce.multipartUpload("".concat(ie),new Blob([M],{type:M.type}),Object(w.a)(Object(w.a)({timeout:200*1e3,partSize:102400},N),{},{callback:{url:G==null||((fe=G.data)===null||fe===void 0)?void 0:fe.callback_url,host:G==null?void 0:G.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(v.e)(k)}})).then(function(ne){var ae;M.response=(ae=ne.data)===null||ae===void 0?void 0:ae.data,le(ne==null?void 0:ne.data)}).catch(function(ne){ye(ne),console.log("err:",ne)})}));case 11:case"end":return Ce.stop()}},T)}));return function(M,k,N){return y.apply(this,arguments)}}(),b=function(T){var M=T.user,k=T.cancelUpload,N=Object(m.a)(T,["user","cancelUpload"]),K=Object(h.useState)([]),z=Object(u.a)(K,2),B=z[0],H=z[1],U=Object(h.useState)(),W=Object(u.a)(U,2),G=W[0],ee=W[1],ie={onRemove:function(Ce){H(Object(D.a)(B.filter(function(le){return le.name!==Ce.name}))),N.onChange(B.filter(function(le){return le.name!==Ce.name}))},disabled:N.disabled,multiple:!0,fileList:B==null?void 0:B.map(function(_e){return _e.file}),customRequest:function(){},beforeUpload:function(){var _e=Object(p.a)(d.a.mark(function le(ye){var fe;return d.a.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(fe=N.maxSize||1024*1024*1024*1,!B.filter(function(q){return q.name===ye.name}).length){ae.next=4;break}return C.b.info("".concat(ye.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ae.abrupt("return");case 4:if(!((ye==null?void 0:ye.size)>fe)){ae.next=7;break}return C.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(fe/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ae.abrupt("return",!1);case 7:return B.push({name:ye.name,file:ye}),H(Object(D.a)(B)),N.onChange(B),ae.abrupt("return",!1);case 11:case"end":return ae.stop()}},le)}));function Ce(le){return _e.apply(this,arguments)}return Ce}()},ce=function(){var _e=Object(p.a)(d.a.mark(function Ce(le,ye){var fe,ne,ae,q,se,Q,Z,be,re,Y;return d.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return ye.file_name=le.name,Z=le.name,$.next=4,Object(v.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(be=$.sent,be.data=JSON.parse(i(be.data)),!((be==null?void 0:be.status)!==0)){$.next=12;break}return B[B.findIndex(function(ve){return ve.name===Z})].status="error",B[B.findIndex(function(ve){return ve.name===Z})].file.status="error",N.onChange(B),C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),$.abrupt("return");case 12:return G=new S.a({endpoint:be==null||((fe=be.data)===null||fe===void 0)?void 0:fe.end_point,region:be==null||((ne=be.data)===null||ne===void 0)?void 0:ne.region,accessKeyId:be==null||((ae=be.data)===null||ae===void 0)?void 0:ae.access_key_id,accessKeySecret:be==null||((q=be.data)===null||q===void 0)?void 0:q.access_key_secret,bucket:be==null||((se=be.data)===null||se===void 0)?void 0:se.bucket,stsToken:be==null||((Q=be.data)===null||Q===void 0)?void 0:Q.security_token}),console.log(le,"file"),ee(G),re=le.name.split("."),re.pop(),Y=ye.realFileName?re:Object(n.a)(),$.abrupt("return",new Promise(function(ve,de){try{var xe;G.multipartUpload("".concat(N.identifier,"/").concat(Y).concat(Z.indexOf(".")>-1?"."+Z.split(".").pop():""),new Blob([le.file],{type:le.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Ve,Xe,at){try{console.log("\u8FDB\u5EA6",Ve,Xe,at);var it=B.findIndex(function(lt){return lt.name===Z});B[it].file.percent=Ve*100,B[it].tempCheckpoint=Xe,H(Object(D.a)(B))}catch(lt){}},checkpoint:B[B.findIndex(function(Ke){return Ke.name===Z})].tempCheckpoint,callback:{customValue:{id:Z+""},url:be==null||((xe=be.data)===null||xe===void 0)?void 0:xe.callback_url,host:be==null?void 0:be.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(v.e)(ye)}}).then(function(Ke){var Ve,Xe=B.findIndex(function(Te){return Te.name===Z}),at="done";if(((Ve=Ke.data)===null||Ve===void 0?void 0:Ve.status)===0){var it;le.response=(it=Ke.data)===null||it===void 0?void 0:it.data;var lt=B.findIndex(function(Te){return Te.name===Z});B[lt].status="done",B[lt].file.status="done"}else{var Me;C.b.warn((Me=Ke.data)===null||Me===void 0?void 0:Me.message),at="error"}B[Xe].status=at,B[Xe].file.status=at,N.onChange(B),ve(Ke==null?void 0:Ke.data)}).catch(function(Ke){B[B.findIndex(function(Ve){return Ve.name===Z})].status="error",B[B.findIndex(function(Ve){return Ve.name===Z})].file.status="error",C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),H(Object(D.a)(B)),N.onChange(B),de(Ke),console.log("err:",Ke)})}catch(Ke){}}));case 19:case"end":return $.stop()}},Ce)}));return function(le,ye){return _e.apply(this,arguments)}}();return Object(h.useEffect)(function(){B.every(function(_e){return _e==="done"||_e==="error"})&&N.onComplete(B)},[B]),Object(h.useEffect)(function(){if(k){var _e;(_e=G)===null||_e===void 0||_e.cancel()}},[k]),Object(h.useEffect)(function(){N.uploading&&B.map(function(){var _e=Object(p.a)(d.a.mark(function Ce(le){var ye,fe;return d.a.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(!((!le.status||le.status==="error")&&!k)){ae.next=6;break}return le.status="uploading",le.file.status="uploading",ae.next=5,ce(le,{login:M==null||((ye=M.userInfo)===null||ye===void 0)?void 0:ye.login,container_type:N.container_type,container_id:N.container_id,description:N.description,realFileName:N.realFileName});case 5:fe=ae.sent;case 6:case"end":return ae.stop()}},Ce)}));return function(Ce){return _e.apply(this,arguments)}}())},[N.uploading]),c.a.createElement(_,Object(L.a)({},ie,{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"))};J.b=Object(o.a)(function(y){var T=y.loading,M=y.globalSetting,k=y.user;return{globalSetting:M,loading:T.models.competitions,user:k}})(b)},KmYQ:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("OLod"))})(this,function(L){return L.pad.ZeroPadding={pad:function(f,C){var D=C*4;f.clamp(),f.sigBytes+=D-(f.sigBytes%D||D)},unpad:function(f){for(var C=f.words,D=f.sigBytes-1,D=f.sigBytes-1;D>=0;D--)if(C[D>>>2]>>>24-D%4*8&255){f.sigBytes=D+1;break}}},L.pad.ZeroPadding})},LdHM:function(j,J,I){"use strict";I.d(J,"b",function(){return t}),I.d(J,"a",function(){return _});var L=I("1OyB"),f=I("vuIU"),C=I("Ji7U"),D=I("LK+K"),u=I("cDcd"),m=I("rePB"),w=I("Ff2n"),p=I("ODXe"),s=I("4IlW"),l=I("bX4T"),a=I("YrtM"),d=I("TSYQ"),h=I.n(d),c=I("+nKL"),v=I("8OUc"),g=function(G,ee){var ie=G.prefixCls,ce=G.id,_e=G.flattenOptions,Ce=G.childrenAsData,le=G.values,ye=G.searchValue,fe=G.multiple,ne=G.defaultActiveFirstOption,ae=G.height,q=G.itemHeight,se=G.notFoundContent,Q=G.open,Z=G.menuItemSelectedIcon,be=G.virtual,re=G.onSelect,Y=G.onToggleOpen,X=G.onActiveValue,$=G.onScroll,ve=G.onMouseEnter,de="".concat(ie,"-item"),xe=Object(a.a)(function(){return _e},[Q,_e],function(rt,ke){return ke[0]&&rt[1]!==ke[1]}),Ke=u.useRef(null),Ve=function(ke){ke.preventDefault()},Xe=function(ke){Ke.current&&Ke.current.scrollTo({index:ke})},at=function(ke){for(var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Re=xe.length,pe=0;pe<Re;pe+=1){var Ee=(ke+pe*Oe+Re)%Re,we=xe[Ee],De=we.group,Ie=we.data;if(!De&&!Ie.disabled)return Ee}return-1},it=u.useState(function(){return at(0)}),lt=Object(p.a)(it,2),Me=lt[0],Te=lt[1],Ye=function(ke){Te(ke);var Oe=xe[ke];if(!Oe){X(null,-1);return}X(Oe.data.value,ke)};u.useEffect(function(){Ye(ne!==!1?at(0):-1)},[xe.length,ye]),u.useEffect(function(){var rt=setTimeout(function(){if(!fe&&Q&&le.size===1){var ke=Array.from(le)[0],Oe=xe.findIndex(function(Re){var pe=Re.data;return pe.value===ke});Ye(Oe),Xe(Oe)}});return function(){return clearTimeout(rt)}},[Q]);var ot=function(ke){ke!==void 0&&re(ke,{selected:!le.has(ke)}),fe||Y(!1)};if(u.useImperativeHandle(ee,function(){return{onKeyDown:function(ke){var Oe=ke.which;switch(Oe){case s.a.UP:case s.a.DOWN:{var Re=0;if(Oe===s.a.UP?Re=-1:Oe===s.a.DOWN&&(Re=1),Re!==0){var pe=at(Me+Re,Re);Xe(pe),Ye(pe)}break}case s.a.ENTER:{var Ee=xe[Me];Ee&&!Ee.data.disabled?ot(Ee.data.value):ot(void 0),Q&&ke.preventDefault();break}case s.a.ESC:Y(!1)}},onKeyUp:function(){},scrollTo:function(ke){Xe(ke)}}}),xe.length===0)return u.createElement("div",{role:"listbox",id:"".concat(ce,"_list"),className:"".concat(de,"-empty"),onMouseDown:Ve},se);function ze(rt){var ke=xe[rt];if(!ke)return null;var Oe=ke.data||{},Re=Oe.value,pe=Oe.label,Ee=Oe.children,we=Object(l.a)(Oe,!0),De=Ce?Ee:pe;return ke?u.createElement("div",Object.assign({"aria-label":typeof De=="string"?De:null},we,{key:rt,role:"option",id:"".concat(ce,"_list_").concat(rt),"aria-selected":le.has(Re)}),Re):null}return u.createElement(u.Fragment,null,u.createElement("div",{role:"listbox",id:"".concat(ce,"_list"),style:{height:0,width:0,overflow:"hidden"}},ze(Me-1),ze(Me),ze(Me+1)),u.createElement(c.a,{itemKey:"key",ref:Ke,data:xe,height:ae,itemHeight:q,fullHeight:!1,onMouseDown:Ve,onScroll:$,virtual:be,onMouseEnter:ve},function(rt,ke){var Oe,Re=rt.group,pe=rt.groupOption,Ee=rt.data,we=Ee.label,De=Ee.key;if(Re)return u.createElement("div",{className:h()(de,"".concat(de,"-group"))},we!==void 0?we:De);var Ie=Ee.disabled,$e=Ee.value,qe=Ee.title,tt=Ee.children,xt=Ee.style,gt=Ee.className,sr=Object(w.a)(Ee,["disabled","value","title","children","style","className"]),tr=le.has($e),St="".concat(de,"-option"),Nr=h()(de,St,gt,(Oe={},Object(m.a)(Oe,"".concat(St,"-grouped"),pe),Object(m.a)(Oe,"".concat(St,"-active"),Me===ke&&!Ie),Object(m.a)(Oe,"".concat(St,"-disabled"),Ie),Object(m.a)(Oe,"".concat(St,"-selected"),tr),Oe)),Ir=Ce?tt:we,Fr=!Z||typeof Z=="function"||tr;return u.createElement("div",Object.assign({},sr,{"aria-selected":tr,className:Nr,title:qe,onMouseMove:function(){if(Me===ke||Ie)return;Ye(ke)},onClick:function(){Ie||ot($e)},style:xt}),u.createElement("div",{className:"".concat(St,"-content")},Ir||$e),u.isValidElement(Z)||tr,Fr&&u.createElement(v.a,{className:"".concat(de,"-option-state"),customizeIcon:Z,customizeIconProps:{isSelected:tr}},tr?"\u2713":null))}))},E=u.forwardRef(g);E.displayName="OptionList";var n=E,o=function(){return null};o.isSelectOption=!0;var t=o,S=function(){return null};S.isSelectOptGroup=!0;var _=S,i=I("VTBJ"),P=I("Zm9Q");function O(W){var G=W.key,ee=W.props,ie=ee.children,ce=ee.value,_e=Object(w.a)(ee,["children","value"]);return Object(i.a)({key:G,value:ce!==void 0?ce:G,children:ie},_e)}function x(W){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(P.a)(W).map(function(ee,ie){if(!u.isValidElement(ee)||!ee.type)return null;var ce=ee.type.isSelectOptGroup,_e=ee.key,Ce=ee.props,le=Ce.children,ye=Object(w.a)(Ce,["children"]);return G||!ce?O(ee):Object(i.a)(Object(i.a)({key:"__RC_SELECT_GRP__".concat(_e===null?ie:_e,"__"),label:_e},ye),{},{options:x(le)})}).filter(function(ee){return ee})}var b=I("2Qr1"),y=I("qNPg"),T=I("U8pU"),M=I("Kwbf"),k=I("WKfj");function N(W){var G=W.mode,ee=W.options,ie=W.children,ce=W.backfill,_e=W.allowClear,Ce=W.placeholder,le=W.getInputElement,ye=W.showSearch,fe=W.onSearch,ne=W.defaultOpen,ae=W.autoFocus,q=W.labelInValue,se=W.value,Q=W.inputValue,Z=W.optionLabelProp,be=G==="multiple"||G==="tags",re=ye!==void 0?ye:be||G==="combobox",Y=ee||x(ie);if(Object(M.a)(G!=="tags"||Y.every(function(de){return!de.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),G==="tags"||G==="combobox"){var X=Y.some(function(de){return de.options?de.options.some(function(xe){return typeof("value"in xe?xe.value:xe.key)=="number"}):typeof("value"in de?de.value:de.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"||!ce,"`backfill` only works with `combobox` mode."),Object(M.a)(G==="combobox"||!le,"`getInputElement` only work with `combobox` mode."),Object(M.b)(G!=="combobox"||!le||!_e||!Ce,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),fe&&!re&&G!=="combobox"&&G!=="tags"&&Object(M.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(M.b)(!ne||ae,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),se!=null){var $=Object(k.d)(se);Object(M.a)(!q||$.every(function(de){return Object(T.a)(de)==="object"&&("key"in de||"value"in de)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(M.a)(!be||Array.isArray(se),"`value` should be array when `mode` is `multiple` or `tags`")}if(ie){var ve=null;Object(P.a)(ie).some(function(de){if(!u.isValidElement(de)||!de.type)return!1;var xe=de.type;if(xe.isSelectOption)return!1;if(xe.isSelectOptGroup){var Ke=Object(P.a)(de.props.children).every(function(Ve){return!u.isValidElement(Ve)||!de.type||Ve.type.isSelectOption?!0:(ve=Ve.type,!1)});return!Ke}return ve=xe,!0}),ve&&Object(M.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ve.displayName||ve.name||ve,"`.")),Object(M.a)(Q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var K=N,z=Object(y.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:x,flattenOptions:b.d,getLabeledValue:b.e,filterOptions:b.b,isValueDisabled:b.g,findValueOption:b.c,warningProps:K,fillOptionsWithMissingValue:b.a}),B=function(W){Object(C.a)(ee,W);var G=Object(D.a)(ee);function ee(){var ie;return Object(L.a)(this,ee),ie=G.apply(this,arguments),ie.selectRef=u.createRef(),ie.focus=function(){ie.selectRef.current.focus()},ie.blur=function(){ie.selectRef.current.blur()},ie}return Object(f.a)(ee,[{key:"render",value:function(){return u.createElement(z,Object.assign({ref:this.selectRef},this.props))}}]),ee}(u.Component);B.Option=t,B.OptGroup=_;var H=B,U=J.c=H},M8RZ:function(j,J,I){"use strict";I.d(J,"a",function(){return s});var L=I("fWQN"),f=I("mtLc"),C=I("yKVA"),D=I("879j"),u=I("cDcd"),m=I.n(u),w=I("faye"),p=I.n(w),s=function(l){Object(C.a)(d,l);var a=Object(D.a)(d);function d(h){var c;Object(L.a)(this,d),c=a.call(this,h);var v=window.document;return c.node=v.createElement("div"),v.body.appendChild(c.node),c}return Object(f.a)(d,[{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)}}]),d}(m.a.Component)},MlIO:function(j,J,I){(function(L,f){j.exports=J=f(I("Ib8C"))})(this,function(L){return function(f){var C=L,D=C.lib,u=D.Base,m=D.WordArray,w=C.x64={},p=w.Word=u.extend({init:function(l,a){this.high=l,this.low=a}}),s=w.WordArray=u.extend({init:function(l,a){l=this.words=l||[],a!=f?this.sigBytes=a:this.sigBytes=l.length*8},toX32:function(){for(var l=this.words,a=l.length,d=[],h=0;h<a;h++){var c=l[h];d.push(c.high),d.push(c.low)}return m.create(d,this.sigBytes)},clone:function(){for(var l=u.clone.call(this),a=l.words=this.words.slice(0),d=a.length,h=0;h<d;h++)a[h]=a[h].clone();return l}})}(),L})},NFKh:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("MlIO"),I("F+F2"),I("qM6L"),I("ETIr"),I("wbyO"),I("cv67"),I("3y9D"),I("lPiR"),I("GRuw"),I("1uat"),I("uGsb"),I("5hvy"),I("ELcG"),I("WYAk"),I("e7zE"),I("K3mO"),I("OLod"),I("ALsQ"),I("9OqN"),I("qu8F"),I("S6kV"),I("gb/T"),I("qBft"),I("oRuE"),I("jO9C"),I("KmYQ"),I("uGxW"),I("bQjk"),I("wZgz"),I("pA7S"),I("w7YG"),I("E4JC"),I("PVpz"))})(this,function(L){return L})},NLgs:function(j,J,I){"use strict";I.d(J,"e",function(){return t}),I.d(J,"f",function(){return S}),I.d(J,"d",function(){return i}),I.d(J,"c",function(){return P}),I.d(J,"a",function(){return O}),I.d(J,"b",function(){return x});var L=I("miYZ"),f=I("tsqr"),C=I("9og8"),D=I("2qtc"),u=I("kLXV"),m=I("WmNS"),w=I.n(m),p=I("cDcd"),s=I.n(p),l=I("9kvl"),a=I("xKgJ"),d=I("1vsH"),h=I("RCxd"),c=I("mOS8"),v=I.n(c),g=I("1ZF9"),E=I.n(g),n=I("NoGO"),o=I.n(n),t=function(y){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(S(y)&&_(T))},S=function(y){return Object(a.p)()?!0:(y({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},_=function(){var y,T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,M=Object(l.c)()._store.getState(),k=M.user;return(y=k.userInfo)!==null&&y!==void 0&&y.profile_completed?!0:(u.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:T?"\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)},i=function(){var y,T=Object(l.c)()._store.getState(),M=T.user;return(y=M.userInfo)!==null&&y!==void 0&&y.professional_certification?!0:(u.a.confirm({title:"\u63D0\u793A",centered:!0,content:s.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(d.U)("/account/certification")}}),!1)},P=function(){return Object(a.a)()?!0:(u.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:s.a.createElement("div",{className:"tc",style:{marginLeft:-38}},s.a.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),s.a.createElement("img",{src:o.a,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},O=function(y,T){return y?!0:(u.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:s.a.createElement("div",null,s.a.createElement("p",null,T||"\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"),s.a.createElement("div",{style:{marginLeft:"110px"}},s.a.createElement("img",{src:E.a,width:200}),s.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(d.U)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},x=function(y){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",M=Object(l.c)()._store.getState(),k=M.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?(u.a.info({centered:!0,icon:s.a.createElement(h.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:s.a.createElement("div",{className:"tc",style:{marginLeft:-38}},s.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},s.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",T,"\u3002"),s.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),s.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:v.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(k==null?void 0:k.shixun_status)===2?(u.a.confirm({centered:!0,icon:s.a.createElement(h.a,null),title:"\u63D0\u793A",content:s.a.createElement("div",null,s.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",T,"\u3002"),s.a.createElement("br",null),s.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(){u.a.confirm({width:440,centered:!0,icon:s.a.createElement(h.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 K=Object(C.a)(w.a.mark(function B(){var H;return w.a.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return W.next=2,y({type:"shixunsDetail/cancelRelease",payload:{id:k==null?void 0:k.identifier}});case 2:H=W.sent,H.status!==401&&(f.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),y({type:"shixunsDetail/getShixunsDetail",payload:{id:k==null?void 0:k.identifier}}),y({type:"practiceSetting/getCommonData",payload:{id:k==null?void 0:k.identifier}}));case 4:case"end":return W.stop()}},B)}));function z(){return K.apply(this,arguments)}return z}()})}}),!0):!1}},NnUe:function(j,J,I){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"}},NoGO:function(j,J,I){j.exports=I.p+"static/newqrcode.9bae6615.png"},NvD2:function(j,J,I){"use strict";I.d(J,"a",function(){return m});var L=I("Kwbf");function f(w,p){var s=new Set;return w.forEach(function(l){p.has(l)||s.add(l)}),s}function C(w){var p=w||{},s=p.disabled,l=p.disableCheckbox,a=p.checkable;return!!(s||l)||a===!1}function D(w,p,s,l){for(var a=new Set(w),d=new Set,h=0;h<=s;h+=1){var c=p.get(h)||new Set;c.forEach(function(n){var o=n.key,t=n.node,S=n.children,_=S===void 0?[]:S;a.has(o)&&!l(t)&&_.filter(function(i){return!l(i.node)}).forEach(function(i){a.add(i.key)})})}for(var v=new Set,g=s;g>=0;g-=1){var E=p.get(g)||new Set;E.forEach(function(n){var o=n.parent,t=n.node;if(l(t)||!n.parent||v.has(n.parent.key))return;if(l(n.parent.node)){v.add(o.key);return}var S=!0,_=!1;(o.children||[]).filter(function(i){return!l(i.node)}).forEach(function(i){var P=i.key,O=a.has(P);S&&!O&&(S=!1),!_&&(O||d.has(P))&&(_=!0)}),S&&a.add(o.key),_&&d.add(o.key),v.add(o.key)})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(f(d,a))}}function u(w,p,s,l,a){for(var d=new Set(w),h=new Set(p),c=0;c<=l;c+=1){var v=s.get(c)||new Set;v.forEach(function(o){var t=o.key,S=o.node,_=o.children,i=_===void 0?[]:_;!d.has(t)&&!h.has(t)&&!a(S)&&i.filter(function(P){return!a(P.node)}).forEach(function(P){d.delete(P.key)})})}h=new Set;for(var g=new Set,E=l;E>=0;E-=1){var n=s.get(E)||new Set;n.forEach(function(o){var t=o.parent,S=o.node;if(a(S)||!o.parent||g.has(o.parent.key))return;if(a(o.parent.node)){g.add(t.key);return}var _=!0,i=!1;(t.children||[]).filter(function(P){return!a(P.node)}).forEach(function(P){var O=P.key,x=d.has(O);_&&!x&&(_=!1),!i&&(x||h.has(O))&&(i=!0)}),_||d.delete(t.key),i&&h.add(t.key),g.add(t.key)})}return{checkedKeys:Array.from(d),halfCheckedKeys:Array.from(f(h,d))}}function m(w,p,s,l){var a=[],d;l?d=l:d=C;var h=new Set(w.filter(function(E){var n=!!s[E];return n||a.push(E),n})),c=new Map,v=0;Object.keys(s).forEach(function(E){var n=s[E],o=n.level,t=c.get(o);t||(t=new Set,c.set(o,t)),t.add(n),v=Math.max(v,o)}),Object(L.a)(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map(function(E){return"'".concat(E,"'")}).join(", ")));var g;return p===!0?g=D(h,c,v,d):g=u(h,p.halfCheckedKeys,c,v,d),g}},OLod:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("K3mO"))})(this,function(L){L.lib.Cipher||function(f){var C=L,D=C.lib,u=D.Base,m=D.WordArray,w=D.BufferedBlockAlgorithm,p=C.enc,s=p.Utf8,l=p.Base64,a=C.algo,d=a.EvpKDF,h=D.Cipher=w.extend({cfg:u.extend(),createEncryptor:function(y,T){return this.create(this._ENC_XFORM_MODE,y,T)},createDecryptor:function(y,T){return this.create(this._DEC_XFORM_MODE,y,T)},init:function(y,T,M){this.cfg=this.cfg.extend(M),this._xformMode=y,this._key=T,this.reset()},reset:function(){w.reset.call(this),this._doReset()},process:function(y){return this._append(y),this._process()},finalize:function(y){y&&this._append(y);var T=this._doFinalize();return T},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function y(T){return typeof T=="string"?b:P}return function(T){return{encrypt:function(M,k,N){return y(k).encrypt(T,M,k,N)},decrypt:function(M,k,N){return y(k).decrypt(T,M,k,N)}}}}()}),c=D.StreamCipher=h.extend({_doFinalize:function(){var y=this._process(!0);return y},blockSize:1}),v=C.mode={},g=D.BlockCipherMode=u.extend({createEncryptor:function(y,T){return this.Encryptor.create(y,T)},createDecryptor:function(y,T){return this.Decryptor.create(y,T)},init:function(y,T){this._cipher=y,this._iv=T}}),E=v.CBC=function(){var y=g.extend();y.Encryptor=y.extend({processBlock:function(M,k){var N=this._cipher,K=N.blockSize;T.call(this,M,k,K),N.encryptBlock(M,k),this._prevBlock=M.slice(k,k+K)}}),y.Decryptor=y.extend({processBlock:function(M,k){var N=this._cipher,K=N.blockSize,z=M.slice(k,k+K);N.decryptBlock(M,k),T.call(this,M,k,K),this._prevBlock=z}});function T(M,k,N){var K,z=this._iv;z?(K=z,this._iv=f):K=this._prevBlock;for(var B=0;B<N;B++)M[k+B]^=K[B]}return y}(),n=C.pad={},o=n.Pkcs7={pad:function(y,T){for(var M=T*4,k=M-y.sigBytes%M,N=k<<24|k<<16|k<<8|k,K=[],z=0;z<k;z+=4)K.push(N);var B=m.create(K,k);y.concat(B)},unpad:function(y){var T=y.words[y.sigBytes-1>>>2]&255;y.sigBytes-=T}},t=D.BlockCipher=h.extend({cfg:h.cfg.extend({mode:E,padding:o}),reset:function(){var y;h.reset.call(this);var T=this.cfg,M=T.iv,k=T.mode;this._xformMode==this._ENC_XFORM_MODE?y=k.createEncryptor:(y=k.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==y?this._mode.init(this,M&&M.words):(this._mode=y.call(k,this,M&&M.words),this._mode.__creator=y)},_doProcessBlock:function(y,T){this._mode.processBlock(y,T)},_doFinalize:function(){var y,T=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(T.pad(this._data,this.blockSize),y=this._process(!0)):(y=this._process(!0),T.unpad(y)),y},blockSize:128/32}),S=D.CipherParams=u.extend({init:function(y){this.mixIn(y)},toString:function(y){return(y||this.formatter).stringify(this)}}),_=C.format={},i=_.OpenSSL={stringify:function(y){var T,M=y.ciphertext,k=y.salt;return k?T=m.create([1398893684,1701076831]).concat(k).concat(M):T=M,T.toString(l)},parse:function(y){var T,M=l.parse(y),k=M.words;return k[0]==1398893684&&k[1]==1701076831&&(T=m.create(k.slice(2,4)),k.splice(0,4),M.sigBytes-=16),S.create({ciphertext:M,salt:T})}},P=D.SerializableCipher=u.extend({cfg:u.extend({format:i}),encrypt:function(y,T,M,k){k=this.cfg.extend(k);var N=y.createEncryptor(M,k),K=N.finalize(T),z=N.cfg;return S.create({ciphertext:K,key:M,iv:z.iv,algorithm:y,mode:z.mode,padding:z.padding,blockSize:y.blockSize,formatter:k.format})},decrypt:function(y,T,M,k){k=this.cfg.extend(k),T=this._parse(T,k.format);var N=y.createDecryptor(M,k).finalize(T.ciphertext);return N},_parse:function(y,T){return typeof y=="string"?T.parse(y,this):y}}),O=C.kdf={},x=O.OpenSSL={execute:function(y,T,M,k){k||(k=m.random(64/8));var N=d.create({keySize:T+M}).compute(y,k),K=m.create(N.words.slice(T),M*4);return N.sigBytes=T*4,S.create({key:N,iv:K,salt:k})}},b=D.PasswordBasedCipher=P.extend({cfg:P.cfg.extend({kdf:x}),encrypt:function(y,T,M,k){k=this.cfg.extend(k);var N=k.kdf.execute(M,y.keySize,y.ivSize);k.iv=N.iv;var K=P.encrypt.call(this,y,T,N.key,k);return K.mixIn(N),K},decrypt:function(y,T,M,k){k=this.cfg.extend(k),T=this._parse(T,k.format);var N=k.kdf.execute(M,y.keySize,y.ivSize,T.salt);k.iv=N.iv;var K=P.decrypt.call(this,y,T,N.key,k);return K}})}()})},OZM5:function(j,J,I){"use strict";I.d(J,"b",function(){return l}),I.d(J,"a",function(){return a}),I.d(J,"k",function(){return d}),I.d(J,"h",function(){return h}),I.d(J,"i",function(){return c}),I.d(J,"g",function(){return v}),I.d(J,"c",function(){return g}),I.d(J,"d",function(){return E}),I.d(J,"j",function(){return t}),I.d(J,"e",function(){return S}),I.d(J,"f",function(){return _});var L=I("KQm4"),f=I("U8pU"),C=I("Ff2n"),D=I("cDcd"),u=I.n(D),m=I("Kwbf"),w=I("WaYH"),p=.25,s=2;function l(i,P){var O=i.slice(),x=O.indexOf(P);return x>=0&&O.splice(x,1),O}function a(i,P){var O=i.slice();return O.indexOf(P)===-1&&O.push(P),O}function d(i){return i.split("-")}function h(i,P){return"".concat(i,"-").concat(P)}function c(i){return i&&i.type&&i.type.isTreeNode}function v(i,P){var O=[i],x=P[i];function b(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];y.forEach(function(T){var M=T.key,k=T.children;O.push(M),b(k)})}return b(x.children),O}function g(i,P){var O=i.clientY,x=P.selectHandle.getBoundingClientRect(),b=x.top,y=x.bottom,T=x.height,M=Math.max(T*p,s);return O<=b+M?-1:O>=y-M?1:0}function E(i,P){if(!i)return;var O=P.multiple;return O?i.slice():i.length?[i[0]]:i}var n=function(P){return P};function o(i,P){if(!i)return[];var O=P||{},x=O.processProps,b=x===void 0?n:x,y=Array.isArray(i)?i:[i];return y.map(function(T){var M=T.children,k=Object(C.a)(T,["children"]),N=o(M,P);return u.a.createElement(w.a,Object.assign({},b(k)),N)})}function t(i){if(!i)return null;var P;if(Array.isArray(i))P={checkedKeys:i,halfCheckedKeys:void 0};else if(Object(f.a)(i)==="object")P={checkedKeys:i.checked||void 0,halfCheckedKeys:i.halfChecked||void 0};else return Object(m.a)(!1,"`checkedKeys` is not an array or an object"),null;return P}function S(i,P){var O=new Set;function x(b){if(O.has(b))return;var y=P[b];if(!y)return;O.add(b);var T=y.parent,M=y.node;if(M.disabled)return;T&&x(T.key)}return(i||[]).forEach(function(b){x(b)}),Object(L.a)(O)}function _(i){var P={};return Object.keys(i).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(P[O]=i[O])}),P}},Ot1p:function(j,J,I){"use strict";var L=I("2qtc"),f=I("kLXV"),C=I("rAM+"),D=I("miYZ"),u=I("tsqr"),m=I("9og8"),w=I("tJVT"),p=I("jrin"),s=I("WmNS"),l=I.n(s),a=I("cDcd"),d=I.n(a),h=I("VrN/"),c=I.n(h),v=I("bdgK"),g=I("p77/"),E=I("Bd2K"),n=I("ELLl"),o=I("19Vz"),t=I("lZu9"),S=I("+NIl"),_=I("kSUc"),i=I("9Bee"),P=function(Ie){var $e=Ie.value,qe=$e===void 0?"":$e,tt=Ie.className,xt=Ie.showTextOnly,gt=Ie.showLines,sr=Ie.style,tr=sr===void 0?{}:sr,St=Object(a.useMemo)(function(){return""},[qe]);return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:St}}))},O=I("0Owb"),x=I("dejd"),b=I("C+DQ"),y=I("1vsH"),T=I("m3rI"),M=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function k(Ie){var $e=Ie.onActionCallback,qe=Ie.title,tt=Ie.icon,xt=Ie.actionName,gt=Ie.className,sr=gt===void 0?"":gt,tr=Ie.children;function St(){$e(xt)}return d.a.createElement("a",{title:qe,className:sr,onClick:St},d.a.createElement("i",{className:"md-iconfont ".concat(tt)}),tr)}var N=function(Ie){var $e=Ie.watch,qe=Ie.showNullButton,tt=Ie.onActionCallback,xt=Ie.fullScreen,gt=Ie.insertTemp,sr=Ie.hidetoolBar,tr=Ie.uuid,St=Ie.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(y.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(y.G)("_educoder_session"),"&key=").concat(tr,"&api=").concat(encodeURIComponent(T.a.PROXY_SERVER)));var Nr=[].concat(M,[{title:"".concat($e?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat($e?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!sr&&Nr.map(function(Ir,Fr){return d.a.createElement("li",{key:Fr},Ir.actionName?d.a.createElement(k,Object(O.a)({},Ir,{onActionCallback:tt})):d.a.createElement("span",{className:"v-line"}))}),qe?d.a.createElement("li",null,d.a.createElement(k,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:tt},d.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,gt&&d.a.createElement("li",null,d.a.createElement(k,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(gt),onActionCallback:tt},d.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(k,{icon:"".concat(xt?"icon-shrink":"icon-enlarge"),title:xt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:tt})))},K=I("M8RZ"),z=I("+L6B"),B=I("2/Rp"),H=I("y8nQ"),U=I("Vl3Y"),W=I("5NDa"),G=I("5rEg"),ee={labelCol:{span:4},wrapperCol:{span:20}},ie=function(Ie){var $e=Ie.callback,qe=Ie.onCancel;function tt(xt){$e(xt)}return d.a.createElement(U.a,Object(O.a)({},ee,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:tt}),d.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},d.a.createElement(G.a,null)),d.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},d.a.createElement(G.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),d.a.createElement(B.a,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},ce=I("7ahc"),_e=I("HmJG"),Ce=I("BjJ7"),le=U.a.useForm,ye={width:280,marginRight:10},fe={labelCol:{span:5},wrapperCol:{span:19}},ne=function(Ie){var $e=Ie.callback,qe=Ie.onCancel,tt=le(),xt=Object(w.a)(tt,1),gt=xt[0];function sr(Nr){$e(Nr)}function tr(Nr,Ir){if(Nr.status===-1){u.b.error(Nr.message);return}gt.setFieldsValue({src:"/api/attachments/".concat(Nr.id),type:Ir.type})}function St(Nr){var Ir=Nr.target.files[0];q(Ir,tr)}return d.a.createElement(U.a,Object(O.a)({form:gt},fe,{className:"upload-image-panel",onFinish:sr}),d.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},d.a.createElement(G.a,{style:ye})),d.a.createElement(ae,{onFileChange:St}))),d.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},d.a.createElement(G.a,{style:{width:264}})),d.a.createElement(U.a.Item,{style:{textAlign:"right"}},d.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),d.a.createElement(B.a,{type:"ghost",onClick:qe},"\u53D6\u6D88")))};function ae(Ie){var $e=Ie.onFileChange;return d.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",d.a.createElement("input",{type:"file",onChange:$e}))}function q(Ie,$e){if(!Ie)throw new String("\u6CA1\u6709\u6587\u4EF6");var qe=new FormData;qe.append("editormd-image-file",Ie),qe.append("file_param_name","editormd-image-file"),qe.append("byxhr","true");var tt=new window.XMLHttpRequest;tt.withCredentials=!0,tt.addEventListener("load",function(xt){$e(JSON.parse(xt.target.responseText),Ie)},!1),tt.addEventListener("error",function(xt){console.error(xt)},!1),tt.open("POST","".concat(Ce.a,"/api/attachments.json")),tt.send(qe)}var se=I("giR+"),Q=I("fyUT"),Z=I("7Kak"),be=I("9yH6"),re=be.a.Group,Y={margin:"0 8px"},X=function(Ie){var $e=Ie.callback,qe=Ie.onCancel;function tt(xt){$e(xt)}return d.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:tt},d.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},d.a.createElement("span",{style:Y},"\u5355\u5143\u683C\u6570\uFF1A"),d.a.createElement("span",{style:Y},"\u884C\u6570"),d.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},d.a.createElement(Q.a,null)),d.a.createElement("span",{style:Y},"\u5217\u6570"),d.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},d.a.createElement(Q.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},d.a.createElement("span",{style:Y},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),d.a.createElement(U.a.Item,{name:"align"},d.a.createElement(re,null,d.a.createElement(be.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(be.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(be.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(be.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),d.a.createElement(B.a,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},$=I("ErOA"),ve=I("7Cbv"),de="link",xe="upload-image",Ke="code-block",Ve="add-table",Xe="------------",at={default:Xe,left:":".concat(Xe),center:":".concat(Xe,":"),right:"".concat(Xe,":")},it=I("9VGf"),lt,Me;function Te(){}var Ye=0,ot=1e4,ze="\u2581",rt=`
|
|
|
**\u6A21\u677F\u6807\u9898**
|
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function ke(Ie){return/^\d+$/.test(Ie)?"".concat(Ie,"px"):Ie}var Oe=navigator.platform.toUpperCase().indexOf("MAC")>=0,Re=Oe?"Cmd":"Ctrl",pe=["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"],Ee=(lt={},Object(p.a)(lt,Re+"-B","bold"),Object(p.a)(lt,Re+"-I","italic"),lt),we=(Me={},Object(p.a)(Me,de,"\u6DFB\u52A0\u94FE\u63A5"),Object(p.a)(Me,Ke,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(p.a)(Me,xe,"\u6DFB\u52A0\u6587\u4EF6"),Object(p.a)(Me,Ve,"\u6DFB\u52A0\u8868\u683C"),Me),De=J.a=function(Ie){var $e=Ie.defaultValue,qe=$e===void 0?"":$e,tt=Ie.onChange,xt=Ie.width,gt=xt===void 0?"100%":xt,sr=Ie.height,tr=sr===void 0?400:sr,St=Ie.miniToolbar,Nr=St===void 0?!1:St,Ir=Ie.isFocus,Fr=Ir===void 0?!1:Ir,ln=Ie.watch,Cr=Ie.insertTemp,rn=Ie.mode,en=rn===void 0?"markdown":rn,Lr=Ie.id,un=Lr===void 0?"markdown-editor-id":Lr,yn=Ie.showResizeBar,Gn=yn===void 0?!1:yn,cn=Ie.noStorage,La=cn===void 0?!1:cn,Ha=Ie.showNullButton,bn=Ha===void 0?!1:Ha,qt=Ie.hidetoolBar,Xn=qt===void 0?!1:qt,Ea=Ie.fullScreen,Ln=Ea===void 0?!1:Ea,$r=Ie.onBlur,Pn=Ie.onCMBeforeChange,la=Ie.onFullScreen,fa=Ie.className,Lt=fa===void 0?"":fa,cr=Ie.disablePaste,ha=cr===void 0?!1:cr,xa=Ie.placeholder,Ma=xa===void 0?"":xa,pa=Ie.values,Mn=pa===void 0?"":pa,Er=Object(a.useState)(null),ta=Object(w.a)(Er,2),Rt=ta[0],Vn=ta[1],In=Object(a.useState)(qe),Ka=Object(w.a)(In,2),_a=Ka[0],Qn=Ka[1],Qa=Object(a.useState)(ln),Za=Object(w.a)(Qa,2),ra=Za[0],wn=Za[1],na=Object(a.useState)(Ln),Ia=Object(w.a)(na,2),ma=Ia[0],va=Ia[1],Pi=Object(a.useState)(""),Xa=Object(w.a)(Pi,2),Nn=Xa[0],za=Xa[1],Ei=Object(a.useState)(0),ka=Object(w.a)(Ei,2),aa=ka[0],oi=ka[1],pi=Object(a.useState)(tr),si=Object(w.a)(pi,2),mi=si[0],qa=si[1],wa=Object(a.useState)(!1),ei=Object(w.a)(wa,2),xi=ei[0],mt=ei[1],et=Object(a.useRef)(Object(ve.a)()),pt=Object(a.useRef)(!1),_t=Object(a.useRef)(),Ut=Object(a.useRef)(),Dt=Object(a.useRef)(),Gt=Object(a.useRef)(),It=Object(a.useRef)(),ut=function(){var ft=Object(m.a)(l.a.mark(function Et(){var ht,Ct;return l.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return nr.next=2,Object($.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:et.current}});case 2:Ct=nr.sent,Ct!=null&&(ht=Ct.attachments)!==null&&ht!==void 0&&ht.length&&(console.log("cm:",Rt,Ut),Ct.attachments.map(function(Kt){Kt.content_type.indexOf("image")>-1?Rt.replaceSelection(".concat(Kt.content_type,")")):Kt.content_type.indexOf("video")>-1?Rt.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Kt.content_type.indexOf("pdf")>-1?Rt.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Kt.id,"?type=").concat(Kt.content_type,'&disposition=inline" target="_blank">').concat(Kt.name,"</a>")):Rt.replaceSelection("[".concat(Kt.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Kt.id,"?type=").concat(Kt.content_type,")"))}));case 4:case"end":return nr.stop()}},Et)}));return function(){return ft.apply(this,arguments)}}();Object(a.useEffect)(function(){Qn(Mn),Rt==null||Rt.setValue(Mn)},[Mn]),Object(a.useEffect)(function(){la==null||la(ma)},[ma]),Object(a.useEffect)(function(){if(Ut.current){var ft=c.a.fromTextArea(Ut.current,{mode:en,lineNumbers:!Nr,lineWrapping:!0,value:qe,autoCloseTags:!0,autoCloseBrackets:!0});Fr&&ft.focus();function Et(ht,Ct){if(ha){Ct.preventDefault();return}var Ht=Ct.clipboardData;if(Ht){var nr=Ht.types.toString(),Kt=Ht.items;if(nr==="Files"||Ht.types.indexOf("Files")>-1){if(Ct.preventDefault(),en=="stex")return;try{var vr,Or=Kt[1];((vr=Kt[0])===null||vr===void 0?void 0:vr.kind)==="file"&&(Or=Kt[0]);var lr=Or.getAsFile(),Qe=lr.name.split(".").pop();q(lr,function(Mt){if(Mt.id){var Gr,Ur,ar;(lr==null||((Gr=lr.type)===null||Gr===void 0)?void 0:Gr.indexOf("image"))>-1?ft.replaceSelection(".concat(Mt.content_type,")")):(lr==null||((Ur=lr.type)===null||Ur===void 0)?void 0:Ur.indexOf("video"))>-1?ft.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Mt.id,'"></video>')):(lr==null||((ar=lr.type)===null||ar===void 0)?void 0:ar.indexOf("pdf"))>-1?ft.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Mt.id,"?type=").concat(lr.type,'&disposition=inline" target="_blank">').concat(lr.name,"</a>")):pe.includes(Qe)?ft.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Mt.id,'?type=office&disposition=inline" target="_blank">').concat(lr.name,"</a>")):ft.replaceSelection("[".concat(lr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Mt.id,"?type=").concat(Mt.content_type,")"))}else(Mt==null?void 0:Mt.status)===401&&(document.location.href="/user/login")})}catch(Mt){u.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return ft.on("paste",Et),ft.on("dragleave",function(ht,Ct){Dt.current.classList.remove("mouse-hover-md")}),ft.on("dragover",function(ht,Ct){Dt.current.classList.add("mouse-hover-md")}),ft.on("drop",function(ht,Ct){Dt.current.classList.add("mouse-hover-md");var Ht;if(Ht=Ct.dataTransfer.files,Ht.length>0){Ct.preventDefault(),Ct.stopPropagation();for(var nr=function(Or){var lr=Ht[Or],Qe=lr.name.split(".").pop();q(lr,function(Mt){if(Mt.id){var Gr,Ur,ar;(lr==null||((Gr=lr.type)===null||Gr===void 0)?void 0:Gr.indexOf("image"))>-1?ft.replaceSelection(".concat(Mt.content_type,")")):(lr==null||((Ur=lr.type)===null||Ur===void 0)?void 0:Ur.indexOf("video"))>-1?ft.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Mt.id,'"></video>')):(lr==null||((ar=lr.type)===null||ar===void 0)?void 0:ar.indexOf("pdf"))>-1?ft.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Mt.id,"?type=").concat(lr.type,'&disposition=inline" target="_blank">').concat(lr.name,"</a>")):pe.includes(Qe)?ft.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Mt.id,'?type=office&disposition=inline" target="_blank">').concat(lr.name,"</a>")):ft.replaceSelection("[".concat(lr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Mt.id,"?type=").concat(Mt.content_type,")"))}else(Mt==null?void 0:Mt.status)===401&&(document.location.href="/user/login")})},Kt=0;Kt<Ht.length;Kt++)nr(Kt)}}),Vn(ft),function(){ft.off("paste",Et)}}},[]);var yt=Object(a.useCallback)(function(){if(Dt.current)try{}catch(ft){console.log(ft,"---- to set md editor body height")}},[mi,Dt,ma]);Object(a.useEffect)(function(){function ft(){var ht=new v.default(function(Ct){var Ht=Object(C.a)(Ct),nr;try{for(Ht.s();!(nr=Ht.n()).done;){var Kt=nr.value;(Kt.target.offsetHeight>0||Kt.target.offsetWidth>0)&&(yt(),Rt.setSize("100%","100%"),Rt.refresh())}}catch(vr){Ht.e(vr)}finally{Ht.f()}});return ht.observe(Ut.current.parentElement),ht}if(Rt){var Et=ft();return function(){Et.unobserve(Ut.current.parentElement)}}},[Rt,yt]),Object(a.useEffect)(function(){if(Rt){for(var ft=[],Et=function(){var Kt=Ct[ht];Ht=Object(w.a)(Kt,2);var vr=Ht[0],Or=Ht[1],lr=Object(p.a)({},vr,function(){bt(Or)});ft.push(lr),Rt.addKeyMap(lr)},ht=0,Ct=Object.entries(Ee);ht<Ct.length;ht++){var Ht;Et()}return _t.current=setInterval(function(){pt.current&&ut()},4e3),function(){clearInterval(_t.current);var nr=Object(C.a)(ft),Kt;try{for(nr.s();!(Kt=nr.n()).done;){var vr=Kt.value;Rt.removeKeyMap(vr)}}catch(Or){nr.e(Or)}finally{nr.f()}}}},[Rt]),Object(a.useEffect)(function(){Ln!==ma&&va(Ln)},[Ln]),Object(it.a)(function(){if(!La&&aa>0){var ft=new Date().getTime(),Et=window.sessionStorage.getItem(un);ft>=aa+ot&&(!Et||Et!==_a)&&(window.sessionStorage.setItem(un,_a),mt(!0))}},ot),Object(a.useEffect)(function(){wn(ln)},[Rt,ln]),Object(a.useEffect)(function(){Rt&&(Fr&&Rt.focus())},[Rt,Fr]),Object(a.useEffect)(function(){if(ra&&Rt){var ft=Rt.getScrollerElement();function Et(ht){var Ct=ht.target;if(It.current){var Ht=Ct.scrollTop/Ct.scrollHeight;It.current.scrollTop=It.current.scrollHeight*Ht}}return ft.addEventListener("scroll",Et),function(){ft.removeEventListener("scroll",Et)}}},[Rt,ra]),Object(a.useEffect)(function(){if(Rt&&Pn){function ft(Et,ht){Pn(Et,ht)}return Rt.on("beforeChange",ft),function(){Rt.off("beforeChange",ft)}}},[Rt,Pn]),Object(a.useEffect)(function(){if(Rt&&$r){function ft(){$r(Rt.getValue())}return Rt.on("blur",ft),function(){Rt.off("blur",ft)}}},[Rt,$r]),Object(a.useEffect)(function(){if(Rt){function ft(Et){var ht=Et.getValue();Qn(ht),oi(new Date().getTime()),Et.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),tt&&tt(ht)}return Rt.on("change",ft),function(){Rt.off("change",ft)}}},[Rt,tt]),Object(a.useEffect)(function(){Rt&&(qe==null?(Rt.setValue(""),Qn("")):qe!==Rt.getValue()&&(Rt.setValue(qe),Qn(qe),Rt.setCursor(Rt.lineCount(),0)))},[Rt,qe]);var bt=Object(a.useCallback)(function(ft){var Et=Rt.getCursor(),ht=Rt.getSelection(),Ct=ht.split(`
|
|
|
`);switch(ft){case"bold":return Rt.replaceSelection("**"+ht+"**"),ht===""&&Rt.setCursor(Et.line,Et.ch+2),Rt.focus();case"italic":return Rt.replaceSelection("*"+ht+"*"),ht===""&&Rt.setCursor(Et.line,Et.ch+1),Rt.focus();case"code":return Rt.replaceSelection("`"+ht+"`"),ht===""&&Rt.setCursor(Et.line,Et.ch+1),Rt.focus();case"inline-latex":return Rt.replaceSelection("`$$"+ht+"$$`"),ht===""&&Rt.setCursor(Et.line,Et.ch+3),Rt.focus();case"latex":return Rt.replaceSelection("```latex\n"+ht+"\n```"),Rt.setCursor(Et.line+1,ht.length+1),Rt.focus();case"line-break":return Rt.replaceSelection(`<br/>
|
|
|
`),Rt.focus();case"list-ul":return ht===""?Rt.replaceSelection("- "+ht):Rt.replaceSelection(Ct.map(function(Ht){return Ht===""?"":"- ".concat(Ht)}).join(`
|
|
|
`)),Rt.focus();case"list-ol":return ht===""?Rt.replaceSelection("1. "+ht):Rt.replaceSelection(Ct.map(function(Ht,nr){return Ht===""?"":"".concat(nr+1,". ").concat(Ht)}).join(`
|
|
|
`)),Rt.focus();case"add-null-ch":return ht===""&&Rt.setCursor(Et.line,Et.ch+1),Rt.replaceSelection(ze),Rt.focus();case"inster-template-1":return ht===""&&Rt.setCursor(Et.line,Et.ch),Rt.replaceSelection(rt),Rt.focus();case"eraser":return Rt.setValue(""),Rt.focus();case"trigger-watch":return wn(!ra),Rt.focus();case"trigger-full-screen":return va(!ma),Rt.focus();case de:za(de);return;case Ke:za(Ke);return;case xe:za(xe);return;case Ve:za(Ve);return;default:throw new Error}},[Rt,ra,ma]),er=Object(a.useCallback)(function(ft){za("");switch(Nn){case de:var Et=ft.title,ht=ft.link;return Rt.replaceSelection("[".concat(Et,"](").concat(ht,")")),Rt.focus();case Ke:var Ct=ft.language,Ht=ft.content;return Rt.replaceSelection(["```"+Ct,Ht,"```"].join(`
|
|
|
`)),Rt.focus();case xe:var nr=ft.src,Kt=ft.alt;return Kt?Rt.replaceSelection(".concat(nr,' "').concat(Kt,'" )')):Rt.replaceSelection("")),Rt.focus();case Ve:for(var vr=ft.row,Or=ft.col,lr=ft.align,Qe=`
|
|
|
`,Mt=0;Mt<vr;Mt++){for(var Gr=[],Ur=[],ar=0;ar<Or;ar++)Mt===1&&Ur.push(at[lr]),Gr.push(" ");Mt===1&&(Qe+="| ".concat(Ur.join(" | "),` |
|
|
|
`)),Qe+="| ".concat(Gr.join(Or===1?"":" | "),` |
|
|
|
`)}return Rt.replaceSelection(Qe+`
|
|
|
`),Rt.focus();default:throw new Error}},[Rt,Nn]),Yt=Object(a.useMemo)(function(){switch(Nn){case de:return d.a.createElement(ie,{callback:er,onCancel:Wt});case Ke:return d.a.createElement(ce.b,{callback:er,onCancel:Wt});case xe:return d.a.createElement(ne,{callback:er,onCancel:Wt});case Ve:return d.a.createElement(X,{callback:er,onCancel:Wt});default:return null}},[Nn]);function Wt(){za("")}Object(a.useEffect)(function(){if(Gt.current){var ft=Gt.current,Et=!1,ht=0;function Ct(Kt){Et=!0,ht=Kt.pageY}function Ht(){Et=!1}function nr(Kt){if(Et){var vr=Kt.pageY-ht;vr<0&&(vr=0),vr>300&&(vr=300);var Or=tr+vr+"px";qa(Or)}}return ft.addEventListener("mousedown",Ct),document.addEventListener("mousemove",nr),document.addEventListener("mouseup",Ht),function(){ft.removeEventListener("mousedown",Ct),document.removeEventListener("mousemove",nr),document.removeEventListener("mouseup",Ht)}}},[Rt,Gt]),Object(a.useEffect)(function(){qa(tr)},[tr]);var jt=ke(gt),Xt=ke(mi),Qt={width:jt,height:Xt},Ze=Object(a.useMemo)(function(){if(aa){var ft=new Date(aa),Et=ft.getHours(),ht=ft.getMinutes(),Ct=ft.getSeconds();return Et=Et<10?"0"+Et:Et,ht=ht<10?"0"+ht:ht,Ct=Ct<10?"0"+Ct:Ct,"".concat(Et,":").concat(ht,":").concat(Ct)}return 0},[aa]);function mr(){window.sessionStorage.removeItem(un),mt(!1),oi(0)}function wr(){mt(!1),oi(0),Rt.setValue(window.sessionStorage.getItem(un))}function rr(ft,Et){var ht=Rt.getValue();ht=ht.replace(ft,Et),Qn(ht),Rt==null||Rt.setValue(ht)}return d.a.createElement(a.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Dt},d.a.createElement("div",{className:"markdown-editor-container ".concat(Lt," ").concat(ra?"on-preview":""," ").concat(Nr?"mini":""," ").concat(ma?"full-screen":""),style:Qt},d.a.createElement(N,{insertTemp:Cr,watch:ra,fullScreen:ma,showNullButton:bn,onActionCallback:bt,hidetoolBar:Xn,uuid:et.current,setOpenPhones:function(){pt.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:Ut,placeholder:Ma})),ra?d.a.createElement("div",{ref:It,className:"preview-container"},en==="stex"&&d.a.createElement(P,{value:_a}),en!=="stex"&&d.a.createElement(i.a,{edit:!0,value:_a,replaces:rr})):null))),Gn?d.a.createElement("a",{ref:Gt,className:"editor-resize"}):null,d.a.createElement(K.a,null,we[Nn]?d.a.createElement(f.a,{centered:!0,title:we[Nn],visible:!0,onCancel:Wt,footer:null,className:"markdown-popup-form"},Yt):null))}},PVpz:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.StreamCipher,u=f.algo,m=[],w=[],p=[],s=u.RabbitLegacy=D.extend({_doReset:function(){var a=this._key.words,d=this.cfg.iv,h=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 v=0;v<4;v++)l.call(this);for(var v=0;v<8;v++)c[v]^=h[v+4&7];if(d){var g=d.words,E=g[0],n=g[1],o=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,t=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,S=o>>>16|t&4294901760,_=t<<16|o&65535;c[0]^=o,c[1]^=S,c[2]^=t,c[3]^=_,c[4]^=o,c[5]^=S,c[6]^=t,c[7]^=_;for(var v=0;v<4;v++)l.call(this)}},_doProcessBlock:function(a,d){var h=this._X;l.call(this),m[0]=h[0]^h[5]>>>16^h[3]<<16,m[1]=h[2]^h[7]>>>16^h[5]<<16,m[2]=h[4]^h[1]>>>16^h[7]<<16,m[3]=h[6]^h[3]>>>16^h[1]<<16;for(var c=0;c<4;c++)m[c]=(m[c]<<8|m[c]>>>24)&16711935|(m[c]<<24|m[c]>>>8)&4278255360,a[d+c]^=m[c]},blockSize:128/32,ivSize:64/32});function l(){for(var a=this._X,d=this._C,h=0;h<8;h++)w[h]=d[h];d[0]=d[0]+1295307597+this._b|0,d[1]=d[1]+3545052371+(d[0]>>>0<w[0]>>>0?1:0)|0,d[2]=d[2]+886263092+(d[1]>>>0<w[1]>>>0?1:0)|0,d[3]=d[3]+1295307597+(d[2]>>>0<w[2]>>>0?1:0)|0,d[4]=d[4]+3545052371+(d[3]>>>0<w[3]>>>0?1:0)|0,d[5]=d[5]+886263092+(d[4]>>>0<w[4]>>>0?1:0)|0,d[6]=d[6]+1295307597+(d[5]>>>0<w[5]>>>0?1:0)|0,d[7]=d[7]+3545052371+(d[6]>>>0<w[6]>>>0?1:0)|0,this._b=d[7]>>>0<w[7]>>>0?1:0;for(var h=0;h<8;h++){var c=a[h]+d[h],v=c&65535,g=c>>>16,E=((v*v>>>17)+v*g>>>15)+g*g,n=((c&4294901760)*c|0)+((c&65535)*c|0);p[h]=E^n}a[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0,a[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0,a[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0,a[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0,a[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0,a[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0,a[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0,a[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}f.RabbitLegacy=D._createHelper(s)}(),L.RabbitLegacy})},RxwV:function(j,J,I){"use strict";var L=I("cDcd"),f=I("uciX"),C=I("2W6z"),D=I.n(C),u=I("4IlW"),m=I("uK0f"),w=I.n(m);function p(ye,fe){if(ye===fe)return!0;if(!ye||!fe)return!1;var ne=ye.length;if(fe.length!==ne)return!1;for(var ae=0;ae<ne;ae++)if(ye[ae]!==fe[ae])return!1;return!0}function s(ye){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s=function(ne){return typeof ne}:s=function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},s(ye)}function l(ye,fe){if(!(ye instanceof fe))throw new TypeError("Cannot call a class as a function")}function a(ye,fe){for(var ne=0;ne<fe.length;ne++){var ae=fe[ne];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(ye,ae.key,ae)}}function d(ye,fe,ne){return fe&&a(ye.prototype,fe),ne&&a(ye,ne),ye}function h(ye,fe){if(typeof fe!="function"&&fe!==null)throw new TypeError("Super expression must either be null or a function");ye.prototype=Object.create(fe&&fe.prototype,{constructor:{value:ye,writable:!0,configurable:!0}}),fe&&c(ye,fe)}function c(ye,fe){return c=Object.setPrototypeOf||function(ae,q){return ae.__proto__=q,ae},c(ye,fe)}function v(ye){var fe=n();return function(){var ne=o(ye),ae;if(fe){var q=o(this).constructor;ae=Reflect.construct(ne,arguments,q)}else ae=ne.apply(this,arguments);return g(this,ae)}}function g(ye,fe){return fe&&(s(fe)==="object"||typeof fe=="function")?fe:E(ye)}function E(ye){if(ye===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ye}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(ye){return!1}}function o(ye){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(ne){return ne.__proto__||Object.getPrototypeOf(ne)},o(ye)}var t=function(){var ye=function(fe){h(ae,fe);var ne=v(ae);function ae(){var q;return l(this,ae),q=ne.apply(this,arguments),q.menuItems={},q.saveMenuItem=function(se){return function(Q){q.menuItems[se]=Q}},q}return d(ae,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(se){!se.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(se){var Q=this.props,Z=Q.fieldNames,be=Q.defaultFieldNames;return Z[se]||be[se]}},{key:"getOption",value:function(se,Q){var Z=this.props,be=Z.prefixCls,re=Z.expandTrigger,Y=Z.expandIcon,X=Z.loadingIcon,$=this.props.onSelect.bind(this,se,Q),ve=this.props.onItemDoubleClick.bind(this,se,Q),de={onClick:$,onDoubleClick:ve},xe="".concat(be,"-menu-item"),Ke=null,Ve=se[this.getFieldName("children")]&&se[this.getFieldName("children")].length>0;(Ve||se.isLeaf===!1)&&(xe+=" ".concat(be,"-menu-item-expand"),se.loading||(Ke=L.createElement("span",{className:"".concat(be,"-menu-item-expand-icon")},Y))),re==="hover"&&(Ve||se.isLeaf===!1)&&(de={onMouseEnter:this.delayOnSelect.bind(this,$),onMouseLeave:this.delayOnSelect.bind(this),onClick:$}),this.isActiveOption(se,Q)&&(xe+=" ".concat(be,"-menu-item-active"),de.ref=this.saveMenuItem(Q)),se.disabled&&(xe+=" ".concat(be,"-menu-item-disabled"));var Xe=null;se.loading&&(xe+=" ".concat(be,"-menu-item-loading"),Xe=X||null);var at="";return"title"in se?at=se.title:typeof se[this.getFieldName("label")]=="string"&&(at=se[this.getFieldName("label")]),L.createElement("li",Object.assign({key:se[this.getFieldName("value")],className:xe,title:at},de,{role:"menuitem",onMouseDown:function(lt){return lt.preventDefault()}}),se[this.getFieldName("label")],Ke,Xe)}},{key:"getActiveOptions",value:function(se){var Q=this,Z=this.props.options,be=se||this.props.activeValue;return w()(Z,function(re,Y){return re[Q.getFieldName("value")]===be[Y]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var se=this,Q=this.props.options,Z=this.getActiveOptions().map(function(be){return be[se.getFieldName("children")]}).filter(function(be){return!!be});return Z.unshift(Q),Z}},{key:"delayOnSelect",value:function(se){for(var Q=this,Z=arguments.length,be=new Array(Z>1?Z-1:0),re=1;re<Z;re++)be[re-1]=arguments[re];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof se=="function"&&(this.delayTimer=window.setTimeout(function(){se(be),Q.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var se=this.getShowOptions().length,Q=0;Q<se;Q++){var Z=this.menuItems[Q];Z&&Z.parentElement&&(Z.parentElement.scrollTop=Z.offsetTop)}}},{key:"isActiveOption",value:function(se,Q){var Z=this.props.activeValue,be=Z===void 0?[]:Z;return be[Q]===se[this.getFieldName("value")]}},{key:"render",value:function(){var se=this,Q=this.props,Z=Q.prefixCls,be=Q.dropdownMenuColumnStyle;return L.createElement("div",null,this.getShowOptions().map(function(re,Y){return L.createElement("ul",{className:"".concat(Z,"-menu"),key:Y,style:be},re.map(function(X){return se.getOption(X,Y)}))}))}}]),ae}(L.Component);return ye.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},ye}(),S=t,_={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}}},i=_;function P(ye){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(ye)}function O(ye,fe){if(ye==null)return{};var ne=x(ye,fe),ae,q;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(ye);for(q=0;q<se.length;q++){if(ae=se[q],fe.indexOf(ae)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(ye,ae))continue;ne[ae]=ye[ae]}}return ne}function x(ye,fe){if(ye==null)return{};var ne={},ae=Object.keys(ye),q,se;for(se=0;se<ae.length;se++){if(q=ae[se],fe.indexOf(q)>=0)continue;ne[q]=ye[q]}return ne}function b(ye){return k(ye)||M(ye)||T(ye)||y()}function y(){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(ye,fe){if(!ye)return;if(typeof ye=="string")return N(ye,fe);var ne=Object.prototype.toString.call(ye).slice(8,-1);if(ne==="Object"&&ye.constructor&&(ne=ye.constructor.name),ne==="Map"||ne==="Set")return Array.from(ye);if(ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ne))return N(ye,fe)}function M(ye){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(ye))return Array.from(ye)}function k(ye){if(Array.isArray(ye))return N(ye)}function N(ye,fe){(fe==null||fe>ye.length)&&(fe=ye.length);for(var ne=0,ae=new Array(fe);ne<fe;ne++)ae[ne]=ye[ne];return ae}function K(ye,fe){if(!(ye instanceof fe))throw new TypeError("Cannot call a class as a function")}function z(ye,fe){for(var ne=0;ne<fe.length;ne++){var ae=fe[ne];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(ye,ae.key,ae)}}function B(ye,fe,ne){return fe&&z(ye.prototype,fe),ne&&z(ye,ne),ye}function H(ye,fe){if(typeof fe!="function"&&fe!==null)throw new TypeError("Super expression must either be null or a function");ye.prototype=Object.create(fe&&fe.prototype,{constructor:{value:ye,writable:!0,configurable:!0}}),fe&&U(ye,fe)}function U(ye,fe){return U=Object.setPrototypeOf||function(ae,q){return ae.__proto__=q,ae},U(ye,fe)}function W(ye){var fe=ie();return function(){var ne=ce(ye),ae;if(fe){var q=ce(this).constructor;ae=Reflect.construct(ne,arguments,q)}else ae=ne.apply(this,arguments);return G(this,ae)}}function G(ye,fe){return fe&&(P(fe)==="object"||typeof fe=="function")?fe:ee(ye)}function ee(ye){if(ye===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ye}function ie(){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(ye){return!1}}function ce(ye){return ce=Object.setPrototypeOf?Object.getPrototypeOf:function(ne){return ne.__proto__||Object.getPrototypeOf(ne)},ce(ye)}var _e=function(){var ye=function(fe){H(ae,fe);var ne=W(ae);function ae(q){var se;K(this,ae),se=ne.call(this,q),se.setPopupVisible=function(Z){var be=se.state.value;"popupVisible"in se.props||se.setState({popupVisible:Z}),Z&&!se.state.popupVisible&&se.setState({activeValue:be}),se.props.onPopupVisibleChange(Z)},se.handleChange=function(Z,be,re){var Y=be.visible;(re.type!=="keydown"||re.keyCode===u.a.ENTER)&&(se.props.onChange(Z.map(function(X){return X[se.getFieldName("value")]}),Z),se.setPopupVisible(Y))},se.handlePopupVisibleChange=function(Z){se.setPopupVisible(Z)},se.handleMenuSelect=function(Z,be,re){var Y=se.trigger.getRootDomNode();Y&&Y.focus&&Y.focus();var X=se.props,$=X.changeOnSelect,ve=X.loadData,de=X.expandTrigger;if(!Z||Z.disabled)return;var xe=se.state.activeValue;xe=xe.slice(0,be+1),xe[be]=Z[se.getFieldName("value")];var Ke=se.getActiveOptions(xe);if(Z.isLeaf===!1&&!Z[se.getFieldName("children")]&&ve){$&&se.handleChange(Ke,{visible:!0},re),se.setState({activeValue:xe}),ve(Ke);return}var Ve={};!Z[se.getFieldName("children")]||!Z[se.getFieldName("children")].length?(se.handleChange(Ke,{visible:!1},re),Ve.value=xe):$&&(re.type==="click"||re.type==="keydown")&&(de==="hover"?se.handleChange(Ke,{visible:!1},re):se.handleChange(Ke,{visible:!0},re),Ve.value=xe),Ve.activeValue=xe,("value"in se.props||re.type==="keydown"&&re.keyCode!==u.a.ENTER)&&delete Ve.value,se.setState(Ve)},se.handleItemDoubleClick=function(){var Z=se.props.changeOnSelect;Z&&se.setPopupVisible(!1)},se.handleKeyDown=function(Z){var be=se.props.children;if(be&&be.props.onKeyDown){be.props.onKeyDown(Z);return}var re=b(se.state.activeValue),Y=re.length-1<0?0:re.length-1,X=se.getCurrentLevelOptions(),$=X.map(function(Ke){return Ke[se.getFieldName("value")]}).indexOf(re[Y]);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(!se.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){se.setPopupVisible(!0);return}if(Z.keyCode===u.a.DOWN||Z.keyCode===u.a.UP){Z.preventDefault();var ve=$;ve!==-1?Z.keyCode===u.a.DOWN?(ve+=1,ve=ve>=X.length?0:ve):(ve-=1,ve=ve<0?X.length-1:ve):ve=0,re[Y]=X[ve][se.getFieldName("value")]}else if(Z.keyCode===u.a.LEFT||Z.keyCode===u.a.BACKSPACE)Z.preventDefault(),re.splice(re.length-1,1);else if(Z.keyCode===u.a.RIGHT)Z.preventDefault(),X[$]&&X[$][se.getFieldName("children")]&&re.push(X[$][se.getFieldName("children")][0][se.getFieldName("value")]);else if(Z.keyCode===u.a.ESC||Z.keyCode===u.a.TAB){se.setPopupVisible(!1);return}(!re||re.length===0)&&se.setPopupVisible(!1);var de=se.getActiveOptions(re),xe=de[de.length-1];se.handleMenuSelect(xe,de.length-1,Z),se.props.onKeyDown&&se.props.onKeyDown(Z)},se.saveTrigger=function(Z){se.trigger=Z};var Q=[];return"value"in q?Q=q.value||[]:"defaultValue"in q&&(Q=q.defaultValue||[]),D()(!("filedNames"in q),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),se.state={popupVisible:q.popupVisible,activeValue:Q,value:Q,prevProps:q},se.defaultFieldNames={label:"label",value:"value",children:"children"},se}return B(ae,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(se){var Q=this.defaultFieldNames,Z=this.props,be=Z.fieldNames,re=Z.filedNames;return"filedNames"in this.props?re[se]||Q[se]:be[se]||Q[se]}},{key:"getFieldNames",value:function(){var se=this.props,Q=se.fieldNames,Z=se.filedNames;return"filedNames"in this.props?Z:Q}},{key:"getCurrentLevelOptions",value:function(){var se=this,Q=this.props.options,Z=Q===void 0?[]:Q,be=this.state.activeValue,re=be===void 0?[]:be,Y=w()(Z,function(X,$){return X[se.getFieldName("value")]===re[$]},{childrenKeyName:this.getFieldName("children")});return Y[Y.length-2]?Y[Y.length-2][this.getFieldName("children")]:b(Z).filter(function(X){return!X.disabled})}},{key:"getActiveOptions",value:function(se){var Q=this;return w()(this.props.options||[],function(Z,be){return Z[Q.getFieldName("value")]===se[be]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var se=this.props,Q=se.prefixCls,Z=se.transitionName,be=se.popupClassName,re=se.options,Y=re===void 0?[]:re,X=se.disabled,$=se.builtinPlacements,ve=se.popupPlacement,de=se.children,xe=se.dropdownRender,Ke=O(se,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),Ve=L.createElement("div",null),Xe="";Y&&Y.length>0?Ve=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})):Xe=" ".concat(Q,"-menus-empty");var at=Ve;return xe&&(at=xe(Ve)),L.createElement(f.a,Object.assign({ref:this.saveTrigger},Ke,{popupPlacement:ve,builtinPlacements:$,popupTransitionName:Z,action:X?[]:["click"],popupVisible:X?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(Q,"-menus"),popupClassName:be+Xe,popup:at}),L.cloneElement(de,{onKeyDown:this.handleKeyDown,tabIndex:X?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(se,Q){var Z=Q.prevProps,be=Z===void 0?{}:Z,re={prevProps:se};return"value"in se&&!p(be.value,se.value)&&(re.value=se.value||[],"loadData"in se||(re.activeValue=se.value||[])),"popupVisible"in se&&(re.popupVisible=se.popupVisible),re}}]),ae}(L.Component);return ye.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:i,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},ye}(),Ce=_e,le=J.a=Ce},S6kV:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("OLod"))})(this,function(L){return L.mode.OFB=function(){var f=L.lib.BlockCipherMode.extend(),C=f.Encryptor=f.extend({processBlock:function(D,u){var m=this._cipher,w=m.blockSize,p=this._iv,s=this._keystream;p&&(s=this._keystream=p.slice(0),this._iv=void 0),m.encryptBlock(s,0);for(var l=0;l<w;l++)D[u+l]^=s[l]}});return f.Decryptor=C,f}(),L.mode.OFB})},"SA+Z":function(j,J,I){var L=I("wTVA"),f=I("EbDI"),C=I("ZhPi"),D=I("wkBT");function u(m){return L(m)||f(m)||C(m)||D()}j.exports=u,j.exports.__esModule=!0,j.exports.default=j.exports},SJMd:function(j,J){/**
|
|
|
* @license
|
|
|
* Copyright (C) 2006 Google Inc.
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
* You may obtain a copy of the License at
|
|
|
*
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
*
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
* See the License for the specific language governing permissions and
|
|
|
* limitations under the License.
|
|
|
*/var I,L,f,C=!1,D,u;window.PR_SHOULD_USE_CONTINUATION=!0;var m,w;(function(){var p=window,s=["break,continue,do,else,for,if,return,while"],l=[s,"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"],d=[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"],h=[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"],v="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",g=[a,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],E="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=[s,"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"],o=[s,"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=[s,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],S=[d,c,h,g,E,n,o,t],_=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,i="str",P="kwd",O="com",x="typ",b="lit",y="pun",T="pln",M="tag",k="dec",N="src",K="atn",z="atv",B="nocode",H="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(re){for(var Y=0,X=!1,$=!1,ve=0,de=re.length;ve<de;++ve){var xe=re[ve];if(xe.ignoreCase)$=!0;else if(/[a-z]/i.test(xe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){X=!0,$=!1;break}}var Ke={b:8,t:9,n:10,v:11,f:12,r:13};function Ve(Me){var Te=Me.charCodeAt(0);if(Te!==92)return Te;var Ye=Me.charAt(1);return Te=Ke[Ye],Te||("0"<=Ye&&Ye<="7"?parseInt(Me.substring(1),8):Ye==="u"||Ye==="x"?parseInt(Me.substring(2),16):Me.charCodeAt(1))}function Xe(Me){if(Me<32)return(Me<16?"\\x0":"\\x")+Me.toString(16);var Te=String.fromCharCode(Me);return Te==="\\"||Te==="-"||Te==="]"||Te==="^"?"\\"+Te:Te}function at(Me){var Te=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")),Ye=[],ot=Te[0]==="^",ze=["["];ot&&ze.push("^");for(var rt=ot?1:0,ke=Te.length;rt<ke;++rt){var Oe=Te[rt];if(/\\[bdsw]/i.test(Oe))ze.push(Oe);else{var Re=Ve(Oe),pe;rt+2<ke&&Te[rt+1]==="-"?(pe=Ve(Te[rt+2]),rt+=2):pe=Re,Ye.push([Re,pe]),pe<65||Re>122||(pe<65||Re>90||Ye.push([Math.max(65,Re)|32,Math.min(pe,90)|32]),pe<97||Re>122||Ye.push([Math.max(97,Re)&~32,Math.min(pe,122)&~32]))}}Ye.sort(function(Ie,$e){return Ie[0]-$e[0]||$e[1]-Ie[1]});for(var Ee=[],we=[],rt=0;rt<Ye.length;++rt){var De=Ye[rt];De[0]<=we[1]+1?we[1]=Math.max(we[1],De[1]):Ee.push(we=De)}for(var rt=0;rt<Ee.length;++rt){var De=Ee[rt];ze.push(Xe(De[0])),De[1]>De[0]&&(De[1]+1>De[0]&&ze.push("-"),ze.push(Xe(De[1])))}return ze.push("]"),ze.join("")}function it(Me){for(var Te=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")),Ye=Te.length,ot=[],ze=0,rt=0;ze<Ye;++ze){var ke=Te[ze];if(ke==="(")++rt;else if(ke.charAt(0)==="\\"){var Oe=+ke.substring(1);Oe&&(Oe<=rt?ot[Oe]=-1:Te[ze]=Xe(Oe))}}for(var ze=1;ze<ot.length;++ze)ot[ze]===-1&&(ot[ze]=++Y);for(var ze=0,rt=0;ze<Ye;++ze){var ke=Te[ze];if(ke==="(")++rt,ot[rt]||(Te[ze]="(?:");else if(ke.charAt(0)==="\\"){var Oe=+ke.substring(1);Oe&&Oe<=rt&&(Te[ze]="\\"+ot[Oe])}}for(var ze=0;ze<Ye;++ze)Te[ze]==="^"&&Te[ze+1]!=="^"&&(Te[ze]="");if(Me.ignoreCase&&X)for(var ze=0;ze<Ye;++ze){var ke=Te[ze],Re=ke.charAt(0);ke.length>=2&&Re==="["?Te[ze]=at(ke):Re!=="\\"&&(Te[ze]=ke.replace(/[a-zA-Z]/g,function(we){var De=we.charCodeAt(0);return"["+String.fromCharCode(De&~32,De|32)+"]"}))}return Te.join("")}for(var lt=[],ve=0,de=re.length;ve<de;++ve){var xe=re[ve];if(xe.global||xe.multiline)throw new Error(""+xe);lt.push("(?:"+it(xe)+")")}return new RegExp(lt.join("|"),$?"gi":"g")}function W(re,Y){var X=/(?:^|\s)nocode(?:\s|$)/,$=[],ve=0,de=[],xe=0;function Ke(Ve){var Xe=Ve.nodeType;if(Xe==1){if(X.test(Ve.className))return;for(var at=Ve.firstChild;at;at=at.nextSibling)Ke(at);var it=Ve.nodeName.toLowerCase();(it==="br"||it==="li")&&($[xe]=`
|
|
|
`,de[xe<<1]=ve++,de[xe++<<1|1]=Ve)}else if(Xe==3||Xe==4){var lt=Ve.nodeValue;lt.length&&(Y?lt=lt.replace(/\r\n?/g,`
|
|
|
`):lt=lt.replace(/[ \t\r\n]+/g," "),$[xe]=lt,de[xe<<1]=ve,ve+=lt.length,de[xe++<<1|1]=Ve)}}return Ke(re),{sourceCode:$.join("").replace(/\n$/,""),spans:de}}function G(re,Y,X,$,ve){if(!X)return;var de={sourceNode:re,pre:1,langExtension:null,numberLines:null,sourceCode:X,spans:null,basePos:Y,decorations:null};$(de),ve.push.apply(ve,de.decorations)}var ee=/\S/;function ie(re){for(var Y=void 0,X=re.firstChild;X;X=X.nextSibling){var $=X.nodeType;Y=$===1?Y?re:X:$===3&&ee.test(X.nodeValue)?re:Y}return Y===re?void 0:Y}function ce(re,Y){var X={},$;(function(){for(var xe=re.concat(Y),Ke=[],Ve={},Xe=0,at=xe.length;Xe<at;++Xe){var it=xe[Xe],lt=it[3];if(lt)for(var Me=lt.length;--Me>=0;)X[lt.charAt(Me)]=it;var Te=it[1],Ye=""+Te;Ve.hasOwnProperty(Ye)||(Ke.push(Te),Ve[Ye]=null)}Ke.push(/[\0-\uffff]/),$=U(Ke)})();var ve=Y.length,de=function(xe){for(var Ke=xe.sourceCode,Ve=xe.basePos,Xe=xe.sourceNode,at=[Ve,T],it=0,lt=Ke.match($)||[],Me={},Te=0,Ye=lt.length;Te<Ye;++Te){var ot=lt[Te],ze=Me[ot],rt=void 0,ke;if(typeof ze=="string")ke=!1;else{var Oe=X[ot.charAt(0)];if(Oe)rt=ot.match(Oe[1]),ze=Oe[0];else{for(var Re=0;Re<ve;++Re)if(Oe=Y[Re],rt=ot.match(Oe[1]),rt){ze=Oe[0];break}rt||(ze=T)}ke=ze.length>=5&&ze.substring(0,5)==="lang-",ke&&!(rt&&typeof rt[1]=="string")&&(ke=!1,ze=N),ke||(Me[ot]=ze)}var pe=it;if(it+=ot.length,!ke)at.push(Ve+pe,ze);else{var Ee=rt[1],we=ot.indexOf(Ee),De=we+Ee.length;rt[2]&&(De=ot.length-rt[2].length,we=De-Ee.length);var Ie=ze.substring(5);G(Xe,Ve+pe,ot.substring(0,we),de,at),G(Xe,Ve+pe+we,Ee,ae(Ie,Ee),at),G(Xe,Ve+pe+De,ot.substring(De),de,at)}}xe.decorations=at};return de}function _e(re){var Y=[],X=[];re.tripleQuotedStrings?Y.push([i,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):re.multiLineStrings?Y.push([i,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Y.push([i,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),re.verbatimStrings&&X.push([i,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $=re.hashComments;$&&(re.cStyleComments?($>1?Y.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Y.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([i,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Y.push([O,/^#[^\r\n]*/,null,"#"])),re.cStyleComments&&(X.push([O,/^\/\/[^\r\n]*/,null]),X.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ve=re.regexLiterals;if(ve){var de=ve>1?"":`
|
|
|
\r`,xe=de?".":"[\\S\\s]",Ke="/(?=[^/*"+de+"])(?:[^/\\x5B\\x5C"+de+"]|\\x5C"+xe+"|\\x5B(?:[^\\x5C\\x5D"+de+"]|\\x5C"+xe+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+H+"("+Ke+")")])}var Ve=re.types;Ve&&X.push([x,Ve]);var Xe=(""+re.keywords).replace(/^ | $/g,"");Xe.length&&X.push([P,new RegExp("^(?:"+Xe.replace(/[\s,]+/g,"|")+")\\b"),null]),Y.push([T,/^\s+/,null,` \r
|
|
|
\xA0`]);var at="^.[^\\s\\w.$@'\"`/\\\\]*";return re.regexLiterals&&(at+="(?!s*/)"),X.push([b,/^@[a-z_$][a-z_$@0-9]*/i,null],[x,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[T,/^[a-z_$][a-z_$@0-9]*/i,null],[b,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[T,/^\\[\s\S]?/,null],[y,new RegExp(at),null]),ce(Y,X)}var Ce=_e({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function le(re,Y,X){for(var $=/(?:^|\s)nocode(?:\s|$)/,ve=/\r\n?|\n/,de=re.ownerDocument,xe=de.createElement("li");re.firstChild;)xe.appendChild(re.firstChild);var Ke=[xe];function Ve(Te){var Ye=Te.nodeType;if(Ye==1&&!$.test(Te.className))if(Te.nodeName==="br")Xe(Te),Te.parentNode&&Te.parentNode.removeChild(Te);else for(var ot=Te.firstChild;ot;ot=ot.nextSibling)Ve(ot);else if((Ye==3||Ye==4)&&X){var ze=Te.nodeValue,rt=ze.match(ve);if(rt){var ke=ze.substring(0,rt.index);Te.nodeValue=ke;var Oe=ze.substring(rt.index+rt[0].length);if(Oe){var Re=Te.parentNode;Re.insertBefore(de.createTextNode(Oe),Te.nextSibling)}Xe(Te),ke||Te.parentNode.removeChild(Te)}}}function Xe(Te){for(;!Te.nextSibling;)if(Te=Te.parentNode,!Te)return;function Ye(rt,ke){var Oe=ke?rt.cloneNode(!1):rt,Re=rt.parentNode;if(Re){var pe=Ye(Re,1),Ee=rt.nextSibling;pe.appendChild(Oe);for(var we=Ee;we;we=Ee)Ee=we.nextSibling,pe.appendChild(we)}return Oe}for(var ot=Ye(Te.nextSibling,0),ze;(ze=ot.parentNode)&&ze.nodeType===1;)ot=ze;Ke.push(ot)}for(var at=0;at<Ke.length;++at)Ve(Ke[at]);Y===(Y|0)&&Ke[0].setAttribute("value",Y);var it=de.createElement("ol");it.className="linenums";for(var lt=Math.max(0,Y-1|0)||0,at=0,Me=Ke.length;at<Me;++at)xe=Ke[at],xe.className="L"+(at+lt)%10,xe.firstChild||xe.appendChild(de.createTextNode("\xA0")),it.appendChild(xe);re.appendChild(it)}function ye(re){var Y=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Y=Y&&+Y[1]<=8;var X=/\n/g,$=re.sourceCode,ve=$.length,de=0,xe=re.spans,Ke=xe.length,Ve=0,Xe=re.decorations,at=Xe.length,it=0;Xe[at]=ve;var lt,Me;for(Me=lt=0;Me<at;)Xe[Me]!==Xe[Me+2]?(Xe[lt++]=Xe[Me++],Xe[lt++]=Xe[Me++]):Me+=2;for(at=lt,Me=lt=0;Me<at;){for(var Te=Xe[Me],Ye=Xe[Me+1],ot=Me+2;ot+2<=at&&Xe[ot+1]===Ye;)ot+=2;Xe[lt++]=Te,Xe[lt++]=Ye,Me=ot}at=Xe.length=lt;var ze=re.sourceNode,rt="";ze&&(rt=ze.style.display,ze.style.display="none");try{for(var ke=null;Ve<Ke;){var Oe=xe[Ve],Re=xe[Ve+2]||ve,pe=Xe[it+2]||ve,ot=Math.min(Re,pe),Ee=xe[Ve+1],we;if(Ee.nodeType!==1&&(we=$.substring(de,ot))){Y&&(we=we.replace(X,"\r")),Ee.nodeValue=we;var De=Ee.ownerDocument,Ie=De.createElement("span");Ie.className=Xe[it+1];var $e=Ee.parentNode;$e.replaceChild(Ie,Ee),Ie.appendChild(Ee),de<Re&&(xe[Ve+1]=Ee=De.createTextNode($.substring(ot,Re)),$e.insertBefore(Ee,Ie.nextSibling))}de=ot,de>=Re&&(Ve+=2),de>=pe&&(it+=2)}}finally{ze&&(ze.style.display=rt)}}var fe={};function ne(re,Y){for(var X=Y.length;--X>=0;){var $=Y[X];fe.hasOwnProperty($)?p.console&&console.warn("cannot override language handler %s",$):fe[$]=re}}function ae(re,Y){return re&&fe.hasOwnProperty(re)||(re=/^\s*</.test(Y)?"default-markup":"default-code"),fe[re]}ne(Ce,["default-code"]),ne(ce([],[[T,/^[^<?]+/],[k,/^<!\w[^>]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[y,/^(?:<[%?]|[%?]>)/],["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(ce([[T,/^[\s]+/,null,` \r
|
|
|
`],[z,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[M,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[K,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[y,/^[=<>\/]+/],["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(ce([],[[z,/^[\s\S]+/]]),["uq.val"]),ne(_e({keywords:d,hashComments:!0,cStyleComments:!0,types:_}),["c","cc","cpp","cxx","cyc","m"]),ne(_e({keywords:"null,true,false"}),["json"]),ne(_e({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:_}),["cs"]),ne(_e({keywords:h,cStyleComments:!0}),["java"]),ne(_e({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ne(_e({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ne(_e({keywords:E,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ne(_e({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ne(_e({keywords:g,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ne(_e({keywords:v,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ne(ce([],[[i,/^[\s\S]+/]]),["regex"]);function q(re){var Y=re.langExtension;try{var X=W(re.sourceNode,re.pre),$=X.sourceCode;re.sourceCode=$,re.spans=X.spans,re.basePos=0,ae(Y,$)(re),ye(re)}catch(ve){p.console&&console.log(ve&&ve.stack||ve)}}function se(re,Y,X){var $=X||!1,ve=Y||null,de=document.createElement("div");de.innerHTML="<pre>"+re+"</pre>",de=de.firstChild,$&&le(de,$,!0);var xe={langExtension:ve,numberLines:$,sourceNode:de,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return q(xe),de.innerHTML}function Q(re,Y){var X=Y||document.body,$=X.ownerDocument||document;function ve(Oe){return X.getElementsByTagName(Oe)}for(var de=[ve("pre"),ve("code"),ve("xmp")],xe=[],Ke=0;Ke<de.length;++Ke)for(var Ve=0,Xe=de[Ke].length;Ve<Xe;++Ve)xe.push(de[Ke][Ve]);de=null;var at=Date;at.now||(at={now:function(){return+new Date}});var it=0,lt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Me=/\bprettyprint\b/,Te=/\bprettyprinted\b/,Ye=/pre|xmp/i,ot=/^code$/i,ze=/^(?:pre|code|xmp)$/i,rt={};function ke(){for(var Oe=p.PR_SHOULD_USE_CONTINUATION?at.now()+250:Infinity;it<xe.length&&at.now()<Oe;it++){for(var Re=xe[it],pe=rt,Ee=Re;Ee=Ee.previousSibling;){var we=Ee.nodeType,De=(we===7||we===8)&&Ee.nodeValue;if(De?!/^\??prettify\b/.test(De):we!==3||/\S/.test(Ee.nodeValue))break;if(De){pe={},De.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ln,Cr,rn){pe[Cr]=rn});break}}var Ie=Re.className;if((pe!==rt||Me.test(Ie))&&!Te.test(Ie)){for(var $e=!1,qe=Re.parentNode;qe;qe=qe.parentNode){var tt=qe.tagName;if(ze.test(tt)&&qe.className&&Me.test(qe.className)){$e=!0;break}}if(!$e){Re.className+=" prettyprinted";var xt=pe.lang;if(!xt){xt=Ie.match(lt);var gt;!xt&&(gt=ie(Re))&&ot.test(gt.tagName)&&(xt=gt.className.match(lt)),xt&&(xt=xt[1])}var sr;if(Ye.test(Re.tagName))sr=1;else{var tr=Re.currentStyle,St=$.defaultView,Nr=tr?tr.whiteSpace:St&&St.getComputedStyle?St.getComputedStyle(Re,null).getPropertyValue("white-space"):0;sr=Nr&&Nr.substring(0,3)==="pre"}var Ir=pe.linenums;(Ir=Ir==="true"||+Ir)||(Ir=Ie.match(/\blinenums\b(?::(\d+))?/),Ir=Ir?Ir[1]&&Ir[1].length?+Ir[1]:!0:!1),Ir&&le(Re,Ir,sr);var Fr={langExtension:xt,sourceNode:Re,numberLines:Ir,pre:sr,sourceCode:null,basePos:null,spans:null,decorations:null};q(Fr)}}}it<xe.length?p.setTimeout(ke,250):typeof re=="function"&&re()}ke()}var Z=p.PR={createSimpleLexer:ce,registerLangHandler:ne,sourceDecorator:_e,PR_ATTRIB_NAME:K,PR_ATTRIB_VALUE:z,PR_COMMENT:O,PR_DECLARATION:k,PR_KEYWORD:P,PR_LITERAL:b,PR_NOCODE:B,PR_PLAIN:T,PR_PUNCTUATION:y,PR_SOURCE:N,PR_STRING:i,PR_TAG:M,PR_TYPE:x,prettyPrintOne:C?p.prettyPrintOne=se:m=se,prettyPrint:w=C?p.prettyPrint=Q:w=Q},be=p.define;typeof be=="function"&&be.amd&&be("google-code-prettify",[],function(){return Z})})()},Sjjz:function(j,J,I){j.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},UfjD:function(j,J,I){"use strict";var L=I("2qtc"),f=I("kLXV"),C=I("5NDa"),D=I("5rEg"),u=I("miYZ"),m=I("tsqr"),w=I("tJVT"),p=I("cDcd"),s=I.n(p),l=I("4i/N");function a(d){var h=d.isjoin,c=d.setJoin,v=d.JoinTeams,g=Object(p.useState)(""),E=Object(w.a)(g,2),n=E[0],o=E[1];return s.a.createElement(f.a,{centered:!0,title:s.a.createElement("div",{style:{alignItems:"center",display:"flex"}},s.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u52A0\u5165\u6218\u961F"),s.a.createElement(l.a,{onClick:function(){return c(!1)},style:{cursor:"porint"}})),visible:h,closable:!1,destroyOnClose:!0,onOk:function(){if(!n){m.b.info("\u9080\u8BF7\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}v(n)},onCancel:function(){return c(!1)}},s.a.createElement("div",null,s.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},s.a.createElement("span",{style:{flex:"none"}},"\u9080\u8BF7\u7801\uFF1A")," ",s.a.createElement(D.a,{placeholder:"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801",value:n,maxLength:60,addonAfter:String(n&&n.length||0)+"/60",onChange:function(S){return o(S.target.value)}}))))}J.a=a},"VrN/":function(j,J,I){(function(L,f){j.exports=f()})(this,function(){"use strict";var L=navigator.userAgent,f=navigator.platform,C=/gecko\/\d/i.test(L),D=/MSIE \d/.test(L),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(L),m=/Edge\/(\d+)/.exec(L),w=D||u||m,p=w&&(D?document.documentMode||6:+(m||u)[1]),s=!m&&/WebKit\//.test(L),l=s&&/Qt\/\d+\.\d+/.test(L),a=!m&&/Chrome\//.test(L),d=/Opera\//.test(L),h=/Apple Computer/.test(navigator.vendor),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(L),v=/PhantomJS/.test(L),g=!m&&/AppleWebKit/.test(L)&&/Mobile\/\w+/.test(L),E=/Android/.test(L),n=g||E||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(L),o=g||/Mac/.test(f),t=/\bCrOS\b/.test(L),S=/win/i.test(f),_=d&&L.match(/Version\/(\d*\.\d*)/);_&&(_=Number(_[1])),_&&_>=15&&(d=!1,s=!0);var i=o&&(l||d&&(_==null||_<12.11)),P=C||w&&p>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var x=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 b(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function y(e,r){return b(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 k;document.createRange?k=function(e,r,R,A){var F=document.createRange();return F.setEnd(A||e,R),F.setStart(e,r),F}:k=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 N(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 z(e,r){var R=e.className;O(r).test(R)||(e.className+=(R?" ":"")+r)}function B(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 H=function(e){e.select()};g?H=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(H=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 W(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,te=F||0;;){var oe=e.indexOf(" ",V);if(oe<0||oe>=r)return te+(r-V);te+=oe-V,te+=R-te%R,V=oe+1}}var ee=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};ee.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ee.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 ie(e,r){for(var R=0;R<e.length;++R)if(e[R]==r)return R;return-1}var ce=50,_e={toString:function(){return"CodeMirror.Pass"}},Ce={scroll:!1},le={origin:"*mouse"},ye={origin:"+move"};function fe(e,r,R){for(var A=0,F=0;;){var V=e.indexOf(" ",A);V==-1&&(V=e.length);var te=V-A;if(V==e.length||F+te>=r)return A+Math.min(te,r-F);if(F+=V-A,F+=R-F%R,A=V+1,F>=r)return A}}var ne=[""];function ae(e){for(;ne.length<=e;)ne.push(q(ne)+" ");return ne[e]}function q(e){return e[e.length-1]}function se(e,r){for(var R=[],A=0;A<e.length;A++)R[A]=r(e[A],A);return R}function Q(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 be(e,r){var R;return Object.create?R=Object.create(e):(Z.prototype=e,R=new Z),r&&W(r,R),R}var re=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Y(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||re.test(e))}function X(e,r){return r?r.source.indexOf("\\w")>-1&&Y(e)?!0:r.test(e):Y(e)}function $(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var ve=/[\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 de(e){return e.charCodeAt(0)>=768&&ve.test(e)}function xe(e,r,R){for(;(R<0?r>0:r<e.length)&&de(e.charAt(r));)r+=R;return r}function Ke(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 Ve(e,r,R,A){if(!e)return A(r,R,"ltr",0);for(var F=!1,V=0;V<e.length;++V){var te=e[V];(te.from<R&&te.to>r||r==R&&te.to==r)&&(A(Math.max(te.from,r),Math.min(te.to,R),te.level==1?"rtl":"ltr",V),F=!0)}F||A(r,R,"ltr")}var Xe=null;function at(e,r,R){var A;Xe=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:Xe=F),V.from==r&&(V.from!=V.to&&R!="before"?A=F:Xe=F)}return A!=null?A:Xe}var it=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function R(me){return me<=247?e.charAt(me):1424<=me&&me<=1524?"R":1536<=me&&me<=1785?r.charAt(me-1536):1774<=me&&me<=2220?"r":8192<=me&&me<=8203?"w":me==8204?"b":"L"}var A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,F=/[stwN]/,V=/[LRr]/,te=/[Lb1n]/,oe=/[1n]/;function ue(me,Ne,We){this.level=me,this.from=Ne,this.to=We}return function(me,Ne){var We=Ne=="ltr"?"L":"R";if(me.length==0||Ne=="ltr"&&!A.test(me))return!1;for(var nt=me.length,Je=[],vt=0;vt<nt;++vt)Je.push(R(me.charCodeAt(vt)));for(var Pt=0,Ft=We;Pt<nt;++Pt){var Vt=Je[Pt];Vt=="m"?Je[Pt]=Ft:Ft=Vt}for(var or=0,$t=We;or<nt;++or){var hr=Je[or];hr=="1"&&$t=="r"?Je[or]="n":V.test(hr)&&($t=hr,hr=="r"&&(Je[or]="R"))}for(var kr=1,Rr=Je[0];kr<nt-1;++kr){var tn=Je[kr];tn=="+"&&Rr=="1"&&Je[kr+1]=="1"?Je[kr]="1":tn==","&&Rr==Je[kr+1]&&(Rr=="1"||Rr=="n")&&(Je[kr]=Rr),Rr=tn}for(var Dn=0;Dn<nt;++Dn){var ca=Je[Dn];if(ca==",")Je[Dn]="N";else if(ca=="%"){var Wn=void 0;for(Wn=Dn+1;Wn<nt&&Je[Wn]=="%";++Wn);for(var Ga=Dn&&Je[Dn-1]=="!"||Wn<nt&&Je[Wn]=="1"?"1":"N",Ua=Dn;Ua<Wn;++Ua)Je[Ua]=Ga;Dn=Wn-1}}for(var qn=0,Ba=We;qn<nt;++qn){var ba=Je[qn];Ba=="L"&&ba=="1"?Je[qn]="L":V.test(ba)&&(Ba=ba)}for(var sa=0;sa<nt;++sa)if(F.test(Je[sa])){var ea=void 0;for(ea=sa+1;ea<nt&&F.test(Je[ea]);++ea);for(var zn=(sa?Je[sa-1]:We)=="L",Wa=(ea<nt?Je[ea]:We)=="L",lo=zn==Wa?zn?"L":"R":We,Ui=sa;Ui<ea;++Ui)Je[Ui]=lo;sa=ea-1}for(var Sa=[],bi,da=0;da<nt;)if(te.test(Je[da])){var ps=da;for(++da;da<nt&&te.test(Je[da]);++da);Sa.push(new ue(0,ps,da))}else{var Di=da,Gi=Sa.length,Xi=Ne=="rtl"?1:0;for(++da;da<nt&&Je[da]!="L";++da);for(var Pa=Di;Pa<da;)if(oe.test(Je[Pa])){Di<Pa&&(Sa.splice(Gi,0,new ue(1,Di,Pa)),Gi+=Xi);var uo=Pa;for(++Pa;Pa<da&&oe.test(Je[Pa]);++Pa);Sa.splice(Gi,0,new ue(2,uo,Pa)),Gi+=Xi,Di=Pa}else++Pa;Di<da&&Sa.splice(Gi,0,new ue(1,Di,da))}return Ne=="ltr"&&(Sa[0].level==1&&(bi=me.match(/^\s+/))&&(Sa[0].from=bi[0].length,Sa.unshift(new ue(0,0,bi[0].length))),q(Sa).level==1&&(bi=me.match(/\s+$/))&&(q(Sa).to-=bi[0].length,Sa.push(new ue(0,nt-bi[0].length,nt)))),Ne=="rtl"?Sa.reverse():Sa}}();function lt(e,r){var R=e.order;return R==null&&(R=e.order=it(e.text,r)),R}var Me=[],Te=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 Ye(e,r){return e._handlers&&e._handlers[r]||Me}function ot(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=ie(F,R);V>-1&&(A[r]=F.slice(0,V).concat(F.slice(V+1)))}}}function ze(e,r){var R=Ye(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 rt(e,r,R){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),ze(e,R||r.type,e,r),we(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)ie(R,r[A])==-1&&R.push(r[A])}function Oe(e,r){return Ye(e,r).length>0}function Re(e){e.prototype.on=function(r,R){Te(this,r,R)},e.prototype.off=function(r,R){ot(this,r,R)}}function pe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function De(e){pe(e),Ee(e)}function Ie(e){return e.target||e.srcElement}function $e(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),o&&e.ctrlKey&&r==1&&(r=3),r}var qe=function(){if(w&&p<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),tt;function xt(e){if(tt==null){var r=T("span","\u200B");y(e,T("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(tt=r.offsetWidth<=1&&r.offsetHeight>2&&!(w&&p<8))}var R=tt?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var gt;function sr(e){if(gt!=null)return gt;var r=y(e,document.createTextNode("A\u062EA")),R=k(r,0,1).getBoundingClientRect(),A=k(r,1,2).getBoundingClientRect();return b(e),!R||R.left==R.right?!1:gt=A.right-R.right<3}var tr=`
|
|
|
|
|
|
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),te=V.indexOf("\r");te!=-1?(R.push(V.slice(0,te)),r+=te+1):(R.push(V),r=F+1)}return R}:function(e){return e.split(/\r\n?|\n/)},St=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},Nr=function(){var e=T("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ir=null;function Fr(e){if(Ir!=null)return Ir;var r=y(e,T("span","x")),R=r.getBoundingClientRect(),A=k(r,0,1).getBoundingClientRect();return Ir=Math.abs(R.left-A.left)>1}var ln={},Cr={};function rn(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),ln[e]=r}function en(e,r){Cr[e]=r}function Lr(e){if(typeof e=="string"&&Cr.hasOwnProperty(e))e=Cr[e];else if(e&&typeof e.name=="string"&&Cr.hasOwnProperty(e.name)){var r=Cr[e.name];typeof r=="string"&&(r={name:r}),e=be(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Lr("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Lr("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function un(e,r){r=Lr(r);var R=ln[r.name];if(!R)return un(e,"text/plain");var A=R(e,r);if(yn.hasOwnProperty(r.name)){var F=yn[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 te in r.modeProps)A[te]=r.modeProps[te];return A}var yn={};function Gn(e,r){var R=yn.hasOwnProperty(e)?yn[e]:yn[e]={};W(r,R)}function cn(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 La(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 Ha(e,r,R){return e.startState?e.startState(r,R):!0}var bn=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};bn.prototype.eol=function(){return this.pos>=this.string.length},bn.prototype.sol=function(){return this.pos==this.lineStart},bn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},bn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},bn.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},bn.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},bn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},bn.prototype.skipToEnd=function(){this.pos=this.string.length},bn.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},bn.prototype.backUp=function(e){this.pos-=e},bn.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)},bn.prototype.indentation=function(){return G(this.string,null,this.tabSize)-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},bn.prototype.match=function(e,r,R){if(typeof e=="string"){var A=function(te){return R?te.toLowerCase():te},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)}},bn.prototype.current=function(){return this.string.slice(this.start,this.pos)},bn.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},bn.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},bn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function qt(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 Xn(e,r,R){var A=[],F=r.line;return e.iter(r.line,R.line+1,function(V){var te=V.text;F==R.line&&(te=te.slice(0,R.ch)),F==r.line&&(te=te.slice(r.ch)),A.push(te),++F}),A}function Ea(e,r,R){var A=[];return e.iter(r,R,function(F){A.push(F.text)}),A}function Ln(e,r){var R=r-e.height;if(R)for(var A=e;A;A=A.parent)A.height+=R}function $r(e){if(e.parent==null)return null;for(var r=e.parent,R=ie(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 Pn(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 te=0;te<e.lines.length;++te){var oe=e.lines[te],ue=oe.height;if(r<ue)break;r-=ue}return R+te}function la(e,r){return r>=e.first&&r<e.first+e.size}function fa(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function Lt(e,r,R){if(R===void 0&&(R=null),!(this instanceof Lt))return new Lt(e,r,R);this.line=e,this.ch=r,this.sticky=R}function cr(e,r){return e.line-r.line||e.ch-r.ch}function ha(e,r){return e.sticky==r.sticky&&cr(e,r)==0}function xa(e){return Lt(e.line,e.ch)}function Ma(e,r){return cr(e,r)<0?r:e}function pa(e,r){return cr(e,r)<0?e:r}function Mn(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function Er(e,r){if(r.line<e.first)return Lt(e.first,0);var R=e.first+e.size-1;return r.line>R?Lt(R,qt(e,R).text.length):ta(r,qt(e,r.line).text.length)}function ta(e,r){var R=e.ch;return R==null||R>r?Lt(e.line,r):R<0?Lt(e.line,0):e}function Rt(e,r){for(var R=[],A=0;A<r.length;A++)R[A]=Er(e,r[A]);return R}var Vn=function(e,r){this.state=e,this.lookAhead=r},In=function(e,r,R,A){this.state=r,this.doc=e,this.line=R,this.maxLookAhead=A||0,this.baseTokens=null,this.baseTokenPos=1};In.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},In.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}},In.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},In.fromSaved=function(e,r,R){return r instanceof Vn?new In(e,cn(e.mode,r.state),R,r.lookAhead):new In(e,cn(e.mode,r),R)},In.prototype.save=function(e){var r=e!==!1?cn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Vn(r,this.maxLookAhead):r};function Ka(e,r,R,A){var F=[e.state.modeGen],V={};ma(e,r.text,e.doc.mode,R,function(me,Ne){return F.push(me,Ne)},V,A);for(var te=R.state,oe=function(me){R.baseTokens=F;var Ne=e.state.overlays[me],We=1,nt=0;R.state=!0,ma(e,r.text,Ne.mode,R,function(Je,vt){for(var Pt=We;nt<Je;){var Ft=F[We];Ft>Je&&F.splice(We,1,Je,F[We+1],Ft),We+=2,nt=Math.min(Je,Ft)}if(!vt)return;if(Ne.opaque)F.splice(Pt,We-Pt,Je,"overlay "+vt),We=Pt+2;else for(;Pt<We;Pt+=2){var Vt=F[Pt+1];F[Pt+1]=(Vt?Vt+" ":"")+"overlay "+vt}},V),R.state=te,R.baseTokens=null,R.baseTokenPos=1},ue=0;ue<e.state.overlays.length;++ue)oe(ue);return{styles:F,classes:V.bgClass||V.textClass?V:null}}function _a(e,r,R){if(!r.styles||r.styles[0]!=e.state.modeGen){var A=Qn(e,$r(r)),F=r.text.length>e.options.maxHighlightLength&&cn(e.doc.mode,A.state),V=Ka(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 Qn(e,r,R){var A=e.doc,F=e.display;if(!A.mode.startState)return new In(A,!0,r);var V=va(e,r,R),te=V>A.first&&qt(A,V-1).stateAfter,oe=te?In.fromSaved(A,te,V):new In(A,Ha(A.mode),V);return A.iter(V,r,function(ue){Qa(e,ue.text,oe);var me=oe.line;ue.stateAfter=me==r-1||me%5==0||me>=F.viewFrom&&me<F.viewTo?oe.save():null,oe.nextLine()}),R&&(A.modeFrontier=oe.line),oe}function Qa(e,r,R,A){var F=e.doc.mode,V=new bn(r,e.options.tabSize,R);for(V.start=V.pos=A||0,r==""&&Za(F,R.state);!V.eol();)ra(F,V,R.state),V.start=V.pos}function Za(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var R=La(e,r);if(R.mode.blankLine)return R.mode.blankLine(R.state)}function ra(e,r,R,A){for(var F=0;F<10;F++){A&&(A[0]=La(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 wn=function(e,r,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=R};function na(e,r,R,A){var F=e.doc,V=F.mode,te;r=Er(F,r);var oe=qt(F,r.line),ue=Qn(e,r.line,R),me=new bn(oe.text,e.options.tabSize,ue),Ne;for(A&&(Ne=[]);(A||me.pos<r.ch)&&!me.eol();)me.start=me.pos,te=ra(V,me,ue.state),A&&Ne.push(new wn(me,te,cn(F.mode,ue.state)));return A?Ne:new wn(me,te,ue.state)}function Ia(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 ma(e,r,R,A,F,V,te){var oe=R.flattenSpans;oe==null&&(oe=e.options.flattenSpans);var ue=0,me=null,Ne=new bn(r,e.options.tabSize,A),We,nt=e.options.addModeClass&&[null];for(r==""&&Ia(Za(R,A.state),V);!Ne.eol();){if(Ne.pos>e.options.maxHighlightLength?(oe=!1,te&&Qa(e,r,A,Ne.pos),Ne.pos=r.length,We=null):We=Ia(ra(R,Ne,A.state,nt),V),nt){var Je=nt[0].name;Je&&(We="m-"+(We?Je+" "+We:Je))}if(!oe||me!=We){for(;ue<Ne.start;)ue=Math.min(Ne.start,ue+5e3),F(ue,me);me=We}Ne.start=Ne.pos}for(;ue<Ne.pos;){var vt=Math.min(Ne.pos,ue+5e3);F(vt,me),ue=vt}}function va(e,r,R){for(var A,F,V=e.doc,te=R?-1:r-(e.doc.mode.innerMode?1e3:100),oe=r;oe>te;--oe){if(oe<=V.first)return V.first;var ue=qt(V,oe-1),me=ue.stateAfter;if(me&&(!R||oe+(me instanceof Vn?me.lookAhead:0)<=V.modeFrontier))return oe;var Ne=G(ue.text,null,e.options.tabSize);(F==null||A>Ne)&&(F=oe-1,A=Ne)}return F}function Pi(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=qt(e,A).stateAfter;if(F&&(!(F instanceof Vn)||A+F.lookAhead<r)){R=A+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,R)}var Xa=!1,Nn=!1;function za(){Xa=!0}function Ei(){Nn=!0}function ka(e,r,R){this.marker=e,this.from=r,this.to=R}function aa(e,r){if(e)for(var R=0;R<e.length;++R){var A=e[R];if(A.marker==r)return A}}function oi(e,r){for(var R,A=0;A<e.length;++A)e[A]!=r&&(R||(R=[])).push(e[A]);return R}function pi(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function si(e,r,R){var A;if(e)for(var F=0;F<e.length;++F){var V=e[F],te=V.marker,oe=V.from==null||(te.inclusiveLeft?V.from<=r:V.from<r);if(oe||V.from==r&&te.type=="bookmark"&&(!R||!V.marker.insertLeft)){var ue=V.to==null||(te.inclusiveRight?V.to>=r:V.to>r);(A||(A=[])).push(new ka(te,V.from,ue?null:V.to))}}return A}function mi(e,r,R){var A;if(e)for(var F=0;F<e.length;++F){var V=e[F],te=V.marker,oe=V.to==null||(te.inclusiveRight?V.to>=r:V.to>r);if(oe||V.from==r&&te.type=="bookmark"&&(!R||V.marker.insertLeft)){var ue=V.from==null||(te.inclusiveLeft?V.from<=r:V.from<r);(A||(A=[])).push(new ka(te,ue?null:V.from-r,V.to==null?null:V.to-r))}}return A}function qa(e,r){if(r.full)return null;var R=la(e,r.from.line)&&qt(e,r.from.line).markedSpans,A=la(e,r.to.line)&&qt(e,r.to.line).markedSpans;if(!R&&!A)return null;var F=r.from.ch,V=r.to.ch,te=cr(r.from,r.to)==0,oe=si(R,F,te),ue=mi(A,V,te),me=r.text.length==1,Ne=q(r.text).length+(me?F:0);if(oe)for(var We=0;We<oe.length;++We){var nt=oe[We];if(nt.to==null){var Je=aa(ue,nt.marker);Je?me&&(nt.to=Je.to==null?null:Je.to+Ne):nt.to=F}}if(ue)for(var vt=0;vt<ue.length;++vt){var Pt=ue[vt];if(Pt.to!=null&&(Pt.to+=Ne),Pt.from==null){var Ft=aa(oe,Pt.marker);Ft||(Pt.from=Ne,me&&(oe||(oe=[])).push(Pt))}else Pt.from+=Ne,me&&(oe||(oe=[])).push(Pt)}oe&&(oe=wa(oe)),ue&&ue!=oe&&(ue=wa(ue));var Vt=[oe];if(!me){var or=r.text.length-2,$t;if(or>0&&oe)for(var hr=0;hr<oe.length;++hr)oe[hr].to==null&&($t||($t=[])).push(new ka(oe[hr].marker,null,null));for(var kr=0;kr<or;++kr)Vt.push($t);Vt.push(ue)}return Vt}function wa(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 ei(e,r,R){var A=null;if(e.iter(r.line,R.line+1,function(Je){if(Je.markedSpans)for(var vt=0;vt<Je.markedSpans.length;++vt){var Pt=Je.markedSpans[vt].marker;Pt.readOnly&&(!A||ie(A,Pt)==-1)&&(A||(A=[])).push(Pt)}}),!A)return null;for(var F=[{from:r,to:R}],V=0;V<A.length;++V)for(var te=A[V],oe=te.find(0),ue=0;ue<F.length;++ue){var me=F[ue];if(cr(me.to,oe.from)<0||cr(me.from,oe.to)>0)continue;var Ne=[ue,1],We=cr(me.from,oe.from),nt=cr(me.to,oe.to);(We<0||!te.inclusiveLeft&&!We)&&Ne.push({from:me.from,to:oe.from}),(nt>0||!te.inclusiveRight&&!nt)&&Ne.push({from:oe.to,to:me.to}),F.splice.apply(F,Ne),ue+=Ne.length-3}return F}function xi(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 mt(e,r){if(!r)return;for(var R=0;R<r.length;++R)r[R].marker.attachLine(e);e.markedSpans=r}function et(e){return e.inclusiveLeft?-1:0}function pt(e){return e.inclusiveRight?1:0}function _t(e,r){var R=e.lines.length-r.lines.length;if(R!=0)return R;var A=e.find(),F=r.find(),V=cr(A.from,F.from)||et(e)-et(r);if(V)return-V;var te=cr(A.to,F.to)||pt(e)-pt(r);return te||r.id-e.id}function Ut(e,r){var R=Nn&&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||_t(A,F.marker)<0)&&(A=F.marker);return A}function Dt(e){return Ut(e,!0)}function Gt(e){return Ut(e,!1)}function It(e,r){var R=Nn&&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||_t(A,V.marker)<0)&&(A=V.marker)}return A}function ut(e,r,R,A,F){var V=qt(e,r),te=Nn&&V.markedSpans;if(te)for(var oe=0;oe<te.length;++oe){var ue=te[oe];if(!ue.marker.collapsed)continue;var me=ue.marker.find(0),Ne=cr(me.from,R)||et(ue.marker)-et(F),We=cr(me.to,A)||pt(ue.marker)-pt(F);if(Ne>=0&&We<=0||Ne<=0&&We>=0)continue;if(Ne<=0&&(ue.marker.inclusiveRight&&F.inclusiveLeft?cr(me.to,R)>=0:cr(me.to,R)>0)||Ne>=0&&(ue.marker.inclusiveRight&&F.inclusiveLeft?cr(me.from,A)<=0:cr(me.from,A)<0))return!0}}function yt(e){for(var r;r=Dt(e);)e=r.find(-1,!0).line;return e}function bt(e){for(var r;r=Gt(e);)e=r.find(1,!0).line;return e}function er(e){for(var r,R;r=Gt(e);)e=r.find(1,!0).line,(R||(R=[])).push(e);return R}function Yt(e,r){var R=qt(e,r),A=yt(R);return R==A?r:$r(A)}function Wt(e,r){if(r>e.lastLine())return r;var R=qt(e,r),A;if(!jt(e,R))return r;for(;A=Gt(R);)R=A.find(1,!0).line;return $r(R)+1}function jt(e,r){var R=Nn&&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&&Xt(e,r,A))return!0}}function Xt(e,r,R){if(R.to==null){var A=R.marker.find(1,!0);return Xt(e,A.line,aa(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)&&Xt(e,r,F))return!0}function Qt(e){e=yt(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 te=0;te<V.children.length;++te){var oe=V.children[te];if(oe==R)break;r+=oe.height}return r}function Ze(e){if(e.height==0)return 0;for(var r=e.text.length,R,A=e;R=Dt(A);){var F=R.find(0,!0);A=F.from.line,r+=F.from.ch-F.to.ch}for(A=e;R=Gt(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 mr(e){var r=e.display,R=e.doc;r.maxLine=qt(R,R.first),r.maxLineLength=Ze(r.maxLine),r.maxLineChanged=!0,R.iter(function(A){var F=Ze(A);F>r.maxLineLength&&(r.maxLineLength=F,r.maxLine=A)})}var wr=function(e,r,R){this.text=e,mt(this,r),this.height=R?R(this):1};wr.prototype.lineNo=function(){return $r(this)},Re(wr);function rr(e,r,R,A){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),xi(e),mt(e,R);var F=A?A(e):1;F!=e.height&&Ln(e,F)}function ft(e){e.parent=null,xi(e)}var Et={},ht={};function Ct(e,r){if(!e||/^\s*$/.test(e))return null;var R=r.addModeClass?ht:Et;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function Ht(e,r){var R=M("span",null,null,s?"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,te=void 0;A.pos=0,A.addToken=Kt,sr(e.display.measure)&&(te=lt(V,e.doc.direction))&&(A.addToken=Or(A.addToken,te)),A.map=[];var oe=r!=e.display.externalMeasured&&$r(V);Qe(V,A,_a(e,V,oe)),V.styleClasses&&(V.styleClasses.bgClass&&(A.bgClass=B(V.styleClasses.bgClass,A.bgClass||"")),V.styleClasses.textClass&&(A.textClass=B(V.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(xt(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(s){var ue=A.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(A.content.className="cm-tab-wrap-hack")}return ze(e,"renderLine",e,r.line,A.pre),A.pre.className&&(A.textClass=B(A.pre.className,A.textClass||"")),A}function nr(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 Kt(e,r,R,A,F,V,te){if(!r)return;var oe=e.splitSpaces?vr(r,e.trailingSpace):r,ue=e.cm.state.specialChars,me=!1,Ne;if(!ue.test(r))e.col+=r.length,Ne=document.createTextNode(oe),e.map.push(e.pos,e.pos+r.length,Ne),w&&p<9&&(me=!0),e.pos+=r.length;else{Ne=document.createDocumentFragment();for(var We=0;;){ue.lastIndex=We;var nt=ue.exec(r),Je=nt?nt.index-We:r.length-We;if(Je){var vt=document.createTextNode(oe.slice(We,We+Je));w&&p<9?Ne.appendChild(T("span",[vt])):Ne.appendChild(vt),e.map.push(e.pos,e.pos+Je,vt),e.col+=Je,e.pos+=Je}if(!nt)break;We+=Je+1;var Pt=void 0;if(nt[0]==" "){var Ft=e.cm.options.tabSize,Vt=Ft-e.col%Ft;Pt=Ne.appendChild(T("span",ae(Vt),"cm-tab")),Pt.setAttribute("role","presentation"),Pt.setAttribute("cm-text"," "),e.col+=Vt}else nt[0]=="\r"||nt[0]==`
|
|
|
`?(Pt=Ne.appendChild(T("span",nt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Pt.setAttribute("cm-text",nt[0]),e.col+=1):(Pt=e.cm.options.specialCharPlaceholder(nt[0]),Pt.setAttribute("cm-text",nt[0]),w&&p<9?Ne.appendChild(T("span",[Pt])):Ne.appendChild(Pt),e.col+=1);e.map.push(e.pos,e.pos+1,Pt),e.pos++}}if(e.trailingSpace=oe.charCodeAt(r.length-1)==32,R||A||F||me||V||te){var or=R||"";A&&(or+=A),F&&(or+=F);var $t=T("span",[Ne],or,V);if(te)for(var hr in te)te.hasOwnProperty(hr)&&hr!="style"&&hr!="class"&&$t.setAttribute(hr,te[hr]);return e.content.appendChild($t)}e.content.appendChild(Ne)}function vr(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 Or(e,r){return function(R,A,F,V,te,oe,ue){F=F?F+" cm-force-border":"cm-force-border";for(var me=R.pos,Ne=me+A.length;;){for(var We=void 0,nt=0;nt<r.length&&!(We=r[nt],We.to>me&&We.from<=me);nt++);if(We.to>=Ne)return e(R,A,F,V,te,oe,ue);e(R,A.slice(0,We.to-me),F,V,null,oe,ue),V=null,A=A.slice(We.to-me),me=We.to}}}function lr(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 Qe(e,r,R){var A=e.markedSpans,F=e.text,V=0;if(!A){for(var te=1;te<R.length;te+=2)r.addToken(r,F.slice(V,V=R[te]),Ct(R[te+1],r.cm.options));return}for(var oe=F.length,ue=0,me=1,Ne="",We,nt,Je=0,vt,Pt,Ft,Vt,or;;){if(Je==ue){vt=Pt=Ft=nt="",or=null,Vt=null,Je=Infinity;for(var $t=[],hr=void 0,kr=0;kr<A.length;++kr){var Rr=A[kr],tn=Rr.marker;if(tn.type=="bookmark"&&Rr.from==ue&&tn.widgetNode)$t.push(tn);else if(Rr.from<=ue&&(Rr.to==null||Rr.to>ue||tn.collapsed&&Rr.to==ue&&Rr.from==ue)){if(Rr.to!=null&&Rr.to!=ue&&Je>Rr.to&&(Je=Rr.to,Pt=""),tn.className&&(vt+=" "+tn.className),tn.css&&(nt=(nt?nt+";":"")+tn.css),tn.startStyle&&Rr.from==ue&&(Ft+=" "+tn.startStyle),tn.endStyle&&Rr.to==Je&&(hr||(hr=[])).push(tn.endStyle,Rr.to),tn.title&&((or||(or={})).title=tn.title),tn.attributes)for(var Dn in tn.attributes)(or||(or={}))[Dn]=tn.attributes[Dn];tn.collapsed&&(!Vt||_t(Vt.marker,tn)<0)&&(Vt=Rr)}else Rr.from>ue&&Je>Rr.from&&(Je=Rr.from)}if(hr)for(var ca=0;ca<hr.length;ca+=2)hr[ca+1]==Je&&(Pt+=" "+hr[ca]);if(!Vt||Vt.from==ue)for(var Wn=0;Wn<$t.length;++Wn)lr(r,0,$t[Wn]);if(Vt&&(Vt.from||0)==ue){if(lr(r,(Vt.to==null?oe+1:Vt.to)-ue,Vt.marker,Vt.from==null),Vt.to==null)return;Vt.to==ue&&(Vt=!1)}}if(ue>=oe)break;for(var Ga=Math.min(oe,Je);;){if(Ne){var Ua=ue+Ne.length;if(!Vt){var qn=Ua>Ga?Ne.slice(0,Ga-ue):Ne;r.addToken(r,qn,We?We+vt:vt,Ft,ue+qn.length==Je?Pt:"",nt,or)}if(Ua>=Ga){Ne=Ne.slice(Ga-ue),ue=Ga;break}ue=Ua,Ft=""}Ne=F.slice(V,V=R[me++]),We=Ct(R[me++],r.cm.options)}}}function Mt(e,r,R){this.line=r,this.rest=er(r),this.size=this.rest?$r(q(this.rest))-R+1:1,this.node=this.text=null,this.hidden=jt(e,r)}function Gr(e,r,R){for(var A=[],F,V=r;V<R;V=F){var te=new Mt(e.doc,qt(e.doc,V),V);F=V+te.size,A.push(te)}return A}var Ur=null;function ar(e){Ur?Ur.ops.push(e):e.ownsGroup=Ur={ops:[e],delayedCallbacks:[]}}function gr(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 xr(e,r){var R=e.ownsGroup;if(!R)return;try{gr(R)}finally{Ur=null,r(R)}}var At=null;function Bt(e,r){var R=Ye(e,r);if(!R.length)return;var A=Array.prototype.slice.call(arguments,2),F;Ur?F=Ur.delayedCallbacks:At?F=At:(F=At=[],setTimeout(ir,0));for(var V=function(oe){F.push(function(){return R[oe].apply(null,A)})},te=0;te<R.length;++te)V(te)}function ir(){var e=At;At=null;for(var r=0;r<e.length;++r)e[r]()}function zt(e,r,R,A){for(var F=0;F<r.changes.length;F++){var V=r.changes[F];V=="text"?Tt(e,r):V=="gutter"?Kr(e,r,R,A):V=="class"?yr(e,r):V=="widget"&&Xr(e,r,A)}r.changes=null}function ct(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&&p<8&&(e.node.style.zIndex=2)),e.node}function dt(e,r){var R=r.bgClass?r.bgClass+" "+(r.line.bgClass||""):r.line.bgClass;if(R&&(R+=" CodeMirror-linebackground"),r.background)R?r.background.className=R:(r.background.parentNode.removeChild(r.background),r.background=null);else if(R){var A=ct(r);r.background=A.insertBefore(T("div",null,R),A.firstChild),e.display.input.setUneditable(r.background)}}function kt(e,r){var R=e.display.externalMeasured;return R&&R.line==r.line?(e.display.externalMeasured=null,r.measure=R.measure,R.built):Ht(e,r)}function Tt(e,r){var R=r.text.className,A=kt(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,yr(e,r)):R&&(r.text.className=R)}function yr(e,r){dt(e,r),r.line.wrapClass?ct(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 Kr(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=ct(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 te=ct(r),oe=r.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px");if(e.display.input.setUneditable(oe),te.insertBefore(oe,r.text),r.line.gutterClass&&(oe.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!V||!V["CodeMirror-linenumbers"])&&(r.lineNumber=oe.appendChild(T("div",fa(e.options,R),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+A.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),V)for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var me=e.display.gutterSpecs[ue].className,Ne=V.hasOwnProperty(me)&&V[me];Ne&&oe.appendChild(T("div",[Ne],"CodeMirror-gutter-elt","left: "+A.gutterLeft[me]+"px; width: "+A.gutterWidth[me]+"px"))}}}function Xr(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);Br(e,r,R)}function pr(e,r,R,A){var F=kt(e,r);return r.text=r.node=F.pre,F.bgClass&&(r.bgClass=F.bgClass),F.textClass&&(r.textClass=F.textClass),yr(e,r),Kr(e,r,R,A),Br(e,r,A),r.node}function Br(e,r,R){if(Tr(e,r.line,r,R,!0),r.rest)for(var A=0;A<r.rest.length;A++)Tr(e,r.rest[A],r,R,!1)}function Tr(e,r,R,A,F){if(!r.widgets)return;for(var V=ct(R),te=0,oe=r.widgets;te<oe.length;++te){var ue=oe[te],me=T("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||me.setAttribute("cm-ignore-events","true"),Jr(ue,me,R,A),e.display.input.setUneditable(me),F&&ue.above?V.insertBefore(me,R.gutter||R.text):V.appendChild(me),Bt(ue,"redraw")}}function Jr(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 Dr(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!N(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;"),y(r.display.measure,T("div",[e.node],null,R))}return e.height=e.node.parentNode.offsetHeight}function Qr(e,r){for(var R=Ie(r);R!=e.wrapper;R=R.parentNode)if(!R||R.nodeType==1&&R.getAttribute("cm-ignore-events")=="true"||R.parentNode==e.sizer&&R!=e.mover)return!0}function kn(e){return e.lineSpace.offsetTop}function Ae(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ue(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=y(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 He(e){return ce-e.display.nativeBarWidth}function Le(e){return e.display.scroller.clientWidth-He(e)-e.display.barWidth}function he(e){return e.display.scroller.clientHeight-He(e)-e.display.barHeight}function Se(e,r,R){var A=e.options.lineWrapping,F=A&&Le(e);if(!r.measure.heights||A&&r.measure.width!=F){var V=r.measure.heights=[];if(A){r.measure.width=F;for(var te=r.text.firstChild.getClientRects(),oe=0;oe<te.length-1;oe++){var ue=te[oe],me=te[oe+1];Math.abs(ue.bottom-me.bottom)>2&&V.push((ue.bottom+me.top)/2-R.top)}}V.push(R.bottom-R.top)}}function ge(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($r(e.rest[F])>R)return{map:e.measure.maps[F],cache:e.measure.caches[F],before:!0}}function Pe(e,r){r=yt(r);var R=$r(r),A=e.display.externalMeasured=new Mt(e.doc,r,R);A.lineN=R;var F=A.built=Ht(e,A);return A.text=F.pre,y(e.display.lineMeasure,F.pre),A}function Fe(e,r,R,A){return Ge(e,je(e,r),R,A)}function Be(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[xn(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=$r(r),A=Be(e,R);A&&!A.text?A=null:A&&A.changes&&(zt(e,A,R,An(e)),e.curOp.forceUpdate=!0),A||(A=Pe(e,r));var F=ge(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||""),te;return r.cache.hasOwnProperty(V)?te=r.cache[V]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(Se(e,r.view,r.rect),r.hasHeights=!0),te=Nt(e,r,R,A),te.bogus||(r.cache[V]=te)),{left:te.left,right:te.right,top:F?te.rtop:te.top,bottom:F?te.rbottom:te.bottom}}var st={left:0,right:0,top:0,bottom:0};function wt(e,r,R){for(var A,F,V,te,oe,ue,me=0;me<e.length;me+=3)if(oe=e[me],ue=e[me+1],r<oe?(F=0,V=1,te="left"):r<ue?(F=r-oe,V=F+1):(me==e.length-3||r==ue&&e[me+3]>r)&&(V=ue-oe,F=V-1,r>=ue&&(te="right")),F!=null){if(A=e[me+2],oe==ue&&R==(A.insertLeft?"left":"right")&&(te=R),R=="left"&&F==0)for(;me&&e[me-2]==e[me-3]&&e[me-1].insertLeft;)A=e[(me-=3)+2],te="left";if(R=="right"&&F==ue-oe)for(;me<e.length-3&&e[me+3]==e[me+4]&&!e[me+5].insertLeft;)A=e[(me+=3)+2],te="right";break}return{node:A,start:F,end:V,collapse:te,coverStart:oe,coverEnd:ue}}function Ot(e,r){var R=st;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 Nt(e,r,R,A){var F=wt(r.map,R,A),V=F.node,te=F.start,oe=F.end,ue=F.collapse,me;if(V.nodeType==3){for(var Ne=0;Ne<4;Ne++){for(;te&&de(r.line.text.charAt(F.coverStart+te));)--te;for(;F.coverStart+oe<F.coverEnd&&de(r.line.text.charAt(F.coverStart+oe));)++oe;if(w&&p<9&&te==0&&oe==F.coverEnd-F.coverStart?me=V.parentNode.getBoundingClientRect():me=Ot(k(V,te,oe).getClientRects(),A),me.left||me.right||te==0)break;oe=te,te=te-1,ue="right"}w&&p<11&&(me=br(e.display.measure,me))}else{te>0&&(ue=A="right");var We;e.options.lineWrapping&&(We=V.getClientRects()).length>1?me=We[A=="right"?We.length-1:0]:me=V.getBoundingClientRect()}if(w&&p<9&&!te&&(!me||!me.left&&!me.right)){var nt=V.parentNode.getClientRects()[0];nt?me={left:nt.left,right:nt.left+Hn(e.display),top:nt.top,bottom:nt.bottom}:me=st}for(var Je=me.top-r.rect.top,vt=me.bottom-r.rect.top,Pt=(Je+vt)/2,Ft=r.view.measure.heights,Vt=0;Vt<Ft.length-1&&!(Pt<Ft[Vt]);Vt++);var or=Vt?Ft[Vt-1]:0,$t=Ft[Vt],hr={left:(ue=="right"?me.right:me.left)-r.rect.left,right:(ue=="left"?me.left:me.right)-r.rect.left,top:or,bottom:$t};return!me.left&&!me.right&&(hr.bogus=!0),e.options.singleCursorHeightPerLine||(hr.rtop=Je,hr.rbottom=vt),hr}function br(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Fr(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 Mr(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 Pr(e){e.display.externalMeasure=null,b(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)Mr(e.display.view[r])}function jr(e){Pr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Ar(){return a&&E?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Wr(){return a&&E?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Hr(e){var r=0;if(e.widgets)for(var R=0;R<e.widgets.length;++R)e.widgets[R].above&&(r+=Dr(e.widgets[R]));return r}function qr(e,r,R,A,F){if(!F){var V=Hr(r);R.top+=V,R.bottom+=V}if(A=="line")return R;A||(A="local");var te=Qt(r);if(A=="local"?te+=kn(e.display):te-=e.display.viewOffset,A=="page"||A=="window"){var oe=e.display.lineSpace.getBoundingClientRect();te+=oe.top+(A=="window"?0:Wr());var ue=oe.left+(A=="window"?0:Ar());R.left+=ue,R.right+=ue}return R.top+=te,R.bottom+=te,R}function Vr(e,r,R){if(R=="div")return r;var A=r.left,F=r.top;if(R=="page")A-=Ar(),F-=Wr();else if(R=="local"||!R){var V=e.display.sizer.getBoundingClientRect();A+=V.left,F+=V.top}var te=e.display.lineSpace.getBoundingClientRect();return{left:A-te.left,top:F-te.top}}function mn(e,r,R,A,F){return A||(A=qt(e.doc,r.line)),qr(e,A,Fe(e,A,r.ch,F),R)}function Yr(e,r,R,A,F,V){A=A||qt(e.doc,r.line),F||(F=je(e,A));function te(vt,Pt){var Ft=Ge(e,F,vt,Pt?"right":"left",V);return Pt?Ft.left=Ft.right:Ft.right=Ft.left,qr(e,A,Ft,R)}var oe=lt(A,e.doc.direction),ue=r.ch,me=r.sticky;if(ue>=A.text.length?(ue=A.text.length,me="before"):ue<=0&&(ue=0,me="after"),!oe)return te(me=="before"?ue-1:ue,me=="before");function Ne(vt,Pt,Ft){var Vt=oe[Pt],or=Vt.level==1;return te(Ft?vt-1:vt,or!=Ft)}var We=at(oe,ue,me),nt=Xe,Je=Ne(ue,We,me=="before");return nt!=null&&(Je.other=Ne(ue,nt,me!="before")),Je}function _r(e,r){var R=0;r=Er(e.doc,r),e.options.lineWrapping||(R=Hn(e.display)*r.ch);var A=qt(e.doc,r.line),F=Qt(A)+kn(e.display);return{left:R,right:R,top:F,bottom:F+A.height}}function Sr(e,r,R,A,F){var V=Lt(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 Sr(A.first,0,null,-1,-1);var F=Pn(A,R),V=A.first+A.size-1;if(F>V)return Sr(A.first+A.size-1,qt(A,V).text.length,null,1,1);r<0&&(r=0);for(var te=qt(A,F);;){var oe=On(e,te,F,r,R),ue=It(te,oe.ch+(oe.xRel>0||oe.outside>0?1:0));if(!ue)return oe;var me=ue.find(1);if(me.line==F)return me;te=qt(A,F=me.line)}}function Zr(e,r,R,A){A-=Hr(r);var F=r.text.length,V=Ke(function(te){return Ge(e,R,te-1).bottom<=A},F,0);return F=Ke(function(te){return Ge(e,R,te).top>A},V,F),{begin:V,end:F}}function dr(e,r,R,A){R||(R=je(e,r));var F=qr(e,r,Ge(e,R,A),"line").top;return Zr(e,r,R,F)}function nn(e,r,R,A){return e.bottom<=R?!1:e.top>R?!0:(A?e.left:e.right)>r}function On(e,r,R,A,F){F-=Qt(r);var V=je(e,r),te=Hr(r),oe=0,ue=r.text.length,me=!0,Ne=lt(r,e.doc.direction);if(Ne){var We=(e.options.lineWrapping?En:sn)(e,r,R,V,Ne,A,F);me=We.level!=1,oe=me?We.from:We.to-1,ue=me?We.to:We.from-1}var nt=null,Je=null,vt=Ke(function(kr){var Rr=Ge(e,V,kr);return Rr.top+=te,Rr.bottom+=te,nn(Rr,A,F,!1)?(Rr.top<=F&&Rr.left<=A&&(nt=kr,Je=Rr),!0):!1},oe,ue),Pt,Ft,Vt=!1;if(Je){var or=A-Je.left<Je.right-A,$t=or==me;vt=nt+($t?0:1),Ft=$t?"after":"before",Pt=or?Je.left:Je.right}else{!me&&(vt==ue||vt==oe)&&vt++,Ft=vt==0?"after":vt==r.text.length?"before":Ge(e,V,vt-(me?1:0)).bottom+te<=F==me?"after":"before";var hr=Yr(e,Lt(R,vt,Ft),"line",r,V);Pt=hr.left,Vt=F<hr.top?-1:F>=hr.bottom?1:0}return vt=xe(r.text,vt,1),Sr(R,vt,Ft,Vt,A-Pt)}function sn(e,r,R,A,F,V,te){var oe=Ke(function(We){var nt=F[We],Je=nt.level!=1;return nn(Yr(e,Lt(R,Je?nt.to:nt.from,Je?"before":"after"),"line",r,A),V,te,!0)},0,F.length-1),ue=F[oe];if(oe>0){var me=ue.level!=1,Ne=Yr(e,Lt(R,me?ue.from:ue.to,me?"after":"before"),"line",r,A);nn(Ne,V,te,!0)&&Ne.top>te&&(ue=F[oe-1])}return ue}function En(e,r,R,A,F,V,te){var oe=Zr(e,r,A,te),ue=oe.begin,me=oe.end;/\s/.test(r.text.charAt(me-1))&&me--;for(var Ne=null,We=null,nt=0;nt<F.length;nt++){var Je=F[nt];if(Je.from>=me||Je.to<=ue)continue;var vt=Je.level!=1,Pt=Ge(e,A,vt?Math.min(me,Je.to)-1:Math.max(ue,Je.from)).right,Ft=Pt<V?V-Pt+1e9:Pt-V;(!Ne||We>Ft)&&(Ne=Je,We=Ft)}return Ne||(Ne=F[F.length-1]),Ne.from<ue&&(Ne={from:ue,to:Ne.to,level:Ne.level}),Ne.to>me&&(Ne={from:Ne.from,to:me,level:Ne.level}),Ne}var dn;function jn(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"))}y(e.measure,dn);var R=dn.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),b(e.measure),R||1}function Hn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=T("span","xxxxxxxxxx"),R=T("pre",[r],"CodeMirror-line-like");y(e.measure,R);var A=r.getBoundingClientRect(),F=(A.right-A.left)/10;return F>2&&(e.cachedCharWidth=F),F||10}function An(e){for(var r=e.display,R={},A={},F=r.gutters.clientLeft,V=r.gutters.firstChild,te=0;V;V=V.nextSibling,++te){var oe=e.display.gutterSpecs[te].className;R[oe]=V.offsetLeft+V.clientLeft+F,A[oe]=V.clientWidth}return{fixedPos:Zn(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:R,gutterWidth:A,wrapperWidth:r.wrapper.clientWidth}}function Zn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Na(e){var r=jn(e.display),R=e.options.lineWrapping,A=R&&Math.max(5,e.display.scroller.clientWidth/Hn(e.display)-3);return function(F){if(jt(e.doc,F))return 0;var V=0;if(F.widgets)for(var te=0;te<F.widgets.length;te++)F.widgets[te].height&&(V+=F.widgets[te].height);return R?V+(Math.ceil(F.text.length/A)||1)*r:V+r}}function ua(e){var r=e.doc,R=Na(e);r.iter(function(A){var F=R(A);F!=A.height&&Ln(A,F)})}function Kn(e,r,R,A){var F=e.display;if(!R&&Ie(r).getAttribute("cm-not-content")=="true")return null;var V,te,oe=F.lineSpace.getBoundingClientRect();try{V=r.clientX-oe.left,te=r.clientY-oe.top}catch(We){return null}var ue=zr(e,V,te),me;if(A&&ue.xRel>0&&(me=qt(e.doc,ue.line).text).length==ue.ch){var Ne=G(me,me.length,e.options.tabSize)-me.length;ue=Lt(ue.line,Math.max(0,Math.round((V-Ue(e.display).left)/Hn(e.display))-Ne))}return ue}function xn(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 _n(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)Nn&&Yt(e.doc,r)<F.viewTo&&Cn(e);else if(R<=F.viewFrom)Nn&&Wt(e.doc,R+A)>F.viewFrom?Cn(e):(F.viewFrom+=A,F.viewTo+=A);else if(r<=F.viewFrom&&R>=F.viewTo)Cn(e);else if(r<=F.viewFrom){var V=Un(e,R,R+A,1);V?(F.view=F.view.slice(V.index),F.viewFrom=V.lineN,F.viewTo+=A):Cn(e)}else if(R>=F.viewTo){var te=Un(e,r,r,-1);te?(F.view=F.view.slice(0,te.index),F.viewTo=te.lineN):Cn(e)}else{var oe=Un(e,r,r,-1),ue=Un(e,R,R+A,1);oe&&ue?(F.view=F.view.slice(0,oe.index).concat(Gr(e,oe.lineN,ue.lineN)).concat(F.view.slice(ue.index)),F.viewTo+=A):Cn(e)}var me=F.externalMeasured;me&&(R<me.lineN?me.lineN+=A:r<me.lineN+me.size&&(F.externalMeasured=null))}function Rn(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[xn(e,r)];if(V.node==null)return;var te=V.changes||(V.changes=[]);ie(te,R)==-1&&te.push(R)}function Cn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Un(e,r,R,A){var F=xn(e,r),V,te=e.display.view;if(!Nn||R==e.doc.first+e.doc.size)return{index:F,lineN:R};for(var oe=e.display.viewFrom,ue=0;ue<F;ue++)oe+=te[ue].size;if(oe!=r){if(A>0){if(F==te.length-1)return null;V=oe+te[F].size-r,F++}else V=oe-r;r+=V,R+=V}for(;Yt(e.doc,R)!=R;){if(F==(A<0?0:te.length-1))return null;R+=A*te[F-(A<0?1:0)].size,F+=A}return{index:F,lineN:R}}function ga(e,r,R){var A=e.display,F=A.view;F.length==0||r>=A.viewTo||R<=A.viewFrom?(A.view=Gr(e,r,R),A.viewFrom=r):(A.viewFrom>r?A.view=Gr(e,r,A.viewFrom).concat(A.view):A.viewFrom<r&&(A.view=A.view.slice(xn(e,r))),A.viewFrom=r,A.viewTo<R?A.view=A.view.concat(Gr(e,A.viewTo,R)):A.viewTo>R&&(A.view=A.view.slice(0,xn(e,R)))),A.viewTo=R}function Va(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 hn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ca(e,r){r===void 0&&(r=!0);for(var R=e.doc,A={},F=A.cursors=document.createDocumentFragment(),V=A.selection=document.createDocumentFragment(),te=0;te<R.sel.ranges.length;te++){if(!r&&te==R.sel.primIndex)continue;var oe=R.sel.ranges[te];if(oe.from().line>=e.display.viewTo||oe.to().line<e.display.viewFrom)continue;var ue=oe.empty();(ue||e.options.showCursorWhenSelecting)&&Oa(e,oe.head,F),ue||fn(e,oe,V)}return A}function Oa(e,r,R){var A=Yr(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 vn(e,r){return e.top-r.top||e.left-r.left}function fn(e,r,R){var A=e.display,F=e.doc,V=document.createDocumentFragment(),te=Ue(e.display),oe=te.left,ue=Math.max(A.sizerWidth,Le(e)-A.sizer.offsetLeft)-te.right,me=F.direction=="ltr";function Ne($t,hr,kr,Rr){hr<0&&(hr=0),hr=Math.round(hr),Rr=Math.round(Rr),V.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+$t+`px;
|
|
|
top: `+hr+"px; width: "+(kr==null?ue-$t:kr)+`px;
|
|
|
height: `+(Rr-hr)+"px"))}function We($t,hr,kr){var Rr=qt(F,$t),tn=Rr.text.length,Dn,ca;function Wn(qn,Ba){return mn(e,Lt($t,qn),"div",Rr,Ba)}function Ga(qn,Ba,ba){var sa=dr(e,Rr,null,qn),ea=Ba=="ltr"==(ba=="after")?"left":"right",zn=ba=="after"?sa.begin:sa.end-(/\s/.test(Rr.text.charAt(sa.end-1))?2:1);return Wn(zn,ea)[ea]}var Ua=lt(Rr,F.direction);return Ve(Ua,hr||0,kr==null?tn:kr,function(qn,Ba,ba,sa){var ea=ba=="ltr",zn=Wn(qn,ea?"left":"right"),Wa=Wn(Ba-1,ea?"right":"left"),lo=hr==null&&qn==0,Ui=kr==null&&Ba==tn,Sa=sa==0,bi=!Ua||sa==Ua.length-1;if(Wa.top-zn.top<=3){var da=(me?lo:Ui)&&Sa,ps=(me?Ui:lo)&&bi,Di=da?oe:(ea?zn:Wa).left,Gi=ps?ue:(ea?Wa:zn).right;Ne(Di,zn.top,Gi-Di,zn.bottom)}else{var Xi,Pa,uo,ms;ea?(Xi=me&&lo&&Sa?oe:zn.left,Pa=me?ue:Ga(qn,ba,"before"),uo=me?oe:Ga(Ba,ba,"after"),ms=me&&Ui&&bi?ue:Wa.right):(Xi=me?Ga(qn,ba,"before"):oe,Pa=!me&&lo&&Sa?ue:zn.right,uo=!me&&Ui&&bi?oe:Wa.left,ms=me?Ga(Ba,ba,"after"):ue),Ne(Xi,zn.top,Pa-Xi,zn.bottom),zn.bottom<Wa.top&&Ne(oe,zn.bottom,null,Wa.top),Ne(uo,Wa.top,ms-uo,Wa.bottom)}(!Dn||vn(zn,Dn)<0)&&(Dn=zn),vn(Wa,Dn)<0&&(Dn=Wa),(!ca||vn(zn,ca)<0)&&(ca=zn),vn(Wa,ca)<0&&(ca=Wa)}),{start:Dn,end:ca}}var nt=r.from(),Je=r.to();if(nt.line==Je.line)We(nt.line,nt.ch,Je.ch);else{var vt=qt(F,nt.line),Pt=qt(F,Je.line),Ft=yt(vt)==yt(Pt),Vt=We(nt.line,nt.ch,Ft?vt.text.length+1:null).end,or=We(Je.line,Ft?0:null,Je.ch).start;Ft&&(Vt.top<or.top-2?(Ne(Vt.right,Vt.top,null,Vt.bottom),Ne(oe,or.top,or.left,or.bottom)):Ne(Vt.right,Vt.top,or.left-Vt.right,Vt.bottom)),Vt.bottom<or.top&&Ne(oe,Vt.bottom,null,or.top)}R.appendChild(V)}function Bn(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()||ri(e),r.cursorDiv.style.visibility=(R=!R)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Bi(e){e.state.focused||(e.display.input.focus(),ti(e))}function _i(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ri(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,z(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),s&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Bn(e)}function ri(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(ze(e,"blur",e,r),e.state.focused=!1,x(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Li(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,te=void 0,oe=0;if(F.hidden)continue;if(w&&p<8){var ue=F.node.offsetTop+F.node.offsetHeight;te=ue-R,R=ue}else{var me=F.node.getBoundingClientRect();te=me.bottom-me.top,!V&&F.text.firstChild&&(oe=F.text.firstChild.getBoundingClientRect().right-me.left-1)}var Ne=F.line.height-te;if((Ne>.005||Ne<-.005)&&(Ln(F.line,te),wi(F.line),F.rest))for(var We=0;We<F.rest.length;We++)wi(F.rest[We]);if(oe>e.display.sizerWidth){var nt=Math.ceil(oe/Hn(e.display));nt>e.display.maxLineLength&&(e.display.maxLineLength=nt,e.display.maxLine=F.line,e.display.maxLineChanged=!0)}}}function wi(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 Mi(e,r,R){var A=R&&R.top!=null?Math.max(0,R.top):e.scroller.scrollTop;A=Math.floor(A-kn(e));var F=R&&R.bottom!=null?R.bottom:A+e.wrapper.clientHeight,V=Pn(r,A),te=Pn(r,F);if(R&&R.ensure){var oe=R.ensure.from.line,ue=R.ensure.to.line;oe<V?(V=oe,te=Pn(r,Qt(qt(r,oe))+e.wrapper.clientHeight)):Math.min(ue,r.lastLine())>=te&&(V=Pn(r,Qt(qt(r,ue))-e.wrapper.clientHeight),te=ue)}return{from:V,to:Math.max(te,V+1)}}function Wi(e,r){if(rt(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&&!v){var V=T("div","\u200B",null,`position: absolute;
|
|
|
top: `+(r.top-R.viewOffset-kn(e.display))+`px;
|
|
|
height: `+(r.bottom-r.top+He(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 Vi(e,r,R,A){A==null&&(A=0);var F;!e.options.lineWrapping&&r==R&&(r=r.ch?Lt(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,R=r.sticky=="before"?Lt(r.line,r.ch+1,"before"):r);for(var V=0;V<5;V++){var te=!1,oe=Yr(e,r),ue=!R||R==r?oe:Yr(e,R);F={left:Math.min(oe.left,ue.left),top:Math.min(oe.top,ue.top)-A,right:Math.max(oe.left,ue.left),bottom:Math.max(oe.bottom,ue.bottom)+A};var me=ni(e,F),Ne=e.doc.scrollTop,We=e.doc.scrollLeft;if(me.scrollTop!=null&&(ii(e,me.scrollTop),Math.abs(e.doc.scrollTop-Ne)>1&&(te=!0)),me.scrollLeft!=null&&(ja(e,me.scrollLeft),Math.abs(e.doc.scrollLeft-We)>1&&(te=!0)),!te)break}return F}function Ii(e,r){var R=ni(e,r);R.scrollTop!=null&&ii(e,R.scrollTop),R.scrollLeft!=null&&ja(e,R.scrollLeft)}function ni(e,r){var R=e.display,A=jn(e.display);r.top<0&&(r.top=0);var F=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,V=he(e),te={};r.bottom-r.top>V&&(r.bottom=r.top+V);var oe=e.doc.height+Ae(R),ue=r.top<A,me=r.bottom>oe-A;if(r.top<F)te.scrollTop=ue?0:r.top;else if(r.bottom>F+V){var Ne=Math.min(r.top,(me?oe:r.bottom)-V);Ne!=F&&(te.scrollTop=Ne)}var We=e.options.fixedGutter?0:R.gutters.offsetWidth,nt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-We,Je=Le(e)-R.gutters.offsetWidth,vt=r.right-r.left>Je;return vt&&(r.right=r.left+Je),r.left<10?te.scrollLeft=0:r.left<nt?te.scrollLeft=Math.max(0,r.left+We-(vt?0:10)):r.right>Je+nt-3&&(te.scrollLeft=r.right+(vt?0:10)-Je),te}function Ti(e,r){if(r==null)return;gi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function vi(e){gi(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function ai(e,r,R){(r!=null||R!=null)&&gi(e),r!=null&&(e.curOp.scrollLeft=r),R!=null&&(e.curOp.scrollTop=R)}function co(e,r){gi(e),e.curOp.scrollToPos=r}function gi(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var R=_r(e,r.from),A=_r(e,r.to);Si(e,R,A,r.margin)}}function Si(e,r,R,A){var F=ni(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});ai(e,F.scrollLeft,F.scrollTop)}function ii(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;C||Ki(e,{top:r}),li(e,r,!0),C&&Ki(e),Hi(e,100)}function li(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 ja(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,on(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function $a(e){var r=e.display,R=r.gutters.offsetWidth,A=Math.round(e.doc.height+Ae(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+He(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:R}}var ur=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),Te(A,"scroll",function(){A.clientHeight&&r(A.scrollTop,"vertical")}),Te(F,"scroll",function(){F.clientWidth&&r(F.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&p<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ur.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}},ur.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ur.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ur.prototype.zeroWidthHack=function(){var e=o&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ee,this.disableVert=new ee},ur.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)},ur.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var fr=function(){};fr.prototype.update=function(){return{bottom:0,right:0}},fr.prototype.setScrollLeft=function(){},fr.prototype.setScrollTop=function(){},fr.prototype.clear=function(){};function Jt(e,r){r||(r=$a(e));var R=e.display.barWidth,A=e.display.barHeight;an(e,r);for(var F=0;F<4&&R!=e.display.barWidth||A!=e.display.barHeight;F++)R!=e.display.barWidth&&e.options.lineWrapping&&Li(e),an(e,$a(e)),R=e.display.barWidth,A=e.display.barHeight}function an(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 Zt={native:ur,null:fr};function ui(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&x(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Zt[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),Te(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"?ja(e,r):ii(e,r)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var $i=0;function Tn(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:++$i},ar(e.curOp)}function Ci(e){var r=e.curOp;r&&xr(r,function(R){for(var A=0;A<R.ops.length;A++)R.ops[A].cm.curOp=null;Do(R)})}function Do(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++)fo(r[V]);for(var te=0;te<r.length;te++)qo(r[te])}function Jo(e){var r=e.cm,R=r.display;Po(r),e.updateMaxLine&&mr(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 Ya(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&Oi(e.cm,e.update)}function Zo(e){var r=e.cm,R=r.display;e.updatedDisplay&&Li(r),e.barMeasure=$a(r),R.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Fe(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+He(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-Le(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=R.input.prepareSelection())}function fo(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&ja(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)&&Jt(r,e.barMeasure),e.updatedDisplay&&gn(r,e.barMeasure),e.selectionChanged&&Bn(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),R&&Bi(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&&li(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&ja(r,e.scrollLeft,!0,!0),e.scrollToPos){var F=Vi(r,Er(A,e.scrollToPos.from),Er(A,e.scrollToPos.to),e.scrollToPos.margin);Wi(r,F)}var V=e.maybeHiddenMarkers,te=e.maybeUnhiddenMarkers;if(V)for(var oe=0;oe<V.length;++oe)V[oe].lines.length||ze(V[oe],"hide");if(te)for(var ue=0;ue<te.length;++ue)te[ue].lines.length&&ze(te[ue],"unhide");R.wrapper.offsetHeight&&(A.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&ze(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function Aa(e,r){if(e.curOp)return r();Tn(e);try{return r()}finally{Ci(e)}}function $n(e,r){return function(){if(e.curOp)return r.apply(e,arguments);Tn(e);try{return r.apply(e,arguments)}finally{Ci(e)}}}function ya(e){return function(){if(this.curOp)return e.apply(this,arguments);Tn(this);try{return e.apply(this,arguments)}finally{Ci(this)}}}function Yn(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);Tn(r);try{return e.apply(this,arguments)}finally{Ci(r)}}}function Hi(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=Qn(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 te=V.styles,oe=V.text.length>e.options.maxHighlightLength?cn(r.mode,A.state):null,ue=Ka(e,V,A,!0);oe&&(A.state=oe),V.styles=ue.styles;var me=V.styleClasses,Ne=ue.classes;Ne?V.styleClasses=Ne:me&&(V.styleClasses=null);for(var We=!te||te.length!=V.styles.length||me!=Ne&&(!me||!Ne||me.bgClass!=Ne.bgClass||me.textClass!=Ne.textClass),nt=0;!We&&nt<te.length;++nt)We=te[nt]!=V.styles[nt];We&&F.push(A.line),V.stateAfter=A.save(),A.nextLine()}else V.text.length<=e.options.maxHighlightLength&&Qa(e,V.text,A),V.stateAfter=A.line%5==0?A.save():null,A.nextLine();if(+new Date>R)return Hi(e,e.options.workDelay),!0}),r.highlightFrontier=A.line,r.modeFrontier=Math.max(r.modeFrontier,A.line),F.length&&Aa(e,function(){for(var V=0;V<F.length;V++)Rn(e,F[V],"text")})}var Ya=function(e,r,R){var A=e.display;this.viewport=r,this.visible=Mi(A,e.doc,r),this.editorIsHidden=!A.wrapper.offsetWidth,this.wrapperHeight=A.wrapper.clientHeight,this.wrapperWidth=A.wrapper.clientWidth,this.oldDisplayWidth=Le(e),this.force=R,this.dims=An(e),this.events=[]};Ya.prototype.signal=function(e,r){Oe(e,r)&&this.events.push(arguments)},Ya.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=He(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=He(e)+"px",r.scrollbarsClipped=!0)}function Lo(e){if(e.hasFocus())return null;var r=K();if(!r||!N(e.display.lineDiv,r))return null;var R={activeElt:r};if(window.getSelection){var A=window.getSelection();A.anchorNode&&A.extend&&N(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&&N(document.body,e.anchorNode)&&N(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 Oi(e,r){var R=e.display,A=e.doc;if(r.editorIsHidden)return Cn(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&&Va(e)==0)return!1;ia(e)&&(Cn(e),r.dims=An(e));var F=A.first+A.size,V=Math.max(r.visible.from-e.options.viewportMargin,A.first),te=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>te&&R.viewTo-te<20&&(te=Math.min(F,R.viewTo)),Nn&&(V=Yt(e.doc,V),te=Wt(e.doc,te));var oe=V!=R.viewFrom||te!=R.viewTo||R.lastWrapHeight!=r.wrapperHeight||R.lastWrapWidth!=r.wrapperWidth;ga(e,V,te),R.viewOffset=Qt(qt(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var ue=Va(e);if(!oe&&ue==0&&!r.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var me=Lo(e);return ue>4&&(R.lineDiv.style.display="none"),Io(e,R.updateLineNumbers,r.dims),ue>4&&(R.lineDiv.style.display=""),R.renderedView=R.view,Mo(me),b(R.cursorDiv),b(R.selectionDiv),R.gutters.style.height=R.sizer.style.minHeight=0,oe&&(R.lastWrapHeight=r.wrapperHeight,R.lastWrapWidth=r.wrapperWidth,Hi(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==Le(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+Ae(e.display)-he(e),R.top)}),r.visible=Mi(e.display,e.doc,R),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else A&&(r.visible=Mi(e.display,e.doc,R));if(!Oi(e,r))break;Li(e);var F=$a(e);hn(e),Jt(e,F),gn(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 Ki(e,r){var R=new Ya(e,r);if(Oi(e,R)){Li(e),Yi(e,R);var A=$a(e);hn(e),Jt(e,A),gn(e,A),R.finish()}}function Io(e,r,R){var A=e.display,F=e.options.lineNumbers,V=A.lineDiv,te=V.firstChild;function oe(vt){var Pt=vt.nextSibling;return s&&o&&e.display.currentWheelTarget==vt?vt.style.display="none":vt.parentNode.removeChild(vt),Pt}for(var ue=A.view,me=A.viewFrom,Ne=0;Ne<ue.length;Ne++){var We=ue[Ne];if(!We.hidden)if(!We.node||We.node.parentNode!=V){var nt=pr(e,We,me,R);V.insertBefore(nt,te)}else{for(;te!=We.node;)te=oe(te);var Je=F&&r!=null&&r<=me&&We.lineNumber;We.changes&&(ie(We.changes,"gutter")>-1&&(Je=!1),zt(e,We,me,R)),Je&&(b(We.lineNumber),We.lineNumber.appendChild(document.createTextNode(fa(e.options,me)))),te=We.node.nextSibling}me+=We.size}for(;te;)te=oe(te)}function Ji(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function gn(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+He(e)+"px"}function on(e){var r=e.display,R=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var A=Zn(r)-r.scroller.scrollLeft+e.doc.scrollLeft,F=r.gutters.offsetWidth,V=A+"px",te=0;te<R.length;te++)if(!R[te].hidden){e.options.fixedGutter&&(R[te].gutter&&(R[te].gutter.style.left=V),R[te].gutterBackground&&(R[te].gutterBackground.style.left=V));var oe=R[te].alignable;if(oe)for(var ue=0;ue<oe.length;ue++)oe[ue].style.left=V}e.options.fixedGutter&&(r.gutters.style.left=A+F+"px")}function ia(e){if(!e.options.lineNumbers)return!1;var r=e.doc,R=fa(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,te=F.offsetWidth-V;return A.lineGutter.style.width="",A.lineNumInnerWidth=Math.max(V,A.lineGutter.offsetWidth-te)+1,A.lineNumWidth=A.lineNumInnerWidth+te,A.lineNumChars=A.lineNumInnerWidth?R.length:-1,A.lineGutter.style.width=A.lineNumWidth+"px",Ji(e.display),!0}return!1}function Ra(e,r){for(var R=[],A=!1,F=0;F<e.length;F++){var V=e[F],te=null;if(typeof V!="string"&&(te=V.style,V=V.className),V=="CodeMirror-linenumbers")if(r)A=!0;else continue;R.push({className:V,style:te})}return r&&!A&&R.push({className:"CodeMirror-linenumbers",style:null}),R}function ki(e){var r=e.gutters,R=e.gutterSpecs;b(r),e.lineGutter=null;for(var A=0;A<R.length;++A){var F=R[A],V=F.className,te=F.style,oe=r.appendChild(T("div",null,"CodeMirror-gutter "+V));te&&(oe.style.cssText=te),V=="CodeMirror-linenumbers"&&(e.lineGutter=oe,oe.style.width=(e.lineNumWidth||1)+"px")}r.style.display=R.length?"":"none",Ji(e)}function ci(e){ki(e.display),_n(e),on(e)}function zi(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: "+ce+"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&&p<8&&(F.gutters.style.zIndex=-1,F.scroller.style.paddingRight=0),!s&&!(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=Ra(A.gutters,A.lineNumbers),ki(F),R.init(F)}var yi=0,oa=null;w?oa=-.53:C?oa=15:a?oa=-.7:h&&(oa=-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 ho(e){var r=Qi(e);return r.x*=oa,r.y*=oa,r}function po(e,r){var R=Qi(r),A=R.x,F=R.y,V=e.display,te=V.scroller,oe=te.scrollWidth>te.clientWidth,ue=te.scrollHeight>te.clientHeight;if(!(A&&oe||F&&ue))return;if(F&&o&&s){e:for(var me=r.target,Ne=V.view;me!=te;me=me.parentNode)for(var We=0;We<Ne.length;We++)if(Ne[We].node==me){e.display.currentWheelTarget=me;break e}}if(A&&!C&&!d&&oa!=null){F&&ue&&ii(e,Math.max(0,te.scrollTop+F*oa)),ja(e,Math.max(0,te.scrollLeft+A*oa)),(!F||F&&ue)&&pe(r),V.wheelStartX=null;return}if(F&&oa!=null){var nt=F*oa,Je=e.doc.scrollTop,vt=Je+V.wrapper.clientHeight;nt<0?Je=Math.max(0,Je+nt-50):vt=Math.min(e.doc.height,vt+nt+50),Ki(e,{top:Je,bottom:vt})}yi<20&&(V.wheelStartX==null?(V.wheelStartX=te.scrollLeft,V.wheelStartY=te.scrollTop,V.wheelDX=A,V.wheelDY=F,setTimeout(function(){if(V.wheelStartX==null)return;var Pt=te.scrollLeft-V.wheelStartX,Ft=te.scrollTop-V.wheelStartY,Vt=Ft&&V.wheelDY&&Ft/V.wheelDY||Pt&&V.wheelDX&&Pt/V.wheelDX;if(V.wheelStartX=V.wheelStartY=null,!Vt)return;oa=(oa*yi+Vt)/(yi+1),++yi},200)):(V.wheelDX+=A,V.wheelDY+=F))}var Da=function(e,r){this.ranges=e,this.primIndex=r};Da.prototype.primary=function(){return this.ranges[this.primIndex]},Da.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(!ha(R.anchor,A.anchor)||!ha(R.head,A.head))return!1}return!0},Da.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new pn(xa(this.ranges[r].anchor),xa(this.ranges[r].head));return new Da(e,this.primIndex)},Da.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Da.prototype.contains=function(e,r){r||(r=e);for(var R=0;R<this.ranges.length;R++){var A=this.ranges[R];if(cr(r,A.from())>=0&&cr(e,A.to())<=0)return R}return-1};var pn=function(e,r){this.anchor=e,this.head=r};pn.prototype.from=function(){return pa(this.anchor,this.head)},pn.prototype.to=function(){return Ma(this.anchor,this.head)},pn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ja(e,r,R){var A=e&&e.options.selectionsMayTouch,F=r[R];r.sort(function(nt,Je){return cr(nt.from(),Je.from())}),R=ie(r,F);for(var V=1;V<r.length;V++){var te=r[V],oe=r[V-1],ue=cr(oe.to(),te.from());if(A&&!te.empty()?ue>0:ue>=0){var me=pa(oe.from(),te.from()),Ne=Ma(oe.to(),te.to()),We=oe.empty()?te.from()==te.head:oe.from()==oe.head;V<=R&&--R,r.splice(--V,2,new pn(We?Ne:me,We?me:Ne))}}return new Da(r,R)}function di(e,r){return new Da([new pn(e,r||e)],0)}function fi(e){return e.text?Lt(e.from.line+e.text.length-1,q(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function mo(e,r){if(cr(e,r.from)<0)return e;if(cr(e,r.to)<=0)return fi(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+=fi(r).ch-r.to.ch),Lt(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 pn(mo(F.anchor,r),mo(F.head,r)))}return Ja(e.cm,R,e.sel.primIndex)}function ko(e,r,R){return e.line==r.line?Lt(R.line,e.ch-r.ch+R.ch):Lt(R.line+(e.line-r.line),e.ch)}function No(e,r,R){for(var A=[],F=Lt(e.first,0),V=F,te=0;te<r.length;te++){var oe=r[te],ue=ko(oe.from,F,V),me=ko(fi(oe),F,V);if(F=oe.to,V=me,R=="around"){var Ne=e.sel.ranges[te],We=cr(Ne.head,Ne.anchor)<0;A[te]=new pn(We?me:ue,We?ue:me)}else A[te]=new pn(ue,ue)}return new Da(A,e.sel.primIndex)}function Ai(e){e.doc.mode=un(e.options,e.doc.modeOption),vo(e)}function vo(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,Hi(e,100),e.state.modeGen++,e.curOp&&_n(e)}function vs(e,r){return r.from.ch==0&&r.to.ch==0&&q(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,$t,hr){rr(or,$t,hr,A),Bt(or,"change",or,r)}function te(or,$t){for(var hr=[],kr=or;kr<$t;++kr)hr.push(new wr(me[kr],F(kr),A));return hr}var oe=r.from,ue=r.to,me=r.text,Ne=qt(e,oe.line),We=qt(e,ue.line),nt=q(me),Je=F(me.length-1),vt=ue.line-oe.line;if(r.full)e.insert(0,te(0,me.length)),e.remove(me.length,e.size-me.length);else if(vs(e,r)){var Pt=te(0,me.length-1);V(We,We.text,Je),vt&&e.remove(oe.line,vt),Pt.length&&e.insert(oe.line,Pt)}else if(Ne==We)if(me.length==1)V(Ne,Ne.text.slice(0,oe.ch)+nt+Ne.text.slice(ue.ch),Je);else{var Ft=te(1,me.length-1);Ft.push(new wr(nt+Ne.text.slice(ue.ch),Je,A)),V(Ne,Ne.text.slice(0,oe.ch)+me[0],F(0)),e.insert(oe.line+1,Ft)}else if(me.length==1)V(Ne,Ne.text.slice(0,oe.ch)+me[0]+We.text.slice(ue.ch),F(0)),e.remove(oe.line+1,vt);else{V(Ne,Ne.text.slice(0,oe.ch)+me[0],F(0)),V(We,nt+We.text.slice(ue.ch),Je);var Vt=te(1,me.length-1);vt>1&&e.remove(oe.line+1,vt-1),e.insert(oe.line+1,Vt)}Bt(e,"change",e,r)}function Ni(e,r,R){function A(F,V,te){if(F.linked)for(var oe=0;oe<F.linked.length;++oe){var ue=F.linked[oe];if(ue.doc==V)continue;var me=te&&ue.sharedHist;if(R&&!me)continue;r(ue.doc,me),A(ue.doc,F,me)}}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,ua(e),Ai(e),ys(e),e.options.lineWrapping||mr(e),e.options.mode=r.modeOption,_n(e)}function ys(e){(e.doc.direction=="rtl"?z:x)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Aa(e,function(){ys(e),_n(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:xa(r.from),to:fi(r),text:Xn(e,r.from,r.to)};return xs(e,R,r.from.line,r.to.line+1),Ni(e,function(A){return xs(A,R,r.from.line,r.to.line+1)},!0),R}function bs(e){for(;e.length;){var r=q(e);if(r.ranges)e.pop();else break}}function ml(e,r){if(r)return bs(e.done),q(e.done);if(e.done.length&&!q(e.done).ranges)return q(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),q(e.done)}function Es(e,r,R,A){var F=e.history;F.undone.length=0;var V=+new Date,te,oe;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)=="*"))&&(te=ml(F,F.lastOp==A)))oe=q(te.changes),cr(r.from,r.to)==0&&cr(r.from,oe.to)==0?oe.to=fi(r):te.changes.push(rs(e,r));else{var ue=q(F.done);for((!ue||!ue.ranges)&&Fo(e.sel,F.done),te={changes:[rs(e,r)],generation:F.generation},F.done.push(te);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,oe||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,q(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=q(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(te){te.markedSpans&&((F||(F=r["spans_"+e.id]={}))[V]=te.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=qa(e,r);if(!R)return A;if(!A)return R;for(var F=0;F<R.length;++F){var V=R[F],te=A[F];if(V&&te){e:for(var oe=0;oe<te.length;++oe){for(var ue=te[oe],me=0;me<V.length;++me)if(V[me].marker==ue.marker)continue e;V.push(ue)}}else te&&(R[F]=te)}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?Da.prototype.deepCopy.call(V):V);continue}var te=V.changes,oe=[];A.push({changes:oe});for(var ue=0;ue<te.length;++ue){var me=te[ue],Ne=void 0;if(oe.push({from:me.from,to:me.to,text:me.text}),r)for(var We in me)(Ne=We.match(/^spans_(\d+)$/))&&(ie(r,Number(Ne[1]))>-1&&(q(oe)[We]=me[We],delete me[We]))}}return A}function ns(e,r,R,A){if(A){var F=e.anchor;if(R){var V=cr(r,F)<0;V!=cr(R,F)<0?(F=r,r=R):V!=cr(r,R)<0&&(r=R)}return new pn(F,r)}else return new pn(R||r,r)}function Uo(e,r,R,A,F){F==null&&(F=e.cm&&(e.cm.display.shift||e.extend)),Ta(e,new Da([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 te=Ja(e.cm,A,e.sel.primIndex);Ta(e,te,R)}function as(e,r,R,A){var F=e.sel.ranges.slice(0);F[r]=R,Ta(e,Ja(e.cm,F,e.sel.primIndex),A)}function Ts(e,r,R,A){Ta(e,di(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 pn(Er(e,F[V].anchor),Er(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?Ja(e.cm,A.ranges,A.ranges.length-1):r}function Ss(e,r,R){var A=e.history.done,F=q(A);F&&F.ranges?(A[A.length-1]=r,Bo(e,r,R)):Ta(e,r,R)}function Ta(e,r,R){Bo(e,r,R),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,R)}function Bo(e,r,R){(Oe(e,"beforeSelectionChange")||e.cm&&Oe(e.cm,"beforeSelectionChange"))&&(r=El(e,r,R));var A=R&&R.bias||(cr(r.primary().head,e.sel.primary().head)<0?-1:1);Cs(e,As(e,r,A,!0)),!(R&&R.scroll===!1)&&e.cm&&vi(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)),Bt(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 te=r.ranges[V],oe=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[V],ue=Wo(e,te.anchor,oe&&oe.anchor,R,A),me=Wo(e,te.head,oe&&oe.head,R,A);(F||ue!=te.anchor||me!=te.head)&&(F||(F=r.ranges.slice(0,V)),F[V]=new pn(ue,me))}return F?Ja(e.cm,F,r.primIndex):r}function eo(e,r,R,A,F){var V=qt(e,r.line);if(V.markedSpans)for(var te=0;te<V.markedSpans.length;++te){var oe=V.markedSpans[te],ue=oe.marker,me="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,Ne="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((oe.from==null||(me?oe.from<=r.ch:oe.from<r.ch))&&(oe.to==null||(Ne?oe.to>=r.ch:oe.to>r.ch))){if(F&&(ze(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(V.markedSpans){--te;continue}else break;if(!ue.atomic)continue;if(R){var We=ue.find(A<0?1:-1),nt=void 0;if((A<0?Ne:me)&&(We=Rs(e,We,-A,We&&We.line==r.line?V:null)),We&&We.line==r.line&&(nt=cr(We,R))&&(A<0?nt<0:nt>0))return eo(e,We,r,A,F)}var Je=ue.find(A<0?-1:1);return(A<0?me:Ne)&&(Je=Rs(e,Je,A,Je.line==r.line?V:null)),Je?eo(e,Je,r,A,F):null}}return r}function Wo(e,r,R,A,F){var V=A||1,te=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 te||(e.cantEdit=!0,Lt(e.first,0))}function Rs(e,r,R,A){return R<0&&r.ch==0?r.line>e.first?Er(e,Lt(r.line-1)):null:R>0&&r.ch==(A||qt(e,r.line)).text.length?r.line<e.first+e.size-1?Lt(r.line+1,0):null:new Lt(r.line,r.ch+R)}function Ds(e){e.setSelection(Lt(e.firstLine(),0),Lt(e.lastLine()),Ce)}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,te,oe){F&&(A.from=Er(e,F)),V&&(A.to=Er(e,V)),te&&(A.text=te),oe!==void 0&&(A.origin=oe)}),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 $n(e.cm,to)(e,r,R);if(e.cm.state.suppressEdits)return}if((Oe(e,"beforeChange")||e.cm&&Oe(e.cm,"beforeChange"))&&(r=Ps(e,r,!0),!r))return;var A=Xa&&!R&&ei(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]==""&&cr(r.from,r.to)==0)return;var R=Zi(e,r);Es(e,r,R,e.cm?e.cm.curOp.id:NaN),go(e,r,R,qa(e,r));var A=[];Ni(e,function(F,V){!V&&ie(A,F.history)==-1&&(Ns(F.history,r),A.push(F.history)),go(F,r,null,qa(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,te=e.sel,oe=r=="undo"?F.done:F.undone,ue=r=="undo"?F.undone:F.done,me=0;me<oe.length&&!(V=oe[me],R?V.ranges&&!V.equals(e.sel):!V.ranges);me++);if(me==oe.length)return;for(F.lastOrigin=F.lastSelOrigin=null;;)if(V=oe.pop(),V.ranges){if(Fo(V,ue),R&&!V.equals(e.sel)){Ta(e,V,{clearRedo:!1});return}te=V}else if(A){oe.push(V);return}else break;var Ne=[];Fo(te,ue),ue.push({changes:Ne,generation:F.generation}),F.generation=V.generation||++F.maxGeneration;for(var We=Oe(e,"beforeChange")||e.cm&&Oe(e.cm,"beforeChange"),nt=function(Pt){var Ft=V.changes[Pt];if(Ft.origin=r,We&&!Ps(e,Ft,!1))return oe.length=0,{};Ne.push(rs(e,Ft));var Vt=Pt?Zi(e,Ft):q(oe);go(e,Ft,Vt,_s(e,Ft)),!Pt&&e.cm&&e.cm.scrollIntoView({from:Ft.from,to:fi(Ft)});var or=[];Ni(e,function($t,hr){!hr&&ie(or,$t.history)==-1&&(Ns($t.history,Ft),or.push($t.history)),go($t,Ft,null,_s($t,Ft))})},Je=V.changes.length-1;Je>=0;--Je){var vt=nt(Je);if(vt)return vt.v}}function Ms(e,r){if(r==0)return;if(e.first+=r,e.sel=new Da(se(e.sel.ranges,function(F){return new pn(Lt(F.anchor.line+r,F.anchor.ch),Lt(F.head.line+r,F.head.ch))}),e.sel.primIndex),e.cm){_n(e.cm,e.first,e.first-r,r);for(var R=e.cm.display,A=R.viewFrom;A<R.viewTo;A++)Rn(e.cm,A,"gutter")}}function go(e,r,R,A){if(e.cm&&!e.cm.curOp)return $n(e.cm,go)(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:Lt(e.first,0),to:Lt(r.to.line+F,r.to.ch),text:[q(r.text)],origin:r.origin}}var V=e.lastLine();r.to.line>V&&(r={from:r.from,to:Lt(V,qt(e,V).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Xn(e,r.from,r.to),R||(R=Zi(e,r)),e.cm?xl(e.cm,r,A):ts(e,r,A),Bo(e,R,Ce),e.cantEdit&&Wo(e,Lt(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,r,R){var A=e.doc,F=e.display,V=r.from,te=r.to,oe=!1,ue=V.line;e.options.lineWrapping||(ue=$r(yt(qt(A,V.line))),A.iter(ue,te.line+1,function(Je){if(Je==F.maxLine)return oe=!0,!0})),A.sel.contains(r.from,r.to)>-1&&ke(e),ts(A,r,R,Na(e)),e.options.lineWrapping||(A.iter(ue,V.line+r.text.length,function(Je){var vt=Ze(Je);vt>F.maxLineLength&&(F.maxLine=Je,F.maxLineLength=vt,F.maxLineChanged=!0,oe=!1)}),oe&&(e.curOp.updateMaxLine=!0)),Pi(A,V.line),Hi(e,400);var me=r.text.length-(te.line-V.line)-1;r.full?_n(e):V.line==te.line&&r.text.length==1&&!vs(e.doc,r)?Rn(e,V.line,"text"):_n(e,V.line,te.line+1,me);var Ne=Oe(e,"changes"),We=Oe(e,"change");if(We||Ne){var nt={from:V,to:te,text:r.text,removed:r.removed,origin:r.origin};We&&Bt(e,"change",e,nt),Ne&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(nt)}e.display.selForContextMenu=null}function ro(e,r,R,A,F){var V;A||(A=R),cr(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 Is(e,r,R,A){R<e.line?e.line+=A:r<e.line&&(e.line=r,e.ch=0)}function ks(e,r,R,A){for(var F=0;F<e.length;++F){var V=e[F],te=!0;if(V.ranges){V.copied||(V=e[F]=V.deepCopy(),V.copied=!0);for(var oe=0;oe<V.ranges.length;oe++)Is(V.ranges[oe].anchor,r,R,A),Is(V.ranges[oe].head,r,R,A);continue}for(var ue=0;ue<V.changes.length;++ue){var me=V.changes[ue];if(R<me.from.line)me.from=Lt(me.from.line+A,me.from.ch),me.to=Lt(me.to.line+A,me.to.ch);else if(r<=me.to.line){te=!1;break}}te||(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;ks(e.done,R,A,F),ks(e.undone,R,A,F)}function yo(e,r,R,A){var F=r,V=r;return typeof r=="number"?V=qt(e,Mn(e,r)):F=$r(r),F==null?null:(A(V,F)&&e.cm&&Rn(e.cm,F,R),V)}function bo(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}bo.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,ft(F),Bt(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 Eo(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}Eo.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),te=A.height;if(A.removeInner(e,V),this.height-=te-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 bo))){var oe=[];this.collapse(oe),this.children=[new bo(oe)],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 te=F.lines.length%25+25,oe=te;oe<F.lines.length;){var ue=new bo(F.lines.slice(oe,oe+=25));F.height-=ue.height,this.children.splice(++A,0,ue),ue.parent=this}F.lines=F.lines.slice(0,te),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 Eo(r);if(e.parent){e.size-=R.size,e.height-=R.height;var F=ie(e.parent.children,e);e.parent.children.splice(F+1,0,R)}else{var A=new Eo(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 te=Math.min(r,V-e);if(F.iterN(e,te,R))return!0;if((r-=te)==0)break;e=0}else e-=V}}};var xo=function(e,r,R){if(R)for(var A in R)R.hasOwnProperty(A)&&(this[A]=R[A]);this.doc=e,this.node=r};xo.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,R=this.line,A=$r(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=Dr(this);Ln(R,Math.max(0,R.height-V)),e&&(Aa(e,function(){js(e,R,-V),Rn(e,A,"widget")}),Bt(e,"lineWidgetCleared",e,this,A))},xo.prototype.changed=function(){var e=this,r=this.height,R=this.doc.cm,A=this.line;this.height=null;var F=Dr(this)-r;if(!F)return;jt(this.doc,A)||Ln(A,A.height+F),R&&Aa(R,function(){R.curOp.forceUpdate=!0,js(R,A,F),Bt(R,"lineWidgetChanged",R,e,$r(A))})},Re(xo);function js(e,r,R){Qt(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ti(e,R)}function _l(e,r,R,A){var F=new xo(e,R,A),V=e.cm;return V&&F.noHScroll&&(V.display.alignWidgets=!0),yo(e,r,"widget",function(te){var oe=te.widgets||(te.widgets=[]);if(F.insertAt==null?oe.push(F):oe.splice(Math.min(oe.length-1,Math.max(0,F.insertAt)),0,F),F.line=te,V&&!jt(e,te)){var ue=Qt(te)<e.scrollTop;Ln(te,te.height+Dr(F)),ue&&Ti(V,F.height),V.curOp.forceUpdate=!0}return!0}),V&&Bt(V,"lineWidgetAdded",V,F,typeof r=="number"?r:$r(r)),F}var Fs=0,ji=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++Fs};ji.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&Tn(e),Oe(this,"clear")){var R=this.find();R&&Bt(this,"clear",R.from,R.to)}for(var A=null,F=null,V=0;V<this.lines.length;++V){var te=this.lines[V],oe=aa(te.markedSpans,this);e&&!this.collapsed?Rn(e,$r(te),"text"):e&&(oe.to!=null&&(F=$r(te)),oe.from!=null&&(A=$r(te))),te.markedSpans=oi(te.markedSpans,oe),oe.from==null&&this.collapsed&&!jt(this.doc,te)&&e&&Ln(te,jn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var me=yt(this.lines[ue]),Ne=Ze(me);Ne>e.display.maxLineLength&&(e.display.maxLine=me,e.display.maxLineLength=Ne,e.display.maxLineChanged=!0)}A!=null&&e&&this.collapsed&&_n(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&&Bt(e,"markerCleared",e,this,A,F),r&&Ci(e),this.parent&&this.parent.clear()},ji.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],te=aa(V.markedSpans,this);if(te.from!=null&&(R=Lt(r?V:$r(V),te.from),e==-1))return R;if(te.to!=null&&(A=Lt(r?V:$r(V),te.to),e==1))return A}return R&&{from:R,to:A}},ji.prototype.changed=function(){var e=this,r=this.find(-1,!0),R=this,A=this.doc.cm;if(!r||!A)return;Aa(A,function(){var F=r.line,V=$r(r.line),te=Be(A,V);if(te&&(Mr(te),A.curOp.selectionChanged=A.curOp.forceUpdate=!0),A.curOp.updateMaxLine=!0,!jt(R.doc,F)&&R.height!=null){var oe=R.height;R.height=null;var ue=Dr(R)-oe;ue&&Ln(F,F.height+ue)}Bt(A,"markerChanged",A,e)})},ji.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||ie(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ji.prototype.detachLine=function(e){if(this.lines.splice(ie(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},Re(ji);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 $n(e.cm,no)(e,r,R,A,F);var V=new ji(e,F),te=cr(r,R);if(A&&W(A,V,!1),te>0||te==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(ut(e,r.line,r,R,V)||r.line!=R.line&&ut(e,R.line,r,R,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ei()}V.addToHistory&&Es(e,{from:r,to:R,origin:"markText"},e.sel,NaN);var oe=r.line,ue=e.cm,me;if(e.iter(oe,R.line+1,function(We){ue&&V.collapsed&&!ue.options.lineWrapping&&yt(We)==ue.display.maxLine&&(me=!0),V.collapsed&&oe!=r.line&&Ln(We,0),pi(We,new ka(V,oe==r.line?r.ch:null,oe==R.line?R.ch:null)),++oe}),V.collapsed&&e.iter(r.line,R.line+1,function(We){jt(e,We)&&Ln(We,0)}),V.clearOnEnter&&Te(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(za(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),V.collapsed&&(V.id=++Fs,V.atomic=!0),ue){if(me&&(ue.curOp.updateMaxLine=!0),V.collapsed)_n(ue,r.line,R.line+1);else if(V.className||V.startStyle||V.endStyle||V.css||V.attributes||V.title)for(var Ne=r.line;Ne<=R.line;Ne++)Rn(ue,Ne,"text");V.atomic&&Os(ue.doc),Bt(ue,"markerAdded",ue,V)}return V}var _o=function(e,r){this.markers=e,this.primary=r;for(var R=0;R<e.length;++R)e[R].parent=this};_o.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Bt(this,"clear")},_o.prototype.find=function(e,r){return this.primary.find(e,r)},Re(_o);function wl(e,r,R,A,F){A=W(A),A.shared=!1;var V=[no(e,r,R,A,F)],te=V[0],oe=A.widgetNode;return Ni(e,function(ue){oe&&(A.widgetNode=oe.cloneNode(!0)),V.push(no(ue,Er(ue,r),Er(ue,R),A,F));for(var me=0;me<ue.linked.length;++me)if(ue.linked[me].isParent)return;te=q(V)}),new _o(V,te)}function Us(e){return e.findMarks(Lt(e.first,0),e.clipPos(Lt(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),te=e.clipPos(F.to);if(cr(V,te)){var oe=no(e,V,te,A.primary,A.primary.type);A.markers.push(oe),oe.parent=A}}}function Sl(e){for(var r=function(A){var F=e[A],V=[F.primary.doc];Ni(F.primary.doc,function(ue){return V.push(ue)});for(var te=0;te<F.markers.length;te++){var oe=F.markers[te];ie(V,oe.doc)==-1&&(oe.parent=null,F.markers.splice(te--,1))}},R=0;R<e.length;R++)r(R)}var Cl=0,Fa=function(e,r,R,A,F){if(!(this instanceof Fa))return new Fa(e,r,R,A,F);R==null&&(R=0),Eo.call(this,[new bo([new wr("",null)])]),this.first=R,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=R;var V=Lt(R,0);this.sel=di(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}),Ta(this,di(V),Ce)};Fa.prototype=be(Eo.prototype,{constructor:Fa,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=Ea(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:Yn(function(e){var r=Lt(this.first,0),R=this.first+this.size-1;to(this,{from:r,to:Lt(R,qt(this,R).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ai(this.cm,0,0),Ta(this,di(r),Ce)}),replaceRange:function(e,r,R,A){r=Er(this,r),R=R?Er(this,R):r,ro(this,e,r,R,A)},getRange:function(e,r,R){var A=Xn(this,Er(this,e),Er(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(la(this,e))return qt(this,e)},getLineNumber:function(e){return $r(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=qt(this,e)),yt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Er(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:Yn(function(e,r,R){Ts(this,Er(this,typeof e=="number"?Lt(e,r||0):e),null,R)}),setSelection:Yn(function(e,r,R){Ts(this,Er(this,e),Er(this,r||e),R)}),extendSelection:Yn(function(e,r,R){Uo(this,Er(this,e),r&&Er(this,r),R)}),extendSelections:Yn(function(e,r){ws(this,Rt(this,e),r)}),extendSelectionsBy:Yn(function(e,r){var R=se(this.sel.ranges,e);ws(this,Rt(this,R),r)}),setSelections:Yn(function(e,r,R){if(!e.length)return;for(var A=[],F=0;F<e.length;F++)A[F]=new pn(Er(this,e[F].anchor),Er(this,e[F].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),Ta(this,Ja(this.cm,A,r),R)}),addSelection:Yn(function(e,r,R){var A=this.sel.ranges.slice(0);A.push(new pn(Er(this,e),Er(this,r||e))),Ta(this,Ja(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=Xn(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=Xn(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:Yn(function(e,r,R){for(var A=[],F=this.sel,V=0;V<F.ranges.length;V++){var te=F.ranges[V];A[V]={from:te.from(),to:te.to(),text:this.splitLines(e[V]),origin:R}}for(var oe=r&&r!="end"&&No(this,A,r),ue=A.length-1;ue>=0;ue--)to(this,A[ue]);oe?Ss(this,oe):this.cm&&vi(this.cm)}),undo:Yn(function(){Ho(this,"undo")}),redo:Yn(function(){Ho(this,"redo")}),undoSelection:Yn(function(){Ho(this,"undo",!0)}),redoSelection:Yn(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),Ni(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:Yn(function(e,r,R){return yo(this,e,"gutter",function(A){var F=A.gutterMarkers||(A.gutterMarkers={});return F[r]=R,!R&&$(F)&&(A.gutterMarkers=null),!0})}),clearGutter:Yn(function(e){var r=this;this.iter(function(R){R.gutterMarkers&&R.gutterMarkers[e]&&yo(r,R,"gutter",function(){return R.gutterMarkers[e]=null,$(R.gutterMarkers)&&(R.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!la(this,e))return null;if(r=e,e=qt(this,e),!e)return null}else if(r=$r(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:Yn(function(e,r,R){return yo(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:Yn(function(e,r,R){return yo(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 te=V.match(O(R));if(!te)return!1;var oe=te.index+te[0].length;A[F]=V.slice(0,te.index)+(!te.index||oe==V.length?"":" ")+V.slice(oe)||null}else return!1;return!0})}),addLineWidget:Yn(function(e,r,R){return _l(this,e,r,R)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,R){return no(this,Er(this,e),Er(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=Er(this,e),no(this,e,e,R,"bookmark")},findMarksAt:function(e){e=Er(this,e);var r=[],R=qt(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=Er(this,e),r=Er(this,r);var A=[],F=e.line;return this.iter(e.line,r.line+1,function(V){var te=V.markedSpans;if(te)for(var oe=0;oe<te.length;oe++){var ue=te[oe];!(ue.to!=null&&F==e.line&&e.ch>=ue.to||ue.from==null&&F!=e.line||ue.from!=null&&F==r.line&&ue.from>=r.ch)&&(!R||R(ue.marker))&&A.push(ue.marker.parent||ue.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}),Er(this,Lt(R,r))},indexFromPos:function(e){e=Er(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 Fa(Ea(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 Fa(Ea(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 Fn&&(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];Ni(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){Ni(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):tr(e)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Yn(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)})}),Fa.prototype.eachLine=Fa.prototype.iter;var Bs=0;function Ol(e){var r=this;if(Ws(r),rt(r,e)||Qr(r.display,e))return;pe(e),w&&(Bs=+new Date);var R=Kn(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),te=0,oe=function(){++te==F&&$n(r,function(){R=Er(r.doc,R);var Je={from:R,to:R,text:r.doc.splitLines(V.filter(function(vt){return vt!=null}).join(r.doc.lineSeparator())),origin:"paste"};to(r.doc,Je),Ss(r.doc,di(Er(r.doc,R),Er(r.doc,fi(Je))))})()},ue=function(Je,vt){if(r.options.allowDropFileTypes&&ie(r.options.allowDropFileTypes,Je.type)==-1){oe();return}var Pt=new FileReader;Pt.onerror=function(){return oe()},Pt.onload=function(){var Ft=Pt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ft)){oe();return}V[vt]=Ft,oe()},Pt.readAsText(Je)},me=0;me<A.length;me++)ue(A[me],me);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 Ne=e.dataTransfer.getData("Text");if(Ne){var We;if(r.state.draggingText&&!r.state.draggingText.copy&&(We=r.listSelections()),Bo(r.doc,di(R,R)),We)for(var nt=0;nt<We.length;++nt)ro(r.doc,"",We[nt].anchor,We[nt].head,"drag");r.replaceSelection(Ne,"around","paste"),r.display.input.focus()}}catch(Je){}}}function Al(e,r){if(w&&(!e.state.draggingText||+new Date-Bs<100)){De(r);return}if(rt(e,r)||Qr(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!h){var R=T("img",null,null,"position: fixed; left: 0; top: 0;");R.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(R.width=R.height=1,e.display.wrapper.appendChild(R),R._top=R.offsetTop),r.dataTransfer.setDragImage(R,0,0),d&&R.parentNode.removeChild(R)}}function Rl(e,r){var R=Kn(e,r);if(!R)return;var A=document.createDocumentFragment();Oa(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)),y(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;Te(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Hs(Ll)},100))}),Te(window,"blur",function(){return Hs(ri)})}function Ll(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var Fi={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"},wo=0;wo<10;wo++)Fi[wo+48]=Fi[wo+96]=String(wo);for(var Ko=65;Ko<=90;Ko++)Fi[Ko]=String.fromCharCode(Ko);for(var To=1;To<=12;To++)Fi[To+111]=Fi[To+63235]="F"+To;var Ri={};Ri.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"},Ri.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"},Ri.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"},Ri.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"]},Ri.default=o?Ri.macDefault:Ri.pcDefault;function Ml(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var R,A,F,V,te=0;te<r.length-1;te++){var oe=r[te];if(/^(cmd|meta|m)$/i.test(oe))V=!0;else if(/^a(lt)?$/i.test(oe))R=!0;else if(/^(c|ctrl|control)$/i.test(oe))A=!0;else if(/^s(hift)?$/i.test(oe))F=!0;else throw new Error("Unrecognized modifier name: "+oe)}return R&&(e="Alt-"+e),A&&(e="Ctrl-"+e),V&&(e="Cmd-"+e),F&&(e="Shift-"+e),e}function Il(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=se(R.split(" "),Ml),V=0;V<F.length;V++){var te=void 0,oe=void 0;V==F.length-1?(oe=F.join(" "),te=A):(oe=F.slice(0,V+1).join(" "),te="...");var ue=r[oe];if(!ue)r[oe]=te;else if(ue!=te)throw new Error("Inconsistent bindings for "+oe)}delete e[R]}for(var me in r)e[me]=r[me];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 te=ao(e,r.fallthrough[V],R,A);if(te)return te}}}function zs(e){var r=typeof e=="string"?e:Fi[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),(i?r.metaKey:r.ctrlKey)&&A!="Ctrl"&&(e="Ctrl-"+e),(i?r.ctrlKey:r.metaKey)&&A!="Mod"&&(e="Cmd-"+e),!R&&r.shiftKey&&A!="Shift"&&(e="Shift-"+e),e}function Xs(e,r){if(d&&e.keyCode==34&&e.char)return!1;var R=Fi[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"?Ri[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&&cr(V.from,q(A).to)<=0;){var te=A.pop();if(cr(te.from,V.from)<0){V.from=te.from;break}}A.push(V)}Aa(e,function(){for(var oe=A.length-1;oe>=0;oe--)ro(e.doc,"",A[oe].from,A[oe].to,"+delete");vi(e)})}function is(e,r,R){var A=xe(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 Lt(r.line,A,R<0?"after":"before")}function ss(e,r,R,A,F){if(e){r.doc.direction=="rtl"&&(F=-F);var V=lt(R,r.doc.direction);if(V){var te=F<0?q(V):V[0],oe=F<0==(te.level==1),ue=oe?"after":"before",me;if(te.level>0||r.doc.direction=="rtl"){var Ne=je(r,R);me=F<0?R.text.length-1:0;var We=Ge(r,Ne,me).top;me=Ke(function(nt){return Ge(r,Ne,nt).top==We},F<0==(te.level==1)?te.from:te.to-1,me),ue=="before"&&(me=is(R,me,1))}else me=F<0?te.to:te.from;return new Lt(A,me,ue)}}return new Lt(A,F<0?R.text.length:0,F<0?"before":"after")}function kl(e,r,R,A){var F=lt(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=at(F,R.ch,R.sticky),te=F[V];if(e.doc.direction=="ltr"&&te.level%2==0&&(A>0?te.to>R.ch:te.from<R.ch))return os(r,R,A);var oe=function(Vt,or){return is(r,Vt instanceof Lt?Vt.ch:Vt,or)},ue,me=function(Vt){return e.options.lineWrapping?(ue=ue||je(e,r),dr(e,r,ue,Vt)):{begin:0,end:r.text.length}},Ne=me(R.sticky=="before"?oe(R,-1):R.ch);if(e.doc.direction=="rtl"||te.level==1){var We=te.level==1==A<0,nt=oe(R,We?1:-1);if(nt!=null&&(We?nt<=te.to&&nt<=Ne.end:nt>=te.from&&nt>=Ne.begin)){var Je=We?"before":"after";return new Lt(R.line,nt,Je)}}var vt=function(Vt,or,$t){for(var hr=function(Dn,ca){return ca?new Lt(R.line,oe(Dn,1),"before"):new Lt(R.line,Dn,"after")};Vt>=0&&Vt<F.length;Vt+=or){var kr=F[Vt],Rr=or>0==(kr.level!=1),tn=Rr?$t.begin:oe($t.end,-1);if(kr.from<=tn&&tn<kr.to)return hr(tn,Rr);if(tn=Rr?kr.from:oe(kr.to,-1),$t.begin<=tn&&tn<$t.end)return hr(tn,Rr)}},Pt=vt(V+A,A,Ne);if(Pt)return Pt;var Ft=A>0?Ne.end:oe(Ne.begin,-1);return Ft!=null&&!(A>0&&Ft==r.text.length)&&(Pt=vt(A>0?0:F.length-1,A,me(Ft)),Pt)?Pt:null}var So={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ce)},killLine:function(e){return io(e,function(r){if(r.empty()){var R=qt(e.doc,r.head.line).text.length;return r.head.ch==R&&r.head.line<e.lastLine()?{from:r.head,to:Lt(r.head.line+1,0)}:{from:r.head,to:Lt(r.head.line,R)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return io(e,function(r){return{from:Lt(r.from().line,0),to:Er(e.doc,Lt(r.to().line+1,0))}})},delLineLeft:function(e){return io(e,function(r){return{from:Lt(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(Lt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Lt(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")},ye)},goLineLeft:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:0,top:R},"div")},ye)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5,A=e.coordsChar({left:0,top:R},"div");return A.ch<e.getLine(A.line).search(/\S/)?$s(e,r.head):A},ye)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var r=[],R=e.listSelections(),A=e.options.tabSize,F=0;F<R.length;F++){var V=R[F].from(),te=G(e.getLine(V.line),V.ch,A);r.push(ae(A-te%A))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Aa(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=qt(e.doc,F.line).text;if(V){if(F.ch==V.length&&(F=new Lt(F.line,F.ch-1)),F.ch>0)F=new Lt(F.line,F.ch+1),e.replaceRange(V.charAt(F.ch-1)+V.charAt(F.ch-2),Lt(F.line,F.ch-2),F,"+transpose");else if(F.line>e.doc.first){var te=qt(e.doc,F.line-1).text;te&&(F=new Lt(F.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+te.charAt(te.length-1),Lt(F.line-1,te.length-1),F,"+transpose"))}}R.push(new pn(F,F))}e.setSelections(R)})},newlineAndIndent:function(e){return Aa(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);vi(e)})},openLine:function(e){return e.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vs(e,r){var R=qt(e.doc,r),A=yt(R);return A!=R&&(r=$r(A)),ss(!0,e,A,r,1)}function Nl(e,r){var R=qt(e.doc,r),A=bt(R);return A!=R&&(r=$r(A)),ss(!0,e,R,r,-1)}function $s(e,r){var R=Vs(e,r.line),A=qt(e.doc,R.line),F=lt(A,e.doc.direction);if(!F||F[0].level==0){var V=Math.max(R.ch,A.text.search(/\S/)),te=r.line==R.line&&r.ch<=V&&r.ch;return Lt(R.line,te?0:V,R.sticky)}return R}function Go(e,r,R){if(typeof r=="string"&&(r=So[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)!=_e}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 ee;function Co(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"&&Bt(e,"keyHandled",e,r,R),(F=="handled"||F=="multi")&&(pe(R),Bn(e)),!!F}function Js(e,r){var R=Xs(r,!0);return R?r.shiftKey&&!e.state.keySeq?Co(e,"Shift-"+R,r,function(A){return Go(e,A,!0)})||Co(e,R,r,function(A){if(typeof A=="string"?/^go[A-Z]/.test(A):A.motion)return Go(e,A)}):Co(e,R,r,function(A){return Go(e,A)}):!1}function Ul(e,r,R){return Co(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(),rt(r,e))return;w&&p<11&&e.keyCode==27&&(e.returnValue=!1);var R=e.keyCode;r.display.shift=R==16||e.shiftKey;var A=Js(r,e);d&&(ls=A?R:null,!A&&R==88&&!Nr&&(o?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),C&&!o&&!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;z(r,"CodeMirror-crosshair");function R(A){(A.keyCode==18||!A.altKey)&&(x(r,"CodeMirror-crosshair"),ot(document,"keyup",R),ot(document,"mouseover",R))}Te(document,"keyup",R),Te(document,"mouseover",R)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),rt(this,e)}function el(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(Qr(r.display,e)||rt(r,e)||e.ctrlKey&&!e.altKey||o&&e.metaKey)return;var R=e.keyCode,A=e.charCode;if(d&&R==ls){ls=null,pe(e);return}if(d&&(!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&&cr(r,this.pos)==0&&R==this.button};var Oo,Ao;function Hl(e,r){var R=+new Date;return Ao&&Ao.compare(R,e,r)?(Oo=Ao=null,"triple"):Oo&&Oo.compare(R,e,r)?(Ao=new us(R,e,r),Oo=null,"double"):(Oo=new us(R,e,r),Ao=null,"single")}function tl(e){var r=this,R=r.display;if(rt(r,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,Qr(R,e)){s||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(cs(r,e))return;var A=Kn(r,e),F=$e(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):Ie(e)==R.scroller&&pe(e):F==2?(A&&Uo(r.doc,A),setTimeout(function(){return R.input.focus()},20)):F==3&&(P?r.display.input.onContextMenu(e):_i(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,Co(e,Gs(V,F),F,function(te){if(typeof te=="string"&&(te=So[te]),!te)return!1;var oe=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),oe=te(e,R)!=_e}finally{e.state.suppressEdits=!1}return oe})}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=o?R.metaKey:R.ctrlKey),F.moveOnDrag==null&&(F.moveOnDrag=!(o?R.altKey:R.ctrlKey)),F}function Gl(e,r,R,A){w?setTimeout(U(Bi,e),0):e.curOp.focus=K();var F=zl(e,R,A),V=e.doc.sel,te;e.options.dragDrop&&qe&&!e.isReadOnly()&&R=="single"&&(te=V.contains(r))>-1&&(cr((te=V.ranges[te]).from(),r)<0||r.xRel>0)&&(cr(te.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,te=$n(e,function(me){s&&(F.scroller.draggable=!1),e.state.draggingText=!1,ot(F.wrapper.ownerDocument,"mouseup",te),ot(F.wrapper.ownerDocument,"mousemove",oe),ot(F.scroller,"dragstart",ue),ot(F.scroller,"drop",te),V||(pe(me),A.addNew||Uo(e.doc,R,null,null,A.extend),s&&!h||w&&p==9?setTimeout(function(){F.wrapper.ownerDocument.body.focus({preventScroll:!0}),F.input.focus()},20):F.input.focus())}),oe=function(me){V=V||Math.abs(r.clientX-me.clientX)+Math.abs(r.clientY-me.clientY)>=10},ue=function(){return V=!0};s&&(F.scroller.draggable=!0),e.state.draggingText=te,te.copy=!A.moveOnDrag,F.scroller.dragDrop&&F.scroller.dragDrop(),Te(F.wrapper.ownerDocument,"mouseup",te),Te(F.wrapper.ownerDocument,"mousemove",oe),Te(F.scroller,"dragstart",ue),Te(F.scroller,"drop",te),_i(e),setTimeout(function(){return F.input.focus()},20)}function rl(e,r,R){if(R=="char")return new pn(r,r);if(R=="word")return e.findWordAt(r);if(R=="line")return new pn(Lt(r.line,0),Er(e.doc,Lt(r.line+1,0)));var A=R(e,r);return new pn(A.from,A.to)}function Vl(e,r,R,A){var F=e.display,V=e.doc;pe(r);var te,oe,ue=V.sel,me=ue.ranges;if(A.addNew&&!A.extend?(oe=V.sel.contains(R),oe>-1?te=me[oe]:te=new pn(R,R)):(te=V.sel.primary(),oe=V.sel.primIndex),A.unit=="rectangle")A.addNew||(te=new pn(R,R)),R=Kn(e,r,!0,!0),oe=-1;else{var Ne=rl(e,R,A.unit);A.extend?te=ns(te,Ne.anchor,Ne.head,A.extend):te=Ne}A.addNew?oe==-1?(oe=me.length,Ta(V,Ja(e,me.concat([te]),oe),{scroll:!1,origin:"*mouse"})):me.length>1&&me[oe].empty()&&A.unit=="char"&&!A.extend?(Ta(V,Ja(e,me.slice(0,oe).concat(me.slice(oe+1)),0),{scroll:!1,origin:"*mouse"}),ue=V.sel):as(V,oe,te,le):(oe=0,Ta(V,new Da([te],0),le),ue=V.sel);var We=R;function nt($t){if(cr(We,$t)==0)return;if(We=$t,A.unit=="rectangle"){for(var hr=[],kr=e.options.tabSize,Rr=G(qt(V,R.line).text,R.ch,kr),tn=G(qt(V,$t.line).text,$t.ch,kr),Dn=Math.min(Rr,tn),ca=Math.max(Rr,tn),Wn=Math.min(R.line,$t.line),Ga=Math.min(e.lastLine(),Math.max(R.line,$t.line));Wn<=Ga;Wn++){var Ua=qt(V,Wn).text,qn=fe(Ua,Dn,kr);Dn==ca?hr.push(new pn(Lt(Wn,qn),Lt(Wn,qn))):Ua.length>qn&&hr.push(new pn(Lt(Wn,qn),Lt(Wn,fe(Ua,ca,kr))))}hr.length||hr.push(new pn(R,R)),Ta(V,Ja(e,ue.ranges.slice(0,oe).concat(hr),oe),{origin:"*mouse",scroll:!1}),e.scrollIntoView($t)}else{var Ba=te,ba=rl(e,$t,A.unit),sa=Ba.anchor,ea;cr(ba.anchor,sa)>0?(ea=ba.head,sa=pa(Ba.from(),ba.anchor)):(ea=ba.anchor,sa=Ma(Ba.to(),ba.head));var zn=ue.ranges.slice(0);zn[oe]=$l(e,new pn(Er(V,sa),ea)),Ta(V,Ja(e,zn,oe),le)}}var Je=F.wrapper.getBoundingClientRect(),vt=0;function Pt($t){var hr=++vt,kr=Kn(e,$t,!0,A.unit=="rectangle");if(!kr)return;if(cr(kr,We)!=0){e.curOp.focus=K(),nt(kr);var Rr=Mi(F,V);(kr.line>=Rr.to||kr.line<Rr.from)&&setTimeout($n(e,function(){vt==hr&&Pt($t)}),150)}else{var tn=$t.clientY<Je.top?-20:$t.clientY>Je.bottom?20:0;tn&&setTimeout($n(e,function(){if(vt!=hr)return;F.scroller.scrollTop+=tn,Pt($t)}),50)}}function Ft($t){e.state.selectingText=!1,vt=Infinity,$t&&(pe($t),F.input.focus()),ot(F.wrapper.ownerDocument,"mousemove",Vt),ot(F.wrapper.ownerDocument,"mouseup",or),V.history.lastSelOrigin=null}var Vt=$n(e,function($t){$t.buttons===0||!$e($t)?Ft($t):Pt($t)}),or=$n(e,Ft);e.state.selectingText=or,Te(F.wrapper.ownerDocument,"mousemove",Vt),Te(F.wrapper.ownerDocument,"mouseup",or)}function $l(e,r){var R=r.anchor,A=r.head,F=qt(e.doc,R.line);if(cr(R,A)==0&&R.sticky==A.sticky)return r;var V=lt(F);if(!V)return r;var te=at(V,R.ch,R.sticky),oe=V[te];if(oe.from!=R.ch&&oe.to!=R.ch)return r;var ue=te+(oe.from==R.ch==(oe.level!=1)?0:1);if(ue==0||ue==V.length)return r;var me;if(A.line!=R.line)me=(A.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ne=at(V,A.ch,A.sticky),We=Ne-te||(A.ch-R.ch)*(oe.level==1?-1:1);Ne==ue-1||Ne==ue?me=We<0:me=We>0}var nt=V[ue+(me?-1:0)],Je=me==(nt.level==1),vt=Je?nt.from:nt.to,Pt=Je?"after":"before";return R.ch==vt&&R.sticky==Pt?r:new pn(new Lt(R.line,vt,Pt),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(nt){return!1}if(F>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&pe(r);var te=e.display,oe=te.lineDiv.getBoundingClientRect();if(V>oe.bottom||!Oe(e,R))return we(r);V-=oe.top-te.viewOffset;for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var me=te.gutters.childNodes[ue];if(me&&me.getBoundingClientRect().right>=F){var Ne=Pn(e.doc,V),We=e.display.gutterSpecs[ue];return ze(e,R,e,Ne,We.className,r),we(r)}}}function cs(e,r){return nl(e,r,"gutterClick",!0)}function al(e,r){if(Qr(e.display,r)||Yl(e,r))return;if(rt(e,r,"contextmenu"))return;P||e.display.input.onContextMenu(r)}function Yl(e,r){return Oe(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-"),jr(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Xo={};function Jl(e){var r=e.optionHandlers;function R(A,F,V,te){e.defaults[A]=F,V&&(r[A]=te?function(oe,ue,me){me!=oo&&V(oe,ue,me)}: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,Ai(A)},!0),R("indentUnit",2,Ai,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(A){vo(A),jr(A),_n(A)},!0),R("lineSeparator",null,function(A,F){if(A.doc.lineSep=F,!F)return;var V=[],te=A.doc.first;A.doc.iter(function(ue){for(var me=0;;){var Ne=ue.text.indexOf(F,me);if(Ne==-1)break;me=Ne+F.length,V.push(Lt(te,Ne))}te++});for(var oe=V.length-1;oe>=0;oe--)ro(A.doc,F,V[oe],Lt(V[oe].line,V[oe].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",nr,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),ci(A)},!0),R("keyMap","default",function(A,F,V){var te=zo(F),oe=V!=oo&&zo(V);oe&&oe.detach&&oe.detach(A,te),te.attach&&te.attach(A,oe||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,Zl,!0),R("gutters",[],function(A,F){A.display.gutterSpecs=Ra(F,A.options.lineNumbers),ci(A)},!0),R("fixedGutter",!0,function(A,F){A.display.gutters.style.left=F?Zn(A.display)+"px":"0",A.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(A){return Jt(A)},!0),R("scrollbarStyle","native",function(A){ui(A),Jt(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=Ra(A.options.gutters,F),ci(A)},!0),R("firstLineNumber",1,ci,!0),R("lineNumberFormatter",function(A){return A},ci,!0),R("showCursorWhenSelecting",!1,hn,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(A,F){F=="nocursor"&&(ri(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,hn,!0),R("singleCursorHeightPerLine",!0,hn,!0),R("workTime",100),R("workDelay",100),R("flattenSpans",!0,vo,!0),R("addModeClass",!1,vo,!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,vo,!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?Te:ot;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?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(x(e.display.wrapper,"CodeMirror-wrap"),mr(e)),ua(e),_n(e),jr(e),setTimeout(function(){return Jt(e)},100)}function Fn(e,r){var R=this;if(!(this instanceof Fn))return new Fn(e,r);this.options=r=r?W(r):{},W(ol,r,!1);var A=r.value;typeof A=="string"?A=new Fa(A,r.mode,null,r.lineSeparator,r.direction):r.mode&&(A.modeOption=r.mode),this.doc=A;var F=new Fn.inputStyles[r.inputStyle](this),V=this.display=new zi(e,A,F,r);V.wrapper.CodeMirror=this,il(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ui(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 ee,keySeq:null,specialChars:null},r.autofocus&&!n&&V.input.focus(),w&&p<11&&setTimeout(function(){return R.display.input.reset(!0)},20),ql(this),Dl(),Tn(this),this.curOp.forceUpdate=!0,gs(this,A),r.autofocus&&!n||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&ti(R)},20):ri(this);for(var te in Xo)Xo.hasOwnProperty(te)&&Xo[te](this,r[te],oo);ia(this),r.finishInit&&r.finishInit(this);for(var oe=0;oe<ds.length;++oe)ds[oe](this);Ci(this),s&&r.lineWrapping&&getComputedStyle(V.lineDiv).textRendering=="optimizelegibility"&&(V.lineDiv.style.textRendering="auto")}Fn.defaults=ol,Fn.optionHandlers=Xo;function ql(e){var r=e.display;Te(r.scroller,"mousedown",$n(e,tl)),w&&p<11?Te(r.scroller,"dblclick",$n(e,function(ue){if(rt(e,ue))return;var me=Kn(e,ue);if(!me||cs(e,ue)||Qr(e.display,ue))return;pe(ue);var Ne=e.findWordAt(me);Uo(e.doc,Ne.anchor,Ne.head)})):Te(r.scroller,"dblclick",function(ue){return rt(e,ue)||pe(ue)}),Te(r.scroller,"contextmenu",function(ue){return al(e,ue)}),Te(r.input.getField(),"contextmenu",function(ue){r.scroller.contains(ue.target)||al(e,ue)});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(ue){if(ue.touches.length!=1)return!1;var me=ue.touches[0];return me.radiusX<=1&&me.radiusY<=1}function te(ue,me){if(me.left==null)return!0;var Ne=me.left-ue.left,We=me.top-ue.top;return Ne*Ne+We*We>20*20}Te(r.scroller,"touchstart",function(ue){if(!rt(e,ue)&&!V(ue)&&!cs(e,ue)){r.input.ensurePolled(),clearTimeout(R);var me=+new Date;r.activeTouch={start:me,moved:!1,prev:me-A.end<=300?A:null},ue.touches.length==1&&(r.activeTouch.left=ue.touches[0].pageX,r.activeTouch.top=ue.touches[0].pageY)}}),Te(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Te(r.scroller,"touchend",function(ue){var me=r.activeTouch;if(me&&!Qr(r,ue)&&me.left!=null&&!me.moved&&new Date-me.start<300){var Ne=e.coordsChar(r.activeTouch,"page"),We;!me.prev||te(me,me.prev)?We=new pn(Ne,Ne):!me.prev.prev||te(me,me.prev.prev)?We=e.findWordAt(Ne):We=new pn(Lt(Ne.line,0),Er(e.doc,Lt(Ne.line+1,0))),e.setSelection(We.anchor,We.head),e.focus(),pe(ue)}F()}),Te(r.scroller,"touchcancel",F),Te(r.scroller,"scroll",function(){r.scroller.clientHeight&&(ii(e,r.scroller.scrollTop),ja(e,r.scroller.scrollLeft,!0),ze(e,"scroll",e))}),Te(r.scroller,"mousewheel",function(ue){return po(e,ue)}),Te(r.scroller,"DOMMouseScroll",function(ue){return po(e,ue)}),Te(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(ue){rt(e,ue)||De(ue)},over:function(ue){rt(e,ue)||(Rl(e,ue),De(ue))},start:function(ue){return Al(e,ue)},drop:$n(e,Ol),leave:function(ue){rt(e,ue)||Ws(e)}};var oe=r.input.getField();Te(oe,"keyup",function(ue){return Zs.call(e,ue)}),Te(oe,"keydown",$n(e,Qs)),Te(oe,"keypress",$n(e,el)),Te(oe,"focus",function(ue){return ti(e,ue)}),Te(oe,"blur",function(ue){return ri(e,ue)})}var ds=[];Fn.defineInitHook=function(e){return ds.push(e)};function Ro(e,r,R,A){var F=e.doc,V;R==null&&(R="add"),R=="smart"&&(F.mode.indent?V=Qn(e,r).state:R="prev");var te=e.options.tabSize,oe=qt(F,r),ue=G(oe.text,null,te);oe.stateAfter&&(oe.stateAfter=null);var me=oe.text.match(/^\s*/)[0],Ne;if(!A&&!/\S/.test(oe.text))Ne=0,R="not";else if(R=="smart"&&(Ne=F.mode.indent(V,oe.text.slice(me.length),oe.text),Ne==_e||Ne>150)){if(!A)return;R="prev"}R=="prev"?r>F.first?Ne=G(qt(F,r-1).text,null,te):Ne=0:R=="add"?Ne=ue+e.options.indentUnit:R=="subtract"?Ne=ue-e.options.indentUnit:typeof R=="number"&&(Ne=ue+R),Ne=Math.max(0,Ne);var We="",nt=0;if(e.options.indentWithTabs)for(var Je=Math.floor(Ne/te);Je;--Je)nt+=te,We+=" ";if(nt<Ne&&(We+=ae(Ne-nt)),We!=me)return ro(F,We,Lt(r,0),Lt(r,me.length),"+input"),oe.stateAfter=null,!0;for(var vt=0;vt<F.sel.ranges.length;vt++){var Pt=F.sel.ranges[vt];if(Pt.head.line==r&&Pt.head.ch<me.length){var Ft=Lt(r,me.length);as(F,vt,new pn(Ft,Ft));break}}}var hi=null;function Vo(e){hi=e}function fs(e,r,R,A,F){var V=e.doc;e.display.shift=!1,A||(A=V.sel);var te=+new Date-200,oe=F=="paste"||e.state.pasteIncoming>te,ue=tr(r),me=null;if(oe&&A.ranges.length>1)if(hi&&hi.text.join(`
|
|
|
`)==r){if(A.ranges.length%hi.text.length==0){me=[];for(var Ne=0;Ne<hi.text.length;Ne++)me.push(V.splitLines(hi.text[Ne]))}}else ue.length==A.ranges.length&&e.options.pasteLinesPerSelection&&(me=se(ue,function(Vt){return[Vt]}));for(var We=e.curOp.updateInput,nt=A.ranges.length-1;nt>=0;nt--){var Je=A.ranges[nt],vt=Je.from(),Pt=Je.to();Je.empty()&&(R&&R>0?vt=Lt(vt.line,vt.ch-R):e.state.overwrite&&!oe?Pt=Lt(Pt.line,Math.min(qt(V,Pt.line).text.length,Pt.ch+q(ue).length)):oe&&hi&&hi.lineWise&&hi.text.join(`
|
|
|
`)==ue.join(`
|
|
|
`)&&(vt=Pt=Lt(vt.line,0)));var Ft={from:vt,to:Pt,text:me?me[nt%me.length]:ue,origin:F||(oe?"paste":e.state.cutIncoming>te?"cut":"+input")};to(e.doc,Ft),Bt(e,"inputRead",e,Ft)}r&&!oe&&ll(e,r),vi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=We),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&&Aa(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),te=!1;if(V.electricChars){for(var oe=0;oe<V.electricChars.length;oe++)if(r.indexOf(V.electricChars.charAt(oe))>-1){te=Ro(e,F.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(qt(e.doc,F.head.line).text.slice(0,F.head.ch))&&(te=Ro(e,F.head.line,"smart")));te&&Bt(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:Lt(F,0),head:Lt(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 s?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(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,te=V[A];if(V[A]==F&&A!="mode")return;V[A]=F,r.hasOwnProperty(A)&&$n(this,r[A])(this,F,te),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:ya(function(A,F){var V=A.token?A:e.getMode(this.options,A);if(V.startState)throw new Error("Overlays may not be stateful.");Q(this.state.overlays,{mode:V,modeSpec:A,opaque:F&&F.opaque,priority:F&&F.priority||0},function(te){return te.priority}),this.state.modeGen++,_n(this)}),removeOverlay:ya(function(A){for(var F=this.state.overlays,V=0;V<F.length;++V){var te=F[V].modeSpec;if(te==A||typeof A=="string"&&te.name==A){F.splice(V,1),this.state.modeGen++,_n(this);return}}}),indentLine:ya(function(A,F,V){typeof F!="string"&&typeof F!="number"&&(F==null?F=this.options.smartIndent?"smart":"prev":F=F?"add":"subtract"),la(this.doc,A)&&Ro(this,A,F,V)}),indentSelection:ya(function(A){for(var F=this.doc.sel.ranges,V=-1,te=0;te<F.length;te++){var oe=F[te];if(oe.empty())oe.head.line>V&&(Ro(this,oe.head.line,A,!0),V=oe.head.line,te==this.doc.sel.primIndex&&vi(this));else{var ue=oe.from(),me=oe.to(),Ne=Math.max(V,ue.line);V=Math.min(this.lastLine(),me.line-(me.ch?0:1))+1;for(var We=Ne;We<V;++We)Ro(this,We,A);var nt=this.doc.sel.ranges;ue.ch==0&&F.length==nt.length&&nt[te].from().ch>0&&as(this.doc,te,new pn(ue,nt[te].to()),Ce)}}}),getTokenAt:function(A,F){return na(this,A,F)},getLineTokens:function(A,F){return na(this,Lt(A),F,!0)},getTokenTypeAt:function(A){A=Er(this.doc,A);var F=_a(this,qt(this.doc,A.line)),V=0,te=(F.length-1)/2,oe=A.ch,ue;if(oe==0)ue=F[2];else for(;;){var me=V+te>>1;if((me?F[me*2-1]:0)>=oe)te=me;else if(F[me*2+1]<oe)V=me+1;else{ue=F[me*2+2];break}}var Ne=ue?ue.indexOf("overlay "):-1;return Ne<0?ue:Ne==0?null:ue.slice(0,Ne-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 te=R[F],oe=this.getModeAt(A);if(typeof oe[F]=="string")te[oe[F]]&&V.push(te[oe[F]]);else if(oe[F])for(var ue=0;ue<oe[F].length;ue++){var me=te[oe[F][ue]];me&&V.push(me)}else oe.helperType&&te[oe.helperType]?V.push(te[oe.helperType]):te[oe.name]&&V.push(te[oe.name]);for(var Ne=0;Ne<te._global.length;Ne++){var We=te._global[Ne];We.pred(oe,this)&&ie(V,We.val)==-1&&V.push(We.val)}return V},getStateAfter:function(A,F){var V=this.doc;return A=Mn(V,A==null?V.first+V.size-1:A),Qn(this,A+1,F).state},cursorCoords:function(A,F){var V,te=this.doc.sel.primary();return A==null?V=te.head:typeof A=="object"?V=Er(this.doc,A):V=A?te.from():te.to(),Yr(this,V,F||"page")},charCoords:function(A,F){return mn(this,Er(this.doc,A),F||"page")},coordsChar:function(A,F){return A=Vr(this,A,F||"page"),zr(this,A.left,A.top)},lineAtHeight:function(A,F){return A=Vr(this,{top:A,left:0},F||"page").top,Pn(this.doc,A+this.display.viewOffset)},heightAtLine:function(A,F,V){var te=!1,oe;if(typeof A=="number"){var ue=this.doc.first+this.doc.size-1;A<this.doc.first?A=this.doc.first:A>ue&&(A=ue,te=!0),oe=qt(this.doc,A)}else oe=A;return qr(this,oe,{top:0,left:0},F||"page",V||te).top+(te?this.doc.height-Qt(oe):0)},defaultTextHeight:function(){return jn(this.display)},defaultCharWidth:function(){return Hn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,F,V,te,oe){var ue=this.display;A=Yr(this,Er(this.doc,A));var me=A.bottom,Ne=A.left;if(F.style.position="absolute",F.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(F),ue.sizer.appendChild(F),te=="over")me=A.top;else if(te=="above"||te=="near"){var We=Math.max(ue.wrapper.clientHeight,this.doc.height),nt=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(te=="above"||A.bottom+F.offsetHeight>We)&&A.top>F.offsetHeight?me=A.top-F.offsetHeight:A.bottom+F.offsetHeight<=We&&(me=A.bottom),Ne+F.offsetWidth>nt&&(Ne=nt-F.offsetWidth)}F.style.top=me+"px",F.style.left=F.style.right="",oe=="right"?(Ne=ue.sizer.clientWidth-F.offsetWidth,F.style.right="0px"):(oe=="left"?Ne=0:oe=="middle"&&(Ne=(ue.sizer.clientWidth-F.offsetWidth)/2),F.style.left=Ne+"px"),V&&Ii(this,{left:Ne,top:me,right:Ne+F.offsetWidth,bottom:me+F.offsetHeight})},triggerOnKeyDown:ya(Qs),triggerOnKeyPress:ya(el),triggerOnKeyUp:Zs,triggerOnMouseDown:ya(tl),execCommand:function(A){if(So.hasOwnProperty(A))return So[A].call(null,this)},triggerElectric:ya(function(A){ll(this,A)}),findPosH:function(A,F,V,te){var oe=1;F<0&&(oe=-1,F=-F);for(var ue=Er(this.doc,A),me=0;me<F&&!(ue=hs(this.doc,ue,oe,V,te),ue.hitSide);++me);return ue},moveH:ya(function(A,F){var V=this;this.extendSelectionsBy(function(te){return V.display.shift||V.doc.extend||te.empty()?hs(V.doc,te.head,A,F,V.options.rtlMoveVisually):A<0?te.from():te.to()},ye)}),deleteH:ya(function(A,F){var V=this.doc.sel,te=this.doc;V.somethingSelected()?te.replaceSelection("",null,"+delete"):io(this,function(oe){var ue=hs(te,oe.head,A,F,!1);return A<0?{from:ue,to:oe.head}:{from:oe.head,to:ue}})}),findPosV:function(A,F,V,te){var oe=1,ue=te;F<0&&(oe=-1,F=-F);for(var me=Er(this.doc,A),Ne=0;Ne<F;++Ne){var We=Yr(this,me,"div");if(ue==null?ue=We.left:We.left=ue,me=fl(this,We,oe,V),me.hitSide)break}return me},moveV:ya(function(A,F){var V=this,te=this.doc,oe=[],ue=!this.display.shift&&!te.extend&&te.sel.somethingSelected();if(te.extendSelectionsBy(function(Ne){if(ue)return A<0?Ne.from():Ne.to();var We=Yr(V,Ne.head,"div");Ne.goalColumn!=null&&(We.left=Ne.goalColumn),oe.push(We.left);var nt=fl(V,We,A,F);return F=="page"&&Ne==te.sel.primary()&&Ti(V,mn(V,nt,"div").top-We.top),nt},ye),oe.length)for(var me=0;me<te.sel.ranges.length;me++)te.sel.ranges[me].goalColumn=oe[me]}),findWordAt:function(A){var F=this.doc,V=qt(F,A.line).text,te=A.ch,oe=A.ch;if(V){var ue=this.getHelper(A,"wordChars");(A.sticky=="before"||oe==V.length)&&te?--te:++oe;for(var me=V.charAt(te),Ne=X(me,ue)?function(We){return X(We,ue)}:/\s/.test(me)?function(We){return/\s/.test(We)}:function(We){return!/\s/.test(We)&&!X(We)};te>0&&Ne(V.charAt(te-1));)--te;for(;oe<V.length&&Ne(V.charAt(oe));)++oe}return new pn(Lt(A.line,te),Lt(A.line,oe))},toggleOverwrite:function(A){if(A!=null&&A==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?z(this.display.cursorDiv,"CodeMirror-overwrite"):x(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:ya(function(A,F){ai(this,A,F)}),getScrollInfo:function(){var A=this.display.scroller;return{left:A.scrollLeft,top:A.scrollTop,height:A.scrollHeight-He(this)-this.display.barHeight,width:A.scrollWidth-He(this)-this.display.barWidth,clientHeight:he(this),clientWidth:Le(this)}},scrollIntoView:ya(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:Lt(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?co(this,A):Si(this,A.from,A.to,A.margin)}),setSize:ya(function(A,F){var V=this,te=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};A!=null&&(this.display.wrapper.style.width=te(A)),F!=null&&(this.display.wrapper.style.height=te(F)),this.options.lineWrapping&&Pr(this);var oe=this.display.viewFrom;this.doc.iter(oe,this.display.viewTo,function(ue){if(ue.widgets){for(var me=0;me<ue.widgets.length;me++)if(ue.widgets[me].noHScroll){Rn(V,oe,"widget");break}}++oe}),this.curOp.forceUpdate=!0,ze(this,"refresh",this)}),operation:function(A){return Aa(this,A)},startOperation:function(){return Tn(this)},endOperation:function(){return Ci(this)},refresh:ya(function(){var A=this.display.cachedTextHeight;_n(this),this.curOp.forceUpdate=!0,jr(this),ai(this,this.doc.scrollLeft,this.doc.scrollTop),Ji(this.display),(A==null||Math.abs(A-jn(this.display))>.5||this.options.lineWrapping)&&ua(this),ze(this,"refresh",this)}),swapDoc:ya(function(A){var F=this.doc;return F.cm=null,this.state.selectingText&&this.state.selectingText(),gs(this,A),jr(this),this.display.input.reset(),ai(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,Bt(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}},Re(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,te){e.registerHelper(A,F,te),R[A]._global.push({pred:V,val:te})}}function hs(e,r,R,A,F){var V=r,te=R,oe=qt(e,r.line),ue=F&&e.direction=="rtl"?-R:R;function me(){var or=r.line+ue;return or<e.first||or>=e.first+e.size?!1:(r=new Lt(or,r.ch,r.sticky),oe=qt(e,or))}function Ne(or){var $t;if(A=="codepoint"){var hr=oe.text.charCodeAt(r.ch+(A>0?0:-1));isNaN(hr)?$t=null:$t=new Lt(r.line,Math.max(0,Math.min(oe.text.length,r.ch+R*(hr>=55296&&hr<56320?2:1))),-R)}else F?$t=kl(e.cm,oe,r,R):$t=os(oe,r,R);if($t==null)if(!or&&me())r=ss(F,e.cm,oe,r.line,ue);else return!1;else r=$t;return!0}if(A=="char"||A=="codepoint")Ne();else if(A=="column")Ne(!0);else if(A=="word"||A=="group")for(var We=null,nt=A=="group",Je=e.cm&&e.cm.getHelper(r,"wordChars"),vt=!0;!(R<0&&!Ne(!vt));vt=!1){var Pt=oe.text.charAt(r.ch)||`
|
|
|
`,Ft=X(Pt,Je)?"w":nt&&Pt==`
|
|
|
`?"n":!nt||/\s/.test(Pt)?null:"p";if(nt&&!vt&&!Ft&&(Ft="s"),We&&We!=Ft){R<0&&(R=1,Ne(),r.sticky="after");break}if(Ft&&(We=Ft),R>0&&!Ne(!vt))break}var Vt=Wo(e,r,V,te,!0);return ha(V,Vt)&&(Vt.hitSide=!0),Vt}function fl(e,r,R,A){var F=e.doc,V=r.left,te;if(A=="page"){var oe=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(oe-.5*jn(e.display),3);te=(R>0?r.bottom:r.top)+R*ue}else A=="line"&&(te=R>0?r.bottom+3:r.top-3);for(var me;!(me=zr(e,V,te),!me.outside);){if(R<0?te<=0:te>=F.height){me.hitSide=!0;break}te+=R*5}return me}var Sn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ee,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Sn.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(oe){for(var ue=oe.target;ue;ue=ue.parentNode){if(ue==F)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}Te(F,"paste",function(oe){if(!V(oe)||rt(A,oe)||sl(oe,A))return;p<=11&&setTimeout($n(A,function(){return r.updateFromDOM()}),20)}),Te(F,"compositionstart",function(oe){r.composing={data:oe.data,done:!1}}),Te(F,"compositionupdate",function(oe){r.composing||(r.composing={data:oe.data,done:!1})}),Te(F,"compositionend",function(oe){r.composing&&(oe.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Te(F,"touchstart",function(){return R.forceCompositionEnd()}),Te(F,"input",function(){r.composing||r.readFromDOMSoon()});function te(oe){if(!V(oe)||rt(A,oe))return;if(A.somethingSelected())Vo({lineWise:!1,text:A.getSelections()}),oe.type=="cut"&&A.replaceSelection("",null,"cut");else if(A.options.lineWiseCopyCut){var ue=ul(A);Vo({lineWise:!0,text:ue.text}),oe.type=="cut"&&A.operation(function(){A.setSelections(ue.ranges,0,Ce),A.replaceSelection("",null,"cut")})}else return;if(oe.clipboardData){oe.clipboardData.clearData();var me=hi.text.join(`
|
|
|
`);if(oe.clipboardData.setData("Text",me),oe.clipboardData.getData("Text")==me){oe.preventDefault();return}}var Ne=dl(),We=Ne.firstChild;A.display.lineSpace.insertBefore(Ne,A.display.lineSpace.firstChild),We.value=hi.text.join(`
|
|
|
`);var nt=document.activeElement;H(We),setTimeout(function(){A.display.lineSpace.removeChild(Ne),nt.focus(),nt==F&&R.showPrimarySelection()},50)}Te(F,"copy",te),Te(F,"cut",te)},Sn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Sn.prototype.prepareSelection=function(){var e=Ca(this.cm,!1);return e.focus=document.activeElement==this.div,e},Sn.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Sn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Sn.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),te=$o(r,e.focusNode,e.focusOffset);if(V&&!V.bad&&te&&!te.bad&&cr(pa(V,te),A)==0&&cr(Ma(V,te),F)==0)return;var oe=r.display.view,ue=A.line>=r.display.viewFrom&&hl(r,A)||{node:oe[0].measure.map[2],offset:0},me=F.line<r.display.viewTo&&hl(r,F);if(!me){var Ne=oe[oe.length-1].measure,We=Ne.maps?Ne.maps[Ne.maps.length-1]:Ne.map;me={node:We[We.length-1],offset:We[We.length-2]-We[We.length-3]}}if(!ue||!me){e.removeAllRanges();return}var nt=e.rangeCount&&e.getRangeAt(0),Je;try{Je=k(ue.node,ue.offset,me.offset,me.node)}catch(vt){}Je&&(!C&&r.state.focused?(e.collapse(ue.node,ue.offset),Je.collapsed||(e.removeAllRanges(),e.addRange(Je))):(e.removeAllRanges(),e.addRange(Je)),nt&&e.anchorNode==null?e.addRange(nt):C&&this.startGracePeriod()),this.rememberSelection()},Sn.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)},Sn.prototype.showMultipleSelections=function(e){y(this.cm.display.cursorDiv,e.cursors),y(this.cm.display.selectionDiv,e.selection)},Sn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Sn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return N(this.div,r)},Sn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Sn.prototype.blur=function(){this.div.blur()},Sn.prototype.getField=function(){return this.div},Sn.prototype.supportsTouch=function(){return!0},Sn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Aa(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)},Sn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Sn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(E&&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&&Aa(r,function(){Ta(r.doc,di(R,A),Ce),(R.bad||A.bad)&&(r.curOp.selectionChanged=!0)})},Sn.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=Lt(A.line-1,qt(e.doc,A.line-1).length)),F.ch==qt(e.doc,F.line).text.length&&F.line<e.lastLine()&&(F=Lt(F.line+1,0)),A.line<r.viewFrom||F.line>r.viewTo-1)return!1;var V,te,oe;A.line==r.viewFrom||(V=xn(e,A.line))==0?(te=$r(r.view[0].line),oe=r.view[0].node):(te=$r(r.view[V].line),oe=r.view[V-1].node.nextSibling);var ue=xn(e,F.line),me,Ne;if(ue==r.view.length-1?(me=r.viewTo-1,Ne=r.lineDiv.lastChild):(me=$r(r.view[ue+1].line)-1,Ne=r.view[ue+1].node.previousSibling),!oe)return!1;for(var We=e.doc.splitLines(ru(e,oe,Ne,te,me)),nt=Xn(e.doc,Lt(te,0),Lt(me,qt(e.doc,me).text.length));We.length>1&&nt.length>1;)if(q(We)==q(nt))We.pop(),nt.pop(),me--;else if(We[0]==nt[0])We.shift(),nt.shift(),te++;else break;for(var Je=0,vt=0,Pt=We[0],Ft=nt[0],Vt=Math.min(Pt.length,Ft.length);Je<Vt&&Pt.charCodeAt(Je)==Ft.charCodeAt(Je);)++Je;for(var or=q(We),$t=q(nt),hr=Math.min(or.length-(We.length==1?Je:0),$t.length-(nt.length==1?Je:0));vt<hr&&or.charCodeAt(or.length-vt-1)==$t.charCodeAt($t.length-vt-1);)++vt;if(We.length==1&&nt.length==1&&te==A.line)for(;Je&&Je>A.ch&&or.charCodeAt(or.length-vt-1)==$t.charCodeAt($t.length-vt-1);)Je--,vt++;We[We.length-1]=or.slice(0,or.length-vt).replace(/^\u200b+/,""),We[0]=We[0].slice(Je).replace(/\u200b+$/,"");var kr=Lt(te,Je),Rr=Lt(me,nt.length?q(nt).length-vt:0);if(We.length>1||We[0]||cr(kr,Rr))return ro(e.doc,We,kr,Rr,"+input"),!0},Sn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Sn.prototype.reset=function(){this.forceCompositionEnd()},Sn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Sn.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)},Sn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Aa(this.cm,function(){return _n(e.cm)})},Sn.prototype.setUneditable=function(e){e.contentEditable="false"},Sn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||$n(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Sn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Sn.prototype.onContextMenu=function(){},Sn.prototype.resetPosition=function(){},Sn.prototype.needsContentAttribute=!0;function hl(e,r){var R=Be(e,r.line);if(!R||R.hidden)return null;var A=qt(e.doc,r.line),F=ge(R,A,r.line),V=lt(A,e.doc.direction),te="left";if(V){var oe=at(V,r.ch);te=oe%2?"right":"left"}var ue=wt(F.map,r.ch,te);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}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="",te=!1,oe=e.doc.lineSeparator(),ue=!1;function me(Je){return function(vt){return vt.id==Je}}function Ne(){te&&(V+=oe,ue&&(V+=oe),te=ue=!1)}function We(Je){Je&&(Ne(),V+=Je)}function nt(Je){if(Je.nodeType==1){var vt=Je.getAttribute("cm-text");if(vt){We(vt);return}var Pt=Je.getAttribute("cm-marker"),Ft;if(Pt){var Vt=e.findMarks(Lt(A,0),Lt(F+1,0),me(+Pt));Vt.length&&(Ft=Vt[0].find(0))&&We(Xn(e.doc,Ft.from,Ft.to).join(oe));return}if(Je.getAttribute("contenteditable")=="false")return;var or=/^(pre|div|p|li|table|br)$/i.test(Je.nodeName);if(!/^br$/i.test(Je.nodeName)&&Je.textContent.length==0)return;or&&Ne();for(var $t=0;$t<Je.childNodes.length;$t++)nt(Je.childNodes[$t]);/^(pre|p)$/i.test(Je.nodeName)&&(ue=!0),or&&(te=!0)}else Je.nodeType==3&&We(Je.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(nt(r),r==R);)r=r.nextSibling,ue=!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(Lt(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||!N(A,r))return so(Lt($r(e.line),0),!0);if(r==A&&(F=!0,r=A.childNodes[R],R=0,!r)){var V=e.rest?q(e.rest):e.line;return so(Lt($r(V),V.text.length),F)}var te=r.nodeType==3?r:null,oe=r;for(!te&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(te=r.firstChild,R&&(R=te.nodeValue.length));oe.parentNode!=A;)oe=oe.parentNode;var ue=e.measure,me=ue.maps;function Ne(Ft,Vt,or){for(var $t=-1;$t<(me?me.length:0);$t++)for(var hr=$t<0?ue.map:me[$t],kr=0;kr<hr.length;kr+=3){var Rr=hr[kr+2];if(Rr==Ft||Rr==Vt){var tn=$r($t<0?e.line:e.rest[$t]),Dn=hr[kr]+or;return(or<0||Rr!=Ft)&&(Dn=hr[kr+(or?1:0)]),Lt(tn,Dn)}}}var We=Ne(te,oe,R);if(We)return so(We,F);for(var nt=oe.nextSibling,Je=te?te.nodeValue.length-R:0;nt;nt=nt.nextSibling){if(We=Ne(nt,nt.firstChild,0),We)return so(Lt(We.line,We.ch-Je),F);Je+=nt.textContent.length}for(var vt=oe.previousSibling,Pt=R;vt;vt=vt.previousSibling){if(We=Ne(vt,vt.firstChild,-1),We)return so(Lt(We.line,We.ch+Pt),F);Pt+=vt.textContent.length}}var Jn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ee,this.hasSelection=!1,this.composing=null};Jn.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),g&&(F.style.width="0px"),Te(F,"input",function(){w&&p>=9&&r.hasSelection&&(r.hasSelection=null),R.poll()}),Te(F,"paste",function(te){if(rt(A,te)||sl(te,A))return;A.state.pasteIncoming=+new Date,R.fastPoll()});function V(te){if(rt(A,te))return;if(A.somethingSelected())Vo({lineWise:!1,text:A.getSelections()});else if(A.options.lineWiseCopyCut){var oe=ul(A);Vo({lineWise:!0,text:oe.text}),te.type=="cut"?A.setSelections(oe.ranges,null,Ce):(R.prevInput="",F.value=oe.text.join(`
|
|
|
`),H(F))}else return;te.type=="cut"&&(A.state.cutIncoming=+new Date)}Te(F,"cut",V),Te(F,"copy",V),Te(e.scroller,"paste",function(te){if(Qr(e,te)||rt(A,te))return;if(!F.dispatchEvent){A.state.pasteIncoming=+new Date,R.focus();return}var oe=new Event("paste");oe.clipboardData=te.clipboardData,F.dispatchEvent(oe)}),Te(e.lineSpace,"selectstart",function(te){Qr(e,te)||pe(te)}),Te(F,"compositionstart",function(){var te=A.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:te,range:A.markText(te,A.getCursor("to"),{className:"CodeMirror-composing"})}}),Te(F,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},Jn.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},Jn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Jn.prototype.prepareSelection=function(){var e=this.cm,r=e.display,R=e.doc,A=Ca(e);if(e.options.moveInputWithCursor){var F=Yr(e,R.sel.primary().head,"div"),V=r.wrapper.getBoundingClientRect(),te=r.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,F.top+te.top-V.top)),A.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,F.left+te.left-V.left))}return A},Jn.prototype.showSelection=function(e){var r=this.cm,R=r.display;y(R.cursorDiv,e.cursors),y(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Jn.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&&H(this.textarea),w&&p>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",w&&p>=9&&(this.hasSelection=null))},Jn.prototype.getField=function(){return this.textarea},Jn.prototype.supportsTouch=function(){return!1},Jn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||K()!=this.textarea))try{this.textarea.focus()}catch(e){}},Jn.prototype.blur=function(){this.textarea.blur()},Jn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Jn.prototype.receivedFocus=function(){this.slowPoll()},Jn.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()})},Jn.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)},Jn.prototype.poll=function(){var e=this,r=this.cm,R=this.textarea,A=this.prevInput;if(this.contextMenuPending||!r.state.focused||St(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&&p>=9&&this.hasSelection===F||o&&/[\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 te=0,oe=Math.min(A.length,F.length);te<oe&&A.charCodeAt(te)==F.charCodeAt(te);)++te;return Aa(r,function(){fs(r,F.slice(te),A.length-te,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},Jn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Jn.prototype.onKeyPress=function(){w&&p>=9&&(this.hasSelection=null),this.fastPoll()},Jn.prototype.onContextMenu=function(e){var r=this,R=r.cm,A=R.display,F=r.textarea;r.contextMenuPending&&r.contextMenuPending();var V=Kn(R,e),te=A.scroller.scrollTop;if(!V||d)return;var oe=R.options.resetSelectionOnContextMenu;oe&&R.doc.sel.contains(V)==-1&&$n(R,Ta)(R.doc,di(V),Ce);var ue=F.style.cssText,me=r.wrapper.style.cssText,Ne=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",F.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-Ne.top-5)+"px; left: "+(e.clientX-Ne.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 We;s&&(We=window.scrollY),A.input.focus(),s&&window.scrollTo(null,We),A.input.reset(),R.somethingSelected()||(F.value=r.prevInput=" "),r.contextMenuPending=Je,A.selForContextMenu=R.doc.sel,clearTimeout(A.detectingSelectAll);function nt(){if(F.selectionStart!=null){var Pt=R.somethingSelected(),Ft="\u200B"+(Pt?F.value:"");F.value="\u21DA",F.value=Ft,r.prevInput=Pt?"":"\u200B",F.selectionStart=1,F.selectionEnd=Ft.length,A.selForContextMenu=R.doc.sel}}function Je(){if(r.contextMenuPending!=Je)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=me,F.style.cssText=ue,w&&p<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=te),F.selectionStart!=null){(!w||w&&p<9)&&nt();var Pt=0,Ft=function(){A.selForContextMenu==R.doc.sel&&F.selectionStart==0&&F.selectionEnd>0&&r.prevInput=="\u200B"?$n(R,Ds)(R):Pt++<10?A.detectingSelectAll=setTimeout(Ft,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(Ft,200)}}if(w&&p>=9&&nt(),P){De(e);var vt=function(){ot(window,"mouseup",vt),setTimeout(Je,20)};Te(window,"mouseup",vt)}else setTimeout(Je,50)},Jn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Jn.prototype.setUneditable=function(){},Jn.prototype.needsContentAttribute=!1;function au(e,r){if(r=r?W(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=oe.getValue()}var F;if(e.form&&(Te(e.form,"submit",A),!r.leaveSubmitMethodAlone)){var V=e.form;F=V.submit;try{var te=V.submit=function(){A(),V.submit=F,V.submit(),V.submit=te}}catch(ue){}}r.finishInit=function(ue){ue.save=A,ue.getTextArea=function(){return e},ue.toTextArea=function(){ue.toTextArea=isNaN,A(),e.parentNode.removeChild(ue.getWrapperElement()),e.style.display="",e.form&&(ot(e.form,"submit",A),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=F))}},e.style.display="none";var oe=Fn(function(ue){return e.parentNode.insertBefore(ue,e.nextSibling)},r);return oe}function iu(e){e.off=ot,e.on=Te,e.wheelEventPixels=ho,e.Doc=Fa,e.splitLines=tr,e.countColumn=G,e.findColumn=fe,e.isWordChar=Y,e.Pass=_e,e.signal=ze,e.Line=wr,e.changeEnd=fi,e.scrollbarModel=Zt,e.Pos=Lt,e.cmpPos=cr,e.modes=ln,e.mimeModes=Cr,e.resolveMode=Lr,e.getMode=un,e.modeExtensions=yn,e.extendMode=Gn,e.copyState=cn,e.startState=Ha,e.innerMode=La,e.commands=So,e.keyMap=Ri,e.keyName=Xs,e.isModifierKey=zs,e.lookupKey=ao,e.normalizeKeyMap=Il,e.StringStream=bn,e.SharedTextMarker=_o,e.TextMarker=ji,e.LineWidget=xo,e.e_preventDefault=pe,e.e_stopPropagation=Ee,e.e_stop=De,e.addClass=z,e.contains=N,e.rmClass=x,e.keyNames=Fi}Jl(Fn),eu(Fn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Yo in Fa.prototype)Fa.prototype.hasOwnProperty(Yo)&&ie(ou,Yo)<0&&(Fn.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Fa.prototype[Yo]));return Re(Fa),Fn.inputStyles={textarea:Jn,contenteditable:Sn},Fn.defineMode=function(e){!Fn.defaults.mode&&e!="null"&&(Fn.defaults.mode=e),rn.apply(this,arguments)},Fn.defineMIME=en,Fn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Fn.defineMIME("text/plain","null"),Fn.defineExtension=function(e,r){Fn.prototype[e]=r},Fn.defineDocExtension=function(e,r){Fa.prototype[e]=r},Fn.fromTextArea=au,iu(Fn),Fn.version="5.58.2",Fn})},WYAk:function(j,J,I){(function(L,f){j.exports=J=f(I("Ib8C"))})(this,function(L){(function(){var f=L,C=f.lib,D=C.Base,u=f.enc,m=u.Utf8,w=f.algo,p=w.HMAC=D.extend({init:function(s,l){s=this._hasher=new s.init,typeof l=="string"&&(l=m.parse(l));var a=s.blockSize,d=a*4;l.sigBytes>d&&(l=s.finalize(l)),l.clamp();for(var h=this._oKey=l.clone(),c=this._iKey=l.clone(),v=h.words,g=c.words,E=0;E<a;E++)v[E]^=1549556828,g[E]^=909522486;h.sigBytes=c.sigBytes=d,this.reset()},reset:function(){var s=this._hasher;s.reset(),s.update(this._iKey)},update:function(s){return this._hasher.update(s),this},finalize:function(s){var l=this._hasher,a=l.finalize(s);l.reset();var d=l.finalize(this._oKey.clone().concat(a));return d}})})()})},WaYH:function(j,J,I){"use strict";var L=I("rePB"),f=I("Ff2n"),C=I("VTBJ"),D=I("1OyB"),u=I("vuIU"),m=I("JX7q"),w=I("Ji7U"),p=I("LK+K"),s=I("cDcd"),l=I("TSYQ"),a=I.n(l),d=I("sboe"),h=I("OZM5"),c=function(P){var O=P.prefixCls,x=P.level,b=P.isStart,y=P.isEnd;if(!x)return null;for(var T="".concat(O,"-indent-unit"),M=[],k=0;k<x;k+=1){var N;M.push(s.createElement("span",{key:k,className:a()(T,(N={},Object(L.a)(N,"".concat(T,"-start"),b[k+1]),Object(L.a)(N,"".concat(T,"-end"),y[k+1]),Object(L.a)(N,"".concat(T,"-end-first-level"),!k&&y[0]),N))}))}return s.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},M)},v=c,g=I("815F"),E="open",n="close",o="---",t=function(i){Object(w.a)(O,i);var P=Object(p.a)(O);function O(){var x;return Object(D.a)(this,O),x=P.apply(this,arguments),x.state={dragNodeHighlight:!1},x.onSelectorClick=function(b){var y=x.props.context.onNodeClick;y(b,Object(g.b)(x.props)),x.isSelectable()?x.onSelect(b):x.onCheck(b)},x.onSelectorDoubleClick=function(b){var y=x.props.context.onNodeDoubleClick;y(b,Object(g.b)(x.props))},x.onSelect=function(b){if(x.isDisabled())return;var y=x.props.context.onNodeSelect;b.preventDefault(),y(b,Object(g.b)(x.props))},x.onCheck=function(b){if(x.isDisabled())return;var y=x.props,T=y.disableCheckbox,M=y.checked,k=x.props.context.onNodeCheck;if(!x.isCheckable()||T)return;b.preventDefault();var N=!M;k(b,Object(g.b)(x.props),N)},x.onMouseEnter=function(b){var y=x.props.context.onNodeMouseEnter;y(b,Object(g.b)(x.props))},x.onMouseLeave=function(b){var y=x.props.context.onNodeMouseLeave;y(b,Object(g.b)(x.props))},x.onContextMenu=function(b){var y=x.props.context.onNodeContextMenu;y(b,Object(g.b)(x.props))},x.onDragStart=function(b){var y=x.props.context.onNodeDragStart;b.stopPropagation(),x.setState({dragNodeHighlight:!0}),y(b,Object(m.a)(x));try{b.dataTransfer.setData("text/plain","")}catch(T){}},x.onDragEnter=function(b){var y=x.props.context.onNodeDragEnter;b.preventDefault(),b.stopPropagation(),y(b,Object(m.a)(x))},x.onDragOver=function(b){var y=x.props.context.onNodeDragOver;b.preventDefault(),b.stopPropagation(),y(b,Object(m.a)(x))},x.onDragLeave=function(b){var y=x.props.context.onNodeDragLeave;b.stopPropagation(),y(b,Object(m.a)(x))},x.onDragEnd=function(b){var y=x.props.context.onNodeDragEnd;b.stopPropagation(),x.setState({dragNodeHighlight:!1}),y(b,Object(m.a)(x))},x.onDrop=function(b){var y=x.props.context.onNodeDrop;b.preventDefault(),b.stopPropagation(),x.setState({dragNodeHighlight:!1}),y(b,Object(m.a)(x))},x.onExpand=function(b){var y=x.props.context.onNodeExpand;y(b,Object(g.b)(x.props))},x.setSelectHandle=function(b){x.selectHandle=b},x.getNodeState=function(){var b=x.props.expanded;return x.isLeaf()?null:b?E:n},x.hasChildren=function(){var b=x.props.eventKey,y=x.props.context.keyEntities,T=y[b]||{},M=T.children;return!!(M||[]).length},x.isLeaf=function(){var b=x.props,y=b.isLeaf,T=b.loaded,M=x.props.context.loadData,k=x.hasChildren();return y===!1?!1:y||!M&&!k||M&&T&&!k},x.isDisabled=function(){var b=x.props.disabled,y=x.props.context.disabled;return!!(y||b)},x.isCheckable=function(){var b=x.props.checkable,y=x.props.context.checkable;return!y||b===!1?!1:y},x.syncLoadData=function(b){var y=b.expanded,T=b.loading,M=b.loaded,k=x.props.context,N=k.loadData,K=k.onNodeLoad;if(T)return;N&&y&&!x.isLeaf()&&(!x.hasChildren()&&!M&&K(Object(g.b)(x.props)))},x.renderSwitcher=function(){var b=x.props,y=b.expanded,T=b.switcherIcon,M=x.props.context,k=M.prefixCls,N=M.switcherIcon,K=T||N;if(x.isLeaf())return s.createElement("span",{className:a()("".concat(k,"-switcher"),"".concat(k,"-switcher-noop"))},typeof K=="function"?K(Object(C.a)(Object(C.a)({},x.props),{},{isLeaf:!0})):K);var z=a()("".concat(k,"-switcher"),"".concat(k,"-switcher_").concat(y?E:n));return s.createElement("span",{onClick:x.onExpand,className:z},typeof K=="function"?K(Object(C.a)(Object(C.a)({},x.props),{},{isLeaf:!1})):K)},x.renderCheckbox=function(){var b=x.props,y=b.checked,T=b.halfChecked,M=b.disableCheckbox,k=x.props.context.prefixCls,N=x.isDisabled(),K=x.isCheckable();if(!K)return null;var z=typeof K!="boolean"?K:null;return s.createElement("span",{className:a()("".concat(k,"-checkbox"),y&&"".concat(k,"-checkbox-checked"),!y&&T&&"".concat(k,"-checkbox-indeterminate"),(N||M)&&"".concat(k,"-checkbox-disabled")),onClick:x.onCheck},z)},x.renderIcon=function(){var b=x.props.loading,y=x.props.context.prefixCls;return s.createElement("span",{className:a()("".concat(y,"-iconEle"),"".concat(y,"-icon__").concat(x.getNodeState()||"docu"),b&&"".concat(y,"-icon_loading"))})},x.renderSelector=function(){var b=x.state.dragNodeHighlight,y=x.props,T=y.title,M=y.selected,k=y.icon,N=y.loading,K=y.data,z=x.props.context,B=z.prefixCls,H=z.showIcon,U=z.icon,W=z.draggable,G=z.loadData,ee=z.titleRender,ie=x.isDisabled(),ce="".concat(B,"-node-content-wrapper"),_e;if(H){var Ce=k||U;_e=Ce?s.createElement("span",{className:a()("".concat(B,"-iconEle"),"".concat(B,"-icon__customize"))},typeof Ce=="function"?Ce(x.props):Ce):x.renderIcon()}else G&&N&&(_e=x.renderIcon());var le;typeof T=="function"?le=T(K):ee?le=ee(K):le=T;var ye=s.createElement("span",{className:"".concat(B,"-title")},le);return s.createElement("span",{ref:x.setSelectHandle,title:typeof T=="string"?T:"",className:a()("".concat(ce),"".concat(ce,"-").concat(x.getNodeState()||"normal"),!ie&&(M||b)&&"".concat(B,"-node-selected"),!ie&&W&&"draggable"),draggable:!ie&&W||void 0,"aria-grabbed":!ie&&W||void 0,onMouseEnter:x.onMouseEnter,onMouseLeave:x.onMouseLeave,onContextMenu:x.onContextMenu,onClick:x.onSelectorClick,onDoubleClick:x.onSelectorDoubleClick,onDragStart:W?x.onDragStart:void 0},_e,ye)},x}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 b=this.props.selectable,y=this.props.context.selectable;return typeof b=="boolean"?b:y}},{key:"render",value:function(){var b,y=this.props,T=y.eventKey,M=y.className,k=y.style,N=y.dragOver,K=y.dragOverGapTop,z=y.dragOverGapBottom,B=y.isLeaf,H=y.isStart,U=y.isEnd,W=y.expanded,G=y.selected,ee=y.checked,ie=y.halfChecked,ce=y.loading,_e=y.domRef,Ce=y.active,le=y.onMouseMove,ye=Object(f.a)(y,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),fe=this.props.context,ne=fe.prefixCls,ae=fe.filterTreeNode,q=fe.draggable,se=fe.keyEntities,Q=this.isDisabled(),Z=Object(h.f)(ye),be=se[T]||{},re=be.level,Y=U[U.length-1];return s.createElement("div",Object.assign({ref:_e,className:a()(M,"".concat(ne,"-treenode"),(b={},Object(L.a)(b,"".concat(ne,"-treenode-disabled"),Q),Object(L.a)(b,"".concat(ne,"-treenode-switcher-").concat(W?"open":"close"),!B),Object(L.a)(b,"".concat(ne,"-treenode-checkbox-checked"),ee),Object(L.a)(b,"".concat(ne,"-treenode-checkbox-indeterminate"),ie),Object(L.a)(b,"".concat(ne,"-treenode-selected"),G),Object(L.a)(b,"".concat(ne,"-treenode-loading"),ce),Object(L.a)(b,"".concat(ne,"-treenode-active"),Ce),Object(L.a)(b,"".concat(ne,"-treenode-leaf-last"),Y),Object(L.a)(b,"drag-over",!Q&&N),Object(L.a)(b,"drag-over-gap-top",!Q&&K),Object(L.a)(b,"drag-over-gap-bottom",!Q&&z),Object(L.a)(b,"filter-node",ae&&ae(Object(g.b)(this.props))),b)),style:k,onDragEnter:q?this.onDragEnter:void 0,onDragOver:q?this.onDragOver:void 0,onDragLeave:q?this.onDragLeave:void 0,onDrop:q?this.onDrop:void 0,onDragEnd:q?this.onDragEnd:void 0,onMouseMove:le},Z),s.createElement(v,{prefixCls:ne,level:re,isStart:H,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(s.Component),S=function(P){return s.createElement(d.a.Consumer,null,function(O){return s.createElement(t,Object.assign({},P,{context:O}))})};S.displayName="TreeNode",S.defaultProps={title:o},S.isTreeNode=1;var _=J.a=S},Y1PL:function(j,J,I){"use strict";I.r(J),I.d(J,"ResizableTextArea",function(){return ie});var L=I("wx14"),f=I("1OyB"),C=I("vuIU"),D=I("Ji7U"),u=I("LK+K"),m=I("cDcd"),w=I("VTBJ"),p=I("rePB"),s=I("Zm9Q"),l=I("Kwbf"),a=I("c+Xe"),d=I("m+aA"),h=I("bdgK"),c=new Map;function v(Ce){Ce.forEach(function(le){var ye,fe=le.target;(ye=c.get(fe))===null||ye===void 0||ye.forEach(function(ne){return ne(fe)})})}var g=new h.default(v),E=null,n=null;function o(Ce,le){c.has(Ce)||(c.set(Ce,new Set),g.observe(Ce)),c.get(Ce).add(le)}function t(Ce,le){c.has(Ce)&&(c.get(Ce).delete(le),c.get(Ce).size||(g.unobserve(Ce),c.delete(Ce)))}var S=function(Ce){Object(D.a)(ye,Ce);var le=Object(u.a)(ye);function ye(){return Object(f.a)(this,ye),le.apply(this,arguments)}return Object(C.a)(ye,[{key:"render",value:function(){return this.props.children}}]),ye}(m.Component),_=m.createContext(null);function i(Ce){var le=Ce.children,ye=Ce.onBatchResize,fe=m.useRef(0),ne=m.useRef([]),ae=m.useContext(_),q=m.useCallback(function(se,Q,Z){fe.current+=1;var be=fe.current;ne.current.push({size:se,element:Q,data:Z}),Promise.resolve().then(function(){be===fe.current&&(ye==null||ye(ne.current),ne.current=[])}),ae==null||ae(se,Q,Z)},[ye,ae]);return m.createElement(_.Provider,{value:q},le)}function P(Ce){var le=Ce.children,ye=Ce.disabled,fe=m.useRef(null),ne=m.useRef(null),ae=m.useContext(_),q=m.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),se=m.isValidElement(le)&&Object(a.c)(le),Q=se?le.ref:null,Z=m.useMemo(function(){return Object(a.a)(Q,fe)},[Q,fe]),be=m.useRef(Ce);be.current=Ce;var re=m.useCallback(function(Y){var X=be.current,$=X.onResize,ve=X.data,de=Y.getBoundingClientRect(),xe=de.width,Ke=de.height,Ve=Y.offsetWidth,Xe=Y.offsetHeight,at=Math.floor(xe),it=Math.floor(Ke);if(q.current.width!==at||q.current.height!==it||q.current.offsetWidth!==Ve||q.current.offsetHeight!==Xe){var lt={width:at,height:it,offsetWidth:Ve,offsetHeight:Xe};q.current=lt;var Me=Ve===Math.round(xe)?xe:Ve,Te=Xe===Math.round(Ke)?Ke:Xe,Ye=Object(w.a)(Object(w.a)({},lt),{},{offsetWidth:Me,offsetHeight:Te});ae==null||ae(Ye,Y,ve),$&&Promise.resolve().then(function(){$(Ye,Y)})}},[]);return m.useEffect(function(){var Y=Object(d.a)(fe.current)||Object(d.a)(ne.current);return Y&&!ye&&o(Y,re),function(){return t(Y,re)}},[fe.current,ye]),m.createElement(S,{ref:ne},se?m.cloneElement(le,{ref:Z}):le)}var O="rc-observer-key";function x(Ce){var le=Ce.children,ye=Object(s.a)(le);return ye.map(function(fe,ne){var ae=(fe==null?void 0:fe.key)||"".concat(O,"-").concat(ne);return m.createElement(P,Object(L.a)({},Ce,{key:ae}),fe)})}x.Collection=i;var b=x,y=I("bT9E"),T=I("TSYQ"),M=I.n(T),k=`
|
|
|
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
|
|
|
`,N=["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={},z;function B(Ce){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=Ce.getAttribute("id")||Ce.getAttribute("data-reactid")||Ce.getAttribute("name");if(le&&K[ye])return K[ye];var fe=window.getComputedStyle(Ce),ne=fe.getPropertyValue("box-sizing")||fe.getPropertyValue("-moz-box-sizing")||fe.getPropertyValue("-webkit-box-sizing"),ae=parseFloat(fe.getPropertyValue("padding-bottom"))+parseFloat(fe.getPropertyValue("padding-top")),q=parseFloat(fe.getPropertyValue("border-bottom-width"))+parseFloat(fe.getPropertyValue("border-top-width")),se=N.map(function(Z){return"".concat(Z,":").concat(fe.getPropertyValue(Z))}).join(";"),Q={sizingStyle:se,paddingSize:ae,borderSize:q,boxSizing:ne};return le&&ye&&(K[ye]=Q),Q}function H(Ce){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,fe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;z||(z=document.createElement("textarea"),z.setAttribute("tab-index","-1"),z.setAttribute("aria-hidden","true"),document.body.appendChild(z)),Ce.getAttribute("wrap")?z.setAttribute("wrap",Ce.getAttribute("wrap")):z.removeAttribute("wrap");var ne=B(Ce,le),ae=ne.paddingSize,q=ne.borderSize,se=ne.boxSizing,Q=ne.sizingStyle;z.setAttribute("style","".concat(Q,";").concat(k)),z.value=Ce.value||Ce.placeholder||"";var Z=Number.MIN_SAFE_INTEGER,be=Number.MAX_SAFE_INTEGER,re=z.scrollHeight,Y;if(se==="border-box"?re+=q:se==="content-box"&&(re-=ae),ye!==null||fe!==null){z.value=" ";var X=z.scrollHeight-ae;ye!==null&&(Z=X*ye,se==="border-box"&&(Z=Z+ae+q),re=Math.max(Z,re)),fe!==null&&(be=X*fe,se==="border-box"&&(be=be+ae+q),Y=re>be?"":"hidden",re=Math.min(be,re))}return{height:re,minHeight:Z,maxHeight:be,overflowY:Y,resize:"none"}}var U=I("Gytx"),W=I.n(U),G;(function(Ce){Ce[Ce.NONE=0]="NONE",Ce[Ce.RESIZING=1]="RESIZING",Ce[Ce.RESIZED=2]="RESIZED"})(G||(G={}));var ee=function(Ce){Object(D.a)(ye,Ce);var le=Object(u.a)(ye);function ye(fe){var ne;return Object(f.a)(this,ye),ne=le.call(this,fe),ne.nextFrameActionId=void 0,ne.resizeFrameId=void 0,ne.textArea=void 0,ne.saveTextArea=function(ae){ne.textArea=ae},ne.handleResize=function(ae){var q=ne.state.resizeStatus,se=ne.props,Q=se.autoSize,Z=se.onResize;if(q!==G.NONE)return;typeof Z=="function"&&Z(ae),Q&&ne.resizeOnNextFrame()},ne.resizeOnNextFrame=function(){cancelAnimationFrame(ne.nextFrameActionId),ne.nextFrameActionId=requestAnimationFrame(ne.resizeTextarea)},ne.resizeTextarea=function(){var ae=ne.props.autoSize;if(!ae||!ne.textArea)return;var q=ae.minRows,se=ae.maxRows,Q=H(ne.textArea,!1,q,se);ne.setState({textareaStyles:Q,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 ae=ne.props,q=ae.prefixCls,se=q===void 0?"rc-textarea":q,Q=ae.autoSize,Z=ae.onResize,be=ae.className,re=ae.disabled,Y=ne.state,X=Y.textareaStyles,$=Y.resizeStatus,ve=Object(y.a)(ne.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),de=M()(se,be,Object(p.a)({},"".concat(se,"-disabled"),re));"value"in ve&&(ve.value=ve.value||"");var xe=Object(w.a)(Object(w.a)(Object(w.a)({},ne.props.style),X),$===G.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return m.createElement(b,{onResize:ne.handleResize,disabled:!(Q||Z)},m.createElement("textarea",Object(L.a)({},ve,{className:de,style:xe,ref:ne.saveTextArea})))},ne.state={textareaStyles:{},resizeStatus:G.NONE},ne}return Object(C.a)(ye,[{key:"componentDidUpdate",value:function(ne){(ne.value!==this.props.value||!W()(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,ae=this.textArea.selectionEnd;this.textArea.setSelectionRange(ne,ae)}}catch(q){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ye}(m.Component),ie=ee,ce=function(Ce){Object(D.a)(ye,Ce);var le=Object(u.a)(ye);function ye(fe){var ne;Object(f.a)(this,ye),ne=le.call(this,fe),ne.resizableTextArea=void 0,ne.focus=function(){ne.resizableTextArea.textArea.focus()},ne.saveTextArea=function(q){ne.resizableTextArea=q},ne.handleChange=function(q){var se=ne.props.onChange;ne.setValue(q.target.value,function(){ne.resizableTextArea.resizeTextarea()}),se&&se(q)},ne.handleKeyDown=function(q){var se=ne.props,Q=se.onPressEnter,Z=se.onKeyDown;q.keyCode===13&&Q&&Q(q),Z&&Z(q)};var ae=typeof fe.value=="undefined"||fe.value===null?fe.defaultValue:fe.value;return ne.state={value:ae},ne}return Object(C.a)(ye,[{key:"setValue",value:function(ne,ae){"value"in this.props||this.setState({value:ne},ae)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return m.createElement(ie,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}}]),ye}(m.Component),_e=J.default=ce},ZW9T:function(j,J,I){"use strict";I.d(J,"a",function(){return _});var L=I("k1fw"),f=I("miYZ"),C=I("tsqr"),D=I("rAM+"),u=I("tJVT"),m=I("PpiC"),w=I("cDcd"),p=I.n(w),s=I("bdgK");function l(i,P,O,x,b){var y=P.getWordUntilPosition(O),T={startLineNumber:O.lineNumber,endLineNumber:O.lineNumber,startColumn:y.startColumn,endColumn:y.endColumn},M=x.map(function(k){return{label:k,kind:i.languages.CompletionItemKind.Keyword,insertText:k,insertTextRules:i.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:T}});return b.map(function(k){M.push(Object(L.a)(Object(L.a)({},k),{},{range:T}))}),M}var a=function(i){var P={label:"ifelse",kind:i.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`),insertTextRules:i.languages.CompletionItemInsertTextRule.InsertAsSnippet},O=["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"];i.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(T,M){var k=l(i,T,M,O,[P]);return{suggestions:k}}});var x=["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"];i.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(T,M){var k=[{label:"print",kind:i.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
|
`),insertTextRules:i.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=l(i,T,M,x,k);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"];i.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(T,M){var k=[P,{label:"main",kind:i.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`),insertTextRules:i.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:i.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
|
`),insertTextRules:i.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=l(i,T,M,b,k);return{suggestions:N}}})},d="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",h=I("LvDl"),c=I("+ua5");function v(i){return/^\d+$/.test(i)?"".concat(i,"px"):i}function g(){}var E=!1,n={"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 o(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=i;if(Array.isArray(i)){for(var O=0;O<i.length;O++){var x=n[i[O]];if(x)return x}return P[0]}return n[P]||P}var t=null,S=J.b=function(i){var P=i.width,O=P===void 0?"100%":P,x=i.height,b=x===void 0?"100%":x,y=i.value,T=i.language,M=T===void 0?"javascript":T,k=i.style,N=k===void 0?{}:k,K=i.options,z=K===void 0?{}:K,B=i.overrideServices,H=B===void 0?{}:B,U=i.theme,W=U===void 0?"vs-dark":U,G=i.onEditBlur,ee=i.onSave,ie=i.autoHeight,ce=ie===void 0?!1:ie,_e=i.forbidCopy,Ce=_e===void 0?!1:_e,le=i.onChange,ye=le===void 0?g:le,fe=i.editorDidMount,ne=fe===void 0?g:fe,ae=i.onFocus,q=ae===void 0?g:ae,se=i.filename,Q=se===void 0?"educoder.txt":se,Z=i.errorLine,be=i.errorContent,re=be===void 0?"":be,Y=Object(m.a)(i,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),X=Object(w.useRef)(),$=Object(w.useRef)({}),ve=Object(w.useRef)(),de=Object(w.useRef)(!1),xe=Object(w.useRef)(),Ke=Object(w.useState)(!1),Ve=Object(u.a)(Ke,2),Xe=Ve[0],at=Ve[1];function it(){var qe;return X.current&&(qe=new s.default(function(tt){var xt=Object(D.a)(tt),gt;try{for(xt.s();!(gt=xt.n()).done;){var sr=gt.value;(sr.target.offsetHeight>0||sr.target.offsetWidth>0)&&$.current.instance.layout()}}catch(tr){xt.e(tr)}finally{xt.f()}}),qe.observe(X.current)),qe}function lt(){C.b.warn(decodeURIComponent(d))}var Me=function(){var tt=$.current.instance;if(y!=null&&tt&&Xe){var xt=tt.getModel();xt&&y!==xt.getValue()&&(E=!0,xt.setValue(y),tt.layout(),E=!1)}};Object(w.useEffect)(function(){ve.current&&clearTimeout(ve.current),ve.current=setTimeout(function(){Me()},500)},[y,Xe,$.current]),Object(w.useEffect)(function(){if(Z&&$.current&&$.current.instance){var qe=$.current.instance;qe.changeViewZones(function(xt){var gt=document.createElement("div");gt.style.padding="10px 20px",gt.style.width="calc(100% - 20px)",gt.className="my-error-line-wrp",gt.innerHTML=re,xt.addZone({afterLineNumber:Z||11,heightInLines:3,domNode:gt})});var tt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};qe.addOverlayWidget(tt),qe.revealPositionInCenter({lineNumber:20,column:1})}},[Z,$.current,Xe]);function Te(){var qe=$.current.instance;if(qe){var tt=qe.getSelection(),xt=$.current.pastePos||{},gt=new t.Range(xt.startLineNumber||tt.endLineNumber,xt.startColumn||tt.endColumn,xt.endLineNumber||tt.endLineNumber,xt.endColumn||tt.endColumn);setTimeout(function(){qe.executeEdits("",[{range:gt,text:""}])},300)}}function Ye(qe){(window.navigator.platform.match("Mac")?qe.metaKey:qe.ctrlKey)&&qe.keyCode==83&&(qe.preventDefault(),ee())}var ot=function(){if(ce&&$.current.instance){var tt=$.current.instance.getContentHeight();Ie(tt<b?b:tt)}else Ie(b)};function ze(qe){var tt=document.createEvent("MouseEvents");tt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),qe.dispatchEvent(tt)}function rt(qe,tt){var xt=window.URL||window.webkitURL||window,gt=new Blob([tt]),sr=document.createElementNS("http://www.w3.org/1999/xhtml","a");sr.href=xt.createObjectURL(gt),sr.download=qe,ze(sr)}Object(w.useEffect)(function(){ot()},[ot]),Object(w.useEffect)(function(){X.current&&!Xe&&I.e(27).then(I.t.bind(null,"M/lh",7)).then(function(qe){try{t=qe,$.current.instance=t.editor.create(X.current,{value:y,language:o(M),theme:W,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},H);var tt=$.current.instance;if(ne(tt,t),setTimeout(function(){ot(),$.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){rt(Q||"educoder.txt",tt.getValue())}})},500),$.current.subscription=tt.onDidChangeModelContent(function(gt){de.current?clearTimeout(xe.current):(ot(),ye(tt.getValue(),gt)),xe.current=setTimeout(function(){de.current=!1},500)}),window.Monaco||a(t),Ce&&(tt.addCommand(t.KeyMod.CtrlCmd|t.KeyMod.Shift|t.KeyCode.KEY_V,function(){return lt(),null}),tt.addCommand(t.KeyMod.CtrlCmd|t.KeyCode.KEY_C,function(){return lt(),null})),window.Monaco=t,G&&tt.onDidBlurEditorWidget(function(){G(tt.getValue())}),q&&tt.onDidFocusEditorText(function(){q(tt.getValue())}),Ce){tt.addCommand(t.KeyMod.CtrlCmd|t.KeyCode.KEY_V,function(){return lt(),null}),tt.onDidPaste(function(gt){$.current.pastePos=gt});try{window.addEventListener("paste",Te)}catch(gt){}}var xt=it();return at(!0),function(){var gt=$.current.instance;gt.dispose();var sr=gt.getModel();sr&&sr.dispose(),$.current.subscription&&$.current.subscription.dispose(),Ce&&window.removeEventListener("paste",Te),xt.unobserve(X.current)}}catch(gt){}})},[]),Object(w.useEffect)(function(){var qe=$.current.instance;if(qe&&Xe)return document.addEventListener("keydown",Ye,!1),function(){document.removeEventListener("keydown",Ye)}},[ee,Xe]),Object(w.useEffect)(function(){var qe=$.current.instance;if(qe&&Xe){var tt=o(M);t.editor.setModelLanguage(qe.getModel(),tt),console.log("language:",M,qe.getModel(),tt)}},[M,Xe]),Object(w.useEffect)(function(){var qe=$.current.instance;qe&&Xe&&t.editor.setTheme(W)},[W,Xe]),Object(w.useEffect)(function(){var qe=$.current.instance;qe&&Xe&&(qe.updateOptions(Object(L.a)({},z)),setTimeout(function(){qe.getModel().updateOptions(Object(L.a)({},z))},200))},[JSON.stringify(z),Xe]),Object(w.useEffect)(function(){var qe=$.current.instance;qe&&Xe&&qe.layout()},[O,b,Xe]);var ke=Object(w.useState)(v(O)),Oe=Object(u.a)(ke,2),Re=Oe[0],pe=Oe[1],Ee=Object(w.useState)(v(b)),we=Object(u.a)(Ee,2),De=we[0],Ie=we[1],$e=Object(L.a)(Object(L.a)({},N),{},{width:Re,height:De});return p.a.createElement("div",{className:"my-monaco-editor",ref:X,style:$e})};function _(i){var P=i.width,O=P===void 0?"100%":P,x=i.height,b=x===void 0?"100%":x,y=i.original,T=i.modified,M=i.language,k=i.options,N=k===void 0?{}:k,K=Object(w.useRef)(),z=Object(w.useState)(null),B=Object(u.a)(z,2),H=B[0],U=B[1];function W(ce){var _e;return K.current&&(_e=new s.default(function(Ce){var le=Object(D.a)(Ce),ye;try{for(le.s();!(ye=le.n()).done;){var fe=ye.value;(fe.target.offsetHeight>0||fe.target.offsetWidth>0)&&ce.layout()}}catch(ne){le.e(ne)}finally{le.f()}}),_e.observe(K.current)),_e}Object(w.useEffect)(function(){K.current&&I.e(27).then(I.t.bind(null,"M/lh",7)).then(function(ce){t=ce;var _e=t.editor.createDiffEditor(K.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}));U(_e);var Ce=W(_e);return function(){_e.dispose();var le=_e.getModel();le&&le.dispose(),Ce.unobserve(K.current)}})},[]),Object(w.useEffect)(function(){H&&H.setModel({original:t.editor.createModel(y,M),modified:t.editor.createModel(T,M)})},[y,T,M,H]);var G=v(O),ee=v(b),ie={width:G,height:ee};return p.a.createElement("div",{className:"my-diff-editor",ref:K,style:ie})}},ZpRC:function(j,J,I){"use strict";function L(a){return typeof a=="object"&&a!=null&&a.nodeType===1}function f(a,d){return(!d||a!=="hidden")&&a!=="visible"&&a!=="clip"}function C(a,d){if(a.clientHeight<a.scrollHeight||a.clientWidth<a.scrollWidth){var h=getComputedStyle(a,null);return f(h.overflowY,d)||f(h.overflowX,d)||function(c){var v=function(g){if(!g.ownerDocument||!g.ownerDocument.defaultView)return null;try{return g.ownerDocument.defaultView.frameElement}catch(E){return null}}(c);return!!v&&(v.clientHeight<c.scrollHeight||v.clientWidth<c.scrollWidth)}(a)}return!1}function D(a,d,h,c,v,g,E,n){return g<a&&E>d||g>a&&E<d?0:g<=a&&n<=h||E>=d&&n>=h?g-a-c:E>d&&n<h||g<a&&n>h?E-d+v:0}var u=function(a,d){var h=window,c=d.scrollMode,v=d.block,g=d.inline,E=d.boundary,n=d.skipOverflowHiddenElements,o=typeof E=="function"?E:function(X){return X!==E};if(!L(a))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,S=[],_=a;L(_)&&o(_);){if((_=_.parentElement)===t){S.push(_);break}_!=null&&_===document.body&&C(_)&&!C(document.documentElement)||_!=null&&C(_,n)&&S.push(_)}for(var i=h.visualViewport?h.visualViewport.width:innerWidth,P=h.visualViewport?h.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,x=window.scrollY||pageYOffset,b=a.getBoundingClientRect(),y=b.height,T=b.width,M=b.top,k=b.right,N=b.bottom,K=b.left,z=v==="start"||v==="nearest"?M:v==="end"?N:M+y/2,B=g==="center"?K+T/2:g==="end"?k:K,H=[],U=0;U<S.length;U++){var W=S[U],G=W.getBoundingClientRect(),ee=G.height,ie=G.width,ce=G.top,_e=G.right,Ce=G.bottom,le=G.left;if(c==="if-needed"&&M>=0&&K>=0&&N<=P&&k<=i&&M>=ce&&N<=Ce&&K>=le&&k<=_e)return H;var ye=getComputedStyle(W),fe=parseInt(ye.borderLeftWidth,10),ne=parseInt(ye.borderTopWidth,10),ae=parseInt(ye.borderRightWidth,10),q=parseInt(ye.borderBottomWidth,10),se=0,Q=0,Z="offsetWidth"in W?W.offsetWidth-W.clientWidth-fe-ae:0,be="offsetHeight"in W?W.offsetHeight-W.clientHeight-ne-q:0;if(t===W)se=v==="start"?z:v==="end"?z-P:v==="nearest"?D(x,x+P,P,ne,q,x+z,x+z+y,y):z-P/2,Q=g==="start"?B:g==="center"?B-i/2:g==="end"?B-i:D(O,O+i,i,fe,ae,O+B,O+B+T,T),se=Math.max(0,se+x),Q=Math.max(0,Q+O);else{se=v==="start"?z-ce-ne:v==="end"?z-Ce+q+be:v==="nearest"?D(ce,Ce,ee,ne,q+be,z,z+y,y):z-(ce+ee/2)+be/2,Q=g==="start"?B-le-fe:g==="center"?B-(le+ie/2)+Z/2:g==="end"?B-_e+ae+Z:D(le,_e,ie,fe,ae+Z,B,B+T,T);var re=W.scrollLeft,Y=W.scrollTop;z+=Y-(se=Math.max(0,Math.min(Y+se,W.scrollHeight-ee+be))),B+=re-(Q=Math.max(0,Math.min(re+Q,W.scrollWidth-ie+Z)))}H.push({el:W,top:se,left:Q})}return H};function m(a){return a===Object(a)&&Object.keys(a).length!==0}function w(a,d){d===void 0&&(d="auto");var h="scrollBehavior"in document.body.style;a.forEach(function(c){var v=c.el,g=c.top,E=c.left;v.scroll&&h?v.scroll({top:g,left:E,behavior:d}):(v.scrollTop=g,v.scrollLeft=E)})}function p(a){return a===!1?{block:"end",inline:"nearest"}:m(a)?a:{block:"start",inline:"nearest"}}function s(a,d){var h=!a.ownerDocument.documentElement.contains(a);if(m(d)&&typeof d.behavior=="function")return d.behavior(h?[]:u(a,d));if(h)return;var c=p(d);return w(u(a,c),c.behavior)}var l=J.a=s},Zss7:function(j,J,I){var L;(function(f){var C=/^\s+/,D=/\s+$/,u=0,m=f.round,w=f.min,p=f.max,s=f.random;function l(q,se){if(q=q||"",se=se||{},q instanceof l)return q;if(!(this instanceof l))return new l(q,se);var Q=a(q);this._originalInput=q,this._r=Q.r,this._g=Q.g,this._b=Q.b,this._a=Q.a,this._roundA=m(100*this._a)/100,this._format=se.format||Q.format,this._gradientType=se.gradientType,this._r<1&&(this._r=m(this._r)),this._g<1&&(this._g=m(this._g)),this._b<1&&(this._b=m(this._b)),this._ok=Q.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 q=this.toRgb();return(q.r*299+q.g*587+q.b*114)/1e3},getLuminance:function(){var q=this.toRgb(),se,Q,Z,be,re,Y;return se=q.r/255,Q=q.g/255,Z=q.b/255,se<=.03928?be=se/12.92:be=f.pow((se+.055)/1.055,2.4),Q<=.03928?re=Q/12.92:re=f.pow((Q+.055)/1.055,2.4),Z<=.03928?Y=Z/12.92:Y=f.pow((Z+.055)/1.055,2.4),.2126*be+.7152*re+.0722*Y},setAlpha:function(q){return this._a=H(q),this._roundA=m(100*this._a)/100,this},toHsv:function(){var q=v(this._r,this._g,this._b);return{h:q.h*360,s:q.s,v:q.v,a:this._a}},toHsvString:function(){var q=v(this._r,this._g,this._b),se=m(q.h*360),Q=m(q.s*100),Z=m(q.v*100);return this._a==1?"hsv("+se+", "+Q+"%, "+Z+"%)":"hsva("+se+", "+Q+"%, "+Z+"%, "+this._roundA+")"},toHsl:function(){var q=h(this._r,this._g,this._b);return{h:q.h*360,s:q.s,l:q.l,a:this._a}},toHslString:function(){var q=h(this._r,this._g,this._b),se=m(q.h*360),Q=m(q.s*100),Z=m(q.l*100);return this._a==1?"hsl("+se+", "+Q+"%, "+Z+"%)":"hsla("+se+", "+Q+"%, "+Z+"%, "+this._roundA+")"},toHex:function(q){return E(this._r,this._g,this._b,q)},toHexString:function(q){return"#"+this.toHex(q)},toHex8:function(q){return n(this._r,this._g,this._b,this._a,q)},toHex8String:function(q){return"#"+this.toHex8(q)},toRgb:function(){return{r:m(this._r),g:m(this._g),b:m(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+m(this._r)+", "+m(this._g)+", "+m(this._b)+")":"rgba("+m(this._r)+", "+m(this._g)+", "+m(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:m(U(this._r,255)*100)+"%",g:m(U(this._g,255)*100)+"%",b:m(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%)":"rgba("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:z[E(this._r,this._g,this._b,!0)]||!1},toFilter:function(q){var se="#"+o(this._r,this._g,this._b,this._a),Q=se,Z=this._gradientType?"GradientType = 1, ":"";if(q){var be=l(q);Q="#"+o(be._r,be._g,be._b,be._a)}return"progid:DXImageTransform.Microsoft.gradient("+Z+"startColorstr="+se+",endColorstr="+Q+")"},toString:function(q){var se=!!q;q=q||this._format;var Q=!1,Z=this._a<1&&this._a>=0,be=!se&&Z&&(q==="hex"||q==="hex6"||q==="hex3"||q==="hex4"||q==="hex8"||q==="name");return be?q==="name"&&this._a===0?this.toName():this.toRgbString():(q==="rgb"&&(Q=this.toRgbString()),q==="prgb"&&(Q=this.toPercentageRgbString()),(q==="hex"||q==="hex6")&&(Q=this.toHexString()),q==="hex3"&&(Q=this.toHexString(!0)),q==="hex4"&&(Q=this.toHex8String(!0)),q==="hex8"&&(Q=this.toHex8String()),q==="name"&&(Q=this.toName()),q==="hsl"&&(Q=this.toHslString()),q==="hsv"&&(Q=this.toHsvString()),Q||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(q,se){var Q=q.apply(null,[this].concat([].slice.call(se)));return this._r=Q._r,this._g=Q._g,this._b=Q._b,this.setAlpha(Q._a),this},lighten:function(){return this._applyModification(i,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(_,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(q,se){return q.apply(null,[this].concat([].slice.call(se)))},analogous:function(){return this._applyCombination(k,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(N,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(y,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},l.fromRatio=function(q,se){if(typeof q=="object"){var Q={};for(var Z in q)q.hasOwnProperty(Z)&&(Z==="a"?Q[Z]=q[Z]:Q[Z]=_e(q[Z]));q=Q}return l(q,se)};function a(q){var se={r:0,g:0,b:0},Q=1,Z=null,be=null,re=null,Y=!1,X=!1;return typeof q=="string"&&(q=ne(q)),typeof q=="object"&&(fe(q.r)&&fe(q.g)&&fe(q.b)?(se=d(q.r,q.g,q.b),Y=!0,X=String(q.r).substr(-1)==="%"?"prgb":"rgb"):fe(q.h)&&fe(q.s)&&fe(q.v)?(Z=_e(q.s),be=_e(q.v),se=g(q.h,Z,be),Y=!0,X="hsv"):fe(q.h)&&fe(q.s)&&fe(q.l)&&(Z=_e(q.s),re=_e(q.l),se=c(q.h,Z,re),Y=!0,X="hsl"),q.hasOwnProperty("a")&&(Q=q.a)),Q=H(Q),{ok:Y,format:q.format||X,r:w(255,p(se.r,0)),g:w(255,p(se.g,0)),b:w(255,p(se.b,0)),a:Q}}function d(q,se,Q){return{r:U(q,255)*255,g:U(se,255)*255,b:U(Q,255)*255}}function h(q,se,Q){q=U(q,255),se=U(se,255),Q=U(Q,255);var Z=p(q,se,Q),be=w(q,se,Q),re,Y,X=(Z+be)/2;if(Z==be)re=Y=0;else{var $=Z-be;Y=X>.5?$/(2-Z-be):$/(Z+be);switch(Z){case q:re=(se-Q)/$+(se<Q?6:0);break;case se:re=(Q-q)/$+2;break;case Q:re=(q-se)/$+4;break}re/=6}return{h:re,s:Y,l:X}}function c(q,se,Q){var Z,be,re;q=U(q,360),se=U(se,100),Q=U(Q,100);function Y(ve,de,xe){return xe<0&&(xe+=1),xe>1&&(xe-=1),xe<1/6?ve+(de-ve)*6*xe:xe<1/2?de:xe<2/3?ve+(de-ve)*(2/3-xe)*6:ve}if(se===0)Z=be=re=Q;else{var X=Q<.5?Q*(1+se):Q+se-Q*se,$=2*Q-X;Z=Y($,X,q+1/3),be=Y($,X,q),re=Y($,X,q-1/3)}return{r:Z*255,g:be*255,b:re*255}}function v(q,se,Q){q=U(q,255),se=U(se,255),Q=U(Q,255);var Z=p(q,se,Q),be=w(q,se,Q),re,Y,X=Z,$=Z-be;if(Y=Z===0?0:$/Z,Z==be)re=0;else{switch(Z){case q:re=(se-Q)/$+(se<Q?6:0);break;case se:re=(Q-q)/$+2;break;case Q:re=(q-se)/$+4;break}re/=6}return{h:re,s:Y,v:X}}function g(q,se,Q){q=U(q,360)*6,se=U(se,100),Q=U(Q,100);var Z=f.floor(q),be=q-Z,re=Q*(1-se),Y=Q*(1-be*se),X=Q*(1-(1-be)*se),$=Z%6,ve=[Q,Y,re,re,X,Q][$],de=[X,Q,Q,Y,re,re][$],xe=[re,re,X,Q,Q,Y][$];return{r:ve*255,g:de*255,b:xe*255}}function E(q,se,Q,Z){var be=[ce(m(q).toString(16)),ce(m(se).toString(16)),ce(m(Q).toString(16))];return Z&&be[0].charAt(0)==be[0].charAt(1)&&be[1].charAt(0)==be[1].charAt(1)&&be[2].charAt(0)==be[2].charAt(1)?be[0].charAt(0)+be[1].charAt(0)+be[2].charAt(0):be.join("")}function n(q,se,Q,Z,be){var re=[ce(m(q).toString(16)),ce(m(se).toString(16)),ce(m(Q).toString(16)),ce(Ce(Z))];return be&&re[0].charAt(0)==re[0].charAt(1)&&re[1].charAt(0)==re[1].charAt(1)&&re[2].charAt(0)==re[2].charAt(1)&&re[3].charAt(0)==re[3].charAt(1)?re[0].charAt(0)+re[1].charAt(0)+re[2].charAt(0)+re[3].charAt(0):re.join("")}function o(q,se,Q,Z){var be=[ce(Ce(Z)),ce(m(q).toString(16)),ce(m(se).toString(16)),ce(m(Q).toString(16))];return be.join("")}l.equals=function(q,se){return!q||!se?!1:l(q).toRgbString()==l(se).toRgbString()},l.random=function(){return l.fromRatio({r:s(),g:s(),b:s()})};function t(q,se){se=se===0?0:se||10;var Q=l(q).toHsl();return Q.s-=se/100,Q.s=W(Q.s),l(Q)}function S(q,se){se=se===0?0:se||10;var Q=l(q).toHsl();return Q.s+=se/100,Q.s=W(Q.s),l(Q)}function _(q){return l(q).desaturate(100)}function i(q,se){se=se===0?0:se||10;var Q=l(q).toHsl();return Q.l+=se/100,Q.l=W(Q.l),l(Q)}function P(q,se){se=se===0?0:se||10;var Q=l(q).toRgb();return Q.r=p(0,w(255,Q.r-m(255*-(se/100)))),Q.g=p(0,w(255,Q.g-m(255*-(se/100)))),Q.b=p(0,w(255,Q.b-m(255*-(se/100)))),l(Q)}function O(q,se){se=se===0?0:se||10;var Q=l(q).toHsl();return Q.l-=se/100,Q.l=W(Q.l),l(Q)}function x(q,se){var Q=l(q).toHsl(),Z=(Q.h+se)%360;return Q.h=Z<0?360+Z:Z,l(Q)}function b(q){var se=l(q).toHsl();return se.h=(se.h+180)%360,l(se)}function y(q){var se=l(q).toHsl(),Q=se.h;return[l(q),l({h:(Q+120)%360,s:se.s,l:se.l}),l({h:(Q+240)%360,s:se.s,l:se.l})]}function T(q){var se=l(q).toHsl(),Q=se.h;return[l(q),l({h:(Q+90)%360,s:se.s,l:se.l}),l({h:(Q+180)%360,s:se.s,l:se.l}),l({h:(Q+270)%360,s:se.s,l:se.l})]}function M(q){var se=l(q).toHsl(),Q=se.h;return[l(q),l({h:(Q+72)%360,s:se.s,l:se.l}),l({h:(Q+216)%360,s:se.s,l:se.l})]}function k(q,se,Q){se=se||6,Q=Q||30;var Z=l(q).toHsl(),be=360/Q,re=[l(q)];for(Z.h=(Z.h-(be*se>>1)+720)%360;--se;)Z.h=(Z.h+be)%360,re.push(l(Z));return re}function N(q,se){se=se||6;for(var Q=l(q).toHsv(),Z=Q.h,be=Q.s,re=Q.v,Y=[],X=1/se;se--;)Y.push(l({h:Z,s:be,v:re})),re=(re+X)%1;return Y}l.mix=function(q,se,Q){Q=Q===0?0:Q||50;var Z=l(q).toRgb(),be=l(se).toRgb(),re=Q/100,Y={r:(be.r-Z.r)*re+Z.r,g:(be.g-Z.g)*re+Z.g,b:(be.b-Z.b)*re+Z.b,a:(be.a-Z.a)*re+Z.a};return l(Y)},l.readability=function(q,se){var Q=l(q),Z=l(se);return(f.max(Q.getLuminance(),Z.getLuminance())+.05)/(f.min(Q.getLuminance(),Z.getLuminance())+.05)},l.isReadable=function(q,se,Q){var Z=l.readability(q,se),be,re;re=!1,be=ae(Q);switch(be.level+be.size){case"AAsmall":case"AAAlarge":re=Z>=4.5;break;case"AAlarge":re=Z>=3;break;case"AAAsmall":re=Z>=7;break}return re},l.mostReadable=function(q,se,Q){var Z=null,be=0,re,Y,X,$;Q=Q||{},Y=Q.includeFallbackColors,X=Q.level,$=Q.size;for(var ve=0;ve<se.length;ve++)re=l.readability(q,se[ve]),re>be&&(be=re,Z=l(se[ve]));return l.isReadable(q,Z,{level:X,size:$})||!Y?Z:(Q.includeFallbackColors=!1,l.mostReadable(q,["#fff","#000"],Q))};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"},z=l.hexNames=B(K);function B(q){var se={};for(var Q in q)q.hasOwnProperty(Q)&&(se[q[Q]]=Q);return se}function H(q){return q=parseFloat(q),(isNaN(q)||q<0||q>1)&&(q=1),q}function U(q,se){ee(q)&&(q="100%");var Q=ie(q);return q=w(se,p(0,parseFloat(q))),Q&&(q=parseInt(q*se,10)/100),f.abs(q-se)<1e-6?1:q%se/parseFloat(se)}function W(q){return w(1,p(0,q))}function G(q){return parseInt(q,16)}function ee(q){return typeof q=="string"&&q.indexOf(".")!=-1&&parseFloat(q)===1}function ie(q){return typeof q=="string"&&q.indexOf("%")!=-1}function ce(q){return q.length==1?"0"+q:""+q}function _e(q){return q<=1&&(q=q*100+"%"),q}function Ce(q){return f.round(parseFloat(q)*255).toString(16)}function le(q){return G(q)/255}var ye=function(){var q="[-\\+]?\\d+%?",se="[-\\+]?\\d*\\.\\d+%?",Q="(?:"+se+")|(?:"+q+")",Z="[\\s|\\(]+("+Q+")[,|\\s]+("+Q+")[,|\\s]+("+Q+")\\s*\\)?",be="[\\s|\\(]+("+Q+")[,|\\s]+("+Q+")[,|\\s]+("+Q+")[,|\\s]+("+Q+")\\s*\\)?";return{CSS_UNIT:new RegExp(Q),rgb:new RegExp("rgb"+Z),rgba:new RegExp("rgba"+be),hsl:new RegExp("hsl"+Z),hsla:new RegExp("hsla"+be),hsv:new RegExp("hsv"+Z),hsva:new RegExp("hsva"+be),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 fe(q){return!!ye.CSS_UNIT.exec(q)}function ne(q){q=q.replace(C,"").replace(D,"").toLowerCase();var se=!1;if(K[q])q=K[q],se=!0;else if(q=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Q;return(Q=ye.rgb.exec(q))?{r:Q[1],g:Q[2],b:Q[3]}:(Q=ye.rgba.exec(q))?{r:Q[1],g:Q[2],b:Q[3],a:Q[4]}:(Q=ye.hsl.exec(q))?{h:Q[1],s:Q[2],l:Q[3]}:(Q=ye.hsla.exec(q))?{h:Q[1],s:Q[2],l:Q[3],a:Q[4]}:(Q=ye.hsv.exec(q))?{h:Q[1],s:Q[2],v:Q[3]}:(Q=ye.hsva.exec(q))?{h:Q[1],s:Q[2],v:Q[3],a:Q[4]}:(Q=ye.hex8.exec(q))?{r:G(Q[1]),g:G(Q[2]),b:G(Q[3]),a:le(Q[4]),format:se?"name":"hex8"}:(Q=ye.hex6.exec(q))?{r:G(Q[1]),g:G(Q[2]),b:G(Q[3]),format:se?"name":"hex"}:(Q=ye.hex4.exec(q))?{r:G(Q[1]+""+Q[1]),g:G(Q[2]+""+Q[2]),b:G(Q[3]+""+Q[3]),a:le(Q[4]+""+Q[4]),format:se?"name":"hex8"}:(Q=ye.hex3.exec(q))?{r:G(Q[1]+""+Q[1]),g:G(Q[2]+""+Q[2]),b:G(Q[3]+""+Q[3]),format:se?"name":"hex"}:!1}function ae(q){var se,Q;return q=q||{level:"AA",size:"small"},se=(q.level||"AA").toUpperCase(),Q=(q.size||"small").toLowerCase(),se!=="AA"&&se!=="AAA"&&(se="AA"),Q!=="small"&&Q!=="large"&&(Q="small"),{level:se,size:Q}}j.exports?j.exports=l:!(L=function(){return l}.call(J,I,J,j),L!==void 0&&(j.exports=L))})(Math)},bQjk:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("OLod"))})(this,function(L){return function(f){var C=L,D=C.lib,u=D.CipherParams,m=C.enc,w=m.Hex,p=C.format,s=p.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,J,I){"use strict";I.d(J,"a",function(){return f});var L=I("VTBJ");function f(C,D){var u=Object(L.a)({},C);return Array.isArray(D)&&D.forEach(function(m){delete u[m]}),u}},biw7:function(j,J,I){"use strict";var L=I("cDcd"),f=I.n(L),C=L.createContext(null);J.a=C},c5Ni:function(j,J,I){},cv67:function(j,J,I){(function(L,f){j.exports=J=f(I("Ib8C"))})(this,function(L){return function(f){var C=L,D=C.lib,u=D.WordArray,m=D.Hasher,w=C.algo,p=[];(function(){for(var c=0;c<64;c++)p[c]=f.abs(f.sin(c+1))*4294967296|0})();var s=w.MD5=m.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(c,v){for(var g=0;g<16;g++){var E=v+g,n=c[E];c[E]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var o=this._hash.words,t=c[v+0],S=c[v+1],_=c[v+2],i=c[v+3],P=c[v+4],O=c[v+5],x=c[v+6],b=c[v+7],y=c[v+8],T=c[v+9],M=c[v+10],k=c[v+11],N=c[v+12],K=c[v+13],z=c[v+14],B=c[v+15],H=o[0],U=o[1],W=o[2],G=o[3];H=l(H,U,W,G,t,7,p[0]),G=l(G,H,U,W,S,12,p[1]),W=l(W,G,H,U,_,17,p[2]),U=l(U,W,G,H,i,22,p[3]),H=l(H,U,W,G,P,7,p[4]),G=l(G,H,U,W,O,12,p[5]),W=l(W,G,H,U,x,17,p[6]),U=l(U,W,G,H,b,22,p[7]),H=l(H,U,W,G,y,7,p[8]),G=l(G,H,U,W,T,12,p[9]),W=l(W,G,H,U,M,17,p[10]),U=l(U,W,G,H,k,22,p[11]),H=l(H,U,W,G,N,7,p[12]),G=l(G,H,U,W,K,12,p[13]),W=l(W,G,H,U,z,17,p[14]),U=l(U,W,G,H,B,22,p[15]),H=a(H,U,W,G,S,5,p[16]),G=a(G,H,U,W,x,9,p[17]),W=a(W,G,H,U,k,14,p[18]),U=a(U,W,G,H,t,20,p[19]),H=a(H,U,W,G,O,5,p[20]),G=a(G,H,U,W,M,9,p[21]),W=a(W,G,H,U,B,14,p[22]),U=a(U,W,G,H,P,20,p[23]),H=a(H,U,W,G,T,5,p[24]),G=a(G,H,U,W,z,9,p[25]),W=a(W,G,H,U,i,14,p[26]),U=a(U,W,G,H,y,20,p[27]),H=a(H,U,W,G,K,5,p[28]),G=a(G,H,U,W,_,9,p[29]),W=a(W,G,H,U,b,14,p[30]),U=a(U,W,G,H,N,20,p[31]),H=d(H,U,W,G,O,4,p[32]),G=d(G,H,U,W,y,11,p[33]),W=d(W,G,H,U,k,16,p[34]),U=d(U,W,G,H,z,23,p[35]),H=d(H,U,W,G,S,4,p[36]),G=d(G,H,U,W,P,11,p[37]),W=d(W,G,H,U,b,16,p[38]),U=d(U,W,G,H,M,23,p[39]),H=d(H,U,W,G,K,4,p[40]),G=d(G,H,U,W,t,11,p[41]),W=d(W,G,H,U,i,16,p[42]),U=d(U,W,G,H,x,23,p[43]),H=d(H,U,W,G,T,4,p[44]),G=d(G,H,U,W,N,11,p[45]),W=d(W,G,H,U,B,16,p[46]),U=d(U,W,G,H,_,23,p[47]),H=h(H,U,W,G,t,6,p[48]),G=h(G,H,U,W,b,10,p[49]),W=h(W,G,H,U,z,15,p[50]),U=h(U,W,G,H,O,21,p[51]),H=h(H,U,W,G,N,6,p[52]),G=h(G,H,U,W,i,10,p[53]),W=h(W,G,H,U,M,15,p[54]),U=h(U,W,G,H,S,21,p[55]),H=h(H,U,W,G,y,6,p[56]),G=h(G,H,U,W,B,10,p[57]),W=h(W,G,H,U,x,15,p[58]),U=h(U,W,G,H,K,21,p[59]),H=h(H,U,W,G,P,6,p[60]),G=h(G,H,U,W,k,10,p[61]),W=h(W,G,H,U,_,15,p[62]),U=h(U,W,G,H,T,21,p[63]),o[0]=o[0]+H|0,o[1]=o[1]+U|0,o[2]=o[2]+W|0,o[3]=o[3]+G|0},_doFinalize:function(){var c=this._data,v=c.words,g=this._nDataBytes*8,E=c.sigBytes*8;v[E>>>5]|=128<<24-E%32;var n=f.floor(g/4294967296),o=g;v[(E+64>>>9<<4)+15]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,v[(E+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,c.sigBytes=(v.length+1)*4,this._process();for(var t=this._hash,S=t.words,_=0;_<4;_++){var i=S[_];S[_]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}return t},clone:function(){var c=m.clone.call(this);return c._hash=this._hash.clone(),c}});function l(c,v,g,E,n,o,t){var S=c+(v&g|~v&E)+n+t;return(S<<o|S>>>32-o)+v}function a(c,v,g,E,n,o,t){var S=c+(v&E|g&~E)+n+t;return(S<<o|S>>>32-o)+v}function d(c,v,g,E,n,o,t){var S=c+(v^g^E)+n+t;return(S<<o|S>>>32-o)+v}function h(c,v,g,E,n,o,t){var S=c+(g^(v|~E))+n+t;return(S<<o|S>>>32-o)+v}C.MD5=m._createHelper(s),C.HmacMD5=m._createHmacHelper(s)}(Math),L.MD5})},dejd:function(j,J,I){},dmUQ:function(j,J,I){"use strict";var L=I("Ff2n"),f=I("rePB"),C=I("1OyB"),D=I("vuIU"),u=I("Ji7U"),m=I("md7G"),w=I("foSv"),p=I("cDcd"),s=I.n(p),l=I("TSYQ"),a=I.n(l),d=I("4IlW");function h(y,T){var M=Object.keys(y);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(y);T&&(k=k.filter(function(N){return Object.getOwnPropertyDescriptor(y,N).enumerable})),M.push.apply(M,k)}return M}function c(y){for(var T=1;T<arguments.length;T++){var M=arguments[T]!=null?arguments[T]:{};T%2?h(Object(M),!0).forEach(function(k){Object(f.a)(y,k,M[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(M)):h(Object(M)).forEach(function(k){Object.defineProperty(y,k,Object.getOwnPropertyDescriptor(M,k))})}return y}function v(y){var T=g();return function(){var k=Object(w.a)(y),N;if(T){var K=Object(w.a)(this).constructor;N=Reflect.construct(k,arguments,K)}else N=k.apply(this,arguments);return Object(m.a)(this,N)}}function g(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(y){return!1}}function E(){}function n(y){y.preventDefault()}var o=function(T){return T.replace(/[^\w.-]+/g,"")},t=200,S=600,_=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,i=function(T){return T!=null},P=function(T,M){return M===T||typeof M=="number"&&typeof T=="number"&&isNaN(M)&&isNaN(T)},O=function(y){Object(u.a)(M,y);var T=v(M);function M(k){var N;Object(C.a)(this,M),N=T.call(this,k),N.onKeyDown=function(B){var H=N.props,U=H.onKeyDown,W=H.onPressEnter;if(B.keyCode===d.a.UP){var G=N.getRatio(B);N.up(B,G,null),N.stop()}else if(B.keyCode===d.a.DOWN){var ee=N.getRatio(B);N.down(B,ee,null),N.stop()}else B.keyCode===d.a.ENTER&&W&&W(B);if(N.recordCursorPosition(),N.lastKeyCode=B.keyCode,U){for(var ie=arguments.length,ce=new Array(ie>1?ie-1:0),_e=1;_e<ie;_e++)ce[_e-1]=arguments[_e];U.apply(void 0,[B].concat(ce))}},N.onKeyUp=function(B){var H=N.props.onKeyUp;if(N.stop(),N.recordCursorPosition(),H){for(var U=arguments.length,W=new Array(U>1?U-1:0),G=1;G<U;G++)W[G-1]=arguments[G];H.apply(void 0,[B].concat(W))}},N.onChange=function(B){var H=N.props.onChange;N.state.focused&&(N.inputting=!0),N.rawInput=N.props.parser(N.getValueFromEvent(B)),N.setState({inputValue:N.rawInput}),H(N.toNumber(N.rawInput))},N.onMouseUp=function(){var B=N.props.onMouseUp;N.recordCursorPosition(),B&&B.apply(void 0,arguments)},N.onFocus=function(){var B;N.setState({focused:!0}),(B=N.props).onFocus.apply(B,arguments)},N.onBlur=function(){var B=N.props.onBlur;N.inputting=!1,N.setState({focused:!1});var H=N.getCurrentValidValue(N.state.inputValue),U=N.setValue(H,E);if(B){var W=N.input.value,G=N.getInputDisplayValue({focus:!1,value:U});N.input.value=G&&Number(G),B.apply(void 0,arguments),N.input.value=W}},N.getRatio=function(B){var H=1;return B.metaKey||B.ctrlKey?H=.1:B.shiftKey&&(H=10),H},N.getFullNum=function(B){return isNaN(B)?B:/e/i.test(String(B))?Number(B).toFixed(18).replace(/\.?0+$/,""):B},N.getPrecision=function(B){if(i(N.props.precision))return N.props.precision;var H=String(B);if(H.indexOf("e-")>=0)return parseInt(H.slice(H.indexOf("e-")+2),10);var U=0;return H.indexOf(".")>=0&&(U=H.length-H.indexOf(".")-1),U},N.getInputDisplayValue=function(B){var H=B||N.state,U=H.focused,W=H.inputValue,G=H.value,ee;U?ee=W:ee=N.toPrecisionAsStep(G),ee==null&&(ee="");var ie=N.formatWrapper(ee);return i(N.props.decimalSeparator)&&(ie=ie.toString().replace(".",N.props.decimalSeparator)),ie},N.recordCursorPosition=function(){try{N.cursorStart=N.input.selectionStart,N.cursorEnd=N.input.selectionEnd,N.currentValue=N.input.value,N.cursorBefore=N.input.value.substring(0,N.cursorStart),N.cursorAfter=N.input.value.substring(N.cursorEnd)}catch(B){}},N.restoreByAfter=function(B){if(B===void 0)return!1;var H=N.input.value,U=H.lastIndexOf(B);if(U===-1)return!1;var W=N.cursorBefore.length;return N.lastKeyCode===d.a.DELETE&&N.cursorBefore.charAt(W-1)===B[0]?(N.fixCaret(W,W),!0):U+B.length===H.length?(N.fixCaret(U,U),!0):!1},N.partRestoreByAfter=function(B){return B===void 0?!1:Array.prototype.some.call(B,function(H,U){var W=B.substring(U);return N.restoreByAfter(W)})},N.isNotCompleteNumber=function(B){return isNaN(B)||B===""||B===null||B&&B.toString().indexOf(".")===B.toString().length-1},N.stop=function(){N.autoStepTimer&&clearTimeout(N.autoStepTimer)},N.down=function(B,H,U){N.pressingUpOrDown=!0,N.step("down",B,H,U)},N.up=function(B,H,U){N.pressingUpOrDown=!0,N.step("up",B,H,U)},N.saveInput=function(B){N.input=B};var K=k.value;K===void 0&&(K=k.defaultValue),N.state={focused:k.autoFocus};var z=N.getValidValue(N.toNumber(K));return N.state=c(c({},N.state),{},{inputValue:N.toPrecisionAsStep(z),value:z}),N}return Object(D.a)(M,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(N){var K=this.props,z=K.value,B=K.onChange,H=K.max,U=K.min,W=this.state.focused;if(N){if(!P(N.value,z)||!P(N.max,H)||!P(N.min,U)){var G=W?z:this.getValidValue(z),ee;this.pressingUpOrDown?ee=G:this.inputting?ee=this.rawInput:ee=this.toPrecisionAsStep(G),this.setState({value:G,inputValue:ee})}var ie="value"in this.props?z:this.state.value;"max"in this.props&&N.max!==H&&typeof ie=="number"&&ie>H&&B&&B(H),"min"in this.props&&N.min!==U&&typeof ie=="number"&&ie<U&&B&&B(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ce=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===d.a.BACKSPACE?ce=this.cursorStart-1:this.lastKeyCode===d.a.DELETE&&(ce=this.cursorStart):ce=this.input.value.length,this.fixCaret(ce,ce)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case d.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case d.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(_e){}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(N){var K=N;return K===""?K="":this.isNotCompleteNumber(parseFloat(K))?K=this.state.value:K=this.getValidValue(K),this.toNumber(K)}},{key:"getValueFromEvent",value:function(N){var K=N.target.value.trim().replace(/。/g,".");return i(this.props.decimalSeparator)&&(K=K.replace(this.props.decimalSeparator,".")),K}},{key:"getValidValue",value:function(N){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,B=parseFloat(N);return isNaN(B)?N:(B<K&&(B=K),B>z&&(B=z),B)}},{key:"setValue",value:function(N,K){var z=this.props.precision,B=this.isNotCompleteNumber(parseFloat(N))?null:parseFloat(N),H=this.state.value,U=H===void 0?null:H,W=this.state.inputValue,G=W===void 0?null:W,ee=typeof B=="number"?B.toFixed(z):"".concat(B),ie=B!==U||ee!=="".concat(G);return"value"in this.props?(G=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:G},K)):this.setState({value:B,inputValue:this.toPrecisionAsStep(N)},K),ie&&this.props.onChange(B),B}},{key:"getMaxPrecision",value:function(N){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.props,B=z.precision,H=z.step;if(i(B))return B;var U=this.getPrecision(K),W=this.getPrecision(H),G=this.getPrecision(N);return N?Math.max(G,U+W):U+W}},{key:"getPrecisionFactor",value:function(N){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.getMaxPrecision(N,K);return Math.pow(10,z)}},{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(N){return this.props.formatter?this.props.formatter(N):N}},{key:"toPrecisionAsStep",value:function(N){if(this.isNotCompleteNumber(N)||N==="")return N;var K=Math.abs(this.getMaxPrecision(N));return isNaN(K)?N.toString():Number(N).toFixed(K)}},{key:"toNumber",value:function(N){var K=this.props.precision,z=this.state.focused,B=N&&N.length>16&&z;return this.isNotCompleteNumber(N)||B?N:i(K)?Math.round(N*Math.pow(10,K))/Math.pow(10,K):Number(N)}},{key:"upStep",value:function(N,K){var z=this.props.step,B=this.getPrecisionFactor(N,K),H=Math.abs(this.getMaxPrecision(N,K)),U=((B*N+B*z*K)/B).toFixed(H);return this.toNumber(U)}},{key:"downStep",value:function(N,K){var z=this.props.step,B=this.getPrecisionFactor(N,K),H=Math.abs(this.getMaxPrecision(N,K)),U=((B*N-B*z*K)/B).toFixed(H);return this.toNumber(U)}},{key:"step",value:function(N,K){var z=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,H=arguments.length>3?arguments[3]:void 0;this.stop(),K&&(K.persist(),K.preventDefault());var U=this.props;if(U.disabled)return;var W=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(W))return;var G=this["".concat(N,"Step")](W,B),ee=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(){z.pressingUpOrDown=!1}),ee)return;this.autoStepTimer=setTimeout(function(){z[N](K,B,!0)},H?t:S)}},{key:"fixCaret",value:function(N,K){if(N===void 0||K===void 0||!this.input||!this.input.value)return;try{var z=this.input.selectionStart,B=this.input.selectionEnd;(N!==z||K!==B)&&this.input.setSelectionRange(N,K)}catch(H){}}},{key:"render",value:function(){var N,K=this.props,z=K.prefixCls,B=K.disabled,H=K.readOnly,U=K.useTouch,W=K.autoComplete,G=K.upHandler,ee=K.downHandler,ie=K.className,ce=K.max,_e=K.min,Ce=K.style,le=K.title,ye=K.onMouseEnter,fe=K.onMouseLeave,ne=K.onMouseOver,ae=K.onMouseOut,q=K.required,se=K.onClick,Q=K.tabIndex,Z=K.type,be=K.placeholder,re=K.id,Y=K.inputMode,X=K.pattern,$=K.step,ve=K.maxLength,de=K.autoFocus,xe=K.name,Ke=K.onPaste,Ve=K.onInput,Xe=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"]),at=this.state,it=at.value,lt=at.focused,Me=a()(z,(N={},Object(f.a)(N,ie,!!ie),Object(f.a)(N,"".concat(z,"-disabled"),B),Object(f.a)(N,"".concat(z,"-focused"),lt),N)),Te={};Object.keys(Xe).forEach(function(De){(De.substr(0,5)==="data-"||De.substr(0,5)==="aria-"||De==="role")&&(Te[De]=Xe[De])});var Ye=!H&&!B,ot=this.getInputDisplayValue(null),ze=(it||it===0)&&(isNaN(it)||Number(it)>=ce),rt=(it||it===0)&&(isNaN(it)||Number(it)<=_e),ke=ze||B||H,Oe=rt||B||H,Re=a()("".concat(z,"-handler"),"".concat(z,"-handler-up"),Object(f.a)({},"".concat(z,"-handler-up-disabled"),ke)),pe=a()("".concat(z,"-handler"),"".concat(z,"-handler-down"),Object(f.a)({},"".concat(z,"-handler-down-disabled"),Oe)),Ee=U?{onTouchStart:ke?E:this.up,onTouchEnd:this.stop}:{onMouseDown:ke?E:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},we=U?{onTouchStart:Oe?E:this.down,onTouchEnd:this.stop}:{onMouseDown:Oe?E:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return s.a.createElement("div",{className:Me,style:Ce,title:le,onMouseEnter:ye,onMouseLeave:fe,onMouseOver:ne,onMouseOut:ae,onFocus:function(){return null},onBlur:function(){return null}},s.a.createElement("div",{className:"".concat(z,"-handler-wrap")},s.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Increase Value","aria-disabled":ke,className:Re}),G||s.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-up-inner"),onClick:n})),s.a.createElement("span",Object.assign({unselectable:"on"},we,{role:"button","aria-label":"Decrease Value","aria-disabled":Oe,className:pe}),ee||s.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-down-inner"),onClick:n}))),s.a.createElement("div",{className:"".concat(z,"-input-wrap")},s.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":_e,"aria-valuemax":ce,"aria-valuenow":it,required:q,type:Z,placeholder:be,onPaste:Ke,onClick:se,onMouseUp:this.onMouseUp,className:"".concat(z,"-input"),tabIndex:Q,autoComplete:W,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ye?this.onKeyDown:E,onKeyUp:Ye?this.onKeyUp:E,autoFocus:de,maxLength:ve,readOnly:H,disabled:B,max:ce,min:_e,step:$,name:xe,title:le,id:re,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ot),pattern:X,inputMode:Y,onInput:Ve},Te))))}}]),M}(s.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:_,min:-_,step:1,style:{},onChange:E,onKeyDown:E,onPressEnter:E,onFocus:E,onBlur:E,parser:o,required:!1,autoComplete:"off"};var x=O,b=J.a=x},e7zE:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("3y9D"),I("WYAk"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.Base,u=C.WordArray,m=f.algo,w=m.SHA1,p=m.HMAC,s=m.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 d=this.cfg,h=p.create(d.hasher,l),c=u.create(),v=u.create([1]),g=c.words,E=v.words,n=d.keySize,o=d.iterations;g.length<n;){var t=h.update(a).finalize(v);h.reset();for(var S=t.words,_=S.length,i=t,P=1;P<o;P++){i=h.finalize(i),h.reset();for(var O=i.words,x=0;x<_;x++)S[x]^=O[x]}c.concat(t),E[0]++}return c.sigBytes=n*4,c}});f.PBKDF2=function(l,a,d){return s.create(d).compute(l,a)}}(),L.PBKDF2})},fyJ8:function(j,J,I){"use strict";var L=I("rePB"),f=I("VTBJ"),C=I("Ff2n"),D=I("U8pU"),u=I("cDcd"),m=I.n(u),w=I("TSYQ"),p=I.n(w),s=I("c+Xe"),l=I("sR1s");function a(g){return g&&Object(D.a)(g)==="object"&&!Array.isArray(g)&&!u.isValidElement(g)}function d(g){return typeof g=="string"?!0:Object(s.c)(g)}function h(g,E){var n,o=g.prefixCls,t=g.className,S=g.record,_=g.index,i=g.dataIndex,P=g.render,O=g.children,x=g.component,b=x===void 0?"td":x,y=g.colSpan,T=g.rowSpan,M=g.fixLeft,k=g.fixRight,N=g.firstFixLeft,K=g.lastFixLeft,z=g.firstFixRight,B=g.lastFixRight,H=g.appendNode,U=g.additionalProps,W=U===void 0?{}:U,G=g.ellipsis,ee=g.align,ie=g.rowType,ce=g.isSticky,_e="".concat(o,"-cell"),Ce,le;if(O)le=O;else{var ye=Object(l.b)(S,i);if(le=ye,P){var fe=P(ye,S,_);a(fe)?(le=fe.children,Ce=fe.props):le=fe}}Object(D.a)(le)==="object"&&!Array.isArray(le)&&!u.isValidElement(le)&&(le=null),G&&(K||z)&&(le=u.createElement("span",{className:"".concat(_e,"-content")},le));var ne=Ce||{},ae=ne.colSpan,q=ne.rowSpan,se=ne.style,Q=ne.className,Z=Object(C.a)(ne,["colSpan","rowSpan","style","className"]),be=ae!==void 0?ae:y,re=q!==void 0?q:T;if(be===0||re===0)return null;var Y={},X=typeof M=="number",$=typeof k=="number";X&&(Y.position="sticky",Y.left=M),$&&(Y.position="sticky",Y.right=k);var ve={};ee&&(ve.textAlign=ee);var de,xe=G===!0?{showTitle:!0}:G;xe&&(xe.showTitle||ie==="header")&&(typeof le=="string"||typeof le=="number"?de=le.toString():u.isValidElement(le)&&typeof le.props.children=="string"&&(de=le.props.children));var Ke=Object(f.a)(Object(f.a)(Object(f.a)({title:de},Z),W),{},{colSpan:be&&be!==1?be:null,rowSpan:re&&re!==1?re:null,className:p()(_e,t,(n={},Object(L.a)(n,"".concat(_e,"-fix-left"),X),Object(L.a)(n,"".concat(_e,"-fix-left-first"),N),Object(L.a)(n,"".concat(_e,"-fix-left-last"),K),Object(L.a)(n,"".concat(_e,"-fix-right"),$),Object(L.a)(n,"".concat(_e,"-fix-right-first"),z),Object(L.a)(n,"".concat(_e,"-fix-right-last"),B),Object(L.a)(n,"".concat(_e,"-ellipsis"),G),Object(L.a)(n,"".concat(_e,"-with-append"),H),Object(L.a)(n,"".concat(_e,"-fix-sticky"),(X||$)&&ce),n),W.className,Q),style:Object(f.a)(Object(f.a)(Object(f.a)(Object(f.a)({},W.style),ve),Y),se),ref:d(b)?E:null});return u.createElement(b,Object.assign({},Ke),H,le)}var c=u.forwardRef(h);c.displayName="Cell";var v=u.memo(c,function(g,E){return E.shouldCellUpdate?!E.shouldCellUpdate(E.record,g.record):!1});J.a=v},gJ3r:function(j,J,I){"use strict";I.d(J,"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,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("OLod"))})(this,function(L){return L.mode.ECB=function(){var f=L.lib.BlockCipherMode.extend();return f.Encryptor=f.extend({processBlock:function(C,D){this._cipher.encryptBlock(C,D)}}),f.Decryptor=f.extend({processBlock:function(C,D){this._cipher.decryptBlock(C,D)}}),f}(),L.mode.ECB})},h78n:function(j,J,I){"use strict";I.d(J,"a",function(){return N});var L=I("cDcd"),f=I.n(L),C=I("TSYQ"),D=I.n(C),u={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},m=function(B){var H=B.map(function(){return Object(L.useRef)()}),U=Object(L.useRef)();return Object(L.useEffect)(function(){var W=Date.now(),G=!1;Object.keys(H).forEach(function(ee){var ie=H[ee].current;if(!ie)return;G=!0;var ce=ie.style;ce.transitionDuration=".3s, .3s, .3s, .06s",U.current&&W-U.current<100&&(ce.transitionDuration="0s, 0s")}),G&&(U.current=Date.now())}),[H]};function w(){return w=Object.assign||function(z){for(var B=1;B<arguments.length;B++){var H=arguments[B];for(var U in H)Object.prototype.hasOwnProperty.call(H,U)&&(z[U]=H[U])}return z},w.apply(this,arguments)}function p(z,B){return h(z)||d(z,B)||l(z,B)||s()}function s(){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(z,B){if(!z)return;if(typeof z=="string")return a(z,B);var H=Object.prototype.toString.call(z).slice(8,-1);if(H==="Object"&&z.constructor&&(H=z.constructor.name),H==="Map"||H==="Set")return Array.from(z);if(H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H))return a(z,B)}function a(z,B){(B==null||B>z.length)&&(B=z.length);for(var H=0,U=new Array(B);H<B;H++)U[H]=z[H];return U}function d(z,B){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var H=[],U=!0,W=!1,G=void 0;try{for(var ee=z[Symbol.iterator](),ie;!(U=(ie=ee.next()).done)&&!(H.push(ie.value),B&&H.length===B);U=!0);}catch(ce){W=!0,G=ce}finally{try{!U&&ee.return!=null&&ee.return()}finally{if(W)throw G}}return H}function h(z){if(Array.isArray(z))return z}function c(z,B){if(z==null)return{};var H=v(z,B),U,W;if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(z);for(W=0;W<G.length;W++){if(U=G[W],B.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;H[U]=z[U]}}return H}function v(z,B){if(z==null)return{};var H={},U=Object.keys(z),W,G;for(G=0;G<U.length;G++){if(W=U[G],B.indexOf(W)>=0)continue;H[W]=z[W]}return H}var g=function(B){var H=B.className,U=B.percent,W=B.prefixCls,G=B.strokeColor,ee=B.strokeLinecap,ie=B.strokeWidth,ce=B.style,_e=B.trailColor,Ce=B.trailWidth,le=B.transition,ye=c(B,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete ye.gapPosition;var fe=Array.isArray(U)?U:[U],ne=Array.isArray(G)?G:[G],ae=m(fe),q=p(ae,1),se=q[0],Q=ie/2,Z=100-ie/2,be="M ".concat(ee==="round"?Q:0,",").concat(Q,`
|
|
|
L `).concat(ee==="round"?Z:100,",").concat(Q),re="0 0 100 ".concat(ie),Y=0;return f.a.createElement("svg",w({className:D()("".concat(W,"-line"),H),viewBox:re,preserveAspectRatio:"none",style:ce},ye),f.a.createElement("path",{className:"".concat(W,"-line-trail"),d:be,strokeLinecap:ee,stroke:_e,strokeWidth:Ce||ie,fillOpacity:"0"}),fe.map(function(X,$){var ve={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(Y,"px"),transition:le||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},de=ne[$]||ne[ne.length-1];return Y+=X,f.a.createElement("path",{key:$,className:"".concat(W,"-line-path"),d:be,strokeLinecap:ee,stroke:de,strokeWidth:ie,fillOpacity:"0",ref:se[$],style:ve})}))};g.defaultProps=u;var E=g;function n(){return n=Object.assign||function(z){for(var B=1;B<arguments.length;B++){var H=arguments[B];for(var U in H)Object.prototype.hasOwnProperty.call(H,U)&&(z[U]=H[U])}return z},n.apply(this,arguments)}function o(z,B){return P(z)||i(z,B)||S(z,B)||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(z,B){if(!z)return;if(typeof z=="string")return _(z,B);var H=Object.prototype.toString.call(z).slice(8,-1);if(H==="Object"&&z.constructor&&(H=z.constructor.name),H==="Map"||H==="Set")return Array.from(z);if(H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H))return _(z,B)}function _(z,B){(B==null||B>z.length)&&(B=z.length);for(var H=0,U=new Array(B);H<B;H++)U[H]=z[H];return U}function i(z,B){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var H=[],U=!0,W=!1,G=void 0;try{for(var ee=z[Symbol.iterator](),ie;!(U=(ie=ee.next()).done)&&!(H.push(ie.value),B&&H.length===B);U=!0);}catch(ce){W=!0,G=ce}finally{try{!U&&ee.return!=null&&ee.return()}finally{if(W)throw G}}return H}function P(z){if(Array.isArray(z))return z}function O(z,B){if(z==null)return{};var H=x(z,B),U,W;if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(z);for(W=0;W<G.length;W++){if(U=G[W],B.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;H[U]=z[U]}}return H}function x(z,B){if(z==null)return{};var H={},U=Object.keys(z),W,G;for(G=0;G<U.length;G++){if(W=U[G],B.indexOf(W)>=0)continue;H[W]=z[W]}return H}var b=0;function y(z){return+z.replace("%","")}function T(z){return Array.isArray(z)?z:[z]}function M(z,B,H,U){var W=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,G=arguments.length>5?arguments[5]:void 0,ee=50-U/2,ie=0,ce=-ee,_e=0,Ce=-2*ee;switch(G){case"left":ie=-ee,ce=0,_e=2*ee,Ce=0;break;case"right":ie=ee,ce=0,_e=-2*ee,Ce=0;break;case"bottom":ce=ee,Ce=2*ee;break;default:}var le="M 50,50 m ".concat(ie,",").concat(ce,`
|
|
|
a `).concat(ee,",").concat(ee," 0 1 1 ").concat(_e,",").concat(-Ce,`
|
|
|
a `).concat(ee,",").concat(ee," 0 1 1 ").concat(-_e,",").concat(Ce),ye=Math.PI*2*ee,fe={stroke:H,strokeDasharray:"".concat(B/100*(ye-W),"px ").concat(ye,"px"),strokeDashoffset:"-".concat(W/2+z/100*(ye-W),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:le,pathStyle:fe}}var k=function(B){var H=B.prefixCls,U=B.strokeWidth,W=B.trailWidth,G=B.gapDegree,ee=B.gapPosition,ie=B.trailColor,ce=B.strokeLinecap,_e=B.style,Ce=B.className,le=B.strokeColor,ye=B.percent,fe=O(B,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ne=Object(L.useMemo)(function(){return b+=1,b},[]),ae=M(0,100,ie,U,G,ee),q=ae.pathString,se=ae.pathStyle,Q=T(ye),Z=T(le),be=Z.find(function(ve){return Object.prototype.toString.call(ve)==="[object Object]"}),re=m(Q),Y=o(re,1),X=Y[0],$=function(){var de=0;return Q.map(function(xe,Ke){var Ve=Z[Ke]||Z[Z.length-1],Xe=Object.prototype.toString.call(Ve)==="[object Object]"?"url(#".concat(H,"-gradient-").concat(ne,")"):"",at=M(de,xe,Ve,U,G,ee);return de+=xe,f.a.createElement("path",{key:Ke,className:"".concat(H,"-circle-path"),d:at.pathString,stroke:Xe,strokeLinecap:ce,strokeWidth:U,opacity:xe===0?0:1,fillOpacity:"0",style:at.pathStyle,ref:X[Ke]})})};return f.a.createElement("svg",n({className:D()("".concat(H,"-circle"),Ce),viewBox:"0 0 100 100",style:_e},fe),be&&f.a.createElement("defs",null,f.a.createElement("linearGradient",{id:"".concat(H,"-gradient-").concat(ne),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(be).sort(function(ve,de){return y(ve)-y(de)}).map(function(ve,de){return f.a.createElement("stop",{key:de,offset:ve,stopColor:be[ve]})}))),f.a.createElement("path",{className:"".concat(H,"-circle-trail"),d:q,stroke:ie,strokeLinecap:ce,strokeWidth:W||U,fillOpacity:"0",style:se}),$().reverse())};k.defaultProps=u;var N=k,K={Line:E,Circle:N}},hW8S:function(j,J,I){"use strict";I.d(J,"a",function(){return D}),I.d(J,"c",function(){return u}),I.d(J,"b",function(){return m});var L=I("VTBJ"),f=I("Ff2n"),C=I("Kwbf"),D="RC_TABLE_INTERNAL_COL_DEFINE";function u(w){var p=w.expandable,s=Object(f.a)(w,["expandable"]);return"expandable"in w?Object(L.a)(Object(L.a)({},s),p):s}function m(w){return Object.keys(w).reduce(function(p,s){return(s.substr(0,5)==="data-"||s.substr(0,5)==="aria-")&&(p[s]=w[s]),p},{})}},jO9C:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("OLod"))})(this,function(L){return L.pad.Iso97971={pad:function(f,C){f.concat(L.lib.WordArray.create([2147483648],1)),L.pad.ZeroPadding.pad(f,C)},unpad:function(f){L.pad.ZeroPadding.unpad(f),f.sigBytes--}},L.pad.Iso97971})},jwmR:function(j,J,I){j.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(j,J,I){"use strict";I.d(J,"a",function(){return pr});var L=I("rePB"),f=I("ODXe"),C=I("Ff2n"),D=I("VTBJ"),u=I("cDcd"),m=I("TSYQ"),w=I.n(m),p=I("Zm9Q"),s=I("6cGi"),l=I("KQm4"),a=I("xEkU"),d=I.n(a),h=I("t23M");function c(Ae){var Ue=Object(u.useRef)(),He=Object(u.useRef)(!1);function Le(){for(var he=arguments.length,Se=new Array(he),ge=0;ge<he;ge++)Se[ge]=arguments[ge];He.current||(d.a.cancel(Ue.current),Ue.current=d()(function(){Ae.apply(void 0,Se)}))}return Object(u.useEffect)(function(){return function(){He.current=!0,d.a.cancel(Ue.current)}},[]),Le}function v(Ae){var Ue=Object(u.useRef)([]),He=Object(u.useState)({}),Le=Object(f.a)(He,2),he=Le[1],Se=Object(u.useRef)(typeof Ae=="function"?Ae():Ae),ge=c(function(){var Fe=Se.current;Ue.current.forEach(function(Be){Fe=Be(Fe)}),Ue.current=[],Se.current=Fe,he({})});function Pe(Fe){Ue.current.push(Fe),ge()}return[Se.current,Pe]}var g=I("4IlW");function E(Ae,Ue){var He,Le=Ae.prefixCls,he=Ae.id,Se=Ae.active,ge=Ae.rtl,Pe=Ae.tab,Fe=Pe.key,Be=Pe.tab,je=Pe.disabled,Ge=Pe.closeIcon,st=Ae.tabBarGutter,wt=Ae.tabPosition,Ot=Ae.closable,Nt=Ae.renderWrapper,br=Ae.removeAriaLabel,Mr=Ae.editable,Pr=Ae.onClick,jr=Ae.onRemove,Ar=Ae.onFocus,Wr="".concat(Le,"-tab");u.useEffect(function(){return jr},[]);var Hr={};wt==="top"||wt==="bottom"?Hr[ge?"marginLeft":"marginRight"]=st:Hr.marginBottom=st;var qr=Mr&&Ot!==!1&&!je;function Vr(_r){if(je)return;Pr(_r)}function mn(_r){_r.preventDefault(),_r.stopPropagation(),Mr.onEdit("remove",{key:Fe,event:_r})}var Yr=u.createElement("div",{key:Fe,ref:Ue,className:w()(Wr,(He={},Object(L.a)(He,"".concat(Wr,"-with-remove"),qr),Object(L.a)(He,"".concat(Wr,"-active"),Se),Object(L.a)(He,"".concat(Wr,"-disabled"),je),He)),style:Hr,onClick:Vr},u.createElement("div",{role:"tab","aria-selected":Se,id:he&&"".concat(he,"-tab-").concat(Fe),className:"".concat(Wr,"-btn"),"aria-controls":he&&"".concat(he,"-panel-").concat(Fe),"aria-disabled":je,tabIndex:je?null:0,onClick:function(Sr){Sr.stopPropagation(),Vr(Sr)},onKeyDown:function(Sr){[g.a.SPACE,g.a.ENTER].includes(Sr.which)&&(Sr.preventDefault(),Vr(Sr))},onFocus:Ar},Be),qr&&u.createElement("button",{type:"button","aria-label":br||"remove",tabIndex:0,className:"".concat(Wr,"-remove"),onClick:function(Sr){Sr.stopPropagation(),mn(Sr)}},Ge||Mr.removeIcon||"\xD7"));return Nt&&(Yr=Nt(Yr)),Yr}var n=u.forwardRef(E),o={width:0,height:0,left:0,top:0};function t(Ae,Ue,He){return Object(u.useMemo)(function(){for(var Le,he=new Map,Se=Ue.get((Le=Ae[0])===null||Le===void 0?void 0:Le.key)||o,ge=Se.left+Se.width,Pe=0;Pe<Ae.length;Pe+=1){var Fe=Ae[Pe].key,Be=Ue.get(Fe);if(!Be){var je;Be=Ue.get((je=Ae[Pe-1])===null||je===void 0?void 0:je.key)||o}var Ge=he.get(Fe)||Object(D.a)({},Be);Ge.right=ge-Ge.left-Ge.width,he.set(Fe,Ge)}return he},[Ae.map(function(Le){return Le.key}).join("_"),Ue,He])}var S={width:0,height:0,left:0,top:0,right:0};function _(Ae,Ue,He,Le,he){var Se=he.tabs,ge=he.tabPosition,Pe=he.rtl,Fe,Be,je;["top","bottom"].includes(ge)?(Fe="width",Be=Pe?"right":"left",je=Math.abs(Ue.left)):(Fe="height",Be="top",je=-Ue.top);var Ge=Ue[Fe],st=He[Fe],wt=Le[Fe],Ot=Ge;return st+wt>Ge&&(Ot=Ge-wt),Object(u.useMemo)(function(){if(!Se.length)return[0,0];for(var Nt=Se.length,br=Nt,Mr=0;Mr<Nt;Mr+=1){var Pr=Ae.get(Se[Mr].key)||S;if(Pr[Be]+Pr[Fe]>je+Ot){br=Mr-1;break}}for(var jr=0,Ar=Nt-1;Ar>=0;Ar-=1){var Wr=Ae.get(Se[Ar].key)||S;if(Wr[Be]<je){jr=Ar+1;break}}return[jr,br]},[Ae,je,Ot,ge,Se.map(function(Nt){return Nt.key}).join("_"),Pe])}var i=I("wx14"),P=I("1OyB"),O=I("vuIU"),x=I("JX7q"),b=I("Ji7U"),y=I("LK+K"),T=I("I8Z2"),M=I("bT9E"),k=I("2GS6"),N=I("Gytx"),K=I.n(N),z=I("U8pU"),B=/iPhone/i,H=/iPod/i,U=/iPad/i,W=/\bAndroid(?:.+)Mobile\b/i,G=/Android/i,ee=/\bAndroid(?:.+)SD4930UR\b/i,ie=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,ce=/Windows Phone/i,_e=/\bWindows(?:.+)ARM\b/i,Ce=/BlackBerry/i,le=/BB10/i,ye=/Opera Mini/i,fe=/\b(CriOS|Chrome)(?:.+)Mobile/i,ne=/Mobile(?:.+)Firefox\b/i;function ae(Ae,Ue){return Ae.test(Ue)}function q(Ae){var Ue=Ae||(typeof navigator!="undefined"?navigator.userAgent:""),He=(Ue||"").split("[FBAN");if(typeof He[1]!="undefined"){var Le=He,he=Object(f.a)(Le,1);Ue=he[0]}if(He=Ue.split("Twitter"),typeof He[1]!="undefined"){var Se=He,ge=Object(f.a)(Se,1);Ue=ge[0]}var Pe={apple:{phone:ae(B,Ue)&&!ae(ce,Ue),ipod:ae(H,Ue),tablet:!ae(B,Ue)&&ae(U,Ue)&&!ae(ce,Ue),device:(ae(B,Ue)||ae(H,Ue)||ae(U,Ue))&&!ae(ce,Ue)},amazon:{phone:ae(ee,Ue),tablet:!ae(ee,Ue)&&ae(ie,Ue),device:ae(ee,Ue)||ae(ie,Ue)},android:{phone:!ae(ce,Ue)&&ae(ee,Ue)||!ae(ce,Ue)&&ae(W,Ue),tablet:!ae(ce,Ue)&&!ae(ee,Ue)&&!ae(W,Ue)&&(ae(ie,Ue)||ae(G,Ue)),device:!ae(ce,Ue)&&(ae(ee,Ue)||ae(ie,Ue)||ae(W,Ue)||ae(G,Ue))||ae(/\bokhttp\b/i,Ue)},windows:{phone:ae(ce,Ue),tablet:ae(_e,Ue),device:ae(ce,Ue)||ae(_e,Ue)},other:{blackberry:ae(Ce,Ue),blackberry10:ae(le,Ue),opera:ae(ye,Ue),firefox:ae(ne,Ue),chrome:ae(fe,Ue),device:ae(Ce,Ue)||ae(le,Ue)||ae(ye,Ue)||ae(ne,Ue)||ae(fe,Ue)},any:null,phone:null,tablet:null};return Pe.any=Pe.apple.device||Pe.android.device||Pe.windows.device||Pe.other.device,Pe.phone=Pe.apple.phone||Pe.android.phone||Pe.windows.phone,Pe.tablet=Pe.apple.tablet||Pe.android.tablet||Pe.windows.tablet,Pe}var se=Object(D.a)(Object(D.a)({},q()),{},{isMobile:q}),Q=se;function Z(){}function be(Ae,Ue,He){var Le=Ue||"";return Ae.key||"".concat(Le,"item_").concat(He)}function re(Ae){return"".concat(Ae,"-menu-")}function Y(Ae,Ue){var He=-1;u.Children.forEach(Ae,function(Le){He+=1,Le&&Le.type&&Le.type.isMenuItemGroup?u.Children.forEach(Le.props.children,function(he){He+=1,Ue(he,He)}):Ue(Le,He)})}function X(Ae,Ue,He){if(!Ae||He.find)return;u.Children.forEach(Ae,function(Le){if(Le){var he=Le.type;if(!he||!(he.isSubMenu||he.isMenuItem||he.isMenuItemGroup))return;Ue.indexOf(Le.key)!==-1?He.find=!0:Le.props.children&&X(Le.props.children,Ue,He)}})}var $=["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"],ve=function(Ue){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Le=Ue&&typeof Ue.getBoundingClientRect=="function"&&Ue.getBoundingClientRect().width;if(Le){if(He){var he=getComputedStyle(Ue),Se=he.marginLeft,ge=he.marginRight;Le+=+Se.replace("px","")+ +ge.replace("px","")}Le=+Le.toFixed(6)}return Le||0},de=function(Ue,He,Le){Ue&&Object(z.a)(Ue.style)==="object"&&(Ue.style[He]=Le)},xe=function(){return Q.any},Ke=I("bdgK"),Ve=I("faye"),Xe=I.n(Ve),at=I("wgJM"),it=I("l4aY"),lt=I("m+aA"),Me=I("c+Xe"),Te=I("zT1h"),Ye=I("QC+M");function ot(Ae,Ue,He){return He?Ae[0]===Ue[0]:Ae[0]===Ue[0]&&Ae[1]===Ue[1]}function ze(Ae,Ue,He){var Le=Ae[Ue]||{};return Object(D.a)(Object(D.a)({},Le),He)}function rt(Ae,Ue,He,Le){for(var he=He.points,Se=Object.keys(Ae),ge=0;ge<Se.length;ge+=1){var Pe=Se[ge];if(ot(Ae[Pe].points,he,Le))return"".concat(Ue,"-placement-").concat(Pe)}return""}var ke=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Ae=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(Ae)||/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(Ae==null?void 0:Ae.substr(0,4)))},Oe=I("MNnm");function Re(Ae,Ue){var He={};return He[Ae.toLowerCase()]=Ue.toLowerCase(),He["Webkit".concat(Ae)]="webkit".concat(Ue),He["Moz".concat(Ae)]="moz".concat(Ue),He["ms".concat(Ae)]="MS".concat(Ue),He["O".concat(Ae)]="o".concat(Ue.toLowerCase()),He}function pe(Ae,Ue){var He={animationend:Re("Animation","AnimationEnd"),transitionend:Re("Transition","TransitionEnd")};return Ae&&("AnimationEvent"in Ue||delete He.animationend.animation,"TransitionEvent"in Ue||delete He.transitionend.transition),He}var Ee=pe(Object(Oe.a)(),typeof window!="undefined"?window:{}),we={};if(Object(Oe.a)()){var De=document.createElement("div");we=De.style}var Ie={};function $e(Ae){if(Ie[Ae])return Ie[Ae];var Ue=Ee[Ae];if(Ue)for(var He=Object.keys(Ue),Le=He.length,he=0;he<Le;he+=1){var Se=He[he];if(Object.prototype.hasOwnProperty.call(Ue,Se)&&Se in we)return Ie[Ae]=Ue[Se],Ie[Ae]}return""}var qe=$e("animationend"),tt=$e("transitionend"),xt=!!(qe&&tt),gt=qe||"animationend",sr=tt||"transitionend";function tr(Ae,Ue){if(!Ae)return null;if(Object(z.a)(Ae)==="object"){var He=Ue.replace(/-\w/g,function(Le){return Le[1].toUpperCase()});return Ae[He]}return"".concat(Ae,"-").concat(Ue)}var St="none",Nr="appear",Ir="enter",Fr="leave",ln="none",Cr="prepare",rn="start",en="active",Lr="end";function un(Ae){var Ue=Object(u.useRef)(!1),He=Object(u.useState)(Ae),Le=Object(f.a)(He,2),he=Le[0],Se=Le[1];function ge(Pe){Ue.current||Se(Pe)}return Object(u.useEffect)(function(){return function(){Ue.current=!0}},[]),[he,ge]}var yn=Object(Oe.a)()?u.useLayoutEffect:u.useEffect,Gn=yn,cn=function(){var Ae=u.useRef(null);function Ue(){at.a.cancel(Ae.current)}function He(Le){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Ue();var Se=Object(at.a)(function(){he<=1?Le({isCanceled:function(){return Se!==Ae.current}}):He(Le,he-1)});Ae.current=Se}return u.useEffect(function(){return function(){Ue()}},[]),[He,Ue]},La=[Cr,rn,en,Lr],Ha=!1,bn=!0;function qt(Ae){return Ae===en||Ae===Lr}var Xn=function(Ae,Ue){var He=u.useState(ln),Le=Object(f.a)(He,2),he=Le[0],Se=Le[1],ge=cn(),Pe=Object(f.a)(ge,2),Fe=Pe[0],Be=Pe[1];function je(){Se(Cr)}return Gn(function(){if(he!==ln&&he!==Lr){var Ge=La.indexOf(he),st=La[Ge+1],wt=Ue(he);wt===Ha?Se(st):Fe(function(Ot){function Nt(){if(Ot.isCanceled())return;Se(st)}wt===!0?Nt():Promise.resolve(wt).then(Nt)})}},[Ae,he]),u.useEffect(function(){return function(){Be()}},[]),[je,he]},Ea=function(Ae){var Ue=Object(u.useRef)(),He=Object(u.useRef)(Ae);He.current=Ae;var Le=u.useCallback(function(ge){He.current(ge)},[]);function he(ge){ge&&(ge.removeEventListener(sr,Le),ge.removeEventListener(gt,Le))}function Se(ge){Ue.current&&Ue.current!==ge&&he(Ue.current),ge&&ge!==Ue.current&&(ge.addEventListener(sr,Le),ge.addEventListener(gt,Le),Ue.current=ge)}return u.useEffect(function(){return function(){he(Ue.current)}},[]),[Se,he]};function Ln(Ae,Ue,He,Le){var he=Le.motionEnter,Se=he===void 0?!0:he,ge=Le.motionAppear,Pe=ge===void 0?!0:ge,Fe=Le.motionLeave,Be=Fe===void 0?!0:Fe,je=Le.motionDeadline,Ge=Le.motionLeaveImmediately,st=Le.onAppearPrepare,wt=Le.onEnterPrepare,Ot=Le.onLeavePrepare,Nt=Le.onAppearStart,br=Le.onEnterStart,Mr=Le.onLeaveStart,Pr=Le.onAppearActive,jr=Le.onEnterActive,Ar=Le.onLeaveActive,Wr=Le.onAppearEnd,Hr=Le.onEnterEnd,qr=Le.onLeaveEnd,Vr=Le.onVisibleChanged,mn=un(),Yr=Object(f.a)(mn,2),_r=Yr[0],Sr=Yr[1],zr=un(St),Zr=Object(f.a)(zr,2),dr=Zr[0],nn=Zr[1],On=un(null),sn=Object(f.a)(On,2),En=sn[0],dn=sn[1],jn=Object(u.useRef)(!1),Hn=Object(u.useRef)(null),An=Object(u.useRef)(!1),Zn=Object(u.useRef)(null);function Na(){var vn=He();return vn||Zn.current}var ua=Object(u.useRef)(!1);function Kn(vn){var fn=Na();if(vn&&!vn.deadline&&vn.target!==fn)return;var Bn;dr===Nr&&ua.current?Bn=Wr==null?void 0:Wr(fn,vn):dr===Ir&&ua.current?Bn=Hr==null?void 0:Hr(fn,vn):dr===Fr&&ua.current&&(Bn=qr==null?void 0:qr(fn,vn)),Bn!==!1&&!An.current&&(nn(St),dn(null))}var xn=Ea(Kn),_n=Object(f.a)(xn,1),Rn=_n[0],Cn=u.useMemo(function(){var vn,fn,Bn;switch(dr){case"appear":return vn={},Object(L.a)(vn,Cr,st),Object(L.a)(vn,rn,Nt),Object(L.a)(vn,en,Pr),vn;case"enter":return fn={},Object(L.a)(fn,Cr,wt),Object(L.a)(fn,rn,br),Object(L.a)(fn,en,jr),fn;case"leave":return Bn={},Object(L.a)(Bn,Cr,Ot),Object(L.a)(Bn,rn,Mr),Object(L.a)(Bn,en,Ar),Bn;default:return{}}},[dr]),Un=Xn(dr,function(vn){if(vn===Cr){var fn=Cn[Cr];return fn?fn(Na()):Ha}if(hn in Cn){var Bn;dn(((Bn=Cn[hn])===null||Bn===void 0?void 0:Bn.call(Cn,Na(),null))||null)}return hn===en&&(Rn(Na()),je>0&&(clearTimeout(Hn.current),Hn.current=setTimeout(function(){Kn({deadline:!0})},je))),bn}),ga=Object(f.a)(Un,2),Va=ga[0],hn=ga[1],Ca=qt(hn);ua.current=Ca,Gn(function(){Sr(Ue);var vn=jn.current;if(jn.current=!0,!Ae)return;var fn;!vn&&Ue&&Pe&&(fn=Nr),vn&&Ue&&Se&&(fn=Ir),(vn&&!Ue&&Be||!vn&&Ge&&!Ue&&Be)&&(fn=Fr),fn&&(nn(fn),Va())},[Ue]),Object(u.useEffect)(function(){(dr===Nr&&!Pe||dr===Ir&&!Se||dr===Fr&&!Be)&&nn(St)},[Pe,Se,Be]),Object(u.useEffect)(function(){return function(){clearTimeout(Hn.current),An.current=!0}},[]),Object(u.useEffect)(function(){_r!==void 0&&dr===St&&(Vr==null||Vr(_r))},[_r,dr]);var Oa=En;return Cn[Cr]&&hn===rn&&(Oa=Object(D.a)({transition:"none"},Oa)),[dr,hn,Oa,_r!=null?_r:Ue]}var $r=function(Ae){Object(b.a)(He,Ae);var Ue=Object(y.a)(He);function He(){return Object(P.a)(this,He),Ue.apply(this,arguments)}return Object(O.a)(He,[{key:"render",value:function(){return this.props.children}}]),He}(u.Component),Pn=$r;function la(Ae){var Ue=Ae;Object(z.a)(Ae)==="object"&&(Ue=Ae.transitionSupport);function He(he){return!!(he.motionName&&Ue)}var Le=u.forwardRef(function(he,Se){var ge=he.visible,Pe=ge===void 0?!0:ge,Fe=he.removeOnLeave,Be=Fe===void 0?!0:Fe,je=he.forceRender,Ge=he.children,st=he.motionName,wt=he.leavedClassName,Ot=he.eventProps,Nt=He(he),br=Object(u.useRef)(),Mr=Object(u.useRef)();function Pr(){try{return Object(lt.a)(br.current||Mr.current)}catch(nn){return null}}var jr=Ln(Nt,Pe,Pr,he),Ar=Object(f.a)(jr,4),Wr=Ar[0],Hr=Ar[1],qr=Ar[2],Vr=Ar[3],mn=u.useRef(Vr);Vr&&(mn.current=!0);var Yr=Object(u.useRef)(Se);Yr.current=Se;var _r=u.useCallback(function(nn){br.current=nn,Object(Me.b)(Yr.current,nn)},[]),Sr,zr=Object(D.a)(Object(D.a)({},Ot),{},{visible:Pe});if(!Ge)Sr=null;else if(Wr===St||!He(he))Vr?Sr=Ge(Object(D.a)({},zr),_r):!Be&&mn.current?Sr=Ge(Object(D.a)(Object(D.a)({},zr),{},{className:wt}),_r):je?Sr=Ge(Object(D.a)(Object(D.a)({},zr),{},{style:{display:"none"}}),_r):Sr=null;else{var Zr,dr;Hr===Cr?dr="prepare":qt(Hr)?dr="active":Hr===rn&&(dr="start"),Sr=Ge(Object(D.a)(Object(D.a)({},zr),{},{className:w()(tr(st,Wr),(Zr={},Object(L.a)(Zr,tr(st,"".concat(Wr,"-").concat(dr)),dr),Object(L.a)(Zr,st,typeof st=="string"),Zr)),style:qr}),_r)}return u.createElement(Pn,{ref:Mr},Sr)});return Le.displayName="CSSMotion",Le}var fa=la(xt),Lt="add",cr="keep",ha="remove",xa="removed";function Ma(Ae){var Ue;return Ae&&Object(z.a)(Ae)==="object"&&"key"in Ae?Ue=Ae:Ue={key:Ae},Object(D.a)(Object(D.a)({},Ue),{},{key:String(Ue.key)})}function pa(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Ae.map(Ma)}function Mn(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],He=[],Le=0,he=Ue.length,Se=pa(Ae),ge=pa(Ue);Se.forEach(function(Be){for(var je=!1,Ge=Le;Ge<he;Ge+=1){var st=ge[Ge];if(st.key===Be.key){Le<Ge&&(He=He.concat(ge.slice(Le,Ge).map(function(wt){return Object(D.a)(Object(D.a)({},wt),{},{status:Lt})})),Le=Ge),He.push(Object(D.a)(Object(D.a)({},st),{},{status:cr})),Le+=1,je=!0;break}}je||He.push(Object(D.a)(Object(D.a)({},Be),{},{status:ha}))}),Le<he&&(He=He.concat(ge.slice(Le).map(function(Be){return Object(D.a)(Object(D.a)({},Be),{},{status:Lt})})));var Pe={};He.forEach(function(Be){var je=Be.key;Pe[je]=(Pe[je]||0)+1});var Fe=Object.keys(Pe).filter(function(Be){return Pe[Be]>1});return Fe.forEach(function(Be){He=He.filter(function(je){var Ge=je.key,st=je.status;return Ge!==Be||st!==ha}),He.forEach(function(je){je.key===Be&&(je.status=cr)})}),He}var Er=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function ta(Ae){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fa,He=function(Le){Object(b.a)(Se,Le);var he=Object(y.a)(Se);function Se(){var ge;return Object(P.a)(this,Se),ge=he.apply(this,arguments),ge.state={keyEntities:[]},ge.removeKey=function(Pe){ge.setState(function(Fe){var Be=Fe.keyEntities;return{keyEntities:Be.map(function(je){return je.key!==Pe?je:Object(D.a)(Object(D.a)({},je),{},{status:xa})})}})},ge}return Object(O.a)(Se,[{key:"render",value:function(){var Pe=this,Fe=this.state.keyEntities,Be=this.props,je=Be.component,Ge=Be.children,st=Be.onVisibleChanged,wt=Object(C.a)(Be,["component","children","onVisibleChanged"]),Ot=je||u.Fragment,Nt={};return Er.forEach(function(br){Nt[br]=wt[br],delete wt[br]}),delete wt.keys,u.createElement(Ot,wt,Fe.map(function(br){var Mr=br.status,Pr=Object(C.a)(br,["status"]),jr=Mr===Lt||Mr===cr;return u.createElement(Ue,Object(i.a)({},Nt,{key:Pr.key,visible:jr,eventProps:Pr,onVisibleChanged:function(Wr){st==null||st(Wr,{key:Pr.key}),Wr||Pe.removeKey(Pr.key)}}),Ge)}))}}],[{key:"getDerivedStateFromProps",value:function(Pe,Fe){var Be=Pe.keys,je=Fe.keyEntities,Ge=pa(Be),st=Mn(je,Ge);return{keyEntities:st.filter(function(wt){var Ot=je.find(function(Nt){var br=Nt.key;return wt.key===br});return!(Ot&&Ot.status===xa&&wt.status===ha)})}}}]),Se}(u.Component);return He.defaultProps={component:"div"},He}var Rt=ta(xt),Vn=fa;function In(Ae){var Ue=Ae.prefixCls,He=Ae.motion,Le=Ae.animation,he=Ae.transitionName;return He||(Le?{motionName:"".concat(Ue,"-").concat(Le)}:he?{motionName:he}:null)}function Ka(Ae){var Ue=Ae.prefixCls,He=Ae.visible,Le=Ae.zIndex,he=Ae.mask,Se=Ae.maskMotion,ge=Ae.maskAnimation,Pe=Ae.maskTransitionName;if(!he)return null;var Fe={};return(Se||Pe||ge)&&(Fe=Object(D.a)({motionAppear:!0},In({motion:Se,prefixCls:Ue,transitionName:Pe,animation:ge}))),u.createElement(Vn,Object(i.a)({},Fe,{visible:He,removeOnLeave:!0}),function(Be){var je=Be.className;return u.createElement("div",{style:{zIndex:Le},className:w()("".concat(Ue,"-mask"),je)})})}var _a=I("9mu1"),Qn=I("o0o1"),Qa=I.n(Qn),Za=I("HaE+"),ra=["measure","align",null,"motion"],wn=function(Ae,Ue){var He=Object(u.useState)(null),Le=Object(f.a)(He,2),he=Le[0],Se=Le[1],ge=Object(u.useRef)(),Pe=Object(u.useRef)(!1);function Fe(Ge){Pe.current||Se(Ge)}function Be(){at.a.cancel(ge.current)}function je(Ge){Be(),ge.current=Object(at.a)(function(){Fe(function(st){switch(he){case"align":return"motion";case"motion":return"stable";default:}return st}),Ge==null||Ge()})}return Object(u.useEffect)(function(){Fe("measure")},[Ae]),Object(u.useEffect)(function(){switch(he){case"measure":Ue();break;default:}he&&(ge.current=Object(at.a)(Object(Za.a)(Qa.a.mark(function Ge(){var st,wt;return Qa.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:st=ra.indexOf(he),wt=ra[st+1],wt&&st!==-1&&Fe(wt);case 3:case"end":return Nt.stop()}},Ge)}))))},[he]),Object(u.useEffect)(function(){return function(){Pe.current=!0,Be()}},[]),[he,je]},na=function(Ae){var Ue=u.useState({width:0,height:0}),He=Object(f.a)(Ue,2),Le=He[0],he=He[1];function Se(Pe){he({width:Pe.offsetWidth,height:Pe.offsetHeight})}var ge=u.useMemo(function(){var Pe={};if(Ae){var Fe=Le.width,Be=Le.height;Ae.indexOf("height")!==-1&&Be?Pe.height=Be:Ae.indexOf("minHeight")!==-1&&Be&&(Pe.minHeight=Be),Ae.indexOf("width")!==-1&&Fe?Pe.width=Fe:Ae.indexOf("minWidth")!==-1&&Fe&&(Pe.minWidth=Fe)}return Pe},[Ae,Le]);return[ge,Se]},Ia=u.forwardRef(function(Ae,Ue){var He=Ae.visible,Le=Ae.prefixCls,he=Ae.className,Se=Ae.style,ge=Ae.children,Pe=Ae.zIndex,Fe=Ae.stretch,Be=Ae.destroyPopupOnHide,je=Ae.forceRender,Ge=Ae.align,st=Ae.point,wt=Ae.getRootDomNode,Ot=Ae.getClassNameFromAlign,Nt=Ae.onAlign,br=Ae.onMouseEnter,Mr=Ae.onMouseLeave,Pr=Ae.onMouseDown,jr=Ae.onTouchStart,Ar=Object(u.useRef)(),Wr=Object(u.useRef)(),Hr=Object(u.useState)(),qr=Object(f.a)(Hr,2),Vr=qr[0],mn=qr[1],Yr=na(Fe),_r=Object(f.a)(Yr,2),Sr=_r[0],zr=_r[1];function Zr(){Fe&&zr(wt())}var dr=wn(He,Zr),nn=Object(f.a)(dr,2),On=nn[0],sn=nn[1],En=Object(u.useRef)();function dn(){return st||wt}function jn(){var xn;(xn=Ar.current)===null||xn===void 0||xn.forceAlign()}function Hn(xn,_n){var Rn=Ot(_n);Vr!==Rn&&mn(Rn),On==="align"&&(Vr!==Rn?Promise.resolve().then(function(){jn()}):sn(function(){var Cn;(Cn=En.current)===null||Cn===void 0||Cn.call(En)}),Nt==null||Nt(xn,_n))}var An=Object(D.a)({},In(Ae));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(xn){var _n=An[xn];An[xn]=function(Rn,Cn){return sn(),_n==null?void 0:_n(Rn,Cn)}});function Zn(){return new Promise(function(xn){En.current=xn})}u.useEffect(function(){!An.motionName&&On==="motion"&&sn()},[An.motionName,On]),u.useImperativeHandle(Ue,function(){return{forceAlign:jn,getElement:function(){return Wr.current}}});var Na=Object(D.a)(Object(D.a)({},Sr),{},{zIndex:Pe,opacity:On==="motion"||On==="stable"||!He?void 0:0,pointerEvents:On==="stable"?void 0:"none"},Se),ua=!0;(Ge==null?void 0:Ge.points)&&(On==="align"||On==="stable")&&(ua=!1);var Kn=ge;return u.Children.count(ge)>1&&(Kn=u.createElement("div",{className:"".concat(Le,"-content")},ge)),u.createElement(Vn,Object(i.a)({visible:He,ref:Wr,leavedClassName:"".concat(Le,"-hidden")},An,{onAppearPrepare:Zn,onEnterPrepare:Zn,removeOnLeave:Be,forceRender:je}),function(xn,_n){var Rn=xn.className,Cn=xn.style,Un=w()(Le,he,Vr,Rn);return u.createElement(_a.a,{target:dn(),key:"popup",ref:Ar,monitorWindowResize:!0,disabled:ua,align:Ge,onAlign:Hn},u.createElement("div",{ref:_n,className:Un,onMouseEnter:br,onMouseLeave:Mr,onMouseDownCapture:Pr,onTouchStartCapture:jr,style:Object(D.a)(Object(D.a)({},Cn),Na)},Kn))})});Ia.displayName="PopupInner";var ma=Ia,va=u.forwardRef(function(Ae,Ue){var He=Ae.prefixCls,Le=Ae.visible,he=Ae.zIndex,Se=Ae.children,ge=Ae.mobile;ge=ge===void 0?{}:ge;var Pe=ge.popupClassName,Fe=ge.popupStyle,Be=ge.popupMotion,je=Be===void 0?{}:Be,Ge=ge.popupRender,st=u.useRef();u.useImperativeHandle(Ue,function(){return{forceAlign:function(){},getElement:function(){return st.current}}});var wt=Object(D.a)({zIndex:he},Fe),Ot=Se;return u.Children.count(Se)>1&&(Ot=u.createElement("div",{className:"".concat(He,"-content")},Se)),Ge&&(Ot=Ge(Ot)),u.createElement(Vn,Object(i.a)({visible:Le,ref:st,removeOnLeave:!0},je),function(Nt,br){var Mr=Nt.className,Pr=Nt.style,jr=w()(He,Pe,Mr);return u.createElement("div",{ref:br,className:jr,style:Object(D.a)(Object(D.a)({},Pr),wt)},Ot)})});va.displayName="MobilePopupInner";var Pi=va,Xa=["visible","mobile"],Nn=u.forwardRef(function(Ae,Ue){var He=Ae.visible,Le=Ae.mobile,he=Object(C.a)(Ae,Xa),Se=Object(u.useState)(He),ge=Object(f.a)(Se,2),Pe=ge[0],Fe=ge[1],Be=Object(u.useState)(!1),je=Object(f.a)(Be,2),Ge=je[0],st=je[1],wt=Object(D.a)(Object(D.a)({},he),{},{visible:Pe});Object(u.useEffect)(function(){Fe(He),He&&Le&&st(ke())},[He,Le]);var Ot=Ge?u.createElement(Pi,Object(i.a)({},wt,{mobile:Le,ref:Ue})):u.createElement(ma,Object(i.a)({},wt,{ref:Ue}));return u.createElement("div",null,u.createElement(Ka,wt),Ot)});Nn.displayName="Popup";var za=Nn,Ei=u.createContext(null),ka=Ei;function aa(){}function oi(){return""}function pi(Ae){return Ae?Ae.ownerDocument:window.document}var si=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function mi(Ae){var Ue=function(He){Object(b.a)(he,He);var Le=Object(y.a)(he);function he(Se){var ge;Object(P.a)(this,he),ge=Le.call(this,Se),ge.popupRef=u.createRef(),ge.triggerRef=u.createRef(),ge.attachId=void 0,ge.clickOutsideHandler=void 0,ge.touchOutsideHandler=void 0,ge.contextMenuOutsideHandler1=void 0,ge.contextMenuOutsideHandler2=void 0,ge.mouseDownTimeout=void 0,ge.focusTime=void 0,ge.preClickTime=void 0,ge.preTouchTime=void 0,ge.delayTimer=void 0,ge.hasPopupMouseDown=void 0,ge.onMouseEnter=function(Fe){var Be=ge.props.mouseEnterDelay;ge.fireEvents("onMouseEnter",Fe),ge.delaySetPopupVisible(!0,Be,Be?null:Fe)},ge.onMouseMove=function(Fe){ge.fireEvents("onMouseMove",Fe),ge.setPoint(Fe)},ge.onMouseLeave=function(Fe){ge.fireEvents("onMouseLeave",Fe),ge.delaySetPopupVisible(!1,ge.props.mouseLeaveDelay)},ge.onPopupMouseEnter=function(){ge.clearDelayTimer()},ge.onPopupMouseLeave=function(Fe){var Be;if(Fe.relatedTarget&&!Fe.relatedTarget.setTimeout&&Object(it.a)((Be=ge.popupRef.current)===null||Be===void 0?void 0:Be.getElement(),Fe.relatedTarget))return;ge.delaySetPopupVisible(!1,ge.props.mouseLeaveDelay)},ge.onFocus=function(Fe){ge.fireEvents("onFocus",Fe),ge.clearDelayTimer(),ge.isFocusToShow()&&(ge.focusTime=Date.now(),ge.delaySetPopupVisible(!0,ge.props.focusDelay))},ge.onMouseDown=function(Fe){ge.fireEvents("onMouseDown",Fe),ge.preClickTime=Date.now()},ge.onTouchStart=function(Fe){ge.fireEvents("onTouchStart",Fe),ge.preTouchTime=Date.now()},ge.onBlur=function(Fe){ge.fireEvents("onBlur",Fe),ge.clearDelayTimer(),ge.isBlurToHide()&&ge.delaySetPopupVisible(!1,ge.props.blurDelay)},ge.onContextMenu=function(Fe){Fe.preventDefault(),ge.fireEvents("onContextMenu",Fe),ge.setPopupVisible(!0,Fe)},ge.onContextMenuClose=function(){ge.isContextMenuToShow()&&ge.close()},ge.onClick=function(Fe){if(ge.fireEvents("onClick",Fe),ge.focusTime){var Be;if(ge.preClickTime&&ge.preTouchTime?Be=Math.min(ge.preClickTime,ge.preTouchTime):ge.preClickTime?Be=ge.preClickTime:ge.preTouchTime&&(Be=ge.preTouchTime),Math.abs(Be-ge.focusTime)<20)return;ge.focusTime=0}ge.preClickTime=0,ge.preTouchTime=0,ge.isClickToShow()&&(ge.isClickToHide()||ge.isBlurToHide())&&Fe&&Fe.preventDefault&&Fe.preventDefault();var je=!ge.state.popupVisible;(ge.isClickToHide()&&!je||je&&ge.isClickToShow())&&ge.setPopupVisible(!ge.state.popupVisible,Fe)},ge.onPopupMouseDown=function(){if(ge.hasPopupMouseDown=!0,clearTimeout(ge.mouseDownTimeout),ge.mouseDownTimeout=window.setTimeout(function(){ge.hasPopupMouseDown=!1},0),ge.context){var Fe;(Fe=ge.context).onPopupMouseDown.apply(Fe,arguments)}},ge.onDocumentClick=function(Fe){if(ge.props.mask&&!ge.props.maskClosable)return;var Be=Fe.target,je=ge.getRootDomNode(),Ge=ge.getPopupDomNode();(!Object(it.a)(je,Be)||ge.isContextMenuOnly())&&!Object(it.a)(Ge,Be)&&!ge.hasPopupMouseDown&&ge.close()},ge.getRootDomNode=function(){var Fe=ge.props.getTriggerDOMNode;if(Fe)return Fe(ge.triggerRef.current);try{var Be=Object(lt.a)(ge.triggerRef.current);if(Be)return Be}catch(je){}return Xe.a.findDOMNode(Object(x.a)(ge))},ge.getPopupClassNameFromAlign=function(Fe){var Be=[],je=ge.props,Ge=je.popupPlacement,st=je.builtinPlacements,wt=je.prefixCls,Ot=je.alignPoint,Nt=je.getPopupClassNameFromAlign;return Ge&&st&&Be.push(rt(st,wt,Fe,Ot)),Nt&&Be.push(Nt(Fe)),Be.join(" ")},ge.getComponent=function(){var Fe=ge.props,Be=Fe.prefixCls,je=Fe.destroyPopupOnHide,Ge=Fe.popupClassName,st=Fe.onPopupAlign,wt=Fe.popupMotion,Ot=Fe.popupAnimation,Nt=Fe.popupTransitionName,br=Fe.popupStyle,Mr=Fe.mask,Pr=Fe.maskAnimation,jr=Fe.maskTransitionName,Ar=Fe.maskMotion,Wr=Fe.zIndex,Hr=Fe.popup,qr=Fe.stretch,Vr=Fe.alignPoint,mn=Fe.mobile,Yr=Fe.forceRender,_r=ge.state,Sr=_r.popupVisible,zr=_r.point,Zr=ge.getPopupAlign(),dr={};return ge.isMouseEnterToShow()&&(dr.onMouseEnter=ge.onPopupMouseEnter),ge.isMouseLeaveToHide()&&(dr.onMouseLeave=ge.onPopupMouseLeave),dr.onMouseDown=ge.onPopupMouseDown,dr.onTouchStart=ge.onPopupMouseDown,u.createElement(za,Object(i.a)({prefixCls:Be,destroyPopupOnHide:je,visible:Sr,point:Vr&&zr,className:Ge,align:Zr,onAlign:st,animation:Ot,getClassNameFromAlign:ge.getPopupClassNameFromAlign},dr,{stretch:qr,getRootDomNode:ge.getRootDomNode,style:br,mask:Mr,zIndex:Wr,transitionName:Nt,maskAnimation:Pr,maskTransitionName:jr,maskMotion:Ar,ref:ge.popupRef,motion:wt,mobile:mn,forceRender:Yr}),typeof Hr=="function"?Hr():Hr)},ge.attachParent=function(Fe){at.a.cancel(ge.attachId);var Be=ge.props,je=Be.getPopupContainer,Ge=Be.getDocument,st=ge.getRootDomNode(),wt;je?(st||je.length===0)&&(wt=je(st)):wt=Ge(ge.getRootDomNode()).body,wt?wt.appendChild(Fe):ge.attachId=Object(at.a)(function(){ge.attachParent(Fe)})},ge.getContainer=function(){var Fe=ge.props.getDocument,Be=Fe(ge.getRootDomNode()).createElement("div");return Be.style.position="absolute",Be.style.top="0",Be.style.left="0",Be.style.width="100%",ge.attachParent(Be),Be},ge.setPoint=function(Fe){var Be=ge.props.alignPoint;if(!Be||!Fe)return;ge.setState({point:{pageX:Fe.pageX,pageY:Fe.pageY}})},ge.handlePortalUpdate=function(){ge.state.prevPopupVisible!==ge.state.popupVisible&&ge.props.afterPopupVisibleChange(ge.state.popupVisible)},ge.triggerContextValue={onPopupMouseDown:ge.onPopupMouseDown};var Pe;return"popupVisible"in Se?Pe=!!Se.popupVisible:Pe=!!Se.defaultPopupVisible,ge.state={prevPopupVisible:Pe,popupVisible:Pe},si.forEach(function(Fe){ge["fire".concat(Fe)]=function(Be){ge.fireEvents(Fe,Be)}}),ge}return Object(O.a)(he,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ge=this.props,Pe=this.state;if(Pe.popupVisible){var Fe;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Fe=ge.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Te.a)(Fe,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Fe=Fe||ge.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Te.a)(Fe,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Fe=Fe||ge.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Te.a)(Fe,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Te.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),at.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ge;return((ge=this.popupRef.current)===null||ge===void 0?void 0:ge.getElement())||null}},{key:"getPopupAlign",value:function(){var ge=this.props,Pe=ge.popupPlacement,Fe=ge.popupAlign,Be=ge.builtinPlacements;return Pe&&Be?ze(Be,Pe,Fe):Fe}},{key:"setPopupVisible",value:function(ge,Pe){var Fe=this.props.alignPoint,Be=this.state.popupVisible;this.clearDelayTimer(),Be!==ge&&("popupVisible"in this.props||this.setState({popupVisible:ge,prevPopupVisible:Be}),this.props.onPopupVisibleChange(ge)),Fe&&Pe&&ge&&this.setPoint(Pe)}},{key:"delaySetPopupVisible",value:function(ge,Pe,Fe){var Be=this,je=Pe*1e3;if(this.clearDelayTimer(),je){var Ge=Fe?{pageX:Fe.pageX,pageY:Fe.pageY}:null;this.delayTimer=window.setTimeout(function(){Be.setPopupVisible(ge,Ge),Be.clearDelayTimer()},je)}else this.setPopupVisible(ge,Fe)}},{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(ge){var Pe=this.props.children.props,Fe=this.props;return Pe[ge]&&Fe[ge]?this["fire".concat(ge)]:Pe[ge]||Fe[ge]}},{key:"isClickToShow",value:function(){var ge=this.props,Pe=ge.action,Fe=ge.showAction;return Pe.indexOf("click")!==-1||Fe.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ge=this.props.action;return ge==="contextMenu"||ge.length===1&&ge[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ge=this.props,Pe=ge.action,Fe=ge.showAction;return Pe.indexOf("contextMenu")!==-1||Fe.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ge=this.props,Pe=ge.action,Fe=ge.hideAction;return Pe.indexOf("click")!==-1||Fe.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ge=this.props,Pe=ge.action,Fe=ge.showAction;return Pe.indexOf("hover")!==-1||Fe.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ge=this.props,Pe=ge.action,Fe=ge.hideAction;return Pe.indexOf("hover")!==-1||Fe.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ge=this.props,Pe=ge.action,Fe=ge.showAction;return Pe.indexOf("focus")!==-1||Fe.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ge=this.props,Pe=ge.action,Fe=ge.hideAction;return Pe.indexOf("focus")!==-1||Fe.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ge;(ge=this.popupRef.current)===null||ge===void 0||ge.forceAlign()}}},{key:"fireEvents",value:function(ge,Pe){var Fe=this.props.children.props[ge];Fe&&Fe(Pe);var Be=this.props[ge];Be&&Be(Pe)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ge=this.state.popupVisible,Pe=this.props,Fe=Pe.children,Be=Pe.forceRender,je=Pe.alignPoint,Ge=Pe.className,st=Pe.autoDestroy,wt=u.Children.only(Fe),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 Nt=w()(wt&&wt.props&&wt.props.className,Ge);Nt&&(Ot.className=Nt);var br=Object(D.a)({},Ot);Object(Me.c)(wt)&&(br.ref=Object(Me.a)(this.triggerRef,wt.ref));var Mr=u.cloneElement(wt,br),Pr;return(ge||this.popupRef.current||Be)&&(Pr=u.createElement(Ae,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ge&&st&&(Pr=null),u.createElement(ka.Provider,{value:this.triggerContextValue},Mr,Pr)}}],[{key:"getDerivedStateFromProps",value:function(ge,Pe){var Fe=ge.popupVisible,Be={};return Fe!==void 0&&Pe.popupVisible!==Fe&&(Be.popupVisible=Fe,Be.prevPopupVisible=Pe.popupVisible),Be}}]),he}(u.Component);return Ue.contextType=ka,Ue.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:oi,getDocument:pi,onPopupVisibleChange:aa,afterPopupVisibleChange:aa,onPopupAlign:aa,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ue}var qa=mi(Ye.a),wa={adjustX:1,adjustY:1},ei={topLeft:{points:["bl","tl"],overflow:wa,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:wa,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:wa,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:wa,offset:[4,0]}},xi={topLeft:{points:["bl","tl"],overflow:wa,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:wa,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:wa,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:wa,offset:[4,0]}},mt=ei,et=0,pt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},_t=function(Ue,He,Le){var he=re(He),Se=Ue.getState();Ue.setState({defaultActiveFirst:Object(D.a)(Object(D.a)({},Se.defaultActiveFirst),{},Object(L.a)({},he,Le))})},Ut=function(Ae){Object(b.a)(He,Ae);var Ue=Object(y.a)(He);function He(Le){var he;Object(P.a)(this,He),he=Ue.call(this,Le),he.onDestroy=function(je){he.props.onDestroy(je)},he.onKeyDown=function(je){var Ge=je.keyCode,st=he.menuInstance,wt=he.props.store,Ot=he.getVisible();if(Ge===g.a.ENTER)return he.onTitleClick(je),_t(wt,he.props.eventKey,!0),!0;if(Ge===g.a.RIGHT)return Ot?st.onKeyDown(je):(he.triggerOpenChange(!0),_t(wt,he.props.eventKey,!0)),!0;if(Ge===g.a.LEFT){var Nt;if(Ot)Nt=st.onKeyDown(je);else return;return Nt||(he.triggerOpenChange(!1),Nt=!0),Nt}return Ot&&(Ge===g.a.UP||Ge===g.a.DOWN)?st.onKeyDown(je):void 0},he.onOpenChange=function(je){he.props.onOpenChange(je)},he.onPopupVisibleChange=function(je){he.triggerOpenChange(je,je?"mouseenter":"mouseleave")},he.onMouseEnter=function(je){var Ge=he.props,st=Ge.eventKey,wt=Ge.onMouseEnter,Ot=Ge.store;_t(Ot,he.props.eventKey,!1),wt({key:st,domEvent:je})},he.onMouseLeave=function(je){var Ge=he.props,st=Ge.parentMenu,wt=Ge.eventKey,Ot=Ge.onMouseLeave;st.subMenuInstance=Object(x.a)(he),Ot({key:wt,domEvent:je})},he.onTitleMouseEnter=function(je){var Ge=he.props,st=Ge.eventKey,wt=Ge.onItemHover,Ot=Ge.onTitleMouseEnter;wt({key:st,hover:!0}),Ot({key:st,domEvent:je})},he.onTitleMouseLeave=function(je){var Ge=he.props,st=Ge.parentMenu,wt=Ge.eventKey,Ot=Ge.onItemHover,Nt=Ge.onTitleMouseLeave;st.subMenuInstance=Object(x.a)(he),Ot({key:wt,hover:!1}),Nt({key:wt,domEvent:je})},he.onTitleClick=function(je){var Ge=Object(x.a)(he),st=Ge.props;if(st.onTitleClick({key:st.eventKey,domEvent:je}),st.triggerSubMenuAction==="hover")return;he.triggerOpenChange(!he.getVisible(),"click"),_t(st.store,he.props.eventKey,!1)},he.onSubMenuClick=function(je){typeof he.props.onClick=="function"&&he.props.onClick(he.addKeyPath(je))},he.onSelect=function(je){he.props.onSelect(je)},he.onDeselect=function(je){he.props.onDeselect(je)},he.getPrefixCls=function(){return"".concat(he.props.rootPrefixCls,"-submenu")},he.getActiveClassName=function(){return"".concat(he.getPrefixCls(),"-active")},he.getDisabledClassName=function(){return"".concat(he.getPrefixCls(),"-disabled")},he.getSelectedClassName=function(){return"".concat(he.getPrefixCls(),"-selected")},he.getOpenClassName=function(){return"".concat(he.props.rootPrefixCls,"-submenu-open")},he.getVisible=function(){return he.state.isOpen},he.getMode=function(){return he.state.mode},he.saveMenuInstance=function(je){he.menuInstance=je},he.addKeyPath=function(je){return Object(D.a)(Object(D.a)({},je),{},{keyPath:(je.keyPath||[]).concat(he.props.eventKey)})},he.triggerOpenChange=function(je,Ge){var st=he.props.eventKey,wt=function(){he.onOpenChange({key:st,item:Object(x.a)(he),trigger:Ge,open:je})};Ge==="mouseenter"?he.mouseenterTimeout=setTimeout(function(){wt()},0):wt()},he.isChildrenSelected=function(){var je={find:!1};return X(he.props.children,he.props.selectedKeys,je),je.find},he.isInlineMode=function(){return he.getMode()==="inline"},he.adjustWidth=function(){if(!he.subMenuTitle||!he.menuInstance)return;var je=Ve.findDOMNode(he.menuInstance);if(je.offsetWidth>=he.subMenuTitle.offsetWidth)return;je.style.minWidth="".concat(he.subMenuTitle.offsetWidth,"px")},he.saveSubMenuTitle=function(je){he.subMenuTitle=je},he.getBaseProps=function(){var je=Object(x.a)(he),Ge=je.props,st=he.getMode();return{mode:st==="horizontal"?"vertical":st,visible:he.getVisible(),level:Ge.level+1,inlineIndent:Ge.inlineIndent,focusable:!1,onClick:he.onSubMenuClick,onSelect:he.onSelect,onDeselect:he.onDeselect,onDestroy:he.onDestroy,selectedKeys:Ge.selectedKeys,eventKey:"".concat(Ge.eventKey,"-menu-"),openKeys:Ge.openKeys,motion:Ge.motion,onOpenChange:he.onOpenChange,subMenuOpenDelay:Ge.subMenuOpenDelay,parentMenu:Object(x.a)(he),subMenuCloseDelay:Ge.subMenuCloseDelay,forceSubMenuRender:Ge.forceSubMenuRender,triggerSubMenuAction:Ge.triggerSubMenuAction,builtinPlacements:Ge.builtinPlacements,defaultActiveFirst:Ge.store.getState().defaultActiveFirst[re(Ge.eventKey)],multiple:Ge.multiple,prefixCls:Ge.rootPrefixCls,id:he.internalMenuId,manualRef:he.saveMenuInstance,itemIcon:Ge.itemIcon,expandIcon:Ge.expandIcon,direction:Ge.direction}},he.getMotion=function(je,Ge){var st=Object(x.a)(he),wt=st.haveRendered,Ot=he.props,Nt=Ot.motion,br=Ot.rootPrefixCls,Mr=Object(D.a)(Object(D.a)({},Nt),{},{leavedClassName:"".concat(br,"-hidden"),removeOnLeave:!1,motionAppear:wt||!Ge||je!=="inline"});return Mr};var Se=Le.store,ge=Le.eventKey,Pe=Se.getState(),Fe=Pe.defaultActiveFirst;he.isRootMenu=!1;var Be=!1;return Fe&&(Be=Fe[ge]),_t(Se,ge,Be),he.state={mode:Le.mode,isOpen:Le.isOpen},he}return Object(O.a)(He,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var he=this,Se=this.props,ge=Se.mode,Pe=Se.parentMenu,Fe=Se.manualRef,Be=Se.isOpen,je=function(){he.setState({mode:ge,isOpen:Be})},Ge=Be!==this.state.isOpen,st=ge!==this.state.mode;if((st||Ge)&&(at.a.cancel(this.updateStateRaf),st?this.updateStateRaf=Object(at.a)(je):je()),Fe&&Fe(this),ge!=="horizontal"||!(Pe==null?void 0:Pe.isRootMenu)||!Be)return;this.minWidthTimeout=setTimeout(function(){return he.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var he=this.props,Se=he.onDestroy,ge=he.eventKey;Se&&Se(ge),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),at.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(he,Se){var ge=this.getBaseProps();return u.createElement(mr,Object(i.a)({},ge,{id:this.internalMenuId,className:he,style:Se}),this.props.children)}},{key:"renderChildren",value:function(){var he=this,Se=this.getBaseProps(),ge=Se.mode,Pe=Se.visible,Fe=Se.forceSubMenuRender,Be=Se.direction,je=this.getMotion(ge,Pe);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Pe||Fe,!this.haveOpened)return u.createElement("div",null);var Ge=w()("".concat(Se.prefixCls,"-sub"),Object(L.a)({},"".concat(Se.prefixCls,"-rtl"),Be==="rtl"));return this.isInlineMode()?u.createElement(Vn,Object(i.a)({visible:Se.visible,forceRender:Fe},je),function(st){var wt=st.className,Ot=st.style,Nt=w()(Ge,wt);return he.renderPopupMenu(Nt,Ot)}):this.renderPopupMenu(Ge)}},{key:"render",value:function(){var he,Se,ge,Pe=Object(D.a)({},this.props),Fe=this.getVisible(),Be=this.getPrefixCls(),je=this.isInlineMode(),Ge=this.getMode(),st=w()(Be,"".concat(Be,"-").concat(Ge),(he={},Object(L.a)(he,Pe.className,!!Pe.className),Object(L.a)(he,this.getOpenClassName(),Fe),Object(L.a)(he,this.getActiveClassName(),Pe.active||Fe&&!je),Object(L.a)(he,this.getDisabledClassName(),Pe.disabled),Object(L.a)(he,this.getSelectedClassName(),this.isChildrenSelected()),he));this.internalMenuId||(Pe.eventKey?this.internalMenuId="".concat(Pe.eventKey,"$Menu"):(et+=1,this.internalMenuId="$__$".concat(et,"$Menu")));var wt={},Ot={},Nt={};Pe.disabled||(wt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Ot={onClick:this.onTitleClick},Nt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var br={},Mr=Pe.direction,Pr=Mr==="rtl";je&&(Pr?br.paddingRight=Pe.inlineIndent*Pe.level:br.paddingLeft=Pe.inlineIndent*Pe.level);var jr={};this.getVisible()&&(jr={"aria-owns":this.internalMenuId});var Ar=null;Ge!=="horizontal"&&(Ar=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Ar=u.createElement(this.props.expandIcon,Object(D.a)({},this.props))));var Wr=u.createElement("div",Object(i.a)({ref:this.saveSubMenuTitle,style:br,className:"".concat(Be,"-title"),role:"button"},Nt,Ot,{"aria-expanded":Fe},jr,{"aria-haspopup":"true",title:typeof Pe.title=="string"?Pe.title:void 0}),Pe.title,Ar||u.createElement("i",{className:"".concat(Be,"-arrow")})),Hr=this.renderChildren(),qr=((Se=Pe.parentMenu)===null||Se===void 0?void 0:Se.isRootMenu)?Pe.parentMenu.props.getPopupContainer:function(dn){return dn.parentNode},Vr=pt[Ge],mn=Pe.popupOffset?{offset:Pe.popupOffset}:{},Yr=w()((ge={},Object(L.a)(ge,Pe.popupClassName,Pe.popupClassName&&!je),Object(L.a)(ge,"".concat(Be,"-rtl"),Pr),ge)),_r=Pe.disabled,Sr=Pe.triggerSubMenuAction,zr=Pe.subMenuOpenDelay,Zr=Pe.forceSubMenuRender,dr=Pe.subMenuCloseDelay,nn=Pe.builtinPlacements;$.forEach(function(dn){return delete Pe[dn]}),delete Pe.onClick;var On=Pr?Object(D.a)(Object(D.a)({},xi),nn):Object(D.a)(Object(D.a)({},ei),nn);delete Pe.direction;var sn=this.getBaseProps(),En=je?null:this.getMotion(sn.mode,sn.visible);return u.createElement("li",Object(i.a)({},Pe,wt,{className:st,role:"menuitem"}),u.createElement(qa,{prefixCls:Be,popupClassName:w()("".concat(Be,"-popup"),Yr),getPopupContainer:qr,builtinPlacements:On,popupPlacement:Vr,popupVisible:je?!1:Fe,popupAlign:mn,popup:je?null:Hr,action:_r||je?[]:[Sr],mouseEnterDelay:zr,mouseLeaveDelay:dr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Zr,popupMotion:En},Wr),je?Hr:null)}}]),He}(u.Component);Ut.defaultProps={onMouseEnter:Z,onMouseLeave:Z,onTitleMouseEnter:Z,onTitleMouseLeave:Z,onTitleClick:Z,manualRef:Z,mode:"vertical",title:""};var Dt=Object(T.b)(function(Ae,Ue){var He=Ae.openKeys,Le=Ae.activeKey,he=Ae.selectedKeys,Se=Ue.eventKey,ge=Ue.subMenuKey;return{isOpen:He.indexOf(Se)>-1,active:Le[ge]===Se,selectedKeys:he}})(Ut);Dt.isSubMenu=!0;var Gt=Dt,It="menuitem-overflowed",ut=.5,yt=function(Ae){Object(b.a)(He,Ae);var Ue=Object(y.a)(He);function He(){var Le;return Object(P.a)(this,He),Le=Ue.apply(this,arguments),Le.resizeObserver=null,Le.mutationObserver=null,Le.originalTotalWidth=0,Le.overflowedItems=[],Le.menuItemSizes=[],Le.cancelFrameId=null,Le.state={lastVisibleIndex:void 0},Le.childRef=u.createRef(),Le.getMenuItemNodes=function(){var he=Le.props.prefixCls,Se=Le.childRef.current;return Se?[].slice.call(Se.children).filter(function(ge){return ge.className.split(" ").indexOf("".concat(he,"-overflowed-submenu"))<0}):[]},Le.getOverflowedSubMenuItem=function(he,Se,ge){var Pe=Le.props,Fe=Pe.overflowedIndicator,Be=Pe.level,je=Pe.mode,Ge=Pe.prefixCls,st=Pe.theme;if(Be!==1||je!=="horizontal")return null;var wt=Le.props.children[0],Ot=wt.props,Nt=Ot.children,br=Ot.title,Mr=Ot.style,Pr=Object(C.a)(Ot,["children","title","style"]),jr=Object(D.a)({},Mr),Ar="".concat(he,"-overflowed-indicator"),Wr="".concat(he,"-overflowed-indicator");Se.length===0&&ge!==!0?jr=Object(D.a)(Object(D.a)({},jr),{},{display:"none"}):ge&&(jr=Object(D.a)(Object(D.a)({},jr),{},{visibility:"hidden",position:"absolute"}),Ar="".concat(Ar,"-placeholder"),Wr="".concat(Wr,"-placeholder"));var Hr=st?"".concat(Ge,"-").concat(st):"",qr={};return $.forEach(function(Vr){Pr[Vr]!==void 0&&(qr[Vr]=Pr[Vr])}),u.createElement(Gt,Object(i.a)({title:Fe,className:"".concat(Ge,"-overflowed-submenu"),popupClassName:Hr},qr,{key:Ar,eventKey:Wr,disabled:!1,style:jr}),Se)},Le.setChildrenWidthAndResize=function(){if(Le.props.mode!=="horizontal")return;var he=Le.childRef.current;if(!he)return;var Se=he.children;if(!Se||Se.length===0)return;var ge=he.children[Se.length-1];de(ge,"display","inline-block");var Pe=Le.getMenuItemNodes(),Fe=Pe.filter(function(Be){return Be.className.split(" ").indexOf(It)>=0});Fe.forEach(function(Be){de(Be,"display","inline-block")}),Le.menuItemSizes=Pe.map(function(Be){return ve(Be,!0)}),Fe.forEach(function(Be){de(Be,"display","none")}),Le.overflowedIndicatorWidth=ve(he.children[he.children.length-1],!0),Le.originalTotalWidth=Le.menuItemSizes.reduce(function(Be,je){return Be+je},0),Le.handleResize(),de(ge,"display","none")},Le.handleResize=function(){if(Le.props.mode!=="horizontal")return;var he=Le.childRef.current;if(!he)return;var Se=ve(he);Le.overflowedItems=[];var ge=0,Pe;Le.originalTotalWidth>Se+ut&&(Pe=-1,Le.menuItemSizes.forEach(function(Fe){ge+=Fe,ge+Le.overflowedIndicatorWidth<=Se&&(Pe+=1)})),Le.setState({lastVisibleIndex:Pe})},Le}return Object(O.a)(He,[{key:"componentDidMount",value:function(){var he=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Se=this.childRef.current;if(!Se)return;this.resizeObserver=new Ke.default(function(ge){ge.forEach(function(){var Pe=he.cancelFrameId;cancelAnimationFrame(Pe),he.cancelFrameId=requestAnimationFrame(he.setChildrenWidthAndResize)})}),[].slice.call(Se.children).concat(Se).forEach(function(ge){he.resizeObserver.observe(ge)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){he.resizeObserver.disconnect(),[].slice.call(Se.children).concat(Se).forEach(function(ge){he.resizeObserver.observe(ge)}),he.setChildrenWidthAndResize()}),this.mutationObserver.observe(Se,{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(he){var Se=this,ge=this.state.lastVisibleIndex;return(he||[]).reduce(function(Pe,Fe,Be){var je=Fe;if(Se.props.mode==="horizontal"){var Ge=Se.getOverflowedSubMenuItem(Fe.props.eventKey,[]);ge!==void 0&&Se.props.className.indexOf("".concat(Se.props.prefixCls,"-root"))!==-1&&(Be>ge&&(je=u.cloneElement(Fe,{style:{display:"none"},eventKey:"".concat(Fe.props.eventKey,"-hidden"),className:"".concat(It)})),Be===ge+1&&(Se.overflowedItems=he.slice(ge+1).map(function(wt){return u.cloneElement(wt,{key:wt.props.eventKey,mode:"vertical-left"})}),Ge=Se.getOverflowedSubMenuItem(Fe.props.eventKey,Se.overflowedItems)));var st=[].concat(Object(l.a)(Pe),[Ge,je]);return Be===he.length-1&&st.push(Se.getOverflowedSubMenuItem(Fe.props.eventKey,[],!0)),st}return[].concat(Object(l.a)(Pe),[je])},[])}},{key:"render",value:function(){var he=this.props,Se=he.visible,ge=he.prefixCls,Pe=he.overflowedIndicator,Fe=he.mode,Be=he.level,je=he.tag,Ge=he.children,st=he.theme,wt=Object(C.a)(he,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Ot=je;return u.createElement(Ot,Object(i.a)({ref:this.childRef},wt),this.renderChildren(Ge))}}]),He}(u.Component);yt.defaultProps={tag:"div",className:""};var bt=yt;function er(Ae){return Ae.length?Ae.every(function(Ue){return!!Ue.props.disabled}):!0}function Yt(Ae,Ue,He){var Le=Ae.getState();Ae.setState({activeKey:Object(D.a)(Object(D.a)({},Le.activeKey),{},Object(L.a)({},Ue,He))})}function Wt(Ae){return Ae.eventKey||"0-menu-"}function jt(Ae,Ue){var He=Ue,Le=Ae.children,he=Ae.eventKey;if(He){var Se;if(Y(Le,function(ge,Pe){ge&&ge.props&&!ge.props.disabled&&He===be(ge,he,Pe)&&(Se=!0)}),Se)return He}return He=null,Ae.defaultActiveFirst&&Y(Le,function(ge,Pe){!He&&ge&&!ge.props.disabled&&(He=be(ge,he,Pe))}),He}function Xt(Ae){if(!Ae)return;var Ue=this.instanceArray.indexOf(Ae);Ue!==-1?this.instanceArray[Ue]=Ae:this.instanceArray.push(Ae)}var Qt=function(Ae){Object(b.a)(He,Ae);var Ue=Object(y.a)(He);function He(Le){var he;return Object(P.a)(this,He),he=Ue.call(this,Le),he.onKeyDown=function(Se,ge){var Pe=Se.keyCode,Fe;if(he.getFlatInstanceArray().forEach(function(je){je&&je.props.active&&je.onKeyDown&&(Fe=je.onKeyDown(Se))}),Fe)return 1;var Be=null;return(Pe===g.a.UP||Pe===g.a.DOWN)&&(Be=he.step(Pe===g.a.UP?-1:1)),Be?(Se.preventDefault(),Yt(he.props.store,Wt(he.props),Be.props.eventKey),typeof ge=="function"&&ge(Be),1):void 0},he.onItemHover=function(Se){var ge=Se.key,Pe=Se.hover;Yt(he.props.store,Wt(he.props),Pe?ge:null)},he.onDeselect=function(Se){he.props.onDeselect(Se)},he.onSelect=function(Se){he.props.onSelect(Se)},he.onClick=function(Se){he.props.onClick(Se)},he.onOpenChange=function(Se){he.props.onOpenChange(Se)},he.onDestroy=function(Se){he.props.onDestroy(Se)},he.getFlatInstanceArray=function(){return he.instanceArray},he.step=function(Se){var ge=he.getFlatInstanceArray(),Pe=he.props.store.getState().activeKey[Wt(he.props)],Fe=ge.length;if(!Fe)return null;Se<0&&(ge=ge.concat().reverse());var Be=-1;if(ge.every(function(wt,Ot){return wt&&wt.props.eventKey===Pe?(Be=Ot,!1):!0}),!he.props.defaultActiveFirst&&Be!==-1&&er(ge.slice(Be,Fe-1)))return;var je=(Be+1)%Fe,Ge=je;do{var st=ge[Ge];if(!st||st.props.disabled)Ge=(Ge+1)%Fe;else return st}while(Ge!==je);return null},he.renderCommonMenuItem=function(Se,ge,Pe){var Fe=he.props.store.getState(),Be=Object(x.a)(he),je=Be.props,Ge=be(Se,je.eventKey,ge),st=Se.props;if(!st||typeof Se.type=="string")return Se;var wt=Ge===Fe.activeKey,Ot=Object(D.a)(Object(D.a)({mode:st.mode||je.mode,level:je.level,inlineIndent:je.inlineIndent,renderMenuItem:he.renderMenuItem,rootPrefixCls:je.prefixCls,index:ge,parentMenu:je.parentMenu,manualRef:st.disabled?void 0:Object(k.a)(Se.ref,Xt.bind(Object(x.a)(he))),eventKey:Ge,active:!st.disabled&&wt,multiple:je.multiple,onClick:function(br){(st.onClick||Z)(br),he.onClick(br)},onItemHover:he.onItemHover,motion:je.motion,subMenuOpenDelay:je.subMenuOpenDelay,subMenuCloseDelay:je.subMenuCloseDelay,forceSubMenuRender:je.forceSubMenuRender,onOpenChange:he.onOpenChange,onDeselect:he.onDeselect,onSelect:he.onSelect,builtinPlacements:je.builtinPlacements,itemIcon:st.itemIcon||he.props.itemIcon,expandIcon:st.expandIcon||he.props.expandIcon},Pe),{},{direction:je.direction});return(je.mode==="inline"||xe())&&(Ot.triggerSubMenuAction="click"),u.cloneElement(Se,Object(D.a)(Object(D.a)({},Ot),{},{key:Ge||ge}))},he.renderMenuItem=function(Se,ge,Pe){if(!Se)return null;var Fe=he.props.store.getState(),Be={openKeys:Fe.openKeys,selectedKeys:Fe.selectedKeys,triggerSubMenuAction:he.props.triggerSubMenuAction,subMenuKey:Pe};return he.renderCommonMenuItem(Se,ge,Be)},Le.store.setState({activeKey:Object(D.a)(Object(D.a)({},Le.store.getState().activeKey),{},Object(L.a)({},Le.eventKey,jt(Le,Le.activeKey)))}),he.instanceArray=[],he}return Object(O.a)(He,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(he){return this.props.visible||he.visible||this.props.className!==he.className||!K()(this.props.style,he.style)}},{key:"componentDidUpdate",value:function(he){var Se=this.props,ge="activeKey"in Se?Se.activeKey:Se.store.getState().activeKey[Wt(Se)],Pe=jt(Se,ge);if(Pe!==ge)Yt(Se.store,Wt(Se),Pe);else if("activeKey"in he){var Fe=jt(he,he.activeKey);Pe!==Fe&&Yt(Se.store,Wt(Se),Pe)}}},{key:"render",value:function(){var he=this,Se=Object(i.a)({},this.props);this.instanceArray=[];var ge=w()(Se.prefixCls,Se.className,"".concat(Se.prefixCls,"-").concat(Se.mode)),Pe={className:ge,role:Se.role||"menu"};Se.id&&(Pe.id=Se.id),Se.focusable&&(Pe.tabIndex=0,Pe.onKeyDown=this.onKeyDown);var Fe=Se.prefixCls,Be=Se.eventKey,je=Se.visible,Ge=Se.level,st=Se.mode,wt=Se.overflowedIndicator,Ot=Se.theme;return $.forEach(function(Nt){return delete Se[Nt]}),delete Se.onClick,u.createElement(bt,Object(i.a)({},Se,{prefixCls:Fe,mode:st,tag:"ul",level:Ge,theme:Ot,visible:je,overflowedIndicator:wt},Pe),Object(p.a)(Se.children).map(function(Nt,br){return he.renderMenuItem(Nt,br,Be||"0-menu-")}))}}]),He}(u.Component);Qt.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:Z};var Ze=Object(T.b)()(Qt),mr=Ze,wr=I("Kwbf");function rr(Ae,Ue,He){var Le=Ae.prefixCls,he=Ae.motion,Se=Ae.defaultMotions,ge=Se===void 0?{}:Se,Pe=Ae.openAnimation,Fe=Ae.openTransitionName,Be=Ue.switchingModeFromInline;if(he)return he;if(Object(z.a)(Pe)==="object"&&Pe)Object(wr.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Pe=="string")return{motionName:"".concat(Le,"-open-").concat(Pe)};if(Fe)return{motionName:Fe};var je=ge[He];return je||(Be?null:ge.other)}var ft=function(Ae){Object(b.a)(He,Ae);var Ue=Object(y.a)(He);function He(Le){var he;Object(P.a)(this,He),he=Ue.call(this,Le),he.onSelect=function(Pe){var Fe=Object(x.a)(he),Be=Fe.props;if(Be.selectable){var je=he.store.getState(),Ge=je.selectedKeys,st=Pe.key;Be.multiple?Ge=Ge.concat([st]):Ge=[st],"selectedKeys"in Be||he.store.setState({selectedKeys:Ge}),Be.onSelect(Object(D.a)(Object(D.a)({},Pe),{},{selectedKeys:Ge}))}},he.onClick=function(Pe){var Fe=he.getRealMenuMode(),Be=Object(x.a)(he),je=Be.store,Ge=Be.props.onOpenChange;Fe!=="inline"&&!("openKeys"in he.props)&&(je.setState({openKeys:[]}),Ge([])),he.props.onClick(Pe)},he.onKeyDown=function(Pe,Fe){he.innerMenu.getWrappedInstance().onKeyDown(Pe,Fe)},he.onOpenChange=function(Pe){var Fe=Object(x.a)(he),Be=Fe.props,je=he.store.getState().openKeys.concat(),Ge=!1,st=function(Ot){var Nt=!1;if(Ot.open)Nt=je.indexOf(Ot.key)===-1,Nt&&je.push(Ot.key);else{var br=je.indexOf(Ot.key);Nt=br!==-1,Nt&&je.splice(br,1)}Ge=Ge||Nt};Array.isArray(Pe)?Pe.forEach(st):st(Pe),Ge&&("openKeys"in he.props||he.store.setState({openKeys:je}),Be.onOpenChange(je))},he.onDeselect=function(Pe){var Fe=Object(x.a)(he),Be=Fe.props;if(Be.selectable){var je=he.store.getState().selectedKeys.concat(),Ge=Pe.key,st=je.indexOf(Ge);st!==-1&&je.splice(st,1),"selectedKeys"in Be||he.store.setState({selectedKeys:je}),Be.onDeselect(Object(D.a)(Object(D.a)({},Pe),{},{selectedKeys:je}))}},he.onMouseEnter=function(Pe){he.restoreModeVerticalFromInline();var Fe=he.props.onMouseEnter;Fe&&Fe(Pe)},he.onTransitionEnd=function(Pe){var Fe=Pe.propertyName==="width"&&Pe.target===Pe.currentTarget,Be=Pe.target.className,je=Object.prototype.toString.call(Be)==="[object SVGAnimatedString]"?Be.animVal:Be,Ge=Pe.propertyName==="font-size"&&je.indexOf("anticon")>=0;(Fe||Ge)&&he.restoreModeVerticalFromInline()},he.setInnerMenu=function(Pe){he.innerMenu=Pe},he.isRootMenu=!0;var Se=Le.defaultSelectedKeys,ge=Le.defaultOpenKeys;return"selectedKeys"in Le&&(Se=Le.selectedKeys||[]),"openKeys"in Le&&(ge=Le.openKeys||[]),he.store=Object(T.c)({selectedKeys:Se,openKeys:ge,activeKey:{"0-menu-":jt(Le,Le.activeKey)}}),he.state={switchingModeFromInline:!1,prevProps:Le,inlineOpenKeys:[],store:he.store},he}return Object(O.a)(He,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(he){var Se=this.props,ge=Se.siderCollapsed,Pe=Se.inlineCollapsed,Fe=Se.onOpenChange;(!he.inlineCollapsed&&Pe||!he.siderCollapsed&&ge)&&Fe([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var he=this.props.collapsedWidth,Se=this.store,ge=this.prevOpenKeys,Pe=this.getInlineCollapsed()&&(he===0||he==="0"||he==="0px");Pe?(this.prevOpenKeys=Se.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ge&&(this.store.setState({openKeys:ge}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var he=this.props.mode,Se=this.state.switchingModeFromInline,ge=this.getInlineCollapsed();return Se&&ge?"inline":ge?"vertical":he}},{key:"getInlineCollapsed",value:function(){var he=this.props,Se=he.inlineCollapsed,ge=he.siderCollapsed;return ge!==void 0?ge:Se}},{key:"restoreModeVerticalFromInline",value:function(){var he=this.state.switchingModeFromInline;he&&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 he=Object(D.a)({},Object(M.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Se=this.getRealMenuMode();return he.className+=" ".concat(he.prefixCls,"-root"),he.direction==="rtl"&&(he.className+=" ".concat(he.prefixCls,"-rtl")),he=Object(D.a)(Object(D.a)({},he),{},{mode:Se,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:rr(this.props,this.state,Se)}),delete he.openAnimation,delete he.openTransitionName,u.createElement(T.a,{store:this.store},u.createElement(mr,Object(i.a)({},he,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(he,Se){var ge=Se.prevProps,Pe=Se.store,Fe=Pe.getState(),Be={},je={prevProps:he};return ge.mode==="inline"&&he.mode!=="inline"&&(je.switchingModeFromInline=!0),"openKeys"in he?Be.openKeys=he.openKeys||[]:((he.inlineCollapsed&&!ge.inlineCollapsed||he.siderCollapsed&&!ge.siderCollapsed)&&(je.switchingModeFromInline=!0,je.inlineOpenKeys=Fe.openKeys,Be.openKeys=[]),(!he.inlineCollapsed&&ge.inlineCollapsed||!he.siderCollapsed&&ge.siderCollapsed)&&(Be.openKeys=Se.inlineOpenKeys,je.inlineOpenKeys=[])),Object.keys(Be).length&&Pe.setState(Be),je}}]),He}(u.Component);ft.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 Et=ft,ht=function(Ae){Object(b.a)(He,Ae);var Ue=Object(y.a)(He);function He(){var Le;return Object(P.a)(this,He),Le=Ue.apply(this,arguments),Le.onKeyDown=function(he){var Se=he.keyCode;return Se===g.a.ENTER?(Le.onClick(he),!0):void 0},Le.onMouseLeave=function(he){var Se=Le.props,ge=Se.eventKey,Pe=Se.onItemHover,Fe=Se.onMouseLeave;Pe({key:ge,hover:!1}),Fe({key:ge,domEvent:he})},Le.onMouseEnter=function(he){var Se=Le.props,ge=Se.eventKey,Pe=Se.onItemHover,Fe=Se.onMouseEnter;Pe({key:ge,hover:!0}),Fe({key:ge,domEvent:he})},Le.onClick=function(he){var Se=Le.props,ge=Se.eventKey,Pe=Se.multiple,Fe=Se.onClick,Be=Se.onSelect,je=Se.onDeselect,Ge=Se.isSelected,st={key:ge,keyPath:[ge],item:Object(x.a)(Le),domEvent:he};Fe(st),Pe?Ge?je(st):Be(st):Ge||Be(st)},Le.saveNode=function(he){Le.node=he},Le}return Object(O.a)(He,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var he=this.props;he.onDestroy&&he.onDestroy(he.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 he,Se=Object(D.a)({},this.props),ge=w()(this.getPrefixCls(),Se.className,(he={},Object(L.a)(he,this.getActiveClassName(),!Se.disabled&&Se.active),Object(L.a)(he,this.getSelectedClassName(),Se.isSelected),Object(L.a)(he,this.getDisabledClassName(),Se.disabled),he)),Pe=Object(D.a)(Object(D.a)({},Se.attribute),{},{title:typeof Se.title=="string"?Se.title:void 0,className:ge,role:Se.role||"menuitem","aria-disabled":Se.disabled});Se.role==="option"?Pe=Object(D.a)(Object(D.a)({},Pe),{},{role:"option","aria-selected":Se.isSelected}):(Se.role===null||Se.role==="none")&&(Pe.role="none");var Fe={onClick:Se.disabled?null:this.onClick,onMouseLeave:Se.disabled?null:this.onMouseLeave,onMouseEnter:Se.disabled?null:this.onMouseEnter},Be=Object(D.a)({},Se.style);Se.mode==="inline"&&(Se.direction==="rtl"?Be.paddingRight=Se.inlineIndent*Se.level:Be.paddingLeft=Se.inlineIndent*Se.level),$.forEach(function(Ge){return delete Se[Ge]}),delete Se.direction;var je=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(je=u.createElement(this.props.itemIcon,this.props)),u.createElement("li",Object(i.a)({},Object(M.a)(Se,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Pe,Fe,{style:Be,ref:this.saveNode}),Se.children,je)}}]),He}(u.Component);ht.isMenuItem=!0,ht.defaultProps={onSelect:Z,onMouseEnter:Z,onMouseLeave:Z,manualRef:Z};var Ct=Object(T.b)(function(Ae,Ue){var He=Ae.activeKey,Le=Ae.selectedKeys,he=Ue.eventKey,Se=Ue.subMenuKey;return{active:He[Se]===he,isSelected:Array.isArray(Le)?Le.indexOf(he)!==-1:Le===he}})(ht),Ht=Ct,nr=function(Ae){Object(b.a)(He,Ae);var Ue=Object(y.a)(He);function He(){var Le;return Object(P.a)(this,He),Le=Ue.apply(this,arguments),Le.renderInnerMenuItem=function(he){var Se=Le.props,ge=Se.renderMenuItem,Pe=Se.index;return ge(he,Pe,Le.props.subMenuKey)},Le}return Object(O.a)(He,[{key:"render",value:function(){var he=Object(i.a)({},this.props),Se=he.className,ge=Se===void 0?"":Se,Pe=he.rootPrefixCls,Fe="".concat(Pe,"-item-group-title"),Be="".concat(Pe,"-item-group-list"),je=he.title,Ge=he.children;return $.forEach(function(st){return delete he[st]}),delete he.direction,u.createElement("li",Object(i.a)({},he,{onClick:function(wt){return wt.stopPropagation()},className:"".concat(ge," ").concat(Pe,"-item-group")}),u.createElement("div",{className:Fe,title:typeof je=="string"?je:void 0},je),u.createElement("ul",{className:Be},u.Children.map(Ge,this.renderInnerMenuItem)))}}]),He}(u.Component);nr.isMenuItemGroup=!0,nr.defaultProps={disabled:!0};var Kt=nr,vr=function(Ue){var He=Ue.className,Le=Ue.rootPrefixCls,he=Ue.style;return u.createElement("li",{className:"".concat(He," ").concat(Le,"-item-divider"),style:he})};vr.defaultProps={disabled:!0,className:"",style:{}};var Or=vr,lr=Et,Qe=I("eDIo");function Mt(Ae,Ue){var He=Ae.prefixCls,Le=Ae.editable,he=Ae.locale,Se=Ae.style;return!Le||Le.showAdd===!1?null:u.createElement("button",{ref:Ue,type:"button",className:"".concat(He,"-nav-add"),style:Se,"aria-label":(he==null?void 0:he.addAriaLabel)||"Add tab",onClick:function(Pe){Le.onEdit("add",{event:Pe})}},Le.addIcon||"+")}var Gr=u.forwardRef(Mt);function Ur(Ae,Ue){var He=Ae.prefixCls,Le=Ae.id,he=Ae.tabs,Se=Ae.locale,ge=Ae.mobile,Pe=Ae.moreIcon,Fe=Pe===void 0?"More":Pe,Be=Ae.moreTransitionName,je=Ae.style,Ge=Ae.className,st=Ae.editable,wt=Ae.tabBarGutter,Ot=Ae.rtl,Nt=Ae.onTabClick,br=Object(u.useState)(!1),Mr=Object(f.a)(br,2),Pr=Mr[0],jr=Mr[1],Ar=Object(u.useState)(null),Wr=Object(f.a)(Ar,2),Hr=Wr[0],qr=Wr[1],Vr="".concat(Le,"-more-popup"),mn="".concat(He,"-dropdown"),Yr=Hr!==null?"".concat(Vr,"-").concat(Hr):null,_r=Se==null?void 0:Se.dropdownAriaLabel,Sr=u.createElement(lr,{onClick:function(En){var dn=En.key,jn=En.domEvent;Nt(dn,jn),jr(!1)},id:Vr,tabIndex:-1,role:"listbox","aria-activedescendant":Yr,selectedKeys:[Hr],"aria-label":_r!==void 0?_r:"expanded dropdown"},he.map(function(sn){return u.createElement(Ht,{key:sn.key,id:"".concat(Vr,"-").concat(sn.key),role:"option","aria-controls":Le&&"".concat(Le,"-panel-").concat(sn.key),disabled:sn.disabled},sn.tab)}));function zr(sn){for(var En=he.filter(function(Zn){return!Zn.disabled}),dn=En.findIndex(function(Zn){return Zn.key===Hr})||0,jn=En.length,Hn=0;Hn<jn;Hn+=1){dn=(dn+sn+jn)%jn;var An=En[dn];if(!An.disabled){qr(An.key);return}}}function Zr(sn){var En=sn.which;if(!Pr){[g.a.DOWN,g.a.SPACE,g.a.ENTER].includes(En)&&(jr(!0),sn.preventDefault());return}switch(En){case g.a.UP:zr(-1),sn.preventDefault();break;case g.a.DOWN:zr(1),sn.preventDefault();break;case g.a.ESC:jr(!1);break;case g.a.SPACE:case g.a.ENTER:Hr!==null&&Nt(Hr,sn);break}}Object(u.useEffect)(function(){var sn=document.getElementById(Yr);sn&&sn.scrollIntoView&&sn.scrollIntoView(!1)},[Hr]),Object(u.useEffect)(function(){Pr||qr(null)},[Pr]);var dr=Object(L.a)({},Ot?"marginLeft":"marginRight",wt);he.length||(dr.visibility="hidden",dr.order=1);var nn=w()(Object(L.a)({},"".concat(mn,"-rtl"),Ot)),On=ge?null:u.createElement(Qe.a,{prefixCls:mn,overlay:Sr,trigger:["hover"],visible:Pr,transitionName:Be,onVisibleChange:jr,overlayClassName:nn,mouseEnterDelay:.1,mouseLeaveDelay:.1},u.createElement("button",{type:"button",className:"".concat(He,"-nav-more"),style:dr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Vr,id:"".concat(Le,"-more"),"aria-expanded":Pr,onKeyDown:Zr},Fe));return u.createElement("div",{className:w()("".concat(He,"-nav-operations"),Ge),style:je,ref:Ue},On,u.createElement(Gr,{prefixCls:He,locale:Se,editable:st}))}var ar=u.forwardRef(Ur),gr=Object(u.createContext)(null),xr=.1,At=.01,Bt=20,ir=Math.pow(.995,Bt);function zt(){var Ae=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(Ae)||/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(Ae.substr(0,4)))}function ct(Ae,Ue){var He=Object(u.useState)(),Le=Object(f.a)(He,2),he=Le[0],Se=Le[1],ge=Object(u.useState)(0),Pe=Object(f.a)(ge,2),Fe=Pe[0],Be=Pe[1],je=Object(u.useState)(0),Ge=Object(f.a)(je,2),st=Ge[0],wt=Ge[1],Ot=Object(u.useState)(),Nt=Object(f.a)(Ot,2),br=Nt[0],Mr=Nt[1],Pr=Object(u.useRef)();function jr(_r){var Sr=_r.touches[0],zr=Sr.screenX,Zr=Sr.screenY;Se({x:zr,y:Zr}),window.clearInterval(Pr.current)}function Ar(_r){if(!he)return;_r.preventDefault();var Sr=_r.touches[0],zr=Sr.screenX,Zr=Sr.screenY;Se({x:zr,y:Zr});var dr=zr-he.x,nn=Zr-he.y;Ue(dr,nn);var On=Date.now();Be(On),wt(On-Fe),Mr({x:dr,y:nn})}function Wr(){if(!he)return;if(Se(null),Mr(null),br){var _r=br.x/st,Sr=br.y/st,zr=Math.abs(_r),Zr=Math.abs(Sr);if(Math.max(zr,Zr)<xr)return;var dr=_r,nn=Sr;Pr.current=window.setInterval(function(){if(Math.abs(dr)<At&&Math.abs(nn)<At){window.clearInterval(Pr.current);return}dr*=ir,nn*=ir,Ue(dr*Bt,nn*Bt)},Bt)}}var Hr=Object(u.useRef)(0),qr=Object(u.useRef)(!1),Vr=Object(u.useRef)();function mn(_r){var Sr=_r.deltaX,zr=_r.deltaY,Zr=0,dr=Math.abs(Sr),nn=Math.abs(zr);dr===nn?Zr=Vr.current==="x"?Sr:zr:dr>nn?(Zr=Sr,Vr.current="x"):(Zr=zr,Vr.current="y");var On=Date.now();On-Hr.current>100&&(qr.current=!1),(Ue(-Zr,-Zr)||qr.current)&&(_r.preventDefault(),qr.current=!0),Hr.current=On}var Yr=Object(u.useRef)(null);Yr.current={onTouchStart:jr,onTouchMove:Ar,onTouchEnd:Wr,onWheel:mn},u.useEffect(function(){function _r(dr){Yr.current.onTouchStart(dr)}function Sr(dr){Yr.current.onTouchMove(dr)}function zr(dr){Yr.current.onTouchEnd(dr)}function Zr(dr){Yr.current.onWheel(dr)}return document.addEventListener("touchmove",Sr,{passive:!1}),document.addEventListener("touchend",zr,{passive:!1}),Ae.current.addEventListener("touchstart",_r,{passive:!1}),Ae.current.addEventListener("wheel",Zr),function(){document.removeEventListener("touchmove",Sr),document.removeEventListener("touchend",zr)}},[])}function dt(){var Ae=Object(u.useRef)(new Map);function Ue(Le){return Ae.current.has(Le)||Ae.current.set(Le,u.createRef()),Ae.current.get(Le)}function He(Le){Ae.current.delete(Le)}return[Ue,He]}function kt(Ae,Ue){var He=u.useRef(Ae),Le=u.useState({}),he=Object(f.a)(Le,2),Se=he[1];function ge(Pe){var Fe=typeof Pe=="function"?Pe(He.current):Pe;Fe!==He.current&&Ue(Fe,He.current),He.current=Fe,Se({})}return[He.current,ge]}var Tt=function(Ue){var He=Ue.position,Le=Ue.prefixCls,he=Ue.extra;if(!he)return null;var Se,ge=he;return He==="right"&&(Se=ge.right||!ge.left&&ge||null),He==="left"&&(Se=ge.left||null),Se?u.createElement("div",{className:"".concat(Le,"-extra-content")},Se):null};function yr(Ae,Ue){var He,Le=u.useContext(gr),he=Le.prefixCls,Se=Le.tabs,ge=Ae.className,Pe=Ae.style,Fe=Ae.id,Be=Ae.animated,je=Ae.activeKey,Ge=Ae.rtl,st=Ae.extra,wt=Ae.editable,Ot=Ae.locale,Nt=Ae.tabPosition,br=Ae.tabBarGutter,Mr=Ae.children,Pr=Ae.onTabClick,jr=Ae.onTabScroll,Ar=Object(u.useRef)(),Wr=Object(u.useRef)(),Hr=Object(u.useRef)(),qr=Object(u.useRef)(),Vr=dt(),mn=Object(f.a)(Vr,2),Yr=mn[0],_r=mn[1],Sr=Nt==="top"||Nt==="bottom",zr=kt(0,function(gn,on){Sr&&jr&&jr({direction:gn>on?"left":"right"})}),Zr=Object(f.a)(zr,2),dr=Zr[0],nn=Zr[1],On=kt(0,function(gn,on){!Sr&&jr&&jr({direction:gn>on?"top":"bottom"})}),sn=Object(f.a)(On,2),En=sn[0],dn=sn[1],jn=Object(u.useState)(0),Hn=Object(f.a)(jn,2),An=Hn[0],Zn=Hn[1],Na=Object(u.useState)(0),ua=Object(f.a)(Na,2),Kn=ua[0],xn=ua[1],_n=Object(u.useState)(0),Rn=Object(f.a)(_n,2),Cn=Rn[0],Un=Rn[1],ga=Object(u.useState)(0),Va=Object(f.a)(ga,2),hn=Va[0],Ca=Va[1],Oa=Object(u.useState)(null),vn=Object(f.a)(Oa,2),fn=vn[0],Bn=vn[1],Bi=Object(u.useState)(null),_i=Object(f.a)(Bi,2),ti=_i[0],ri=_i[1],Li=Object(u.useState)(0),wi=Object(f.a)(Li,2),Mi=wi[0],Wi=wi[1],Vi=Object(u.useState)(0),Ii=Object(f.a)(Vi,2),ni=Ii[0],Ti=Ii[1],vi=v(new Map),ai=Object(f.a)(vi,2),co=ai[0],gi=ai[1],Si=t(Se,co,An),ii="".concat(he,"-nav-operations-hidden"),li=0,ja=0;Sr?Ge?(li=0,ja=Math.max(0,An-fn)):(li=Math.min(0,fn-An),ja=0):(li=Math.min(0,ti-Kn),ja=0);function $a(gn){return gn<li?[li,!1]:gn>ja?[ja,!1]:[gn,!0]}var ur=Object(u.useRef)(),fr=Object(u.useState)(),Jt=Object(f.a)(fr,2),an=Jt[0],Zt=Jt[1];function ui(){Zt(Date.now())}function $i(){window.clearTimeout(ur.current)}ct(Ar,function(gn,on){var ia=!1;function Ra(ki,ci){ki(function(zi){var yi=$a(zi+ci),oa=Object(f.a)(yi,2),Qi=oa[0],ho=oa[1];return ia=ho,Qi})}if(Sr){if(fn>=An)return ia;Ra(nn,gn)}else{if(ti>=Kn)return ia;Ra(dn,on)}return $i(),ui(),ia}),Object(u.useEffect)(function(){return $i(),an&&(ur.current=window.setTimeout(function(){Zt(0)},100)),$i},[an]);function Tn(){var gn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:je,on=Si.get(gn);if(!on)return;if(Sr){var ia=dr;Ge?on.right<dr?ia=on.right:on.right+on.width>dr+fn&&(ia=on.right+on.width-fn):on.left<-dr?ia=-on.left:on.left+on.width>-dr+fn&&(ia=-(on.left+on.width-fn)),dn(0),nn($a(ia)[0])}else{var Ra=En;on.top<-En?Ra=-on.top:on.top+on.height>-En+ti&&(Ra=-(on.top+on.height-ti)),nn(0),dn($a(Ra)[0])}}var Ci=_(Si,{width:fn,height:ti,left:dr,top:En},{width:Cn,height:hn},{width:Mi,height:ni},Object(D.a)(Object(D.a)({},Ae),{},{tabs:Se})),Do=Object(f.a)(Ci,2),Jo=Do[0],Qo=Do[1],Zo=Se.map(function(gn){var on=gn.key;return u.createElement(n,{id:Fe,prefixCls:he,key:on,rtl:Ge,tab:gn,closable:gn.closable,editable:wt,active:on===je,tabPosition:Nt,tabBarGutter:br,renderWrapper:Mr,removeAriaLabel:Ot==null?void 0:Ot.removeAriaLabel,ref:Yr(on),onClick:function(Ra){Pr(on,Ra)},onRemove:function(){_r(on)},onFocus:function(){Tn(on),ui(),Ge||(Ar.current.scrollLeft=0),Ar.current.scrollTop=0}})}),fo=c(function(){var gn,on,ia,Ra,ki,ci,zi,yi,oa,Qi=((gn=Ar.current)===null||gn===void 0?void 0:gn.offsetWidth)||0,ho=((on=Ar.current)===null||on===void 0?void 0:on.offsetHeight)||0,po=((ia=qr.current)===null||ia===void 0?void 0:ia.offsetWidth)||0,Da=((Ra=qr.current)===null||Ra===void 0?void 0:Ra.offsetHeight)||0,pn=((ki=Hr.current)===null||ki===void 0?void 0:ki.offsetWidth)||0,Ja=((ci=Hr.current)===null||ci===void 0?void 0:ci.offsetHeight)||0;Bn(Qi),ri(ho),Wi(po),Ti(Da);var di=(((zi=Wr.current)===null||zi===void 0?void 0:zi.offsetWidth)||0)-po,fi=(((yi=Wr.current)===null||yi===void 0?void 0:yi.offsetHeight)||0)-Da;Zn(di),xn(fi);var mo=(oa=Hr.current)===null||oa===void 0?void 0:oa.className.includes(ii);Un(di-(mo?0:pn)),Ca(fi-(mo?0:Ja)),gi(function(){var Zi=new Map;return Se.forEach(function(ko){var No=ko.key,Ai=Yr(No).current;Ai&&Zi.set(No,{width:Ai.offsetWidth,height:Ai.offsetHeight,left:Ai.offsetLeft,top:Ai.offsetTop})}),Zi})}),qo=Se.slice(0,Jo),Aa=Se.slice(Qo+1),$n=[].concat(Object(l.a)(qo),Object(l.a)(Aa)),ya=Object(u.useState)(),Yn=Object(f.a)(ya,2),Hi=Yn[0],es=Yn[1],Ya=Si.get(je),Po=Object(u.useRef)();function Lo(){d.a.cancel(Po.current)}Object(u.useEffect)(function(){var gn={};return Ya&&(Sr?(Ge?gn.right=Ya.right:gn.left=Ya.left,gn.width=Ya.width):(gn.top=Ya.top,gn.height=Ya.height)),Lo(),Po.current=d()(function(){es(gn)}),Lo},[Ya,Sr,Ge]),Object(u.useEffect)(function(){Tn()},[je,Ya,Si,Sr]),Object(u.useEffect)(function(){fo()},[Ge,br,je,Se.map(function(gn){return gn.key}).join("_")]);var Mo=!!$n.length,Oi="".concat(he,"-nav-wrap"),Yi,Ki,Io,Ji;return Sr?Ge?(Ki=dr>0,Yi=dr+fn<An):(Yi=dr<0,Ki=-dr+fn<An):(Io=En<0,Ji=-En+ti<Kn),u.createElement("div",{ref:Ue,role:"tablist",className:w()("".concat(he,"-nav"),ge),style:Pe,onKeyDown:function(){ui()}},u.createElement(Tt,{position:"left",extra:st,prefixCls:he}),u.createElement(h.a,{onResize:fo},u.createElement("div",{className:w()(Oi,(He={},Object(L.a)(He,"".concat(Oi,"-ping-left"),Yi),Object(L.a)(He,"".concat(Oi,"-ping-right"),Ki),Object(L.a)(He,"".concat(Oi,"-ping-top"),Io),Object(L.a)(He,"".concat(Oi,"-ping-bottom"),Ji),He)),ref:Ar},u.createElement(h.a,{onResize:fo},u.createElement("div",{ref:Wr,className:"".concat(he,"-nav-list"),style:{transform:"translate(".concat(dr,"px, ").concat(En,"px)"),transition:an?"none":void 0}},Zo,u.createElement(Gr,{ref:qr,prefixCls:he,locale:Ot,editable:wt,style:{visibility:Mo?"hidden":null}}),u.createElement("div",{className:w()("".concat(he,"-ink-bar"),Object(L.a)({},"".concat(he,"-ink-bar-animated"),Be.inkBar)),style:Hi}))))),u.createElement(ar,Object.assign({},Ae,{ref:Hr,prefixCls:he,tabs:$n,className:!Mo&&ii})),u.createElement(Tt,{position:"right",extra:st,prefixCls:he}))}var Kr=u.forwardRef(yr);function Xr(Ae){var Ue=Ae.id,He=Ae.activeKey,Le=Ae.animated,he=Ae.tabPosition,Se=Ae.rtl,ge=Ae.destroyInactiveTabPane,Pe=u.useContext(gr),Fe=Pe.prefixCls,Be=Pe.tabs,je=Le.tabPane,Ge=Be.findIndex(function(st){return st.key===He});return u.createElement("div",{className:w()("".concat(Fe,"-content-holder"))},u.createElement("div",{className:w()("".concat(Fe,"-content"),"".concat(Fe,"-content-").concat(he),Object(L.a)({},"".concat(Fe,"-content-animated"),je)),style:Ge&&je?Object(L.a)({},Se?"marginRight":"marginLeft","-".concat(Ge,"00%")):null},Be.map(function(st){return u.cloneElement(st.node,{key:st.key,prefixCls:Fe,tabKey:st.key,id:Ue,animated:je,active:st.key===He,destroyInactiveTabPane:ge})})))}function pr(Ae){var Ue=Ae.prefixCls,He=Ae.forceRender,Le=Ae.className,he=Ae.style,Se=Ae.id,ge=Ae.active,Pe=Ae.animated,Fe=Ae.destroyInactiveTabPane,Be=Ae.tabKey,je=Ae.children,Ge=u.useState(He),st=Object(f.a)(Ge,2),wt=st[0],Ot=st[1];u.useEffect(function(){ge?Ot(!0):Fe&&Ot(!1)},[ge,Fe]);var Nt={};return ge||(Pe?(Nt.visibility="hidden",Nt.height=0,Nt.overflowY="hidden"):Nt.display="none"),u.createElement("div",{id:Se&&"".concat(Se,"-panel-").concat(Be),role:"tabpanel",tabIndex:ge?0:-1,"aria-labelledby":Se&&"".concat(Se,"-tab-").concat(Be),"aria-hidden":!ge,style:Object(D.a)(Object(D.a)({},Nt),he),className:w()("".concat(Ue,"-tabpane"),ge&&"".concat(Ue,"-tabpane-active"),Le)},(ge||wt||He)&&je)}var Br=0;function Tr(Ae){return Object(p.a)(Ae).map(function(Ue){if(u.isValidElement(Ue)){var He=Ue.key!==void 0?String(Ue.key):void 0;return Object(D.a)(Object(D.a)({key:He},Ue.props),{},{node:Ue})}return null}).filter(function(Ue){return Ue})}function Jr(Ae,Ue){var He,Le=Ae.id,he=Ae.prefixCls,Se=he===void 0?"rc-tabs":he,ge=Ae.className,Pe=Ae.children,Fe=Ae.direction,Be=Ae.activeKey,je=Ae.defaultActiveKey,Ge=Ae.editable,st=Ae.animated,wt=Ae.tabPosition,Ot=wt===void 0?"top":wt,Nt=Ae.tabBarGutter,br=Ae.tabBarStyle,Mr=Ae.tabBarExtraContent,Pr=Ae.locale,jr=Ae.moreIcon,Ar=Ae.moreTransitionName,Wr=Ae.destroyInactiveTabPane,Hr=Ae.renderTabBar,qr=Ae.onChange,Vr=Ae.onTabClick,mn=Ae.onTabScroll,Yr=Object(C.a)(Ae,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),_r=Tr(Pe),Sr=Fe==="rtl",zr;st===!1?zr={inkBar:!1,tabPane:!1}:zr=Object(D.a)({inkBar:!0,tabPane:!1},st!==!0?st:null);var Zr=Object(u.useState)(!1),dr=Object(f.a)(Zr,2),nn=dr[0],On=dr[1];Object(u.useEffect)(function(){On(zt())},[]);var sn=Object(s.a)(function(){var hn;return(hn=_r[0])===null||hn===void 0?void 0:hn.key},{value:Be,defaultValue:je}),En=Object(f.a)(sn,2),dn=En[0],jn=En[1],Hn=Object(u.useState)(function(){return _r.findIndex(function(hn){return hn.key===dn})}),An=Object(f.a)(Hn,2),Zn=An[0],Na=An[1];Object(u.useEffect)(function(){var hn=_r.findIndex(function(Oa){return Oa.key===dn});if(hn===-1){var Ca;hn=Math.max(0,Math.min(Zn,_r.length-1)),jn((Ca=_r[hn])===null||Ca===void 0?void 0:Ca.key)}Na(hn)},[_r.map(function(hn){return hn.key}).join("_"),dn,Zn]);var ua=Object(s.a)(null,{value:Le}),Kn=Object(f.a)(ua,2),xn=Kn[0],_n=Kn[1],Rn=Ot;nn&&!["left","right"].includes(Ot)&&(Rn="top"),Object(u.useEffect)(function(){Le||(_n("rc-tabs-".concat(Br)),Br+=1)},[]);function Cn(hn,Ca){Vr==null||Vr(hn,Ca),jn(hn),qr==null||qr(hn)}var Un={id:xn,activeKey:dn,animated:zr,tabPosition:Rn,rtl:Sr,mobile:nn},ga,Va=Object(D.a)(Object(D.a)({},Un),{},{editable:Ge,locale:Pr,moreIcon:jr,moreTransitionName:Ar,tabBarGutter:Nt,onTabClick:Cn,onTabScroll:mn,extra:Mr,style:br,panes:Pe});return Hr?ga=Hr(Va,Kr):ga=u.createElement(Kr,Object.assign({},Va)),u.createElement(gr.Provider,{value:{tabs:_r,prefixCls:Se}},u.createElement("div",Object.assign({ref:Ue,id:Le,className:w()(Se,"".concat(Se,"-").concat(Rn),(He={},Object(L.a)(He,"".concat(Se,"-mobile"),nn),Object(L.a)(He,"".concat(Se,"-editable"),Ge),Object(L.a)(He,"".concat(Se,"-rtl"),Sr),He),ge)},Yr),ga,u.createElement(Xr,Object.assign({destroyInactiveTabPane:Wr},Un,{animated:zr}))))}var Dr=u.forwardRef(Jr);Dr.TabPane=pr;var Qr=Dr,kn=J.b=Qr},kSUc:function(j,J,I){},lPiR:function(j,J,I){(function(L,f){j.exports=J=f(I("Ib8C"))})(this,function(L){return function(f){var C=L,D=C.lib,u=D.WordArray,m=D.Hasher,w=C.algo,p=[],s=[];(function(){function d(g){for(var E=f.sqrt(g),n=2;n<=E;n++)if(!(g%n))return!1;return!0}function h(g){return(g-(g|0))*4294967296|0}for(var c=2,v=0;v<64;)d(c)&&(v<8&&(p[v]=h(f.pow(c,1/2))),s[v]=h(f.pow(c,1/3)),v++),c++})();var l=[],a=w.SHA256=m.extend({_doReset:function(){this._hash=new u.init(p.slice(0))},_doProcessBlock:function(d,h){for(var c=this._hash.words,v=c[0],g=c[1],E=c[2],n=c[3],o=c[4],t=c[5],S=c[6],_=c[7],i=0;i<64;i++){if(i<16)l[i]=d[h+i]|0;else{var P=l[i-15],O=(P<<25|P>>>7)^(P<<14|P>>>18)^P>>>3,x=l[i-2],b=(x<<15|x>>>17)^(x<<13|x>>>19)^x>>>10;l[i]=O+l[i-7]+b+l[i-16]}var y=o&t^~o&S,T=v&g^v&E^g&E,M=(v<<30|v>>>2)^(v<<19|v>>>13)^(v<<10|v>>>22),k=(o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25),N=_+k+y+s[i]+l[i],K=M+T;_=S,S=t,t=o,o=n+N|0,n=E,E=g,g=v,v=N+K|0}c[0]=c[0]+v|0,c[1]=c[1]+g|0,c[2]=c[2]+E|0,c[3]=c[3]+n|0,c[4]=c[4]+o|0,c[5]=c[5]+t|0,c[6]=c[6]+S|0,c[7]=c[7]+_|0},_doFinalize:function(){var d=this._data,h=d.words,c=this._nDataBytes*8,v=d.sigBytes*8;return h[v>>>5]|=128<<24-v%32,h[(v+64>>>9<<4)+14]=f.floor(c/4294967296),h[(v+64>>>9<<4)+15]=c,d.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var d=m.clone.call(this);return d._hash=this._hash.clone(),d}});C.SHA256=m._createHelper(a),C.HmacSHA256=m._createHmacHelper(a)}(Math),L.SHA256})},lZu9:function(j,J,I){(function(L){L(I("VrN/"),I("1eCo"),I("8EBN"))})(function(L){"use strict";L.defineMode("markdown",function(f,C){var D=L.getMode(f,"text/html"),u=D.name=="null";function m(U){if(L.findModeByName){var W=L.findModeByName(U);W&&(U=W.mime||W.mimes[0])}var G=L.getMode(f,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 p in w)w.hasOwnProperty(p)&&C.tokenTypeOverrides[p]&&(w[p]=C.tokenTypeOverrides[p]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,a=/^\[(x| )\](?=\s)/i,d=C.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,c=/^[^#!\[\]*_\\<>` "'(~:]+/,v=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,g=/^\s*\[[^\]]+?\]:.*$/,E=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 o(U,W,G){return W.f=W.inline=G,G(U,W)}function t(U,W,G){return W.f=W.block=G,G(U,W)}function S(U){return!U||!/\S/.test(U.string)}function _(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 W=u;if(!W){var G=L.innerMode(D,U.htmlState);W=G.mode.name=="xml"&&G.state.tagStart===null&&!G.state.context&&G.state.tokenize.isInText}W&&(U.f=y,U.block=i,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function i(U,W){var G=U.column()===W.indentation,ee=S(W.prevLine.stream),ie=W.indentedCode,ce=W.prevLine.hr,_e=W.list!==!1,Ce=(W.listStack[W.listStack.length-1]||0)+3;W.indentedCode=!1;var le=W.indentation;if(W.indentationDiff===null&&(W.indentationDiff=W.indentation,_e)){for(W.list=null;le<W.listStack[W.listStack.length-1];)W.listStack.pop(),W.listStack.length?W.indentation=W.listStack[W.listStack.length-1]:W.list=!1;W.list!==!1&&(W.indentationDiff=le-W.listStack[W.listStack.length-1])}var ye=!ee&&!ce&&!W.prevLine.header&&(!_e||!ie)&&!W.prevLine.fencedCodeEnd,fe=(W.list===!1||ce||ee)&&W.indentation<=Ce&&U.match(s),ne=null;if(W.indentationDiff>=4&&(ie||W.prevLine.fencedCodeEnd||W.prevLine.header||ee))return U.skipToEnd(),W.indentedCode=!0,w.code;if(U.eatSpace())return null;if(G&&W.indentation<=Ce&&(ne=U.match(d))&&ne[1].length<=6)return W.quote=0,W.header=ne[1].length,W.thisLine.header=!0,C.highlightFormatting&&(W.formatting="header"),W.f=W.inline,x(W);if(W.indentation<=Ce&&U.eat(">"))return W.quote=G?1:W.quote+1,C.highlightFormatting&&(W.formatting="quote"),U.eatSpace(),x(W);if(!fe&&!W.setext&&G&&W.indentation<=Ce&&(ne=U.match(l))){var ae=ne[1]?"ol":"ul";return W.indentation=le+U.current().length,W.list=!0,W.quote=0,W.listStack.push(W.indentation),W.em=!1,W.strong=!1,W.code=!1,W.strikethrough=!1,C.taskLists&&U.match(a,!1)&&(W.taskList=!0),W.f=W.inline,C.highlightFormatting&&(W.formatting=["list","list-"+ae]),x(W)}else{if(G&&W.indentation<=Ce&&(ne=U.match(v,!0)))return W.quote=0,W.fencedEndRE=new RegExp(ne[1]+"+ *$"),W.localMode=C.fencedCodeBlockHighlighting&&m(ne[2]||C.fencedCodeBlockDefaultMode),W.localMode&&(W.localState=L.startState(W.localMode)),W.f=W.block=O,C.highlightFormatting&&(W.formatting="code-block"),W.code=-1,x(W);if(W.setext||(!ye||!_e)&&!W.quote&&W.list===!1&&!W.code&&!fe&&!g.test(U.string)&&(ne=U.lookAhead(1))&&(ne=ne.match(h)))return W.setext?(W.header=W.setext,W.setext=0,U.skipToEnd(),C.highlightFormatting&&(W.formatting="header")):(W.header=ne[0].charAt(0)=="="?1:2,W.setext=W.header),W.thisLine.header=!0,W.f=W.inline,x(W);if(fe)return U.skipToEnd(),W.hr=!0,W.thisLine.hr=!0,w.hr;if(U.peek()==="[")return o(U,W,K)}return o(U,W,W.inline)}function P(U,W){var G=D.token(U,W.htmlState);if(!u){var ee=L.innerMode(D,W.htmlState);(ee.mode.name=="xml"&&ee.state.tagStart===null&&!ee.state.context&&ee.state.tokenize.isInText||W.md_inside&&U.current().indexOf(">")>-1)&&(W.f=y,W.block=i,W.htmlState=null)}return G}function O(U,W){var G=W.listStack[W.listStack.length-1]||0,ee=W.indentation<G,ie=G+3;if(W.fencedEndRE&&W.indentation<=ie&&(ee||U.match(W.fencedEndRE))){C.highlightFormatting&&(W.formatting="code-block");var ce;return ee||(ce=x(W)),W.localMode=W.localState=null,W.block=i,W.f=y,W.fencedEndRE=null,W.code=0,W.thisLine.fencedCodeEnd=!0,ee?t(U,W,W.block):ce}else return W.localMode?W.localMode.token(U,W.localState):(U.skipToEnd(),w.code)}function x(U){var W=[];if(U.formatting){W.push(w.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var G=0;G<U.formatting.length;G++)W.push(w.formatting+"-"+U.formatting[G]),U.formatting[G]==="header"&&W.push(w.formatting+"-"+U.formatting[G]+"-"+U.header),U.formatting[G]==="quote"&&(!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=U.quote?W.push(w.formatting+"-"+U.formatting[G]+"-"+U.quote):W.push("error"))}if(U.taskOpen)return W.push("meta"),W.length?W.join(" "):null;if(U.taskClosed)return W.push("property"),W.length?W.join(" "):null;if(U.linkHref?W.push(w.linkHref,"url"):(U.strong&&W.push(w.strong),U.em&&W.push(w.em),U.strikethrough&&W.push(w.strikethrough),U.emoji&&W.push(w.emoji),U.linkText&&W.push(w.linkText),U.code&&W.push(w.code),U.image&&W.push(w.image),U.imageAltText&&W.push(w.imageAltText,"link"),U.imageMarker&&W.push(w.imageMarker)),U.header&&W.push(w.header,w.header+"-"+U.header),U.quote&&(W.push(w.quote),!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=U.quote?W.push(w.quote+"-"+U.quote):W.push(w.quote+"-"+C.maxBlockquoteDepth)),U.list!==!1){var ee=(U.listStack.length-1)%3;ee?ee===1?W.push(w.list2):W.push(w.list3):W.push(w.list1)}return U.trailingSpaceNewLine?W.push("trailing-space-new-line"):U.trailingSpace&&W.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),W.length?W.join(" "):null}function b(U,W){return U.match(c,!0)?x(W):void 0}function y(U,W){var G=W.text(U,W);if(typeof G!="undefined")return G;if(W.list)return W.list=null,x(W);if(W.taskList){var ee=U.match(a,!0)[1]===" ";return ee?W.taskOpen=!0:W.taskClosed=!0,C.highlightFormatting&&(W.formatting="task"),W.taskList=!1,x(W)}if(W.taskOpen=!1,W.taskClosed=!1,W.header&&U.match(/^#+$/,!0))return C.highlightFormatting&&(W.formatting="header"),x(W);var ie=U.next();if(W.linkTitle){W.linkTitle=!1;var ce=ie;ie==="("&&(ce=")"),ce=(ce+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var _e="^\\s*(?:[^"+ce+"\\\\]+|\\\\\\\\|\\\\.)"+ce;if(U.match(new RegExp(_e),!0))return w.linkHref}if(ie==="`"){var Ce=W.formatting;C.highlightFormatting&&(W.formatting="code"),U.eatWhile("`");var le=U.current().length;if(W.code==0&&(!W.quote||le==1))return W.code=le,x(W);if(le==W.code){var ye=x(W);return W.code=0,ye}else return W.formatting=Ce,x(W)}else if(W.code)return x(W);if(ie==="\\"&&(U.next(),C.highlightFormatting)){var fe=x(W),ne=w.formatting+"-escape";return fe?fe+" "+ne:ne}if(ie==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return W.imageMarker=!0,W.image=!0,C.highlightFormatting&&(W.formatting="image"),x(W);if(ie==="["&&W.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return W.imageMarker=!1,W.imageAltText=!0,C.highlightFormatting&&(W.formatting="image"),x(W);if(ie==="]"&&W.imageAltText){C.highlightFormatting&&(W.formatting="image");var fe=x(W);return W.imageAltText=!1,W.image=!1,W.inline=W.f=M,fe}if(ie==="["&&!W.image)return W.linkText&&U.match(/^.*?\]/)||(W.linkText=!0,C.highlightFormatting&&(W.formatting="link")),x(W);if(ie==="]"&&W.linkText){C.highlightFormatting&&(W.formatting="link");var fe=x(W);return W.linkText=!1,W.inline=W.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?M:y,fe}if(ie==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=T,C.highlightFormatting&&(W.formatting="link");var fe=x(W);return fe?fe+=" ":fe="",fe+w.linkInline}if(ie==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=T,C.highlightFormatting&&(W.formatting="link");var fe=x(W);return fe?fe+=" ":fe="",fe+w.linkEmail}if(C.xml&&ie==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ae=U.string.indexOf(">",U.pos);if(ae!=-1){var q=U.string.substring(U.start,ae);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(q)&&(W.md_inside=!0)}return U.backUp(1),W.htmlState=L.startState(D),t(U,W,P)}if(C.xml&&ie==="<"&&U.match(/^\/\w*?>/))return W.md_inside=!1,"tag";if(ie==="*"||ie==="_"){for(var se=1,Q=U.pos==1?" ":U.string.charAt(U.pos-2);se<3&&U.eat(ie);)se++;var Z=U.peek()||" ",be=!/\s/.test(Z)&&(!E.test(Z)||/\s/.test(Q)||E.test(Q)),re=!/\s/.test(Q)&&(!E.test(Q)||/\s/.test(Z)||E.test(Z)),Y=null,X=null;if(se%2&&(!W.em&&be&&(ie==="*"||!re||E.test(Q))?Y=!0:W.em==ie&&re&&(ie==="*"||!be||E.test(Z))&&(Y=!1)),se>1&&(!W.strong&&be&&(ie==="*"||!re||E.test(Q))?X=!0:W.strong==ie&&re&&(ie==="*"||!be||E.test(Z))&&(X=!1)),X!=null||Y!=null){C.highlightFormatting&&(W.formatting=Y==null?"strong":X==null?"em":"strong em"),Y===!0&&(W.em=ie),X===!0&&(W.strong=ie);var ye=x(W);return Y===!1&&(W.em=!1),X===!1&&(W.strong=!1),ye}}else if(ie===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return x(W);U.backUp(1)}if(C.strikethrough){if(ie==="~"&&U.eatWhile(ie)){if(W.strikethrough){C.highlightFormatting&&(W.formatting="strikethrough");var ye=x(W);return W.strikethrough=!1,ye}else if(U.match(/^[^\s]/,!1))return W.strikethrough=!0,C.highlightFormatting&&(W.formatting="strikethrough"),x(W)}else if(ie===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return x(W);U.backUp(2)}}if(C.emoji&&ie===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){W.emoji=!0,C.highlightFormatting&&(W.formatting="emoji");var $=x(W);return W.emoji=!1,$}return ie===" "&&(U.match(/^ +$/,!1)?W.trailingSpace++:W.trailingSpace&&(W.trailingSpaceNewLine=!0)),x(W)}function T(U,W){var G=U.next();if(G===">"){W.f=W.inline=y,C.highlightFormatting&&(W.formatting="link");var ee=x(W);return ee?ee+=" ":ee="",ee+w.linkInline}return U.match(/^[^>]+/,!0),w.linkInline}function M(U,W){if(U.eatSpace())return null;var G=U.next();return G==="("||G==="["?(W.f=W.inline=N(G==="("?")":"]"),C.highlightFormatting&&(W.formatting="link-string"),W.linkHref=!0,x(W)):"error"}var k={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function N(U){return function(W,G){var ee=W.next();if(ee===U){G.f=G.inline=y,C.highlightFormatting&&(G.formatting="link-string");var ie=x(G);return G.linkHref=!1,ie}return W.match(k[U]),G.linkHref=!0,x(G)}}function K(U,W){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(W.f=z,U.next(),C.highlightFormatting&&(W.formatting="link"),W.linkText=!0,x(W)):o(U,W,y)}function z(U,W){if(U.match(/^\]:/,!0)){W.f=W.inline=B,C.highlightFormatting&&(W.formatting="link");var G=x(W);return W.linkText=!1,G}return U.match(/^([^\]\\]|\\.)+/,!0),w.linkText}function B(U,W){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?W.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),W.f=W.inline=y,w.linkHref+" url")}var H={startState:function(){return{f:i,prevLine:{stream:null},thisLine:{stream:null},block:i,htmlState:null,indentation:0,inline:y,text:b,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,W){if(W.formatting=!1,U!=W.thisLine.stream){if(W.header=0,W.hr=!1,U.match(/^\s*$/,!0))return _(W),null;if(W.prevLine=W.thisLine,W.thisLine={stream:U},W.taskList=!1,W.trailingSpace=0,W.trailingSpaceNewLine=!1,!W.localState&&(W.f=W.block,W.f!=P)){var G=U.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(W.indentation=G,W.indentationDiff=null,G>0)return null}}return W.f(U,W)},innerMode:function(U){return U.block==P?{state:U.htmlState,mode:D}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:H}},indent:function(U,W,G){return U.block==P&&D.indent?D.indent(U.htmlState,W,G):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,W,G):L.Pass},blankLine:_,getType:x,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return H},"xml"),L.defineMIME("text/markdown","markdown"),L.defineMIME("text/x-markdown","markdown")})},mOS8:function(j,J,I){j.exports=I.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 J})(function(){var define,module,exports;return function(){function j(J,I,L){function f(u,m){if(!I[u]){if(!J[u]){var w=typeof require=="function"&&require;if(!m&&w)return require(u,!0);if(C)return C(u,!0);var p=new Error("Cannot find module '"+u+"'");throw p.code="MODULE_NOT_FOUND",p}var s=I[u]={exports:{}};J[u][0].call(s.exports,function(l){var a=J[u][1][l];return f(a||l)},s,s.exports,j,J,I,L)}return I[u].exports}for(var C=typeof require=="function"&&require,D=0;D<L.length;D++)f(L[D]);return f}return j}()({1:[function(j,J,I){"use strict";var L=j("./browser/client");L.Buffer=j("buffer").Buffer,L.urllib=j("../shims/xhr"),L.version=j("./browser/version").version,J.exports=L},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(j,J,I){(function(L,f){"use strict";var C=j("babel-runtime/core-js/promise"),D=s(C),u=j("babel-runtime/regenerator"),m=s(u),w=j("babel-runtime/core-js/object/assign"),p=s(w);function s(K){return K&&K.__esModule?K:{default:K}}var l=j("debug")("ali-oss"),a=j("copy-to"),d=j("xml2js"),h=j("agentkeepalive"),c=j("merge-descriptors"),v=j("url"),g=j("is-type-of"),E=j("platform"),n=j("utility"),o=j("urllib"),t=j("./version"),S=j("bowser"),_=j("../common/signUtils"),i=j("../common/utils/isIP"),P=i.isIP,O=j("../common/client/initOptions"),x=j("../common/utils/createRequest"),b=x.createRequest,y=new h;function T(){var K=E.name,z=E.version;K&&K.toLowerCase&&K.toLowerCase()==="ie"&&z.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function M(){return location&&location.protocol==="https:"}function k(K,z){if(T(),!(this instanceof k))return new k(K,z);K&&K.inited?this.options=K:this.options=k.initOptions(K),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=o,this.agent=this.options.agent||y),this.ctx=z,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}J.exports=k,k.initOptions=function(z){z.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var B=(0,p.default)({secure:M(),useFetch:!1},z);return O(B)};var N=k.prototype;N.debug=l,c(N,j("./object")),c(N,j("../common/bucket/getBucketWebsite")),c(N,j("../common/bucket/putBucketWebsite")),c(N,j("../common/bucket/deleteBucketWebsite")),c(N,j("../common/bucket/getBucketLifecycle")),c(N,j("../common/bucket/putBucketLifecycle")),c(N,j("../common/bucket/deleteBucketLifecycle")),c(N,j("../common/bucket/putBucketVersioning")),c(N,j("../common/bucket/getBucketVersioning")),c(N,j("./managed-upload")),c(N,j("../common/multipart")),c(N,j("../common/parallel")),N.signature=function(z){return this.debug("authorization stringToSign: %s",z,"info"),_.computeSignature(this.options.accessKeySecret,z)},N.authorization=function(z,B,H,U){var W=_.buildCanonicalString(z.toUpperCase(),B,{headers:U,parameters:H});return _.authorization(this.options.accessKeyId,this.options.accessKeySecret,W)},N.request=function(z){var B,H,U,W,G,ee;return m.default.async(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return B=b.call(this,z),this.options.useFetch||(B.params.mode="disable-fetch"),H=void 0,U=void 0,W=!!z.stream,ce.prev=5,ce.next=8,m.default.awrap(this.urllib.request(B.url,B.params));case 8:H=ce.sent,this.debug("response %s %s, got %s, headers: %j",z.method,B.url,H.status,H.headers,"info"),ce.next=15;break;case 12:ce.prev=12,ce.t0=ce.catch(5),U=ce.t0;case 15:if(G=void 0,!(H&&z.successStatuses&&z.successStatuses.indexOf(H.status)===-1)){ce.next=28;break}return ce.next=19,m.default.awrap(this.requestError(H));case 19:if(G=ce.sent,!(G.code==="RequestTimeTooSkewed"&&!W)){ce.next=25;break}return this.options.amendTimeSkewed=+new Date(G.serverTime)-new Date,ce.next=24,m.default.awrap(this.request(z));case 24:return ce.abrupt("return",ce.sent);case 25:G.params=z,ce.next=32;break;case 28:if(!U){ce.next=32;break}return ce.next=31,m.default.awrap(this.requestError(U));case 31:G=ce.sent;case 32:if(!G){ce.next=34;break}throw G;case 34:if(!z.xmlResponse){ce.next=39;break}return ce.next=37,m.default.awrap(this.parseXML(H.data));case 37:ee=ce.sent,H.data=ee;case 39:return ce.abrupt("return",H);case 40:case"end":return ce.stop()}},null,this,[[5,12]])},N._getResource=function(z){var B="/";return z.bucket&&(B+=z.bucket+"/"),z.object&&(B+=z.object),B},N._isIP=P,N._escape=function(z){return n.encodeURIComponent(z).replace(/%2F/g,"/")},N._getReqUrl=function(z){var B={};a(this.options.endpoint).to(B);var H=this._isIP(B.hostname),U=this.options.cname;z.bucket&&!U&&!H&&(B.host=z.bucket+"."+B.host);var W="/";z.bucket&&H&&(W+=z.bucket+"/"),z.object&&(W+=this._escape(z.object).replace(/\+/g,"%2B")),B.pathname=W;var G={};if(z.query&&c(G,z.query),z.subres){var ee={};g.string(z.subres)?ee[z.subres]="":g.array(z.subres)?z.subres.forEach(function(ie){ee[ie]=""}):ee=z.subres,c(G,ee)}return B.query=G,v.format(B)},N._getUserAgent=function(){var z=f&&f.browser?"js":"nodejs",B="aliyun-sdk-"+z+"/"+t.version,H=E.description;return!H&&f&&(H="Node.js "+f.version.slice(1)+" on "+f.platform+" "+f.arch),this._checkUserAgent(B+" "+H)},N._checkUserAgent=function(z){var B=z.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return B},N.checkBrowserAndVersion=function(z,B){return S.name===z&&S.version.split(".")[0]===B},N.parseXML=function(z){return new D.default(function(B,H){L.isBuffer(z)&&(z=z.toString()),d.parseString(z,{explicitRoot:!1,explicitArray:!1},function(U,W){U?H(U):B(W)})})},N.requestError=function(z){var B,H,U,W;return m.default.async(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(B=null,!(!z.data||!z.data.length)){ee.next=5;break}z.status===-1||z.status===-2?(B=new Error(z.message),B.name=z.name,B.status=z.status,B.code=z.name):(z.status===404?(B=new Error("Object not exists"),B.name="NoSuchKeyError",B.status=404,B.code="NoSuchKey"):z.status===412?(B=new Error("Pre condition failed"),B.name="PreconditionFailedError",B.status=412,B.code="PreconditionFailed"):(B=new Error("Unknow error, status: "+z.status),B.name="UnknowError",B.status=z.status),B.requestId=z.headers["x-oss-request-id"],B.host=""),ee.next=33;break;case 5:return H=String(z.data),this.debug("request response error data: %s",H,"error"),U=void 0,ee.prev=8,ee.next=11,m.default.awrap(this.parseXML(H));case 11:if(ee.t0=ee.sent,ee.t0){ee.next=14;break}ee.t0={};case 14:U=ee.t0,ee.next=24;break;case 17:return ee.prev=17,ee.t1=ee.catch(8),this.debug(H,"error"),ee.t1.message+=`
|
|
|
raw xml: `+H,ee.t1.status=z.status,ee.t1.requestId=z.headers["x-oss-request-id"],ee.abrupt("return",ee.t1);case 24:W=U.Message||"unknow request error, status: "+z.status,U.Condition&&(W+=" (condition: "+U.Condition+")"),B=new Error(W),B.name=U.Code?U.Code+"Error":"UnknowError",B.status=z.status,B.code=U.Code,B.requestId=U.RequestId,B.hostId=U.HostId,B.serverTime=U.ServerTime;case 33:return this.debug("generate error %j",B,"error"),ee.abrupt("return",B);case 35:case"end":return ee.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,J,I){(function(L){"use strict";var f=j("babel-runtime/core-js/array/from"),C=p(f),D=j("babel-runtime/core-js/promise"),u=p(D),m=j("babel-runtime/regenerator"),w=p(m);function p(_){return _&&_.__esModule?_:{default:_}}var s=j("is-type-of"),l=j("util"),a=j("path"),d=j("mime"),h=j("copy-to"),c=j("../common/utils/isBlob"),v=c.isBlob,g=j("../common/utils/isFile"),E=g.isFile,n=I;n.multipartUpload=function(i,P,O){var x,b,y,T,M,k,N,K,z;return w.default.async(function(H){for(;;)switch(H.prev=H.next){case 0:if(this.resetCancelFlag(),O=O||{},!(O.checkpoint&&O.checkpoint.uploadId)){H.next=6;break}return H.next=5,w.default.awrap(this._resumeMultipart(O.checkpoint,O));case 5:return H.abrupt("return",H.sent);case 6:return x=100*1024,O.mime||(E(P)?O.mime=d.getType(a.extname(P.name)):v(P)?O.mime=P.type:O.mime=d.getType(a.extname(P))),O.headers=O.headers||{},this._convertMetaToHeaders(O.meta,O.headers),H.next=12,w.default.awrap(this._getFileSize(P));case 12:if(b=H.sent,!(b<x)){H.next=25;break}return y=this._createStream(P,0,b),O.contentLength=b,H.next=18,w.default.awrap(this.putStream(i,y,O));case 18:if(T=H.sent,!(O&&O.progress)){H.next=22;break}return H.next=22,w.default.awrap(O.progress(1));case 22:return M={res:T.res,bucket:this.options.bucket,name:i,etag:T.res.headers.etag},(O.headers&&O.headers["x-oss-callback"]||O.callback)&&(M.data=T.data),H.abrupt("return",M);case 25:if(!(O.partSize&&!(parseInt(O.partSize,10)===O.partSize))){H.next=27;break}throw new Error("partSize must be int number");case 27:if(!(O.partSize&&O.partSize<x)){H.next=29;break}throw new Error("partSize must not be smaller than "+x);case 29:return H.next=31,w.default.awrap(this.initMultipartUpload(i,O));case 31:if(k=H.sent,N=k.uploadId,K=this._getPartSize(b,O.partSize),z={file:P,name:i,fileSize:b,partSize:K,uploadId:N,doneParts:[]},!(O&&O.progress)){H.next=38;break}return H.next=38,w.default.awrap(O.progress(0,z,k.res));case 38:return H.next=40,w.default.awrap(this._resumeMultipart(z,O));case 40:return H.abrupt("return",H.sent);case 41:case"end":return H.stop()}},null,this)},n._resumeMultipart=function(i,P){var O,x,b,y,T,M,k,N,K,z,B,H,U,W,G,ee,ie,ce;return w.default.async(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(O=this,!this.isCancel()){Ce.next=3;break}throw this._makeCancelEvent();case 3:return x=i.file,b=i.fileSize,y=i.partSize,T=i.uploadId,M=i.doneParts,k=i.name,N=[],M.length>0&&h(M).to(N),K=this._divideParts(b,y),z=K.length,B=!1,H=function(ye,fe){var ne=this;return new u.default(function(q,se){var Q,Z,be,re;return w.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,ye.isCancel()){X.next=18;break}return Q=K[fe-1],Z={stream:ye._createStream(x,Q.start,Q.end),size:Q.end-Q.start},X.next=6,w.default.awrap(ye._uploadPart(k,T,fe,Z));case 6:if(be=X.sent,!(!ye.isCancel()&&!B)){X.next=15;break}if(i.doneParts.push({number:fe,etag:be.res.headers.etag}),!P.progress){X.next=12;break}return X.next=12,w.default.awrap(P.progress(M.length/z,i,be.res));case 12:q({number:fe,etag:be.res.headers.etag}),X.next=16;break;case 15:q();case 16:X.next=19;break;case 18:q();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),re=new Error,re.name=X.t0.name,re.message=X.t0.message,re.stack=X.t0.stack,re.partNum=fe,h(X.t0).to(re),se(re);case 30:case"end":return X.stop()}},null,ne,[[0,21]])})},U=(0,C.default)(new Array(z),function(le,ye){return ye+1}),W=N.map(function(le){return le.number}),G=U.filter(function(le){return W.indexOf(le)<0}),ee=5,ie=P.parallel||ee,Ce.next=17,w.default.awrap(this._parallel(G,ie,function(le){return new u.default(function(ye,fe){H(O,le).then(function(ne){ne&&N.push(ne),ye()}).catch(function(ne){fe(ne)})})}));case 17:if(ce=Ce.sent,B=!0,!this.isCancel()){Ce.next=22;break}throw H=null,this._makeCancelEvent();case 22:if(!(ce&&ce.length>0)){Ce.next=25;break}throw ce[0].message="Failed to upload some parts with error: "+ce[0].toString()+" part_num: "+ce[0].partNum,ce[0];case 25:return Ce.next=27,w.default.awrap(this.completeMultipartUpload(k,T,N,P));case 27:return Ce.abrupt("return",Ce.sent);case 28:case"end":return Ce.stop()}},null,this)},n._getFileSize=function(i){return w.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!s.buffer(i)){O.next=4;break}return O.abrupt("return",i.length);case 4:if(!(v(i)||E(i))){O.next=6;break}return O.abrupt("return",i.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var o=j("stream"),t=o.Readable;function S(_,i){if(!(this instanceof S))return new S(_,i);t.call(this,i),this.file=_,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}l.inherits(S,t),S.prototype.readFileAndPush=function(i){if(this.fileBuffer)for(var P=!0;P&&this.fileBuffer&&this.start<this.fileBuffer.length;){var O=this.start,x=O+i;x=x>this.fileBuffer.length?this.fileBuffer.length:x,this.start=x,P=this.push(this.fileBuffer.slice(O,x))}},S.prototype._read=function(i){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;i=i||P;var O=this;this.reader.onload=function(b){O.fileBuffer=L.from(new Uint8Array(b.target.result)),O.file=null,O.readFileAndPush(i)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(i)},n._createStream=function(i,P,O){if(v(i)||E(i))return new S(i.slice(P,O));throw new Error("_createStream requires File/Blob.")},n._getPartSize=function(i,P){var O=10*1e3,x=1024*1024;return P?Math.max(Math.ceil(i/O),P):x},n._divideParts=function(i,P){for(var O=Math.ceil(i/P),x=[],b=0;b<O;b++){var y=P*b,T=Math.min(y+P,i);x.push({start:y,end:T})}return x}}).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,J,I){"use strict";var L=j("babel-runtime/core-js/promise"),f=s(L),C=j("babel-runtime/core-js/object/keys"),D=s(C),u=j("babel-runtime/core-js/object/assign"),m=s(u),w=j("babel-runtime/regenerator"),p=s(w);function s(O){return O&&O.__esModule?O:{default:O}}var l=j("utility"),a=j("fs"),d=j("is-type-of"),h=j("url"),c=j("copy-to"),v=j("path"),g=j("mime"),E=j("../common/callback"),n=j("../common/signUtils"),o=j("merge-descriptors"),t=j("../common/utils/isBlob"),S=t.isBlob,_=j("../common/utils/isFile"),i=_.isFile,P=I;P.append=function(x,b,y){var T;return p.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:return y=y||{},y.position===void 0&&(y.position="0"),y.subres={append:"",position:y.position},y.method="POST",k.next=6,p.default.awrap(this.put(x,b,y));case 6:return T=k.sent,T.nextAppendPosition=T.res.headers["x-oss-next-append-position"],k.abrupt("return",T);case 9:case"end":return k.stop()}},null,this)},P.put=function(x,b,y){var T,M,k,N,K,z,B;return p.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(T=void 0,y=y||{},x=this._objectName(x),!d.buffer(b)){U.next=7;break}T=b,U.next=33;break;case 7:if(!(S(b)||i(b))){U.next=32;break}return y.mime||(i(b)?y.mime=g.getType(v.extname(b.name)):y.mime=b.type),M=this._createStream(b,0,b.size),U.next=12,p.default.awrap(this._getFileSize(b));case 12:return y.contentLength=U.sent,U.prev=13,U.next=16,p.default.awrap(this.putStream(x,M,y));case 16:return k=U.sent,U.abrupt("return",k);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,p.default.awrap(this.put(x,b,y));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 y.headers=y.headers||{},this._convertMetaToHeaders(y.meta,y.headers),N=y.method||"PUT",K=this._objectRequestParams(N,x,y),E.encodeCallback(K,y),K.mime=y.mime,K.content=T,K.successStatuses=[200],U.next=43,p.default.awrap(this.request(K));case 43:return z=U.sent,B={name:x,url:this._objectUrl(x),res:z.res},K.headers&&K.headers["x-oss-callback"]&&(B.data=JSON.parse(z.data.toString())),U.abrupt("return",B);case 47:case"end":return U.stop()}},null,this,[[13,20]])},P.putStream=function(x,b,y){var T,M,k,N;return p.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return y=y||{},y.headers=y.headers||{},x=this._objectName(x),y.contentLength?y.headers["Content-Length"]=y.contentLength:y.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(y.meta,y.headers),T=y.method||"PUT",M=this._objectRequestParams(T,x,y),E.encodeCallback(M,y),M.mime=y.mime,M.stream=b,M.successStatuses=[200],z.next=13,p.default.awrap(this.request(M));case 13:return k=z.sent,N={name:x,url:this._objectUrl(x),res:k.res},M.headers&&M.headers["x-oss-callback"]&&(N.data=JSON.parse(k.data.toString())),z.abrupt("return",N);case 17:case"end":return z.stop()}},null,this)},o(P,j("../common/object/copyObject")),o(P,j("../common/object/getObjectTagging")),o(P,j("../common/object/putObjectTagging")),o(P,j("../common/object/deleteObjectTagging")),o(P,j("../common/image")),o(P,j("../common/object/getBucketVersions")),o(P,j("../common/object/getACL")),o(P,j("../common/object/putACL")),o(P,j("../common/object/head")),o(P,j("../common/object/delete")),o(P,j("../common/object/get")),o(P,j("../common/object/putSymlink")),o(P,j("../common/object/getSymlink")),o(P,j("../common/object/deleteMulti")),o(P,j("../common/object/getObjectMeta")),P.putMeta=function(x,b,y){var T;return p.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:return k.next=2,p.default.awrap(this.copy(x,x,{meta:b||{},timeout:y&&y.timeout,ctx:y&&y.ctx}));case 2:return T=k.sent,k.abrupt("return",T);case 4:case"end":return k.stop()}},null,this)},P.list=function(x,b){var y,T,M,k,N;return p.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return y=this._objectRequestParams("GET","",b),y.query=x,y.xmlResponse=!0,y.successStatuses=[200],z.next=6,p.default.awrap(this.request(y));case 6:return T=z.sent,M=T.data.Contents,k=this,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(B){return{name:B.Key,url:k._objectUrl(B.Key),lastModified:B.LastModified,etag:B.ETag,type:B.Type,size:Number(B.Size),storageClass:B.StorageClass,owner:{id:B.Owner.ID,displayName:B.Owner.DisplayName}}})),N=T.data.CommonPrefixes||null,N&&(Array.isArray(N)||(N=[N]),N=N.map(function(B){return B.Prefix})),z.abrupt("return",{res:T.res,objects:M,prefixes:N,nextMarker:T.data.NextMarker||null,isTruncated:T.data.IsTruncated==="true"});case 13:case"end":return z.stop()}},null,this)},P.restore=function(x,b){var y,T;return p.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:return b=b||{},b.subres=(0,m.default)({restore:""},b.subres),b.versionId&&(b.subres.versionId=b.versionId),y=this._objectRequestParams("POST",x,b),y.successStatuses=[202],k.next=7,p.default.awrap(this.request(y));case 7:return T=k.sent,k.abrupt("return",{res:T.res});case 9:case"end":return k.stop()}},null,this)},P.signatureUrl=function(x,b){b=b||{},x=this._objectName(x),b.method=b.method||"GET";var y=l.timestamp()+(b.expires||1800),T={bucket:this.options.bucket,object:x},M=this._getResource(T);this.options.stsToken&&(b["security-token"]=this.options.stsToken);var k=n._signatureForURL(this.options.accessKeySecret,b,M,y),N=h.parse(this._getReqUrl(T));return N.query={OSSAccessKeyId:this.options.accessKeyId,Expires:y,Signature:k.Signature},c(k.subResource).to(N.query),N.format()},P.getObjectUrl=function(x,b){return b?b[b.length-1]!=="/"&&(b+="/"):b=this.options.endpoint.format(),b+this._escape(this._objectName(x))},P._objectUrl=function(x){return this._getReqUrl({bucket:this.options.bucket,object:x})},P.generateObjectUrl=function(O,x){if(x)x[x.length-1]!=="/"&&(x+="/");else{x=this.options.endpoint.format();var b=h.parse(x),y=this.options.bucket;b.hostname=y+"."+b.hostname,b.host=y+"."+b.host,x=b.format()}return x+this._escape(this._objectName(O))},P._objectRequestParams=function(x,b,y){if(!this.options.bucket)throw new Error("Please create a bucket first");y=y||{},b=this._objectName(b);var T={object:b,bucket:this.options.bucket,method:x,subres:y&&y.subres,timeout:y&&y.timeout,ctx:y&&y.ctx};return y.headers&&(T.headers={},c(y.headers).to(T.headers)),T},P._objectName=function(x){return x.replace(/^\/+/,"")},P._convertMetaToHeaders=function(x,b){if(!x)return;(0,D.default)(x).forEach(function(y){b["x-oss-meta-"+y]=x[y]})},P._deleteFileSafe=function(x){var b=this;return new f.default(function(y){a.exists(x,function(T){T?a.unlink(x,function(M){M&&b.debug("unlink %j error: %s",x,M,"error"),y()}):y()})})}},{"../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,J,I){"use strict";I.version="6.10.0"},{}],6:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(w){return w&&w.__esModule?w:{default:w}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,m=I;m.deleteBucketLifecycle=function(p,s){var l,a;return f.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return u(p),l=this._bucketRequestParams("DELETE",p,"lifecycle",s),l.successStatuses=[204],h.next=5,f.default.awrap(this.request(l));case 5:return a=h.sent,h.abrupt("return",{res:a.res});case 7:case"end":return h.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(w){return w&&w.__esModule?w:{default:w}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,m=I;m.deleteBucketWebsite=function(p,s){var l,a;return f.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return u(p),l=this._bucketRequestParams("DELETE",p,"website",s),l.successStatuses=[204],h.next=5,f.default.awrap(this.request(l));case 5:return a=h.sent,h.abrupt("return",{res:a.res});case 7:case"end":return h.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(a){return a&&a.__esModule?a:{default:a}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,m=j("../utils/isArray"),w=m.isArray,p=j("../utils/formatObjKey"),s=p.formatObjKey,l=I;l.getBucketLifecycle=function(d,h){var c,v,g;return f.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return u(d),c=this._bucketRequestParams("GET",d,"lifecycle",h),c.successStatuses=[200],c.xmlResponse=!0,n.next=6,f.default.awrap(this.request(c));case 6:return v=n.sent,g=v.data.Rule||null,g&&(w(g)||(g=[g]),g=g.map(function(o){return o.ID&&(o.id=o.ID,delete o.ID),o.Tag&&!w(o.Tag)&&(o.Tag=[o.Tag]),s(o,"firstLowerCase")})),n.abrupt("return",{rules:g,res:v.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,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(w){return w&&w.__esModule?w:{default:w}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,m=I;m.getBucketVersioning=function(p,s){var l,a,d;return f.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return u(p),l=this._bucketRequestParams("GET",p,"versioning",s),l.xmlResponse=!0,l.successStatuses=[200],c.next=6,f.default.awrap(this.request(l));case 6:return a=c.sent,d=a.data.Status,c.abrupt("return",{status:a.status,versionStatus:d,res:a.res});case 9:case"end":return c.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(s){return s&&s.__esModule?s:{default:s}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,m=j("../utils/isObject"),w=m.isObject,p=I;p.getBucketWebsite=function(l,a){var d,h,c;return f.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return u(l),d=this._bucketRequestParams("GET",l,"website",a),d.successStatuses=[200],d.xmlResponse=!0,g.next=6,f.default.awrap(this.request(d));case 6:return h=g.sent,c=[],h.data.RoutingRules&&h.data.RoutingRules.RoutingRule&&(w(h.data.RoutingRules.RoutingRule)?c=[h.data.RoutingRules.RoutingRule]:c=h.data.RoutingRules.RoutingRule),g.abrupt("return",{index:h.data.IndexDocument&&h.data.IndexDocument.Suffix||"",supportSubDir:h.data.IndexDocument&&h.data.IndexDocument.SupportSubDir||"false",type:h.data.IndexDocument&&h.data.IndexDocument.Type,routingRules:c,error:h.data.ErrorDocument&&h.data.ErrorDocument.Key||null,res:h.res});case 10:case"end":return g.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(i){return i&&i.__esModule?i:{default:i}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,m=j("../utils/isArray"),w=m.isArray,p=j("../utils/deepCopy"),s=p.deepCopy,l=j("../utils/isObject"),a=l.isObject,d=j("../utils/obj2xml"),h=d.obj2xml,c=j("../utils/checkObjectTag"),v=c.checkObjectTag,g=j("../utils/getStrBytesCount"),E=g.getStrBytesCount,n=I;n.putBucketLifecycle=function(P,O,x){var b,y,T,M,k;return f.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 b=this._bucketRequestParams("PUT",P,"lifecycle",x),y=[],T={LifecycleConfiguration:{Rule:y}},O.forEach(function(z){o(z),_(z),z.id&&(z.ID=z.id,delete z.id),y.push(z)}),M=h(T,{headers:!0,firstUpperCase:!0}),b.content=M,b.mime="xml",b.successStatuses=[200],K.next=13,f.default.awrap(this.request(b));case 13:return k=K.sent,K.abrupt("return",{res:k.res});case 15:case"end":return K.stop()}},null,this)};function o(i){i.days&&(i.expiration={days:i.days}),i.date&&(i.expiration={createdBeforeDate:i.date})}function t(i,P){var O=i.days,x=i.createdBeforeDate;if(!O&&!x)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(x&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(x))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function S(i){if(!w(i)&&!a(i))throw new Error("tag must be Object or Array");i=a(i)?[i]:i;var P={},O=s(i);O.forEach(function(x){P[x.key]=x.value}),v(P)}function _(i){if(i.id&&E(i.id)>255)throw new Error("ID is composed of 255 bytes at most");if(i.prefix===""||i.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(i.status))throw new Error("Status must be Enabled or Disabled");if(i.transition){if(!["IA","Archive"].includes(i.transition.storageClass))throw new Error("StorageClass must be IA or Archive");t(i.transition,"Transition")}if(i.expiration){if(!i.expiration.expiredObjectDeleteMarker)t(i.expiration,"Expiration");else if(i.expiration.days||i.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(i.abortMultipartUpload&&t(i.abortMultipartUpload,"AbortMultipartUpload"),!i.expiration&&!i.abortMultipartUpload&&!i.transition&&!i.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(i.tag){if(i.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");S(i.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,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(s){return s&&s.__esModule?s:{default:s}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,m=j("../utils/obj2xml"),w=m.obj2xml,p=I;p.putBucketVersioning=function(l,a){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h,c,v;return f.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:if(u(l),["Enabled","Suspended"].includes(a)){E.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return h=this._bucketRequestParams("PUT",l,"versioning",d),c={VersioningConfiguration:{Status:a}},h.mime="xml",h.content=w(c,{headers:!0}),E.next=9,f.default.awrap(this.request(h));case 9:return v=E.sent,E.abrupt("return",{res:v.res,status:v.status});case 11:case"end":return E.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(a){return a&&a.__esModule?a:{default:a}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,m=j("../utils/obj2xml"),w=m.obj2xml,p=j("../utils/isArray"),s=p.isArray,l=I;l.putBucketWebsite=function(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],v,g,E,n,o;return f.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:if(u(d),v=this._bucketRequestParams("PUT",d,"website",c),g={Suffix:h.index||"index.html"},E={IndexDocument:g},n={WebsiteConfiguration:E},h.supportSubDir&&(g.SupportSubDir=h.supportSubDir),h.type&&(g.Type=h.type),h.error&&(E.ErrorDocument={Key:h.error}),!(h.routingRules!==void 0)){S.next=12;break}if(s(h.routingRules)){S.next=11;break}throw new Error("RoutingRules must be Array");case 11:E.RoutingRules={RoutingRule:h.routingRules};case 12:return n=w(n),v.content=n,v.mime="xml",v.successStatuses=[200],S.next=18,f.default.awrap(this.request(v));case 18:return o=S.sent,S.abrupt("return",{res:o.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,J,I){(function(L){"use strict";var f=j("babel-runtime/core-js/object/keys"),C=m(f),D=j("babel-runtime/core-js/json/stringify"),u=m(D);function m(w){return w&&w.__esModule?w:{default:w}}I.encodeCallback=function(p,s){if(p.headers=p.headers||{},!Object.prototype.hasOwnProperty.call(p.headers,"x-oss-callback")&&s.callback){var l={callbackUrl:encodeURI(s.callback.url),callbackBody:s.callback.body};s.callback.host&&(l.callbackHost=s.callback.host),s.callback.contentType&&(l.callbackBodyType=s.callback.contentType);var a=L.from((0,u.default)(l)).toString("base64");if(p.headers["x-oss-callback"]=a,s.callback.customValue){var d={};(0,C.default)(s.callback.customValue).forEach(function(h){d["x:"+h]=s.callback.customValue[h]}),p.headers["x-oss-callback-var"]=L.from((0,u.default)(d)).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,J,I){"use strict";var L=j("babel-runtime/core-js/object/assign"),f=C(L);function C(l){return l&&l.__esModule?l:{default:l}}var D=j("humanize-ms"),u=j("url"),m=j("../utils/checkBucketName"),w=m.checkBucketName;function p(l,a){var d=u.parse(l);if(d.protocol||(d=u.parse("http"+(a?"s":"")+"://"+l)),d.protocol!=="http:"&&d.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return d}function s(l,a,d){var h=d?"https://":"http://",c=a?"-internal.aliyuncs.com":".aliyuncs.com",v="vpc100-oss-cn-";return l.substr(0,v.length)===v&&(c=".aliyuncs.com"),u.parse(h+l+c)}J.exports=function(l){if(!l||!l.accessKeyId||!l.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");l.bucket&&w(l.bucket);var a=(0,f.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=p(a.endpoint,a.secure);else if(a.region)a.endpoint=s(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,J,I){"use strict";var L=j("merge-descriptors"),f=I;L(f,j("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(a){return a&&a.__esModule?a:{default:a}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,m=j("querystring"),w=j("js-base64"),p=w.Base64.encode,s=I;s.processObjectSave=function(d,h,c,v){var g,E,n,o;return f.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return l(d,"sourceObject"),l(h,"targetObject"),l(c,"process"),h=this._objectName(h),v&&u(v),g=this._objectRequestParams("POST",d,{subres:"x-oss-process"}),E=v?",b_"+p(v):"",h=p(h),n={"x-oss-process":c+"|sys/saveas,o_"+h+E},g.content=m.stringify(n),S.next=12,f.default.awrap(this.request(g));case 12:return o=S.sent,S.abrupt("return",{res:o.res,status:o.res.status});case 14:case"end":return S.stop()}},null,this)};function l(a,d){if(!a)throw new Error(d+" is required");if(typeof a!="string")throw new Error(d+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(s){return s&&s.__esModule?s:{default:s}}var D=j("copy-to"),u=j("./callback"),m=j("./utils/deepCopy"),w=m.deepCopy,p=I;p.listUploads=function(l,a){var d,h,c,v;return f.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return a=a||{},d={},D(a).to(d),d.subres="uploads",h=this._objectRequestParams("GET","",d),h.query=l,h.xmlResponse=!0,h.successStatuses=[200],E.next=10,f.default.awrap(this.request(h));case 10:return c=E.sent,v=c.data.Upload||[],Array.isArray(v)||(v=[v]),v=v.map(function(n){return{name:n.Key,uploadId:n.UploadId,initiated:n.Initiated}}),E.abrupt("return",{res:c.res,uploads:v,bucket:c.data.Bucket,nextKeyMarker:c.data.NextKeyMarker,nextUploadIdMarker:c.data.NextUploadIdMarker,isTruncated:c.data.IsTruncated==="true"});case 15:case"end":return E.stop()}},null,this)},p.listParts=function(l,a,d,h){var c,v,g;return f.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return h=h||{},c={},D(h).to(c),c.subres={uploadId:a},v=this._objectRequestParams("GET",l,c),v.query=d,v.xmlResponse=!0,v.successStatuses=[200],n.next=10,f.default.awrap(this.request(v));case 10:return g=n.sent,n.abrupt("return",{res:g.res,uploadId:g.data.UploadId,bucket:g.data.Bucket,name:g.data.Key,partNumberMarker:g.data.PartNumberMarker,nextPartNumberMarker:g.data.NextPartNumberMarker,maxParts:g.data.MaxParts,isTruncated:g.data.IsTruncated,parts:g.data.Part||[]});case 12:case"end":return n.stop()}},null,this)},p.abortMultipartUpload=function(l,a,d){var h,c,v;return f.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return this._stop(),d=d||{},h={},D(d).to(h),h.subres={uploadId:a},c=this._objectRequestParams("DELETE",l,h),c.successStatuses=[204],E.next=9,f.default.awrap(this.request(c));case 9:return v=E.sent,E.abrupt("return",{res:v.res});case 11:case"end":return E.stop()}},null,this)},p.initMultipartUpload=function(l,a){var d,h,c;return f.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return a=a||{},d={},D(a).to(d),d.headers=d.headers||{},this._convertMetaToHeaders(a.meta,d.headers),d.subres="uploads",h=this._objectRequestParams("POST",l,d),h.mime=a.mime,h.xmlResponse=!0,h.successStatuses=[200],g.next=12,f.default.awrap(this.request(h));case 12:return c=g.sent,g.abrupt("return",{res:c.res,bucket:c.data.Bucket,name:c.data.Key,uploadId:c.data.UploadId});case 14:case"end":return g.stop()}},null,this)},p.uploadPart=function(l,a,d,h,c,v,g){var E;return f.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return E={stream:this._createStream(h,c,v),size:v-c},o.next=3,f.default.awrap(this._uploadPart(l,a,d,E,g));case 3:return o.abrupt("return",o.sent);case 4:case"end":return o.stop()}},null,this)},p.completeMultipartUpload=function(l,a,d,h){var c,v,g,E,n,o,t,S;return f.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:for(c=d.concat().sort(function(P,O){return P.number-O.number}).filter(function(P,O,x){return!O||P.number!==x[O-1].number}),v=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,g=0;g<c.length;g++)E=c[g],v+=`<Part>
|
|
|
`,v+="<PartNumber>"+E.number+`</PartNumber>
|
|
|
`,v+="<ETag>"+E.etag+`</ETag>
|
|
|
`,v+=`</Part>
|
|
|
`;return v+="</CompleteMultipartUpload>",h=h||{},n={},n=w(h),n.headers&&delete n.headers["x-oss-server-side-encryption"],n.subres={uploadId:a},o=this._objectRequestParams("POST",l,n),u.encodeCallback(o,n),o.mime="xml",o.content=v,o.headers&&o.headers["x-oss-callback"]||(o.xmlResponse=!0),o.successStatuses=[200],i.next=17,f.default.awrap(this.request(o));case 17:return t=i.sent,S={res:t.res,bucket:o.bucket,name:l,etag:t.res.headers.etag},o.headers&&o.headers["x-oss-callback"]&&(S.data=JSON.parse(t.data.toString())),i.abrupt("return",S);case 21:case"end":return i.stop()}},null,this)},p._uploadPart=function(l,a,d,h,c){var v,g,E;return f.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return c=c||{},v={},D(c).to(v),v.headers={"Content-Length":h.size},v.subres={partNumber:d,uploadId:a},g=this._objectRequestParams("PUT",l,v),g.mime=v.mime,g.stream=h.stream,g.successStatuses=[200],o.next=11,f.default.awrap(this.request(g));case 11:if(E=o.sent,E.res.headers.etag){o.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 h.stream=null,g.stream=null,o.abrupt("return",{name:l,etag:E.res.headers.etag,res:E.res});case 17:case"end":return o.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=w(L),C=j("babel-runtime/core-js/object/keys"),D=w(C),u=j("babel-runtime/helpers/typeof"),m=w(u);function w(a){return a&&a.__esModule?a:{default:a}}var p=j("../utils/checkBucketName"),s=p.checkBucketName,l=I;l.copy=function(d,h,c,v){var g,E,n;return f.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return(typeof c=="undefined"?"undefined":(0,m.default)(c))==="object"&&(v=c),v=v||{},v.headers=v.headers||{},(0,D.default)(v.headers).forEach(function(S){v.headers["x-oss-copy-source-"+S.toLowerCase()]=v.headers[S]}),v.meta&&(v.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(v.meta,v.headers),h=this._getSourceName(h,c),v.versionId&&(h=h+"?versionId="+v.versionId),v.headers["x-oss-copy-source"]=h,g=this._objectRequestParams("PUT",d,v),g.xmlResponse=!0,g.successStatuses=[200,304],t.next=14,f.default.awrap(this.request(g));case 14:return E=t.sent,n=E.data,n&&(n={etag:n.ETag,lastModified:n.LastModified}),t.abrupt("return",{data:n,res:E.res});case 18:case"end":return t.stop()}},null,this)},l._getSourceName=function(d,h){return typeof h=="string"?d=this._objectName(d):d[0]!=="/"?h=this.options.bucket:(h=d.replace(/\/(.+?)(\/.*)/,"$1"),d=d.replace(/(\/.+?\/)(.*)/,"$2")),s(h),d=encodeURI(d),d="/"+h+"/"+d,d}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var m=I;m.delete=function(p){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a;return f.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return s.subres=(0,D.default)({},s.subres),s.versionId&&(s.subres.versionId=s.versionId),l=this._objectRequestParams("DELETE",p,s),l.successStatuses=[204],h.next=6,f.default.awrap(this.request(l));case 6:return a=h.sent,h.abrupt("return",{res:a.res});case 8:case"end":return h.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(l){return l&&l.__esModule?l:{default:l}}var m=j("utility"),w=j("../utils/obj2xml"),p=w.obj2xml,s=I;s.deleteMulti=function(a){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,c,v,g,E,n,o,t,S,_,i,P;return f.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:if(h=[],!(!a||!a.length)){x.next=3;break}throw new Error("names is required");case 3:for(c=0;c<a.length;c++)v={},typeof a[c]=="string"?v.Key=m.escape(this._objectName(a[c])):(g=a[c],E=g.key,n=g.versionId,v.Key=m.escape(this._objectName(E)),v.VersionId=n),h.push(v);return o={Delete:{Quiet:!!d.quiet,Object:h}},t=p(o,{headers:!0}),d.subres=(0,D.default)({delete:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),S=this._objectRequestParams("POST","",d),S.mime="xml",S.content=t,S.xmlResponse=!0,S.successStatuses=[200],x.next=15,f.default.awrap(this.request(S));case 15:return _=x.sent,i=_.data,P=i&&i.Deleted||null,P&&(Array.isArray(P)||(P=[P])),x.abrupt("return",{res:_.res,deleted:P||[]});case 20:case"end":return x.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var m=I;m.deleteObjectTagging=function(p){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a;return f.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return s.subres=(0,D.default)({tagging:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),p=this._objectName(p),l=this._objectRequestParams("DELETE",p,s),l.successStatuses=[204],h.next=7,f.default.awrap(this.request(l));case 7:return a=h.sent,h.abrupt("return",{status:a.status,res:a.res});case 9:case"end":return h.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(s){return s&&s.__esModule?s:{default:s}}var m=j("fs"),w=j("is-type-of"),p=I;p.get=function(l,a){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h,c,v,g;return f.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return h=null,c=!1,w.writableStream(a)?h=a:w.string(a)?(h=m.createWriteStream(a),c=!0):d=a,d=d||{},d.subres=(0,D.default)({},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.process&&(d.subres["x-oss-process"]=d.process),v=void 0,n.prev=8,g=this._objectRequestParams("GET",l,d),g.writeStream=h,g.successStatuses=[200,206,304],n.next=14,f.default.awrap(this.request(g));case 14:v=n.sent,c&&h.destroy(),n.next=25;break;case 18:if(n.prev=18,n.t0=n.catch(8),!c){n.next=24;break}return h.destroy(),n.next=24,f.default.awrap(this._deleteFileSafe(a));case 24:throw n.t0;case 25:return n.abrupt("return",{res:v.res,content:v.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,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var m=I;m.getACL=function(p){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a;return f.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return s.subres=(0,D.default)({acl:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),p=this._objectName(p),l=this._objectRequestParams("GET",p,s),l.successStatuses=[200],l.xmlResponse=!0,h.next=8,f.default.awrap(this.request(l));case 8:return a=h.sent,h.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 h.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(j,J,I){"use strict";var L=j("babel-runtime/core-js/object/keys"),f=w(L),C=j("babel-runtime/regenerator"),D=w(C),u=j("babel-runtime/core-js/object/assign"),m=w(u);function w(g){return g&&g.__esModule?g:{default:g}}var p=I,s=j("../utils/isObject"),l=s.isObject,a=j("../utils/isArray"),d=a.isArray;p.getBucketVersions=h,p.listObjectVersions=h;function h(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,o,t,S,_,i;return D.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(g.versionIdMarker&&g.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return E.subres=(0,m.default)({versions:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),n=this._objectRequestParams("GET","",E),n.xmlResponse=!0,n.successStatuses=[200],n.query=v(g),O.next=10,D.default.awrap(this.request(n));case 10:return o=O.sent,t=o.data.Version||[],S=o.data.DeleteMarker||[],_=this,t&&(Array.isArray(t)||(t=[t]),t=t.map(function(x){return{name:x.Key,url:_._objectUrl(x.Key),lastModified:x.LastModified,isLatest:x.IsLatest==="true",versionId:x.VersionId,etag:x.ETag,type:x.Type,size:Number(x.Size),storageClass:x.StorageClass,owner:{id:x.Owner.ID,displayName:x.Owner.DisplayName}}})),S&&(d(S)||(S=[S]),S=S.map(function(x){return{name:x.Key,lastModified:x.LastModified,versionId:x.VersionId,owner:{id:x.Owner.ID,displayName:x.Owner.DisplayName}}})),i=o.data.CommonPrefixes||null,i&&(d(i)||(i=[i]),i=i.map(function(x){return x.Prefix})),O.abrupt("return",{res:o.res,objects:t,deleteMarker:S,prefixes:i,nextMarker:o.data.NextMarker||null,NextVersionIdMarker:o.data.NextVersionIdMarker||null,isTruncated:o.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function c(g){return g.replace(/([A-Z])/g,"-$1").toLowerCase()}function v(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E={};return l(g)&&(0,f.default)(g).forEach(function(n){E[c(n)]=g[n]}),E}},{"../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,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var m=I;m.getObjectMeta=function(p,s){var l,a;return f.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return s=s||{},p=this._objectName(p),s.subres=(0,D.default)({objectMeta:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),l=this._objectRequestParams("HEAD",p,s),l.successStatuses=[200],h.next=8,f.default.awrap(this.request(l));case 8:return a=h.sent,h.abrupt("return",{status:a.status,res:a.res});case 10:case"end":return h.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(s){return s&&s.__esModule?s:{default:s}}var m=I,w=j("../utils/isObject"),p=w.isObject;m.getObjectTagging=function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,h,c,v,g;return f.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),d=this._objectRequestParams("GET",l,a),d.successStatuses=[200],n.next=7,f.default.awrap(this.request(d));case 7:return h=n.sent,n.next=10,f.default.awrap(this.parseXML(h.data));case 10:return c=n.sent,v=c.TagSet.Tag,v=v&&p(v)?[v]:v||[],g={},v.forEach(function(o){g[o.Key]=o.Value}),n.abrupt("return",{status:h.status,res:h.res,tag:g});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,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var m=I;m.getSymlink=function(p){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a,d;return f.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return s.subres=(0,D.default)({symlink:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),p=this._objectName(p),l=this._objectRequestParams("GET",p,s),l.successStatuses=[200],c.next=7,f.default.awrap(this.request(l));case 7:return a=c.sent,d=a.res.headers["x-oss-symlink-target"],c.abrupt("return",{targetName:decodeURIComponent(d),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,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=w(L),C=j("babel-runtime/core-js/object/keys"),D=w(C),u=j("babel-runtime/core-js/object/assign"),m=w(u);function w(s){return s&&s.__esModule?s:{default:s}}var p=I;p.head=function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,h,c;return f.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return a.subres=(0,m.default)({},a.subres),a.versionId&&(a.subres.versionId=a.versionId),d=this._objectRequestParams("HEAD",l,a),d.successStatuses=[200,304],g.next=6,f.default.awrap(this.request(d));case 6:return h=g.sent,c={meta:null,res:h.res,status:h.status},h.status===200&&(0,D.default)(h.headers).forEach(function(E){E.indexOf("x-oss-meta-")===0&&(c.meta||(c.meta={}),c.meta[E.substring(11)]=h.headers[E])}),g.abrupt("return",c);case 10:case"end":return g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var m=I;m.putACL=function(p,s,l){var a,d;return f.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"]=s,p=this._objectName(p),a=this._objectRequestParams("PUT",p,l),a.successStatuses=[200],c.next=10,f.default.awrap(this.request(a));case 10:return d=c.sent,c.abrupt("return",{res:d.res});case 12:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=w(L),C=j("babel-runtime/core-js/object/keys"),D=w(C),u=j("babel-runtime/core-js/object/assign"),m=w(u);function w(h){return h&&h.__esModule?h:{default:h}}var p=j("../utils/obj2xml"),s=p.obj2xml,l=j("../utils/checkObjectTag"),a=l.checkObjectTag,d=I;d.putObjectTagging=function(c,v){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},E,n,o;return f.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return a(v),g.subres=(0,m.default)({tagging:""},g.subres),g.versionId&&(g.subres.versionId=g.versionId),c=this._objectName(c),E=this._objectRequestParams("PUT",c,g),E.successStatuses=[200],v=(0,D.default)(v).map(function(_){return{Key:_,Value:v[_]}}),n={Tagging:{TagSet:{Tag:v}}},E.mime="xml",E.content=s(n),S.next=12,f.default.awrap(this.request(E));case 12:return o=S.sent,S.abrupt("return",{res:o.res,status:o.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,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var m=I;m.putSymlink=function(p,s,l){var a,d;return f.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return l=l||{},l.headers=l.headers||{},s=this._escape(this._objectName(s)),this._convertMetaToHeaders(l.meta,l.headers),l.headers["x-oss-symlink-target"]=s,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),p=this._objectName(p),a=this._objectRequestParams("PUT",p,l),a.successStatuses=[200],c.next=13,f.default.awrap(this.request(a));case 13:return d=c.sent,c.abrupt("return",{res:d.res});case 15:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(j,J,I){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/promise"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var m=I;m._parallelNode=function(p,s,l,a){var d,h,c,v,g,E,n,o;return f.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:d=this,h=[],c=[],v=p.length/s,g=p.length%s,E=g===0?v:(p.length-g)/s+1,n=1,o=0;case 8:if(!(o<p.length)){S.next=26;break}if(!d.isCancel()){S.next=11;break}return S.abrupt("break",26);case 11:if(a?c.push(l(d,p[o],a)):c.push(l(d,p[o])),!(c.length===s||n===E&&o===p.length-1)){S.next=23;break}return S.prev=13,n+=1,S.next=17,f.default.awrap(D.default.all(c));case 17:S.next=22;break;case 19:S.prev=19,S.t0=S.catch(13),h.push(S.t0);case 22:c=[];case 23:o++,S.next=8;break;case 26:return S.abrupt("return",h);case 27:case"end":return S.stop()}},null,this,[[13,19]])},m._parallel=function(p,s,l){var a=this;return new D.default(function(d){var h=[];if(s<=0||!p){d(h);return}function c(i){return function(){if(i===null)throw new Error("Callback was already called.");var P=i;i=null;for(var O=arguments.length,x=Array(O),b=0;b<O;b++)x[b]=arguments[b];P.apply(this,x)}}function v(i){var P=-1,O=i.length;return function(){return++P<O&&!a.isCancel()?{value:i[P],key:P}:null}}var g=v(p),E=!1,n=0,o=!1;function t(i,P){n-=1,i?(E=!0,h.push(i),d(h)):P==={}||E&&n<=0?(E=!0,d(h)):o||(a.isCancel()?d(h):_())}function S(i,P){l(i).then(function(O){P(null,O)}).catch(function(O){P(O)})}function _(){for(o=!0;n<s&&!E&&!a.isCancel();){var i=g();if(i===null||h.length>0){E=!0,n<=0&&d(h);return}n+=1,S(i.value,c(t))}o=!1}_()})},m.cancel=function(p){this.options.cancelFlag=!0,p&&this.abortMultipartUpload(p.name,p.uploadId,p.options)},m.isCancel=function(){return this.options.cancelFlag},m.resetCancelFlag=function(){this.options.cancelFlag=!1},m._stop=function(){this.options.cancelFlag=!0},m._makeCancelEvent=function(){var p={status:0,name:"cancel"};return p}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(j,J,I){(function(L){"use strict";var f=j("babel-runtime/core-js/json/stringify"),C=m(f),D=j("babel-runtime/core-js/object/keys"),u=m(D);function m(s){return s&&s.__esModule?s:{default:s}}var w=j("./../../shims/crypto/crypto.js"),p=j("is-type-of");I.buildCanonicalizedResource=function(l,a){var d=""+l,h="?";if(p.string(a)&&a.trim()!=="")d+=h+a;else if(p.array(a))a.sort(),d+=h+a.join("&");else if(a){var c=function(E,n){return E[0]>n[0]?1:E[0]<n[0]?-1:0},v=function(E){d+=h+E,a[E]&&(d+="="+a[E]),h="&"};(0,u.default)(a).sort(c).forEach(v)}return d},I.buildCanonicalString=function(l,a,d,h){d=d||{};var c=d.headers||{},v="x-oss-",g=[],E={},n=[l.toUpperCase(),c["Content-Md5"]||"",c["Content-Type"]||c["Content-Type".toLowerCase()],h||c["x-oss-date"]];return(0,u.default)(c).forEach(function(o){var t=o.toLowerCase();t.indexOf(v)===0&&(E[t]=String(c[o]).trim())}),(0,u.default)(E).sort().forEach(function(o){g.push(o+":"+E[o])}),n=n.concat(g),n.push(this.buildCanonicalizedResource(a,d.parameters)),n.join(`
|
|
|
`)},I.computeSignature=function(l,a){var d=w.createHmac("sha1",l);return d.update(L.from(a,"utf8")).digest("base64")},I.authorization=function(l,a,d){return"OSS "+l+":"+this.computeSignature(a,d)},I._signatureForURL=function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=arguments[2],h=arguments[3],c={},v=a.subResource,g=v===void 0?{}:v;if(a.process){var E="x-oss-process";g[E]=a.process}if(a.trafficLimit){var n="x-oss-traffic-limit";g[n]=a.trafficLimit}if(a.response&&(0,u.default)(a.response).forEach(function(_){var i="response-"+_.toLowerCase();g[i]=a.response[_]}),(0,u.default)(a).forEach(function(_){var i=_.toLowerCase(),P=a[_];i.indexOf("x-oss-")===0?c[i]=P:(i.indexOf("content-md5")===0||i.indexOf("content-type")===0)&&(c[_]=P)}),Object.prototype.hasOwnProperty.call(a,"security-token")&&(g["security-token"]=a["security-token"]),Object.prototype.hasOwnProperty.call(a,"callback")){var o={callbackUrl:encodeURI(a.callback.url),callbackBody:a.callback.body};if(a.callback.host&&(o.callbackHost=a.callback.host),a.callback.contentType&&(o.callbackBodyType=a.callback.contentType),g.callback=L.from((0,C.default)(o)).toString("base64"),a.callback.customValue){var t={};(0,u.default)(a.callback.customValue).forEach(function(_){t["x:"+_]=a.callback.customValue[_]}),g["callback-var"]=L.from((0,C.default)(t)).toString("base64")}}var S=this.buildCanonicalString(a.method,d,{headers:c,parameters:g},h.toString());return{Signature:this.computeSignature(l,S),subResource:g}}}).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,J,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.checkBucketName=void 0,I.checkBucketName=function(L,f){var C=f?/^[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,J,I){"use strict";var L=j("babel-runtime/core-js/object/entries"),f=C(L);function C(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(I,"__esModule",{value:!0}),I.checkObjectTag=void 0;var D=j("./checkValid"),u=D.checkValid,m=j("./isObject"),w=m.isObject,p=[{validator:function(d){if(typeof d!="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 (/)"}],s={key:[].concat(p,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(p,[{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 d=(0,f.default)(a);if(d.length>10)throw new Error("maximum of 10 tags for a object");var h=["key","value"];d.forEach(function(c){c.forEach(function(v,g){u(v,s[h[g]])})})}I.checkObjectTag=l},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(j,J,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.checkValid=void 0;function L(f,C){C.forEach(function(D){if(D.validator)D.validator(f);else if(D.pattern&&!D.pattern.test(f))throw new Error(D.msg)})}I.checkValid=L},{}],38:[function(j,J,I){(function(L){"use strict";var f=j("babel-runtime/core-js/object/assign"),C=D(f);function D(c){return c&&c.__esModule?c:{default:c}}Object.defineProperty(I,"__esModule",{value:!0}),I.createRequest=void 0;var u=j("./../../../shims/crypto/crypto.js"),m=j("debug")("ali-oss"),w=j("mime"),p=j("dateformat"),s=j("copy-to"),l=j("path");function a(c,v){return c[v]||c[v.toLowerCase()]}function d(c,v){delete c[v],delete c[v.toLowerCase()]}function h(c){var v=new Date;this.options.amendTimeSkewed&&(v=+new Date+this.options.amendTimeSkewed);var g={"x-oss-date":p(v,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(g["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,C.default)(g,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(g["x-oss-security-token"]=this.options.stsToken),s(c.headers).to(g),a(g,"Content-Type")||(c.mime&&c.mime.indexOf("/")>0?g["Content-Type"]=c.mime:g["Content-Type"]=w.getType(c.mime||l.extname(c.object||""))),a(g,"Content-Type")||d(g,"Content-Type"),c.content&&(g["Content-Md5"]=u.createHash("md5").update(L.from(c.content,"utf8")).digest("base64"),g["Content-Length"]||(g["Content-Length"]=c.content.length));var E=this._getResource(c);g.authorization=this.authorization(c.method,E,c.subres,g);var n=this._getReqUrl(c);m("request %s %s, with headers %j, !!stream: %s",c.method,n,g,!!c.stream);var o=c.timeout||this.options.timeout,t={method:c.method,content:c.content,stream:c.stream,headers:g,timeout:o,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}}I.createRequest=h}).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,J,I){"use strict";var L=j("babel-runtime/core-js/object/keys"),f=u(L),C=j("babel-runtime/helpers/typeof"),D=u(C);function u(m){return m&&m.__esModule?m:{default:m}}Object.defineProperty(I,"__esModule",{value:!0}),I.deepCopy=void 0,I.deepCopy=function(m){if(m===null||(typeof m=="undefined"?"undefined":(0,D.default)(m))!=="object")return m;var w=Array.isArray(m)?[]:{};return(0,f.default)(m).forEach(function(p){w[p]=I.deepCopy(m[p])}),w}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(j,J,I){"use strict";var L=j("babel-runtime/core-js/object/keys"),f=u(L),C=j("babel-runtime/helpers/typeof"),D=u(C);function u(p){return p&&p.__esModule?p:{default:p}}Object.defineProperty(I,"__esModule",{value:!0}),I.formatObjKey=void 0;function m(p,s){if(p===null||(typeof p=="undefined"?"undefined":(0,D.default)(p))!=="object")return p;var l=void 0;if(Array.isArray(p)){l=[];for(var a=0;a<p.length;a++)l.push(m(p[a],s))}else l={},(0,f.default)(p).forEach(function(d){l[w(d,s)]=m(p[d],s)});return l}I.formatObjKey=m;function w(p,s){return s==="firstUpperCase"?p=p.replace(/^./,function(l){return l.toUpperCase()}):s==="firstLowerCase"&&(p=p.replace(/^./,function(l){return l.toLowerCase()})),p}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(j,J,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.getStrBytesCount=void 0;function L(f){for(var C=0,D=0;D<f.length;D++){var u=f.charAt(D);/^[\u00-\uff]$/.test(u)?C+=1:C+=2}return C}I.getStrBytesCount=L},{}],42:[function(j,J,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isArray=void 0,I.isArray=function(L){return Object.prototype.toString.call(L)==="[object Array]"}},{}],43:[function(j,J,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isBlob=void 0;function L(f){return typeof Blob!="undefined"&&f instanceof Blob}I.isBlob=L},{}],44:[function(j,J,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isFile=void 0,I.isFile=function(L){return typeof File!="undefined"&&L instanceof File}},{}],45:[function(j,J,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isIP=void 0,I.isIP=function(L){var f=/^(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 f.test(L)||C.test(L)}},{}],46:[function(j,J,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isObject=void 0,I.isObject=function(L){return Object.prototype.toString.call(L)==="[object Object]"}},{}],47:[function(j,J,I){"use strict";var L=j("babel-runtime/core-js/object/keys"),f=C(L);function C(w){return w&&w.__esModule?w:{default:w}}Object.defineProperty(I,"__esModule",{value:!0}),I.obj2xml=void 0;var D=j("./formatObjKey");function u(w){return Object.prototype.toString.call(w).replace(/(.*? |])/g,"").toLowerCase()}function m(w,p){var s="";return p&&p.headers&&(s=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
`),p&&p.firstUpperCase&&(w=D.formatObjKey(w,"firstUpperCase")),u(w)==="object"?(0,f.default)(w).forEach(function(l){u(w[l])==="string"||u(w[l])==="number"?s+="<"+l+">"+w[l]+"</"+l+">":u(w[l])==="object"?s+="<"+l+">"+m(w[l])+"</"+l+">":u(w[l])==="array"?s+=w[l].map(function(a){return"<"+l+">"+m(a)+"</"+l+">"}).join(""):s+="<"+l+">"+w[l].toString()+"</"+l+">"}):s+=w.toString(),s}I.obj2xml=m},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(j,J,I){J.exports=L,J.exports.HttpsAgent=L;function L(){}},{}],49:[function(j,J,I){J.exports=j("./register")().Promise},{"./register":51}],50:[function(j,J,I){"use strict";var L="@@any-promise/REGISTRATION",f=null;J.exports=function(C,D){return function(m,w){m=m||null,w=w||{};var p=w.global!==!1;if(f===null&&p&&(f=C[L]||null),f!==null&&m!==null&&f.implementation!==m)throw new Error('any-promise already defined as "'+f.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return f===null&&(m!==null&&typeof w.Promise!="undefined"?f={Promise:w.Promise,implementation:m}:f=D(m),p&&(C[L]=f)),f}}},{}],51:[function(j,J,I){"use strict";J.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,J,I){J.exports={default:j("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(j,J,I){J.exports={default:j("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(j,J,I){J.exports={default:j("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(j,J,I){J.exports={default:j("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(j,J,I){J.exports={default:j("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(j,J,I){J.exports={default:j("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(j,J,I){J.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,J,I){J.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,J,I){J.exports={default:j("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(j,J,I){J.exports={default:j("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(j,J,I){J.exports={default:j("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(j,J,I){J.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,J,I){J.exports={default:j("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(j,J,I){J.exports={default:j("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(j,J,I){J.exports={default:j("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(j,J,I){"use strict";I.__esModule=!0;var L=j("../core-js/symbol/iterator"),f=m(L),C=j("../core-js/symbol"),D=m(C),u=typeof D.default=="function"&&typeof f.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 m(w){return w&&w.__esModule?w:{default:w}}I.default=typeof D.default=="function"&&u(f.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,J,I){J.exports=j("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(j,J,I){"use strict";I.byteLength=p,I.toByteArray=l,I.fromByteArray=h;for(var L=[],f=[],C=typeof Uint8Array!="undefined"?Uint8Array:Array,D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,m=D.length;u<m;++u)L[u]=D[u],f[D.charCodeAt(u)]=u;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63;function w(c){var v=c.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=c.indexOf("=");g===-1&&(g=v);var E=g===v?0:4-g%4;return[g,E]}function p(c){var v=w(c),g=v[0],E=v[1];return(g+E)*3/4-E}function s(c,v,g){return(v+g)*3/4-g}function l(c){var v,g=w(c),E=g[0],n=g[1],o=new C(s(c,E,n)),t=0,S=n>0?E-4:E,_;for(_=0;_<S;_+=4)v=f[c.charCodeAt(_)]<<18|f[c.charCodeAt(_+1)]<<12|f[c.charCodeAt(_+2)]<<6|f[c.charCodeAt(_+3)],o[t++]=v>>16&255,o[t++]=v>>8&255,o[t++]=v&255;return n===2&&(v=f[c.charCodeAt(_)]<<2|f[c.charCodeAt(_+1)]>>4,o[t++]=v&255),n===1&&(v=f[c.charCodeAt(_)]<<10|f[c.charCodeAt(_+1)]<<4|f[c.charCodeAt(_+2)]>>2,o[t++]=v>>8&255,o[t++]=v&255),o}function a(c){return L[c>>18&63]+L[c>>12&63]+L[c>>6&63]+L[c&63]}function d(c,v,g){for(var E,n=[],o=v;o<g;o+=3)E=(c[o]<<16&16711680)+(c[o+1]<<8&65280)+(c[o+2]&255),n.push(a(E));return n.join("")}function h(c){for(var v,g=c.length,E=g%3,n=[],o=16383,t=0,S=g-E;t<S;t+=o)n.push(d(c,t,t+o>S?S:t+o));return E===1?(v=c[g-1],n.push(L[v>>2]+L[v<<4&63]+"==")):E===2&&(v=(c[g-2]<<8)+c[g-1],n.push(L[v>>10]+L[v>>4&63]+L[v<<2&63]+"=")),n.join("")}},{}],70:[function(j,J,I){/*!
|
|
|
* Bowser - a browser detector
|
|
|
* https://github.com/ded/bowser
|
|
|
* MIT License | (c) Dustin Diaz 2015
|
|
|
*/!function(L,f,C){typeof J!="undefined"&&J.exports?J.exports=C():typeof define=="function"&&define.amd?define(f,C):L[f]=C()}(this,"bowser",function(){var L=!0;function f(s){function l(H){var U=s.match(H);return U&&U.length>1&&U[1]||""}function a(H){var U=s.match(H);return U&&U.length>1&&U[2]||""}var d=l(/(ipod|iphone|ipad)/i).toLowerCase(),h=/like android/i.test(s),c=!h&&/android/i.test(s),v=/nexus\s*[0-6]\s*/i.test(s),g=!v&&/nexus\s*[0-9]+/i.test(s),E=/CrOS/.test(s),n=/silk/i.test(s),o=/sailfish/i.test(s),t=/tizen/i.test(s),S=/(web|hpw)(o|0)s/i.test(s),_=/windows phone/i.test(s),i=/SamsungBrowser/i.test(s),P=!_&&/windows/i.test(s),O=!d&&!n&&/macintosh/i.test(s),x=!c&&!o&&!t&&!S&&/linux/i.test(s),b=a(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),y=l(/version\/(\d+(\.\d+)?)/i),T=/tablet/i.test(s)&&!/tablet pc/i.test(s),M=!T&&/[^-]mobi/i.test(s),k=/xbox/i.test(s),N;/opera/i.test(s)?N={name:"Opera",opera:L,version:y||l(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(s)?N={name:"Opera",opera:L,version:l(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||y}:/SamsungBrowser/i.test(s)?N={name:"Samsung Internet for Android",samsungBrowser:L,version:y||l(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(s)?N={name:"NAVER Whale browser",whale:L,version:l(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(s)?N={name:"MZ Browser",mzbrowser:L,version:l(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(s)?N={name:"Opera Coast",coast:L,version:y||l(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(s)?N={name:"Focus",focus:L,version:l(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(s)?N={name:"Yandex Browser",yandexbrowser:L,version:y||l(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(s)?N={name:"UC Browser",ucbrowser:L,version:l(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(s)?N={name:"Maxthon",maxthon:L,version:l(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(s)?N={name:"Epiphany",epiphany:L,version:l(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(s)?N={name:"Puffin",puffin:L,version:l(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(s)?N={name:"Sleipnir",sleipnir:L,version:l(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(s)?N={name:"K-Meleon",kMeleon:L,version:l(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:_?(N={name:"Windows Phone",osname:"Windows Phone",windowsphone:L},b?(N.msedge=L,N.version=b):(N.msie=L,N.version=l(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(s)?N={name:"Internet Explorer",msie:L,version:l(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:E?N={name:"Chrome",osname:"Chrome OS",chromeos:L,chromeBook:L,chrome:L,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(s)?N={name:"Microsoft Edge",msedge:L,version:b}:/vivaldi/i.test(s)?N={name:"Vivaldi",vivaldi:L,version:l(/vivaldi\/(\d+(\.\d+)?)/i)||y}:o?N={name:"Sailfish",osname:"Sailfish OS",sailfish:L,version:l(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(s)?N={name:"SeaMonkey",seamonkey:L,version:l(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(s)?(N={name:"Firefox",firefox:L,version:l(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(s)&&(N.firefoxos=L,N.osname="Firefox OS")):n?N={name:"Amazon Silk",silk:L,version:l(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(s)?N={name:"PhantomJS",phantom:L,version:l(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(s)?N={name:"SlimerJS",slimer:L,version:l(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(s)||/rim\stablet/i.test(s)?N={name:"BlackBerry",osname:"BlackBerry OS",blackberry:L,version:y||l(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:S?(N={name:"WebOS",osname:"WebOS",webos:L,version:y||l(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(s)&&(N.touchpad=L)):/bada/i.test(s)?N={name:"Bada",osname:"Bada",bada:L,version:l(/dolfin\/(\d+(\.\d+)?)/i)}:t?N={name:"Tizen",osname:"Tizen",tizen:L,version:l(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||y}:/qupzilla/i.test(s)?N={name:"QupZilla",qupzilla:L,version:l(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||y}:/chromium/i.test(s)?N={name:"Chromium",chromium:L,version:l(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||y}:/chrome|crios|crmo/i.test(s)?N={name:"Chrome",chrome:L,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:c?N={name:"Android",version:y}:/safari|applewebkit/i.test(s)?(N={name:"Safari",safari:L},y&&(N.version=y)):d?(N={name:d=="iphone"?"iPhone":d=="ipad"?"iPad":"iPod"},y&&(N.version=y)):/googlebot/i.test(s)?N={name:"Googlebot",googlebot:L,version:l(/googlebot\/(\d+(\.\d+))/i)||y}:N={name:l(/^(.*)\/(.*) /),version:a(/^(.*)\/(.*) /)},!N.msedge&&/(apple)?webkit/i.test(s)?(/(apple)?webkit\/537\.36/i.test(s)?(N.name=N.name||"Blink",N.blink=L):(N.name=N.name||"Webkit",N.webkit=L),!N.version&&y&&(N.version=y)):!N.opera&&/gecko\//i.test(s)&&(N.name=N.name||"Gecko",N.gecko=L,N.version=N.version||l(/gecko\/(\d+(\.\d+)?)/i)),!N.windowsphone&&(c||N.silk)?(N.android=L,N.osname="Android"):!N.windowsphone&&d?(N[d]=L,N.ios=L,N.osname="iOS"):O?(N.mac=L,N.osname="macOS"):k?(N.xbox=L,N.osname="Xbox"):P?(N.windows=L,N.osname="Windows"):x&&(N.linux=L,N.osname="Linux");function K(H){switch(H){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 z="";N.windows?z=K(l(/Windows ((NT|XP)( \d\d?.\d)?)/i)):N.windowsphone?z=l(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):N.mac?(z=l(/Mac OS X (\d+([_\.\s]\d+)*)/i),z=z.replace(/[_\s]/g,".")):d?(z=l(/os (\d+([_\s]\d+)*) like mac os x/i),z=z.replace(/[_\s]/g,".")):c?z=l(/android[ \/-](\d+(\.\d+)*)/i):N.webos?z=l(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):N.blackberry?z=l(/rim\stablet\sos\s(\d+(\.\d+)*)/i):N.bada?z=l(/bada\/(\d+(\.\d+)*)/i):N.tizen&&(z=l(/tizen[\/\s](\d+(\.\d+)*)/i)),z&&(N.osversion=z);var B=!N.windows&&z.split(".")[0];return T||g||d=="ipad"||c&&(B==3||B>=4&&!M)||N.silk?N.tablet=L:(M||d=="iphone"||d=="ipod"||c||v||N.blackberry||N.webos||N.bada)&&(N.mobile=L),N.msedge||N.msie&&N.version>=10||N.yandexbrowser&&N.version>=15||N.vivaldi&&N.version>=1||N.chrome&&N.version>=20||N.samsungBrowser&&N.version>=4||N.whale&&m([N.version,"1.0"])===1||N.mzbrowser&&m([N.version,"6.0"])===1||N.focus&&m([N.version,"1.0"])===1||N.firefox&&N.version>=20||N.safari&&N.version>=6||N.opera&&N.version>=10||N.ios&&N.osversion&&N.osversion.split(".")[0]>=6||N.blackberry&&N.version>=10.1||N.chromium&&N.version>=20?N.a=L:N.msie&&N.version<10||N.chrome&&N.version<20||N.firefox&&N.version<20||N.safari&&N.version<6||N.opera&&N.version<10||N.ios&&N.osversion&&N.osversion.split(".")[0]<6||N.chromium&&N.version<20?N.c=L:N.x=L,N}var C=f(typeof navigator!="undefined"&&navigator.userAgent||"");C.test=function(s){for(var l=0;l<s.length;++l){var a=s[l];if(typeof a=="string"&&a in C)return!0}return!1};function D(s){return s.split(".").length}function u(s,l){var a=[],d;if(Array.prototype.map)return Array.prototype.map.call(s,l);for(d=0;d<s.length;d++)a.push(l(s[d]));return a}function m(s){for(var l=Math.max(D(s[0]),D(s[1])),a=u(s,function(d){var h=l-D(d);return d=d+new Array(h+1).join(".0"),u(d.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(s,l,a){var d=C;typeof l=="string"&&(a=l,l=void 0),l===void 0&&(l=!1),a&&(d=f(a));var h=""+d.version;for(var c in s)if(s.hasOwnProperty(c)&&d[c]){if(typeof s[c]!="string")throw new Error("Browser version in the minVersion map should be a string: "+c+": "+String(s));return m([h,s[c]])<0}return l}function p(s,l,a){return!w(s,l,a)}return C.isUnsupportedBrowser=w,C.compareVersions=m,C.check=p,C._detect=f,C.detect=f,C})},{}],71:[function(j,J,I){},{}],72:[function(j,J,I){var L=j("buffer").Buffer,f=L.isEncoding||function(p){switch(p&&p.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(p){if(p&&!f(p))throw new Error("Unknown encoding: "+p)}var D=I.StringDecoder=function(p){this.encoding=(p||"utf8").toLowerCase().replace(/[-_]/,""),C(p);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=m;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(p){for(var s="";this.charLength;){var l=p.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:p.length;if(p.copy(this.charBuffer,this.charReceived,0,l),this.charReceived+=l,this.charReceived<this.charLength)return"";p=p.slice(l,p.length),s=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var d=s.charCodeAt(s.length-1);if(d>=55296&&d<=56319){this.charLength+=this.surrogateSize,s="";continue}if(this.charReceived=this.charLength=0,p.length===0)return s;break}this.detectIncompleteChar(p);var a=p.length;this.charLength&&(p.copy(this.charBuffer,0,p.length-this.charReceived,a),a-=this.charReceived),s+=p.toString(this.encoding,0,a);var a=s.length-1,d=s.charCodeAt(a);if(d>=55296&&d<=56319){var h=this.surrogateSize;return this.charLength+=h,this.charReceived+=h,this.charBuffer.copy(this.charBuffer,h,0,h),p.copy(this.charBuffer,0,0,h),s.substring(0,a)}return s},D.prototype.detectIncompleteChar=function(p){for(var s=p.length>=3?3:p.length;s>0;s--){var l=p[p.length-s];if(s==1&&l>>5==6){this.charLength=2;break}if(s<=2&&l>>4==14){this.charLength=3;break}if(s<=3&&l>>3==30){this.charLength=4;break}}this.charReceived=s},D.prototype.end=function(p){var s="";if(p&&p.length&&(s=this.write(p)),this.charReceived){var l=this.charReceived,a=this.charBuffer,d=this.encoding;s+=a.slice(0,l).toString(d)}return s};function u(p){return p.toString(this.encoding)}function m(p){this.charReceived=p.length%2,this.charLength=this.charReceived?2:0}function w(p){this.charReceived=p.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(j,J,I){(function(L,f){/*!
|
|
|
* 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");I.Buffer=f,I.SlowBuffer=n,I.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=L.TYPED_ARRAY_SUPPORT!==void 0?L.TYPED_ARRAY_SUPPORT:m(),I.kMaxLength=w();function m(){try{var re=new Uint8Array(1);return re.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},re.foo()===42&&typeof re.subarray=="function"&&re.subarray(1,1).byteLength===0}catch(Y){return!1}}function w(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function p(re,Y){if(w()<Y)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(re=new Uint8Array(Y),re.__proto__=f.prototype):(re===null&&(re=new f(Y)),re.length=Y),re}function f(re,Y,X){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(re,Y,X);if(typeof re=="number"){if(typeof Y=="string")throw new Error("If encoding is specified then the first argument must be a string");return d(this,re)}return s(this,re,Y,X)}f.poolSize=8192,f._augment=function(re){return re.__proto__=f.prototype,re};function s(re,Y,X,$){if(typeof Y=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Y instanceof ArrayBuffer?v(re,Y,X,$):typeof Y=="string"?h(re,Y,X):g(re,Y)}f.from=function(re,Y,X){return s(null,re,Y,X)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0}));function l(re){if(typeof re!="number")throw new TypeError('"size" argument must be a number');if(re<0)throw new RangeError('"size" argument must not be negative')}function a(re,Y,X,$){return l(Y),Y<=0?p(re,Y):X!==void 0?typeof $=="string"?p(re,Y).fill(X,$):p(re,Y).fill(X):p(re,Y)}f.alloc=function(re,Y,X){return a(null,re,Y,X)};function d(re,Y){if(l(Y),re=p(re,Y<0?0:E(Y)|0),!f.TYPED_ARRAY_SUPPORT)for(var X=0;X<Y;++X)re[X]=0;return re}f.allocUnsafe=function(re){return d(null,re)},f.allocUnsafeSlow=function(re){return d(null,re)};function h(re,Y,X){if((typeof X!="string"||X==="")&&(X="utf8"),!f.isEncoding(X))throw new TypeError('"encoding" must be a valid string encoding');var $=o(Y,X)|0;re=p(re,$);var ve=re.write(Y,X);return ve!==$&&(re=re.slice(0,ve)),re}function c(re,Y){var X=Y.length<0?0:E(Y.length)|0;re=p(re,X);for(var $=0;$<X;$+=1)re[$]=Y[$]&255;return re}function v(re,Y,X,$){if(Y.byteLength,X<0||Y.byteLength<X)throw new RangeError("'offset' is out of bounds");if(Y.byteLength<X+($||0))throw new RangeError("'length' is out of bounds");return X===void 0&&$===void 0?Y=new Uint8Array(Y):$===void 0?Y=new Uint8Array(Y,X):Y=new Uint8Array(Y,X,$),f.TYPED_ARRAY_SUPPORT?(re=Y,re.__proto__=f.prototype):re=c(re,Y),re}function g(re,Y){if(f.isBuffer(Y)){var X=E(Y.length)|0;return re=p(re,X),re.length===0||Y.copy(re,0,0,X),re}if(Y){if(typeof ArrayBuffer!="undefined"&&Y.buffer instanceof ArrayBuffer||"length"in Y)return typeof Y.length!="number"||be(Y.length)?p(re,0):c(re,Y);if(Y.type==="Buffer"&&u(Y.data))return c(re,Y.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function E(re){if(re>=w())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w().toString(16)+" bytes");return re|0}function n(re){return+re!=re&&(re=0),f.alloc(+re)}f.isBuffer=function(Y){return!!(Y!=null&&Y._isBuffer)},f.compare=function(Y,X){if(!f.isBuffer(Y)||!f.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(Y===X)return 0;for(var $=Y.length,ve=X.length,de=0,xe=Math.min($,ve);de<xe;++de)if(Y[de]!==X[de]){$=Y[de],ve=X[de];break}return $<ve?-1:ve<$?1:0},f.isEncoding=function(Y){switch(String(Y).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}},f.concat=function(Y,X){if(!u(Y))throw new TypeError('"list" argument must be an Array of Buffers');if(Y.length===0)return f.alloc(0);var $;if(X===void 0)for(X=0,$=0;$<Y.length;++$)X+=Y[$].length;var ve=f.allocUnsafe(X),de=0;for($=0;$<Y.length;++$){var xe=Y[$];if(!f.isBuffer(xe))throw new TypeError('"list" argument must be an Array of Buffers');xe.copy(ve,de),de+=xe.length}return ve};function o(re,Y){if(f.isBuffer(re))return re.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(re)||re instanceof ArrayBuffer))return re.byteLength;typeof re!="string"&&(re=""+re);var X=re.length;if(X===0)return 0;for(var $=!1;;)switch(Y){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":case void 0:return ae(re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return Q(re).length;default:if($)return ae(re).length;Y=(""+Y).toLowerCase(),$=!0}}f.byteLength=o;function t(re,Y,X){var $=!1;if((Y===void 0||Y<0)&&(Y=0),Y>this.length)return"";if((X===void 0||X>this.length)&&(X=this.length),X<=0)return"";if(X>>>=0,Y>>>=0,X<=Y)return"";for(re||(re="utf8");;)switch(re){case"hex":return H(this,Y,X);case"utf8":case"utf-8":return k(this,Y,X);case"ascii":return z(this,Y,X);case"latin1":case"binary":return B(this,Y,X);case"base64":return M(this,Y,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,Y,X);default:if($)throw new TypeError("Unknown encoding: "+re);re=(re+"").toLowerCase(),$=!0}}f.prototype._isBuffer=!0;function S(re,Y,X){var $=re[Y];re[Y]=re[X],re[X]=$}f.prototype.swap16=function(){var Y=this.length;if(Y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X<Y;X+=2)S(this,X,X+1);return this},f.prototype.swap32=function(){var Y=this.length;if(Y%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var X=0;X<Y;X+=4)S(this,X,X+3),S(this,X+1,X+2);return this},f.prototype.swap64=function(){var Y=this.length;if(Y%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var X=0;X<Y;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},f.prototype.toString=function(){var Y=this.length|0;return Y===0?"":arguments.length===0?k(this,0,Y):t.apply(this,arguments)},f.prototype.equals=function(Y){if(!f.isBuffer(Y))throw new TypeError("Argument must be a Buffer");return this===Y?!0:f.compare(this,Y)===0},f.prototype.inspect=function(){var Y="",X=I.INSPECT_MAX_BYTES;return this.length>0&&(Y=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(Y+=" ... ")),"<Buffer "+Y+">"},f.prototype.compare=function(Y,X,$,ve,de){if(!f.isBuffer(Y))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),$===void 0&&($=Y?Y.length:0),ve===void 0&&(ve=0),de===void 0&&(de=this.length),X<0||$>Y.length||ve<0||de>this.length)throw new RangeError("out of range index");if(ve>=de&&X>=$)return 0;if(ve>=de)return-1;if(X>=$)return 1;if(X>>>=0,$>>>=0,ve>>>=0,de>>>=0,this===Y)return 0;for(var xe=de-ve,Ke=$-X,Ve=Math.min(xe,Ke),Xe=this.slice(ve,de),at=Y.slice(X,$),it=0;it<Ve;++it)if(Xe[it]!==at[it]){xe=Xe[it],Ke=at[it];break}return xe<Ke?-1:Ke<xe?1:0};function _(re,Y,X,$,ve){if(re.length===0)return-1;if(typeof X=="string"?($=X,X=0):X>2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=ve?0:re.length-1),X<0&&(X=re.length+X),X>=re.length){if(ve)return-1;X=re.length-1}else if(X<0)if(ve)X=0;else return-1;if(typeof Y=="string"&&(Y=f.from(Y,$)),f.isBuffer(Y))return Y.length===0?-1:i(re,Y,X,$,ve);if(typeof Y=="number")return Y=Y&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?ve?Uint8Array.prototype.indexOf.call(re,Y,X):Uint8Array.prototype.lastIndexOf.call(re,Y,X):i(re,[Y],X,$,ve);throw new TypeError("val must be string, number or Buffer")}function i(re,Y,X,$,ve){var de=1,xe=re.length,Ke=Y.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(re.length<2||Y.length<2)return-1;de=2,xe/=2,Ke/=2,X/=2}function Ve(Me,Te){return de===1?Me[Te]:Me.readUInt16BE(Te*de)}var Xe;if(ve){var at=-1;for(Xe=X;Xe<xe;Xe++)if(Ve(re,Xe)===Ve(Y,at===-1?0:Xe-at)){if(at===-1&&(at=Xe),Xe-at+1===Ke)return at*de}else at!==-1&&(Xe-=Xe-at),at=-1}else for(X+Ke>xe&&(X=xe-Ke),Xe=X;Xe>=0;Xe--){for(var it=!0,lt=0;lt<Ke;lt++)if(Ve(re,Xe+lt)!==Ve(Y,lt)){it=!1;break}if(it)return Xe}return-1}f.prototype.includes=function(Y,X,$){return this.indexOf(Y,X,$)!==-1},f.prototype.indexOf=function(Y,X,$){return _(this,Y,X,$,!0)},f.prototype.lastIndexOf=function(Y,X,$){return _(this,Y,X,$,!1)};function P(re,Y,X,$){X=Number(X)||0;var ve=re.length-X;$?($=Number($),$>ve&&($=ve)):$=ve;var de=Y.length;if(de%2!==0)throw new TypeError("Invalid hex string");$>de/2&&($=de/2);for(var xe=0;xe<$;++xe){var Ke=parseInt(Y.substr(xe*2,2),16);if(isNaN(Ke))return xe;re[X+xe]=Ke}return xe}function O(re,Y,X,$){return Z(ae(Y,re.length-X),re,X,$)}function x(re,Y,X,$){return Z(q(Y),re,X,$)}function b(re,Y,X,$){return x(re,Y,X,$)}function y(re,Y,X,$){return Z(Q(Y),re,X,$)}function T(re,Y,X,$){return Z(se(Y,re.length-X),re,X,$)}f.prototype.write=function(Y,X,$,ve){if(X===void 0)ve="utf8",$=this.length,X=0;else if($===void 0&&typeof X=="string")ve=X,$=this.length,X=0;else if(isFinite(X))X=X|0,isFinite($)?($=$|0,ve===void 0&&(ve="utf8")):(ve=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var de=this.length-X;if(($===void 0||$>de)&&($=de),Y.length>0&&($<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");ve||(ve="utf8");for(var xe=!1;;)switch(ve){case"hex":return P(this,Y,X,$);case"utf8":case"utf-8":return O(this,Y,X,$);case"ascii":return x(this,Y,X,$);case"latin1":case"binary":return b(this,Y,X,$);case"base64":return y(this,Y,X,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,Y,X,$);default:if(xe)throw new TypeError("Unknown encoding: "+ve);ve=(""+ve).toLowerCase(),xe=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(re,Y,X){return Y===0&&X===re.length?C.fromByteArray(re):C.fromByteArray(re.slice(Y,X))}function k(re,Y,X){X=Math.min(re.length,X);for(var $=[],ve=Y;ve<X;){var de=re[ve],xe=null,Ke=de>239?4:de>223?3:de>191?2:1;if(ve+Ke<=X){var Ve,Xe,at,it;switch(Ke){case 1:de<128&&(xe=de);break;case 2:Ve=re[ve+1],(Ve&192)===128&&(it=(de&31)<<6|Ve&63,it>127&&(xe=it));break;case 3:Ve=re[ve+1],Xe=re[ve+2],(Ve&192)===128&&(Xe&192)===128&&(it=(de&15)<<12|(Ve&63)<<6|Xe&63,it>2047&&(it<55296||it>57343)&&(xe=it));break;case 4:Ve=re[ve+1],Xe=re[ve+2],at=re[ve+3],(Ve&192)===128&&(Xe&192)===128&&(at&192)===128&&(it=(de&15)<<18|(Ve&63)<<12|(Xe&63)<<6|at&63,it>65535&&it<1114112&&(xe=it))}}xe===null?(xe=65533,Ke=1):xe>65535&&(xe-=65536,$.push(xe>>>10&1023|55296),xe=56320|xe&1023),$.push(xe),ve+=Ke}return K($)}var N=4096;function K(re){var Y=re.length;if(Y<=N)return String.fromCharCode.apply(String,re);for(var X="",$=0;$<Y;)X+=String.fromCharCode.apply(String,re.slice($,$+=N));return X}function z(re,Y,X){var $="";X=Math.min(re.length,X);for(var ve=Y;ve<X;++ve)$+=String.fromCharCode(re[ve]&127);return $}function B(re,Y,X){var $="";X=Math.min(re.length,X);for(var ve=Y;ve<X;++ve)$+=String.fromCharCode(re[ve]);return $}function H(re,Y,X){var $=re.length;(!Y||Y<0)&&(Y=0),(!X||X<0||X>$)&&(X=$);for(var ve="",de=Y;de<X;++de)ve+=ne(re[de]);return ve}function U(re,Y,X){for(var $=re.slice(Y,X),ve="",de=0;de<$.length;de+=2)ve+=String.fromCharCode($[de]+$[de+1]*256);return ve}f.prototype.slice=function(Y,X){var $=this.length;Y=~~Y,X=X===void 0?$:~~X,Y<0?(Y+=$,Y<0&&(Y=0)):Y>$&&(Y=$),X<0?(X+=$,X<0&&(X=0)):X>$&&(X=$),X<Y&&(X=Y);var ve;if(f.TYPED_ARRAY_SUPPORT)ve=this.subarray(Y,X),ve.__proto__=f.prototype;else{var de=X-Y;ve=new f(de,void 0);for(var xe=0;xe<de;++xe)ve[xe]=this[xe+Y]}return ve};function W(re,Y,X){if(re%1!==0||re<0)throw new RangeError("offset is not uint");if(re+Y>X)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUIntLE=function(Y,X,$){Y=Y|0,X=X|0,$||W(Y,X,this.length);for(var ve=this[Y],de=1,xe=0;++xe<X&&(de*=256);)ve+=this[Y+xe]*de;return ve},f.prototype.readUIntBE=function(Y,X,$){Y=Y|0,X=X|0,$||W(Y,X,this.length);for(var ve=this[Y+--X],de=1;X>0&&(de*=256);)ve+=this[Y+--X]*de;return ve},f.prototype.readUInt8=function(Y,X){return X||W(Y,1,this.length),this[Y]},f.prototype.readUInt16LE=function(Y,X){return X||W(Y,2,this.length),this[Y]|this[Y+1]<<8},f.prototype.readUInt16BE=function(Y,X){return X||W(Y,2,this.length),this[Y]<<8|this[Y+1]},f.prototype.readUInt32LE=function(Y,X){return X||W(Y,4,this.length),(this[Y]|this[Y+1]<<8|this[Y+2]<<16)+this[Y+3]*16777216},f.prototype.readUInt32BE=function(Y,X){return X||W(Y,4,this.length),this[Y]*16777216+(this[Y+1]<<16|this[Y+2]<<8|this[Y+3])},f.prototype.readIntLE=function(Y,X,$){Y=Y|0,X=X|0,$||W(Y,X,this.length);for(var ve=this[Y],de=1,xe=0;++xe<X&&(de*=256);)ve+=this[Y+xe]*de;return de*=128,ve>=de&&(ve-=Math.pow(2,8*X)),ve},f.prototype.readIntBE=function(Y,X,$){Y=Y|0,X=X|0,$||W(Y,X,this.length);for(var ve=X,de=1,xe=this[Y+--ve];ve>0&&(de*=256);)xe+=this[Y+--ve]*de;return de*=128,xe>=de&&(xe-=Math.pow(2,8*X)),xe},f.prototype.readInt8=function(Y,X){return X||W(Y,1,this.length),this[Y]&128?(255-this[Y]+1)*-1:this[Y]},f.prototype.readInt16LE=function(Y,X){X||W(Y,2,this.length);var $=this[Y]|this[Y+1]<<8;return $&32768?$|4294901760:$},f.prototype.readInt16BE=function(Y,X){X||W(Y,2,this.length);var $=this[Y+1]|this[Y]<<8;return $&32768?$|4294901760:$},f.prototype.readInt32LE=function(Y,X){return X||W(Y,4,this.length),this[Y]|this[Y+1]<<8|this[Y+2]<<16|this[Y+3]<<24},f.prototype.readInt32BE=function(Y,X){return X||W(Y,4,this.length),this[Y]<<24|this[Y+1]<<16|this[Y+2]<<8|this[Y+3]},f.prototype.readFloatLE=function(Y,X){return X||W(Y,4,this.length),D.read(this,Y,!0,23,4)},f.prototype.readFloatBE=function(Y,X){return X||W(Y,4,this.length),D.read(this,Y,!1,23,4)},f.prototype.readDoubleLE=function(Y,X){return X||W(Y,8,this.length),D.read(this,Y,!0,52,8)},f.prototype.readDoubleBE=function(Y,X){return X||W(Y,8,this.length),D.read(this,Y,!1,52,8)};function G(re,Y,X,$,ve,de){if(!f.isBuffer(re))throw new TypeError('"buffer" argument must be a Buffer instance');if(Y>ve||Y<de)throw new RangeError('"value" argument is out of bounds');if(X+$>re.length)throw new RangeError("Index out of range")}f.prototype.writeUIntLE=function(Y,X,$,ve){if(Y=+Y,X=X|0,$=$|0,!ve){var de=Math.pow(2,8*$)-1;G(this,Y,X,$,de,0)}var xe=1,Ke=0;for(this[X]=Y&255;++Ke<$&&(xe*=256);)this[X+Ke]=Y/xe&255;return X+$},f.prototype.writeUIntBE=function(Y,X,$,ve){if(Y=+Y,X=X|0,$=$|0,!ve){var de=Math.pow(2,8*$)-1;G(this,Y,X,$,de,0)}var xe=$-1,Ke=1;for(this[X+xe]=Y&255;--xe>=0&&(Ke*=256);)this[X+xe]=Y/Ke&255;return X+$},f.prototype.writeUInt8=function(Y,X,$){return Y=+Y,X=X|0,$||G(this,Y,X,1,255,0),f.TYPED_ARRAY_SUPPORT||(Y=Math.floor(Y)),this[X]=Y&255,X+1};function ee(re,Y,X,$){Y<0&&(Y=65535+Y+1);for(var ve=0,de=Math.min(re.length-X,2);ve<de;++ve)re[X+ve]=(Y&255<<8*($?ve:1-ve))>>>($?ve:1-ve)*8}f.prototype.writeUInt16LE=function(Y,X,$){return Y=+Y,X=X|0,$||G(this,Y,X,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[X]=Y&255,this[X+1]=Y>>>8):ee(this,Y,X,!0),X+2},f.prototype.writeUInt16BE=function(Y,X,$){return Y=+Y,X=X|0,$||G(this,Y,X,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[X]=Y>>>8,this[X+1]=Y&255):ee(this,Y,X,!1),X+2};function ie(re,Y,X,$){Y<0&&(Y=4294967295+Y+1);for(var ve=0,de=Math.min(re.length-X,4);ve<de;++ve)re[X+ve]=Y>>>($?ve:3-ve)*8&255}f.prototype.writeUInt32LE=function(Y,X,$){return Y=+Y,X=X|0,$||G(this,Y,X,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[X+3]=Y>>>24,this[X+2]=Y>>>16,this[X+1]=Y>>>8,this[X]=Y&255):ie(this,Y,X,!0),X+4},f.prototype.writeUInt32BE=function(Y,X,$){return Y=+Y,X=X|0,$||G(this,Y,X,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[X]=Y>>>24,this[X+1]=Y>>>16,this[X+2]=Y>>>8,this[X+3]=Y&255):ie(this,Y,X,!1),X+4},f.prototype.writeIntLE=function(Y,X,$,ve){if(Y=+Y,X=X|0,!ve){var de=Math.pow(2,8*$-1);G(this,Y,X,$,de-1,-de)}var xe=0,Ke=1,Ve=0;for(this[X]=Y&255;++xe<$&&(Ke*=256);)Y<0&&Ve===0&&this[X+xe-1]!==0&&(Ve=1),this[X+xe]=(Y/Ke>>0)-Ve&255;return X+$},f.prototype.writeIntBE=function(Y,X,$,ve){if(Y=+Y,X=X|0,!ve){var de=Math.pow(2,8*$-1);G(this,Y,X,$,de-1,-de)}var xe=$-1,Ke=1,Ve=0;for(this[X+xe]=Y&255;--xe>=0&&(Ke*=256);)Y<0&&Ve===0&&this[X+xe+1]!==0&&(Ve=1),this[X+xe]=(Y/Ke>>0)-Ve&255;return X+$},f.prototype.writeInt8=function(Y,X,$){return Y=+Y,X=X|0,$||G(this,Y,X,1,127,-128),f.TYPED_ARRAY_SUPPORT||(Y=Math.floor(Y)),Y<0&&(Y=255+Y+1),this[X]=Y&255,X+1},f.prototype.writeInt16LE=function(Y,X,$){return Y=+Y,X=X|0,$||G(this,Y,X,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[X]=Y&255,this[X+1]=Y>>>8):ee(this,Y,X,!0),X+2},f.prototype.writeInt16BE=function(Y,X,$){return Y=+Y,X=X|0,$||G(this,Y,X,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[X]=Y>>>8,this[X+1]=Y&255):ee(this,Y,X,!1),X+2},f.prototype.writeInt32LE=function(Y,X,$){return Y=+Y,X=X|0,$||G(this,Y,X,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[X]=Y&255,this[X+1]=Y>>>8,this[X+2]=Y>>>16,this[X+3]=Y>>>24):ie(this,Y,X,!0),X+4},f.prototype.writeInt32BE=function(Y,X,$){return Y=+Y,X=X|0,$||G(this,Y,X,4,2147483647,-2147483648),Y<0&&(Y=4294967295+Y+1),f.TYPED_ARRAY_SUPPORT?(this[X]=Y>>>24,this[X+1]=Y>>>16,this[X+2]=Y>>>8,this[X+3]=Y&255):ie(this,Y,X,!1),X+4};function ce(re,Y,X,$,ve,de){if(X+$>re.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function _e(re,Y,X,$,ve){return ve||ce(re,Y,X,4,34028234663852886e22,-34028234663852886e22),D.write(re,Y,X,$,23,4),X+4}f.prototype.writeFloatLE=function(Y,X,$){return _e(this,Y,X,!0,$)},f.prototype.writeFloatBE=function(Y,X,$){return _e(this,Y,X,!1,$)};function Ce(re,Y,X,$,ve){return ve||ce(re,Y,X,8,17976931348623157e292,-17976931348623157e292),D.write(re,Y,X,$,52,8),X+8}f.prototype.writeDoubleLE=function(Y,X,$){return Ce(this,Y,X,!0,$)},f.prototype.writeDoubleBE=function(Y,X,$){return Ce(this,Y,X,!1,$)},f.prototype.copy=function(Y,X,$,ve){if($||($=0),!ve&&ve!==0&&(ve=this.length),X>=Y.length&&(X=Y.length),X||(X=0),ve>0&&ve<$&&(ve=$),ve===$)return 0;if(Y.length===0||this.length===0)return 0;if(X<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("sourceStart out of bounds");if(ve<0)throw new RangeError("sourceEnd out of bounds");ve>this.length&&(ve=this.length),Y.length-X<ve-$&&(ve=Y.length-X+$);var de=ve-$,xe;if(this===Y&&$<X&&X<ve)for(xe=de-1;xe>=0;--xe)Y[xe+X]=this[xe+$];else if(de<1e3||!f.TYPED_ARRAY_SUPPORT)for(xe=0;xe<de;++xe)Y[xe+X]=this[xe+$];else Uint8Array.prototype.set.call(Y,this.subarray($,$+de),X);return de},f.prototype.fill=function(Y,X,$,ve){if(typeof Y=="string"){if(typeof X=="string"?(ve=X,X=0,$=this.length):typeof $=="string"&&(ve=$,$=this.length),Y.length===1){var de=Y.charCodeAt(0);de<256&&(Y=de)}if(ve!==void 0&&typeof ve!="string")throw new TypeError("encoding must be a string");if(typeof ve=="string"&&!f.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve)}else typeof Y=="number"&&(Y=Y&255);if(X<0||this.length<X||this.length<$)throw new RangeError("Out of range index");if($<=X)return this;X=X>>>0,$=$===void 0?this.length:$>>>0,Y||(Y=0);var xe;if(typeof Y=="number")for(xe=X;xe<$;++xe)this[xe]=Y;else{var Ke=f.isBuffer(Y)?Y:ae(new f(Y,ve).toString()),Ve=Ke.length;for(xe=0;xe<$-X;++xe)this[xe+X]=Ke[xe%Ve]}return this};var le=/[^+\/0-9A-Za-z-_]/g;function ye(re){if(re=fe(re).replace(le,""),re.length<2)return"";for(;re.length%4!==0;)re=re+"=";return re}function fe(re){return re.trim?re.trim():re.replace(/^\s+|\s+$/g,"")}function ne(re){return re<16?"0"+re.toString(16):re.toString(16)}function ae(re,Y){Y=Y||Infinity;for(var X,$=re.length,ve=null,de=[],xe=0;xe<$;++xe){if(X=re.charCodeAt(xe),X>55295&&X<57344){if(!ve){if(X>56319){(Y-=3)>-1&&de.push(239,191,189);continue}else if(xe+1===$){(Y-=3)>-1&&de.push(239,191,189);continue}ve=X;continue}if(X<56320){(Y-=3)>-1&&de.push(239,191,189),ve=X;continue}X=(ve-55296<<10|X-56320)+65536}else ve&&((Y-=3)>-1&&de.push(239,191,189));if(ve=null,X<128){if((Y-=1)<0)break;de.push(X)}else if(X<2048){if((Y-=2)<0)break;de.push(X>>6|192,X&63|128)}else if(X<65536){if((Y-=3)<0)break;de.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((Y-=4)<0)break;de.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return de}function q(re){for(var Y=[],X=0;X<re.length;++X)Y.push(re.charCodeAt(X)&255);return Y}function se(re,Y){for(var X,$,ve,de=[],xe=0;xe<re.length&&!((Y-=2)<0);++xe)X=re.charCodeAt(xe),$=X>>8,ve=X%256,de.push(ve),de.push($);return de}function Q(re){return C.toByteArray(ye(re))}function Z(re,Y,X,$){for(var ve=0;ve<$&&!(ve+X>=Y.length||ve>=re.length);++ve)Y[ve+X]=re[ve];return ve}function be(re){return re!==re}}).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,J,I){J.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,J,I){J.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,J,I){/*!
|
|
|
* copy-to - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var L=Array.prototype.slice;J.exports=f;function f(D,u){if(!(this instanceof f))return new f(D,u);this.src=D,this._withAccess=u}f.prototype.withAccess=function(D){return this._withAccess=D!==!1,this},f.prototype.pick=function(D){return Array.isArray(D)||(D=L.call(arguments)),D.length&&(this.keys=D),this},f.prototype.to=function(D){if(D=D||{},!this.src)return D;var u=this.keys||Object.keys(this.src);if(!this._withAccess){for(var m=0;m<u.length;m++){if(w=u[m],D[w]!==void 0)continue;D[w]=this.src[w]}return D}for(var m=0;m<u.length;m++){var w=u[m];if(!C(D,w))continue;var p=this.src.__lookupGetter__(w),s=this.src.__lookupSetter__(w);p&&D.__defineGetter__(w,p),s&&D.__defineSetter__(w,s),!p&&!s&&(D[w]=this.src[w])}return D},f.prototype.toCover=function(D){for(var u=this.keys||Object.keys(this.src),m=0;m<u.length;m++){var w=u[m];delete D[w];var p=this.src.__lookupGetter__(w),s=this.src.__lookupSetter__(w);p&&D.__defineGetter__(w,p),s&&D.__defineSetter__(w,s),!p&&!s&&(D[w]=this.src[w])}},f.prototype.override=f.prototype.toCover,f.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,J,I){j("../../modules/es6.string.iterator"),j("../../modules/es6.array.from"),J.exports=j("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(j,J,I){var L=j("../../modules/_core"),f=L.JSON||(L.JSON={stringify:JSON.stringify});J.exports=function(D){return f.stringify.apply(f,arguments)}},{"../../modules/_core":99}],79:[function(j,J,I){j("../../modules/es6.object.assign"),J.exports=j("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(j,J,I){j("../../modules/es6.object.create");var L=j("../../modules/_core").Object;J.exports=function(C,D){return L.create(C,D)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(j,J,I){j("../../modules/es6.object.define-property");var L=j("../../modules/_core").Object;J.exports=function(C,D,u){return L.defineProperty(C,D,u)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(j,J,I){j("../../modules/es7.object.entries"),J.exports=j("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(j,J,I){j("../../modules/es6.object.get-own-property-names");var L=j("../../modules/_core").Object;J.exports=function(C){return L.getOwnPropertyNames(C)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(j,J,I){j("../../modules/es6.object.get-prototype-of"),J.exports=j("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(j,J,I){j("../../modules/es6.object.keys"),J.exports=j("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(j,J,I){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"),J.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,J,I){j("../modules/web.immediate"),J.exports=j("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(j,J,I){j("../../modules/es6.string.from-code-point"),J.exports=j("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(j,J,I){j("../../modules/es6.function.has-instance"),J.exports=j("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(j,J,I){j("../../modules/es6.symbol"),j("../../modules/es6.object.to-string"),j("../../modules/es7.symbol.async-iterator"),j("../../modules/es7.symbol.observable"),J.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,J,I){j("../../modules/es6.string.iterator"),j("../../modules/web.dom.iterable"),J.exports=j("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(j,J,I){J.exports=function(L){if(typeof L!="function")throw TypeError(L+" is not a function!");return L}},{}],93:[function(j,J,I){J.exports=function(){}},{}],94:[function(j,J,I){J.exports=function(L,f,C,D){if(!(L instanceof f)||D!==void 0&&D in L)throw TypeError(C+": incorrect invocation!");return L}},{}],95:[function(j,J,I){var L=j("./_is-object");J.exports=function(f){if(!L(f))throw TypeError(f+" is not an object!");return f}},{"./_is-object":119}],96:[function(j,J,I){var L=j("./_to-iobject"),f=j("./_to-length"),C=j("./_to-absolute-index");J.exports=function(D){return function(u,m,w){var p=L(u),s=f(p.length),l=C(w,s),a;if(D&&m!=m){for(;s>l;)if(a=p[l++],a!=a)return!0}else for(;s>l;l++)if((D||l in p)&&p[l]===m)return D||l||0;return!D&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(j,J,I){var L=j("./_cof"),f=j("./_wks")("toStringTag"),C=L(function(){return arguments}())=="Arguments",D=function(u,m){try{return u[m]}catch(w){}};J.exports=function(u){var m,w,p;return u===void 0?"Undefined":u===null?"Null":typeof(w=D(m=Object(u),f))=="string"?w:C?L(m):(p=L(m))=="Object"&&typeof m.callee=="function"?"Arguments":p}},{"./_cof":98,"./_wks":166}],98:[function(j,J,I){var L={}.toString;J.exports=function(f){return L.call(f).slice(8,-1)}},{}],99:[function(j,J,I){var L=J.exports={version:"2.6.11"};typeof __e=="number"&&(__e=L)},{}],100:[function(j,J,I){"use strict";var L=j("./_object-dp"),f=j("./_property-desc");J.exports=function(C,D,u){D in C?L.f(C,D,f(0,u)):C[D]=u}},{"./_object-dp":132,"./_property-desc":146}],101:[function(j,J,I){var L=j("./_a-function");J.exports=function(f,C,D){if(L(f),C===void 0)return f;switch(D){case 1:return function(u){return f.call(C,u)};case 2:return function(u,m){return f.call(C,u,m)};case 3:return function(u,m,w){return f.call(C,u,m,w)}}return function(){return f.apply(C,arguments)}}},{"./_a-function":92}],102:[function(j,J,I){J.exports=function(L){if(L==null)throw TypeError("Can't call method on "+L);return L}},{}],103:[function(j,J,I){J.exports=!j("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(j,J,I){var L=j("./_is-object"),f=j("./_global").document,C=L(f)&&L(f.createElement);J.exports=function(D){return C?f.createElement(D):{}}},{"./_global":110,"./_is-object":119}],105:[function(j,J,I){J.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(j,J,I){var L=j("./_object-keys"),f=j("./_object-gops"),C=j("./_object-pie");J.exports=function(D){var u=L(D),m=f.f;if(m)for(var w=m(D),p=C.f,s=0,l;w.length>s;)p.call(D,l=w[s++])&&u.push(l);return u}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(j,J,I){var L=j("./_global"),f=j("./_core"),C=j("./_ctx"),D=j("./_hide"),u=j("./_has"),m="prototype",w=function(p,s,l){var a=p&w.F,d=p&w.G,h=p&w.S,c=p&w.P,v=p&w.B,g=p&w.W,E=d?f:f[s]||(f[s]={}),n=E[m],o=d?L:h?L[s]:(L[s]||{})[m],t,S,_;d&&(l=s);for(t in l){if(S=!a&&o&&o[t]!==void 0,S&&u(E,t))continue;_=S?o[t]:l[t],E[t]=d&&typeof o[t]!="function"?l[t]:v&&S?C(_,L):g&&o[t]==_?function(i){var P=function(O,x,b){if(this instanceof i){switch(arguments.length){case 0:return new i;case 1:return new i(O);case 2:return new i(O,x)}return new i(O,x,b)}return i.apply(this,arguments)};return P[m]=i[m],P}(_):c&&typeof _=="function"?C(Function.call,_):_,c&&((E.virtual||(E.virtual={}))[t]=_,p&w.R&&n&&!n[t]&&D(n,t,_))}};w.F=1,w.G=2,w.S=4,w.P=8,w.B=16,w.W=32,w.U=64,w.R=128,J.exports=w},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(j,J,I){J.exports=function(L){try{return!!L()}catch(f){return!0}}},{}],109:[function(j,J,I){var L=j("./_ctx"),f=j("./_iter-call"),C=j("./_is-array-iter"),D=j("./_an-object"),u=j("./_to-length"),m=j("./core.get-iterator-method"),w={},p={},I=J.exports=function(s,l,a,d,h){var c=h?function(){return s}:m(s),v=L(a,d,l?2:1),g=0,E,n,o,t;if(typeof c!="function")throw TypeError(s+" is not iterable!");if(C(c)){for(E=u(s.length);E>g;g++)if(t=l?v(D(n=s[g])[0],n[1]):v(s[g]),t===w||t===p)return t}else for(o=c.call(s);!(n=o.next()).done;)if(t=f(o,v,n.value,l),t===w||t===p)return t};I.BREAK=w,I.RETURN=p},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(j,J,I){var L=J.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,J,I){var L={}.hasOwnProperty;J.exports=function(f,C){return L.call(f,C)}},{}],112:[function(j,J,I){var L=j("./_object-dp"),f=j("./_property-desc");J.exports=j("./_descriptors")?function(C,D,u){return L.f(C,D,f(1,u))}:function(C,D,u){return C[D]=u,C}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(j,J,I){var L=j("./_global").document;J.exports=L&&L.documentElement},{"./_global":110}],114:[function(j,J,I){J.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,J,I){J.exports=function(L,f,C){var D=C===void 0;switch(f.length){case 0:return D?L():L.call(C);case 1:return D?L(f[0]):L.call(C,f[0]);case 2:return D?L(f[0],f[1]):L.call(C,f[0],f[1]);case 3:return D?L(f[0],f[1],f[2]):L.call(C,f[0],f[1],f[2]);case 4:return D?L(f[0],f[1],f[2],f[3]):L.call(C,f[0],f[1],f[2],f[3])}return L.apply(C,f)}},{}],116:[function(j,J,I){var L=j("./_cof");J.exports=Object("z").propertyIsEnumerable(0)?Object:function(f){return L(f)=="String"?f.split(""):Object(f)}},{"./_cof":98}],117:[function(j,J,I){var L=j("./_iterators"),f=j("./_wks")("iterator"),C=Array.prototype;J.exports=function(D){return D!==void 0&&(L.Array===D||C[f]===D)}},{"./_iterators":125,"./_wks":166}],118:[function(j,J,I){var L=j("./_cof");J.exports=Array.isArray||function(C){return L(C)=="Array"}},{"./_cof":98}],119:[function(j,J,I){J.exports=function(L){return typeof L=="object"?L!==null:typeof L=="function"}},{}],120:[function(j,J,I){var L=j("./_an-object");J.exports=function(f,C,D,u){try{return u?C(L(D)[0],D[1]):C(D)}catch(w){var m=f.return;throw m!==void 0&&L(m.call(f)),w}}},{"./_an-object":95}],121:[function(j,J,I){"use strict";var L=j("./_object-create"),f=j("./_property-desc"),C=j("./_set-to-string-tag"),D={};j("./_hide")(D,j("./_wks")("iterator"),function(){return this}),J.exports=function(u,m,w){u.prototype=L(D,{next:f(1,w)}),C(u,m+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(j,J,I){"use strict";var L=j("./_library"),f=j("./_export"),C=j("./_redefine"),D=j("./_hide"),u=j("./_iterators"),m=j("./_iter-create"),w=j("./_set-to-string-tag"),p=j("./_object-gpo"),s=j("./_wks")("iterator"),l=!([].keys&&"next"in[].keys()),a="@@iterator",d="keys",h="values",c=function(){return this};J.exports=function(v,g,E,n,o,t,S){m(E,g,n);var _=function(z){if(!l&&z in x)return x[z];switch(z){case d:return function(){return new E(this,z)};case h:return function(){return new E(this,z)}}return function(){return new E(this,z)}},i=g+" Iterator",P=o==h,O=!1,x=v.prototype,b=x[s]||x[a]||o&&x[o],y=b||_(o),T=o?P?_("entries"):y:void 0,M=g=="Array"&&x.entries||b,k,N,K;if(M&&(K=p(M.call(new v)),K!==Object.prototype&&K.next&&(w(K,i,!0),!L&&typeof K[s]!="function"&&D(K,s,c))),P&&b&&b.name!==h&&(O=!0,y=function(){return b.call(this)}),(!L||S)&&(l||O||!x[s])&&D(x,s,y),u[g]=y,u[i]=c,o)if(k={values:P?y:_(h),keys:t?y:_(d),entries:T},S)for(N in k)N in x||C(x,N,k[N]);else f(f.P+f.F*(l||O),g,k);return k}},{"./_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,J,I){var L=j("./_wks")("iterator"),f=!1;try{var C=[7][L]();C.return=function(){f=!0},Array.from(C,function(){throw 2})}catch(D){}J.exports=function(D,u){if(!u&&!f)return!1;var m=!1;try{var w=[7],p=w[L]();p.next=function(){return{done:m=!0}},w[L]=function(){return p},D(w)}catch(s){}return m}},{"./_wks":166}],124:[function(j,J,I){J.exports=function(L,f){return{value:f,done:!!L}}},{}],125:[function(j,J,I){J.exports={}},{}],126:[function(j,J,I){J.exports=!0},{}],127:[function(j,J,I){var L=j("./_uid")("meta"),f=j("./_is-object"),C=j("./_has"),D=j("./_object-dp").f,u=0,m=Object.isExtensible||function(){return!0},w=!j("./_fails")(function(){return m(Object.preventExtensions({}))}),p=function(h){D(h,L,{value:{i:"O"+ ++u,w:{}}})},s=function(h,c){if(!f(h))return typeof h=="symbol"?h:(typeof h=="string"?"S":"P")+h;if(!C(h,L)){if(!m(h))return"F";if(!c)return"E";p(h)}return h[L].i},l=function(h,c){if(!C(h,L)){if(!m(h))return!0;if(!c)return!1;p(h)}return h[L].w},a=function(h){return w&&d.NEED&&m(h)&&!C(h,L)&&p(h),h},d=J.exports={KEY:L,NEED:!1,fastKey:s,getWeak:l,onFreeze:a}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(j,J,I){var L=j("./_global"),f=j("./_task").set,C=L.MutationObserver||L.WebKitMutationObserver,D=L.process,u=L.Promise,m=j("./_cof")(D)=="process";J.exports=function(){var w,p,s,l=function(){var c,v;for(m&&(c=D.domain)&&c.exit();w;){v=w.fn,w=w.next;try{v()}catch(g){throw w?s():p=void 0,g}}p=void 0,c&&c.enter()};if(m)s=function(){D.nextTick(l)};else if(C&&!(L.navigator&&L.navigator.standalone)){var a=!0,d=document.createTextNode("");new C(l).observe(d,{characterData:!0}),s=function(){d.data=a=!a}}else if(u&&u.resolve){var h=u.resolve(void 0);s=function(){h.then(l)}}else s=function(){f.call(L,l)};return function(c){var v={fn:c,next:void 0};p&&(p.next=v),w||(w=v,s()),p=v}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(j,J,I){"use strict";var L=j("./_a-function");function f(C){var D,u;this.promise=new C(function(m,w){if(D!==void 0||u!==void 0)throw TypeError("Bad Promise constructor");D=m,u=w}),this.resolve=L(D),this.reject=L(u)}J.exports.f=function(C){return new f(C)}},{"./_a-function":92}],130:[function(j,J,I){"use strict";var L=j("./_descriptors"),f=j("./_object-keys"),C=j("./_object-gops"),D=j("./_object-pie"),u=j("./_to-object"),m=j("./_iobject"),w=Object.assign;J.exports=!w||j("./_fails")(function(){var p={},s={},l=Symbol(),a="abcdefghijklmnopqrst";return p[l]=7,a.split("").forEach(function(d){s[d]=d}),w({},p)[l]!=7||Object.keys(w({},s)).join("")!=a})?function(s,l){for(var a=u(s),d=arguments.length,h=1,c=C.f,v=D.f;d>h;)for(var g=m(arguments[h++]),E=c?f(g).concat(c(g)):f(g),n=E.length,o=0,t;n>o;)t=E[o++],(!L||v.call(g,t))&&(a[t]=g[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,J,I){var L=j("./_an-object"),f=j("./_object-dps"),C=j("./_enum-bug-keys"),D=j("./_shared-key")("IE_PROTO"),u=function(){},m="prototype",w=function(){var p=j("./_dom-create")("iframe"),s=C.length,l="<",a=">",d;for(p.style.display="none",j("./_html").appendChild(p),p.src="javascript:",d=p.contentWindow.document,d.open(),d.write(l+"script"+a+"document.F=Object"+l+"/script"+a),d.close(),w=d.F;s--;)delete w[m][C[s]];return w()};J.exports=Object.create||function(s,l){var a;return s!==null?(u[m]=L(s),a=new u,u[m]=null,a[D]=s):a=w(),l===void 0?a:f(a,l)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(j,J,I){var L=j("./_an-object"),f=j("./_ie8-dom-define"),C=j("./_to-primitive"),D=Object.defineProperty;I.f=j("./_descriptors")?Object.defineProperty:function(m,w,p){if(L(m),w=C(w,!0),L(p),f)try{return D(m,w,p)}catch(s){}if("get"in p||"set"in p)throw TypeError("Accessors not supported!");return"value"in p&&(m[w]=p.value),m}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(j,J,I){var L=j("./_object-dp"),f=j("./_an-object"),C=j("./_object-keys");J.exports=j("./_descriptors")?Object.defineProperties:function(u,m){f(u);for(var w=C(m),p=w.length,s=0,l;p>s;)L.f(u,l=w[s++],m[l]);return u}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(j,J,I){var L=j("./_object-pie"),f=j("./_property-desc"),C=j("./_to-iobject"),D=j("./_to-primitive"),u=j("./_has"),m=j("./_ie8-dom-define"),w=Object.getOwnPropertyDescriptor;I.f=j("./_descriptors")?w:function(s,l){if(s=C(s),l=D(l,!0),m)try{return w(s,l)}catch(a){}if(u(s,l))return f(!L.f.call(s,l),s[l])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(j,J,I){var L=j("./_to-iobject"),f=j("./_object-gopn").f,C={}.toString,D=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(m){try{return f(m)}catch(w){return D.slice()}};J.exports.f=function(w){return D&&C.call(w)=="[object Window]"?u(w):f(L(w))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(j,J,I){var L=j("./_object-keys-internal"),f=j("./_enum-bug-keys").concat("length","prototype");I.f=Object.getOwnPropertyNames||function(D){return L(D,f)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(j,J,I){I.f=Object.getOwnPropertySymbols},{}],138:[function(j,J,I){var L=j("./_has"),f=j("./_to-object"),C=j("./_shared-key")("IE_PROTO"),D=Object.prototype;J.exports=Object.getPrototypeOf||function(u){return u=f(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,J,I){var L=j("./_has"),f=j("./_to-iobject"),C=j("./_array-includes")(!1),D=j("./_shared-key")("IE_PROTO");J.exports=function(u,m){var w=f(u),p=0,s=[],l;for(l in w)l!=D&&(L(w,l)&&s.push(l));for(;m.length>p;)L(w,l=m[p++])&&(~C(s,l)||s.push(l));return s}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(j,J,I){var L=j("./_object-keys-internal"),f=j("./_enum-bug-keys");J.exports=Object.keys||function(D){return L(D,f)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(j,J,I){I.f={}.propertyIsEnumerable},{}],142:[function(j,J,I){var L=j("./_export"),f=j("./_core"),C=j("./_fails");J.exports=function(D,u){var m=(f.Object||{})[D]||Object[D],w={};w[D]=u(m),L(L.S+L.F*C(function(){m(1)}),"Object",w)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(j,J,I){var L=j("./_descriptors"),f=j("./_object-keys"),C=j("./_to-iobject"),D=j("./_object-pie").f;J.exports=function(u){return function(m){for(var w=C(m),p=f(w),s=p.length,l=0,a=[],d;s>l;)d=p[l++],(!L||D.call(w,d))&&a.push(u?[d,w[d]]:w[d]);return a}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(j,J,I){J.exports=function(L){try{return{e:!1,v:L()}}catch(f){return{e:!0,v:f}}}},{}],145:[function(j,J,I){var L=j("./_an-object"),f=j("./_is-object"),C=j("./_new-promise-capability");J.exports=function(D,u){if(L(D),f(u)&&u.constructor===D)return u;var m=C.f(D),w=m.resolve;return w(u),m.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(j,J,I){J.exports=function(L,f){return{enumerable:!(L&1),configurable:!(L&2),writable:!(L&4),value:f}}},{}],147:[function(j,J,I){var L=j("./_hide");J.exports=function(f,C,D){for(var u in C)D&&f[u]?f[u]=C[u]:L(f,u,C[u]);return f}},{"./_hide":112}],148:[function(j,J,I){J.exports=j("./_hide")},{"./_hide":112}],149:[function(j,J,I){"use strict";var L=j("./_global"),f=j("./_core"),C=j("./_object-dp"),D=j("./_descriptors"),u=j("./_wks")("species");J.exports=function(m){var w=typeof f[m]=="function"?f[m]:L[m];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,J,I){var L=j("./_object-dp").f,f=j("./_has"),C=j("./_wks")("toStringTag");J.exports=function(D,u,m){D&&!f(D=m?D:D.prototype,C)&&L(D,C,{configurable:!0,value:u})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(j,J,I){var L=j("./_shared")("keys"),f=j("./_uid");J.exports=function(C){return L[C]||(L[C]=f(C))}},{"./_shared":152,"./_uid":162}],152:[function(j,J,I){var L=j("./_core"),f=j("./_global"),C="__core-js_shared__",D=f[C]||(f[C]={});(J.exports=function(u,m){return D[u]||(D[u]=m!==void 0?m:{})})("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,J,I){var L=j("./_an-object"),f=j("./_a-function"),C=j("./_wks")("species");J.exports=function(D,u){var m=L(D).constructor,w;return m===void 0||(w=L(m)[C])==null?u:f(w)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(j,J,I){var L=j("./_to-integer"),f=j("./_defined");J.exports=function(C){return function(D,u){var m=String(f(D)),w=L(u),p=m.length,s,l;return w<0||w>=p?C?"":void 0:(s=m.charCodeAt(w),s<55296||s>56319||w+1===p||(l=m.charCodeAt(w+1))<56320||l>57343?C?m.charAt(w):s:C?m.slice(w,w+2):(s-55296<<10)+(l-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(j,J,I){var L=j("./_ctx"),f=j("./_invoke"),C=j("./_html"),D=j("./_dom-create"),u=j("./_global"),m=u.process,w=u.setImmediate,p=u.clearImmediate,s=u.MessageChannel,l=u.Dispatch,a=0,d={},h="onreadystatechange",c,v,g,E=function(){var o=+this;if(d.hasOwnProperty(o)){var t=d[o];delete d[o],t()}},n=function(o){E.call(o.data)};(!w||!p)&&(w=function(t){for(var S=[],_=1;arguments.length>_;)S.push(arguments[_++]);return d[++a]=function(){f(typeof t=="function"?t:Function(t),S)},c(a),a},p=function(t){delete d[t]},j("./_cof")(m)=="process"?c=function(o){m.nextTick(L(E,o,1))}:l&&l.now?c=function(o){l.now(L(E,o,1))}:s?(v=new s,g=v.port2,v.port1.onmessage=n,c=L(g.postMessage,g,1)):u.addEventListener&&typeof postMessage=="function"&&!u.importScripts?(c=function(o){u.postMessage(o+"","*")},u.addEventListener("message",n,!1)):h in D("script")?c=function(o){C.appendChild(D("script"))[h]=function(){C.removeChild(this),E.call(o)}}:c=function(o){setTimeout(L(E,o,1),0)}),J.exports={set:w,clear:p}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(j,J,I){var L=j("./_to-integer"),f=Math.max,C=Math.min;J.exports=function(D,u){return D=L(D),D<0?f(D+u,0):C(D,u)}},{"./_to-integer":157}],157:[function(j,J,I){var L=Math.ceil,f=Math.floor;J.exports=function(C){return isNaN(C=+C)?0:(C>0?f:L)(C)}},{}],158:[function(j,J,I){var L=j("./_iobject"),f=j("./_defined");J.exports=function(C){return L(f(C))}},{"./_defined":102,"./_iobject":116}],159:[function(j,J,I){var L=j("./_to-integer"),f=Math.min;J.exports=function(C){return C>0?f(L(C),9007199254740991):0}},{"./_to-integer":157}],160:[function(j,J,I){var L=j("./_defined");J.exports=function(f){return Object(L(f))}},{"./_defined":102}],161:[function(j,J,I){var L=j("./_is-object");J.exports=function(f,C){if(!L(f))return f;var D,u;if(C&&typeof(D=f.toString)=="function"&&!L(u=D.call(f)))return u;if(typeof(D=f.valueOf)=="function"&&!L(u=D.call(f)))return u;if(!C&&typeof(D=f.toString)=="function"&&!L(u=D.call(f)))return u;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(j,J,I){var L=0,f=Math.random();J.exports=function(C){return"Symbol(".concat(C===void 0?"":C,")_",(++L+f).toString(36))}},{}],163:[function(j,J,I){var L=j("./_global"),f=L.navigator;J.exports=f&&f.userAgent||""},{"./_global":110}],164:[function(j,J,I){var L=j("./_global"),f=j("./_core"),C=j("./_library"),D=j("./_wks-ext"),u=j("./_object-dp").f;J.exports=function(m){var w=f.Symbol||(f.Symbol=C?{}:L.Symbol||{});m.charAt(0)!="_"&&!(m in w)&&u(w,m,{value:D.f(m)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(j,J,I){I.f=j("./_wks")},{"./_wks":166}],166:[function(j,J,I){var L=j("./_shared")("wks"),f=j("./_uid"),C=j("./_global").Symbol,D=typeof C=="function",u=J.exports=function(m){return L[m]||(L[m]=D&&C[m]||(D?C:f)("Symbol."+m))};u.store=L},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(j,J,I){var L=j("./_classof"),f=j("./_wks")("iterator"),C=j("./_iterators");J.exports=j("./_core").getIteratorMethod=function(D){if(D!=null)return D[f]||D["@@iterator"]||C[L(D)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(j,J,I){"use strict";var L=j("./_ctx"),f=j("./_export"),C=j("./_to-object"),D=j("./_iter-call"),u=j("./_is-array-iter"),m=j("./_to-length"),w=j("./_create-property"),p=j("./core.get-iterator-method");f(f.S+f.F*!j("./_iter-detect")(function(s){Array.from(s)}),"Array",{from:function(l){var a=C(l),d=typeof this=="function"?this:Array,h=arguments.length,c=h>1?arguments[1]:void 0,v=c!==void 0,g=0,E=p(a),n,o,t,S;if(v&&(c=L(c,h>2?arguments[2]:void 0,2)),E!=null&&!(d==Array&&u(E)))for(S=E.call(a),o=new d;!(t=S.next()).done;g++)w(o,g,v?D(S,c,[t.value,g],!0):t.value);else for(n=m(a.length),o=new d(n);n>g;g++)w(o,g,v?c(a[g],g):a[g]);return o.length=g,o}})},{"./_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,J,I){"use strict";var L=j("./_add-to-unscopables"),f=j("./_iter-step"),C=j("./_iterators"),D=j("./_to-iobject");J.exports=j("./_iter-define")(Array,"Array",function(u,m){this._t=D(u),this._i=0,this._k=m},function(){var u=this._t,m=this._k,w=this._i++;return!u||w>=u.length?(this._t=void 0,f(1)):m=="keys"?f(0,w):m=="values"?f(0,u[w]):f(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,J,I){"use strict";var L=j("./_is-object"),f=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=f(u);)if(this.prototype===u)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(j,J,I){var L=j("./_export");L(L.S+L.F,"Object",{assign:j("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(j,J,I){var L=j("./_export");L(L.S,"Object",{create:j("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(j,J,I){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,J,I){j("./_object-sap")("getOwnPropertyNames",function(){return j("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(j,J,I){var L=j("./_to-object"),f=j("./_object-gpo");j("./_object-sap")("getPrototypeOf",function(){return function(D){return f(L(D))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(j,J,I){var L=j("./_to-object"),f=j("./_object-keys");j("./_object-sap")("keys",function(){return function(D){return f(L(D))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(j,J,I){arguments[4][71][0].apply(I,arguments)},{dup:71}],178:[function(j,J,I){"use strict";var L=j("./_library"),f=j("./_global"),C=j("./_ctx"),D=j("./_classof"),u=j("./_export"),m=j("./_is-object"),w=j("./_a-function"),p=j("./_an-instance"),s=j("./_for-of"),l=j("./_species-constructor"),a=j("./_task").set,d=j("./_microtask")(),h=j("./_new-promise-capability"),c=j("./_perform"),v=j("./_user-agent"),g=j("./_promise-resolve"),E="Promise",n=f.TypeError,o=f.process,t=o&&o.versions,S=t&&t.v8||"",_=f[E],i=D(o)=="process",P=function(){},O,x,b,y,T=x=h.f,M=!!function(){try{var W=_.resolve(1),G=(W.constructor={})[j("./_wks")("species")]=function(ee){ee(P,P)};return(i||typeof PromiseRejectionEvent=="function")&&W.then(P)instanceof G&&S.indexOf("6.6")!==0&&v.indexOf("Chrome/66")===-1}catch(ee){}}(),k=function(W){var G;return m(W)&&typeof(G=W.then)=="function"?G:!1},N=function(W,G){if(W._n)return;W._n=!0;var ee=W._c;d(function(){for(var ie=W._v,ce=W._s==1,_e=0,Ce=function(le){var ye=ce?le.ok:le.fail,fe=le.resolve,ne=le.reject,ae=le.domain,q,se,Q;try{ye?(ce||(W._h==2&&B(W),W._h=1),ye===!0?q=ie:(ae&&ae.enter(),q=ye(ie),ae&&(ae.exit(),Q=!0)),q===le.promise?ne(n("Promise-chain cycle")):(se=k(q))?se.call(q,fe,ne):fe(q)):ne(ie)}catch(Z){ae&&!Q&&ae.exit(),ne(Z)}};ee.length>_e;)Ce(ee[_e++]);W._c=[],W._n=!1,G&&!W._h&&K(W)})},K=function(W){a.call(f,function(){var G=W._v,ee=z(W),ie,ce,_e;if(ee&&(ie=c(function(){i?o.emit("unhandledRejection",G,W):(ce=f.onunhandledrejection)?ce({promise:W,reason:G}):(_e=f.console)&&_e.error&&_e.error("Unhandled promise rejection",G)}),W._h=i||z(W)?2:1),W._a=void 0,ee&&ie.e)throw ie.v})},z=function(W){return W._h!==1&&(W._a||W._c).length===0},B=function(W){a.call(f,function(){var G;i?o.emit("rejectionHandled",W):(G=f.onrejectionhandled)&&G({promise:W,reason:W._v})})},H=function(W){var G=this;if(G._d)return;G._d=!0,G=G._w||G,G._v=W,G._s=2,G._a||(G._a=G._c.slice()),N(G,!0)},U=function(W){var G=this,ee;if(G._d)return;G._d=!0,G=G._w||G;try{if(G===W)throw n("Promise can't be resolved itself");(ee=k(W))?d(function(){var ie={_w:G,_d:!1};try{ee.call(W,C(U,ie,1),C(H,ie,1))}catch(ce){H.call(ie,ce)}}):(G._v=W,G._s=1,N(G,!1))}catch(ie){H.call({_w:G,_d:!1},ie)}};M||(_=function(G){p(this,_,E,"_h"),w(G),O.call(this);try{G(C(U,this,1),C(H,this,1))}catch(ee){H.call(this,ee)}},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")(_.prototype,{then:function(G,ee){var ie=T(l(this,_));return ie.ok=typeof G=="function"?G:!0,ie.fail=typeof ee=="function"&&ee,ie.domain=i?o.domain:void 0,this._c.push(ie),this._a&&this._a.push(ie),this._s&&N(this,!1),ie.promise},catch:function(W){return this.then(void 0,W)}}),b=function(){var W=new O;this.promise=W,this.resolve=C(U,W,1),this.reject=C(H,W,1)},h.f=T=function(W){return W===_||W===y?new b(W):x(W)}),u(u.G+u.W+u.F*!M,{Promise:_}),j("./_set-to-string-tag")(_,E),j("./_set-species")(E),y=j("./_core")[E],u(u.S+u.F*!M,E,{reject:function(G){var ee=T(this),ie=ee.reject;return ie(G),ee.promise}}),u(u.S+u.F*(L||!M),E,{resolve:function(G){return g(L&&this===y?_:this,G)}}),u(u.S+u.F*!(M&&j("./_iter-detect")(function(W){_.all(W).catch(P)})),E,{all:function(G){var ee=this,ie=T(ee),ce=ie.resolve,_e=ie.reject,Ce=c(function(){var le=[],ye=0,fe=1;s(G,!1,function(ne){var ae=ye++,q=!1;le.push(void 0),fe++,ee.resolve(ne).then(function(se){if(q)return;q=!0,le[ae]=se,--fe||ce(le)},_e)}),--fe||ce(le)});return Ce.e&&_e(Ce.v),ie.promise},race:function(G){var ee=this,ie=T(ee),ce=ie.reject,_e=c(function(){s(G,!1,function(Ce){ee.resolve(Ce).then(ie.resolve,ce)})});return _e.e&&ce(_e.v),ie.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,J,I){var L=j("./_export"),f=j("./_to-absolute-index"),C=String.fromCharCode,D=String.fromCodePoint;L(L.S+L.F*(!!D&&D.length!=1),"String",{fromCodePoint:function(m){for(var w=[],p=arguments.length,s=0,l;p>s;){if(l=+arguments[s++],f(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,J,I){"use strict";var L=j("./_string-at")(!0);j("./_iter-define")(String,"String",function(f){this._t=String(f),this._i=0},function(){var f=this._t,C=this._i,D;return C>=f.length?{value:void 0,done:!0}:(D=L(f,C),this._i+=D.length,{value:D,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(j,J,I){"use strict";var L=j("./_global"),f=j("./_has"),C=j("./_descriptors"),D=j("./_export"),u=j("./_redefine"),m=j("./_meta").KEY,w=j("./_fails"),p=j("./_shared"),s=j("./_set-to-string-tag"),l=j("./_uid"),a=j("./_wks"),d=j("./_wks-ext"),h=j("./_wks-define"),c=j("./_enum-keys"),v=j("./_is-array"),g=j("./_an-object"),E=j("./_is-object"),n=j("./_to-object"),o=j("./_to-iobject"),t=j("./_to-primitive"),S=j("./_property-desc"),_=j("./_object-create"),i=j("./_object-gopn-ext"),P=j("./_object-gopd"),O=j("./_object-gops"),x=j("./_object-dp"),b=j("./_object-keys"),y=P.f,T=x.f,M=i.f,k=L.Symbol,N=L.JSON,K=N&&N.stringify,z="prototype",B=a("_hidden"),H=a("toPrimitive"),U={}.propertyIsEnumerable,W=p("symbol-registry"),G=p("symbols"),ee=p("op-symbols"),ie=Object[z],ce=typeof k=="function"&&!!O.f,_e=L.QObject,Ce=!_e||!_e[z]||!_e[z].findChild,le=C&&w(function(){return _(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a!=7})?function(de,xe,Ke){var Ve=y(ie,xe);Ve&&delete ie[xe],T(de,xe,Ke),Ve&&de!==ie&&T(ie,xe,Ve)}:T,ye=function(de){var xe=G[de]=_(k[z]);return xe._k=de,xe},fe=ce&&typeof k.iterator=="symbol"?function(de){return typeof de=="symbol"}:function(de){return de instanceof k},ne=function(xe,Ke,Ve){return xe===ie&&ne(ee,Ke,Ve),g(xe),Ke=t(Ke,!0),g(Ve),f(G,Ke)?(Ve.enumerable?(f(xe,B)&&xe[B][Ke]&&(xe[B][Ke]=!1),Ve=_(Ve,{enumerable:S(0,!1)})):(f(xe,B)||T(xe,B,S(1,{})),xe[B][Ke]=!0),le(xe,Ke,Ve)):T(xe,Ke,Ve)},ae=function(xe,Ke){g(xe);for(var Ve=c(Ke=o(Ke)),Xe=0,at=Ve.length,it;at>Xe;)ne(xe,it=Ve[Xe++],Ke[it]);return xe},q=function(xe,Ke){return Ke===void 0?_(xe):ae(_(xe),Ke)},se=function(xe){var Ke=U.call(this,xe=t(xe,!0));return this===ie&&f(G,xe)&&!f(ee,xe)?!1:Ke||!f(this,xe)||!f(G,xe)||f(this,B)&&this[B][xe]?Ke:!0},Q=function(xe,Ke){if(xe=o(xe),Ke=t(Ke,!0),xe===ie&&f(G,Ke)&&!f(ee,Ke))return;var Ve=y(xe,Ke);return Ve&&f(G,Ke)&&!(f(xe,B)&&xe[B][Ke])&&(Ve.enumerable=!0),Ve},Z=function(xe){for(var Ke=M(o(xe)),Ve=[],Xe=0,at;Ke.length>Xe;)!f(G,at=Ke[Xe++])&&at!=B&&at!=m&&Ve.push(at);return Ve},be=function(xe){for(var Ke=xe===ie,Ve=M(Ke?ee:o(xe)),Xe=[],at=0,it;Ve.length>at;)f(G,it=Ve[at++])&&(Ke?f(ie,it):!0)&&Xe.push(G[it]);return Xe};ce||(k=function(){if(this instanceof k)throw TypeError("Symbol is not a constructor!");var xe=l(arguments.length>0?arguments[0]:void 0),Ke=function(Ve){this===ie&&Ke.call(ee,Ve),f(this,B)&&f(this[B],xe)&&(this[B][xe]=!1),le(this,xe,S(1,Ve))};return C&&Ce&&le(ie,xe,{configurable:!0,set:Ke}),ye(xe)},u(k[z],"toString",function(){return this._k}),P.f=Q,x.f=ne,j("./_object-gopn").f=i.f=Z,j("./_object-pie").f=se,O.f=be,C&&!j("./_library")&&u(ie,"propertyIsEnumerable",se,!0),d.f=function(de){return ye(a(de))}),D(D.G+D.W+D.F*!ce,{Symbol:k});for(var re="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Y=0;re.length>Y;)a(re[Y++]);for(var X=b(a.store),$=0;X.length>$;)h(X[$++]);D(D.S+D.F*!ce,"Symbol",{for:function(de){return f(W,de+="")?W[de]:W[de]=k(de)},keyFor:function(xe){if(!fe(xe))throw TypeError(xe+" is not a symbol!");for(var Ke in W)if(W[Ke]===xe)return Ke},useSetter:function(){Ce=!0},useSimple:function(){Ce=!1}}),D(D.S+D.F*!ce,"Object",{create:q,defineProperty:ne,defineProperties:ae,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:be});var ve=w(function(){O.f(1)});D(D.S+D.F*ve,"Object",{getOwnPropertySymbols:function(xe){return O.f(n(xe))}}),N&&D(D.S+D.F*(!ce||w(function(){var de=k();return K([de])!="[null]"||K({a:de})!="{}"||K(Object(de))!="{}"})),"JSON",{stringify:function(xe){for(var Ke=[xe],Ve=1,Xe,at;arguments.length>Ve;)Ke.push(arguments[Ve++]);return at=Xe=Ke[1],!E(Xe)&&xe===void 0||fe(xe)?void 0:(v(Xe)||(Xe=function(it,lt){if(typeof at=="function"&&(lt=at.call(this,it,lt)),!fe(lt))return lt}),Ke[1]=Xe,K.apply(N,Ke))}}),k[z][H]||j("./_hide")(k[z],H,k[z].valueOf),s(k,"Symbol"),s(Math,"Math",!0),s(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,J,I){var L=j("./_export"),f=j("./_object-to-array")(!0);L(L.S,"Object",{entries:function(D){return f(D)}})},{"./_export":107,"./_object-to-array":143}],183:[function(j,J,I){"use strict";var L=j("./_export"),f=j("./_core"),C=j("./_global"),D=j("./_species-constructor"),u=j("./_promise-resolve");L(L.P+L.R,"Promise",{finally:function(m){var w=D(this,f.Promise||C.Promise),p=typeof m=="function";return this.then(p?function(s){return u(w,m()).then(function(){return s})}:m,p?function(s){return u(w,m()).then(function(){throw s})}:m)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(j,J,I){"use strict";var L=j("./_export"),f=j("./_new-promise-capability"),C=j("./_perform");L(L.S,"Promise",{try:function(D){var u=f.f(this),m=C(D);return(m.e?u.reject:u.resolve)(m.v),u.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(j,J,I){j("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(j,J,I){j("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(j,J,I){j("./es6.array.iterator");for(var L=j("./_global"),f=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(","),m=0;m<u.length;m++){var w=u[m],p=L[w],s=p&&p.prototype;s&&!s[D]&&f(s,D,w),C[w]=C.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(j,J,I){var L=j("./_export"),f=j("./_task");L(L.G+L.B,{setImmediate:f.set,clearImmediate:f.clear})},{"./_export":107,"./_task":155}],189:[function(j,J,I){(function(L){"use strict";var f=j("babel-runtime/helpers/typeof"),C=D(f);function D(t){return t&&t.__esModule?t:{default:t}}function u(t){return Array.isArray?Array.isArray(t):o(t)==="[object Array]"}I.isArray=u;function m(t){return typeof t=="boolean"}I.isBoolean=m;function w(t){return t===null}I.isNull=w;function p(t){return t==null}I.isNullOrUndefined=p;function s(t){return typeof t=="number"}I.isNumber=s;function l(t){return typeof t=="string"}I.isString=l;function a(t){return(typeof t=="undefined"?"undefined":(0,C.default)(t))==="symbol"}I.isSymbol=a;function d(t){return t===void 0}I.isUndefined=d;function h(t){return o(t)==="[object RegExp]"}I.isRegExp=h;function c(t){return(typeof t=="undefined"?"undefined":(0,C.default)(t))==="object"&&t!==null}I.isObject=c;function v(t){return o(t)==="[object Date]"}I.isDate=v;function g(t){return o(t)==="[object Error]"||t instanceof Error}I.isError=g;function E(t){return typeof t=="function"}I.isFunction=E;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"}I.isPrimitive=n,I.isBuffer=L.isBuffer;function o(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,J,I){"use strict";var L=j("babel-runtime/helpers/typeof"),f=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,d=/[^-+\dA-Z]/g;return function(h,c,v,g){if(arguments.length===1&&s(h)==="string"&&!/\d/.test(h)&&(c=h,h=void 0),h=h||new Date,h instanceof Date||(h=new Date(h)),isNaN(h))throw TypeError("Invalid date");c=String(u.masks[c]||c||u.masks.default);var E=c.slice(0,4);(E==="UTC:"||E==="GMT:")&&(c=c.slice(4),v=!0,E==="GMT:"&&(g=!0));var n=v?"getUTC":"get",o=h[n+"Date"](),t=h[n+"Day"](),S=h[n+"Month"](),_=h[n+"FullYear"](),i=h[n+"Hours"](),P=h[n+"Minutes"](),O=h[n+"Seconds"](),x=h[n+"Milliseconds"](),b=v?0:h.getTimezoneOffset(),y=w(h),T=p(h),M={d:o,dd:m(o),ddd:u.i18n.dayNames[t],dddd:u.i18n.dayNames[t+7],m:S+1,mm:m(S+1),mmm:u.i18n.monthNames[S],mmmm:u.i18n.monthNames[S+12],yy:String(_).slice(2),yyyy:_,h:i%12||12,hh:m(i%12||12),H:i,HH:m(i),M:P,MM:m(P),s:O,ss:m(O),l:m(x,3),L:m(Math.round(x/10)),t:i<12?"a":"p",tt:i<12?"am":"pm",T:i<12?"A":"P",TT:i<12?"AM":"PM",Z:g?"GMT":v?"UTC":(String(h).match(a)||[""]).pop().replace(d,""),o:(b>0?"-":"+")+m(Math.floor(Math.abs(b)/60)*100+Math.abs(b)%60,4),S:["th","st","nd","rd"][o%10>3?0:(o%100-o%10!=10)*o%10],W:y,N:T};return c.replace(l,function(k){return k in M?M[k]:k.slice(1,k.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 m(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 d=new Date(a.getFullYear(),0,4);d.setDate(d.getDate()-(d.getDay()+6)%7+3);var h=a.getTimezoneOffset()-d.getTimezoneOffset();a.setHours(a.getHours()-h);var c=(a-d)/(864e5*7);return 1+Math.floor(c)}function p(l){var a=l.getDay();return a===0&&(a=7),a}function s(l){return l===null?"null":l===void 0?"undefined":(typeof l=="undefined"?"undefined":(0,f.default)(l))!=="object"?typeof l=="undefined"?"undefined":(0,f.default)(l):Array.isArray(l)?"array":{}.toString.call(l).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return u}):(typeof I=="undefined"?"undefined":(0,f.default)(I))==="object"?J.exports=u:D.dateFormat=u})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(j,J,I){/*!
|
|
|
* 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=/["'&<>]/;J.exports=f;function f(C){var D=""+C,u=L.exec(D);if(!u)return D;var m,w="",p=0,s=0;for(p=u.index;p<D.length;p++){switch(D.charCodeAt(p)){case 34:m=""";break;case 38:m="&";break;case 39:m="'";break;case 60:m="<";break;case 62:m=">";break;default:continue}s!==p&&(w+=D.substring(s,p)),s=p+1,w+=m}return s!==p?w+D.substring(s,p):w}},{}],192:[function(j,J,I){function L(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}J.exports=L,L.EventEmitter=L,L.prototype._events=void 0,L.prototype._maxListeners=void 0,L.defaultMaxListeners=10,L.prototype.setMaxListeners=function(m){if(!C(m)||m<0||isNaN(m))throw TypeError("n must be a positive number");return this._maxListeners=m,this},L.prototype.emit=function(m){var w,p,s,l,a,d;if(this._events||(this._events={}),m==="error"&&(!this._events.error||D(this._events.error)&&!this._events.error.length)){if(w=arguments[1],w instanceof Error)throw w;var h=new Error('Uncaught, unspecified "error" event. ('+w+")");throw h.context=w,h}if(p=this._events[m],u(p))return!1;if(f(p))switch(arguments.length){case 1:p.call(this);break;case 2:p.call(this,arguments[1]);break;case 3:p.call(this,arguments[1],arguments[2]);break;default:l=Array.prototype.slice.call(arguments,1),p.apply(this,l)}else if(D(p))for(l=Array.prototype.slice.call(arguments,1),d=p.slice(),s=d.length,a=0;a<s;a++)d[a].apply(this,l);return!0},L.prototype.addListener=function(m,w){var p;if(!f(w))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",m,f(w.listener)?w.listener:w),this._events[m]?D(this._events[m])?this._events[m].push(w):this._events[m]=[this._events[m],w]:this._events[m]=w,D(this._events[m])&&!this._events[m].warned&&(u(this._maxListeners)?p=L.defaultMaxListeners:p=this._maxListeners,p&&p>0&&this._events[m].length>p&&(this._events[m].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[m].length),typeof console.trace=="function"&&console.trace())),this},L.prototype.on=L.prototype.addListener,L.prototype.once=function(m,w){if(!f(w))throw TypeError("listener must be a function");var p=!1;function s(){this.removeListener(m,s),p||(p=!0,w.apply(this,arguments))}return s.listener=w,this.on(m,s),this},L.prototype.removeListener=function(m,w){var p,s,l,a;if(!f(w))throw TypeError("listener must be a function");if(!this._events||!this._events[m])return this;if(p=this._events[m],l=p.length,s=-1,p===w||f(p.listener)&&p.listener===w)delete this._events[m],this._events.removeListener&&this.emit("removeListener",m,w);else if(D(p)){for(a=l;a-- >0;)if(p[a]===w||p[a].listener&&p[a].listener===w){s=a;break}if(s<0)return this;p.length===1?(p.length=0,delete this._events[m]):p.splice(s,1),this._events.removeListener&&this.emit("removeListener",m,w)}return this},L.prototype.removeAllListeners=function(m){var w,p;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[m]&&delete this._events[m],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(p=this._events[m],f(p))this.removeListener(m,p);else if(p)for(;p.length;)this.removeListener(m,p[p.length-1]);return delete this._events[m],this},L.prototype.listeners=function(m){var w;return!this._events||!this._events[m]?w=[]:f(this._events[m])?w=[this._events[m]]:w=this._events[m].slice(),w},L.prototype.listenerCount=function(m){if(this._events){var w=this._events[m];if(f(w))return 1;if(w)return w.length}return 0},L.listenerCount=function(m,w){return m.listenerCount(w)};function f(m){return typeof m=="function"}function C(m){return typeof m=="number"}function D(m){return typeof m=="object"&&m!==null}function u(m){return m===void 0}},{}],193:[function(j,J,I){var L=j("http"),f=J.exports;for(var C in L)L.hasOwnProperty(C)&&(f[C]=L[C]);f.request=function(D,u){return D||(D={}),D.scheme="https",D.protocol="https:",L.request.call(this,D,u)}},{http:231}],194:[function(j,J,I){/*!
|
|
|
* humanize-ms - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var L=j("util"),f=j("ms");J.exports=function(C){if(typeof C=="number")return C;var D=f(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,J,I){I.read=function(L,f,C,D,u){var m,w,p=u*8-D-1,s=(1<<p)-1,l=s>>1,a=-7,d=C?u-1:0,h=C?-1:1,c=L[f+d];for(d+=h,m=c&(1<<-a)-1,c>>=-a,a+=p;a>0;m=m*256+L[f+d],d+=h,a-=8);for(w=m&(1<<-a)-1,m>>=-a,a+=D;a>0;w=w*256+L[f+d],d+=h,a-=8);if(m===0)m=1-l;else{if(m===s)return w?NaN:(c?-1:1)*Infinity;w=w+Math.pow(2,D),m=m-l}return(c?-1:1)*w*Math.pow(2,m-D)},I.write=function(L,f,C,D,u,m){var w,p,s,l=m*8-u-1,a=(1<<l)-1,d=a>>1,h=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=D?0:m-1,v=D?1:-1,g=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===Infinity?(p=isNaN(f)?1:0,w=a):(w=Math.floor(Math.log(f)/Math.LN2),f*(s=Math.pow(2,-w))<1&&(w--,s*=2),w+d>=1?f+=h/s:f+=h*Math.pow(2,1-d),f*s>=2&&(w++,s/=2),w+d>=a?(p=0,w=a):w+d>=1?(p=(f*s-1)*Math.pow(2,u),w=w+d):(p=f*Math.pow(2,d-1)*Math.pow(2,u),w=0));u>=8;L[C+c]=p&255,c+=v,p/=256,u-=8);for(w=w<<u|p,l+=u;l>0;L[C+c]=w&255,c+=v,w/=256,l-=8);L[C+c-v]|=g*128}},{}],196:[function(j,J,I){typeof Object.create=="function"?J.exports=function(f,C){C&&(f.super_=C,f.prototype=Object.create(C.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}))}:J.exports=function(f,C){if(C){f.super_=C;var D=function(){};D.prototype=C.prototype,f.prototype=new D,f.prototype.constructor=f}}},{}],197:[function(j,J,I){/*!
|
|
|
* Determine if an object is a Buffer
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
|
* @license MIT
|
|
|
*/J.exports=function(C){return C!=null&&(L(C)||f(C)||!!C._isBuffer)};function L(C){return!!C.constructor&&typeof C.constructor.isBuffer=="function"&&C.constructor.isBuffer(C)}function f(C){return typeof C.readFloatLE=="function"&&typeof C.slice=="function"&&L(C.slice(0,0))}},{}],198:[function(j,J,I){var L={}.toString;J.exports=Array.isArray||function(f){return L.call(f)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(j,J){typeof exports=="object"&&typeof module!="undefined"?module.exports=J(j):typeof define=="function"&&define.amd?define(J):J(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 J={},I=0,L=j.length;I<L;I++)J[j.charAt(I)]=I;return J}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(j){if(j.length<2){var J=j.charCodeAt(0);return J<128?j:J<2048?fromCharCode(192|J>>>6)+fromCharCode(128|J&63):fromCharCode(224|J>>>12&15)+fromCharCode(128|J>>>6&63)+fromCharCode(128|J&63)}else{var J=65536+(j.charCodeAt(0)-55296)*1024+(j.charCodeAt(1)-56320);return fromCharCode(240|J>>>18&7)+fromCharCode(128|J>>>12&63)+fromCharCode(128|J>>>6&63)+fromCharCode(128|J&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 J=[0,2,1][j.length%3],I=j.charCodeAt(0)<<16|(j.length>1?j.charCodeAt(1):0)<<8|(j.length>2?j.charCodeAt(2):0),L=[b64chars.charAt(I>>>18),b64chars.charAt(I>>>12&63),J>=2?"=":b64chars.charAt(I>>>6&63),J>=1?"=":b64chars.charAt(I&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 J=Object.prototype.toString.call(j)==="[object Uint8Array]";return J?j.toString("base64"):btoa(utob(String(j)))},encode=function(j,J){return J?_encode(String(j)).replace(/[+\/]/g,function(I){return I=="+"?"-":"_"}).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 J=(7&j.charCodeAt(0))<<18|(63&j.charCodeAt(1))<<12|(63&j.charCodeAt(2))<<6|63&j.charCodeAt(3),I=J-65536;return fromCharCode((I>>>10)+55296)+fromCharCode((I&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 J=j.length,I=J%4,L=(J>0?b64tab[j.charAt(0)]<<18:0)|(J>1?b64tab[j.charAt(1)]<<12:0)|(J>2?b64tab[j.charAt(2)]<<6:0)|(J>3?b64tab[j.charAt(3)]:0),f=[fromCharCode(L>>>16),fromCharCode(L>>>8&255),fromCharCode(L&255)];return f.length-=[0,0,2,1][I],f.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(J){return J=="-"?"+":"/"}).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,J,I){/*!
|
|
|
* merge-descriptors
|
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
|
* MIT Licensed
|
|
|
*/"use strict";J.exports=f;var L=Object.prototype.hasOwnProperty;function f(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 p=Object.getOwnPropertyDescriptor(D,w);Object.defineProperty(C,w,p)}),C}},{}],201:[function(j,J,I){"use strict";function L(){this._types=Object.create(null),this._extensions=Object.create(null);for(var f=0;f<arguments.length;f++)this.define(arguments[f]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}L.prototype.define=function(f,C){for(var D in f){var u=f[D].map(function(p){return p.toLowerCase()});D=D.toLowerCase();for(var m=0;m<u.length;m++){var w=u[m];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(f){f=String(f);var C=f.replace(/^.*[/\\]/,"").toLowerCase(),D=C.replace(/^.*\./,"").toLowerCase(),u=C.length<f.length,m=D.length<C.length-1;return(m||!u)&&this._types[D]||null},L.prototype.getExtension=function(f){return f=/^\s*([^;\s]*)/.test(f)&&RegExp.$1,f&&this._extensions[f.toLowerCase()]||null},J.exports=L},{}],202:[function(j,J,I){"use strict";var L=j("./Mime");J.exports=new L(j("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(j,J,I){J.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,J,I){var L=1e3,f=L*60,C=f*60,D=C*24,u=D*7,m=D*365.25;J.exports=function(a,d){d=d||{};var h=typeof a;if(h==="string"&&a.length>0)return w(a);if(h==="number"&&isFinite(a))return d.long?s(a):p(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+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!d)return;var h=parseFloat(d[1]),c=(d[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return h*m;case"weeks":case"week":case"w":return h*u;case"days":case"day":case"d":return h*D;case"hours":case"hour":case"hrs":case"hr":case"h":return h*C;case"minutes":case"minute":case"mins":case"min":case"m":return h*f;case"seconds":case"second":case"secs":case"sec":case"s":return h*L;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}function p(a){var d=Math.abs(a);return d>=D?Math.round(a/D)+"d":d>=C?Math.round(a/C)+"h":d>=f?Math.round(a/f)+"m":d>=L?Math.round(a/L)+"s":a+"ms"}function s(a){var d=Math.abs(a);return d>=D?l(a,d,D,"day"):d>=C?l(a,d,C,"hour"):d>=f?l(a,d,f,"minute"):d>=L?l(a,d,L,"second"):a+" ms"}function l(a,d,h,c){var v=d>=h*1.5;return Math.round(a/h)+" "+c+(v?"s":"")}},{}],205:[function(j,J,I){(function(L){function f(m,w){for(var p=0,s=m.length-1;s>=0;s--){var l=m[s];l==="."?m.splice(s,1):l===".."?(m.splice(s,1),p++):p&&(m.splice(s,1),p--)}if(w)for(;p--;p)m.unshift("..");return m}I.resolve=function(){for(var m="",w=!1,p=arguments.length-1;p>=-1&&!w;p--){var s=p>=0?arguments[p]:L.cwd();if(typeof s!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!s)continue;m=s+"/"+m,w=s.charAt(0)==="/"}return m=f(D(m.split("/"),function(l){return!!l}),!w).join("/"),(w?"/":"")+m||"."},I.normalize=function(m){var w=I.isAbsolute(m),p=u(m,-1)==="/";return m=f(D(m.split("/"),function(s){return!!s}),!w).join("/"),!m&&!w&&(m="."),m&&p&&(m+="/"),(w?"/":"")+m},I.isAbsolute=function(m){return m.charAt(0)==="/"},I.join=function(){var m=Array.prototype.slice.call(arguments,0);return I.normalize(D(m,function(w,p){if(typeof w!="string")throw new TypeError("Arguments to path.join must be strings");return w}).join("/"))},I.relative=function(m,w){m=I.resolve(m).substr(1),w=I.resolve(w).substr(1);function p(v){for(var g=0;g<v.length&&!(v[g]!=="");g++);for(var E=v.length-1;E>=0&&!(v[E]!=="");E--);return g>E?[]:v.slice(g,E-g+1)}for(var s=p(m.split("/")),l=p(w.split("/")),a=Math.min(s.length,l.length),d=a,h=0;h<a;h++)if(s[h]!==l[h]){d=h;break}for(var c=[],h=d;h<s.length;h++)c.push("..");return c=c.concat(l.slice(d)),c.join("/")},I.sep="/",I.delimiter=":",I.dirname=function(m){if(typeof m!="string"&&(m=m+""),m.length===0)return".";for(var w=m.charCodeAt(0),p=w===47,s=-1,l=!0,a=m.length-1;a>=1;--a)if(w=m.charCodeAt(a),w===47){if(!l){s=a;break}}else l=!1;return s===-1?p?"/":".":p&&s===1?"/":m.slice(0,s)};function C(m){typeof m!="string"&&(m=m+"");var w=0,p=-1,s=!0,l;for(l=m.length-1;l>=0;--l)if(m.charCodeAt(l)===47){if(!s){w=l+1;break}}else p===-1&&(s=!1,p=l+1);return p===-1?"":m.slice(w,p)}I.basename=function(m,w){var p=C(m);return w&&p.substr(-1*w.length)===w&&(p=p.substr(0,p.length-w.length)),p},I.extname=function(m){typeof m!="string"&&(m=m+"");for(var w=-1,p=0,s=-1,l=!0,a=0,d=m.length-1;d>=0;--d){var h=m.charCodeAt(d);if(h===47){if(!l){p=d+1;break}continue}s===-1&&(l=!1,s=d+1),h===46?w===-1?w=d:a!==1&&(a=1):w!==-1&&(a=-1)}return w===-1||s===-1||a===0||a===1&&w===s-1&&w===p+1?"":m.slice(w,s)};function D(m,w){if(m.filter)return m.filter(w);for(var p=[],s=0;s<m.length;s++)w(m[s],s,m)&&p.push(m[s]);return p}var u="ab".substr(-1)==="b"?function(m,w,p){return m.substr(w,p)}:function(m,w,p){return w<0&&(w=m.length+w),m.substr(w,p)}}).call(this,j("_process"))},{_process:208}],206:[function(j,J,I){(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 f={function:!0,object:!0},C=f[typeof window]&&window||this,D=C,u=f[typeof I]&&I,m=f[typeof J]&&J&&!J.nodeType&&J,w=u&&m&&typeof L=="object"&&L;w&&(w.global===w||w.window===w||w.self===w)&&(C=w);var p=Math.pow(2,53)-1,s=/\bOpera/,l=this,a=Object.prototype,d=a.hasOwnProperty,h=a.toString;function c(x){return x=String(x),x.charAt(0).toUpperCase()+x.slice(1)}function v(x,b,y){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 b&&y&&/^Win/i.test(x)&&!/^Windows Phone /i.test(x)&&(T=T[/[\d.]+$/.exec(x)])&&(x="Windows "+T),x=String(x),b&&y&&(x=x.replace(RegExp(b,"i"),y)),x=E(x.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]),x}function g(x,b){var y=-1,T=x?x.length:0;if(typeof T=="number"&&T>-1&&T<=p)for(;++y<T;)b(x[y],y,x);else n(x,b)}function E(x){return x=i(x),/^(?:webOS|i(?:OS|P))/.test(x)?x:c(x)}function n(x,b){for(var y in x)d.call(x,y)&&b(x[y],y,x)}function o(x){return x==null?c(x):h.call(x).slice(8,-1)}function t(x,b){var y=x!=null?typeof x[b]:"number";return!/^(?:boolean|number|string|undefined)$/.test(y)&&(y=="object"?!!x[b]:!0)}function S(x){return String(x).replace(/([ -])(?!$)/g,"$1?")}function _(x,b){var y=null;return g(x,function(T,M){y=b(y,T,M,x)}),y}function i(x){return String(x).replace(/^ +| +$/g,"")}function P(x){var b=C,y=x&&typeof x=="object"&&o(x)!="String";y&&(b=x,x=null);var T=b.navigator||{},M=T.userAgent||"";x||(x=M);var k=y||l==D,N=y?!!T.likeChrome:/\bChrome\b/.test(x)&&!/internal|\n/i.test(h.toString()),K="Object",z=y?K:"ScriptBridgingProxyObject",B=y?K:"Environment",H=y&&b.java?"JavaPackage":o(b.java),U=y?K:"RuntimeObject",W=/\bJava/.test(H)&&b.java,G=W&&o(b.environment)==B,ee=W?"a":"\u03B1",ie=W?"b":"\u03B2",ce=b.document||{},_e=b.operamini||b.opera,Ce=s.test(Ce=y&&_e?_e["[[Class]]"]:o(_e))?Ce:_e=null,le,ye=x,fe=[],ne=null,ae=x==M,q=ae&&_e&&typeof _e.version=="function"&&_e.version(),se,Q=X([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Z=ve(["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"]),be=xe([{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"]),re=$({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}}),Y=de(["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(at){return _(at,function(it,lt){return it||RegExp("\\b"+(lt.pattern||S(lt))+"\\b","i").exec(x)&&(lt.label||lt)})}function $(at){return _(at,function(it,lt,Me){return it||(lt[be]||lt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(be)]||RegExp("\\b"+S(Me)+"(?:\\b|\\w*\\d)","i").exec(x))&&Me})}function ve(at){return _(at,function(it,lt){return it||RegExp("\\b"+(lt.pattern||S(lt))+"\\b","i").exec(x)&&(lt.label||lt)})}function de(at){return _(at,function(it,lt){var Me=lt.pattern||S(lt);return!it&&(it=RegExp("\\b"+Me+"(?:/[\\d.]+|[ \\w.]*)","i").exec(x))&&(it=v(it,Me,lt.label||lt)),it})}function xe(at){return _(at,function(it,lt){var Me=lt.pattern||S(lt);return!it&&(it=RegExp("\\b"+Me+" *\\d+[.\\w_]*","i").exec(x)||RegExp("\\b"+Me+" *\\w+-[\\w]*","i").exec(x)||RegExp("\\b"+Me+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(x))&&((it=String(lt.label&&!RegExp(Me,"i").test(lt.label)?lt.label:it).split("/"))[1]&&!/[\d.]+/.test(it[0])&&(it[0]+=" "+it[1]),lt=lt.label||lt,it=E(it[0].replace(RegExp(Me,"i"),lt).replace(RegExp("; *(?:"+lt+"[_-])?","i")," ").replace(RegExp("("+lt+")[-_.]?(\\w)","i"),"$1 $2"))),it})}function Ke(at){return _(at,function(it,lt){return it||(RegExp(lt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(x)||0)[1]||null})}function Ve(){return this.description||""}if(Q&&(Q=[Q]),re&&!be&&(be=xe([re])),(le=/\bGoogle TV\b/.exec(be))&&(be=le[0]),/\bSimulator\b/i.test(x)&&(be=(be?be+" ":"")+"Simulator"),Z=="Opera Mini"&&/\bOPiOS\b/.test(x)&&fe.push("running in Turbo/Uncompressed mode"),Z=="IE"&&/\blike iPhone OS\b/.test(x)?(le=P(x.replace(/like iPhone OS/,"")),re=le.manufacturer,be=le.product):/^iP/.test(be)?(Z||(Z="Safari"),Y="iOS"+((le=/ OS ([\d_]+)/i.exec(x))?" "+le[1].replace(/_/g,"."):"")):Z=="Konqueror"&&!/buntu/i.test(Y)?Y="Kubuntu":re&&re!="Google"&&(/Chrome/.test(Z)&&!/\bMobile Safari\b/i.test(x)||/\bVita\b/.test(be))||/\bAndroid\b/.test(Y)&&/^Chrome/.test(Z)&&/\bVersion\//i.test(x)?(Z="Android Browser",Y=/\bAndroid\b/.test(Y)?Y:"Android"):Z=="Silk"?(/\bMobi/i.test(x)||(Y="Android",fe.unshift("desktop mode")),/Accelerated *= *true/i.test(x)&&fe.unshift("accelerated")):Z=="PaleMoon"&&(le=/\bFirefox\/([\d.]+)\b/.exec(x))?fe.push("identifying as Firefox "+le[1]):Z=="Firefox"&&(le=/\b(Mobile|Tablet|TV)\b/i.exec(x))?(Y||(Y="Firefox OS"),be||(be=le[1])):!Z||(le=!/\bMinefield\b/i.test(x)&&/\b(?:Firefox|Safari)\b/.exec(Z))?(Z&&!be&&/[\/,]|^[^(]+?\)/.test(x.slice(x.indexOf(le+"/")+8))&&(Z=null),(le=be||re||Y)&&(be||re||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Y))&&(Z=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Y)?Y:le)+" Browser")):Z=="Electron"&&(le=(/\bChrome\/([\d.]+)\b/.exec(x)||0)[1])&&fe.push("Chromium "+le),q||(q=Ke(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",S(Z),"(?:Firefox|Minefield|NetFront)"])),(le=Q=="iCab"&&parseFloat(q)>3&&"WebKit"||/\bOpera\b/.test(Z)&&(/\bOPR\b/.test(x)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(x)&&!/^(?:Trident|EdgeHTML)$/.test(Q)&&"WebKit"||!Q&&/\bMSIE\b/i.test(x)&&(Y=="Mac OS"?"Tasman":"Trident")||Q=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Z)&&"NetFront")&&(Q=[le]),Z=="IE"&&(le=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(x)||0)[1])?(Z+=" Mobile",Y="Windows Phone "+(/\+$/.test(le)?le:le+".x"),fe.unshift("desktop mode")):/\bWPDesktop\b/i.test(x)?(Z="IE Mobile",Y="Windows Phone 8.x",fe.unshift("desktop mode"),q||(q=(/\brv:([\d.]+)/.exec(x)||0)[1])):Z!="IE"&&Q=="Trident"&&(le=/\brv:([\d.]+)/.exec(x))&&(Z&&fe.push("identifying as "+Z+(q?" "+q:"")),Z="IE",q=le[1]),ae){if(t(b,"global"))if(W&&(le=W.lang.System,ye=le.getProperty("os.arch"),Y=Y||le.getProperty("os.name")+" "+le.getProperty("os.version")),G){try{q=b.require("ringo/engine").version.join("."),Z="RingoJS"}catch(at){(le=b.system)&&le.global.system==b.system&&(Z="Narwhal",Y||(Y=le[0].os||null))}Z||(Z="Rhino")}else typeof b.process=="object"&&!b.process.browser&&(le=b.process)&&(typeof le.versions=="object"&&(typeof le.versions.electron=="string"?(fe.push("Node "+le.versions.node),Z="Electron",q=le.versions.electron):typeof le.versions.nw=="string"&&(fe.push("Chromium "+q,"Node "+le.versions.node),Z="NW.js",q=le.versions.nw)),Z||(Z="Node.js",ye=le.arch,Y=le.platform,q=/[\d.]+/.exec(le.version),q=q?q[0]:null));else o(le=b.runtime)==z?(Z="Adobe AIR",Y=le.flash.system.Capabilities.os):o(le=b.phantom)==U?(Z="PhantomJS",q=(le=le.version||null)&&le.major+"."+le.minor+"."+le.patch):typeof ce.documentMode=="number"&&(le=/\bTrident\/(\d+)/i.exec(x))?(q=[q,ce.documentMode],(le=+le[1]+4)!=q[1]&&(fe.push("IE "+q[1]+" mode"),Q&&(Q[1]=""),q[1]=le),q=Z=="IE"?String(q[1].toFixed(1)):q[0]):typeof ce.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Z)&&(fe.push("masking as "+Z+" "+q),Z="IE",q="11.0",Q=["Trident"],Y="Windows");Y=Y&&E(Y)}if(q&&(le=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(q)||/(?:alpha|beta)(?: ?\d)?/i.exec(x+";"+(ae&&T.appMinorVersion))||/\bMinefield\b/i.test(x)&&"a")&&(ne=/b/i.test(le)?"beta":"alpha",q=q.replace(RegExp(le+"\\+?$"),"")+(ne=="beta"?ie:ee)+(/\d+\+?/.exec(le)||"")),Z=="Fennec"||Z=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Y))Z="Firefox Mobile";else if(Z=="Maxthon"&&q)q=q.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(be))be=="Xbox 360"&&(Y=null),be=="Xbox 360"&&/\bIEMobile\b/.test(x)&&fe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Z)||Z&&!be&&!/Browser|Mobi/.test(Z))&&(Y=="Windows CE"||/Mobi/i.test(x)))Z+=" Mobile";else if(Z=="IE"&&ae)try{b.external===null&&fe.unshift("platform preview")}catch(at){fe.unshift("embedded")}else(/\bBlackBerry\b/.test(be)||/\bBB10\b/.test(x))&&(le=(RegExp(be.replace(/ +/g," *")+"/([.\\d]+)","i").exec(x)||0)[1]||q)?(le=[le,/BB10/.test(x)],Y=(le[1]?(be=null,re="BlackBerry"):"Device Software")+" "+le[0],q=null):this!=n&&be!="Wii"&&(ae&&_e||/Opera/.test(Z)&&/\b(?:MSIE|Firefox)\b/i.test(x)||Z=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Y)||Z=="IE"&&(Y&&!/^Win/.test(Y)&&q>5.5||/\bWindows XP\b/.test(Y)&&q>8||q==8&&!/\bTrident\b/.test(x)))&&!s.test(le=P.call(n,x.replace(s,"")+";"))&&le.name&&(le="ing as "+le.name+((le=le.version)?" "+le:""),s.test(Z)?(/\bIE\b/.test(le)&&Y=="Mac OS"&&(Y=null),le="identify"+le):(le="mask"+le,Ce?Z=E(Ce.replace(/([a-z])([A-Z])/g,"$1 $2")):Z="Opera",/\bIE\b/.test(le)&&(Y=null),ae||(q=null)),Q=["Presto"],fe.push(le));(le=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(x)||0)[1])&&(le=[parseFloat(le.replace(/\.(\d)$/,".0$1")),le],Z=="Safari"&&le[1].slice(-1)=="+"?(Z="WebKit Nightly",ne="alpha",q=le[1].slice(0,-1)):(q==le[1]||q==(le[2]=(/\bSafari\/([\d.]+\+?)/i.exec(x)||0)[1]))&&(q=null),le[1]=(/\bChrome\/([\d.]+)/i.exec(x)||0)[1],le[0]==537.36&&le[2]==537.36&&parseFloat(le[1])>=28&&Q=="WebKit"&&(Q=["Blink"]),!ae||!N&&!le[1]?(Q&&(Q[1]="like Safari"),le=(le=le[0],le<400?1:le<500?2:le<526?3:le<533?4:le<534?"4+":le<535?5:le<537?6:le<538?7:le<601?8:"8")):(Q&&(Q[1]="like Chrome"),le=le[1]||(le=le[0],le<530?1:le<532?2:le<532.05?3:le<533?4:le<534.03?5:le<534.07?6:le<534.1?7:le<534.13?8:le<534.16?9:le<534.24?10:le<534.3?11:le<535.01?12:le<535.02?"13+":le<535.07?15:le<535.11?16:le<535.19?17:le<536.05?18:le<536.1?19:le<537.01?20:le<537.11?"21+":le<537.13?23:le<537.18?24:le<537.24?25:le<537.36?26:Q!="Blink"?"27":"28")),Q&&(Q[1]+=" "+(le+=typeof le=="number"?".x":/[.+]/.test(le)?"":"+")),Z=="Safari"&&(!q||parseInt(q)>45)&&(q=le)),Z=="Opera"&&(le=/\bzbov|zvav$/.exec(Y))?(Z+=" ",fe.unshift("desktop mode"),le=="zvav"?(Z+="Mini",q=null):Z+="Mobile",Y=Y.replace(RegExp(" *"+le+"$"),"")):Z=="Safari"&&/\bChrome\b/.exec(Q&&Q[1])&&(fe.unshift("desktop mode"),Z="Chrome Mobile",q=null,/\bOS X\b/.test(Y)?(re="Apple",Y="iOS 4.3+"):Y=null),q&&q.indexOf(le=/[\d.]+$/.exec(Y))==0&&x.indexOf("/"+le+"-")>-1&&(Y=i(Y.replace(le,""))),Q&&!/\b(?:Avant|Nook)\b/.test(Z)&&(/Browser|Lunascape|Maxthon/.test(Z)||Z!="Safari"&&/^iOS/.test(Y)&&/\bSafari\b/.test(Q[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Z)&&Q[1])&&((le=Q[Q.length-1])&&fe.push(le)),fe.length&&(fe=["("+fe.join("; ")+")"]),re&&be&&be.indexOf(re)<0&&fe.push("on "+re),be&&fe.push((/^on /.test(fe[fe.length-1])?"":"on ")+be),Y&&(le=/ ([\d.+]+)$/.exec(Y),se=le&&Y.charAt(Y.length-le[0].length-1)=="/",Y={architecture:32,family:le&&!se?Y.replace(le[0],""):Y,version:le?le[1]:null,toString:function(){var at=this.version;return this.family+(at&&!se?" "+at:"")+(this.architecture==64?" 64-bit":"")}}),(le=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(ye))&&!/\bi686\b/i.test(ye)?(Y&&(Y.architecture=64,Y.family=Y.family.replace(RegExp(" *"+le),"")),Z&&(/\bWOW64\b/i.test(x)||ae&&/\w(?:86|32)$/.test(T.cpuClass||T.platform)&&!/\bWin64; x64\b/i.test(x))&&fe.unshift("32-bit")):Y&&/^OS X/.test(Y.family)&&Z=="Chrome"&&parseFloat(q)>=39&&(Y.architecture=64),x||(x=null);var Xe={};return Xe.description=x,Xe.layout=Q&&Q[0],Xe.manufacturer=re,Xe.name=Z,Xe.prerelease=ne,Xe.product=be,Xe.ua=x,Xe.version=Z&&q,Xe.os=Y||{architecture:null,family:null,version:null,toString:function(){return"null"}},Xe.parse=P,Xe.toString=Ve,Xe.version&&fe.unshift(q),Xe.name&&fe.unshift(Z),Y&&Z&&!(Y==String(Y).split(" ")[0]&&(Y==Z.split(" ")[0]||be))&&fe.push(be?"("+Y+")":"on "+Y),fe.length&&(Xe.description=fe.join(" ")),Xe}var O=P();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(C.platform=O,define(function(){return O})):u&&m?n(O,function(x,b){u[b]=x}):C.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(j,J,I){(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?J.exports={nextTick:f}:J.exports=L;function f(C,D,u,m){if(typeof C!="function")throw new TypeError('"callback" argument must be a function');var w=arguments.length,p,s;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,m)});default:for(p=new Array(w-1),s=0;s<p.length;)p[s++]=arguments[s];return L.nextTick(function(){C.apply(null,p)})}}}).call(this,j("_process"))},{_process:208}],208:[function(j,J,I){var L=J.exports={},f,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"?f=setTimeout:f=D}catch(g){f=D}try{typeof clearTimeout=="function"?C=clearTimeout:C=u}catch(g){C=u}})();function m(g){if(f===setTimeout)return setTimeout(g,0);if((f===D||!f)&&setTimeout)return f=setTimeout,setTimeout(g,0);try{return f(g,0)}catch(E){try{return f.call(null,g,0)}catch(n){return f.call(this,g,0)}}}function w(g){if(C===clearTimeout)return clearTimeout(g);if((C===u||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(g);try{return C(g)}catch(E){try{return C.call(null,g)}catch(n){return C.call(this,g)}}}var p=[],s=!1,l,a=-1;function d(){if(!s||!l)return;s=!1,l.length?p=l.concat(p):a=-1,p.length&&h()}function h(){if(s)return;var g=m(d);s=!0;for(var E=p.length;E;){for(l=p,p=[];++a<E;)l&&l[a].run();a=-1,E=p.length}l=null,s=!1,w(g)}L.nextTick=function(g){var E=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)E[n-1]=arguments[n];p.push(new c(g,E)),p.length===1&&!s&&m(h)};function c(g,E){this.fun=g,this.array=E}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 v(){}L.on=v,L.addListener=v,L.once=v,L.off=v,L.removeListener=v,L.removeAllListeners=v,L.emit=v,L.prependListener=v,L.prependOnceListener=v,L.listeners=function(g){return[]},L.binding=function(g){throw new Error("process.binding is not supported")},L.cwd=function(){return"/"},L.chdir=function(g){throw new Error("process.chdir is not supported")},L.umask=function(){return 0}},{}],209:[function(j,J,I){(function(L){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(f){var C=typeof I=="object"&&I&&!I.nodeType&&I,D=typeof J=="object"&&J&&!J.nodeType&&J,u=typeof L=="object"&&L;(u.global===u||u.window===u||u.self===u)&&(f=u);var m,w=2147483647,p=36,s=1,l=26,a=38,d=700,h=72,c=128,v="-",g=/^xn--/,E=/[^\x20-\x7E]/,n=/[\x2E\u3002\uFF0E\uFF61]/g,o={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},t=p-s,S=Math.floor,_=String.fromCharCode,i;function P(H){throw new RangeError(o[H])}function O(H,U){for(var W=H.length,G=[];W--;)G[W]=U(H[W]);return G}function x(H,U){var W=H.split("@"),G="";W.length>1&&(G=W[0]+"@",H=W[1]),H=H.replace(n,".");var ee=H.split("."),ie=O(ee,U).join(".");return G+ie}function b(H){for(var U=[],W=0,G=H.length,ee,ie;W<G;)ee=H.charCodeAt(W++),ee>=55296&&ee<=56319&&W<G?(ie=H.charCodeAt(W++),(ie&64512)==56320?U.push(((ee&1023)<<10)+(ie&1023)+65536):(U.push(ee),W--)):U.push(ee);return U}function y(H){return O(H,function(U){var W="";return U>65535&&(U-=65536,W+=_(U>>>10&1023|55296),U=56320|U&1023),W+=_(U),W}).join("")}function T(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:p}function M(H,U){return H+22+75*(H<26)-((U!=0)<<5)}function k(H,U,W){var G=0;for(H=W?S(H/d):H>>1,H+=S(H/U);H>t*l>>1;G+=p)H=S(H/t);return S(G+(t+1)*H/(H+a))}function N(H){var U=[],W=H.length,G,ee=0,ie=c,ce=h,_e,Ce,le,ye,fe,ne,ae,q,se;for(_e=H.lastIndexOf(v),_e<0&&(_e=0),Ce=0;Ce<_e;++Ce)H.charCodeAt(Ce)>=128&&P("not-basic"),U.push(H.charCodeAt(Ce));for(le=_e>0?_e+1:0;le<W;){for(ye=ee,fe=1,ne=p;!(le>=W&&P("invalid-input"),ae=T(H.charCodeAt(le++)),(ae>=p||ae>S((w-ee)/fe))&&P("overflow"),ee+=ae*fe,q=ne<=ce?s:ne>=ce+l?l:ne-ce,ae<q);ne+=p)se=p-q,fe>S(w/se)&&P("overflow"),fe*=se;G=U.length+1,ce=k(ee-ye,G,ye==0),S(ee/G)>w-ie&&P("overflow"),ie+=S(ee/G),ee%=G,U.splice(ee++,0,ie)}return y(U)}function K(H){var U,W,G,ee,ie,ce,_e,Ce,le,ye,fe,ne=[],ae,q,se,Q;for(H=b(H),ae=H.length,U=c,W=0,ie=h,ce=0;ce<ae;++ce)fe=H[ce],fe<128&&ne.push(_(fe));for(G=ee=ne.length,ee&&ne.push(v);G<ae;){for(_e=w,ce=0;ce<ae;++ce)fe=H[ce],fe>=U&&fe<_e&&(_e=fe);for(q=G+1,_e-U>S((w-W)/q)&&P("overflow"),W+=(_e-U)*q,U=_e,ce=0;ce<ae;++ce)if(fe=H[ce],fe<U&&++W>w&&P("overflow"),fe==U){for(Ce=W,le=p;!(ye=le<=ie?s:le>=ie+l?l:le-ie,Ce<ye);le+=p)Q=Ce-ye,se=p-ye,ne.push(_(M(ye+Q%se,0))),Ce=S(Q/se);ne.push(_(M(Ce,0))),ie=k(W,q,G==ee),W=0,++G}++W,++U}return ne.join("")}function z(H){return x(H,function(U){return g.test(U)?N(U.slice(4).toLowerCase()):U})}function B(H){return x(H,function(U){return E.test(U)?"xn--"+K(U):U})}if(m={version:"1.4.1",ucs2:{decode:b,encode:y},decode:N,encode:K,toASCII:B,toUnicode:z},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return m});else if(C&&D)if(J.exports==C)D.exports=m;else for(i in m)m.hasOwnProperty(i)&&(C[i]=m[i]);else f.punycode=m})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(j,J,I){"use strict";function L(C,D){return Object.prototype.hasOwnProperty.call(C,D)}J.exports=function(C,D,u,m){D=D||"&",u=u||"=";var w={};if(typeof C!="string"||C.length===0)return w;var p=/\+/g;C=C.split(D);var s=1e3;m&&typeof m.maxKeys=="number"&&(s=m.maxKeys);var l=C.length;s>0&&l>s&&(l=s);for(var a=0;a<l;++a){var d=C[a].replace(p,"%20"),h=d.indexOf(u),c,v,g,E;h>=0?(c=d.substr(0,h),v=d.substr(h+1)):(c=d,v=""),g=decodeURIComponent(c),E=decodeURIComponent(v),L(w,g)?f(w[g])?w[g].push(E):w[g]=[w[g],E]:w[g]=E}return w};var f=Array.isArray||function(C){return Object.prototype.toString.call(C)==="[object Array]"}},{}],211:[function(j,J,I){"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""}};J.exports=function(u,m,w,p){return m=m||"&",w=w||"=",u===null&&(u=void 0),typeof u=="object"?C(D(u),function(s){var l=encodeURIComponent(L(s))+w;return f(u[s])?C(u[s],function(a){return l+encodeURIComponent(L(a))}).join(m):l+encodeURIComponent(L(u[s]))}).join(m):p?encodeURIComponent(L(p))+w+encodeURIComponent(L(u)):""};var f=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"};function C(u,m){if(u.map)return u.map(m);for(var w=[],p=0;p<u.length;p++)w.push(m(u[p],p));return w}var D=Object.keys||function(u){var m=[];for(var w in u)Object.prototype.hasOwnProperty.call(u,w)&&m.push(w);return m}},{}],212:[function(j,J,I){"use strict";I.decode=I.parse=j("./decode"),I.encode=I.stringify=j("./encode")},{"./decode":210,"./encode":211}],213:[function(j,J,I){J.exports=j("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(j,J,I){"use strict";var L=j("babel-runtime/core-js/object/create"),f=u(L),C=j("babel-runtime/core-js/object/keys"),D=u(C);function u(E){return E&&E.__esModule?E:{default:E}}var m=j("process-nextick-args"),w=D.default||function(E){var n=[];for(var o in E)n.push(o);return n};J.exports=c;var p=(0,f.default)(j("core-util-is"));p.inherits=j("inherits");var s=j("./_stream_readable"),l=j("./_stream_writable");p.inherits(c,s);for(var a=w(l.prototype),d=0;d<a.length;d++){var h=a[d];c.prototype[h]||(c.prototype[h]=l.prototype[h])}function c(E){if(!(this instanceof c))return new c(E);s.call(this,E),l.call(this,E),E&&E.readable===!1&&(this.readable=!1),E&&E.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,E&&E.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",v)}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function v(){if(this.allowHalfOpen||this._writableState.ended)return;m.nextTick(g,this)}function g(E){E.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(E,n){this.push(null),this.end(),m.nextTick(n,E)}},{"./_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,J,I){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(w){return w&&w.__esModule?w:{default:w}}J.exports=m;var D=j("./_stream_transform"),u=(0,f.default)(j("core-util-is"));u.inherits=j("inherits"),u.inherits(m,D);function m(w){if(!(this instanceof m))return new m(w);D.call(this,w)}m.prototype._transform=function(w,p,s){s(null,w)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(j,J,I){(function(L,f){"use strict";var C=j("babel-runtime/core-js/object/get-prototype-of"),D=w(C),u=j("babel-runtime/core-js/object/create"),m=w(u);function w(Q){return Q&&Q.__esModule?Q:{default:Q}}var p=j("process-nextick-args");J.exports=b;var s=j("isarray"),l;b.ReadableState=x;var a=j("events").EventEmitter,d=function(Z,be){return Z.listeners(be).length},h=j("./internal/streams/stream"),c=j("safe-buffer").Buffer,v=f.Uint8Array||function(){};function g(Q){return c.from(Q)}function E(Q){return c.isBuffer(Q)||Q instanceof v}var n=(0,m.default)(j("core-util-is"));n.inherits=j("inherits");var o=j("util"),t=void 0;o&&o.debuglog?t=o.debuglog("stream"):t=function(){};var S=j("./internal/streams/BufferList"),_=j("./internal/streams/destroy"),i;n.inherits(b,h);var P=["error","close","destroy","pause","resume"];function O(Q,Z,be){if(typeof Q.prependListener=="function")return Q.prependListener(Z,be);!Q._events||!Q._events[Z]?Q.on(Z,be):s(Q._events[Z])?Q._events[Z].unshift(be):Q._events[Z]=[be,Q._events[Z]]}function x(Q,Z){l=l||j("./_stream_duplex"),Q=Q||{};var be=Z instanceof l;this.objectMode=!!Q.objectMode,be&&(this.objectMode=this.objectMode||!!Q.readableObjectMode);var re=Q.highWaterMark,Y=Q.readableHighWaterMark,X=this.objectMode?16:16*1024;re||re===0?this.highWaterMark=re:be&&(Y||Y===0)?this.highWaterMark=Y: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=Q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Q.encoding&&(i||(i=j("string_decoder/").StringDecoder),this.decoder=new i(Q.encoding),this.encoding=Q.encoding)}function b(Q){if(l=l||j("./_stream_duplex"),!(this instanceof b))return new b(Q);this._readableState=new x(Q,this),this.readable=!0,Q&&(typeof Q.read=="function"&&(this._read=Q.read),typeof Q.destroy=="function"&&(this._destroy=Q.destroy)),h.call(this)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Z){if(!this._readableState)return;this._readableState.destroyed=Z}}),b.prototype.destroy=_.destroy,b.prototype._undestroy=_.undestroy,b.prototype._destroy=function(Q,Z){this.push(null),Z(Q)},b.prototype.push=function(Q,Z){var be=this._readableState,re;return be.objectMode?re=!0:typeof Q=="string"&&(Z=Z||be.defaultEncoding,Z!==be.encoding&&(Q=c.from(Q,Z),Z=""),re=!0),y(this,Q,Z,!1,re)},b.prototype.unshift=function(Q){return y(this,Q,null,!0,!1)};function y(Q,Z,be,re,Y){var X=Q._readableState;if(Z===null)X.reading=!1,B(Q,X);else{var $;Y||($=M(X,Z)),$?Q.emit("error",$):X.objectMode||Z&&Z.length>0?(typeof Z!="string"&&!X.objectMode&&(0,D.default)(Z)!==c.prototype&&(Z=g(Z)),re?X.endEmitted?Q.emit("error",new Error("stream.unshift() after end event")):T(Q,X,Z,!0):X.ended?Q.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!be?(Z=X.decoder.write(Z),X.objectMode||Z.length!==0?T(Q,X,Z,!1):W(Q,X)):T(Q,X,Z,!1))):re||(X.reading=!1)}return k(X)}function T(Q,Z,be,re){Z.flowing&&Z.length===0&&!Z.sync?(Q.emit("data",be),Q.read(0)):(Z.length+=Z.objectMode?1:be.length,re?Z.buffer.unshift(be):Z.buffer.push(be),Z.needReadable&&H(Q)),W(Q,Z)}function M(Q,Z){var be;return!E(Z)&&typeof Z!="string"&&Z!==void 0&&!Q.objectMode&&(be=new TypeError("Invalid non-string/buffer chunk")),be}function k(Q){return!Q.ended&&(Q.needReadable||Q.length<Q.highWaterMark||Q.length===0)}b.prototype.isPaused=function(){return this._readableState.flowing===!1},b.prototype.setEncoding=function(Q){return i||(i=j("string_decoder/").StringDecoder),this._readableState.decoder=new i(Q),this._readableState.encoding=Q,this};var N=8388608;function K(Q){return Q>=N?Q=N:(Q--,Q|=Q>>>1,Q|=Q>>>2,Q|=Q>>>4,Q|=Q>>>8,Q|=Q>>>16,Q++),Q}function z(Q,Z){return Q<=0||Z.length===0&&Z.ended?0:Z.objectMode?1:Q!==Q?Z.flowing&&Z.length?Z.buffer.head.data.length:Z.length:(Q>Z.highWaterMark&&(Z.highWaterMark=K(Q)),Q<=Z.length?Q:Z.ended?Z.length:(Z.needReadable=!0,0))}b.prototype.read=function(Q){t("read",Q),Q=parseInt(Q,10);var Z=this._readableState,be=Q;if(Q!==0&&(Z.emittedReadable=!1),Q===0&&Z.needReadable&&(Z.length>=Z.highWaterMark||Z.ended))return t("read: emitReadable",Z.length,Z.ended),Z.length===0&&Z.ended?ae(this):H(this),null;if(Q=z(Q,Z),Q===0&&Z.ended)return Z.length===0&&ae(this),null;var re=Z.needReadable;t("need readable",re),(Z.length===0||Z.length-Q<Z.highWaterMark)&&(re=!0,t("length less than watermark",re)),Z.ended||Z.reading?(re=!1,t("reading or ended",re)):re&&(t("do read"),Z.reading=!0,Z.sync=!0,Z.length===0&&(Z.needReadable=!0),this._read(Z.highWaterMark),Z.sync=!1,Z.reading||(Q=z(be,Z)));var Y;return Q>0?Y=le(Q,Z):Y=null,Y===null?(Z.needReadable=!0,Q=0):Z.length-=Q,Z.length===0&&(Z.ended||(Z.needReadable=!0),be!==Q&&Z.ended&&ae(this)),Y!==null&&this.emit("data",Y),Y};function B(Q,Z){if(Z.ended)return;if(Z.decoder){var be=Z.decoder.end();be&&be.length&&(Z.buffer.push(be),Z.length+=Z.objectMode?1:be.length)}Z.ended=!0,H(Q)}function H(Q){var Z=Q._readableState;Z.needReadable=!1,Z.emittedReadable||(t("emitReadable",Z.flowing),Z.emittedReadable=!0,Z.sync?p.nextTick(U,Q):U(Q))}function U(Q){t("emit readable"),Q.emit("readable"),Ce(Q)}function W(Q,Z){Z.readingMore||(Z.readingMore=!0,p.nextTick(G,Q,Z))}function G(Q,Z){for(var be=Z.length;!Z.reading&&!Z.flowing&&!Z.ended&&Z.length<Z.highWaterMark&&!(t("maybeReadMore read 0"),Q.read(0),be===Z.length);)be=Z.length;Z.readingMore=!1}b.prototype._read=function(Q){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(Q,Z){var be=this,re=this._readableState;switch(re.pipesCount){case 0:re.pipes=Q;break;case 1:re.pipes=[re.pipes,Q];break;default:re.pipes.push(Q);break}re.pipesCount+=1,t("pipe count=%d opts=%j",re.pipesCount,Z);var Y=(!Z||Z.end!==!1)&&Q!==L.stdout&&Q!==L.stderr,X=Y?ve:Me;re.endEmitted?p.nextTick(X):be.once("end",X),Q.on("unpipe",$);function $(Te,Ye){t("onunpipe"),Te===be&&(Ye&&Ye.hasUnpiped===!1&&(Ye.hasUnpiped=!0,Ke()))}function ve(){t("onend"),Q.end()}var de=ee(be);Q.on("drain",de);var xe=!1;function Ke(){t("cleanup"),Q.removeListener("close",it),Q.removeListener("finish",lt),Q.removeListener("drain",de),Q.removeListener("error",at),Q.removeListener("unpipe",$),be.removeListener("end",ve),be.removeListener("end",Me),be.removeListener("data",Xe),xe=!0,re.awaitDrain&&(!Q._writableState||Q._writableState.needDrain)&&de()}var Ve=!1;be.on("data",Xe);function Xe(Te){t("ondata"),Ve=!1;var Ye=Q.write(Te);Ye===!1&&!Ve&&((re.pipesCount===1&&re.pipes===Q||re.pipesCount>1&&se(re.pipes,Q)!==-1)&&!xe&&(t("false write response, pause",be._readableState.awaitDrain),be._readableState.awaitDrain++,Ve=!0),be.pause())}function at(Te){t("onerror",Te),Me(),Q.removeListener("error",at),d(Q,"error")===0&&Q.emit("error",Te)}O(Q,"error",at);function it(){Q.removeListener("finish",lt),Me()}Q.once("close",it);function lt(){t("onfinish"),Q.removeListener("close",it),Me()}Q.once("finish",lt);function Me(){t("unpipe"),be.unpipe(Q)}return Q.emit("pipe",be),re.flowing||(t("pipe resume"),be.resume()),Q};function ee(Q){return function(){var Z=Q._readableState;t("pipeOnDrain",Z.awaitDrain),Z.awaitDrain&&Z.awaitDrain--,Z.awaitDrain===0&&d(Q,"data")&&(Z.flowing=!0,Ce(Q))}}b.prototype.unpipe=function(Q){var Z=this._readableState,be={hasUnpiped:!1};if(Z.pipesCount===0)return this;if(Z.pipesCount===1)return Q&&Q!==Z.pipes?this:(Q||(Q=Z.pipes),Z.pipes=null,Z.pipesCount=0,Z.flowing=!1,Q&&Q.emit("unpipe",this,be),this);if(!Q){var re=Z.pipes,Y=Z.pipesCount;Z.pipes=null,Z.pipesCount=0,Z.flowing=!1;for(var X=0;X<Y;X++)re[X].emit("unpipe",this,be);return this}var $=se(Z.pipes,Q);return $===-1?this:(Z.pipes.splice($,1),Z.pipesCount-=1,Z.pipesCount===1&&(Z.pipes=Z.pipes[0]),Q.emit("unpipe",this,be),this)},b.prototype.on=function(Q,Z){var be=h.prototype.on.call(this,Q,Z);if(Q==="data")this._readableState.flowing!==!1&&this.resume();else if(Q==="readable"){var re=this._readableState;!re.endEmitted&&!re.readableListening&&(re.readableListening=re.needReadable=!0,re.emittedReadable=!1,re.reading?re.length&&H(this):p.nextTick(ie,this))}return be},b.prototype.addListener=b.prototype.on;function ie(Q){t("readable nexttick read 0"),Q.read(0)}b.prototype.resume=function(){var Q=this._readableState;return Q.flowing||(t("resume"),Q.flowing=!0,ce(this,Q)),this};function ce(Q,Z){Z.resumeScheduled||(Z.resumeScheduled=!0,p.nextTick(_e,Q,Z))}function _e(Q,Z){Z.reading||(t("resume read 0"),Q.read(0)),Z.resumeScheduled=!1,Z.awaitDrain=0,Q.emit("resume"),Ce(Q),Z.flowing&&!Z.reading&&Q.read(0)}b.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 Ce(Q){var Z=Q._readableState;for(t("flow",Z.flowing);Z.flowing&&Q.read()!==null;);}b.prototype.wrap=function(Q){var Z=this,be=this._readableState,re=!1;Q.on("end",function(){if(t("wrapped end"),be.decoder&&!be.ended){var $=be.decoder.end();$&&$.length&&Z.push($)}Z.push(null)}),Q.on("data",function($){if(t("wrapped data"),be.decoder&&($=be.decoder.write($)),be.objectMode&&$==null)return;if(!be.objectMode&&(!$||!$.length))return;var ve=Z.push($);ve||(re=!0,Q.pause())});for(var Y in Q)this[Y]===void 0&&typeof Q[Y]=="function"&&(this[Y]=function($){return function(){return Q[$].apply(Q,arguments)}}(Y));for(var X=0;X<P.length;X++)Q.on(P[X],this.emit.bind(this,P[X]));return this._read=function($){t("wrapped _read",$),re&&(re=!1,Q.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=le;function le(Q,Z){if(Z.length===0)return null;var be;return Z.objectMode?be=Z.buffer.shift():!Q||Q>=Z.length?(Z.decoder?be=Z.buffer.join(""):Z.buffer.length===1?be=Z.buffer.head.data:be=Z.buffer.concat(Z.length),Z.buffer.clear()):be=ye(Q,Z.buffer,Z.decoder),be}function ye(Q,Z,be){var re;return Q<Z.head.data.length?(re=Z.head.data.slice(0,Q),Z.head.data=Z.head.data.slice(Q)):Q===Z.head.data.length?re=Z.shift():re=be?fe(Q,Z):ne(Q,Z),re}function fe(Q,Z){var be=Z.head,re=1,Y=be.data;for(Q-=Y.length;be=be.next;){var X=be.data,$=Q>X.length?X.length:Q;if($===X.length?Y+=X:Y+=X.slice(0,Q),Q-=$,Q===0){$===X.length?(++re,be.next?Z.head=be.next:Z.head=Z.tail=null):(Z.head=be,be.data=X.slice($));break}++re}return Z.length-=re,Y}function ne(Q,Z){var be=c.allocUnsafe(Q),re=Z.head,Y=1;for(re.data.copy(be),Q-=re.data.length;re=re.next;){var X=re.data,$=Q>X.length?X.length:Q;if(X.copy(be,be.length-Q,0,$),Q-=$,Q===0){$===X.length?(++Y,re.next?Z.head=re.next:Z.head=Z.tail=null):(Z.head=re,re.data=X.slice($));break}++Y}return Z.length-=Y,be}function ae(Q){var Z=Q._readableState;if(Z.length>0)throw new Error('"endReadable()" called on non-empty stream');Z.endEmitted||(Z.ended=!0,p.nextTick(q,Z,Q))}function q(Q,Z){!Q.endEmitted&&Q.length===0&&(Q.endEmitted=!0,Z.readable=!1,Z.emit("end"))}function se(Q,Z){for(var be=0,re=Q.length;be<re;be++)if(Q[be]===Z)return be;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,J,I){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(l){return l&&l.__esModule?l:{default:l}}J.exports=w;var D=j("./_stream_duplex"),u=(0,f.default)(j("core-util-is"));u.inherits=j("inherits"),u.inherits(w,D);function m(l,a){var d=this._transformState;d.transforming=!1;var h=d.writecb;if(!h)return this.emit("error",new Error("write callback called multiple times"));d.writechunk=null,d.writecb=null,a!=null&&this.push(a),h(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:m.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",p)}function p(){var l=this;typeof this._flush=="function"?this._flush(function(a,d){s(l,a,d)}):s(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,d){throw new Error("_transform() is not implemented")},w.prototype._write=function(l,a,d){var h=this._transformState;if(h.writecb=d,h.writechunk=l,h.writeencoding=a,!h.transforming){var c=this._readableState;(h.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 d=this;D.prototype._destroy.call(this,l,function(h){a(h),d.emit("close")})};function s(l,a,d){if(a)return l.emit("error",a);if(d!=null&&l.push(d),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,J,I){(function(L,f){"use strict";var C=j("babel-runtime/core-js/object/define-property"),D=h(C),u=j("babel-runtime/core-js/symbol/has-instance"),m=h(u),w=j("babel-runtime/core-js/symbol"),p=h(w),s=j("babel-runtime/core-js/object/create"),l=h(s),a=j("babel-runtime/core-js/set-immediate"),d=h(a);function h(ne){return ne&&ne.__esModule?ne:{default:ne}}var c=j("process-nextick-args");J.exports=M;function v(ne,ae,q){this.chunk=ne,this.encoding=ae,this.callback=q,this.next=null}function g(ne){var ae=this;this.next=null,this.entry=null,this.finish=function(){fe(ae,ne)}}var E=!L.browser&&["v0.10","v0.9."].indexOf(L.version.slice(0,5))>-1?d.default:c.nextTick,n;M.WritableState=y;var o=(0,l.default)(j("core-util-is"));o.inherits=j("inherits");var t={deprecate:j("util-deprecate")},S=j("./internal/streams/stream"),_=j("safe-buffer").Buffer,i=f.Uint8Array||function(){};function P(ne){return _.from(ne)}function O(ne){return _.isBuffer(ne)||ne instanceof i}var x=j("./internal/streams/destroy");o.inherits(M,S);function b(){}function y(ne,ae){n=n||j("./_stream_duplex"),ne=ne||{};var q=ae instanceof n;this.objectMode=!!ne.objectMode,q&&(this.objectMode=this.objectMode||!!ne.writableObjectMode);var se=ne.highWaterMark,Q=ne.writableHighWaterMark,Z=this.objectMode?16:16*1024;se||se===0?this.highWaterMark=se:q&&(Q||Q===0)?this.highWaterMark=Q: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 be=ne.decodeStrings===!1;this.decodeStrings=!be,this.defaultEncoding=ne.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(re){W(ae,re)},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 g(this)}y.prototype.getBuffer=function(){for(var ae=this.bufferedRequest,q=[];ae;)q.push(ae),ae=ae.next;return q},function(){try{Object.defineProperty(y.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ne){}}();var T;typeof p.default=="function"&&m.default&&typeof Function.prototype[m.default]=="function"?(T=Function.prototype[m.default],(0,D.default)(M,m.default,{value:function(ae){return T.call(this,ae)?!0:this!==M?!1:ae&&ae._writableState instanceof y}})):T=function(ae){return ae 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 y(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 k(ne,ae){var q=new Error("write after end");ne.emit("error",q),c.nextTick(ae,q)}function N(ne,ae,q,se){var Q=!0,Z=!1;return q===null?Z=new TypeError("May not write null values to stream"):typeof q!="string"&&q!==void 0&&!ae.objectMode&&(Z=new TypeError("Invalid non-string/buffer chunk")),Z&&(ne.emit("error",Z),c.nextTick(se,Z),Q=!1),Q}M.prototype.write=function(ne,ae,q){var se=this._writableState,Q=!1,Z=!se.objectMode&&O(ne);return Z&&!_.isBuffer(ne)&&(ne=P(ne)),typeof ae=="function"&&(q=ae,ae=null),Z?ae="buffer":ae||(ae=se.defaultEncoding),typeof q!="function"&&(q=b),se.ended?k(this,q):(Z||N(this,se,ne,q))&&(se.pendingcb++,Q=z(this,se,Z,ne,ae,q)),Q},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&&ie(this,ne))},M.prototype.setDefaultEncoding=function(ae){if(typeof ae=="string"&&(ae=ae.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ae+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ae);return this._writableState.defaultEncoding=ae,this};function K(ne,ae,q){return!ne.objectMode&&ne.decodeStrings!==!1&&typeof ae=="string"&&(ae=_.from(ae,q)),ae}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(ne,ae,q,se,Q,Z){if(!q){var be=K(ae,se,Q);se!==be&&(q=!0,Q="buffer",se=be)}var re=ae.objectMode?1:se.length;ae.length+=re;var Y=ae.length<ae.highWaterMark;if(Y||(ae.needDrain=!0),ae.writing||ae.corked){var X=ae.lastBufferedRequest;ae.lastBufferedRequest={chunk:se,encoding:Q,isBuf:q,callback:Z,next:null},X?X.next=ae.lastBufferedRequest:ae.bufferedRequest=ae.lastBufferedRequest,ae.bufferedRequestCount+=1}else B(ne,ae,!1,re,se,Q,Z);return Y}function B(ne,ae,q,se,Q,Z,be){ae.writelen=se,ae.writecb=be,ae.writing=!0,ae.sync=!0,q?ne._writev(Q,ae.onwrite):ne._write(Q,Z,ae.onwrite),ae.sync=!1}function H(ne,ae,q,se,Q){--ae.pendingcb,q?(c.nextTick(Q,se),c.nextTick(le,ne,ae),ne._writableState.errorEmitted=!0,ne.emit("error",se)):(Q(se),ne._writableState.errorEmitted=!0,ne.emit("error",se),le(ne,ae))}function U(ne){ne.writing=!1,ne.writecb=null,ne.length-=ne.writelen,ne.writelen=0}function W(ne,ae){var q=ne._writableState,se=q.sync,Q=q.writecb;if(U(q),ae)H(ne,q,se,ae,Q);else{var Z=ce(q);!Z&&!q.corked&&!q.bufferProcessing&&q.bufferedRequest&&ie(ne,q),se?E(G,ne,q,Z,Q):G(ne,q,Z,Q)}}function G(ne,ae,q,se){q||ee(ne,ae),ae.pendingcb--,se(),le(ne,ae)}function ee(ne,ae){ae.length===0&&ae.needDrain&&(ae.needDrain=!1,ne.emit("drain"))}function ie(ne,ae){ae.bufferProcessing=!0;var q=ae.bufferedRequest;if(ne._writev&&q&&q.next){var se=ae.bufferedRequestCount,Q=new Array(se),Z=ae.corkedRequestsFree;Z.entry=q;for(var be=0,re=!0;q;)Q[be]=q,q.isBuf||(re=!1),q=q.next,be+=1;Q.allBuffers=re,B(ne,ae,!0,ae.length,Q,"",Z.finish),ae.pendingcb++,ae.lastBufferedRequest=null,Z.next?(ae.corkedRequestsFree=Z.next,Z.next=null):ae.corkedRequestsFree=new g(ae),ae.bufferedRequestCount=0}else{for(;q;){var Y=q.chunk,X=q.encoding,$=q.callback,ve=ae.objectMode?1:Y.length;if(B(ne,ae,!1,ve,Y,X,$),q=q.next,ae.bufferedRequestCount--,ae.writing)break}q===null&&(ae.lastBufferedRequest=null)}ae.bufferedRequest=q,ae.bufferProcessing=!1}M.prototype._write=function(ne,ae,q){q(new Error("_write() is not implemented"))},M.prototype._writev=null,M.prototype.end=function(ne,ae,q){var se=this._writableState;typeof ne=="function"?(q=ne,ne=null,ae=null):typeof ae=="function"&&(q=ae,ae=null),ne!=null&&this.write(ne,ae),se.corked&&(se.corked=1,this.uncork()),!se.ending&&!se.finished&&ye(this,se,q)};function ce(ne){return ne.ending&&ne.length===0&&ne.bufferedRequest===null&&!ne.finished&&!ne.writing}function _e(ne,ae){ne._final(function(q){ae.pendingcb--,q&&ne.emit("error",q),ae.prefinished=!0,ne.emit("prefinish"),le(ne,ae)})}function Ce(ne,ae){!ae.prefinished&&!ae.finalCalled&&(typeof ne._final=="function"?(ae.pendingcb++,ae.finalCalled=!0,c.nextTick(_e,ne,ae)):(ae.prefinished=!0,ne.emit("prefinish")))}function le(ne,ae){var q=ce(ae);return q&&(Ce(ne,ae),ae.pendingcb===0&&(ae.finished=!0,ne.emit("finish"))),q}function ye(ne,ae,q){ae.ending=!0,le(ne,ae),q&&(ae.finished?c.nextTick(q):ne.once("finish",q)),ae.ended=!0,ne.writable=!1}function fe(ne,ae,q){var se=ne.entry;for(ne.entry=null;se;){var Q=se.callback;ae.pendingcb--,Q(q),se=se.next}ae.corkedRequestsFree?ae.corkedRequestsFree.next=ne:ae.corkedRequestsFree=ne}Object.defineProperty(M.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ae){if(!this._writableState)return;this._writableState.destroyed=ae}}),M.prototype.destroy=x.destroy,M.prototype._undestroy=x.undestroy,M.prototype._destroy=function(ne,ae){this.end(),ae(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,J,I){"use strict";function L(u,m){if(!(u instanceof m))throw new TypeError("Cannot call a class as a function")}var f=j("safe-buffer").Buffer,C=j("util");function D(u,m,w){u.copy(m,w)}J.exports=function(){function u(){L(this,u),this.head=null,this.tail=null,this.length=0}return u.prototype.push=function(w){var p={data:w,next:null};this.length>0?this.tail.next=p:this.head=p,this.tail=p,++this.length},u.prototype.unshift=function(w){var p={data:w,next:this.head};this.length===0&&(this.tail=p),this.head=p,++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 p=this.head,s=""+p.data;p=p.next;)s+=w+p.data;return s},u.prototype.concat=function(w){if(this.length===0)return f.alloc(0);if(this.length===1)return this.head.data;for(var p=f.allocUnsafe(w>>>0),s=this.head,l=0;s;)D(s.data,p,l),l+=s.data.length,s=s.next;return p},u}(),C&&C.inspect&&C.inspect.custom&&(J.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,J,I){"use strict";var L=j("process-nextick-args");function f(u,m){var w=this,p=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return p||s?(m?m(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){!m&&l?(L.nextTick(D,w,l),w._writableState&&(w._writableState.errorEmitted=!0)):m&&m(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,m){u.emit("error",m)}J.exports={destroy:f,undestroy:C}},{"process-nextick-args":207}],221:[function(j,J,I){"use strict";J.exports=j("events").EventEmitter},{events:192}],222:[function(j,J,I){J.exports=j("./readable").PassThrough},{"./readable":223}],223:[function(j,J,I){I=J.exports=j("./lib/_stream_readable.js"),I.Stream=I,I.Readable=I,I.Writable=j("./lib/_stream_writable.js"),I.Duplex=j("./lib/_stream_duplex.js"),I.Transform=j("./lib/_stream_transform.js"),I.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,J,I){J.exports=j("./readable").Transform},{"./readable":223}],225:[function(j,J,I){J.exports=j("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(j,J,I){var L=function(){return this}()||Function("return this")(),f=L.regeneratorRuntime&&Object.getOwnPropertyNames(L).indexOf("regeneratorRuntime")>=0,C=f&&L.regeneratorRuntime;if(L.regeneratorRuntime=void 0,J.exports=j("./runtime"),f)L.regeneratorRuntime=C;else try{delete L.regeneratorRuntime}catch(D){L.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(j,J,I){!function(L){"use strict";var f=Object.prototype,C=f.hasOwnProperty,D,u=typeof Symbol=="function"?Symbol:{},m=u.iterator||"@@iterator",w=u.asyncIterator||"@@asyncIterator",p=u.toStringTag||"@@toStringTag",s=typeof J=="object",l=L.regeneratorRuntime;if(l){s&&(J.exports=l);return}l=L.regeneratorRuntime=s?J.exports:{};function a(z,B,H,U){var W=B&&B.prototype instanceof n?B:n,G=Object.create(W.prototype),ee=new k(U||[]);return G._invoke=b(z,H,ee),G}l.wrap=a;function d(z,B,H){try{return{type:"normal",arg:z.call(B,H)}}catch(U){return{type:"throw",arg:U}}}var h="suspendedStart",c="suspendedYield",v="executing",g="completed",E={};function n(){}function o(){}function t(){}var S={};S[m]=function(){return this};var _=Object.getPrototypeOf,i=_&&_(_(N([])));i&&i!==f&&C.call(i,m)&&(S=i);var P=t.prototype=n.prototype=Object.create(S);o.prototype=P.constructor=t,t.constructor=o,t[p]=o.displayName="GeneratorFunction";function O(z){["next","throw","return"].forEach(function(B){z[B]=function(H){return this._invoke(B,H)}})}l.isGeneratorFunction=function(z){var B=typeof z=="function"&&z.constructor;return B?B===o||(B.displayName||B.name)==="GeneratorFunction":!1},l.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,t):(z.__proto__=t,p in z||(z[p]="GeneratorFunction")),z.prototype=Object.create(P),z},l.awrap=function(z){return{__await:z}};function x(z){function B(W,G,ee,ie){var ce=d(z[W],z,G);if(ce.type==="throw")ie(ce.arg);else{var _e=ce.arg,Ce=_e.value;return Ce&&typeof Ce=="object"&&C.call(Ce,"__await")?Promise.resolve(Ce.__await).then(function(le){B("next",le,ee,ie)},function(le){B("throw",le,ee,ie)}):Promise.resolve(Ce).then(function(le){_e.value=le,ee(_e)},ie)}}var H;function U(W,G){function ee(){return new Promise(function(ie,ce){B(W,G,ie,ce)})}return H=H?H.then(ee,ee):ee()}this._invoke=U}O(x.prototype),x.prototype[w]=function(){return this},l.AsyncIterator=x,l.async=function(z,B,H,U){var W=new x(a(z,B,H,U));return l.isGeneratorFunction(B)?W:W.next().then(function(G){return G.done?G.value:W.next()})};function b(z,B,H){var U=h;return function(G,ee){if(U===v)throw new Error("Generator is already running");if(U===g){if(G==="throw")throw ee;return K()}for(H.method=G,H.arg=ee;;){var ie=H.delegate;if(ie){var ce=y(ie,H);if(ce){if(ce===E)continue;return ce}}if(H.method==="next")H.sent=H._sent=H.arg;else if(H.method==="throw"){if(U===h)throw U=g,H.arg;H.dispatchException(H.arg)}else H.method==="return"&&H.abrupt("return",H.arg);U=v;var _e=d(z,B,H);if(_e.type==="normal"){if(U=H.done?g:c,_e.arg===E)continue;return{value:_e.arg,done:H.done}}else _e.type==="throw"&&(U=g,H.method="throw",H.arg=_e.arg)}}}function y(z,B){var H=z.iterator[B.method];if(H===D){if(B.delegate=null,B.method==="throw"){if(z.iterator.return&&(B.method="return",B.arg=D,y(z,B),B.method==="throw"))return E;B.method="throw",B.arg=new TypeError("The iterator does not provide a 'throw' method")}return E}var U=d(H,z.iterator,B.arg);if(U.type==="throw")return B.method="throw",B.arg=U.arg,B.delegate=null,E;var W=U.arg;if(!W)return B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,E;if(W.done)B[z.resultName]=W.value,B.next=z.nextLoc,B.method!=="return"&&(B.method="next",B.arg=D);else return W;return B.delegate=null,E}O(P),P[p]="Generator",P[m]=function(){return this},P.toString=function(){return"[object Generator]"};function T(z){var B={tryLoc:z[0]};1 in z&&(B.catchLoc=z[1]),2 in z&&(B.finallyLoc=z[2],B.afterLoc=z[3]),this.tryEntries.push(B)}function M(z){var B=z.completion||{};B.type="normal",delete B.arg,z.completion=B}function k(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(T,this),this.reset(!0)}l.keys=function(z){var B=[];for(var H in z)B.push(H);return B.reverse(),function U(){for(;B.length;){var W=B.pop();if(W in z)return U.value=W,U.done=!1,U}return U.done=!0,U}};function N(z){if(z){var B=z[m];if(B)return B.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var H=-1,U=function W(){for(;++H<z.length;)if(C.call(z,H))return W.value=z[H],W.done=!1,W;return W.value=D,W.done=!0,W};return U.next=U}}return{next:K}}l.values=N;function K(){return{value:D,done:!0}}k.prototype={constructor:k,reset:function(z){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),!z)for(var B in this)B.charAt(0)==="t"&&C.call(this,B)&&!isNaN(+B.slice(1))&&(this[B]=D)},stop:function(){this.done=!0;var z=this.tryEntries[0],B=z.completion;if(B.type==="throw")throw B.arg;return this.rval},dispatchException:function(z){if(this.done)throw z;var B=this;function H(ce,_e){return G.type="throw",G.arg=z,B.next=ce,_e&&(B.method="next",B.arg=D),!!_e}for(var U=this.tryEntries.length-1;U>=0;--U){var W=this.tryEntries[U],G=W.completion;if(W.tryLoc==="root")return H("end");if(W.tryLoc<=this.prev){var ee=C.call(W,"catchLoc"),ie=C.call(W,"finallyLoc");if(ee&&ie){if(this.prev<W.catchLoc)return H(W.catchLoc,!0);if(this.prev<W.finallyLoc)return H(W.finallyLoc)}else if(ee){if(this.prev<W.catchLoc)return H(W.catchLoc,!0)}else if(ie){if(this.prev<W.finallyLoc)return H(W.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(z,B){for(var H=this.tryEntries.length-1;H>=0;--H){var U=this.tryEntries[H];if(U.tryLoc<=this.prev&&C.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var W=U;break}}W&&(z==="break"||z==="continue")&&W.tryLoc<=B&&B<=W.finallyLoc&&(W=null);var G=W?W.completion:{};return G.type=z,G.arg=B,W?(this.method="next",this.next=W.finallyLoc,E):this.complete(G)},complete:function(z,B){if(z.type==="throw")throw z.arg;return z.type==="break"||z.type==="continue"?this.next=z.arg:z.type==="return"?(this.rval=this.arg=z.arg,this.method="return",this.next="end"):z.type==="normal"&&B&&(this.next=B),E},finish:function(z){for(var B=this.tryEntries.length-1;B>=0;--B){var H=this.tryEntries[B];if(H.finallyLoc===z)return this.complete(H.completion,H.afterLoc),M(H),E}},catch:function(z){for(var B=this.tryEntries.length-1;B>=0;--B){var H=this.tryEntries[B];if(H.tryLoc===z){var U=H.completion;if(U.type==="throw"){var W=U.arg;M(H)}return W}}throw new Error("illegal catch attempt")},delegateYield:function(z,B,H){return this.delegate={iterator:N(z),resultName:B,nextLoc:H},this.method==="next"&&(this.arg=D),E}}}(function(){return this}()||Function("return this")())},{}],228:[function(j,J,I){var L=j("buffer"),f=L.Buffer;function C(u,m){for(var w in u)m[w]=u[w]}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?J.exports=L:(C(L,I),I.Buffer=D);function D(u,m,w){return f(u,m,w)}C(f,D),D.from=function(u,m,w){if(typeof u=="number")throw new TypeError("Argument must not be a number");return f(u,m,w)},D.alloc=function(u,m,w){if(typeof u!="number")throw new TypeError("Argument must be a number");var p=f(u);return m!==void 0?typeof w=="string"?p.fill(m,w):p.fill(m):p.fill(0),p},D.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return f(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,J,I){(function(L){"use strict";var f=j("babel-runtime/core-js/string/from-code-point"),C=c(f),D=j("babel-runtime/core-js/json/stringify"),u=c(D),m=j("babel-runtime/helpers/typeof"),w=c(m),p=j("babel-runtime/core-js/object/define-property"),s=c(p),l=j("babel-runtime/core-js/object/keys"),a=c(l),d=j("babel-runtime/core-js/object/create"),h=c(d);function c(v){return v&&v.__esModule?v:{default:v}}(function(v){v.parser=function(X,$){return new E(X,$)},v.SAXParser=E,v.SAXStream=P,v.createStream=i,v.MAX_BUFFER_LENGTH=64*1024;var g=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];v.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function E(X,$){if(!(this instanceof E))return new E(X,$);var ve=this;o(ve),ve.q=ve.c="",ve.bufferCheckPosition=v.MAX_BUFFER_LENGTH,ve.opt=$||{},ve.opt.lowercase=ve.opt.lowercase||ve.opt.lowercasetags,ve.looseCase=ve.opt.lowercase?"toLowerCase":"toUpperCase",ve.tags=[],ve.closed=ve.closedRoot=ve.sawRoot=!1,ve.tag=ve.error=null,ve.strict=!!X,ve.noscript=!!(X||ve.opt.noscript),ve.state=G.BEGIN,ve.strictEntities=ve.opt.strictEntities,ve.ENTITIES=ve.strictEntities?(0,h.default)(v.XML_ENTITIES):(0,h.default)(v.ENTITIES),ve.attribList=[],ve.opt.xmlns&&(ve.ns=(0,h.default)(T)),ve.trackPosition=ve.opt.position!==!1,ve.trackPosition&&(ve.position=ve.line=ve.column=0),ie(ve,"onready")}h.default||(Object.create=function(X){function $(){}$.prototype=X;var ve=new $;return ve}),a.default||(Object.keys=function(X){var $=[];for(var ve in X)X.hasOwnProperty(ve)&&$.push(ve);return $});function n(X){for(var $=Math.max(v.MAX_BUFFER_LENGTH,10),ve=0,de=0,xe=g.length;de<xe;de++){var Ke=X[g[de]].length;if(Ke>$)switch(g[de]){case"textNode":_e(X);break;case"cdata":ce(X,"oncdata",X.cdata),X.cdata="";break;case"script":ce(X,"onscript",X.script),X.script="";break;default:le(X,"Max buffer length exceeded: "+g[de])}ve=Math.max(ve,Ke)}var Ve=v.MAX_BUFFER_LENGTH-ve;X.bufferCheckPosition=Ve+X.position}function o(X){for(var $=0,ve=g.length;$<ve;$++)X[g[$]]=""}function t(X){_e(X),X.cdata!==""&&(ce(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(ce(X,"onscript",X.script),X.script="")}E.prototype={end:function(){ye(this)},write:Y,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 _=v.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});function i(X,$){return new P(X,$)}function P(X,$){if(!(this instanceof P))return new P(X,$);S.apply(this),this._parser=new E(X,$),this.writable=!0,this.readable=!0;var ve=this;this._parser.onend=function(){ve.emit("end")},this._parser.onerror=function(de){ve.emit("error",de),ve._parser.error=null},this._decoder=null,_.forEach(function(de){(0,s.default)(ve,"on"+de,{get:function(){return ve._parser["on"+de]},set:function(Ke){if(!Ke)return ve.removeAllListeners(de),ve._parser["on"+de]=Ke,Ke;ve.on(de,Ke)},enumerable:!0,configurable:!1})})}P.prototype=(0,h.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("string_decoder").StringDecoder;this._decoder=new $("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,$){var ve=this;return!ve._parser["on"+X]&&_.indexOf(X)!==-1&&(ve._parser["on"+X]=function(){var de=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);de.splice(0,0,X),ve.emit.apply(ve,de)}),S.prototype.on.call(ve,X,$)};var O="[CDATA[",x="DOCTYPE",b="http://www.w3.org/XML/1998/namespace",y="http://www.w3.org/2000/xmlns/",T={xml:b,xmlns:y},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]/,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-]/,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]/,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 z(X){return X===" "||X===`
|
|
|
`||X==="\r"||X===" "}function B(X){return X==='"'||X==="'"}function H(X){return X===">"||z(X)}function U(X,$){return X.test($)}function W(X,$){return!U(X,$)}var G=0;v.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++},v.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},v.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)(v.ENTITIES).forEach(function(X){var $=v.ENTITIES[X],ve=typeof $=="number"?String.fromCharCode($):$;v.ENTITIES[X]=ve});for(var ee in v.STATE)v.STATE[v.STATE[ee]]=ee;G=v.STATE;function ie(X,$,ve){X[$]&&X[$](ve)}function ce(X,$,ve){X.textNode&&_e(X),ie(X,$,ve)}function _e(X){X.textNode=Ce(X.opt,X.textNode),X.textNode&&ie(X,"ontext",X.textNode),X.textNode=""}function Ce(X,$){return X.trim&&($=$.trim()),X.normalize&&($=$.replace(/\s+/g," ")),$}function le(X,$){return _e(X),X.trackPosition&&($+=`
|
|
|
Line: `+X.line+`
|
|
|
Column: `+X.column+`
|
|
|
Char: `+X.c),$=new Error($),X.error=$,ie(X,"onerror",$),X}function ye(X){return X.sawRoot&&!X.closedRoot&&fe(X,"Unclosed root tag"),X.state!==G.BEGIN&&X.state!==G.BEGIN_WHITESPACE&&X.state!==G.TEXT&&le(X,"Unexpected end"),_e(X),X.c="",X.closed=!0,ie(X,"onend"),E.call(X,X.strict,X.opt),X}function fe(X,$){if((typeof X=="undefined"?"undefined":(0,w.default)(X))!=="object"||!(X instanceof E))throw new Error("bad call to strictFail");X.strict&&le(X,$)}function ne(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var $=X.tags[X.tags.length-1]||X,ve=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(ve.ns=$.ns),X.attribList.length=0,ce(X,"onopentagstart",ve)}function ae(X,$){var ve=X.indexOf(":"),de=ve<0?["",X]:X.split(":"),xe=de[0],Ke=de[1];return $&&X==="xmlns"&&(xe="xmlns",Ke=""),{prefix:xe,local:Ke}}function q(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 $=ae(X.attribName,!0),ve=$.prefix,de=$.local;if(ve==="xmlns")if(de==="xml"&&X.attribValue!==b)fe(X,"xml: prefix must be bound to "+b+`
|
|
|
Actual: `+X.attribValue);else if(de==="xmlns"&&X.attribValue!==y)fe(X,"xmlns: prefix must be bound to "+y+`
|
|
|
Actual: `+X.attribValue);else{var xe=X.tag,Ke=X.tags[X.tags.length-1]||X;xe.ns===Ke.ns&&(xe.ns=(0,h.default)(Ke.ns)),xe.ns[de]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,ce(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function se(X,$){if(X.opt.xmlns){var ve=X.tag,de=ae(X.tagName);ve.prefix=de.prefix,ve.local=de.local,ve.uri=ve.ns[de.prefix]||"",ve.prefix&&!ve.uri&&(fe(X,"Unbound namespace prefix: "+(0,u.default)(X.tagName)),ve.uri=de.prefix);var xe=X.tags[X.tags.length-1]||X;ve.ns&&xe.ns!==ve.ns&&(0,a.default)(ve.ns).forEach(function(ze){ce(X,"onopennamespace",{prefix:ze,uri:ve.ns[ze]})});for(var Ke=0,Ve=X.attribList.length;Ke<Ve;Ke++){var Xe=X.attribList[Ke],at=Xe[0],it=Xe[1],lt=ae(at,!0),Me=lt.prefix,Te=lt.local,Ye=Me===""?"":ve.ns[Me]||"",ot={name:at,value:it,prefix:Me,local:Te,uri:Ye};Me&&Me!=="xmlns"&&!Ye&&(fe(X,"Unbound namespace prefix: "+(0,u.default)(Me)),ot.uri=Me),X.tag.attributes[at]=ot,ce(X,"onattribute",ot)}X.attribList.length=0}X.tag.isSelfClosing=!!$,X.sawRoot=!0,X.tags.push(X.tag),ce(X,"onopentag",X.tag),$||(!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 Q(X){if(!X.tagName){fe(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}ce(X,"onscript",X.script),X.script=""}var $=X.tags.length,ve=X.tagName;X.strict||(ve=ve[X.looseCase]());for(var de=ve;$--;){var xe=X.tags[$];if(xe.name!==de)fe(X,"Unexpected close tag");else break}if($<0){fe(X,"Unmatched closing tag: "+X.tagName),X.textNode+="</"+X.tagName+">",X.state=G.TEXT;return}X.tagName=ve;for(var Ke=X.tags.length;Ke-- >$;){var Ve=X.tag=X.tags.pop();X.tagName=X.tag.name,ce(X,"onclosetag",X.tagName);var Xe={};for(var at in Ve.ns)Xe[at]=Ve.ns[at];var it=X.tags[X.tags.length-1]||X;X.opt.xmlns&&Ve.ns!==it.ns&&(0,a.default)(Ve.ns).forEach(function(lt){var Me=Ve.ns[lt];ce(X,"onclosenamespace",{prefix:lt,uri:Me})})}$===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=G.TEXT}function Z(X){var $=X.entity,ve=$.toLowerCase(),de,xe="";return X.ENTITIES[$]?X.ENTITIES[$]:X.ENTITIES[ve]?X.ENTITIES[ve]:($=ve,$.charAt(0)==="#"&&($.charAt(1)==="x"?($=$.slice(2),de=parseInt($,16),xe=de.toString(16)):($=$.slice(1),de=parseInt($,10),xe=de.toString(10))),$=$.replace(/^0+/,""),isNaN(de)||xe.toLowerCase()!==$?(fe(X,"Invalid character entity"),"&"+X.entity+";"):(0,C.default)(de))}function be(X,$){$==="<"?(X.state=G.OPEN_WAKA,X.startTagPosition=X.position):z($)||(fe(X,"Non-whitespace before first tag."),X.textNode=$,X.state=G.TEXT)}function re(X,$){var ve="";return $<X.length&&(ve=X.charAt($)),ve}function Y(X){var $=this;if(this.error)throw this.error;if($.closed)return le($,"Cannot write after close. Assign an onready handler.");if(X===null)return ye($);(typeof X=="undefined"?"undefined":(0,w.default)(X))==="object"&&(X=X.toString());for(var ve=0,de="";!(de=re(X,ve++),$.c=de,!de);){$.trackPosition&&($.position++,de===`
|
|
|
`?($.line++,$.column=0):$.column++);switch($.state){case G.BEGIN:if($.state=G.BEGIN_WHITESPACE,de==="\uFEFF")continue;be($,de);continue;case G.BEGIN_WHITESPACE:be($,de);continue;case G.TEXT:if($.sawRoot&&!$.closedRoot){for(var xe=ve-1;de&&de!=="<"&&de!=="&";)de=re(X,ve++),de&&$.trackPosition&&($.position++,de===`
|
|
|
`?($.line++,$.column=0):$.column++);$.textNode+=X.substring(xe,ve-1)}de==="<"&&!($.sawRoot&&$.closedRoot&&!$.strict)?($.state=G.OPEN_WAKA,$.startTagPosition=$.position):(!z(de)&&(!$.sawRoot||$.closedRoot)&&fe($,"Text data outside of root node."),de==="&"?$.state=G.TEXT_ENTITY:$.textNode+=de);continue;case G.SCRIPT:de==="<"?$.state=G.SCRIPT_ENDING:$.script+=de;continue;case G.SCRIPT_ENDING:de==="/"?$.state=G.CLOSE_TAG:($.script+="<"+de,$.state=G.SCRIPT);continue;case G.OPEN_WAKA:if(de==="!")$.state=G.SGML_DECL,$.sgmlDecl="";else if(!z(de))if(U(M,de))$.state=G.OPEN_TAG,$.tagName=de;else if(de==="/")$.state=G.CLOSE_TAG,$.tagName="";else if(de==="?")$.state=G.PROC_INST,$.procInstName=$.procInstBody="";else{if(fe($,"Unencoded <"),$.startTagPosition+1<$.position){var Ke=$.position-$.startTagPosition;de=new Array(Ke).join(" ")+de}$.textNode+="<"+de,$.state=G.TEXT}continue;case G.SGML_DECL:($.sgmlDecl+de).toUpperCase()===O?(ce($,"onopencdata"),$.state=G.CDATA,$.sgmlDecl="",$.cdata=""):$.sgmlDecl+de==="--"?($.state=G.COMMENT,$.comment="",$.sgmlDecl=""):($.sgmlDecl+de).toUpperCase()===x?($.state=G.DOCTYPE,($.doctype||$.sawRoot)&&fe($,"Inappropriately located doctype declaration"),$.doctype="",$.sgmlDecl=""):de===">"?(ce($,"onsgmldeclaration",$.sgmlDecl),$.sgmlDecl="",$.state=G.TEXT):(B(de)&&($.state=G.SGML_DECL_QUOTED),$.sgmlDecl+=de);continue;case G.SGML_DECL_QUOTED:de===$.q&&($.state=G.SGML_DECL,$.q=""),$.sgmlDecl+=de;continue;case G.DOCTYPE:de===">"?($.state=G.TEXT,ce($,"ondoctype",$.doctype),$.doctype=!0):($.doctype+=de,de==="["?$.state=G.DOCTYPE_DTD:B(de)&&($.state=G.DOCTYPE_QUOTED,$.q=de));continue;case G.DOCTYPE_QUOTED:$.doctype+=de,de===$.q&&($.q="",$.state=G.DOCTYPE);continue;case G.DOCTYPE_DTD:$.doctype+=de,de==="]"?$.state=G.DOCTYPE:B(de)&&($.state=G.DOCTYPE_DTD_QUOTED,$.q=de);continue;case G.DOCTYPE_DTD_QUOTED:$.doctype+=de,de===$.q&&($.state=G.DOCTYPE_DTD,$.q="");continue;case G.COMMENT:de==="-"?$.state=G.COMMENT_ENDING:$.comment+=de;continue;case G.COMMENT_ENDING:de==="-"?($.state=G.COMMENT_ENDED,$.comment=Ce($.opt,$.comment),$.comment&&ce($,"oncomment",$.comment),$.comment=""):($.comment+="-"+de,$.state=G.COMMENT);continue;case G.COMMENT_ENDED:de!==">"?(fe($,"Malformed comment"),$.comment+="--"+de,$.state=G.COMMENT):$.state=G.TEXT;continue;case G.CDATA:de==="]"?$.state=G.CDATA_ENDING:$.cdata+=de;continue;case G.CDATA_ENDING:de==="]"?$.state=G.CDATA_ENDING_2:($.cdata+="]"+de,$.state=G.CDATA);continue;case G.CDATA_ENDING_2:de===">"?($.cdata&&ce($,"oncdata",$.cdata),ce($,"onclosecdata"),$.cdata="",$.state=G.TEXT):de==="]"?$.cdata+="]":($.cdata+="]]"+de,$.state=G.CDATA);continue;case G.PROC_INST:de==="?"?$.state=G.PROC_INST_ENDING:z(de)?$.state=G.PROC_INST_BODY:$.procInstName+=de;continue;case G.PROC_INST_BODY:if(!$.procInstBody&&z(de))continue;de==="?"?$.state=G.PROC_INST_ENDING:$.procInstBody+=de;continue;case G.PROC_INST_ENDING:de===">"?(ce($,"onprocessinginstruction",{name:$.procInstName,body:$.procInstBody}),$.procInstName=$.procInstBody="",$.state=G.TEXT):($.procInstBody+="?"+de,$.state=G.PROC_INST_BODY);continue;case G.OPEN_TAG:U(k,de)?$.tagName+=de:(ne($),de===">"?se($):de==="/"?$.state=G.OPEN_TAG_SLASH:(z(de)||fe($,"Invalid character in tag name"),$.state=G.ATTRIB));continue;case G.OPEN_TAG_SLASH:de===">"?(se($,!0),Q($)):(fe($,"Forward-slash in opening tag not followed by >"),$.state=G.ATTRIB);continue;case G.ATTRIB:if(z(de))continue;de===">"?se($):de==="/"?$.state=G.OPEN_TAG_SLASH:U(M,de)?($.attribName=de,$.attribValue="",$.state=G.ATTRIB_NAME):fe($,"Invalid attribute name");continue;case G.ATTRIB_NAME:de==="="?$.state=G.ATTRIB_VALUE:de===">"?(fe($,"Attribute without value"),$.attribValue=$.attribName,q($),se($)):z(de)?$.state=G.ATTRIB_NAME_SAW_WHITE:U(k,de)?$.attribName+=de:fe($,"Invalid attribute name");continue;case G.ATTRIB_NAME_SAW_WHITE:if(de==="=")$.state=G.ATTRIB_VALUE;else{if(z(de))continue;fe($,"Attribute without value"),$.tag.attributes[$.attribName]="",$.attribValue="",ce($,"onattribute",{name:$.attribName,value:""}),$.attribName="",de===">"?se($):U(M,de)?($.attribName=de,$.state=G.ATTRIB_NAME):(fe($,"Invalid attribute name"),$.state=G.ATTRIB)}continue;case G.ATTRIB_VALUE:if(z(de))continue;B(de)?($.q=de,$.state=G.ATTRIB_VALUE_QUOTED):(fe($,"Unquoted attribute value"),$.state=G.ATTRIB_VALUE_UNQUOTED,$.attribValue=de);continue;case G.ATTRIB_VALUE_QUOTED:if(de!==$.q){de==="&"?$.state=G.ATTRIB_VALUE_ENTITY_Q:$.attribValue+=de;continue}q($),$.q="",$.state=G.ATTRIB_VALUE_CLOSED;continue;case G.ATTRIB_VALUE_CLOSED:z(de)?$.state=G.ATTRIB:de===">"?se($):de==="/"?$.state=G.OPEN_TAG_SLASH:U(M,de)?(fe($,"No whitespace between attributes"),$.attribName=de,$.attribValue="",$.state=G.ATTRIB_NAME):fe($,"Invalid attribute name");continue;case G.ATTRIB_VALUE_UNQUOTED:if(!H(de)){de==="&"?$.state=G.ATTRIB_VALUE_ENTITY_U:$.attribValue+=de;continue}q($),de===">"?se($):$.state=G.ATTRIB;continue;case G.CLOSE_TAG:if($.tagName)de===">"?Q($):U(k,de)?$.tagName+=de:$.script?($.script+="</"+$.tagName,$.tagName="",$.state=G.SCRIPT):(z(de)||fe($,"Invalid tagname in closing tag"),$.state=G.CLOSE_TAG_SAW_WHITE);else{if(z(de))continue;W(M,de)?$.script?($.script+="</"+de,$.state=G.SCRIPT):fe($,"Invalid tagname in closing tag."):$.tagName=de}continue;case G.CLOSE_TAG_SAW_WHITE:if(z(de))continue;de===">"?Q($):fe($,"Invalid characters in closing tag");continue;case G.TEXT_ENTITY:case G.ATTRIB_VALUE_ENTITY_Q:case G.ATTRIB_VALUE_ENTITY_U:var Ve,Xe;switch($.state){case G.TEXT_ENTITY:Ve=G.TEXT,Xe="textNode";break;case G.ATTRIB_VALUE_ENTITY_Q:Ve=G.ATTRIB_VALUE_QUOTED,Xe="attribValue";break;case G.ATTRIB_VALUE_ENTITY_U:Ve=G.ATTRIB_VALUE_UNQUOTED,Xe="attribValue";break}de===";"?($[Xe]+=Z($),$.entity="",$.state=Ve):U($.entity.length?K:N,de)?$.entity+=de:(fe($,"Invalid character in entity name"),$[Xe]+="&"+$.entity+de,$.entity="",$.state=Ve);continue;default:throw new Error($,"Unknown state: "+$.state)}}return $.position>=$.bufferCheckPosition&&n($),$}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */C.default||function(){var X=String.fromCharCode,$=Math.floor,ve=function(){var xe=16384,Ke=[],Ve,Xe,at=-1,it=arguments.length;if(!it)return"";for(var lt="";++at<it;){var Me=Number(arguments[at]);if(!isFinite(Me)||Me<0||Me>1114111||$(Me)!==Me)throw RangeError("Invalid code point: "+Me);Me<=65535?Ke.push(Me):(Me-=65536,Ve=(Me>>10)+55296,Xe=Me%1024+56320,Ke.push(Ve,Xe)),(at+1===it||Ke.length>xe)&&(lt+=X.apply(null,Ke),Ke.length=0)}return lt};s.default?Object.defineProperty(String,"fromCodePoint",{value:ve,configurable:!0,writable:!0}):String.fromCodePoint=ve}()})(typeof I=="undefined"?(void 0).sax={}:I)}).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,J,I){J.exports=C;var L=j("events").EventEmitter,f=j("inherits");f(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 m=this;function w(c){D.writable&&(D.write(c)===!1&&m.pause&&m.pause())}m.on("data",w);function p(){m.readable&&m.resume&&m.resume()}D.on("drain",p),!D._isStdio&&(!u||u.end!==!1)&&(m.on("end",l),m.on("close",a));var s=!1;function l(){if(s)return;s=!0,D.end()}function a(){if(s)return;s=!0,typeof D.destroy=="function"&&D.destroy()}function d(c){if(h(),L.listenerCount(this,"error")===0)throw c}m.on("error",d),D.on("error",d);function h(){m.removeListener("data",w),D.removeListener("drain",p),m.removeListener("end",l),m.removeListener("close",a),m.removeListener("error",d),D.removeListener("error",d),m.removeListener("end",h),m.removeListener("close",h),D.removeListener("close",h)}return m.on("end",h),m.on("close",h),D.on("close",h),D.emit("pipe",m),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,J,I){(function(L){var f=j("./lib/request"),C=j("./lib/response"),D=j("xtend"),u=j("builtin-status-codes"),m=j("url"),w=I;w.request=function(p,s){typeof p=="string"?p=m.parse(p):p=D(p);var l=L.location.protocol.search(/^https?:$/)===-1?"http:":"",a=p.protocol||l,d=p.hostname||p.host,h=p.port,c=p.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),p.url=(d?a+"//"+d:"")+(h?":"+h:"")+c,p.method=(p.method||"GET").toUpperCase(),p.headers=p.headers||{};var v=new f(p);return s&&v.on("response",s),v},w.get=function(s,l){var a=w.request(s,l);return a.end(),a},w.ClientRequest=f,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,J,I){(function(L){"use strict";I.fetch=w(L.fetch)&&w(L.ReadableStream),I.writableStream=w(L.WritableStream),I.abortController=w(L.AbortController),I.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),I.blobConstructor=!0}catch(p){}var f;function C(){if(f!==void 0)return f;if(L.XMLHttpRequest){f=new L.XMLHttpRequest;try{f.open("GET",L.XDomainRequest?"/":"https://example.com")}catch(p){f=null}}else f=null;return f}function D(p){var s=C();if(!s)return!1;try{return s.responseType=p,s.responseType===p}catch(l){}return!1}var u=typeof L.ArrayBuffer!="undefined",m=u&&w(L.ArrayBuffer.prototype.slice);I.arraybuffer=I.fetch||u&&D("arraybuffer"),I.msstream=!I.fetch&&m&&D("ms-stream"),I.mozchunkedarraybuffer=!I.fetch&&u&&D("moz-chunked-arraybuffer"),I.overrideMimeType=I.fetch||(C()?w(C().overrideMimeType):!1),I.vbArray=w(L.VBArray);function w(p){return typeof p=="function"}f=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(j,J,I){(function(L,f,C){"use strict";var D=j("babel-runtime/core-js/object/keys"),u=m(D);function m(n){return n&&n.__esModule?n:{default:n}}var w=j("./capability"),p=j("inherits"),s=j("./response"),l=j("readable-stream"),a=j("to-arraybuffer"),d=s.IncomingMessage,h=s.readyStates;function c(n,o){return w.fetch&&o?"fetch":w.mozchunkedarraybuffer?"moz-chunked-arraybuffer":w.msstream?"ms-stream":w.arraybuffer&&n?"arraybuffer":w.vbArray&&n?"text:vbarray":"text"}var v=J.exports=function(n){var o=this;l.Writable.call(o),o._opts=n,o._body=[],o._headers={},n.auth&&o.setHeader("Authorization","Basic "+new C(n.auth).toString("base64")),(0,u.default)(n.headers).forEach(function(_){o.setHeader(_,n.headers[_])});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");o._mode=c(t,S),o._fetchTimer=null,o.on("finish",function(){o._onFinish()})};p(v,l.Writable),v.prototype.setHeader=function(n,o){var t=this,S=n.toLowerCase();if(E.indexOf(S)!==-1)return;t._headers[S]={name:n,value:o}},v.prototype.getHeader=function(n){var o=this._headers[n.toLowerCase()];return o?o.value:null},v.prototype.removeHeader=function(n){var o=this;delete o._headers[n.toLowerCase()]},v.prototype._onFinish=function(){var n=this;if(n._destroyed)return;var o=n._opts,t=n._headers,S=null;o.method!=="GET"&&o.method!=="HEAD"&&(w.arraybuffer?S=a(C.concat(n._body)):w.blobConstructor?S=new f.Blob(n._body.map(function(b){return a(b)}),{type:(t["content-type"]||{}).value||""}):S=C.concat(n._body).toString());var _=[];if((0,u.default)(t).forEach(function(b){var y=t[b].name,T=t[b].value;Array.isArray(T)?T.forEach(function(M){_.push([y,M])}):_.push([y,T])}),n._mode==="fetch"){var i=null,P=null;if(w.abortController){var O=new AbortController;i=O.signal,n._fetchAbortController=O,"requestTimeout"in o&&o.requestTimeout!==0&&(n._fetchTimer=f.setTimeout(function(){n.emit("requestTimeout"),n._fetchAbortController&&n._fetchAbortController.abort()},o.requestTimeout))}f.fetch(n._opts.url,{method:n._opts.method,headers:_,body:S||void 0,mode:"cors",credentials:o.withCredentials?"include":"same-origin",signal:i}).then(function(b){n._fetchResponse=b,n._connect()},function(b){f.clearTimeout(n._fetchTimer),n._destroyed||n.emit("error",b)})}else{var x=n._xhr=new f.XMLHttpRequest;try{x.open(n._opts.method,n._opts.url,!0)}catch(b){L.nextTick(function(){n.emit("error",b)});return}"responseType"in x&&(x.responseType=n._mode.split(":")[0]),"withCredentials"in x&&(x.withCredentials=!!o.withCredentials),n._mode==="text"&&"overrideMimeType"in x&&x.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in o&&(x.timeout=o.requestTimeout,x.ontimeout=function(){n.emit("requestTimeout")}),_.forEach(function(b){x.setRequestHeader(b[0],b[1])}),n._response=null,x.onreadystatechange=function(){switch(x.readyState){case h.LOADING:case h.DONE:n._onXHRProgress();break}},n._mode==="moz-chunked-arraybuffer"&&(x.onprogress=function(){n._onXHRProgress()}),x.onerror=function(){if(n._destroyed)return;n.emit("error",new Error("XHR error"))};try{x.send(S)}catch(b){L.nextTick(function(){n.emit("error",b)});return}}};function g(n){try{var o=n.status;return o!==null&&o!==0}catch(t){return!1}}v.prototype._onXHRProgress=function(){var n=this;if(!g(n._xhr)||n._destroyed)return;n._response||n._connect(),n._response._onXHRProgress()},v.prototype._connect=function(){var n=this;if(n._destroyed)return;n._response=new d(n._xhr,n._fetchResponse,n._mode,n._fetchTimer),n._response.on("error",function(o){n.emit("error",o)}),n.emit("response",n._response)},v.prototype._write=function(n,o,t){var S=this;S._body.push(n),t()},v.prototype.abort=v.prototype.destroy=function(){var n=this;n._destroyed=!0,f.clearTimeout(n._fetchTimer),n._response&&(n._response._destroyed=!0),n._xhr?n._xhr.abort():n._fetchAbortController&&n._fetchAbortController.abort()},v.prototype.end=function(n,o,t){var S=this;typeof n=="function"&&(t=n,n=void 0),l.Writable.prototype.end.call(S,n,o,t)},v.prototype.flushHeaders=function(){},v.prototype.setTimeout=function(){},v.prototype.setNoDelay=function(){},v.prototype.setSocketKeepAlive=function(){};var E=["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,J,I){(function(L,f,C){"use strict";var D=j("babel-runtime/core-js/promise"),u=m(D);function m(d){return d&&d.__esModule?d:{default:d}}var w=j("./capability"),p=j("inherits"),s=j("readable-stream"),l=I.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},a=I.IncomingMessage=function(d,h,c,v){var g=this;if(s.Readable.call(g),g._mode=c,g.headers={},g.rawHeaders=[],g.trailers={},g.rawTrailers=[],g.on("end",function(){L.nextTick(function(){g.emit("close")})}),c==="fetch"){var E=function i(){o.read().then(function(P){if(g._destroyed)return;if(P.done){f.clearTimeout(v),g.push(null);return}g.push(new C(P.value)),i()}).catch(function(P){f.clearTimeout(v),g._destroyed||g.emit("error",P)})};if(g._fetchResponse=h,g.url=h.url,g.statusCode=h.status,g.statusMessage=h.statusText,h.headers.forEach(function(i,P){g.headers[P.toLowerCase()]=i,g.rawHeaders.push(P,i)}),w.writableStream){var n=new WritableStream({write:function(P){return new u.default(function(O,x){g._destroyed?x():g.push(new C(P))?O():g._resumeFetch=O})},close:function(){f.clearTimeout(v),g._destroyed||g.push(null)},abort:function(P){g._destroyed||g.emit("error",P)}});try{h.body.pipeTo(n).catch(function(i){f.clearTimeout(v),g._destroyed||g.emit("error",i)});return}catch(i){}}var o=h.body.getReader();E()}else{g._xhr=d,g._pos=0,g.url=d.responseURL,g.statusCode=d.status,g.statusMessage=d.statusText;var t=d.getAllResponseHeaders().split(/\r?\n/);if(t.forEach(function(i){var P=i.match(/^([^:]+):\s*(.*)/);if(P){var O=P[1].toLowerCase();O==="set-cookie"?(g.headers[O]===void 0&&(g.headers[O]=[]),g.headers[O].push(P[2])):g.headers[O]!==void 0?g.headers[O]+=", "+P[2]:g.headers[O]=P[2],g.rawHeaders.push(P[1],P[2])}}),g._charset="x-user-defined",!w.overrideMimeType){var S=g.rawHeaders["mime-type"];if(S){var _=S.match(/;\s*charset=([^;])(;|$)/);_&&(g._charset=_[1].toLowerCase())}g._charset||(g._charset="utf-8")}}};p(a,s.Readable),a.prototype._read=function(){var d=this,h=d._resumeFetch;h&&(d._resumeFetch=null,h())},a.prototype._onXHRProgress=function(){var d=this,h=d._xhr,c=null;switch(d._mode){case"text:vbarray":if(h.readyState!==l.DONE)break;try{c=new f.VBArray(h.responseBody).toArray()}catch(o){}if(c!==null){d.push(new C(c));break}case"text":try{c=h.responseText}catch(o){d._mode="text:vbarray";break}if(c.length>d._pos){var v=c.substr(d._pos);if(d._charset==="x-user-defined"){for(var g=new C(v.length),E=0;E<v.length;E++)g[E]=v.charCodeAt(E)&255;d.push(g)}else d.push(v,d._charset);d._pos=c.length}break;case"arraybuffer":if(h.readyState!==l.DONE||!h.response)break;c=h.response,d.push(new C(new Uint8Array(c)));break;case"moz-chunked-arraybuffer":if(c=h.response,h.readyState!==l.LOADING||!c)break;d.push(new C(new Uint8Array(c)));break;case"ms-stream":if(c=h.response,h.readyState!==l.LOADING)break;var n=new f.MSStreamReader;n.onprogress=function(){n.result.byteLength>d._pos&&(d.push(new C(new Uint8Array(n.result.slice(d._pos)))),d._pos=n.result.byteLength)},n.onload=function(){d.push(null)},n.readAsArrayBuffer(c);break}d._xhr.readyState===l.DONE&&d._mode!=="ms-stream"&&d.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,J,I){"use strict";var L=j("safe-buffer").Buffer,f=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 o;;)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(o)return;n=(""+n).toLowerCase(),o=!0}}function D(n){var o=C(n);if(typeof o!="string"&&(L.isEncoding===f||!f(n)))throw new Error("Unknown encoding: "+n);return o||n}I.StringDecoder=u;function u(n){this.encoding=D(n);var o;switch(this.encoding){case"utf16le":this.text=d,this.end=h,o=4;break;case"utf8":this.fillLast=s,o=4;break;case"base64":this.text=c,this.end=v,o=3;break;default:this.write=g,this.end=E;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=L.allocUnsafe(o)}u.prototype.write=function(n){if(n.length===0)return"";var o,t;if(this.lastNeed){if(o=this.fillLast(n),o===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<n.length?o?o+this.text(n,t):this.text(n,t):o||""},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 m(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,o,t){var S=o.length-1;if(S<t)return 0;var _=m(o[S]);return _>=0?(_>0&&(n.lastNeed=_-1),_):--S<t||_===-2?0:(_=m(o[S]),_>=0?(_>0&&(n.lastNeed=_-2),_):--S<t||_===-2?0:(_=m(o[S]),_>=0?(_>0&&(_===2?_=0:n.lastNeed=_-3),_):0))}function p(n,o,t){if((o[0]&192)!==128)return n.lastNeed=0,"\uFFFD";if(n.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return n.lastNeed=1,"\uFFFD";if(n.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return n.lastNeed=2,"\uFFFD"}}function s(n){var o=this.lastTotal-this.lastNeed,t=p(this,n,o);if(t!==void 0)return t;if(this.lastNeed<=n.length)return n.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,o,0,n.length),this.lastNeed-=n.length}function l(n,o){var t=w(this,n,o);if(!this.lastNeed)return n.toString("utf8",o);this.lastTotal=t;var S=n.length-(t-this.lastNeed);return n.copy(this.lastChar,0,S),n.toString("utf8",o,S)}function a(n){var o=n&&n.length?this.write(n):"";return this.lastNeed?o+"\uFFFD":o}function d(n,o){if((n.length-o)%2===0){var t=n.toString("utf16le",o);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",o,n.length-1)}function h(n){var o=n&&n.length?this.write(n):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,t)}return o}function c(n,o){var t=(n.length-o)%3;return t===0?n.toString("base64",o):(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",o,n.length-t))}function v(n){var o=n&&n.length?this.write(n):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function g(n){return n.toString(this.encoding)}function E(n){return n&&n.length?this.write(n):""}},{"safe-buffer":228}],236:[function(j,J,I){(function(L,f){var C=j("process/browser.js").nextTick,D=Function.prototype.apply,u=Array.prototype.slice,m={},w=0;I.setTimeout=function(){return new p(D.call(setTimeout,window,arguments),clearTimeout)},I.setInterval=function(){return new p(D.call(setInterval,window,arguments),clearInterval)},I.clearTimeout=I.clearInterval=function(s){s.close()};function p(s,l){this._id=s,this._clearFn=l}p.prototype.unref=p.prototype.ref=function(){},p.prototype.close=function(){this._clearFn.call(window,this._id)},I.enroll=function(s,l){clearTimeout(s._idleTimeoutId),s._idleTimeout=l},I.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},I._unrefActive=I.active=function(s){clearTimeout(s._idleTimeoutId);var l=s._idleTimeout;l>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},l))},I.setImmediate=typeof L=="function"?L:function(s){var l=w++,a=arguments.length<2?!1:u.call(arguments,1);return m[l]=!0,C(function(){m[l]&&(a?s.apply(null,a):s.call(null),I.clearImmediate(l))}),l},I.clearImmediate=typeof f=="function"?f:function(s){delete m[s]}}).call(this,j("timers").setImmediate,j("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(j,J,I){var L=j("buffer").Buffer;J.exports=function(f){if(f instanceof Uint8Array){if(f.byteOffset===0&&f.byteLength===f.buffer.byteLength)return f.buffer;if(typeof f.buffer.slice=="function")return f.buffer.slice(f.byteOffset,f.byteOffset+f.byteLength)}if(L.isBuffer(f)){for(var C=new Uint8Array(f.length),D=f.length,u=0;u<D;u++)C[u]=f[u];return C.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(j,J,I){"use strict";var L=j("punycode"),f=j("./util");I.parse=o,I.resolve=S,I.resolveObject=_,I.format=t,I.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]*$/,m=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,w=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],p=["{","}","|","\\","^","`"].concat(w),s=["'"].concat(p),l=["%","/","?",";","#"].concat(s),a=["/","?","#"],d=255,h=/^[+a-z0-9A-Z_-]{0,63}$/,c=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},n=j("querystring");function o(i,P,O){if(i&&f.isObject(i)&&i instanceof C)return i;var x=new C;return x.parse(i,P,O),x}C.prototype.parse=function(i,P,O){if(!f.isString(i))throw new TypeError("Parameter 'url' must be a string, not "+typeof i);var x=i.indexOf("?"),b=x!==-1&&x<i.indexOf("#")?"?":"#",y=i.split(b),T=/\\/g;y[0]=y[0].replace(T,"/"),i=y.join(b);var M=i;if(M=M.trim(),!O&&i.split("#").length===1){var k=m.exec(M);if(k)return this.path=M,this.href=M,this.pathname=k[1],k[2]?(this.search=k[2],P?this.query=n.parse(this.search.substr(1)):this.query=this.search.substr(1)):P&&(this.search="",this.query={}),this}var N=D.exec(M);if(N){N=N[0];var K=N.toLowerCase();this.protocol=K,M=M.substr(N.length)}if(O||N||M.match(/^\/\/[^@\/]+@[^@\/]+/)){var z=M.substr(0,2)==="//";z&&!(N&&g[N])&&(M=M.substr(2),this.slashes=!0)}if(!g[N]&&(z||N&&!E[N])){for(var B=-1,H=0;H<a.length;H++){var U=M.indexOf(a[H]);U!==-1&&(B===-1||U<B)&&(B=U)}var W,G;B===-1?G=M.lastIndexOf("@"):G=M.lastIndexOf("@",B),G!==-1&&(W=M.slice(0,G),M=M.slice(G+1),this.auth=decodeURIComponent(W)),B=-1;for(var H=0;H<l.length;H++){var U=M.indexOf(l[H]);U!==-1&&(B===-1||U<B)&&(B=U)}B===-1&&(B=M.length),this.host=M.slice(0,B),M=M.slice(B),this.parseHost(),this.hostname=this.hostname||"";var ee=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ee)for(var ie=this.hostname.split(/\./),H=0,ce=ie.length;H<ce;H++){var _e=ie[H];if(!_e)continue;if(!_e.match(h)){for(var Ce="",le=0,ye=_e.length;le<ye;le++)_e.charCodeAt(le)>127?Ce+="x":Ce+=_e[le];if(!Ce.match(h)){var fe=ie.slice(0,H),ne=ie.slice(H+1),ae=_e.match(c);ae&&(fe.push(ae[1]),ne.unshift(ae[2])),ne.length&&(M="/"+ne.join(".")+M),this.hostname=fe.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),ee||(this.hostname=L.toASCII(this.hostname));var q=this.port?":"+this.port:"",se=this.hostname||"";this.host=se+q,this.href+=this.host,ee&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),M[0]!=="/"&&(M="/"+M))}if(!v[K])for(var H=0,ce=s.length;H<ce;H++){var Q=s[H];if(M.indexOf(Q)===-1)continue;var Z=encodeURIComponent(Q);Z===Q&&(Z=escape(Q)),M=M.split(Q).join(Z)}var be=M.indexOf("#");be!==-1&&(this.hash=M.substr(be),M=M.slice(0,be));var re=M.indexOf("?");if(re!==-1?(this.search=M.substr(re),this.query=M.substr(re+1),P&&(this.query=n.parse(this.query)),M=M.slice(0,re)):P&&(this.search="",this.query={}),M&&(this.pathname=M),E[K]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var q=this.pathname||"",Y=this.search||"";this.path=q+Y}return this.href=this.format(),this};function t(i){return f.isString(i)&&(i=o(i)),i instanceof C?i.format():C.prototype.format.call(i)}C.prototype.format=function(){var i=this.auth||"";i&&(i=encodeURIComponent(i),i=i.replace(/%3A/i,":"),i+="@");var P=this.protocol||"",O=this.pathname||"",x=this.hash||"",b=!1,y="";this.host?b=i+this.host:this.hostname&&(b=i+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(b+=":"+this.port)),this.query&&f.isObject(this.query)&&Object.keys(this.query).length&&(y=n.stringify(this.query));var T=this.search||y&&"?"+y||"";return P&&P.substr(-1)!==":"&&(P+=":"),this.slashes||(!P||E[P])&&b!==!1?(b="//"+(b||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):b||(b=""),x&&x.charAt(0)!=="#"&&(x="#"+x),T&&T.charAt(0)!=="?"&&(T="?"+T),O=O.replace(/[?#]/g,function(M){return encodeURIComponent(M)}),T=T.replace("#","%23"),P+b+O+T+x};function S(i,P){return o(i,!1,!0).resolve(P)}C.prototype.resolve=function(i){return this.resolveObject(o(i,!1,!0)).format()};function _(i,P){return i?o(i,!1,!0).resolveObject(P):P}C.prototype.resolveObject=function(i){if(f.isString(i)){var P=new C;P.parse(i,!1,!0),i=P}for(var O=new C,x=Object.keys(this),b=0;b<x.length;b++){var y=x[b];O[y]=this[y]}if(O.hash=i.hash,i.href==="")return O.href=O.format(),O;if(i.slashes&&!i.protocol){for(var T=Object.keys(i),M=0;M<T.length;M++){var k=T[M];k!=="protocol"&&(O[k]=i[k])}return E[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(i.protocol&&i.protocol!==O.protocol){if(!E[i.protocol]){for(var N=Object.keys(i),K=0;K<N.length;K++){var z=N[K];O[z]=i[z]}return O.href=O.format(),O}if(O.protocol=i.protocol,!i.host&&!g[i.protocol]){for(var ce=(i.pathname||"").split("/");ce.length&&!(i.host=ce.shift()););i.host||(i.host=""),i.hostname||(i.hostname=""),ce[0]!==""&&ce.unshift(""),ce.length<2&&ce.unshift(""),O.pathname=ce.join("/")}else O.pathname=i.pathname;if(O.search=i.search,O.query=i.query,O.host=i.host||"",O.auth=i.auth,O.hostname=i.hostname||i.host,O.port=i.port,O.pathname||O.search){var B=O.pathname||"",H=O.search||"";O.path=B+H}return O.slashes=O.slashes||i.slashes,O.href=O.format(),O}var U=O.pathname&&O.pathname.charAt(0)==="/",W=i.host||i.pathname&&i.pathname.charAt(0)==="/",G=W||U||O.host&&i.pathname,ee=G,ie=O.pathname&&O.pathname.split("/")||[],ce=i.pathname&&i.pathname.split("/")||[],_e=O.protocol&&!E[O.protocol];if(_e&&(O.hostname="",O.port=null,O.host&&(ie[0]===""?ie[0]=O.host:ie.unshift(O.host)),O.host="",i.protocol&&(i.hostname=null,i.port=null,i.host&&(ce[0]===""?ce[0]=i.host:ce.unshift(i.host)),i.host=null),G=G&&(ce[0]===""||ie[0]==="")),W)O.host=i.host||i.host===""?i.host:O.host,O.hostname=i.hostname||i.hostname===""?i.hostname:O.hostname,O.search=i.search,O.query=i.query,ie=ce;else if(ce.length)ie||(ie=[]),ie.pop(),ie=ie.concat(ce),O.search=i.search,O.query=i.query;else if(!f.isNullOrUndefined(i.search)){if(_e){O.hostname=O.host=ie.shift();var Ce=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Ce&&(O.auth=Ce.shift(),O.host=O.hostname=Ce.shift())}return O.search=i.search,O.query=i.query,(!f.isNull(O.pathname)||!f.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!ie.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var le=ie.slice(-1)[0],ye=(O.host||i.host||ie.length>1)&&(le==="."||le==="..")||le==="",fe=0,ne=ie.length;ne>=0;ne--)le=ie[ne],le==="."?ie.splice(ne,1):le===".."?(ie.splice(ne,1),fe++):fe&&(ie.splice(ne,1),fe--);if(!G&&!ee)for(;fe--;fe)ie.unshift("..");G&&ie[0]!==""&&(!ie[0]||ie[0].charAt(0)!=="/")&&ie.unshift(""),ye&&ie.join("/").substr(-1)!=="/"&&ie.push("");var ae=ie[0]===""||ie[0]&&ie[0].charAt(0)==="/";if(_e){O.hostname=O.host=ae?"":ie.length?ie.shift():"";var Ce=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Ce&&(O.auth=Ce.shift(),O.host=O.hostname=Ce.shift())}return G=G||O.host&&ie.length,G&&!ae&&ie.unshift(""),ie.length?O.pathname=ie.join("/"):(O.pathname=null,O.path=null),(!f.isNull(O.pathname)||!f.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=i.auth||O.auth,O.slashes=O.slashes||i.slashes,O.href=O.format(),O},C.prototype.parseHost=function(){var i=this.host,P=u.exec(i);P&&(P=P[0],P!==":"&&(this.port=P.substr(1)),i=i.substr(0,i.length-P.length)),i&&(this.hostname=i)}},{"./util":239,punycode:209,querystring:212}],239:[function(j,J,I){"use strict";J.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,J,I){(function(L){J.exports=f;function f(D,u){if(C("noDeprecation"))return D;var m=!1;function w(){if(!m){if(C("throwDeprecation"))throw new Error(u);C("traceDeprecation")?console.trace(u):console.warn(u),m=!0}return D.apply(this,arguments)}return w}function C(D){try{if(!L.localStorage)return!1}catch(m){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,J,I){typeof Object.create=="function"?J.exports=function(f,C){f.super_=C,f.prototype=Object.create(C.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})}:J.exports=function(f,C){f.super_=C;var D=function(){};D.prototype=C.prototype,f.prototype=new D,f.prototype.constructor=f}},{}],242:[function(j,J,I){J.exports=function(f){return f&&typeof f=="object"&&typeof f.copy=="function"&&typeof f.fill=="function"&&typeof f.readUInt8=="function"}},{}],243:[function(j,J,I){(function(L,f){var C=/%[sdj%]/g;I.format=function(B){if(!S(B)){for(var H=[],U=0;U<arguments.length;U++)H.push(m(arguments[U]));return H.join(" ")}for(var U=1,W=arguments,G=W.length,ee=String(B).replace(C,function(ce){if(ce==="%%")return"%";if(U>=G)return ce;switch(ce){case"%s":return String(W[U++]);case"%d":return Number(W[U++]);case"%j":try{return JSON.stringify(W[U++])}catch(_e){return"[Circular]"}default:return ce}}),ie=W[U];U<G;ie=W[++U])n(ie)||!O(ie)?ee+=" "+ie:ee+=" "+m(ie);return ee},I.deprecate=function(B,H){if(i(f.process))return function(){return I.deprecate(B,H).apply(this,arguments)};if(L.noDeprecation===!0)return B;var U=!1;function W(){if(!U){if(L.throwDeprecation)throw new Error(H);L.traceDeprecation?console.trace(H):console.error(H),U=!0}return B.apply(this,arguments)}return W};var D={},u;I.debuglog=function(B){if(i(u)&&(u=L.env.NODE_DEBUG||""),B=B.toUpperCase(),!D[B])if(new RegExp("\\b"+B+"\\b","i").test(u)){var H=L.pid;D[B]=function(){var U=I.format.apply(I,arguments);console.error("%s %d: %s",B,H,U)}}else D[B]=function(){};return D[B]};function m(B,H){var U={seen:[],stylize:p};return arguments.length>=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),E(H)?U.showHidden=H:H&&I._extend(U,H),i(U.showHidden)&&(U.showHidden=!1),i(U.depth)&&(U.depth=2),i(U.colors)&&(U.colors=!1),i(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=w),l(U,B,U.depth)}I.inspect=m,m.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]},m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function w(B,H){var U=m.styles[H];return U?"["+m.colors[U][0]+"m"+B+"["+m.colors[U][1]+"m":B}function p(B,H){return B}function s(B){var H={};return B.forEach(function(U,W){H[U]=!0}),H}function l(B,H,U){if(B.customInspect&&H&&y(H.inspect)&&H.inspect!==I.inspect&&!(H.constructor&&H.constructor.prototype===H)){var W=H.inspect(U,B);return S(W)||(W=l(B,W,U)),W}var G=a(B,H);if(G)return G;var ee=Object.keys(H),ie=s(ee);if(B.showHidden&&(ee=Object.getOwnPropertyNames(H)),b(H)&&(ee.indexOf("message")>=0||ee.indexOf("description")>=0))return d(H);if(ee.length===0){if(y(H)){var ce=H.name?": "+H.name:"";return B.stylize("[Function"+ce+"]","special")}if(P(H))return B.stylize(RegExp.prototype.toString.call(H),"regexp");if(x(H))return B.stylize(Date.prototype.toString.call(H),"date");if(b(H))return d(H)}var _e="",Ce=!1,le=["{","}"];if(g(H)&&(Ce=!0,le=["[","]"]),y(H)){var ye=H.name?": "+H.name:"";_e=" [Function"+ye+"]"}if(P(H)&&(_e=" "+RegExp.prototype.toString.call(H)),x(H)&&(_e=" "+Date.prototype.toUTCString.call(H)),b(H)&&(_e=" "+d(H)),ee.length===0&&(!Ce||H.length==0))return le[0]+_e+le[1];if(U<0)return P(H)?B.stylize(RegExp.prototype.toString.call(H),"regexp"):B.stylize("[Object]","special");B.seen.push(H);var fe;return Ce?fe=h(B,H,U,ie,ee):fe=ee.map(function(ne){return c(B,H,U,ie,ne,Ce)}),B.seen.pop(),v(fe,_e,le)}function a(B,H){if(i(H))return B.stylize("undefined","undefined");if(S(H)){var U="'"+JSON.stringify(H).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(U,"string")}if(t(H))return B.stylize(""+H,"number");if(E(H))return B.stylize(""+H,"boolean");if(n(H))return B.stylize("null","null")}function d(B){return"["+Error.prototype.toString.call(B)+"]"}function h(B,H,U,W,G){for(var ee=[],ie=0,ce=H.length;ie<ce;++ie)z(H,String(ie))?ee.push(c(B,H,U,W,String(ie),!0)):ee.push("");return G.forEach(function(_e){_e.match(/^\d+$/)||ee.push(c(B,H,U,W,_e,!0))}),ee}function c(B,H,U,W,G,ee){var ie,ce,_e;if(_e=Object.getOwnPropertyDescriptor(H,G)||{value:H[G]},_e.get?_e.set?ce=B.stylize("[Getter/Setter]","special"):ce=B.stylize("[Getter]","special"):_e.set&&(ce=B.stylize("[Setter]","special")),z(W,G)||(ie="["+G+"]"),ce||(B.seen.indexOf(_e.value)<0?(n(U)?ce=l(B,_e.value,null):ce=l(B,_e.value,U-1),ce.indexOf(`
|
|
|
`)>-1&&(ee?ce=ce.split(`
|
|
|
`).map(function(Ce){return" "+Ce}).join(`
|
|
|
`).substr(2):ce=`
|
|
|
`+ce.split(`
|
|
|
`).map(function(Ce){return" "+Ce}).join(`
|
|
|
`))):ce=B.stylize("[Circular]","special")),i(ie)){if(ee&&G.match(/^\d+$/))return ce;ie=JSON.stringify(""+G),ie.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ie=ie.substr(1,ie.length-2),ie=B.stylize(ie,"name")):(ie=ie.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ie=B.stylize(ie,"string"))}return ie+": "+ce}function v(B,H,U){var W=0,G=B.reduce(function(ee,ie){return W++,ie.indexOf(`
|
|
|
`)>=0&&W++,ee+ie.replace(/\u001b\[\d\d?m/g,"").length+1},0);return G>60?U[0]+(H===""?"":H+`
|
|
|
`)+" "+B.join(`,
|
|
|
`)+" "+U[1]:U[0]+H+" "+B.join(", ")+" "+U[1]}function g(B){return Array.isArray(B)}I.isArray=g;function E(B){return typeof B=="boolean"}I.isBoolean=E;function n(B){return B===null}I.isNull=n;function o(B){return B==null}I.isNullOrUndefined=o;function t(B){return typeof B=="number"}I.isNumber=t;function S(B){return typeof B=="string"}I.isString=S;function _(B){return typeof B=="symbol"}I.isSymbol=_;function i(B){return B===void 0}I.isUndefined=i;function P(B){return O(B)&&M(B)==="[object RegExp]"}I.isRegExp=P;function O(B){return typeof B=="object"&&B!==null}I.isObject=O;function x(B){return O(B)&&M(B)==="[object Date]"}I.isDate=x;function b(B){return O(B)&&(M(B)==="[object Error]"||B instanceof Error)}I.isError=b;function y(B){return typeof B=="function"}I.isFunction=y;function T(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B=="undefined"}I.isPrimitive=T,I.isBuffer=j("./support/isBuffer");function M(B){return Object.prototype.toString.call(B)}function k(B){return B<10?"0"+B.toString(10):B.toString(10)}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function K(){var B=new Date,H=[k(B.getHours()),k(B.getMinutes()),k(B.getSeconds())].join(":");return[B.getDate(),N[B.getMonth()],H].join(" ")}I.log=function(){console.log("%s - %s",K(),I.format.apply(I,arguments))},I.inherits=j("inherits"),I._extend=function(B,H){if(!H||!O(H))return B;for(var U=Object.keys(H),W=U.length;W--;)B[U[W]]=H[U[W]];return B};function z(B,H){return Object.prototype.hasOwnProperty.call(B,H)}}).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,J,I){"use strict";(function(){"use strict";I.stripBOM=function(L){return L[0]==="\uFEFF"?L.substring(1):L}}).call(void 0)},{}],245:[function(j,J,I){"use strict";var L=j("babel-runtime/helpers/typeof"),f=u(L),C=j("babel-runtime/core-js/object/keys"),D=u(C);function u(m){return m&&m.__esModule?m:{default:m}}(function(){"use strict";var m,w,p,s,l,a={}.hasOwnProperty;m=j("xmlbuilder"),w=j("./defaults").defaults,s=function(h){return typeof h=="string"&&(h.indexOf("&")>=0||h.indexOf(">")>=0||h.indexOf("<")>=0)},l=function(h){return"<![CDATA["+p(h)+"]]>"},p=function(h){return h.replace("]]>","]]]]><![CDATA[>")},I.Builder=function(){function d(h){var c,v,g;this.options={},v=w["0.2"];for(c in v){if(!a.call(v,c))continue;g=v[c],this.options[c]=g}for(c in h){if(!a.call(h,c))continue;g=h[c],this.options[c]=g}}return d.prototype.buildObject=function(h){var c,v,g,E,n;return c=this.options.attrkey,v=this.options.charkey,(0,D.default)(h).length===1&&this.options.rootName===w["0.2"].rootName?(n=(0,D.default)(h)[0],h=h[n]):n=this.options.rootName,g=function(o){return function(t,S){var _,i,P,O,x,b;if((typeof S=="undefined"?"undefined":(0,f.default)(S))!=="object")o.options.cdata&&s(S)?t.raw(l(S)):t.txt(S);else if(Array.isArray(S))for(O in S){if(!a.call(S,O))continue;i=S[O];for(x in i)P=i[x],t=g(t.ele(x),P).up()}else for(x in S){if(!a.call(S,x))continue;if(i=S[x],x===c){if((typeof i=="undefined"?"undefined":(0,f.default)(i))==="object")for(_ in i)b=i[_],t=t.att(_,b)}else if(x===v)o.options.cdata&&s(i)?t=t.raw(l(i)):t=t.txt(i);else if(Array.isArray(i))for(O in i){if(!a.call(i,O))continue;P=i[O],typeof P=="string"?o.options.cdata&&s(P)?t=t.ele(x).raw(l(P)).up():t=t.ele(x,P).up():t=g(t.ele(x),P).up()}else(typeof i=="undefined"?"undefined":(0,f.default)(i))==="object"?t=g(t.ele(x),i).up():typeof i=="string"&&o.options.cdata&&s(i)?t=t.ele(x).raw(l(i)).up():(i==null&&(i=""),t=t.ele(x,i.toString()).up())}return t}}(this),E=m.create(n,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),g(E,h).end(this.options.renderOpts)},d}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(j,J,I){"use strict";(function(){I.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,J,I){"use strict";var L=j("babel-runtime/core-js/promise"),f=s(L),C=j("babel-runtime/core-js/object/get-own-property-names"),D=s(C),u=j("babel-runtime/core-js/object/keys"),m=s(u),w=j("babel-runtime/helpers/typeof"),p=s(w);function s(l){return l&&l.__esModule?l:{default:l}}(function(){"use strict";var l,a,d,h,c,v,g,E,n=function(_,i){return function(){return _.apply(i,arguments)}},o=function(_,i){for(var P in i)t.call(i,P)&&(_[P]=i[P]);function O(){this.constructor=_}return O.prototype=i.prototype,_.prototype=new O,_.__super__=i.prototype,_},t={}.hasOwnProperty;g=j("sax"),d=j("events"),l=j("./bom"),v=j("./processors"),E=j("timers").setImmediate,a=j("./defaults").defaults,h=function(_){return(typeof _=="undefined"?"undefined":(0,p.default)(_))==="object"&&_!=null&&(0,m.default)(_).length===0},c=function(_,i,P){var O,x,b;for(O=0,x=_.length;O<x;O++)b=_[O],i=b(i,P);return i},I.Parser=function(S){o(_,S);function _(i){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,x;if(!(this instanceof I.Parser))return new I.Parser(i);this.options={},O=a["0.2"];for(P in O){if(!t.call(O,P))continue;x=O[P],this.options[P]=x}for(P in i){if(!t.call(i,P))continue;x=i[P],this.options[P]=x}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(v.normalize)),this.reset()}return _.prototype.processAsync=function(){var i,P;try{return this.remaining.length<=this.options.chunkSize?(i=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(i),this.saxParser.close()):(i=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(i),E(this.processAsync))}catch(O){if(P=O,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(P)}},_.prototype.assignOrPush=function(i,P,O){return P in i?(i[P]instanceof Array||(i[P]=[i[P]]),i[P].push(O)):this.options.explicitArray?i[P]=[O]:i[P]=O},_.prototype.reset=function(){var i,P,O,x;return this.removeAllListeners(),this.saxParser=g.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(b){return function(y){if(b.saxParser.resume(),!b.saxParser.errThrown)return b.saxParser.errThrown=!0,b.emit("error",y)}}(this),this.saxParser.onend=function(b){return function(){if(!b.saxParser.ended)return b.saxParser.ended=!0,b.emit("end",b.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,x=[],i=this.options.attrkey,P=this.options.charkey,this.saxParser.onopentag=function(b){return function(y){var T,M,k,N,K;if(k={},k[P]="",!b.options.ignoreAttrs){K=y.attributes;for(T in K){if(!t.call(K,T))continue;!(i in k)&&!b.options.mergeAttrs&&(k[i]={}),M=b.options.attrValueProcessors?c(b.options.attrValueProcessors,y.attributes[T],T):y.attributes[T],N=b.options.attrNameProcessors?c(b.options.attrNameProcessors,T):T,b.options.mergeAttrs?b.assignOrPush(k,N,M):k[i][N]=M}}return k["#name"]=b.options.tagNameProcessors?c(b.options.tagNameProcessors,y.name):y.name,b.options.xmlns&&(k[b.options.xmlnskey]={uri:y.uri,local:y.local}),x.push(k)}}(this),this.saxParser.onclosetag=function(b){return function(){var y,T,M,k,N,K,z,B,H,U;if(K=x.pop(),N=K["#name"],(!b.options.explicitChildren||!b.options.preserveChildrenOrder)&&delete K["#name"],K.cdata===!0&&(y=K.cdata,delete K.cdata),H=x[x.length-1],K[P].match(/^\s*$/)&&!y?(T=K[P],delete K[P]):(b.options.trim&&(K[P]=K[P].trim()),b.options.normalize&&(K[P]=K[P].replace(/\s{2,}/g," ").trim()),K[P]=b.options.valueProcessors?c(b.options.valueProcessors,K[P],N):K[P],(0,m.default)(K).length===1&&P in K&&!b.EXPLICIT_CHARKEY&&(K=K[P])),h(K)&&(K=b.options.emptyTag!==""?b.options.emptyTag:T),b.options.validator!=null&&(U="/"+function(){var W,G,ee;for(ee=[],W=0,G=x.length;W<G;W++)k=x[W],ee.push(k["#name"]);return ee}().concat(N).join("/"),function(){var W;try{return K=b.options.validator(U,H&&H[N],K)}catch(G){return W=G,b.emit("error",W)}}()),b.options.explicitChildren&&!b.options.mergeAttrs&&(typeof K=="undefined"?"undefined":(0,p.default)(K))==="object"){if(!b.options.preserveChildrenOrder)k={},b.options.attrkey in K&&(k[b.options.attrkey]=K[b.options.attrkey],delete K[b.options.attrkey]),!b.options.charsAsChildren&&b.options.charkey in K&&(k[b.options.charkey]=K[b.options.charkey],delete K[b.options.charkey]),(0,D.default)(K).length>0&&(k[b.options.childkey]=K),K=k;else if(H){H[b.options.childkey]=H[b.options.childkey]||[],z={};for(M in K){if(!t.call(K,M))continue;z[M]=K[M]}H[b.options.childkey].push(z),delete K["#name"],(0,m.default)(K).length===1&&P in K&&!b.EXPLICIT_CHARKEY&&(K=K[P])}}return x.length>0?b.assignOrPush(H,N,K):(b.options.explicitRoot&&(B=K,K={},K[N]=B),b.resultObject=K,b.saxParser.ended=!0,b.emit("end",b.resultObject))}}(this),O=function(b){return function(y){var T,M;if(M=x[x.length-1],M)return M[P]+=y,b.options.explicitChildren&&b.options.preserveChildrenOrder&&b.options.charsAsChildren&&(b.options.includeWhiteChars||y.replace(/\\n/g,"").trim()!=="")&&(M[b.options.childkey]=M[b.options.childkey]||[],T={"#name":"__text__"},T[P]=y,b.options.normalize&&(T[P]=T[P].replace(/\s{2,}/g," ").trim()),M[b.options.childkey].push(T)),M}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(b){return function(y){var T;if(T=O(y),T)return T.cdata=!0}}(this)},_.prototype.parseString=function(i,P){var O;P!=null&&typeof P=="function"&&(this.on("end",function(x){return this.reset(),P(null,x)}),this.on("error",function(x){return this.reset(),P(x)}));try{return i=i.toString(),i.trim()===""?(this.emit("end",null),!0):(i=l.stripBOM(i),this.options.async?(this.remaining=i,E(this.processAsync),this.saxParser):this.saxParser.write(i).close())}catch(x){if(O=x,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},_.prototype.parseStringPromise=function(i){return new f.default(function(P){return function(O,x){return P.parseString(i,function(b,y){return b?x(b):O(y)})}}(this))},_}(d),I.parseString=function(S,_,i){var P,O,x;return i!=null?(typeof i=="function"&&(P=i),(typeof _=="undefined"?"undefined":(0,p.default)(_))==="object"&&(O=_)):(typeof _=="function"&&(P=_),O={}),x=new I.Parser(O),x.parseString(S,P)},I.parseStringPromise=function(S,_){var i,P;return(typeof _=="undefined"?"undefined":(0,p.default)(_))==="object"&&(i=_),P=new I.Parser(i),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,J,I){"use strict";(function(){"use strict";var L;L=new RegExp(/(?!xmlns)^.*:/),I.normalize=function(f){return f.toLowerCase()},I.firstCharLowerCase=function(f){return f.charAt(0).toLowerCase()+f.slice(1)},I.stripPrefix=function(f){return f.replace(L,"")},I.parseNumbers=function(f){return isNaN(f)||(f=f%1===0?parseInt(f,10):parseFloat(f)),f},I.parseBooleans=function(f){return/^(?:true|false)$/i.test(f)&&(f=f.toLowerCase()==="true"),f}}).call(void 0)},{}],249:[function(j,J,I){"use strict";(function(){"use strict";var L,f,C,D,u=function(p,s){for(var l in s)m.call(s,l)&&(p[l]=s[l]);function a(){this.constructor=p}return a.prototype=s.prototype,p.prototype=new a,p.__super__=s.prototype,p},m={}.hasOwnProperty;f=j("./defaults"),L=j("./builder"),C=j("./parser"),D=j("./processors"),I.defaults=f.defaults,I.processors=D,I.ValidationError=function(w){u(p,w);function p(s){this.message=s}return p}(Error),I.Builder=L.Builder,I.Parser=C.Parser,I.parseString=C.parseString,I.parseStringPromise=C.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(j,J,I){"use strict";(function(){J.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(j,J,I){"use strict";(function(){J.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,J,I){"use strict";var L=j("babel-runtime/core-js/object/get-prototype-of"),f=w(L),C=j("babel-runtime/helpers/typeof"),D=w(C),u=j("babel-runtime/core-js/object/assign"),m=w(u);function w(p){return p&&p.__esModule?p:{default:p}}(function(){var p,s,l,a,d,h,c,v=[].slice,g={}.hasOwnProperty;p=function(){var n,o,t,S,_,i;if(i=arguments[0],_=2<=arguments.length?v.call(arguments,1):[],d(m.default))m.default.apply(null,arguments);else for(n=0,t=_.length;n<t;n++)if(S=_[n],S!=null)for(o in S){if(!g.call(S,o))continue;i[o]=S[o]}return i},d=function(n){return!!n&&Object.prototype.toString.call(n)==="[object Function]"},h=function(n){var o;return!!n&&((o=typeof n=="undefined"?"undefined":(0,D.default)(n))==="function"||o==="object")},l=function(n){return d(Array.isArray)?Array.isArray(n):Object.prototype.toString.call(n)==="[object Array]"},a=function(n){var o;if(l(n))return!n.length;for(o in n){if(!g.call(n,o))continue;return!1}return!0},c=function(n){var o,t;return h(n)&&(t=(0,f.default)(n))&&(o=t.constructor)&&typeof o=="function"&&o instanceof o&&Function.prototype.toString.call(o)===Function.prototype.toString.call(Object)},s=function(n){return d(n.valueOf)?n.valueOf():n},J.exports.assign=p,J.exports.isFunction=d,J.exports.isObject=h,J.exports.isArray=l,J.exports.isEmpty=a,J.exports.isPlainObject=c,J.exports.getValue=s}).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,J,I){"use strict";(function(){J.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(j,J,I){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,m;D=j("./NodeType"),m=j("./XMLNode"),J.exports=u=function(){function w(p,s,l){if(this.parent=p,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),s==null)throw new Error("Missing attribute name. "+this.debugInfo(s));this.name=this.stringify.name(s),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(s){return this.value=s||""}}),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,f.default)(this)},w.prototype.toString=function(p){return this.options.writer.attribute(this,this.options.writer.filterOptions(p))},w.prototype.debugInfo=function(p){return p=p||this.name,p==null?"parent: <"+this.parent.name+">":"attribute: {"+p+"}, parent: <"+this.parent.name+">"},w.prototype.isEqualNode=function(p){return p.namespaceURI!==this.namespaceURI||(p.prefix!==this.prefix||p.localName!==this.localName)?!1:!(p.value!==this.value)},w}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(j,J,I){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,m,w=function(l,a){for(var d in a)p.call(a,d)&&(l[d]=a[d]);function h(){this.constructor=l}return h.prototype=a.prototype,l.prototype=new h,l.__super__=a.prototype,l},p={}.hasOwnProperty;D=j("./NodeType"),m=j("./XMLCharacterData"),J.exports=u=function(s){w(l,s);function l(a,d){if(l.__super__.constructor.call(this,a),d==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=D.CData,this.value=this.stringify.cdata(d)}return l.prototype.clone=function(){return(0,f.default)(this)},l.prototype.toString=function(a){return this.options.writer.cdata(this,this.options.writer.filterOptions(a))},l}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(j,J,I){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,m=function(s,l){for(var a in l)w.call(l,a)&&(s[a]=l[a]);function d(){this.constructor=s}return d.prototype=l.prototype,s.prototype=new d,s.__super__=l.prototype,s},w={}.hasOwnProperty;u=j("./XMLNode"),J.exports=D=function(p){m(s,p);function s(l){s.__super__.constructor.call(this,l),this.value=""}return Object.defineProperty(s.prototype,"data",{get:function(){return this.value},set:function(a){return this.value=a||""}}),Object.defineProperty(s.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(s.prototype,"textContent",{get:function(){return this.value},set:function(a){return this.value=a||""}}),s.prototype.clone=function(){return(0,f.default)(this)},s.prototype.substringData=function(l,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.appendData=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.insertData=function(l,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.deleteData=function(l,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.replaceData=function(l,a,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.isEqualNode=function(l){return s.__super__.isEqualNode.apply(this,arguments).isEqualNode(l)?!(l.data!==this.data):!1},s}(u)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(j,J,I){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,m,w=function(l,a){for(var d in a)p.call(a,d)&&(l[d]=a[d]);function h(){this.constructor=l}return h.prototype=a.prototype,l.prototype=new h,l.__super__=a.prototype,l},p={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLCharacterData"),J.exports=m=function(s){w(l,s);function l(a,d){if(l.__super__.constructor.call(this,a),d==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=D.Comment,this.value=this.stringify.comment(d)}return l.prototype.clone=function(){return(0,f.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,J,I){"use strict";var L=j("babel-runtime/core-js/object/keys"),f=u(L),C=j("babel-runtime/core-js/object/create"),D=u(C);function u(m){return m&&m.__esModule?m:{default:m}}(function(){var m,w,p;w=j("./XMLDOMErrorHandler"),p=j("./XMLDOMStringList"),J.exports=m=function(){function s(){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(s.prototype,"parameterNames",{get:function(){return new p((0,f.default)(this.defaultParams))}}),s.prototype.getParameter=function(l){return this.params.hasOwnProperty(l)?this.params[l]:null},s.prototype.canSetParameter=function(l,a){return!0},s.prototype.setParameter=function(l,a){return a!=null?this.params[l]=a:delete this.params[l]},s}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(j,J,I){"use strict";(function(){var L;J.exports=L=function(){function f(){}return f.prototype.handleError=function(C){throw new Error(C)},f}()}).call(void 0)},{}],260:[function(j,J,I){"use strict";(function(){var L;J.exports=L=function(){function f(){}return f.prototype.hasFeature=function(C,D){return!0},f.prototype.createDocumentType=function(C,D,u){throw new Error("This DOM method is not implemented.")},f.prototype.createDocument=function(C,D,u){throw new Error("This DOM method is not implemented.")},f.prototype.createHTMLDocument=function(C){throw new Error("This DOM method is not implemented.")},f.prototype.getFeature=function(C,D){throw new Error("This DOM method is not implemented.")},f}()}).call(void 0)},{}],261:[function(j,J,I){"use strict";(function(){var L;J.exports=L=function(){function f(C){this.arr=C||[]}return Object.defineProperty(f.prototype,"length",{get:function(){return this.arr.length}}),f.prototype.item=function(C){return this.arr[C]||null},f.prototype.contains=function(C){return this.arr.indexOf(C)!==-1},f}()}).call(void 0)},{}],262:[function(j,J,I){"use strict";(function(){var L,f,C,D=function(w,p){for(var s in p)u.call(p,s)&&(w[s]=p[s]);function l(){this.constructor=w}return l.prototype=p.prototype,w.prototype=new l,w.__super__=p.prototype,w},u={}.hasOwnProperty;C=j("./XMLNode"),L=j("./NodeType"),J.exports=f=function(m){D(w,m);function w(p,s,l,a,d,h){if(w.__super__.constructor.call(this,p),s==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(l==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(s));if(!a)throw new Error("Missing DTD attribute type. "+this.debugInfo(s));if(!d)throw new Error("Missing DTD attribute default. "+this.debugInfo(s));if(d.indexOf("#")!==0&&(d="#"+d),!d.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(s));if(h&&!d.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(s));this.elementName=this.stringify.name(s),this.type=L.AttributeDeclaration,this.attributeName=this.stringify.name(l),this.attributeType=this.stringify.dtdAttType(a),h&&(this.defaultValue=this.stringify.dtdAttDefault(h)),this.defaultValueType=d}return w.prototype.toString=function(p){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(p))},w}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(j,J,I){"use strict";(function(){var L,f,C,D=function(w,p){for(var s in p)u.call(p,s)&&(w[s]=p[s]);function l(){this.constructor=w}return l.prototype=p.prototype,w.prototype=new l,w.__super__=p.prototype,w},u={}.hasOwnProperty;C=j("./XMLNode"),L=j("./NodeType"),J.exports=f=function(m){D(w,m);function w(p,s,l){if(w.__super__.constructor.call(this,p),s==null)throw new Error("Missing DTD element name. "+this.debugInfo());l||(l="(#PCDATA)"),Array.isArray(l)&&(l="("+l.join(",")+")"),this.name=this.stringify.name(s),this.type=L.ElementDeclaration,this.value=this.stringify.dtdElementValue(l)}return w.prototype.toString=function(p){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(p))},w}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(j,J,I){"use strict";(function(){var L,f,C,D,u=function(p,s){for(var l in s)m.call(s,l)&&(p[l]=s[l]);function a(){this.constructor=p}return a.prototype=s.prototype,p.prototype=new a,p.__super__=s.prototype,p},m={}.hasOwnProperty;D=j("./Utility").isObject,C=j("./XMLNode"),L=j("./NodeType"),J.exports=f=function(w){u(p,w);function p(s,l,a,d){if(p.__super__.constructor.call(this,s),a==null)throw new Error("Missing DTD entity name. "+this.debugInfo(a));if(d==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(d))this.value=this.stringify.dtdEntityValue(d),this.internal=!0;else{if(!d.pubID&&!d.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(a));if(d.pubID&&!d.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(a));if(this.internal=!1,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.sysID)),d.nData!=null&&(this.nData=this.stringify.dtdNData(d.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(a))}}return Object.defineProperty(p.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(p.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(p.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(p.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(p.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(p.prototype,"xmlVersion",{get:function(){return null}}),p.prototype.toString=function(s){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(s))},p}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(j,J,I){"use strict";(function(){var L,f,C,D=function(w,p){for(var s in p)u.call(p,s)&&(w[s]=p[s]);function l(){this.constructor=w}return l.prototype=p.prototype,w.prototype=new l,w.__super__=p.prototype,w},u={}.hasOwnProperty;C=j("./XMLNode"),L=j("./NodeType"),J.exports=f=function(m){D(w,m);function w(p,s,l){if(w.__super__.constructor.call(this,p),s==null)throw new Error("Missing DTD notation name. "+this.debugInfo(s));if(!l.pubID&&!l.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(s));this.name=this.stringify.name(s),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(p){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(p))},w}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(j,J,I){"use strict";(function(){var L,f,C,D,u=function(p,s){for(var l in s)m.call(s,l)&&(p[l]=s[l]);function a(){this.constructor=p}return a.prototype=s.prototype,p.prototype=new a,p.__super__=s.prototype,p},m={}.hasOwnProperty;D=j("./Utility").isObject,C=j("./XMLNode"),L=j("./NodeType"),J.exports=f=function(w){u(p,w);function p(s,l,a,d){var h;p.__super__.constructor.call(this,s),D(l)&&(h=l,l=h.version,a=h.encoding,d=h.standalone),l||(l="1.0"),this.type=L.Declaration,this.version=this.stringify.xmlVersion(l),a!=null&&(this.encoding=this.stringify.xmlEncoding(a)),d!=null&&(this.standalone=this.stringify.xmlStandalone(d))}return p.prototype.toString=function(s){return this.options.writer.declaration(this,this.options.writer.filterOptions(s))},p}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(j,J,I){"use strict";(function(){var L,f,C,D,u,m,w,p,s,l=function(h,c){for(var v in c)a.call(c,v)&&(h[v]=c[v]);function g(){this.constructor=h}return g.prototype=c.prototype,h.prototype=new g,h.__super__=c.prototype,h},a={}.hasOwnProperty;s=j("./Utility").isObject,p=j("./XMLNode"),L=j("./NodeType"),f=j("./XMLDTDAttList"),D=j("./XMLDTDEntity"),C=j("./XMLDTDElement"),u=j("./XMLDTDNotation"),w=j("./XMLNamedNodeMap"),J.exports=m=function(d){l(h,d);function h(c,v,g){var E,n,o,t,S,_;if(h.__super__.constructor.call(this,c),this.type=L.DocType,c.children){for(t=c.children,n=0,o=t.length;n<o;n++)if(E=t[n],E.type===L.Element){this.name=E.name;break}}this.documentObject=c,s(v)&&(S=v,v=S.pubID,g=S.sysID),g==null&&(_=[v,g],g=_[0],v=_[1]),v!=null&&(this.pubID=this.stringify.dtdPubID(v)),g!=null&&(this.sysID=this.stringify.dtdSysID(g))}return Object.defineProperty(h.prototype,"entities",{get:function(){var v,g,E,n,o;for(n={},o=this.children,g=0,E=o.length;g<E;g++)v=o[g],v.type===L.EntityDeclaration&&!v.pe&&(n[v.name]=v);return new w(n)}}),Object.defineProperty(h.prototype,"notations",{get:function(){var v,g,E,n,o;for(n={},o=this.children,g=0,E=o.length;g<E;g++)v=o[g],v.type===L.NotationDeclaration&&(n[v.name]=v);return new w(n)}}),Object.defineProperty(h.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(h.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(h.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),h.prototype.element=function(c,v){var g;return g=new C(this,c,v),this.children.push(g),this},h.prototype.attList=function(c,v,g,E,n){var o;return o=new f(this,c,v,g,E,n),this.children.push(o),this},h.prototype.entity=function(c,v){var g;return g=new D(this,!1,c,v),this.children.push(g),this},h.prototype.pEntity=function(c,v){var g;return g=new D(this,!0,c,v),this.children.push(g),this},h.prototype.notation=function(c,v){var g;return g=new u(this,c,v),this.children.push(g),this},h.prototype.toString=function(c){return this.options.writer.docType(this,this.options.writer.filterOptions(c))},h.prototype.ele=function(c,v){return this.element(c,v)},h.prototype.att=function(c,v,g,E,n){return this.attList(c,v,g,E,n)},h.prototype.ent=function(c,v){return this.entity(c,v)},h.prototype.pent=function(c,v){return this.pEntity(c,v)},h.prototype.not=function(c,v){return this.notation(c,v)},h.prototype.up=function(){return this.root()||this.documentObject},h.prototype.isEqualNode=function(c){return h.__super__.isEqualNode.apply(this,arguments).isEqualNode(c)?c.name!==this.name||c.publicId!==this.publicId?!1:!(c.systemId!==this.systemId):!1},h}(p)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(j,J,I){"use strict";(function(){var L,f,C,D,u,m,w,p,s=function(d,h){for(var c in h)l.call(h,c)&&(d[c]=h[c]);function v(){this.constructor=d}return v.prototype=h.prototype,d.prototype=new v,d.__super__=h.prototype,d},l={}.hasOwnProperty;p=j("./Utility").isPlainObject,C=j("./XMLDOMImplementation"),f=j("./XMLDOMConfiguration"),u=j("./XMLNode"),L=j("./NodeType"),w=j("./XMLStringifier"),m=j("./XMLStringWriter"),J.exports=D=function(a){s(d,a);function d(h){d.__super__.constructor.call(this,null),this.name="#document",this.type=L.Document,this.documentURI=null,this.domConfig=new f,h||(h={}),h.writer||(h.writer=new m),this.options=h,this.stringify=new w(h)}return Object.defineProperty(d.prototype,"implementation",{value:new C}),Object.defineProperty(d.prototype,"doctype",{get:function(){var c,v,g,E;for(E=this.children,v=0,g=E.length;v<g;v++)if(c=E[v],c.type===L.DocType)return c;return null}}),Object.defineProperty(d.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(d.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(d.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(d.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].encoding:null}}),Object.defineProperty(d.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(d.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(d.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(d.prototype,"origin",{get:function(){return null}}),Object.defineProperty(d.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(d.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(d.prototype,"contentType",{get:function(){return null}}),d.prototype.end=function(h){var c;return c={},h?p(h)&&(c=h,h=this.options.writer):h=this.options.writer,h.document(this,h.filterOptions(c))},d.prototype.toString=function(h){return this.options.writer.document(this,this.options.writer.filterOptions(h))},d.prototype.createElement=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createTextNode=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createComment=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createCDATASection=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createProcessingInstruction=function(h,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createAttribute=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createEntityReference=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByTagName=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.importNode=function(h,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createElementNS=function(h,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createAttributeNS=function(h,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByTagNameNS=function(h,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementById=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.adoptNode=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.renameNode=function(h,c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByClassName=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createEvent=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createNodeIterator=function(h,c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createTreeWalker=function(h,c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},d}(u)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(j,J,I){"use strict";(function(){var L,f,C,D,u,m,w,p,s,l,a,d,h,c,v,g,E,n,o,t,S,_,i,P,O={}.hasOwnProperty;P=j("./Utility"),_=P.isObject,S=P.isFunction,i=P.isPlainObject,t=P.getValue,L=j("./NodeType"),d=j("./XMLDocument"),c=j("./XMLElement"),D=j("./XMLCData"),u=j("./XMLComment"),g=j("./XMLRaw"),o=j("./XMLText"),v=j("./XMLProcessingInstruction"),l=j("./XMLDeclaration"),a=j("./XMLDocType"),m=j("./XMLDTDAttList"),p=j("./XMLDTDEntity"),w=j("./XMLDTDElement"),s=j("./XMLDTDNotation"),C=j("./XMLAttribute"),n=j("./XMLStringifier"),E=j("./XMLStringWriter"),f=j("./WriterState"),J.exports=h=function(){function x(b,y,T){var M;this.name="?xml",this.type=L.Document,b||(b={}),M={},b.writer?i(b.writer)&&(M=b.writer,b.writer=new E):b.writer=new E,this.options=b,this.writer=b.writer,this.writerOptions=this.writer.filterOptions(M),this.stringify=new n(b),this.onDataCallback=y||function(){},this.onEndCallback=T||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return x.prototype.createChildNode=function(b){var y,T,M,k,N,K,z,B;switch(b.type){case L.CData:this.cdata(b.value);break;case L.Comment:this.comment(b.value);break;case L.Element:M={},z=b.attribs;for(T in z){if(!O.call(z,T))continue;y=z[T],M[T]=y.value}this.node(b.name,M);break;case L.Dummy:this.dummy();break;case L.Raw:this.raw(b.value);break;case L.Text:this.text(b.value);break;case L.ProcessingInstruction:this.instruction(b.target,b.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+b.constructor.name)}for(B=b.children,N=0,K=B.length;N<K;N++)k=B[N],this.createChildNode(k),k.type===L.Element&&this.up();return this},x.prototype.dummy=function(){return this},x.prototype.node=function(b,y,T){var M;if(b==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(b));return this.openCurrent(),b=t(b),y==null&&(y={}),y=t(y),_(y)||(M=[y,T],T=M[0],y=M[1]),this.currentNode=new c(this,b,y),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,T!=null&&this.text(T),this},x.prototype.element=function(b,y,T){var M,k,N,K,z,B;if(this.currentNode&&this.currentNode.type===L.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(b)||_(b)||S(b))for(K=this.options.noValidation,this.options.noValidation=!0,B=new d(this.options).element("TEMP_ROOT"),B.element(b),this.options.noValidation=K,z=B.children,k=0,N=z.length;k<N;k++)M=z[k],this.createChildNode(M),M.type===L.Element&&this.up();else this.node(b,y,T);return this},x.prototype.attribute=function(b,y){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(b));if(b!=null&&(b=t(b)),_(b))for(T in b){if(!O.call(b,T))continue;M=b[T],this.attribute(T,M)}else S(y)&&(y=y.apply()),this.options.keepNullAttributes&&y==null?this.currentNode.attribs[b]=new C(this,b,""):y!=null&&(this.currentNode.attribs[b]=new C(this,b,y));return this},x.prototype.text=function(b){var y;return this.openCurrent(),y=new o(this,b),this.onData(this.writer.text(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.cdata=function(b){var y;return this.openCurrent(),y=new D(this,b),this.onData(this.writer.cdata(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.comment=function(b){var y;return this.openCurrent(),y=new u(this,b),this.onData(this.writer.comment(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.raw=function(b){var y;return this.openCurrent(),y=new g(this,b),this.onData(this.writer.raw(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.instruction=function(b,y){var T,M,k,N,K;if(this.openCurrent(),b!=null&&(b=t(b)),y!=null&&(y=t(y)),Array.isArray(b))for(T=0,N=b.length;T<N;T++)M=b[T],this.instruction(M);else if(_(b))for(M in b){if(!O.call(b,M))continue;k=b[M],this.instruction(M,k)}else S(y)&&(y=y.apply()),K=new v(this,b,y),this.onData(this.writer.processingInstruction(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},x.prototype.declaration=function(b,y,T){var M;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return M=new l(this,b,y,T),this.onData(this.writer.declaration(M,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.doctype=function(b,y,T){if(this.openCurrent(),b==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,y,T),this.currentNode.rootNodeName=b,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},x.prototype.dtdElement=function(b,y){var T;return this.openCurrent(),T=new w(this,b,y),this.onData(this.writer.dtdElement(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.attList=function(b,y,T,M,k){var N;return this.openCurrent(),N=new m(this,b,y,T,M,k),this.onData(this.writer.dtdAttList(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.entity=function(b,y){var T;return this.openCurrent(),T=new p(this,!1,b,y),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.pEntity=function(b,y){var T;return this.openCurrent(),T=new p(this,!0,b,y),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.notation=function(b,y){var T;return this.openCurrent(),T=new s(this,b,y),this.onData(this.writer.dtdNotation(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.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},x.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},x.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},x.prototype.openNode=function(b){var y,T,M,k;if(!b.isOpen){if(!this.root&&this.currentLevel===0&&b.type===L.Element&&(this.root=b),T="",b.type===L.Element){this.writerOptions.state=f.OpenTag,T=this.writer.indent(b,this.writerOptions,this.currentLevel)+"<"+b.name,k=b.attribs;for(M in k){if(!O.call(k,M))continue;y=k[M],T+=this.writer.attribute(y,this.writerOptions,this.currentLevel)}T+=(b.children?">":"/>")+this.writer.endline(b,this.writerOptions,this.currentLevel),this.writerOptions.state=f.InsideTag}else this.writerOptions.state=f.OpenTag,T=this.writer.indent(b,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+b.rootNodeName,b.pubID&&b.sysID?T+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(T+=' SYSTEM "'+b.sysID+'"'),b.children?(T+=" [",this.writerOptions.state=f.InsideTag):(this.writerOptions.state=f.CloseTag,T+=">"),T+=this.writer.endline(b,this.writerOptions,this.currentLevel);return this.onData(T,this.currentLevel),b.isOpen=!0}},x.prototype.closeNode=function(b){var y;if(!b.isClosed)return y="",this.writerOptions.state=f.CloseTag,b.type===L.Element?y=this.writer.indent(b,this.writerOptions,this.currentLevel)+"</"+b.name+">"+this.writer.endline(b,this.writerOptions,this.currentLevel):y=this.writer.indent(b,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(b,this.writerOptions,this.currentLevel),this.writerOptions.state=f.None,this.onData(y,this.currentLevel),b.isClosed=!0},x.prototype.onData=function(b,y){return this.documentStarted=!0,this.onDataCallback(b,y+1)},x.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},x.prototype.debugInfo=function(b){return b==null?"":"node: <"+b+">"},x.prototype.ele=function(){return this.element.apply(this,arguments)},x.prototype.nod=function(b,y,T){return this.node(b,y,T)},x.prototype.txt=function(b){return this.text(b)},x.prototype.dat=function(b){return this.cdata(b)},x.prototype.com=function(b){return this.comment(b)},x.prototype.ins=function(b,y){return this.instruction(b,y)},x.prototype.dec=function(b,y,T){return this.declaration(b,y,T)},x.prototype.dtd=function(b,y,T){return this.doctype(b,y,T)},x.prototype.e=function(b,y,T){return this.element(b,y,T)},x.prototype.n=function(b,y,T){return this.node(b,y,T)},x.prototype.t=function(b){return this.text(b)},x.prototype.d=function(b){return this.cdata(b)},x.prototype.c=function(b){return this.comment(b)},x.prototype.r=function(b){return this.raw(b)},x.prototype.i=function(b,y){return this.instruction(b,y)},x.prototype.att=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},x.prototype.a=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},x.prototype.ent=function(b,y){return this.entity(b,y)},x.prototype.pent=function(b,y){return this.pEntity(b,y)},x.prototype.not=function(b,y){return this.notation(b,y)},x}()}).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,J,I){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,m,w=function(l,a){for(var d in a)p.call(a,d)&&(l[d]=a[d]);function h(){this.constructor=l}return h.prototype=a.prototype,l.prototype=new h,l.__super__=a.prototype,l},p={}.hasOwnProperty;m=j("./XMLNode"),D=j("./NodeType"),J.exports=u=function(s){w(l,s);function l(a){l.__super__.constructor.call(this,a),this.type=D.Dummy}return l.prototype.clone=function(){return(0,f.default)(this)},l.prototype.toString=function(a){return""},l}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(j,J,I){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,m,w,p,s,l,a,d,h=function(g,E){for(var n in E)c.call(E,n)&&(g[n]=E[n]);function o(){this.constructor=g}return o.prototype=E.prototype,g.prototype=new o,g.__super__=E.prototype,g},c={}.hasOwnProperty;d=j("./Utility"),a=d.isObject,l=d.isFunction,s=d.getValue,p=j("./XMLNode"),D=j("./NodeType"),u=j("./XMLAttribute"),w=j("./XMLNamedNodeMap"),J.exports=m=function(v){h(g,v);function g(E,n,o){var t,S,_,i;if(g.__super__.constructor.call(this,E),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,o!=null&&this.attribute(o),E.type===D.Document&&(this.isRoot=!0,this.documentObject=E,E.rootObject=this,E.children)){for(i=E.children,S=0,_=i.length;S<_;S++)if(t=i[S],t.type===D.DocType){t.name=this.name;break}}}return Object.defineProperty(g.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(g.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(g.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(g.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(g.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new w(this.attribs)),this.attributeMap}}),g.prototype.clone=function(){var E,n,o,t;o=(0,f.default)(this),o.isRoot&&(o.documentObject=null),o.attribs={},t=this.attribs;for(n in t){if(!c.call(t,n))continue;E=t[n],o.attribs[n]=E.clone()}return o.children=[],this.children.forEach(function(S){var _;return _=S.clone(),_.parent=o,o.children.push(_)}),o},g.prototype.attribute=function(E,n){var o,t;if(E!=null&&(E=s(E)),a(E))for(o in E){if(!c.call(E,o))continue;t=E[o],this.attribute(o,t)}else l(n)&&(n=n.apply()),this.options.keepNullAttributes&&n==null?this.attribs[E]=new u(this,E,""):n!=null&&(this.attribs[E]=new u(this,E,n));return this},g.prototype.removeAttribute=function(E){var n,o,t;if(E==null)throw new Error("Missing attribute name. "+this.debugInfo());if(E=s(E),Array.isArray(E))for(o=0,t=E.length;o<t;o++)n=E[o],delete this.attribs[n];else delete this.attribs[E];return this},g.prototype.toString=function(E){return this.options.writer.element(this,this.options.writer.filterOptions(E))},g.prototype.att=function(E,n){return this.attribute(E,n)},g.prototype.a=function(E,n){return this.attribute(E,n)},g.prototype.getAttribute=function(E){return this.attribs.hasOwnProperty(E)?this.attribs[E].value:null},g.prototype.setAttribute=function(E,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNode=function(E){return this.attribs.hasOwnProperty(E)?this.attribs[E]:null},g.prototype.setAttributeNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNS=function(E,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNS=function(E,n,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNS=function(E,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNodeNS=function(E,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNodeNS=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(E,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.hasAttribute=function(E){return this.attribs.hasOwnProperty(E)},g.prototype.hasAttributeNS=function(E,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttribute=function(E,n){return this.attribs.hasOwnProperty(E)?this.attribs[E].isId:n},g.prototype.setIdAttributeNS=function(E,n,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttributeNode=function(E,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(E,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByClassName=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isEqualNode=function(E){var n,o,t;if(!g.__super__.isEqualNode.apply(this,arguments).isEqualNode(E))return!1;if(E.namespaceURI!==this.namespaceURI)return!1;if(E.prefix!==this.prefix)return!1;if(E.localName!==this.localName)return!1;if(E.attribs.length!==this.attribs.length)return!1;for(n=o=0,t=this.attribs.length-1;0<=t?o<=t:o>=t;n=0<=t?++o:--o)if(!this.attribs[n].isEqualNode(E.attribs[n]))return!1;return!0},g}(p)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(j,J,I){"use strict";var L=j("babel-runtime/core-js/object/keys"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D;J.exports=D=function(){function u(m){this.nodes=m}return Object.defineProperty(u.prototype,"length",{get:function(){return(0,f.default)(this.nodes).length||0}}),u.prototype.clone=function(){return this.nodes=null},u.prototype.getNamedItem=function(m){return this.nodes[m]},u.prototype.setNamedItem=function(m){var w;return w=this.nodes[m.nodeName],this.nodes[m.nodeName]=m,w||null},u.prototype.removeNamedItem=function(m){var w;return w=this.nodes[m],delete this.nodes[m],w||null},u.prototype.item=function(m){return this.nodes[(0,f.default)(this.nodes)[m]]||null},u.prototype.getNamedItemNS=function(m,w){throw new Error("This DOM method is not implemented.")},u.prototype.setNamedItemNS=function(m){throw new Error("This DOM method is not implemented.")},u.prototype.removeNamedItemNS=function(m,w){throw new Error("This DOM method is not implemented.")},u}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(j,J,I){"use strict";(function(){var L,f,C,D,u,m,w,p,s,l,a,d,h,c,v,g,E,n,o,t={}.hasOwnProperty;o=j("./Utility"),n=o.isObject,E=o.isFunction,g=o.isEmpty,v=o.getValue,p=null,C=null,D=null,u=null,m=null,h=null,c=null,d=null,w=null,f=null,a=null,s=null,L=null,J.exports=l=function(){function S(_){this.parent=_,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,p||(p=j("./XMLElement"),C=j("./XMLCData"),D=j("./XMLComment"),u=j("./XMLDeclaration"),m=j("./XMLDocType"),h=j("./XMLRaw"),c=j("./XMLText"),d=j("./XMLProcessingInstruction"),w=j("./XMLDummy"),f=j("./NodeType"),a=j("./XMLNodeList"),s=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 i;return i=this.parent.children.indexOf(this),this.parent.children[i-1]||null}}),Object.defineProperty(S.prototype,"nextSibling",{get:function(){var i;return i=this.parent.children.indexOf(this),this.parent.children[i+1]||null}}),Object.defineProperty(S.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(S.prototype,"textContent",{get:function(){var i,P,O,x,b;if(this.nodeType===f.Element||this.nodeType===f.DocumentFragment){for(b="",x=this.children,P=0,O=x.length;P<O;P++)i=x[P],i.textContent&&(b+=i.textContent);return b}else return null},set:function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),S.prototype.setParent=function(_){var i,P,O,x,b;for(this.parent=_,_&&(this.options=_.options,this.stringify=_.stringify),x=this.children,b=[],P=0,O=x.length;P<O;P++)i=x[P],b.push(i.setParent(this));return b},S.prototype.element=function(_,i,P){var O,x,b,y,T,M,k,N,K,z,B;if(M=null,i===null&&P==null&&(K=[{},null],i=K[0],P=K[1]),i==null&&(i={}),i=v(i),n(i)||(z=[i,P],P=z[0],i=z[1]),_!=null&&(_=v(_)),Array.isArray(_))for(b=0,k=_.length;b<k;b++)x=_[b],M=this.element(x);else if(E(_))M=this.element(_.apply());else if(n(_))for(T in _){if(!t.call(_,T))continue;if(B=_[T],E(B)&&(B=B.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&T.indexOf(this.stringify.convertAttKey)===0)M=this.attribute(T.substr(this.stringify.convertAttKey.length),B);else if(!this.options.separateArrayItems&&Array.isArray(B)&&g(B))M=this.dummy();else if(n(B)&&g(B))M=this.element(T);else if(!this.options.keepNullNodes&&B==null)M=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(B))for(y=0,N=B.length;y<N;y++)x=B[y],O={},O[T]=x,M=this.element(O);else n(B)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&T.indexOf(this.stringify.convertTextKey)===0?M=this.element(B):(M=this.element(T),M.element(B)):M=this.element(T,B)}else!this.options.keepNullNodes&&P===null?M=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&_.indexOf(this.stringify.convertTextKey)===0?M=this.text(P):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&_.indexOf(this.stringify.convertCDataKey)===0?M=this.cdata(P):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&_.indexOf(this.stringify.convertCommentKey)===0?M=this.comment(P):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&_.indexOf(this.stringify.convertRawKey)===0?M=this.raw(P):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&_.indexOf(this.stringify.convertPIKey)===0?M=this.instruction(_.substr(this.stringify.convertPIKey.length),P):M=this.node(_,i,P);if(M==null)throw new Error("Could not create any elements with: "+_+". "+this.debugInfo());return M},S.prototype.insertBefore=function(_,i,P){var O,x,b,y,T;if(_!=null?_.type:void 0)return b=_,y=i,b.setParent(this),y?(x=children.indexOf(y),T=children.splice(x),children.push(b),Array.prototype.push.apply(children,T)):children.push(b),b;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(_));return x=this.parent.children.indexOf(this),T=this.parent.children.splice(x),O=this.parent.element(_,i,P),Array.prototype.push.apply(this.parent.children,T),O},S.prototype.insertAfter=function(_,i,P){var O,x,b;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(_));return x=this.parent.children.indexOf(this),b=this.parent.children.splice(x+1),O=this.parent.element(_,i,P),Array.prototype.push.apply(this.parent.children,b),O},S.prototype.remove=function(){var _,i;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return _=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[_,_-_+1].concat(i=[])),this.parent},S.prototype.node=function(_,i,P){var O,x;return _!=null&&(_=v(_)),i||(i={}),i=v(i),n(i)||(x=[i,P],P=x[0],i=x[1]),O=new p(this,_,i),P!=null&&O.text(P),this.children.push(O),O},S.prototype.text=function(_){var i;return n(_)&&this.element(_),i=new c(this,_),this.children.push(i),this},S.prototype.cdata=function(_){var i;return i=new C(this,_),this.children.push(i),this},S.prototype.comment=function(_){var i;return i=new D(this,_),this.children.push(i),this},S.prototype.commentBefore=function(_){var i,P,O;return P=this.parent.children.indexOf(this),O=this.parent.children.splice(P),i=this.parent.comment(_),Array.prototype.push.apply(this.parent.children,O),this},S.prototype.commentAfter=function(_){var i,P,O;return P=this.parent.children.indexOf(this),O=this.parent.children.splice(P+1),i=this.parent.comment(_),Array.prototype.push.apply(this.parent.children,O),this},S.prototype.raw=function(_){var i;return i=new h(this,_),this.children.push(i),this},S.prototype.dummy=function(){var _;return _=new w(this),_},S.prototype.instruction=function(_,i){var P,O,x,b,y;if(_!=null&&(_=v(_)),i!=null&&(i=v(i)),Array.isArray(_))for(b=0,y=_.length;b<y;b++)P=_[b],this.instruction(P);else if(n(_))for(P in _){if(!t.call(_,P))continue;O=_[P],this.instruction(P,O)}else E(i)&&(i=i.apply()),x=new d(this,_,i),this.children.push(x);return this},S.prototype.instructionBefore=function(_,i){var P,O,x;return O=this.parent.children.indexOf(this),x=this.parent.children.splice(O),P=this.parent.instruction(_,i),Array.prototype.push.apply(this.parent.children,x),this},S.prototype.instructionAfter=function(_,i){var P,O,x;return O=this.parent.children.indexOf(this),x=this.parent.children.splice(O+1),P=this.parent.instruction(_,i),Array.prototype.push.apply(this.parent.children,x),this},S.prototype.declaration=function(_,i,P){var O,x;return O=this.document(),x=new u(O,_,i,P),O.children.length===0?O.children.unshift(x):O.children[0].type===f.Declaration?O.children[0]=x:O.children.unshift(x),O.root()||O},S.prototype.dtd=function(_,i){var P,O,x,b,y,T,M,k,N,K;for(O=this.document(),x=new m(O,_,i),N=O.children,b=y=0,M=N.length;y<M;b=++y)if(P=N[b],P.type===f.DocType)return O.children[b]=x,x;for(K=O.children,b=T=0,k=K.length;T<k;b=++T)if(P=K[b],P.isRoot)return O.children.splice(b,0,x),x;return O.children.push(x),x},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 _;for(_=this;_;){if(_.type===f.Document)return _.rootObject;if(_.isRoot)return _;_=_.parent}},S.prototype.document=function(){var _;for(_=this;_;){if(_.type===f.Document)return _;_=_.parent}},S.prototype.end=function(_){return this.document().end(_)},S.prototype.prev=function(){var _;if(_=this.parent.children.indexOf(this),_<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[_-1]},S.prototype.next=function(){var _;if(_=this.parent.children.indexOf(this),_===-1||_===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[_+1]},S.prototype.importDocument=function(_){var i;return i=_.root().clone(),i.parent=this,i.isRoot=!1,this.children.push(i),this},S.prototype.debugInfo=function(_){var i,P;return _=_||this.name,_==null&&!((i=this.parent)!=null?i.name:void 0)?"":_==null?"parent: <"+this.parent.name+">":((P=this.parent)!=null?P.name:void 0)?"node: <"+_+">, parent: <"+this.parent.name+">":"node: <"+_+">"},S.prototype.ele=function(_,i,P){return this.element(_,i,P)},S.prototype.nod=function(_,i,P){return this.node(_,i,P)},S.prototype.txt=function(_){return this.text(_)},S.prototype.dat=function(_){return this.cdata(_)},S.prototype.com=function(_){return this.comment(_)},S.prototype.ins=function(_,i){return this.instruction(_,i)},S.prototype.doc=function(){return this.document()},S.prototype.dec=function(_,i,P){return this.declaration(_,i,P)},S.prototype.e=function(_,i,P){return this.element(_,i,P)},S.prototype.n=function(_,i,P){return this.node(_,i,P)},S.prototype.t=function(_){return this.text(_)},S.prototype.d=function(_){return this.cdata(_)},S.prototype.c=function(_){return this.comment(_)},S.prototype.r=function(_){return this.raw(_)},S.prototype.i=function(_,i){return this.instruction(_,i)},S.prototype.u=function(){return this.up()},S.prototype.importXMLBuilder=function(_){return this.importDocument(_)},S.prototype.replaceChild=function(_,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.removeChild=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.appendChild=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.hasChildNodes=function(){return this.children.length!==0},S.prototype.cloneNode=function(_){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(_,i){return!0},S.prototype.hasAttributes=function(){return this.attribs.length!==0},S.prototype.compareDocumentPosition=function(_){var i,P;return i=this,i===_?0:this.document()!==_.document()?(P=L.Disconnected|L.ImplementationSpecific,Math.random()<.5?P|=L.Preceding:P|=L.Following,P):i.isAncestor(_)?L.Contains|L.Preceding:i.isDescendant(_)?L.Contains|L.Following:i.isPreceding(_)?L.Preceding:L.Following},S.prototype.isSameNode=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupPrefix=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isDefaultNamespace=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupNamespaceURI=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isEqualNode=function(_){var i,P,O;if(_.nodeType!==this.nodeType)return!1;if(_.children.length!==this.children.length)return!1;for(i=P=0,O=this.children.length-1;0<=O?P<=O:P>=O;i=0<=O?++P:--P)if(!this.children[i].isEqualNode(_.children[i]))return!1;return!0},S.prototype.getFeature=function(_,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setUserData=function(_,i,P){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getUserData=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.contains=function(_){return _?_===this||this.isDescendant(_):!1},S.prototype.isDescendant=function(_){var i,P,O,x,b;for(b=this.children,O=0,x=b.length;O<x;O++){if(i=b[O],_===i)return!0;if(P=i.isDescendant(_),P)return!0}return!1},S.prototype.isAncestor=function(_){return _.isDescendant(this)},S.prototype.isPreceding=function(_){var i,P;return i=this.treePosition(_),P=this.treePosition(this),i===-1||P===-1?!1:i<P},S.prototype.isFollowing=function(_){var i,P;return i=this.treePosition(_),P=this.treePosition(this),i===-1||P===-1?!1:i>P},S.prototype.treePosition=function(_){var i,P;return P=0,i=!1,this.foreachTreeNode(this.document(),function(O){if(P++,!i&&O===_)return i=!0}),i?P:-1},S.prototype.foreachTreeNode=function(_,i){var P,O,x,b,y;for(_||(_=this.document()),b=_.children,O=0,x=b.length;O<x;O++){if(P=b[O],y=i(P))return y;if(y=this.foreachTreeNode(P,i),y)return y}},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,J,I){"use strict";(function(){var L;J.exports=L=function(){function f(C){this.nodes=C}return Object.defineProperty(f.prototype,"length",{get:function(){return this.nodes.length||0}}),f.prototype.clone=function(){return this.nodes=null},f.prototype.item=function(C){return this.nodes[C]||null},f}()}).call(void 0)},{}],275:[function(j,J,I){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,m,w=function(l,a){for(var d in a)p.call(a,d)&&(l[d]=a[d]);function h(){this.constructor=l}return h.prototype=a.prototype,l.prototype=new h,l.__super__=a.prototype,l},p={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLCharacterData"),J.exports=m=function(s){w(l,s);function l(a,d,h){if(l.__super__.constructor.call(this,a),d==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=D.ProcessingInstruction,this.target=this.stringify.insTarget(d),this.name=this.target,h&&(this.value=this.stringify.insValue(h))}return l.prototype.clone=function(){return(0,f.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,J,I){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,m,w=function(l,a){for(var d in a)p.call(a,d)&&(l[d]=a[d]);function h(){this.constructor=l}return h.prototype=a.prototype,l.prototype=new h,l.__super__=a.prototype,l},p={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLNode"),J.exports=m=function(s){w(l,s);function l(a,d){if(l.__super__.constructor.call(this,a),d==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=D.Raw,this.value=this.stringify.raw(d)}return l.prototype.clone=function(){return(0,f.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,J,I){"use strict";(function(){var L,f,C,D,u=function(p,s){for(var l in s)m.call(s,l)&&(p[l]=s[l]);function a(){this.constructor=p}return a.prototype=s.prototype,p.prototype=new a,p.__super__=s.prototype,p},m={}.hasOwnProperty;L=j("./NodeType"),D=j("./XMLWriterBase"),f=j("./WriterState"),J.exports=C=function(w){u(p,w);function p(s,l){this.stream=s,p.__super__.constructor.call(this,l)}return p.prototype.endline=function(s,l,a){return s.isLastRootNode&&l.state===f.CloseTag?"":p.__super__.endline.call(this,s,l,a)},p.prototype.document=function(s,l){var a,d,h,c,v,g,E,n,o;for(E=s.children,d=h=0,v=E.length;h<v;d=++h)a=E[d],a.isLastRootNode=d===s.children.length-1;for(l=this.filterOptions(l),n=s.children,o=[],c=0,g=n.length;c<g;c++)a=n[c],o.push(this.writeChildNode(a,l,0));return o},p.prototype.attribute=function(s,l,a){return this.stream.write(p.__super__.attribute.call(this,s,l,a))},p.prototype.cdata=function(s,l,a){return this.stream.write(p.__super__.cdata.call(this,s,l,a))},p.prototype.comment=function(s,l,a){return this.stream.write(p.__super__.comment.call(this,s,l,a))},p.prototype.declaration=function(s,l,a){return this.stream.write(p.__super__.declaration.call(this,s,l,a))},p.prototype.docType=function(s,l,a){var d,h,c,v;if(a||(a=0),this.openNode(s,l,a),l.state=f.OpenTag,this.stream.write(this.indent(s,l,a)),this.stream.write("<!DOCTYPE "+s.root().name),s.pubID&&s.sysID?this.stream.write(' PUBLIC "'+s.pubID+'" "'+s.sysID+'"'):s.sysID&&this.stream.write(' SYSTEM "'+s.sysID+'"'),s.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(s,l,a)),l.state=f.InsideTag,v=s.children,h=0,c=v.length;h<c;h++)d=v[h],this.writeChildNode(d,l,a+1);l.state=f.CloseTag,this.stream.write("]")}return l.state=f.CloseTag,this.stream.write(l.spaceBeforeSlash+">"),this.stream.write(this.endline(s,l,a)),l.state=f.None,this.closeNode(s,l,a)},p.prototype.element=function(s,l,a){var d,h,c,v,g,E,n,o,t,S;a||(a=0),this.openNode(s,l,a),l.state=f.OpenTag,this.stream.write(this.indent(s,l,a)+"<"+s.name),t=s.attribs;for(n in t){if(!m.call(t,n))continue;d=t[n],this.attribute(d,l,a)}if(c=s.children.length,v=c===0?null:s.children[0],c===0||s.children.every(function(_){return(_.type===L.Text||_.type===L.Raw)&&_.value===""}))l.allowEmpty?(this.stream.write(">"),l.state=f.CloseTag,this.stream.write("</"+s.name+">")):(l.state=f.CloseTag,this.stream.write(l.spaceBeforeSlash+"/>"));else if(l.pretty&&c===1&&(v.type===L.Text||v.type===L.Raw)&&v.value!=null)this.stream.write(">"),l.state=f.InsideTag,l.suppressPrettyCount++,o=!0,this.writeChildNode(v,l,a+1),l.suppressPrettyCount--,o=!1,l.state=f.CloseTag,this.stream.write("</"+s.name+">");else{for(this.stream.write(">"+this.endline(s,l,a)),l.state=f.InsideTag,S=s.children,g=0,E=S.length;g<E;g++)h=S[g],this.writeChildNode(h,l,a+1);l.state=f.CloseTag,this.stream.write(this.indent(s,l,a)+"</"+s.name+">")}return this.stream.write(this.endline(s,l,a)),l.state=f.None,this.closeNode(s,l,a)},p.prototype.processingInstruction=function(s,l,a){return this.stream.write(p.__super__.processingInstruction.call(this,s,l,a))},p.prototype.raw=function(s,l,a){return this.stream.write(p.__super__.raw.call(this,s,l,a))},p.prototype.text=function(s,l,a){return this.stream.write(p.__super__.text.call(this,s,l,a))},p.prototype.dtdAttList=function(s,l,a){return this.stream.write(p.__super__.dtdAttList.call(this,s,l,a))},p.prototype.dtdElement=function(s,l,a){return this.stream.write(p.__super__.dtdElement.call(this,s,l,a))},p.prototype.dtdEntity=function(s,l,a){return this.stream.write(p.__super__.dtdEntity.call(this,s,l,a))},p.prototype.dtdNotation=function(s,l,a){return this.stream.write(p.__super__.dtdNotation.call(this,s,l,a))},p}(D)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(j,J,I){"use strict";(function(){var L,f,C=function(m,w){for(var p in w)D.call(w,p)&&(m[p]=w[p]);function s(){this.constructor=m}return s.prototype=w.prototype,m.prototype=new s,m.__super__=w.prototype,m},D={}.hasOwnProperty;f=j("./XMLWriterBase"),J.exports=L=function(u){C(m,u);function m(w){m.__super__.constructor.call(this,w)}return m.prototype.document=function(w,p){var s,l,a,d,h;for(p=this.filterOptions(p),d="",h=w.children,l=0,a=h.length;l<a;l++)s=h[l],d+=this.writeChildNode(s,p,0);return p.pretty&&d.slice(-p.newline.length)===p.newline&&(d=d.slice(0,-p.newline.length)),d},m}(f)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(j,J,I){"use strict";(function(){var L,f=function(u,m){return function(){return u.apply(m,arguments)}},C={}.hasOwnProperty;J.exports=L=function(){function D(u){this.assertLegalName=f(this.assertLegalName,this),this.assertLegalChar=f(this.assertLegalChar,this);var m,w,p;u||(u={}),this.options=u,this.options.version||(this.options.version="1.0"),w=u.stringify||{};for(m in w){if(!C.call(w,m))continue;p=w[m],this[m]=p}}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 m,w;if(this.options.noValidation)return u;if(m="",this.options.version==="1.0"){if(m=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=u.match(m))throw new Error("Invalid character in string: "+u+" at index "+w.index)}else if(this.options.version==="1.1"&&(m=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=u.match(m)))throw new Error("Invalid character in string: "+u+" at index "+w.index);return u},D.prototype.assertLegalName=function(u){var m;if(this.options.noValidation)return u;if(this.assertLegalChar(u),m=/^([: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(m))throw new Error("Invalid character in name");return u},D.prototype.textEscape=function(u){var m;return this.options.noValidation?u:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,u.replace(m,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},D.prototype.attEscape=function(u){var m;return this.options.noValidation?u:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,u.replace(m,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},D}()}).call(void 0)},{}],280:[function(j,J,I){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,m,w=function(l,a){for(var d in a)p.call(a,d)&&(l[d]=a[d]);function h(){this.constructor=l}return h.prototype=a.prototype,l.prototype=new h,l.__super__=a.prototype,l},p={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLCharacterData"),J.exports=m=function(s){w(l,s);function l(a,d){if(l.__super__.constructor.call(this,a),d==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=D.Text,this.value=this.stringify.text(d)}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 d,h,c;for(c="",h=this.previousSibling;h;)c=h.data+c,h=h.previousSibling;for(c+=this.data,d=this.nextSibling;d;)c=c+d.data,d=d.nextSibling;return c}}),l.prototype.clone=function(){return(0,f.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,J,I){"use strict";(function(){var L,f,C,D,u,m,w,p,s,l,a,d,h,c,v,g,E,n={}.hasOwnProperty;E=j("./Utility").assign,L=j("./NodeType"),s=j("./XMLDeclaration"),l=j("./XMLDocType"),C=j("./XMLCData"),D=j("./XMLComment"),d=j("./XMLElement"),c=j("./XMLRaw"),v=j("./XMLText"),h=j("./XMLProcessingInstruction"),a=j("./XMLDummy"),u=j("./XMLDTDAttList"),m=j("./XMLDTDElement"),w=j("./XMLDTDEntity"),p=j("./XMLDTDNotation"),f=j("./WriterState"),J.exports=g=function(){function o(t){var S,_,i;t||(t={}),this.options=t,_=t.writer||{};for(S in _){if(!n.call(_,S))continue;i=_[S],this["_"+S]=this[S],this[S]=i}}return o.prototype.filterOptions=function(t){var S,_,i,P,O,x,b,y;return t||(t={}),t=E({},this.options,t),S={writer:this},S.pretty=t.pretty||!1,S.allowEmpty=t.allowEmpty||!1,S.indent=(_=t.indent)!=null?_:" ",S.newline=(i=t.newline)!=null?i:`
|
|
|
`,S.offset=(P=t.offset)!=null?P:0,S.dontPrettyTextNodes=(O=(x=t.dontPrettyTextNodes)!=null?x:t.dontprettytextnodes)!=null?O:0,S.spaceBeforeSlash=(b=(y=t.spaceBeforeSlash)!=null?y:t.spacebeforeslash)!=null?b:"",S.spaceBeforeSlash===!0&&(S.spaceBeforeSlash=" "),S.suppressPrettyCount=0,S.user={},S.state=f.None,S},o.prototype.indent=function(t,S,_){var i;return!S.pretty||S.suppressPrettyCount?"":S.pretty&&(i=(_||0)+S.offset+1,i>0)?new Array(i).join(S.indent):""},o.prototype.endline=function(t,S,_){return!S.pretty||S.suppressPrettyCount?"":S.newline},o.prototype.attribute=function(t,S,_){var i;return this.openAttribute(t,S,_),i=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,S,_),i},o.prototype.cdata=function(t,S,_){var i;return this.openNode(t,S,_),S.state=f.OpenTag,i=this.indent(t,S,_)+"<![CDATA[",S.state=f.InsideTag,i+=t.value,S.state=f.CloseTag,i+="]]>"+this.endline(t,S,_),S.state=f.None,this.closeNode(t,S,_),i},o.prototype.comment=function(t,S,_){var i;return this.openNode(t,S,_),S.state=f.OpenTag,i=this.indent(t,S,_)+"<!-- ",S.state=f.InsideTag,i+=t.value,S.state=f.CloseTag,i+=" -->"+this.endline(t,S,_),S.state=f.None,this.closeNode(t,S,_),i},o.prototype.declaration=function(t,S,_){var i;return this.openNode(t,S,_),S.state=f.OpenTag,i=this.indent(t,S,_)+"<?xml",S.state=f.InsideTag,i+=' version="'+t.version+'"',t.encoding!=null&&(i+=' encoding="'+t.encoding+'"'),t.standalone!=null&&(i+=' standalone="'+t.standalone+'"'),S.state=f.CloseTag,i+=S.spaceBeforeSlash+"?>",i+=this.endline(t,S,_),S.state=f.None,this.closeNode(t,S,_),i},o.prototype.docType=function(t,S,_){var i,P,O,x,b;if(_||(_=0),this.openNode(t,S,_),S.state=f.OpenTag,x=this.indent(t,S,_),x+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?x+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(x+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(x+=" [",x+=this.endline(t,S,_),S.state=f.InsideTag,b=t.children,P=0,O=b.length;P<O;P++)i=b[P],x+=this.writeChildNode(i,S,_+1);S.state=f.CloseTag,x+="]"}return S.state=f.CloseTag,x+=S.spaceBeforeSlash+">",x+=this.endline(t,S,_),S.state=f.None,this.closeNode(t,S,_),x},o.prototype.element=function(t,S,_){var i,P,O,x,b,y,T,M,k,N,K,z,B,H;_||(_=0),N=!1,K="",this.openNode(t,S,_),S.state=f.OpenTag,K+=this.indent(t,S,_)+"<"+t.name,z=t.attribs;for(k in z){if(!n.call(z,k))continue;i=z[k],K+=this.attribute(i,S,_)}if(O=t.children.length,x=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=f.CloseTag,K+="</"+t.name+">"+this.endline(t,S,_)):(S.state=f.CloseTag,K+=S.spaceBeforeSlash+"/>"+this.endline(t,S,_));else if(S.pretty&&O===1&&(x.type===L.Text||x.type===L.Raw)&&x.value!=null)K+=">",S.state=f.InsideTag,S.suppressPrettyCount++,N=!0,K+=this.writeChildNode(x,S,_+1),S.suppressPrettyCount--,N=!1,S.state=f.CloseTag,K+="</"+t.name+">"+this.endline(t,S,_);else{if(S.dontPrettyTextNodes){for(B=t.children,b=0,T=B.length;b<T;b++)if(P=B[b],(P.type===L.Text||P.type===L.Raw)&&P.value!=null){S.suppressPrettyCount++,N=!0;break}}for(K+=">"+this.endline(t,S,_),S.state=f.InsideTag,H=t.children,y=0,M=H.length;y<M;y++)P=H[y],K+=this.writeChildNode(P,S,_+1);S.state=f.CloseTag,K+=this.indent(t,S,_)+"</"+t.name+">",N&&S.suppressPrettyCount--,K+=this.endline(t,S,_),S.state=f.None}return this.closeNode(t,S,_),K},o.prototype.writeChildNode=function(t,S,_){switch(t.type){case L.CData:return this.cdata(t,S,_);case L.Comment:return this.comment(t,S,_);case L.Element:return this.element(t,S,_);case L.Raw:return this.raw(t,S,_);case L.Text:return this.text(t,S,_);case L.ProcessingInstruction:return this.processingInstruction(t,S,_);case L.Dummy:return"";case L.Declaration:return this.declaration(t,S,_);case L.DocType:return this.docType(t,S,_);case L.AttributeDeclaration:return this.dtdAttList(t,S,_);case L.ElementDeclaration:return this.dtdElement(t,S,_);case L.EntityDeclaration:return this.dtdEntity(t,S,_);case L.NotationDeclaration:return this.dtdNotation(t,S,_);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},o.prototype.processingInstruction=function(t,S,_){var i;return this.openNode(t,S,_),S.state=f.OpenTag,i=this.indent(t,S,_)+"<?",S.state=f.InsideTag,i+=t.target,t.value&&(i+=" "+t.value),S.state=f.CloseTag,i+=S.spaceBeforeSlash+"?>",i+=this.endline(t,S,_),S.state=f.None,this.closeNode(t,S,_),i},o.prototype.raw=function(t,S,_){var i;return this.openNode(t,S,_),S.state=f.OpenTag,i=this.indent(t,S,_),S.state=f.InsideTag,i+=t.value,S.state=f.CloseTag,i+=this.endline(t,S,_),S.state=f.None,this.closeNode(t,S,_),i},o.prototype.text=function(t,S,_){var i;return this.openNode(t,S,_),S.state=f.OpenTag,i=this.indent(t,S,_),S.state=f.InsideTag,i+=t.value,S.state=f.CloseTag,i+=this.endline(t,S,_),S.state=f.None,this.closeNode(t,S,_),i},o.prototype.dtdAttList=function(t,S,_){var i;return this.openNode(t,S,_),S.state=f.OpenTag,i=this.indent(t,S,_)+"<!ATTLIST",S.state=f.InsideTag,i+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,t.defaultValueType!=="#DEFAULT"&&(i+=" "+t.defaultValueType),t.defaultValue&&(i+=' "'+t.defaultValue+'"'),S.state=f.CloseTag,i+=S.spaceBeforeSlash+">"+this.endline(t,S,_),S.state=f.None,this.closeNode(t,S,_),i},o.prototype.dtdElement=function(t,S,_){var i;return this.openNode(t,S,_),S.state=f.OpenTag,i=this.indent(t,S,_)+"<!ELEMENT",S.state=f.InsideTag,i+=" "+t.name+" "+t.value,S.state=f.CloseTag,i+=S.spaceBeforeSlash+">"+this.endline(t,S,_),S.state=f.None,this.closeNode(t,S,_),i},o.prototype.dtdEntity=function(t,S,_){var i;return this.openNode(t,S,_),S.state=f.OpenTag,i=this.indent(t,S,_)+"<!ENTITY",S.state=f.InsideTag,t.pe&&(i+=" %"),i+=" "+t.name,t.value?i+=' "'+t.value+'"':(t.pubID&&t.sysID?i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(i+=' SYSTEM "'+t.sysID+'"'),t.nData&&(i+=" NDATA "+t.nData)),S.state=f.CloseTag,i+=S.spaceBeforeSlash+">"+this.endline(t,S,_),S.state=f.None,this.closeNode(t,S,_),i},o.prototype.dtdNotation=function(t,S,_){var i;return this.openNode(t,S,_),S.state=f.OpenTag,i=this.indent(t,S,_)+"<!NOTATION",S.state=f.InsideTag,i+=" "+t.name,t.pubID&&t.sysID?i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?i+=' PUBLIC "'+t.pubID+'"':t.sysID&&(i+=' SYSTEM "'+t.sysID+'"'),S.state=f.CloseTag,i+=S.spaceBeforeSlash+">"+this.endline(t,S,_),S.state=f.None,this.closeNode(t,S,_),i},o.prototype.openNode=function(t,S,_){},o.prototype.closeNode=function(t,S,_){},o.prototype.openAttribute=function(t,S,_){},o.prototype.closeAttribute=function(t,S,_){},o}()}).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,J,I){"use strict";(function(){var L,f,C,D,u,m,w,p,s,l;l=j("./Utility"),p=l.assign,s=l.isFunction,C=j("./XMLDOMImplementation"),D=j("./XMLDocument"),u=j("./XMLDocumentCB"),w=j("./XMLStringWriter"),m=j("./XMLStreamWriter"),L=j("./NodeType"),f=j("./WriterState"),J.exports.create=function(a,d,h,c){var v,g;if(a==null)throw new Error("Root element needs a name.");return c=p({},d,h,c),v=new D(c),g=v.element(a),c.headless||(v.declaration(c),(c.pubID!=null||c.sysID!=null)&&v.dtd(c)),g},J.exports.begin=function(a,d,h){var c;return s(a)&&(c=[a,d],d=c[0],h=c[1],a={}),d?new u(a,d,h):new D(a)},J.exports.stringWriter=function(a){return new w(a)},J.exports.streamWriter=function(a,d){return new m(a,d)},J.exports.implementation=new C,J.exports.nodeType=L,J.exports.writerState=f}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(j,J,I){J.exports=f;var L=Object.prototype.hasOwnProperty;function f(){for(var C={},D=0;D<arguments.length;D++){var u=arguments[D];for(var m in u)L.call(u,m)&&(C[m]=u[m])}return C}},{}],284:[function(j,J,I){"use strict";var L=j("buffer").Buffer,f=j("./sha"),C=j("./md5"),D={sha1:f,md5:C},u=64,m=L.alloc(u);m.fill(0);function w(l,a,d){L.isBuffer(a)||(a=L.from(a)),L.isBuffer(d)||(d=L.from(d)),a.length>u?a=l(a):a.length<u&&(a=L.concat([a,m],u));for(var h=L.alloc(u),c=L.alloc(u),v=0;v<u;v++)h[v]=a[v]^54,c[v]=a[v]^92;var g=l(L.concat([h,d]));return l(L.concat([c,g]))}function p(l,a){l=l||"sha1";var d=D[l],h=[],c=0;return d||s("algorithm:",l,"is not yet supported"),{update:function(g){return L.isBuffer(g)||(g=L.from(g)),h.push(g),c+=g.length,this},digest:function(g){var E=L.concat(h),n=a?w(d,a,E):d(E);return h=null,g?n.toString(g):n}}}function s(){var l=[].slice.call(arguments).join(" ");throw new Error([l,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}I.createHash=function(l){return p(l)},I.createHmac=function(l,a){return p(l,a)},I.createCredentials=function(){s("sorry,createCredentials is not implemented yet")},I.createCipher=function(){s("sorry,createCipher is not implemented yet")},I.createCipheriv=function(){s("sorry,createCipheriv is not implemented yet")},I.createDecipher=function(){s("sorry,createDecipher is not implemented yet")},I.createDecipheriv=function(){s("sorry,createDecipheriv is not implemented yet")},I.createSign=function(){s("sorry,createSign is not implemented yet")},I.createVerify=function(){s("sorry,createVerify is not implemented yet")},I.createDiffieHellman=function(){s("sorry,createDiffieHellman is not implemented yet")},I.pbkdf2=function(){s("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(j,J,I){"use strict";var L=j("buffer").Buffer,f=4,C=L.alloc(f);C.fill(0);var D=8;function u(p,s){if(p.length%f!==0){var l=p.length+(f-p.length%f);p=L.concat([p,C],l)}for(var a=[],d=s?p.readInt32BE:p.readInt32LE,h=0;h<p.length;h+=f)a.push(d.call(p,h));return a}function m(p,s,l){for(var a=L.alloc(s),d=l?a.writeInt32BE:a.writeInt32LE,h=0;h<p.length;h++)d.call(a,p[h],h*4,!0);return a}function w(p,s,l,a){L.isBuffer(p)||(p=L.from(p));var d=s(u(p,a),p.length*D);return m(d,l,a)}J.exports={hash:w}},{buffer:73}],286:[function(j,J,I){"use strict";var L=j("./helpers");function f(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function C(a,d){a[d>>5]|=128<<d%32,a[(d+64>>>9<<4)+14]=d;for(var h=1732584193,c=-271733879,v=-1732584194,g=271733878,E=0;E<a.length;E+=16){var n=h,o=c,t=v,S=g;h=u(h,c,v,g,a[E+0],7,-680876936),g=u(g,h,c,v,a[E+1],12,-389564586),v=u(v,g,h,c,a[E+2],17,606105819),c=u(c,v,g,h,a[E+3],22,-1044525330),h=u(h,c,v,g,a[E+4],7,-176418897),g=u(g,h,c,v,a[E+5],12,1200080426),v=u(v,g,h,c,a[E+6],17,-1473231341),c=u(c,v,g,h,a[E+7],22,-45705983),h=u(h,c,v,g,a[E+8],7,1770035416),g=u(g,h,c,v,a[E+9],12,-1958414417),v=u(v,g,h,c,a[E+10],17,-42063),c=u(c,v,g,h,a[E+11],22,-1990404162),h=u(h,c,v,g,a[E+12],7,1804603682),g=u(g,h,c,v,a[E+13],12,-40341101),v=u(v,g,h,c,a[E+14],17,-1502002290),c=u(c,v,g,h,a[E+15],22,1236535329),h=m(h,c,v,g,a[E+1],5,-165796510),g=m(g,h,c,v,a[E+6],9,-1069501632),v=m(v,g,h,c,a[E+11],14,643717713),c=m(c,v,g,h,a[E+0],20,-373897302),h=m(h,c,v,g,a[E+5],5,-701558691),g=m(g,h,c,v,a[E+10],9,38016083),v=m(v,g,h,c,a[E+15],14,-660478335),c=m(c,v,g,h,a[E+4],20,-405537848),h=m(h,c,v,g,a[E+9],5,568446438),g=m(g,h,c,v,a[E+14],9,-1019803690),v=m(v,g,h,c,a[E+3],14,-187363961),c=m(c,v,g,h,a[E+8],20,1163531501),h=m(h,c,v,g,a[E+13],5,-1444681467),g=m(g,h,c,v,a[E+2],9,-51403784),v=m(v,g,h,c,a[E+7],14,1735328473),c=m(c,v,g,h,a[E+12],20,-1926607734),h=w(h,c,v,g,a[E+5],4,-378558),g=w(g,h,c,v,a[E+8],11,-2022574463),v=w(v,g,h,c,a[E+11],16,1839030562),c=w(c,v,g,h,a[E+14],23,-35309556),h=w(h,c,v,g,a[E+1],4,-1530992060),g=w(g,h,c,v,a[E+4],11,1272893353),v=w(v,g,h,c,a[E+7],16,-155497632),c=w(c,v,g,h,a[E+10],23,-1094730640),h=w(h,c,v,g,a[E+13],4,681279174),g=w(g,h,c,v,a[E+0],11,-358537222),v=w(v,g,h,c,a[E+3],16,-722521979),c=w(c,v,g,h,a[E+6],23,76029189),h=w(h,c,v,g,a[E+9],4,-640364487),g=w(g,h,c,v,a[E+12],11,-421815835),v=w(v,g,h,c,a[E+15],16,530742520),c=w(c,v,g,h,a[E+2],23,-995338651),h=p(h,c,v,g,a[E+0],6,-198630844),g=p(g,h,c,v,a[E+7],10,1126891415),v=p(v,g,h,c,a[E+14],15,-1416354905),c=p(c,v,g,h,a[E+5],21,-57434055),h=p(h,c,v,g,a[E+12],6,1700485571),g=p(g,h,c,v,a[E+3],10,-1894986606),v=p(v,g,h,c,a[E+10],15,-1051523),c=p(c,v,g,h,a[E+1],21,-2054922799),h=p(h,c,v,g,a[E+8],6,1873313359),g=p(g,h,c,v,a[E+15],10,-30611744),v=p(v,g,h,c,a[E+6],15,-1560198380),c=p(c,v,g,h,a[E+13],21,1309151649),h=p(h,c,v,g,a[E+4],6,-145523070),g=p(g,h,c,v,a[E+11],10,-1120210379),v=p(v,g,h,c,a[E+2],15,718787259),c=p(c,v,g,h,a[E+9],21,-343485551),h=s(h,n),c=s(c,o),v=s(v,t),g=s(g,S)}return Array(h,c,v,g)}function D(a,d,h,c,v,g){return s(l(s(s(d,a),s(c,g)),v),h)}function u(a,d,h,c,v,g,E){return D(d&h|~d&c,a,d,v,g,E)}function m(a,d,h,c,v,g,E){return D(d&c|h&~c,a,d,v,g,E)}function w(a,d,h,c,v,g,E){return D(d^h^c,a,d,v,g,E)}function p(a,d,h,c,v,g,E){return D(h^(d|~c),a,d,v,g,E)}function s(a,d){var h=(a&65535)+(d&65535),c=(a>>16)+(d>>16)+(h>>16);return c<<16|h&65535}function l(a,d){return a<<d|a>>>32-d}J.exports=function(d){return L.hash(d,C,16)}},{"./helpers":285}],287:[function(j,J,I){"use strict";var L=j("./helpers");function f(w,p){w[p>>5]|=128<<24-p%32,w[(p+64>>9<<4)+15]=p;for(var s=Array(80),l=1732584193,a=-271733879,d=-1732584194,h=271733878,c=-1009589776,v=0;v<w.length;v+=16){for(var g=l,E=a,n=d,o=h,t=c,S=0;S<80;S++){S<16?s[S]=w[v+S]:s[S]=m(s[S-3]^s[S-8]^s[S-14]^s[S-16],1);var _=u(u(m(l,5),C(S,a,d,h)),u(u(c,s[S]),D(S)));c=h,h=d,d=m(a,30),a=l,l=_}l=u(l,g),a=u(a,E),d=u(d,n),h=u(h,o),c=u(c,t)}return Array(l,a,d,h,c)}function C(w,p,s,l){return w<20?p&s|~p&l:w<40?p^s^l:w<60?p&s|p&l|s&l:p^s^l}function D(w){return w<20?1518500249:w<40?1859775393:w<60?-1894007588:-899497514}function u(w,p){var s=(w&65535)+(p&65535),l=(w>>16)+(p>>16)+(s>>16);return l<<16|s&65535}function m(w,p){return w<<p|w>>>32-p}J.exports=function(p){return L.hash(p,f,20,!0)}},{"./helpers":285}],288:[function(j,J,I){"use strict";J.exports=function(){return function(){}}},{}],289:[function(j,J,I){(function(L){"use strict";var f=j("babel-runtime/helpers/typeof"),C=D(f);function D(l){return l&&l.__esModule?l:{default:l}}var u=j("stream"),m=u.Stream,w=j("../lib/common/utils/isArray"),p=w.isArray;J.exports.string=function(a){return typeof a=="string"},J.exports.array=p,J.exports.buffer=L.isBuffer;function s(l){return l instanceof m}J.exports.writableStream=function(a){return s(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,J,I){"use strict";I.encodeURIComponent=function(L){try{return encodeURIComponent(L)}catch(f){return L}},I.escape=j("escape-html"),I.timestamp=function(f){if(f){var C=f;return typeof C=="string"&&(C=Number(C)),String(f).length===10&&(C*=1e3),new Date(C)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(j,J,I){(function(L,f){"use strict";var C=j("babel-runtime/core-js/json/stringify"),D=w(C),u=j("babel-runtime/helpers/typeof"),m=w(u);function w(S){return S&&S.__esModule?S:{default:S}}var p=j("util"),s=j("url"),l=j("http"),a=j("https"),d=j("debug")("urllib"),h=j("humanize-ms"),c,v=0,g=Math.pow(2,31)-10,E=/^https?:\/\//i;function n(S,_){return S===void 0?_:S}function o(S,_){return function(i,P,O){if(i)return _(i);S({data:P,status:O.statusCode,headers:O.headers,res:O})}}I.TIMEOUTS=[h("300s"),h("300s")];var t=["json","text"];I.request=function(_,i,P){return arguments.length===2&&typeof i=="function"&&(P=i,i=null),typeof P=="function"?I.requestWithCallback(_,i,P):(c||(c=j("any-promise")),new c(function(O,x){I.requestWithCallback(_,i,o(O,x))}))},I.requestWithCallback=function(_,i,P){if(!_||typeof _!="string"&&(typeof _=="undefined"?"undefined":(0,m.default)(_))!=="object"){var O=p.format("expect request url to be a string or a http request options, but got %j",_);throw new Error(O)}arguments.length===2&&typeof i=="function"&&(P=i,i=null),i=i||{},v>=g&&(v=0);var x=++v;i.requestUrls=i.requestUrls||[];var b={requestId:x,url:_,args:i,ctx:i.ctx};i.emitter&&i.emitter.emit("request",b),i.timeout=i.timeout||I.TIMEOUTS,i.maxRedirects=i.maxRedirects||10,i.streaming=i.streaming||i.customResponse;var y=Date.now(),T;typeof _=="string"?(E.test(_)||(_="http://"+_),T=s.parse(_)):T=_;var M=(i.type||i.method||T.method||"GET").toUpperCase(),k=T.port||80,N=l,K=n(i.agent,I.agent),z=i.fixJSONCtlChars;T.protocol==="https:"&&(N=a,K=n(i.httpsAgent,I.httpsAgent),T.port||(k=443));var B={host:T.hostname||T.host||"localhost",path:T.path||"/",method:M,port:k,agent:K,headers:i.headers||{},lookup:i.lookup};Array.isArray(i.timeout)?B.requestTimeout=i.timeout[i.timeout.length-1]:typeof i.timeout!="undefined"&&(B.requestTimeout=i.timeout);for(var H=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U<H.length;U++){var W=H[U];i.hasOwnProperty(W)&&(B[W]=i[W])}B.rejectUnauthorized===!1&&!B.hasOwnProperty("secureOptions")&&(B.secureOptions=j("constants").SSL_OP_NO_TLSv1_2);var G=i.auth||T.auth;G&&(B.auth=G);var ee=i.content||i.data,ie=M==="GET"||M==="HEAD"||i.dataAsQueryString;if(!i.content&&(ee&&!(typeof ee=="string"||f.isBuffer(ee))))if(ie)ee=i.nestedQuerystring?qs.stringify(ee):querystring.stringify(ee);else{var ce=B.headers["Content-Type"]||B.headers["content-type"];ce||(i.contentType==="json"?ce="application/json":ce="application/x-www-form-urlencoded",B.headers["Content-Type"]=ce),parseContentType(ce).type==="application/json"?ee=(0,D.default)(ee):ee=i.nestedQuerystring?qs.stringify(ee):querystring.stringify(ee)}ie&&ee&&(B.path+=(T.query?"&":"?")+ee,ee=null);var _e=0;if(ee){var Ce=ee.length;f.isBuffer(ee)||(Ce=f.byteLength(ee)),_e=B.headers["Content-Length"]=Ce}i.dataType==="json"&&(B.headers.Accept="application/json"),typeof i.beforeRequest=="function"&&i.beforeRequest(B);var le=null,ye=null,fe=null,ne=!1,ae=!1,q=0,se=-1,Q=!1,Z="",be="",re=null;i.timing&&(re={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function Y(){le&&(clearTimeout(le),le=null)}function X(){ye&&(clearTimeout(ye),ye=null)}function $(Te,Ye,ot){if(X(),!P){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),x,L.pid,B.method,_),Te&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),x,L.pid,Te.name,Te.message,Te.stack);return}var ze=P;P=null;var rt={};if(ot&&(se=ot.statusCode,rt=ot.headers),se===401&&rt["www-authenticate"]&&(!i.headers||!i.headers.Authorization)&&i.digestAuth){var ke=rt["www-authenticate"];if(ke.indexOf("Digest ")>=0)return d("Request#%d %s: got digest auth header WWW-Authenticate: %s",x,_,ke),i.headers=i.headers||{},i.headers.Authorization=digestAuthHeader(B.method,B.path,ke,i.digestAuth),d("Request#%d %s: auth with digest header: %s",x,_,i.headers.Authorization),ot.headers["set-cookie"]&&(i.headers.Cookie=ot.headers["set-cookie"].join(";")),I.requestWithCallback(_,i,ze)}var Oe=Date.now()-y;re&&(re.contentDownload=Oe),d("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Oe,q,se,B.method,B.host,B.path,ae,re);var Re={status:se,statusCode:se,headers:rt,size:q,aborted:Q,rt:Oe,keepAliveSocket:ae,data:Ye,requestUrls:i.requestUrls,timing:re,remoteAddress:Z,remotePort:be};if(Te){var pe="";K&&typeof K.getCurrentStatus=="function"&&(pe=", agent status: "+(0,D.default)(K.getCurrentStatus())),Te.message+=", "+B.method+" "+_+" "+se+" (connected: "+ne+", keepalive socket: "+ae+pe+`)
|
|
|
headers: `+(0,D.default)(rt),Te.data=Ye,Te.path=B.path,Te.status=se,Te.headers=rt,Te.res=Re}ze(Te,Ye,i.streaming?ot:Re),i.emitter&&(b.url=_,b.socket=lt&<.connection,b.options=B,b.size=_e,i.emitter.emit("response",{requestId:x,error:Te,ctx:i.ctx,req:b,res:Re}))}function ve(Te){var Ye=null;if(i.followRedirect&&statuses.redirect[Te.statusCode]){i._followRedirectCount=(i._followRedirectCount||0)+1;var ot=Te.headers.location;if(!ot)Ye=new Error("Got statusCode "+Te.statusCode+" but cannot resolve next location from headers"),Ye.name="FollowRedirectError";else if(i._followRedirectCount>i.maxRedirects)Ye=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+_),Ye.name="MaxRedirectError";else{var ze=i.formatRedirectUrl?i.formatRedirectUrl(_,ot):s.resolve(_,ot);d("Request#%d %s: `redirected` from %s to %s",x,B.path,_,ze),X(),i.headers&&i.headers.Host&&E.test(ot)&&(i.headers.Host=null);var rt=P;return P=null,I.requestWithCallback(ze,i,rt),{redirect:!0,error:null}}}return{redirect:!1,error:Ye}}!B.headers["User-Agent"]&&!B.headers["user-agent"]&&(B.headers["User-Agent"]=navigator.userAgent),i.gzip&&(!B.headers["Accept-Encoding"]&&!B.headers["accept-encoding"]&&(B.headers["Accept-Encoding"]="gzip"));function de(Te,Ye,ot){var ze=Te.headers["content-encoding"];return ot(null,Ye,ze)}var xe=i.writeStream;d("Request#%d %s %s with headers %j, options.path: %s",x,M,_,B.headers,B.path),i.requestUrls.push(_);function Ke(Te){if(re&&(re.waiting=Date.now()-y),d("Request#%d %s `req response` event emit: status %d, headers: %j",x,_,Te.statusCode,Te.headers),i.streaming){var Ye=ve(Te);if(Ye.redirect){Te.resume();return}return Ye.error?(Te.resume(),$(Ye.error,null,Te)):$(null,null,Te)}if(Te.on("close",function(){d("Request#%d %s: `res close` event emit, total size %d",x,_,q)}),Te.on("error",function(){d("Request#%d %s: `res error` event emit, total size %d",x,_,q)}),Te.on("aborted",function(){Q=!0,d("Request#%d %s: `res aborted` event emit, total size %d",x,_,q)}),xe){var Ye=ve(Te);if(Ye.redirect){Te.resume();return}return Ye.error?(Te.resume(),xe.end(),$(Ye.error,null,Te)):(i.consumeWriteStream===!1?Te.on("end",$.bind(null,null,null,Te)):isNode010||isNode012?first([[xe,"close"],[Te,"aborted"]],function(rt,ke,Oe){d("Request#%d %s: writeStream or res %s event emitted",x,_,Oe),$(fe||null,null,Te)}):xe.on("close",function(){d("Request#%d %s: writeStream close event emitted",x,_),$(fe||null,null,Te)}),Te.pipe(xe))}var ot=[];Te.on("data",function(ze){d("Request#%d %s: `res data` event emit, size %d",x,_,ze.length),q+=ze.length,ot.push(ze)}),Te.on("end",function(){var ze=f.concat(ot,q);if(d("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",x,_,q,Te._dumped),fe)return $(fe,ze,Te);var rt=ve(Te);if(rt.error)return $(rt.error,ze,Te);if(rt.redirect)return;de(Te,ze,function(ke,Oe,Re){if(ke)return $(ke,ze,Te);if(!Re&&t.indexOf(i.dataType)>=0){try{Oe=decodeBodyByCharset(Oe,Te)}catch(Ee){return d("decodeBodyByCharset error: %s",Ee),$(null,Oe,Te)}if(i.dataType==="json")if(q===0)Oe=null;else{var pe=parseJSON(Oe,z);pe.error?ke=pe.error:Oe=pe.data}}Q&&d("Request#%d %s: Remote socket was terminated before `response.end()` was called",x,_),$(ke,Oe,Te)})})}var Ve,Xe;Array.isArray(i.timeout)?(Ve=h(i.timeout[0]),Xe=h(i.timeout[1])):Ve=Xe=h(i.timeout),d("ConnectTimeout: %d, ResponseTimeout: %d",Ve,Xe);function at(){d("Connect timer ticking, timeout: %d",Ve),le=setTimeout(function(){le=null,se===-1&&(se=-2);var Te="Connect timeout for "+Ve+"ms",Ye="ConnectionTimeoutError";lt.socket||(Ye="SocketAssignTimeoutError",Te+=", working sockets is full"),fe=new Error(Te),fe.name=Ye,fe.requestId=x,d("ConnectTimeout: Request#%d %s %s: %s, connected: %s",x,_,fe.name,Te,ne),Me()},Ve)}function it(){d("Response timer ticking, timeout: %d",Xe),ye=setTimeout(function(){ye=null;var Te="Response timeout for "+Xe+"ms",Ye="ResponseTimeoutError";fe=new Error(Te),fe.name=Ye,fe.requestId=x,d("ResponseTimeout: Request#%d %s %s: %s, connected: %s",x,_,fe.name,Te,ne),Me()},Xe)}var lt;B.mode=i.mode?i.mode:"";try{lt=N.request(B,Ke)}catch(Te){return $(Te)}typeof window=="undefined"?at():lt.on("requestTimeout",function(){se===-1&&(se=-2);var Te="Connect timeout for "+Ve+"ms",Ye="ConnectionTimeoutError";fe=new Error(Te),fe.name=Ye,fe.requestId=x,Me()});function Me(){d("Request#%d %s abort, connected: %s",x,_,ne),lt.socket||(fe.noSocket=!0,$(fe)),lt.abort()}return re&<.on("finish",function(){re.requestSent=Date.now()-y}),lt.once("socket",function(Te){re&&(re.queuing=Date.now()-y),isNode010&&Te.socket&&(Te=Te.socket);var Ye=Te.readyState;if(Ye==="opening"){Te.once("lookup",function(ot,ze,rt){d("Request#%d %s lookup: %s, %s, %s",x,_,ot,ze,rt),re&&(re.dnslookup=Date.now()-y),ze&&(Z=ze)}),Te.once("connect",function(){re&&(re.connected=Date.now()-y),Y(),it(),d("Request#%d %s new socket connected",x,_),ne=!0,Z||(Z=Te.remoteAddress),be=Te.remotePort});return}d("Request#%d %s reuse socket connected, readyState: %s",x,_,Ye),ne=!0,ae=!0,Z||(Z=Te.remoteAddress),be=Te.remotePort,Y(),it()}),lt.on("error",function(Te){(Te.name==="Error"||Te.name==="TypeError")&&(Te.name=ne?"ResponseError":"RequestError"),Te.message+=' (req "error")',d("Request#%d %s `req error` event emit, %s: %s",x,_,Te.name,Te.message),$(fe||Te)}),xe&&xe.once("error",function(Te){Te.message+=' (writeStream "error")',fe=Te,d("Request#%d %s `writeStream error` event emit, %s: %s",x,_,Te.name,Te.message),Me()}),i.stream?(i.stream.pipe(lt),i.stream.once("error",function(Te){Te.message+=' (stream "error")',fe=Te,d("Request#%d %s `readStream error` event emit, %s: %s",x,_,Te.name,Te.message),Me()})):lt.end(ee),lt.requestId=x,lt}}).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,J,I){"use strict";I.d(J,"a",function(){return p});var L=I("cDcd"),f=I("biw7"),C=I("fyJ8");function D(s){var l=s.className,a=s.index,d=s.children,h=s.colSpan,c=s.rowSpan,v=L.useContext(f.a),g=v.prefixCls,E=v.fixedInfoList,n=E[a];return L.createElement(C.a,Object.assign({className:l,index:a,component:"td",prefixCls:g,record:null,dataIndex:null,render:function(){return{children:d,props:{colSpan:h,rowSpan:c}}}},n))}function u(s){return L.createElement("tr",Object.assign({},s))}function m(s){var l=s.children,a=L.useContext(f.a),d=a.prefixCls;return L.createElement("tfoot",{className:"".concat(d,"-summary")},l)}var w=J.b=m,p={Cell:D,Row:u}},oRuE:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("OLod"))})(this,function(L){return L.pad.Iso10126={pad:function(f,C){var D=C*4,u=D-f.sigBytes%D;f.concat(L.lib.WordArray.random(u-1)).concat(L.lib.WordArray.create([u<<24],1))},unpad:function(f){var C=f.words[f.sigBytes-1>>>2]&255;f.sigBytes-=C}},L.pad.Iso10126})},osHv:function(j,J,I){(function(L){L(I("VrN/"))})(function(L){"use strict";var f=L.Pos;function C(E,n){return E.line-n.line||E.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",m=new RegExp("<(/?)(["+D+"]["+u+"]*)","g");function w(E,n,o,t){this.line=n,this.ch=o,this.cm=E,this.text=E.getLine(n),this.min=t?Math.max(t.from,E.firstLine()):E.firstLine(),this.max=t?Math.min(t.to-1,E.lastLine()):E.lastLine()}function p(E,n){var o=E.cm.getTokenTypeAt(f(E.line,n));return o&&/\btag\b/.test(o)}function s(E){return E.line>=E.max?void 0:(E.ch=0,E.text=E.cm.getLine(++E.line),!0)}function l(E){return E.line<=E.min?void 0:(E.text=E.cm.getLine(--E.line),E.ch=E.text.length,!0)}function a(E){for(;;){var n=E.text.indexOf(">",E.ch);if(n==-1){if(s(E))continue;return}if(!p(E,n+1)){E.ch=n+1;continue}var o=E.text.lastIndexOf("/",n),t=o>-1&&!/\S/.test(E.text.slice(o+1,n));return E.ch=n+1,t?"selfClose":"regular"}}function d(E){for(;;){var n=E.ch?E.text.lastIndexOf("<",E.ch-1):-1;if(n==-1){if(l(E))continue;return}if(!p(E,n+1)){E.ch=n;continue}m.lastIndex=n,E.ch=n;var o=m.exec(E.text);if(o&&o.index==n)return o}}function h(E){for(;;){m.lastIndex=E.ch;var n=m.exec(E.text);if(!n){if(s(E))continue;return}if(!p(E,n.index+1)){E.ch=n.index+1;continue}return E.ch=n.index+n[0].length,n}}function c(E){for(;;){var n=E.ch?E.text.lastIndexOf(">",E.ch-1):-1;if(n==-1){if(l(E))continue;return}if(!p(E,n+1)){E.ch=n;continue}var o=E.text.lastIndexOf("/",n),t=o>-1&&!/\S/.test(E.text.slice(o+1,n));return E.ch=n+1,t?"selfClose":"regular"}}function v(E,n){for(var o=[];;){var t=h(E),S,_=E.line,i=E.ch-(t?t[0].length:0);if(!t||!(S=a(E)))return;if(S=="selfClose")continue;if(t[1]){for(var P=o.length-1;P>=0;--P)if(o[P]==t[2]){o.length=P;break}if(P<0&&(!n||n==t[2]))return{tag:t[2],from:f(_,i),to:f(E.line,E.ch)}}else o.push(t[2])}}function g(E,n){for(var o=[];;){var t=c(E);if(!t)return;if(t=="selfClose"){d(E);continue}var S=E.line,_=E.ch,i=d(E);if(!i)return;if(i[1])o.push(i[2]);else{for(var P=o.length-1;P>=0;--P)if(o[P]==i[2]){o.length=P;break}if(P<0&&(!n||n==i[2]))return{tag:i[2],from:f(E.line,E.ch),to:f(S,_)}}}}L.registerHelper("fold","xml",function(E,n){for(var o=new w(E,n.line,0);;){var t=h(o);if(!t||o.line!=n.line)return;var S=a(o);if(!S)return;if(!t[1]&&S!="selfClose"){var _=f(o.line,o.ch),i=v(o,t[2]);return i&&C(i.from,_)>0?{from:_,to:i.from}:null}}}),L.findMatchingTag=function(E,n,o){var t=new w(E,n.line,n.ch,o);if(t.text.indexOf(">")==-1&&t.text.indexOf("<")==-1)return;var S=a(t),_=S&&f(t.line,t.ch),i=S&&d(t);if(!S||!i||C(t,n)>0)return;var P={from:f(t.line,t.ch),to:_,tag:i[2]};return S=="selfClose"?{open:P,close:null,at:"open"}:i[1]?{open:g(t,i[2]),close:P,at:"close"}:(t=new w(E,_.line,_.ch,o),{open:P,close:v(t,i[2]),at:"open"})},L.findEnclosingTag=function(E,n,o,t){for(var S=new w(E,n.line,n.ch,o);;){var _=g(S,t);if(!_)break;var i=new w(E,n.line,n.ch,o),P=v(i,_.tag);if(P)return{open:_,close:P}}},L.scanForClosingTag=function(E,n,o,t){var S=new w(E,n.line,n.ch,t?{from:0,to:t}:null);return v(S,o)}})},p5ED:function(j,J,I){"use strict";var L=I("+L6B"),f=I("2/Rp"),C=I("5Dmo"),D=I("3S7+"),u=I("k1fw"),m=I("tJVT"),w=I("cDcd"),p=I.n(w),s=I("vHTk"),l=I.n(s),a=I("yEEn"),d=I("ZW9T"),h=I("1vsH");J.a=function(c){var v=c.name,g=c.data,E=c.theme,n=c.type,o=c.filename,t=c.monacoEditor,S=c.className,_=c.style,i=c.close,P=c.onClose,O=c.hasMask,x=Object(w.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),b=Object(m.a)(x,2),y=b[0],T=b[1],M=Object(w.useState)(""),k=Object(m.a)(M,2),N=k[0],K=k[1],z,B=1024*1024,H=10*B,U=Object(w.useRef)();n==="office"&&(z=Object(h.V)(g).filesize,z>H&&(n="other")),o&&(t.filename=o),Object(w.useEffect)(function(){var ee,ie,ce=(ee=document.cookie)===null||ee===void 0||((ie=ee.replace(/\s/g,""))===null||ie===void 0)?void 0:ie.split(";");ce==null||ce.map(function(_e){var Ce=_e.split("=");Ce[0]==="_educoder_session"&&K(Ce[1])})},[]);var W=function(){if(g.startsWith("http")||g.startsWith("blob:")){G();return}Object(h.z)(o||"educoder",g,o)},G=function(){Object(h.x)(o||"educoder",decodeURIComponent(g))};return console.log("data:",g,"fileanme:",o," name:",v),p.a.createElement("div",{style:Object(u.a)({},_||{}),className:"".concat(O&&l.a.bgBlack," ").concat(n?l.a.wrp:"hide")},i&&p.a.createElement("div",{className:l.a.close,ref:U},p.a.createElement(D.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return U.current}},p.a.createElement("span",{onClick:G},p.a.createElement("i",{className:"icon-quxiaozhiding"}))),p.a.createElement(D.a,{title:"\u5173\u95ED",getPopupContainer:function(){return U.current}},p.a.createElement("span",{className:"",onClick:P},p.a.createElement("i",{className:"icon-guanbi1"})))),p.a.createElement("div",{className:"".concat(l.a[S]," ").concat(S," ").concat(l.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&p.a.createElement(d.b,t)),n==="audio"&&p.a.createElement("audio",{src:"".concat(g!=null&&g.startsWith("/")||(g==null?void 0:g.indexOf("https://"))>-1?g:"data:audio/mp3;base64,").concat(g),autoPlay:!0}),n==="video"&&p.a.createElement(p.a.Fragment,null,g!=null&&g.startsWith("/")?p.a.createElement("video",{controls:!0,src:"".concat(g),autoPlay:!0}):p.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(g),autoPlay:!0})),n==="html"&&p.a.createElement("iframe",{src:g+"&disposition=inline"}),n==="html"&&p.a.createElement("iframe",{src:g+"&disposition=inline"}),n==="pdf"&&p.a.createElement("embed",{className:l.a.embed,src:g}),n==="image"&&p.a.createElement(p.a.Fragment,null,p.a.createElement("img",{src:"".concat(g!=null&&g.startsWith("/")||(g==null?void 0:g.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(g)})),n==="other"&&p.a.createElement("div",null,p.a.createElement(f.a,{type:"primary",size:"large",onClick:W},p.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&p.a.createElement(f.a,{type:"primary",size:"large",onClick:W},p.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(j,J,I){},pA7S:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.WordArray,u=C.BlockCipher,m=f.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],p=[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],s=[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],d=m.DES=u.extend({_doReset:function(){for(var g=this._key,E=g.words,n=[],o=0;o<56;o++){var t=w[o]-1;n[o]=E[t>>>5]>>>31-t%32&1}for(var S=this._subKeys=[],_=0;_<16;_++){for(var i=S[_]=[],P=s[_],o=0;o<24;o++)i[o/6|0]|=n[(p[o]-1+P)%28]<<31-o%6,i[4+(o/6|0)]|=n[28+(p[o+24]-1+P)%28]<<31-o%6;i[0]=i[0]<<1|i[0]>>>31;for(var o=1;o<7;o++)i[o]=i[o]>>>(o-1)*4+3;i[7]=i[7]<<5|i[7]>>>27}for(var O=this._invSubKeys=[],o=0;o<16;o++)O[o]=S[15-o]},encryptBlock:function(g,E){this._doCryptBlock(g,E,this._subKeys)},decryptBlock:function(g,E){this._doCryptBlock(g,E,this._invSubKeys)},_doCryptBlock:function(g,E,n){this._lBlock=g[E],this._rBlock=g[E+1],h.call(this,4,252645135),h.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),h.call(this,1,1431655765);for(var o=0;o<16;o++){for(var t=n[o],S=this._lBlock,_=this._rBlock,i=0,P=0;P<8;P++)i|=l[P][((_^t[P])&a[P])>>>0];this._lBlock=_,this._rBlock=S^i}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,h.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),g[E]=this._lBlock,g[E+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function h(g,E){var n=(this._lBlock>>>g^this._rBlock)&E;this._rBlock^=n,this._lBlock^=n<<g}function c(g,E){var n=(this._rBlock>>>g^this._lBlock)&E;this._lBlock^=n,this._rBlock^=n<<g}f.DES=u._createHelper(d);var v=m.TripleDES=u.extend({_doReset:function(){var g=this._key,E=g.words;if(E.length!==2&&E.length!==4&&E.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var n=E.slice(0,2),o=E.length<4?E.slice(0,2):E.slice(2,4),t=E.length<6?E.slice(0,2):E.slice(4,6);this._des1=d.createEncryptor(D.create(n)),this._des2=d.createEncryptor(D.create(o)),this._des3=d.createEncryptor(D.create(t))},encryptBlock:function(g,E){this._des1.encryptBlock(g,E),this._des2.decryptBlock(g,E),this._des3.encryptBlock(g,E)},decryptBlock:function(g,E){this._des3.decryptBlock(g,E),this._des2.encryptBlock(g,E),this._des1.decryptBlock(g,E)},keySize:192/32,ivSize:64/32,blockSize:64/32});f.TripleDES=u._createHelper(v)}(),L.TripleDES})},pIsd:function(j,J,I){var L=I("BJfS"),f=function(u){var m=/[height|width]$/;return m.test(u)},C=function(u){var m="",w=Object.keys(u);return w.forEach(function(p,s){var l=u[p];p=L(p),f(p)&&typeof l=="number"&&(l=l+"px"),l===!0?m+=p:l===!1?m+="not "+p:m+="("+p+": "+l+")",s<w.length-1&&(m+=" and ")}),m},D=function(u){var m="";return typeof u=="string"?u:u instanceof Array?(u.forEach(function(w,p){m+=C(w),p<u.length-1&&(m+=", ")}),m):C(u)};j.exports=D},qBft:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("OLod"))})(this,function(L){return L.pad.AnsiX923={pad:function(f,C){var D=f.sigBytes,u=C*4,m=u-D%u,w=D+m-1;f.clamp(),f.words[w>>>2]|=m<<24-w%4*8,f.sigBytes+=m},unpad:function(f){var C=f.words[f.sigBytes-1>>>2]&255;f.sigBytes-=C}},L.pad.Ansix923})},qHvr:function(j,J,I){"use strict";var L=I("2qtc"),f=I("kLXV"),C=I("5NDa"),D=I("5rEg"),u=I("miYZ"),m=I("tsqr"),w=I("tJVT"),p=I("cDcd"),s=I.n(p),l=I("4i/N");function a(d){var h=d.isAddmodle,c=d.setIsAdd,v=d.createTeam,g=Object(p.useState)(""),E=Object(w.a)(g,2),n=E[0],o=E[1];return s.a.createElement(f.a,{centered:!0,title:s.a.createElement("div",{style:{alignItems:"center",display:"flex"}},s.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),s.a.createElement(l.a,{onClick:function(){return c(!1)},style:{cursor:"porint"}})),visible:h,closable:!1,destroyOnClose:!0,onOk:function(){if(!n){m.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}v(n)},onCancel:function(){return c(!1)}},s.a.createElement("div",null,s.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",s.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},s.a.createElement(D.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:n,maxLength:60,addonAfter:String(n&&n.length||0)+"/60",onChange:function(S){return o(S.target.value)}}))))}J.a=a},qM6L:function(j,J,I){(function(L,f){j.exports=J=f(I("Ib8C"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.WordArray,u=f.enc,m=u.Utf16=u.Utf16BE={stringify:function(p){for(var s=p.words,l=p.sigBytes,a=[],d=0;d<l;d+=2){var h=s[d>>>2]>>>16-d%4*8&65535;a.push(String.fromCharCode(h))}return a.join("")},parse:function(p){for(var s=p.length,l=[],a=0;a<s;a++)l[a>>>1]|=p.charCodeAt(a)<<16-a%2*16;return D.create(l,s*2)}};u.Utf16LE={stringify:function(p){for(var s=p.words,l=p.sigBytes,a=[],d=0;d<l;d+=2){var h=w(s[d>>>2]>>>16-d%4*8&65535);a.push(String.fromCharCode(h))}return a.join("")},parse:function(p){for(var s=p.length,l=[],a=0;a<s;a++)l[a>>>1]|=w(p.charCodeAt(a)<<16-a%2*16);return D.create(l,s*2)}};function w(p){return p<<8&4278255360|p>>>8&16711935}}(),L.enc.Utf16})},qu8F:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("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 f=L.lib.BlockCipherMode.extend();function C(m){if((m>>24&255)===255){var w=m>>16&255,p=m>>8&255,s=m&255;w===255?(w=0,p===255?(p=0,s===255?s=0:++s):++p):++w,m=0,m+=w<<16,m+=p<<8,m+=s}else m+=1<<24;return m}function D(m){return(m[0]=C(m[0]))===0&&(m[1]=C(m[1])),m}var u=f.Encryptor=f.extend({processBlock:function(m,w){var p=this._cipher,s=p.blockSize,l=this._iv,a=this._counter;l&&(a=this._counter=l.slice(0),this._iv=void 0),D(a);var d=a.slice(0);p.encryptBlock(d,0);for(var h=0;h<s;h++)m[w+h]^=d[h]}});return f.Decryptor=u,f}(),L.mode.CTRGladman})},"rAM+":function(j,J,I){"use strict";I.d(J,"a",function(){return f});var L=I("Qw5x");function f(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 m=0,w=function(){};return{s:w,n:function(){return m>=C.length?{done:!0}:{done:!1,value:C[m++]}},e:function(d){throw d},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 p=!0,s=!1,l;return{s:function(){u=C[Symbol.iterator]()},n:function(){var d=u.next();return p=d.done,d},e:function(d){s=!0,l=d},f:function(){try{!p&&u.return!=null&&u.return()}finally{if(s)throw l}}}}},rUJ1:function(j,J){const I=/[&<>"']/,L=/[&<>"']/g,f=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,D={"&":"&","<":"<",">":">",'"':""","'":"'"},u=O=>D[O];function m(O,x){if(x){if(I.test(O))return O.replace(L,u)}else if(f.test(O))return O.replace(C,u);return O}const w=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function p(O){return O.replace(w,(x,b)=>(b=b.toLowerCase(),b==="colon"?":":b.charAt(0)==="#"?b.charAt(1)==="x"?String.fromCharCode(parseInt(b.substring(2),16)):String.fromCharCode(+b.substring(1)):""))}const s=/(^|[^\[])\^/g;function l(O,x){O=O.source||O,x=x||"";const b={replace:(y,T)=>(T=T.source||T,T=T.replace(s,"$1"),O=O.replace(y,T),b),getRegex:()=>new RegExp(O,x)};return b}const a=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function h(O,x,b){if(O){let y;try{y=decodeURIComponent(p(b)).replace(a,"").toLowerCase()}catch(T){return null}if(y.indexOf("javascript:")===0||y.indexOf("vbscript:")===0||y.indexOf("data:")===0)return null}x&&!d.test(b)&&(b=n(x,b));try{b=encodeURI(b).replace(/%25/g,"%")}catch(y){return null}return b}const c={},v=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(O,x){c[" "+O]||(v.test(O)?c[" "+O]=O+"/":c[" "+O]=_(O,"/",!0)),O=c[" "+O];const b=O.indexOf(":")===-1;return x.substring(0,2)==="//"?b?x:O.replace(g,"$1")+x:x.charAt(0)==="/"?b?x:O.replace(E,"$1")+x:O+x}const o={exec:function(){}};function t(O){let x=1,b,y;for(;x<arguments.length;x++){b=arguments[x];for(y in b)Object.prototype.hasOwnProperty.call(b,y)&&(O[y]=b[y])}return O}function S(O,x){const b=O.replace(/\|/g,(M,k,N)=>{let K=!1,z=k;for(;--z>=0&&N[z]==="\\";)K=!K;return K?"|":" |"}),y=b.split(/ \|/);let T=0;if(y.length>x)y.splice(x);else for(;y.length<x;)y.push("");for(;T<y.length;T++)y[T]=y[T].trim().replace(/\\\|/g,"|");return y}function _(O,x,b){const y=O.length;if(y===0)return"";let T=0;for(;T<y;){const M=O.charAt(y-T-1);if(M===x&&!b)T++;else if(M!==x&&b)T++;else break}return O.substr(0,y-T)}function i(O,x){if(O.indexOf(x[1])===-1)return-1;const b=O.length;let y=0,T=0;for(;T<b;T++)if(O[T]==="\\")T++;else if(O[T]===x[0])y++;else if(O[T]===x[1]&&(y--,y<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:m,unescape:p,edit:l,cleanUrl:h,resolveUrl:n,noopTest:o,merge:t,splitCells:S,rtrim:_,findClosingBracket:i,checkSanitizeDeprecation:P}},sR1s:function(j,J,I){"use strict";I.d(J,"b",function(){return D}),I.d(J,"a",function(){return u}),I.d(J,"c",function(){return m}),I.d(J,"d",function(){return w});var L=I("U8pU"),f="RC_TABLE_KEY";function C(p){return p==null?[]:Array.isArray(p)?p:[p]}function D(p,s){if(!s&&typeof s!="number")return p;for(var l=C(s),a=p,d=0;d<l.length;d+=1){if(!a)return null;var h=l[d];a=a[h]}return a}function u(p){var s=[],l={};return p.forEach(function(a){for(var d=a||{},h=d.key,c=d.dataIndex,v=h||C(c).join("-")||f;l[v];)v="".concat(v,"_next");l[v]=!0,s.push(v)}),s}function m(){var p={};function s(h,c){c&&Object.keys(c).forEach(function(v){var g=c[v];g&&Object(L.a)(g)==="object"?(h[v]=h[v]||{},s(h[v],g)):h[v]=g})}for(var l=arguments.length,a=new Array(l),d=0;d<l;d++)a[d]=arguments[d];return a.forEach(function(h){s(p,h)}),p}function w(p){return p!=null}},sboe:function(j,J,I){"use strict";I.d(J,"a",function(){return C});var L=I("cDcd"),f=I.n(L),C=L.createContext(null)},t23M:function(j,J,I){"use strict";var L=I("VTBJ"),f=I("1OyB"),C=I("vuIU"),D=I("Ji7U"),u=I("LK+K"),m=I("cDcd"),w=I.n(m),p=I("m+aA"),s=I("Zm9Q"),l=I("Kwbf"),a=I("c+Xe"),d=I("bdgK"),h="rc-observer-key",c=function(v){Object(D.a)(E,v);var g=Object(u.a)(E);function E(){var n;return Object(f.a)(this,E),n=g.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(o){var t=n.props.onResize,S=o[0].target,_=S.getBoundingClientRect(),i=_.width,P=_.height,O=S.offsetWidth,x=S.offsetHeight,b=Math.floor(i),y=Math.floor(P);if(n.state.width!==b||n.state.height!==y||n.state.offsetWidth!==O||n.state.offsetHeight!==x){var T={width:b,height:y,offsetWidth:O,offsetHeight:x};n.setState(T),t&&Promise.resolve().then(function(){t(Object(L.a)(Object(L.a)({},T),{},{offsetWidth:O,offsetHeight:x}))})}},n.setChildNode=function(o){n.childNode=o},n}return Object(C.a)(E,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var o=this.props.disabled;if(o){this.destroyObserver();return}var t=Object(p.a)(this.childNode||this),S=t!==this.currentElement;S&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new d.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var o=this.props.children,t=Object(s.a)(o);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(m.isValidElement(S)&&Object(a.c)(S)){var _=S.ref;t[0]=m.cloneElement(S,{ref:Object(a.a)(_,this.setChildNode)})}return t.length===1?t[0]:t.map(function(i,P){return!m.isValidElement(i)||"key"in i&&i.key!==null?i:m.cloneElement(i,{key:"".concat(h,"-").concat(P)})})}}]),E}(m.Component);c.displayName="ResizeObserver",J.a=c},uGsb:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("MlIO"),I("1uat"))})(this,function(L){return function(){var f=L,C=f.x64,D=C.Word,u=C.WordArray,m=f.algo,w=m.SHA512,p=m.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 s=w._doFinalize.call(this);return s.sigBytes-=16,s}});f.SHA384=w._createHelper(p),f.HmacSHA384=w._createHmacHelper(p)}(),L.SHA384})},uGxW:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("OLod"))})(this,function(L){return L.pad.NoPadding={pad:function(){},unpad:function(){}},L.pad.NoPadding})},uK0f:function(j,J,I){(function(L,f){j.exports=f()})(this,function(){"use strict";function L(f,C,D){D=D||{},D.childrenKeyName=D.childrenKeyName||"children";var u=f||[],m=[],w=0;do{var p=u.filter(function(s){return C(s,w)})[0];if(!p)break;m.push(p),u=p[D.childrenKeyName]||[],w+=1}while(u.length>0);return m}return L})},ulZh:function(j,J,I){typeof window!="undefined"&&function(f,C){j.exports=C()}(this,function(){return function(L){var f={};function C(D){if(f[D])return f[D].exports;var u=f[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=f,C.d=function(D,u,m){C.o(D,u)||Object.defineProperty(D,u,{enumerable:!0,get:m})},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 m=Object.create(null);if(C.r(m),Object.defineProperty(m,"default",{enumerable:!0,value:D}),u&2&&typeof D!="string")for(var w in D)C.d(m,w,function(p){return D[p]}.bind(null,w));return m},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,f,C){"use strict";var D=Object.prototype.hasOwnProperty,u="~";function m(){}Object.create&&(m.prototype=Object.create(null),new m().__proto__||(u=!1));function w(a,d,h){this.fn=a,this.context=d,this.once=h||!1}function p(a,d,h,c,v){if(typeof h!="function")throw new TypeError("The listener must be a function");var g=new w(h,c||a,v),E=u?u+d:d;return a._events[E]?a._events[E].fn?a._events[E]=[a._events[E],g]:a._events[E].push(g):(a._events[E]=g,a._eventsCount++),a}function s(a,d){--a._eventsCount===0?a._events=new m:delete a._events[d]}function l(){this._events=new m,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],h,c;if(this._eventsCount===0)return d;for(c in h=this._events)D.call(h,c)&&d.push(u?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},l.prototype.listeners=function(d){var h=u?u+d:d,c=this._events[h];if(!c)return[];if(c.fn)return[c.fn];for(var v=0,g=c.length,E=new Array(g);v<g;v++)E[v]=c[v].fn;return E},l.prototype.listenerCount=function(d){var h=u?u+d:d,c=this._events[h];return c?c.fn?1:c.length:0},l.prototype.emit=function(d,h,c,v,g,E){var n=u?u+d:d;if(!this._events[n])return!1;var o=this._events[n],t=arguments.length,S,_;if(o.fn){o.once&&this.removeListener(d,o.fn,void 0,!0);switch(t){case 1:return o.fn.call(o.context),!0;case 2:return o.fn.call(o.context,h),!0;case 3:return o.fn.call(o.context,h,c),!0;case 4:return o.fn.call(o.context,h,c,v),!0;case 5:return o.fn.call(o.context,h,c,v,g),!0;case 6:return o.fn.call(o.context,h,c,v,g,E),!0}for(_=1,S=new Array(t-1);_<t;_++)S[_-1]=arguments[_];o.fn.apply(o.context,S)}else{var i=o.length,P;for(_=0;_<i;_++){o[_].once&&this.removeListener(d,o[_].fn,void 0,!0);switch(t){case 1:o[_].fn.call(o[_].context);break;case 2:o[_].fn.call(o[_].context,h);break;case 3:o[_].fn.call(o[_].context,h,c);break;case 4:o[_].fn.call(o[_].context,h,c,v);break;default:if(!S)for(P=1,S=new Array(t-1);P<t;P++)S[P-1]=arguments[P];o[_].fn.apply(o[_].context,S)}}}return!0},l.prototype.on=function(d,h,c){return p(this,d,h,c,!1)},l.prototype.once=function(d,h,c){return p(this,d,h,c,!0)},l.prototype.removeListener=function(d,h,c,v){var g=u?u+d:d;if(!this._events[g])return this;if(!h)return s(this,g),this;var E=this._events[g];if(E.fn)E.fn===h&&(!v||E.once)&&(!c||E.context===c)&&s(this,g);else{for(var n=0,o=[],t=E.length;n<t;n++)(E[n].fn!==h||v&&!E[n].once||c&&E[n].context!==c)&&o.push(E[n]);o.length?this._events[g]=o.length===1?o[0]:o:s(this,g)}return this},l.prototype.removeAllListeners=function(d){var h;return d?(h=u?u+d:d,this._events[h]&&s(this,h)):(this._events=new m,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,f,C){(function(D){var u=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,m=/^([^\/?#]*)([^]*)$/,w=/(?:\/|^)\.(?=\/)/g,p=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(l,a,d){if(d=d||{},l=l.trim(),a=a.trim(),!a){if(!d.alwaysNormalize)return l;var h=s.parseURL(l);if(!h)throw new Error("Error trying to parse base URL.");return h.path=s.normalizePath(h.path),s.buildURLFromParts(h)}var c=s.parseURL(a);if(!c)throw new Error("Error trying to parse relative URL.");if(c.scheme)return d.alwaysNormalize?(c.path=s.normalizePath(c.path),s.buildURLFromParts(c)):a;var v=s.parseURL(l);if(!v)throw new Error("Error trying to parse base URL.");if(!v.netLoc&&v.path&&v.path[0]!=="/"){var g=m.exec(v.path);v.netLoc=g[1],v.path=g[2]}v.netLoc&&!v.path&&(v.path="/");var E={scheme:v.scheme,netLoc:c.netLoc,path:null,params:c.params,query:c.query,fragment:c.fragment};if(!c.netLoc&&(E.netLoc=v.netLoc,c.path[0]!=="/"))if(!c.path)E.path=v.path,c.params||(E.params=v.params,c.query||(E.query=v.query));else{var n=v.path,o=n.substring(0,n.lastIndexOf("/")+1)+c.path;E.path=s.normalizePath(o)}return E.path===null&&(E.path=d.alwaysNormalize?s.normalizePath(c.path):c.path),s.buildURLFromParts(E)},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(p,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};L.exports=s})(this)},"./node_modules/webworkify-webpack/index.js":function(L,f,C){function D(d){var h={};function c(g){if(h[g])return h[g].exports;var E=h[g]={i:g,l:!1,exports:{}};return d[g].call(E.exports,E,E.exports,c),E.l=!0,E.exports}c.m=d,c.c=h,c.i=function(g){return g},c.d=function(g,E,n){c.o(g,E)||Object.defineProperty(g,E,{configurable:!1,enumerable:!0,get:n})},c.r=function(g){Object.defineProperty(g,"__esModule",{value:!0})},c.n=function(g){var E=g&&g.__esModule?function(){return g.default}:function(){return g};return c.d(E,"a",E),E},c.o=function(g,E){return Object.prototype.hasOwnProperty.call(g,E)},c.p="/",c.oe=function(g){throw console.error(g),g};var v=c(c.s=ENTRY_MODULE);return v.default||v}var u="[\\.|\\-|\\+|\\w|/|@]+",m="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+u+").*?\\)";function w(d){return(d+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function p(d){return!isNaN(1*d)}function s(d,h,c){var v={};v[c]=[];var g=h.toString(),E=g.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!E)return v;for(var n=E[1],o=new RegExp("(\\\\n|\\W)"+w(n)+m,"g"),t;t=o.exec(g);){if(t[3]==="dll-reference")continue;v[c].push(t[3])}for(o=new RegExp("\\("+w(n)+'\\("(dll-reference\\s('+u+'))"\\)\\)'+m,"g");t=o.exec(g);)d[t[2]]||(v[c].push(t[1]),d[t[2]]=C(t[1]).m),v[t[2]]=v[t[2]]||[],v[t[2]].push(t[4]);for(var S=Object.keys(v),_=0;_<S.length;_++)for(var i=0;i<v[S[_]].length;i++)p(v[S[_]][i])&&(v[S[_]][i]=1*v[S[_]][i]);return v}function l(d){var h=Object.keys(d);return h.reduce(function(c,v){return c||d[v].length>0},!1)}function a(d,h){for(var c={main:[h]},v={main:[]},g={main:{}};l(c);)for(var E=Object.keys(c),n=0;n<E.length;n++){var o=E[n],t=c[o],S=t.pop();if(g[o]=g[o]||{},g[o][S]||!d[o][S])continue;g[o][S]=!0,v[o]=v[o]||[],v[o].push(S);for(var _=s(d,d[o][S],o),i=Object.keys(_),P=0;P<i.length;P++)c[i[P]]=c[i[P]]||[],c[i[P]]=c[i[P]].concat(_[i[P]])}return v}L.exports=function(d,h){h=h||{};var c={main:C.m},v=h.all?{main:Object.keys(c.main)}:a(c,d),g="";Object.keys(v).filter(function(S){return S!=="main"}).forEach(function(S){for(var _=0;v[S][_];)_++;v[S].push(_),c[S][_]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",g=g+"var "+S+" = ("+D.toString().replace("ENTRY_MODULE",JSON.stringify(_))+")({"+v[S].map(function(i){return""+JSON.stringify(i)+": "+c[S][i].toString()}).join(",")+`});
|
|
|
`}),g=g+"new (("+D.toString().replace("ENTRY_MODULE",JSON.stringify(d))+")({"+v.main.map(function(S){return""+JSON.stringify(S)+": "+c.main[S].toString()}).join(",")+"}))(self);";var E=new window.Blob([g],{type:"text/javascript"});if(h.bare)return E;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,o=n.createObjectURL(E),t=new window.Worker(o);return t.objectURL=o,t}},"./src/config.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"hlsDefaultConfig",function(){return P}),C.d(f,"mergeConfig",function(){return x}),C.d(f,"enableStreamingMode",function(){return b});var D=C("./src/controller/abr-controller.ts"),u=C("./src/controller/audio-stream-controller.ts"),m=C("./src/controller/audio-track-controller.ts"),w=C("./src/controller/subtitle-stream-controller.ts"),p=C("./src/controller/subtitle-track-controller.ts"),s=C("./src/controller/buffer-controller.ts"),l=C("./src/controller/timeline-controller.ts"),a=C("./src/controller/cap-level-controller.ts"),d=C("./src/controller/fps-controller.ts"),h=C("./src/controller/eme-controller.ts"),c=C("./src/controller/cmcd-controller.ts"),v=C("./src/utils/xhr-loader.ts"),g=C("./src/utils/fetch-loader.ts"),E=C("./src/utils/cues.ts"),n=C("./src/utils/mediakeys-helper.ts"),o=C("./src/utils/logger.ts");function t(){return t=Object.assign||function(y){for(var T=1;T<arguments.length;T++){var M=arguments[T];for(var k in M)Object.prototype.hasOwnProperty.call(M,k)&&(y[k]=M[k])}return y},t.apply(this,arguments)}function S(y,T){var M=Object.keys(y);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(y);T&&(k=k.filter(function(N){return Object.getOwnPropertyDescriptor(y,N).enumerable})),M.push.apply(M,k)}return M}function _(y){for(var T=1;T<arguments.length;T++){var M=arguments[T]!=null?arguments[T]:{};T%2?S(Object(M),!0).forEach(function(k){i(y,k,M[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(M)):S(Object(M)).forEach(function(k){Object.defineProperty(y,k,Object.getOwnPropertyDescriptor(M,k))})}return y}function i(y,T,M){return T in y?Object.defineProperty(y,T,{value:M,enumerable:!0,configurable:!0,writable:!0}):y[T]=M,y}var P=_(_({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:v.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:D.default,bufferController:s.default,capLevelController:a.default,fpsController:d.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:n.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},O()),{},{subtitleStreamController:w.SubtitleStreamController,subtitleTrackController:p.default,timelineController:l.TimelineController,audioStreamController:u.default,audioTrackController:m.default,emeController:h.default,cmcdController:c.default});function O(){return{cueHandler:E.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 x(y,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({},y,T)}function b(y){var T=y.loader;if(T!==g.default&&T!==v.default)o.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),y.progressive=!1;else{var M=Object(g.fetchSupported)();M&&(y.loader=g.default,y.progressive=!0,y.enableSoftwareAES=!0,o.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/polyfills/number.ts"),u=C("./src/utils/ewma-bandwidth-estimator.ts"),m=C("./src/events.ts"),w=C("./src/utils/buffer-helper.ts"),p=C("./src/errors.ts"),s=C("./src/types/loader.ts"),l=C("./src/utils/logger.ts");function a(c,v){for(var g=0;g<v.length;g++){var E=v[g];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(c,E.key,E)}}function d(c,v,g){return v&&a(c.prototype,v),g&&a(c,g),c}var h=function(){function c(g){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=g;var E=g.config;this.bwEstimator=new u.default(E.abrEwmaSlowVoD,E.abrEwmaFastVoD,E.abrEwmaDefaultEstimate),this.registerListeners()}var v=c.prototype;return v.registerListeners=function(){var E=this.hls;E.on(m.Events.FRAG_LOADING,this.onFragLoading,this),E.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),E.on(m.Events.FRAG_BUFFERED,this.onFragBuffered,this),E.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(m.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){var E=this.hls;E.off(m.Events.FRAG_LOADING,this.onFragLoading,this),E.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),E.off(m.Events.FRAG_BUFFERED,this.onFragBuffered,this),E.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(m.Events.ERROR,this.onError,this)},v.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},v.onFragLoading=function(E,n){var o=n.frag;if(o.type===s.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=o,this.partCurrent=(t=n.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},v.onLevelLoaded=function(E,n){var o=this.hls.config;n.details.live?this.bwEstimator.update(o.abrEwmaSlowLive,o.abrEwmaFastLive):this.bwEstimator.update(o.abrEwmaSlowVoD,o.abrEwmaFastVoD)},v._abandonRulesCheck=function(){var E=this.fragCurrent,n=this.partCurrent,o=this.hls,t=o.autoLevelEnabled,S=o.config,_=o.media;if(!E||!_)return;var i=n?n.stats:E.stats,P=n?n.duration:E.duration;if(i.aborted){l.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||_.paused||!_.playbackRate||!_.readyState)return;var O=performance.now()-i.loading.start,x=Math.abs(_.playbackRate);if(O<=500*P/x)return;var b=o.levels,y=o.minAutoLevel,T=b[E.level],M=i.total||Math.max(i.loaded,Math.round(P*T.maxBitrate/8)),k=Math.max(1,i.bwEstimate?i.bwEstimate/8:i.loaded*1e3/O),N=(M-i.loaded)/k,K=_.currentTime,z=(w.BufferHelper.bufferInfo(_,K,S.maxBufferHole).end-K)/x;if(z>=2*P/x||N<=z)return;var B=Number.POSITIVE_INFINITY,H;for(H=E.level-1;H>y;H--){var U=b[H].maxBitrate;if(B=P*U/(8*.8*k),B<z)break}if(B>=N)return;var W=this.bwEstimator.getEstimate();l.logger.warn("Fragment "+E.sn+(n?" part "+n.index:"")+" of level "+E.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+H+`
|
|
|
Current BW estimate: `+(Object(D.isFiniteNumber)(W)?(W/1024).toFixed(3):"Unknown")+` Kb/s
|
|
|
Estimated load time for current fragment: `+N.toFixed(3)+` s
|
|
|
Estimated load time for the next fragment: `+B.toFixed(3)+` s
|
|
|
Time to underbuffer: `+z.toFixed(3)+" s"),o.nextLoadLevel=H,this.bwEstimator.sample(O,i.loaded),this.clearTimer(),E.loader&&(this.fragCurrent=this.partCurrent=null,E.loader.abort()),o.trigger(m.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:E,part:n,stats:i})},v.onFragLoaded=function(E,n){var o=n.frag,t=n.part;if(o.type===s.PlaylistLevelType.MAIN&&Object(D.isFiniteNumber)(o.sn)){var S=t?t.stats:o.stats,_=t?t.duration:o.duration;if(this.clearTimer(),this.lastLoadedFragLevel=o.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var i=this.hls.levels[o.level],P=(i.loaded?i.loaded.bytes:0)+S.loaded,O=(i.loaded?i.loaded.duration:0)+_;i.loaded={bytes:P,duration:O},i.realBitrate=Math.round(8*P/O)}if(o.bitrateTest){var x={stats:S,frag:o,part:t,id:o.type};this.onFragBuffered(m.Events.FRAG_BUFFERED,x),o.bitrateTest=!1}}},v.onFragBuffered=function(E,n){var o=n.frag,t=n.part,S=t?t.stats:o.stats;if(S.aborted)return;if(o.type!==s.PlaylistLevelType.MAIN||o.sn==="initSegment")return;var _=S.parsing.end-S.loading.start;this.bwEstimator.sample(_,S.loaded),S.bwEstimate=this.bwEstimator.getEstimate(),o.bitrateTest?this.bitrateTestDelay=_/1e3:this.bitrateTestDelay=0},v.onError=function(E,n){switch(n.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},v.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},v.getNextABRAutoLevel=function(){var E=this.fragCurrent,n=this.partCurrent,o=this.hls,t=o.maxAutoLevel,S=o.config,_=o.minAutoLevel,i=o.media,P=n?n.duration:E?E.duration:0,O=i?i.currentTime:0,x=i&&i.playbackRate!==0?Math.abs(i.playbackRate):1,b=this.bwEstimator?this.bwEstimator.getEstimate():S.abrEwmaDefaultEstimate,y=(w.BufferHelper.bufferInfo(i,O,S.maxBufferHole).end-O)/x,T=this.findBestLevel(b,_,t,y,S.abrBandWidthFactor,S.abrBandWidthUpFactor);if(T>=0)return T;l.logger.trace((y?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var M=P?Math.min(P,S.maxStarvationDelay):S.maxStarvationDelay,k=S.abrBandWidthFactor,N=S.abrBandWidthUpFactor;if(!y){var K=this.bitrateTestDelay;if(K){var z=P?Math.min(P,S.maxLoadingDelay):S.maxLoadingDelay;M=z-K,l.logger.trace("bitrate test took "+Math.round(1e3*K)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*M)+" ms"),k=N=1}}return T=this.findBestLevel(b,_,t,y+M,k,N),Math.max(T,0)},v.findBestLevel=function(E,n,o,t,S,_){for(var i,P=this.fragCurrent,O=this.partCurrent,x=this.lastLoadedFragLevel,b=this.hls.levels,y=b[x],T=!!(y!=null&&(i=y.details)!==null&&i!==void 0&&i.live),M=y==null?void 0:y.codecSet,k=O?O.duration:P?P.duration:0,N=o;N>=n;N--){var K=b[N];if(!K||M&&K.codecSet!==M)continue;var z=K.details,B=(O?z==null?void 0:z.partTarget:z==null?void 0:z.averagetargetduration)||k,H=void 0;N<=x?H=S*E:H=_*E;var U=b[N].maxBitrate,W=U*B/H;if(l.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+N+"/"+Math.round(H)+"/"+U+"/"+B+"/"+t+"/"+W),H>U&&(!W||T&&!this.bitrateTestDelay||W<t))return N}return-1},d(c,[{key:"nextAutoLevel",get:function(){var E=this._nextAutoLevel,n=this.bwEstimator;if(E!==-1&&(!n||!n.canEstimate()))return E;var o=this.getNextABRAutoLevel();return E!==-1&&(o=Math.min(E,o)),o},set:function(E){this._nextAutoLevel=E}}]),c}();f.default=h},"./src/controller/audio-stream-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/polyfills/number.ts"),u=C("./src/controller/base-stream-controller.ts"),m=C("./src/events.ts"),w=C("./src/utils/buffer-helper.ts"),p=C("./src/controller/fragment-tracker.ts"),s=C("./src/types/level.ts"),l=C("./src/types/loader.ts"),a=C("./src/loader/fragment.ts"),d=C("./src/demux/chunk-cache.ts"),h=C("./src/demux/transmuxer-interface.ts"),c=C("./src/types/transmuxer.ts"),v=C("./src/controller/fragment-finders.ts"),g=C("./src/utils/discontinuities.ts"),E=C("./src/errors.ts"),n=C("./src/utils/logger.ts");function o(){return o=Object.assign||function(P){for(var O=1;O<arguments.length;O++){var x=arguments[O];for(var b in x)Object.prototype.hasOwnProperty.call(x,b)&&(P[b]=x[b])}return P},o.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(b,y){return b.__proto__=y,b},S(P,O)}var _=100,i=function(P){t(O,P);function O(b,y){var T;return T=P.call(this,b,y,"[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 x=O.prototype;return x.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},x._registerListeners=function(){var y=this.hls;y.on(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(m.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),y.on(m.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.on(m.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.on(m.Events.ERROR,this.onError,this),y.on(m.Events.BUFFER_RESET,this.onBufferReset,this),y.on(m.Events.BUFFER_CREATED,this.onBufferCreated,this),y.on(m.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.on(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),y.on(m.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x._unregisterListeners=function(){var y=this.hls;y.off(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(m.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),y.off(m.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.off(m.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.off(m.Events.ERROR,this.onError,this),y.off(m.Events.BUFFER_RESET,this.onBufferReset,this),y.off(m.Events.BUFFER_CREATED,this.onBufferCreated,this),y.off(m.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.off(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),y.off(m.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x.onInitPtsFound=function(y,T){var M=T.frag,k=T.id,N=T.initPTS;if(k==="main"){var K=M.cc;this.initPTS[M.cc]=N,this.log("InitPTS for cc: "+K+" found from main: "+N),this.videoTrackCC=K,this.state===u.State.WAITING_INIT_PTS&&this.tick()}},x.startLoad=function(y){if(!this.levels){this.startPosition=y,this.state=u.State.STOPPED;return}var T=this.lastCurrentTime;this.stopLoad(),this.setInterval(_),this.fragLoadError=0,T>0&&y===-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=y,this.tick()},x.doTick=function(){switch(this.state){case u.State.IDLE:this.doTickIdle();break;case u.State.WAITING_TRACK:{var y,T=this.levels,M=this.trackId,k=T==null||((y=T[M])===null||y===void 0)?void 0:y.details;if(k){if(this.waitForCdnTuneIn(k))break;this.state=u.State.WAITING_INIT_PTS}break}case u.State.FRAG_LOADING_WAITING_RETRY:{var N,K=performance.now(),z=this.retryDate;(!z||K>=z||(N=this.media)!==null&&N!==void 0&&N.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=u.State.IDLE);break}case u.State.WAITING_INIT_PTS:{var B=this.waitingData;if(B){var H=B.frag,U=B.part,W=B.cache,G=B.complete;if(this.initPTS[H.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=u.State.FRAG_LOADING;var ee=W.flush(),ie={frag:H,part:U,payload:ee,networkDetails:null};this._handleFragmentLoadProgress(ie),G&&P.prototype._handleFragmentLoadComplete.call(this,ie)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+H.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ce=this.getLoadPosition(),_e=w.BufferHelper.bufferInfo(this.mediaBuffer,ce,this.config.maxBufferHole),Ce=Object(v.fragmentWithinToleranceTest)(_e.end,this.config.maxFragLookUpTolerance,H);Ce<0&&(n.logger.log("Waiting fragment cc ("+H.cc+") @ "+H.start+" cancelled because another fragment at "+_e.end+" is needed"),this.clearWaitingFragment())}}else this.state=u.State.IDLE}}this.onTickEnd()},x.clearWaitingFragment=function(){var y=this.waitingData;y&&(this.fragmentTracker.removeFragment(y.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=u.State.IDLE)},x.onTickEnd=function(){var y=this.media;if(!y||!y.readyState)return;var T=this.mediaBuffer?this.mediaBuffer:y,M=T.buffered;!this.loadedmetadata&&M.length&&(this.loadedmetadata=!0),this.lastCurrentTime=y.currentTime},x.doTickIdle=function(){var y,T,M=this.hls,k=this.levels,N=this.media,K=this.trackId,z=M.config;if(!k||!k[K])return;if(!N&&(this.startFragRequested||!z.startFragPrefetch))return;var B=k[K],H=B.details;if(!H||H.live&&this.levelLastLoaded!==K||this.waitForCdnTuneIn(H)){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 W=U.len,G=this.getMaxBufferLength(),ee=this.audioSwitch;if(W>=G&&!ee)return;if(!ee&&this._streamEnded(U,H)){M.trigger(m.Events.BUFFER_EOS,{type:"audio"}),this.state=u.State.ENDED;return}var ie=H.fragments,ce=ie[0].start,_e=U.end;if(ee){var Ce=this.getLoadPosition();_e=Ce,H.PTSKnown&&Ce<ce&&((U.end>ce||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),N.currentTime=ce+.05))}var le=this.getNextFragment(_e,H);if(!le){this.bufferFlushed=!0;return}((y=le.decryptdata)===null||y===void 0?void 0:y.keyFormat)==="identity"&&!((T=le.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(le,H):this.loadFragment(le,H,_e)},x.getMaxBufferLength=function(){var y=P.prototype.getMaxBufferLength.call(this),T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,l.PlaylistLevelType.MAIN);return T===null?y:Math.max(y,T.len)},x.onMediaDetaching=function(){this.videoBuffer=null,P.prototype.onMediaDetaching.call(this)},x.onAudioTracksUpdated=function(y,T){var M=T.audioTracks;this.resetTransmuxer(),this.levels=M.map(function(k){return new s.Level(k)})},x.onAudioTrackSwitching=function(y,T){var M=!!T.url;this.trackId=T.id;var k=this.fragCurrent;k!=null&&k.loader&&k.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),M?this.setInterval(_):this.resetTransmuxer(),M?(this.audioSwitch=!0,this.state=u.State.IDLE):this.state=u.State.STOPPED,this.tick()},x.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},x.onLevelLoaded=function(y,T){this.mainDetails=T.details},x.onAudioTrackLoaded=function(y,T){var M,k=this.levels,N=T.details,K=T.id;if(!k){this.warn("Audio tracks were reset while loading level "+K);return}this.log("Track "+K+" loaded ["+N.startSN+","+N.endSN+"],duration:"+N.totalduration);var z=k[K],B=0;if(N.live||(M=z.details)!==null&&M!==void 0&&M.live){var H=this.mainDetails;if(N.fragments[0]||(N.deltaUpdateFailed=!0),N.deltaUpdateFailed||!H)return;!z.details&&N.hasProgramDateTime&&H.hasProgramDateTime?(Object(g.alignMediaPlaylistByPDT)(N,H),B=N.fragments[0].start):B=this.alignPlaylists(N,z.details)}z.details=N,this.levelLastLoaded=K,!this.startFragRequested&&(this.mainDetails||!N.live)&&this.setStartPosition(z.details,B),this.state===u.State.WAITING_TRACK&&!this.waitForCdnTuneIn(N)&&(this.state=u.State.IDLE),this.tick()},x._handleFragmentLoadProgress=function(y){var T,M=y.frag,k=y.part,N=y.payload,K=this.config,z=this.trackId,B=this.levels;if(!B){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 H=B[z];console.assert(H,"Audio track is defined on fragment load progress");var U=H.details;console.assert(U,"Audio track details are defined on fragment load progress");var W=K.defaultAudioCodec||H.audioCodec||"mp4a.40.2",G=this.transmuxer;G||(G=this.transmuxer=new h.default(this.hls,l.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ee=this.initPTS[M.cc],ie=(T=M.initSegment)===null||T===void 0?void 0:T.data;if(ee!==void 0){var ce=!1,_e=k?k.index:-1,Ce=_e!==-1,le=new c.ChunkMetadata(M.level,M.sn,M.stats.chunkCount,N.byteLength,_e,Ce);G.push(N,ie,W,"",M,k,U.totalduration,ce,le,ee)}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 "+z);var ye=this.waitingData=this.waitingData||{frag:M,part:k,cache:new d.default,complete:!1},fe=ye.cache;fe.push(new Uint8Array(N)),this.waitingVideoCC=this.videoTrackCC,this.state=u.State.WAITING_INIT_PTS}},x._handleFragmentLoadComplete=function(y){if(this.waitingData){this.waitingData.complete=!0;return}P.prototype._handleFragmentLoadComplete.call(this,y)},x.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},x.onBufferCreated=function(y,T){var M=T.tracks.audio;M&&(this.mediaBuffer=M.buffer),T.tracks.video&&(this.videoBuffer=T.tracks.video.buffer)},x.onFragBuffered=function(y,T){var M=T.frag,k=T.part;if(M.type!==l.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(M)){this.warn("Fragment "+M.sn+(k?" p: "+k.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(m.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(M,k)},x.onError=function(y,T){switch(T.details){case E.ErrorDetails.FRAG_LOAD_ERROR:case E.ErrorDetails.FRAG_LOAD_TIMEOUT:case E.ErrorDetails.KEY_LOAD_ERROR:case E.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(l.PlaylistLevelType.AUDIO,T);break;case E.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case E.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 E.ErrorDetails.BUFFER_FULL_ERROR:if(T.parent==="audio"&&(this.state===u.State.PARSING||this.state===u.State.PARSED)){var M=!0,k=this.getFwdBufferInfo(this.mediaBuffer,l.PlaylistLevelType.AUDIO);k&&k.len>.5&&(M=!this.reduceMaxBufferLength(k.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}},x.onBufferFlushed=function(y,T){var M=T.type;M===a.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},x._handleTransmuxComplete=function(y){var T,M="audio",k=this.hls,N=y.remuxResult,K=y.chunkMeta,z=this.getCurrentContext(K);if(!z){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 B=z.frag,H=z.part,U=N.audio,W=N.text,G=N.id3,ee=N.initSegment;if(this.fragContextChanged(B))return;if(this.state=u.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),ee!=null&&ee.tracks&&(this._bufferInitSegment(ee.tracks,B,K),k.trigger(m.Events.FRAG_PARSING_INIT_SEGMENT,{frag:B,id:M,tracks:ee.tracks})),U){var ie=U.startPTS,ce=U.endPTS,_e=U.startDTS,Ce=U.endDTS;H&&(H.elementaryStreams[a.ElementaryStreamTypes.AUDIO]={startPTS:ie,endPTS:ce,startDTS:_e,endDTS:Ce}),B.setElementaryStreamInfo(a.ElementaryStreamTypes.AUDIO,ie,ce,_e,Ce),this.bufferFragmentData(U,B,H,K)}if(G!=null&&(T=G.samples)!==null&&T!==void 0&&T.length){var le=o({frag:B,id:M},G);k.trigger(m.Events.FRAG_PARSING_METADATA,le)}if(W){var ye=o({frag:B,id:M},W);k.trigger(m.Events.FRAG_PARSING_USERDATA,ye)}},x._bufferInitSegment=function(y,T,M){if(this.state!==u.State.PARSING)return;y.video&&delete y.video;var k=y.audio;if(!k)return;k.levelCodec=k.codec,k.id="audio",this.log("Init audio buffer, container:"+k.container+", codecs[parsed]=["+k.codec+"]"),this.hls.trigger(m.Events.BUFFER_CODECS,y);var N=k.initSegment;if(N!=null&&N.byteLength){var K={type:"audio",frag:T,part:null,chunkMeta:M,parent:T.type,data:N};this.hls.trigger(m.Events.BUFFER_APPENDING,K)}this.tick()},x.loadFragment=function(y,T,M){var k=this.fragmentTracker.getState(y);this.fragCurrent=y,(this.audioSwitch||k===p.FragmentState.NOT_LOADED||k===p.FragmentState.PARTIAL)&&(y.sn==="initSegment"?this._loadInitSegment(y):T.live&&!Object(D.isFiniteNumber)(this.initPTS[y.cc])?(this.log("Waiting for video PTS in continuity counter "+y.cc+" of live stream before loading audio fragment "+y.sn+" of level "+this.trackId),this.state=u.State.WAITING_INIT_PTS):(this.startFragRequested=!0,P.prototype.loadFragment.call(this,y,T,M)))},x.completeAudioSwitch=function(){var y=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,y.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:M})},O}(u.default);f.default=i},"./src/controller/audio-track-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/events.ts"),u=C("./src/errors.ts"),m=C("./src/controller/base-playlist-controller.ts"),w=C("./src/types/loader.ts");function p(h,c){for(var v=0;v<c.length;v++){var g=c[v];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(h,g.key,g)}}function s(h,c,v){return c&&p(h.prototype,c),v&&p(h,v),h}function l(h,c){h.prototype=Object.create(c.prototype),h.prototype.constructor=h,a(h,c)}function a(h,c){return a=Object.setPrototypeOf||function(g,E){return g.__proto__=E,g},a(h,c)}var d=function(h){l(c,h);function c(g){var E;return E=h.call(this,g,"[audio-track-controller]")||this,E.tracks=[],E.groupId=null,E.tracksInGroup=[],E.trackId=-1,E.trackName="",E.selectDefaultTrack=!0,E.registerListeners(),E}var v=c.prototype;return v.registerListeners=function(){var E=this.hls;E.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),E.on(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),E.on(D.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.on(D.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){var E=this.hls;E.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.off(D.Events.LEVEL_LOADING,this.onLevelLoading,this),E.off(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),E.off(D.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.off(D.Events.ERROR,this.onError,this)},v.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,h.prototype.destroy.call(this)},v.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},v.onManifestParsed=function(E,n){this.tracks=n.audioTracks||[]},v.onAudioTrackLoaded=function(E,n){var o=n.id,t=n.details,S=this.tracksInGroup[o];if(!S){this.warn("Invalid audio track id "+o);return}var _=S.details;S.details=n.details,this.log("audioTrack "+o+" loaded ["+t.startSN+"-"+t.endSN+"]"),o===this.trackId&&(this.retryCount=0,this.playlistLoaded(o,n,_))},v.onLevelLoading=function(E,n){this.switchLevel(n.level)},v.onLevelSwitching=function(E,n){this.switchLevel(n.level)},v.switchLevel=function(E){var n=this.hls.levels[E];if(!(n!=null&&n.audioGroupIds))return;var o=n.audioGroupIds[n.urlId];if(this.groupId!==o){this.groupId=o;var t=this.tracks.filter(function(_){return!o||_.groupId===o});this.selectDefaultTrack&&!t.some(function(_){return _.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var S={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+o+'" group-id'),this.hls.trigger(D.Events.AUDIO_TRACKS_UPDATED,S),this.selectInitialTrack()}},v.onError=function(E,n){if(h.prototype.onError.call(this,E,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)},v.setAudioTrack=function(E){var n=this.tracksInGroup;if(E<0||E>=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var o=n[this.trackId];this.log("Now switching to audio-track index "+E);var t=n[E],S=t.id,_=t.groupId,i=_===void 0?"":_,P=t.name,O=t.type,x=t.url;if(this.trackId=E,this.trackName=P,this.selectDefaultTrack=!1,this.hls.trigger(D.Events.AUDIO_TRACK_SWITCHING,{id:S,groupId:i,name:P,type:O,url:x}),t.details&&!t.details.live)return;var b=this.switchParams(t.url,o==null?void 0:o.details);this.loadPlaylist(b)},v.selectInitialTrack=function(){var E=this.tracksInGroup;console.assert(E.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,o=this.findTrackId(n)||this.findTrackId();o!==-1?this.setAudioTrack(o):(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}))},v.findTrackId=function(E){for(var n=this.tracksInGroup,o=0;o<n.length;o++){var t=n[o];if((!this.selectDefaultTrack||t.default)&&(!E||E===t.name))return t.id}return-1},v.loadPlaylist=function(E){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var o=n.id,t=n.groupId,S=n.url;if(E)try{S=E.addDirectives(S)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("loading audio-track playlist for id: "+o),this.clearTimer(),this.hls.trigger(D.Events.AUDIO_TRACK_LOADING,{url:S,id:o,groupId:t,deliveryDirectives:E||null})}},s(c,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(E){this.selectDefaultTrack=!1,this.setAudioTrack(E)}}]),c}(m.default);f.default=d},"./src/controller/base-playlist-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return s});var D=C("./src/polyfills/number.ts"),u=C("./src/types/level.ts"),m=C("./src/controller/level-helper.ts"),w=C("./src/utils/logger.ts"),p=C("./src/errors.ts"),s=function(){function l(d,h){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,h+":"),this.warn=w.logger.warn.bind(w.logger,h+":"),this.hls=d}var a=l.prototype;return a.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},a.onError=function(h,c){c.fatal&&c.type===p.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(h,c){var v=c==null?void 0:c.renditionReports;if(v)for(var g=0;g<v.length;g++){var E=v[g],n=""+E.URI;if(n===h.substr(-n.length)){var o=parseInt(E["LAST-MSN"]),t=parseInt(E["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)(o))return new u.HlsUrlParameters(o,Object(D.isFiniteNumber)(t)?t:void 0,u.HlsSkip.No)}}},a.loadPlaylist=function(h){},a.shouldLoadTrack=function(h){return this.canLoad&&h&&!!h.url&&(!h.details||h.details.live)},a.playlistLoaded=function(h,c,v){var g=this,E=c.details,n=c.stats,o=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(E.advancedDateTime=Date.now()-o,E.live||v!=null&&v.live){if(E.reloaded(v),v&&this.log("live playlist "+h+" "+(E.advanced?"REFRESHED "+E.lastPartSn+"-"+E.lastPartIndex:"MISSED")),v&&E.fragments.length>0&&Object(m.mergeDetails)(v,E),!this.canLoad||!E.live)return;var t,S=void 0,_=void 0;if(E.canBlockReload&&E.endSN&&E.advanced){var i=this.hls.config.lowLatencyMode,P=E.lastPartSn,O=E.endSN,x=E.lastPartIndex,b=x!==-1,y=P===O,T=i?0:x;b?(S=y?O+1:P,_=y?T:x+1):S=O+1;var M=E.age,k=M+E.ageHeader,N=Math.min(k-E.partTarget,E.targetduration*1.5);if(N>0){if(v&&N>v.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+v.tuneInGoal+" to: "+N+" with playlist age: "+E.age),N=0;else{var K=Math.floor(N/E.targetduration);if(S+=K,_!==void 0){var z=Math.round(N%E.targetduration/E.partTarget);_+=z}this.log("CDN Tune-in age: "+E.ageHeader+"s last advanced "+M.toFixed(2)+"s goal: "+N+" skip sn "+K+" to part "+_)}E.tuneInGoal=N}if(t=this.getDeliveryDirectives(E,c.deliveryDirectives,S,_),i||!y){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(E,c.deliveryDirectives,S,_);var B=Object(m.computeReloadInterval)(E,n);S!==void 0&&E.canBlockReload&&(B-=E.partTarget||1),this.log("reload live playlist "+h+" in "+Math.round(B)+" ms"),this.timer=self.setTimeout(function(){return g.loadPlaylist(t)},B)}else this.clearTimer()},a.getDeliveryDirectives=function(h,c,v,g){var E=Object(u.getSkipValue)(h,v);return c!=null&&c.skip&&h.deltaUpdateFailed&&(v=c.msn,g=c.part,E=u.HlsSkip.No),new u.HlsUrlParameters(v,g,E)},a.retryLoadingOrFail=function(h){var c=this,v=this.hls.config,g=this.retryCount<v.levelLoadingMaxRetry;if(g){var E;if(this.retryCount++,h.details.indexOf("LoadTimeOut")>-1&&(E=h.context)!==null&&E!==void 0&&E.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+h.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*v.levelLoadingRetryDelay,v.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+h.details+'"')}}else this.warn('cannot recover from error "'+h.details+'"'),this.clearTimer(),h.fatal=!0;return g},l}()},"./src/controller/base-stream-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"State",function(){return O}),C.d(f,"default",function(){return x});var D=C("./src/polyfills/number.ts"),u=C("./src/task-loop.ts"),m=C("./src/controller/fragment-tracker.ts"),w=C("./src/utils/buffer-helper.ts"),p=C("./src/utils/logger.ts"),s=C("./src/events.ts"),l=C("./src/errors.ts"),a=C("./src/types/transmuxer.ts"),d=C("./src/utils/mp4-tools.ts"),h=C("./src/utils/discontinuities.ts"),c=C("./src/controller/fragment-finders.ts"),v=C("./src/controller/level-helper.ts"),g=C("./src/loader/fragment-loader.ts"),E=C("./src/crypt/decrypter.ts"),n=C("./src/utils/time-ranges.ts"),o=C("./src/types/loader.ts");function t(b,y){for(var T=0;T<y.length;T++){var M=y[T];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(b,M.key,M)}}function S(b,y,T){return y&&t(b.prototype,y),T&&t(b,T),b}function _(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function i(b,y){b.prototype=Object.create(y.prototype),b.prototype.constructor=b,P(b,y)}function P(b,y){return P=Object.setPrototypeOf||function(M,k){return M.__proto__=k,M},P(b,y)}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"},x=function(b){i(y,b);function y(M,k,N){var K;return K=b.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=N,K.log=p.logger.log.bind(p.logger,N+":"),K.warn=p.logger.warn.bind(p.logger,N+":"),K.hls=M,K.fragmentLoader=new g.default(M.config),K.fragmentTracker=k,K.config=M.config,K.decrypter=new E.default(M,M.config),M.on(s.Events.KEY_LOADED,K.onKeyLoaded,_(K)),K}var T=y.prototype;return T.doTick=function(){this.onTickEnd()},T.onTickEnd=function(){},T.startLoad=function(k){},T.stopLoad=function(){this.fragmentLoader.abort();var k=this.fragCurrent;k&&this.fragmentTracker.removeFragment(k),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED},T._streamEnded=function(k,N){var K=this.fragCurrent,z=this.fragmentTracker;if(!N.live&&K&&K.sn===N.endSN&&!k.nextStart){var B=z.getState(K);return B===m.FragmentState.PARTIAL||B===m.FragmentState.OK}return!1},T.onMediaAttached=function(k,N){var K=this.media=this.mediaBuffer=N.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),K.addEventListener("seeking",this.onvseeking),K.addEventListener("ended",this.onvended);var z=this.config;this.levels&&z.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(z.startPosition)},T.onMediaDetaching=function(){var k=this.media;k!=null&&k.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),k&&(k.removeEventListener("seeking",this.onvseeking),k.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 k=this.config,N=this.fragCurrent,K=this.media,z=this.mediaBuffer,B=this.state,H=K?K.currentTime:0,U=w.BufferHelper.bufferInfo(z||K,H,k.maxBufferHole);if(this.log("media seeking to "+(Object(D.isFiniteNumber)(H)?H.toFixed(3):H)+", state: "+B),B===O.ENDED)this.resetLoadingState();else if(N&&!U.len){var W=k.maxFragLookUpTolerance,G=N.start-W,ee=N.start+N.duration+W,ie=H>ee;(H<G||ie)&&(ie&&N.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),N.loader.abort()),this.resetLoadingState())}K&&(this.lastCurrentTime=H),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=H),this.tickImmediate()},T.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},T.onKeyLoaded=function(k,N){if(this.state!==O.KEY_LOADING||N.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var K=this.levels[N.frag.level].details;K&&this.loadFragment(N.frag,K,N.frag.start)},T.onHandlerDestroying=function(){this.stopLoad(),b.prototype.onHandlerDestroying.call(this)},T.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(s.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,b.prototype.onHandlerDestroyed.call(this)},T.loadKey=function(k,N){this.log("Loading key for "+k.sn+" of ["+N.startSN+"-"+N.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+k.level),this.state=O.KEY_LOADING,this.fragCurrent=k,this.hls.trigger(s.Events.KEY_LOADING,{frag:k})},T.loadFragment=function(k,N,K){this._loadFragForPlayback(k,N,K)},T._loadFragForPlayback=function(k,N,K){var z=this,B=function(U){if(z.fragContextChanged(k)){z.warn("Fragment "+k.sn+(U.part?" p: "+U.part.index:"")+" of level "+k.level+" was dropped during download."),z.fragmentTracker.removeFragment(k);return}k.stats.chunkCount++,z._handleFragmentLoadProgress(U)};this._doFragLoad(k,N,K,B).then(function(H){if(!H)return;z.fragLoadError=0;var U=z.state;if(z.fragContextChanged(k)){(U===O.FRAG_LOADING||U===O.BACKTRACKING||!z.fragCurrent&&U===O.PARSING)&&(z.fragmentTracker.removeFragment(k),z.state=O.IDLE);return}if("payload"in H&&(z.log("Loaded fragment "+k.sn+" of level "+k.level),z.hls.trigger(s.Events.FRAG_LOADED,H),z.state===O.BACKTRACKING)){z.fragmentTracker.backtrack(k,H),z.resetFragmentLoading(k);return}z._handleFragmentLoadComplete(H)}).catch(function(H){z.warn(H),z.resetFragmentLoading(k)})},T.flushMainBuffer=function(k,N,K){if(K===void 0&&(K=null),!(k-N))return;var z={startOffset:k,endOffset:N,type:K};this.fragLoadError=0,this.hls.trigger(s.Events.BUFFER_FLUSHING,z)},T._loadInitSegment=function(k){var N=this;this._doFragLoad(k).then(function(K){if(!K||N.fragContextChanged(k)||!N.levels)throw new Error("init load aborted");return K}).then(function(K){var z=N.hls,B=K.payload,H=k.decryptdata;if(B&&B.byteLength>0&&H&&H.key&&H.iv&&H.method==="AES-128"){var U=self.performance.now();return N.decrypter.webCryptoDecrypt(new Uint8Array(B),H.key.buffer,H.iv.buffer).then(function(W){var G=self.performance.now();return z.trigger(s.Events.FRAG_DECRYPTED,{frag:k,payload:W,stats:{tstart:U,tdecrypt:G}}),K.payload=W,K})}return K}).then(function(K){var z=N.fragCurrent,B=N.hls,H=N.levels;if(!H)throw new Error("init load aborted, missing levels");var U=H[k.level].details;console.assert(U,"Level details are defined when init segment is loaded");var W=k.stats;N.state=O.IDLE,N.fragLoadError=0,k.data=new Uint8Array(K.payload),W.parsing.start=W.buffering.start=self.performance.now(),W.parsing.end=W.buffering.end=self.performance.now(),K.frag===z&&B.trigger(s.Events.FRAG_BUFFERED,{stats:W,frag:z,part:null,id:k.type}),N.tick()}).catch(function(K){N.warn(K),N.resetFragmentLoading(k)})},T.fragContextChanged=function(k){var N=this.fragCurrent;return!k||!N||k.level!==N.level||k.sn!==N.sn||k.urlId!==N.urlId},T.fragBufferedComplete=function(k,N){var K=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+k.type+" sn: "+k.sn+(N?" part: "+N.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+k.level+" "+n.default.toString(w.BufferHelper.getBuffered(K))),this.state=O.IDLE,this.tick()},T._handleFragmentLoadComplete=function(k){var N=this.transmuxer;if(!N)return;var K=k.frag,z=k.part,B=k.partsLoaded,H=!B||B.length===0||B.some(function(W){return!W}),U=new a.ChunkMetadata(K.level,K.sn,K.stats.chunkCount+1,0,z?z.index:-1,!H);N.flush(U)},T._handleFragmentLoadProgress=function(k){},T._doFragLoad=function(k,N,K,z){var B=this;if(K===void 0&&(K=null),!this.levels)throw new Error("frag load aborted, missing levels");if(K=Math.max(k.start,K||0),this.config.lowLatencyMode&&N){var H=N.partList;if(H&&z){K>k.end&&N.fragmentHint&&(k=N.fragmentHint);var U=this.getNextPart(H,k,K);if(U>-1){var W=H[U];return this.log("Loading part sn: "+k.sn+" p: "+W.index+" cc: "+k.cc+" of playlist ["+N.startSN+"-"+N.endSN+"] parts [0-"+U+"-"+(H.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+k.level+", target: "+parseFloat(K.toFixed(3))),this.nextLoadPosition=W.start+W.duration,this.state=O.FRAG_LOADING,this.hls.trigger(s.Events.FRAG_LOADING,{frag:k,part:H[U],targetBufferTime:K}),this.doFragPartsLoad(k,H,U,z).catch(function(G){return B.handleFragLoadError(G)})}else if(!k.url||this.loadedEndOfParts(H,K))return Promise.resolve(null)}}return this.log("Loading fragment "+k.sn+" cc: "+k.cc+" "+(N?"of ["+N.startSN+"-"+N.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+k.level+", target: "+parseFloat(K.toFixed(3))),Object(D.isFiniteNumber)(k.sn)&&!this.bitrateTest&&(this.nextLoadPosition=k.start+k.duration),this.state=O.FRAG_LOADING,this.hls.trigger(s.Events.FRAG_LOADING,{frag:k,targetBufferTime:K}),this.fragmentLoader.load(k,z).catch(function(G){return B.handleFragLoadError(G)})},T.doFragPartsLoad=function(k,N,K,z){var B=this;return new Promise(function(H,U){var W=[],G=function ee(ie){var ce=N[ie];B.fragmentLoader.loadPart(k,ce,z).then(function(_e){W[ce.index]=_e;var Ce=_e.part;B.hls.trigger(s.Events.FRAG_LOADED,_e);var le=N[ie+1];if(le&&le.fragment===k)ee(ie+1);else return H({frag:k,part:Ce,partsLoaded:W})}).catch(U)};G(K)})},T.handleFragLoadError=function(k){var N=k.data;return N&&N.details===l.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(N.frag,N.part):this.hls.trigger(s.Events.ERROR,N),null},T._handleTransmuxerFlush=function(k){var N=this.getCurrentContext(k);if(!N||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var K=N.frag,z=N.part,B=N.level,H=self.performance.now();K.stats.parsing.end=H,z&&(z.stats.parsing.end=H),this.updateLevelTiming(K,z,B,k.partial)},T.getCurrentContext=function(k){var N=this.levels,K=k.level,z=k.sn,B=k.part;if(!N||!N[K])return this.warn("Levels object was unset while buffering fragment "+z+" of level "+K+". The current chunk will not be buffered."),null;var H=N[K],U=B>-1?Object(v.getPartWith)(H,z,B):null,W=U?U.fragment:Object(v.getFragmentWithSN)(H,z,this.fragCurrent);return W?{frag:W,part:U,level:H}:null},T.bufferFragmentData=function(k,N,K,z){if(!k||this.state!==O.PARSING)return;var B=k.data1,H=k.data2,U=B;if(B&&H&&(U=Object(d.appendUint8Array)(B,H)),!U||!U.length)return;var W={type:k.type,frag:N,part:K,chunkMeta:z,parent:N.type,data:U};this.hls.trigger(s.Events.BUFFER_APPENDING,W),k.dropped&&k.independent&&!K&&this.flushBufferGap(N)},T.flushBufferGap=function(k){var N=this.media;if(!N)return;if(!w.BufferHelper.isBuffered(N,N.currentTime)){this.flushMainBuffer(0,k.start);return}var K=N.currentTime,z=w.BufferHelper.bufferInfo(N,K,0),B=k.duration,H=Math.min(this.config.maxFragLookUpTolerance*2,B*.25),U=Math.max(Math.min(k.start-H,z.end-H),K+H);k.start-U>H&&this.flushMainBuffer(U,k.start)},T.getFwdBufferInfo=function(k,N){var K=this.config,z=this.getLoadPosition();if(!Object(D.isFiniteNumber)(z))return null;var B=w.BufferHelper.bufferInfo(k,z,K.maxBufferHole);if(B.len===0&&B.nextStart!==void 0){var H=this.fragmentTracker.getBufferedFrag(z,N);if(H&&B.nextStart<H.end)return w.BufferHelper.bufferInfo(k,z,Math.max(B.nextStart,K.maxBufferHole))}return B},T.getMaxBufferLength=function(k){var N=this.config,K;return k?K=Math.max(8*N.maxBufferSize/k,N.maxBufferLength):K=N.maxBufferLength,Math.min(K,N.maxMaxBufferLength)},T.reduceMaxBufferLength=function(k){var N=this.config,K=k||N.maxBufferLength;return N.maxMaxBufferLength>=K?(N.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+N.maxMaxBufferLength+"s"),!0):!1},T.getNextFragment=function(k,N){var K,z,B=N.fragments,H=B.length;if(!H)return null;var U=this.config,W=B[0].start,G;if(N.live){var ee=U.initialLiveManifestSize;if(H<ee)return this.warn("Not enough fragments to start playback (have: "+H+", need: "+ee+")"),null;!N.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(G=this.getInitialLiveFragment(N,B),this.startPosition=G?this.hls.liveSyncPosition||G.start:k)}else k<=W&&(G=B[0]);if(!G){var ie=U.lowLatencyMode?N.partEnd:N.fragmentEnd;G=this.getFragmentAtPosition(k,ie,N)}return(K=G)!==null&&K!==void 0&&K.initSegment&&!((z=G)!==null&&z!==void 0&&z.initSegment.data)&&!this.bitrateTest&&(G=G.initSegment),G},T.getNextPart=function(k,N,K){for(var z=-1,B=!1,H=!0,U=0,W=k.length;U<W;U++){var G=k[U];if(H=H&&!G.independent,z>-1&&K<G.start)break;var ee=G.loaded;!ee&&(B||G.independent||H)&&G.fragment===N&&(z=U),B=ee}return z},T.loadedEndOfParts=function(k,N){var K=k[k.length-1];return K&&N>K.start&&K.loaded},T.getInitialLiveFragment=function(k,N){var K=this.fragPrevious,z=null;if(K){if(k.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+K.programDateTime),z=Object(c.findFragmentByPDT)(N,K.endProgramDateTime,this.config.maxFragLookUpTolerance)),!z){var B=K.sn+1;if(B>=k.startSN&&B<=k.endSN){var H=N[B-k.startSN];K.cc===H.cc&&(z=H,this.log("Live playlist, switching playlist, load frag with next SN: "+z.sn))}z||(z=Object(c.findFragWithCC)(N,K.cc),z&&this.log("Live playlist, switching playlist, load frag with same CC: "+z.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(z=this.getFragmentAtPosition(U,this.bitrateTest?k.fragmentEnd:k.edge,k))}return z},T.getFragmentAtPosition=function(k,N,K){var z=this.config,B=this.fragPrevious,H=K.fragments,U=K.endSN,W=K.fragmentHint,G=z.maxFragLookUpTolerance,ee=!!(z.lowLatencyMode&&K.partList&&W);ee&&W&&!this.bitrateTest&&(H=H.concat(W),U=W.sn);var ie;if(k<N){var ce=k>N-G?0:G;ie=Object(c.findFragmentByPTS)(B,H,k,ce)}else ie=H[H.length-1];if(ie){var _e=ie.sn-K.startSN,Ce=B&&ie.level===B.level,le=H[_e+1],ye=this.fragmentTracker.getState(ie);if(ye===m.FragmentState.BACKTRACKED){ie=null;for(var fe=_e;H[fe]&&this.fragmentTracker.getState(H[fe])===m.FragmentState.BACKTRACKED;)B?ie=H[fe--]:ie=H[--fe];ie||(ie=le)}else B&&ie.sn===B.sn&&!ee&&(Ce&&(ie.sn<U&&this.fragmentTracker.getState(le)!==m.FragmentState.OK?(this.log("SN "+ie.sn+" just loaded, load next one: "+le.sn),ie=le):ie=null))}return ie},T.synchronizeToLiveEdge=function(k){var N=this.config,K=this.media;if(!K)return;var z=this.hls.liveSyncPosition,B=K.currentTime,H=k.fragments[0].start,U=k.edge,W=B>=H-N.maxFragLookUpTolerance&&B<=U;if(z!==null&&K.duration>z&&(B<z||!W)){var G=N.liveMaxLatencyDuration!==void 0?N.liveMaxLatencyDuration:N.liveMaxLatencyDurationCount*k.targetduration;(!W&&K.readyState<4||B<U-G)&&(this.loadedmetadata||(this.nextLoadPosition=z),K.readyState&&(this.warn("Playback: "+B.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+z.toFixed(3)),K.currentTime=z))}},T.alignPlaylists=function(k,N){var K=this.levels,z=this.levelLastLoaded,B=this.fragPrevious,H=z!==null?K[z]:null,U=k.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var W=k.fragments[0].start,G=!N,ee=k.alignedSliding&&Object(D.isFiniteNumber)(W);if(G||!ee&&!W){Object(h.alignStream)(B,H,k);var ie=k.fragments[0].start;return this.log("Live playlist sliding: "+ie.toFixed(2)+" start-sn: "+(N?N.startSN:"na")+"->"+k.startSN+" prev-sn: "+(B?B.sn:"na")+" fragments: "+U),ie}return W},T.waitForCdnTuneIn=function(k){var N=3;return k.live&&k.canBlockReload&&k.tuneInGoal>Math.max(k.partHoldBack,k.partTarget*N)},T.setStartPosition=function(k,N){var K=this.startPosition;if(K<N&&(K=-1),K===-1||this.lastCurrentTime===-1){var z=k.startTimeOffset;Object(D.isFiniteNumber)(z)?(K=N+z,z<0&&(K+=k.totalduration),K=Math.min(Math.max(N,K),N+k.totalduration),this.log("Start time offset "+z+" found in playlist, adjust startPosition to "+K),this.startPosition=K):k.live?K=this.hls.liveSyncPosition||N:this.startPosition=K=0,this.lastCurrentTime=K}this.nextLoadPosition=K},T.getLoadPosition=function(){var k=this.media,N=0;return this.loadedmetadata&&k?N=k.currentTime:this.nextLoadPosition&&(N=this.nextLoadPosition),N},T.handleFragLoadAborted=function(k,N){this.transmuxer&&k.sn!=="initSegment"&&k.stats.aborted&&(this.warn("Fragment "+k.sn+(N?" part"+N.index:"")+" of level "+k.level+" was aborted"),this.resetFragmentLoading(k))},T.resetFragmentLoading=function(k){(!this.fragCurrent||!this.fragContextChanged(k))&&(this.state=O.IDLE)},T.onFragmentOrKeyLoadError=function(k,N){if(N.fatal)return;var K=N.frag;if(!K||K.type!==k)return;var z=this.fragCurrent;console.assert(z&&K.sn===z.sn&&K.level===z.level&&K.urlId===z.urlId,"Frag load error must match current frag to retry");var B=this.config;if(this.fragLoadError+1<=B.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(K.level))return;var H=Math.min(Math.pow(2,this.fragLoadError)*B.fragLoadingRetryDelay,B.fragLoadingMaxRetryTimeout);this.warn("Fragment "+K.sn+" of "+k+" "+K.level+" failed to load, retrying in "+H+"ms"),this.retryDate=self.performance.now()+H,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else N.levelRetry?(k===o.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(p.logger.error(N.details+" reaches max retry, redispatch as fatal ..."),N.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},T.afterBufferFlushed=function(k,N,K){if(!k)return;var z=w.BufferHelper.getBuffered(k);this.fragmentTracker.detectEvictedFragments(N,z,K),this.state===O.ENDED&&this.resetLoadingState()},T.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},T.resetLiveStartWhenNotLoaded=function(k){if(!this.loadedmetadata){this.startFragRequested=!1;var N=this.levels?this.levels[k].details:null;if(N!=null&&N.live)return this.startPosition=-1,this.setStartPosition(N,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},T.updateLevelTiming=function(k,N,K,z){var B=this,H=K.details;console.assert(!!H,"level.details must be defined");var U=Object.keys(k.elementaryStreams).reduce(function(W,G){var ee=k.elementaryStreams[G];if(ee){var ie=ee.endPTS-ee.startPTS;if(ie<=0)return B.warn("Could not parse fragment "+k.sn+" "+G+" duration reliably ("+ie+") resetting transmuxer to fallback to playlist timing"),B.resetTransmuxer(),W||!1;var ce=z?0:Object(v.updateFragPTSDTS)(H,k,ee.startPTS,ee.endPTS,ee.startDTS,ee.endDTS);return B.hls.trigger(s.Events.LEVEL_PTS_UPDATED,{details:H,level:K,drift:ce,type:G,frag:k,start:ee.startPTS,end:ee.endPTS}),!0}return W},!1);U?(this.state=O.PARSED,this.hls.trigger(s.Events.FRAG_PARSED,{frag:k,part:N})):this.resetLoadingState()},T.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},S(y,[{key:"state",get:function(){return this._state},set:function(k){var N=this._state;N!==k&&(this._state=k,this.log(N+"->"+k))}}]),y}(u.default)},"./src/controller/buffer-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return c});var D=C("./src/polyfills/number.ts"),u=C("./src/events.ts"),m=C("./src/utils/logger.ts"),w=C("./src/errors.ts"),p=C("./src/utils/buffer-helper.ts"),s=C("./src/utils/mediasource-helper.ts"),l=C("./src/loader/fragment.ts"),a=C("./src/controller/buffer-operation-queue.ts"),d=Object(s.getMediaSource)(),h=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function v(E){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 o=n.hls,t=n.media,S=n.mediaSource;m.logger.log("[buffer-controller]: Media source opened"),t&&(n.updateMediaElementDuration(),o.trigger(u.Events.MEDIA_ATTACHED,{media:t})),S&&S.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){m.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){m.logger.log("[buffer-controller]: Media source ended")},this.hls=E,this._initSourceBuffer(),this.registerListeners()}var g=v.prototype;return g.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},g.destroy=function(){this.unregisterListeners(),this.details=null},g.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)},g.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)},g._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new a.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},g.onManifestParsed=function(n,o){var t=2;(o.audio&&!o.video||!o.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,m.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},g.onMediaAttaching=function(n,o){var t=this.media=o.media;if(t&&d){var S=this.mediaSource=new d;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}},g.onMediaDetaching=function(){var n=this.media,o=this.mediaSource,t=this._objectUrl;if(o){if(m.logger.log("[buffer-controller]: media source detaching"),o.readyState==="open")try{o.endOfStream()}catch(S){m.logger.warn("[buffer-controller]: onMediaDetaching: "+S.message+" while calling endOfStream")}this.onBufferReset(),o.removeEventListener("sourceopen",this._onMediaSourceOpen),o.removeEventListener("sourceended",this._onMediaSourceEnded),o.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(t&&self.URL.revokeObjectURL(t),n.src===t?(n.removeAttribute("src"),n.load()):m.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)},g.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(o){var t=n.sourceBuffer[o];try{t&&(n.removeBufferListeners(o),n.mediaSource&&n.mediaSource.removeSourceBuffer(t),n.sourceBuffer[o]=void 0)}catch(S){m.logger.warn("[buffer-controller]: Failed to reset the "+o+" buffer",S)}}),this._initSourceBuffer()},g.onBufferCodecs=function(n,o){var t=this,S=this.getSourceBufferTypes().length;if(Object.keys(o).forEach(function(_){if(S){var i=t.tracks[_];if(i&&typeof i.buffer.changeType=="function"){var P=o[_],O=P.codec,x=P.levelCodec,b=P.container,y=(i.levelCodec||i.codec).replace(h,"$1"),T=(x||O).replace(h,"$1");if(y!==T){var M=b+";codecs="+(x||O);t.appendChangeType(_,M)}}}else t.pendingTracks[_]=o[_]}),S)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},g.appendChangeType=function(n,o){var t=this,S=this.operationQueue,_={execute:function(){var P=t.sourceBuffer[n];P&&(m.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+o),P.changeType(o)),S.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(P){m.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",P)}};S.append(_,n)},g.onBufferAppending=function(n,o){var t=this,S=this.hls,_=this.operationQueue,i=this.tracks,P=o.data,O=o.type,x=o.frag,b=o.part,y=o.chunkMeta,T=y.buffering[O],M=self.performance.now();T.start=M;var k=x.stats.buffering,N=b?b.stats.buffering:null;k.start===0&&(k.start=M),N&&N.start===0&&(N.start=M);var K=i.audio,z=O==="audio"&&y.id===1&&(K==null?void 0:K.container)==="audio/mpeg",B={execute:function(){if(T.executeStart=self.performance.now(),z){var U=t.sourceBuffer[O];if(U){var W=x.start-U.timestampOffset;Math.abs(W)>=.1&&(m.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+x.start+" (delta: "+W+") sn: "+x.sn+")"),U.timestampOffset=x.start)}}t.appendExecutor(P,O)},onStart:function(){},onComplete:function(){var U=self.performance.now();T.executeEnd=T.end=U,k.first===0&&(k.first=U),N&&N.first===0&&(N.first=U);var W=t.sourceBuffer,G={};for(var ee in W)G[ee]=p.BufferHelper.getBuffered(W[ee]);t.appendError=0,t.hls.trigger(u.Events.BUFFER_APPENDED,{type:O,frag:x,part:b,chunkMeta:y,parent:x.type,timeRanges:G})},onError:function(U){m.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",U);var W={type:w.ErrorTypes.MEDIA_ERROR,parent:x.type,details:w.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?W.details=w.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,W.details=w.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>S.config.appendErrorMaxRetry&&(m.logger.error("[buffer-controller]: Failed "+S.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),W.fatal=!0)),S.trigger(u.Events.ERROR,W)}};_.append(B,O)},g.onBufferFlushing=function(n,o){var t=this,S=this.operationQueue,_=function(P){return{execute:t.removeExecutor.bind(t,P,o.startOffset,o.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(u.Events.BUFFER_FLUSHED,{type:P})},onError:function(x){m.logger.warn("[buffer-controller]: Failed to remove from "+P+" SourceBuffer",x)}}};o.type?S.append(_(o.type),o.type):this.getSourceBufferTypes().forEach(function(i){S.append(_(i),i)})},g.onFragParsed=function(n,o){var t=this,S=o.frag,_=o.part,i=[],P=_?_.elementaryStreams:S.elementaryStreams;P[l.ElementaryStreamTypes.AUDIOVIDEO]?i.push("audiovideo"):(P[l.ElementaryStreamTypes.AUDIO]&&i.push("audio"),P[l.ElementaryStreamTypes.VIDEO]&&i.push("video"));var O=function(){var b=self.performance.now();S.stats.buffering.end=b,_&&(_.stats.buffering.end=b);var y=_?_.stats:S.stats;t.hls.trigger(u.Events.FRAG_BUFFERED,{frag:S,part:_,stats:y,id:S.type})};i.length===0&&m.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+S.type+" level: "+S.level+" sn: "+S.sn),this.blockBuffers(O,i)},g.onFragChanged=function(n,o){this.flushBackBuffer()},g.onBufferEos=function(n,o){var t=this,S=this.getSourceBufferTypes().reduce(function(_,i){var P=t.sourceBuffer[i];return(!o.type||o.type===i)&&(P&&!P.ended&&(P.ended=!0,m.logger.log("[buffer-controller]: "+i+" sourceBuffer now EOS"))),_&&!!(!P||P.ended)},!0);S&&this.blockBuffers(function(){var _=t.mediaSource;if(!_||_.readyState!=="open")return;_.endOfStream()})},g.onLevelUpdated=function(n,o){var t=o.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},g.flushBackBuffer=function(){var n=this.hls,o=this.details,t=this.media,S=this.sourceBuffer;if(!t||o===null)return;var _=this.getSourceBufferTypes();if(!_.length)return;var i=o.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(D.isFiniteNumber)(i)||i<0)return;var P=t.currentTime,O=o.levelTargetDuration,x=Math.max(i,O),b=Math.floor(P/O)*O-x;_.forEach(function(y){var T=S[y];if(T){var M=p.BufferHelper.getBuffered(T);M.length>0&&b>M.start(0)&&(n.trigger(u.Events.BACK_BUFFER_REACHED,{bufferEnd:b}),o.live&&n.trigger(u.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:b}),n.trigger(u.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:b,type:y}))}})},g.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,o=this.hls,t=this.media,S=this.mediaSource,_=n.fragments[0].start+n.totalduration,i=t.duration,P=Object(D.isFiniteNumber)(S.duration)?S.duration:0;n.live&&o.config.liveDurationInfinity?(m.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),S.duration=Infinity,this.updateSeekableRange(n)):(_>P&&_>i||!Object(D.isFiniteNumber)(i))&&(m.logger.log("[buffer-controller]: Updating Media Source duration to "+_.toFixed(3)),S.duration=_)},g.updateSeekableRange=function(n){var o=this.mediaSource,t=n.fragments,S=t.length;if(S&&n.live&&o!==null&&o!==void 0&&o.setLiveSeekableRange){var _=Math.max(0,t[0].start),i=Math.max(_,_+n.totalduration);o.setLiveSeekableRange(_,i)}},g.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,o=this.operationQueue,t=this.pendingTracks,S=Object.keys(t).length;if(S&&!n||S===2){this.createSourceBuffers(t),this.pendingTracks={};var _=this.getSourceBufferTypes();if(_.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}_.forEach(function(i){o.executeNext(i)})}},g.createSourceBuffers=function(n){var o=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var S=0;for(var _ in n)if(!o[_]){var i=n[_];if(!i)throw Error("source buffer exists for track "+_+", however track does not");var P=i.levelCodec||i.codec,O=i.container+";codecs="+P;m.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var x=o[_]=t.addSourceBuffer(O),b=_;this.addBufferListener(b,"updatestart",this._onSBUpdateStart),this.addBufferListener(b,"updateend",this._onSBUpdateEnd),this.addBufferListener(b,"error",this._onSBUpdateError),this.tracks[_]={buffer:x,codec:P,container:i.container,levelCodec:i.levelCodec,id:i.id},S++}catch(y){m.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+y.message),this.hls.trigger(u.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:y,mimeType:O})}}S&&this.hls.trigger(u.Events.BUFFER_CREATED,{tracks:this.tracks})},g._onSBUpdateStart=function(n){var o=this.operationQueue,t=o.current(n);t.onStart()},g._onSBUpdateEnd=function(n){var o=this.operationQueue,t=o.current(n);t.onComplete(),o.shiftAndExecuteNext(n)},g._onSBUpdateError=function(n,o){m.logger.error("[buffer-controller]: "+n+" SourceBuffer error",o),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(o)},g.removeExecutor=function(n,o,t){var S=this.media,_=this.mediaSource,i=this.operationQueue,P=this.sourceBuffer,O=P[n];if(!S||!_||!O){m.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),i.shiftAndExecuteNext(n);return}var x=Object(D.isFiniteNumber)(S.duration)?S.duration:Infinity,b=Object(D.isFiniteNumber)(_.duration)?_.duration:Infinity,y=Math.max(0,o),T=Math.min(t,x,b);T>y?(m.logger.log("[buffer-controller]: Removing ["+y+","+T+"] from the "+n+" SourceBuffer"),console.assert(!O.updating,n+" sourceBuffer must not be updating"),O.remove(y,T)):i.shiftAndExecuteNext(n)},g.appendExecutor=function(n,o){var t=this.operationQueue,S=this.sourceBuffer,_=S[o];if(!_){m.logger.warn("[buffer-controller]: Attempting to append to the "+o+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(o);return}_.ended=!1,console.assert(!_.updating,o+" sourceBuffer must not be updating"),_.appendBuffer(n)},g.blockBuffers=function(n,o){var t=this;if(o===void 0&&(o=this.getSourceBufferTypes()),!o.length){m.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var S=this.operationQueue,_=o.map(function(i){return S.appendBlocker(i)});Promise.all(_).then(function(){n(),o.forEach(function(i){var P=t.sourceBuffer[i];(!P||!P.updating)&&S.shiftAndExecuteNext(i)})})},g.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},g.addBufferListener=function(n,o,t){var S=this.sourceBuffer[n];if(!S)return;var _=t.bind(this,n);this.listeners[n].push({event:o,listener:_}),S.addEventListener(o,_)},g.removeBufferListeners=function(n){var o=this.sourceBuffer[n];if(!o)return;this.listeners[n].forEach(function(t){o.removeEventListener(t.event,t.listener)})},v}()},"./src/controller/buffer-operation-queue.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return u});var D=C("./src/utils/logger.ts"),u=function(){function m(p){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=p}var w=m.prototype;return w.append=function(s,l){var a=this.queues[l];a.push(s),a.length===1&&this.buffers[l]&&this.executeNext(l)},w.insertAbort=function(s,l){var a=this.queues[l];a.unshift(s),this.executeNext(l)},w.appendBlocker=function(s){var l,a=new Promise(function(h){l=h}),d={execute:l,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(d,s),a},w.executeNext=function(s){var l=this.buffers,a=this.queues,d=l[s],h=a[s];if(h.length){var c=h[0];try{c.execute()}catch(v){D.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(v),(!d||!d.updating)&&(h.shift(),this.executeNext(s))}}},w.shiftAndExecuteNext=function(s){this.queues[s].shift(),this.executeNext(s)},w.current=function(s){return this.queues[s][0]},m}()},"./src/controller/cap-level-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/events.ts");function u(p,s){for(var l=0;l<s.length;l++){var a=s[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}function m(p,s,l){return s&&u(p.prototype,s),l&&u(p,l),p}var w=function(){function p(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 s=p.prototype;return s.setStreamController=function(a){this.streamController=a},s.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},s.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)},s.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)},s.onFpsDropLevelCapping=function(a,d){p.isLevelAllowed(d.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(d.droppedLevel)},s.onMediaAttaching=function(a,d){this.media=d.media instanceof HTMLVideoElement?d.media:null},s.onManifestParsed=function(a,d){var h=this.hls;this.restrictedLevels=[],this.firstLevel=d.firstLevel,h.config.capLevelToPlayerSize&&d.video&&this.startCapping()},s.onBufferCodecs=function(a,d){var h=this.hls;h.config.capLevelToPlayerSize&&d.video&&this.startCapping()},s.onMediaDetaching=function(){this.stopCapping()},s.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var a=this.hls.levels;if(a.length){var d=this.hls;d.autoLevelCapping=this.getMaxLevel(a.length-1),d.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=d.autoLevelCapping}}},s.getMaxLevel=function(a){var d=this,h=this.hls.levels;if(!h.length)return-1;var c=h.filter(function(v,g){return p.isLevelAllowed(g,d.restrictedLevels)&&g<=a});return this.clientRect=null,p.getMaxLevelByMediaSize(c,this.mediaWidth,this.mediaHeight)},s.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()},s.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},s.getDimensions=function(){if(this.clientRect)return this.clientRect;var a=this.media,d={width:0,height:0};if(a){var h=a.getBoundingClientRect();d.width=h.width,d.height=h.height,!d.width&&!d.height&&(d.width=h.right-h.left||a.width||0,d.height=h.bottom-h.top||a.height||0)}return this.clientRect=d,d},p.isLevelAllowed=function(a,d){return d===void 0&&(d=[]),d.indexOf(a)===-1},p.getMaxLevelByMediaSize=function(a,d,h){if(!a||!a.length)return-1;for(var c=function(o,t){return t?o.width!==t.width||o.height!==t.height:!0},v=a.length-1,g=0;g<a.length;g+=1){var E=a[g];if((E.width>=d||E.height>=h)&&c(E,a[g+1])){v=g;break}}return v},m(p,[{key:"mediaWidth",get:function(){return this.getDimensions().width*p.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*p.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var a=1;try{a=self.devicePixelRatio}catch(d){}return a}}]),p}();f.default=w},"./src/controller/cmcd-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return c});var D=C("./src/events.ts"),u=C("./src/types/cmcd.ts"),m=C("./src/utils/buffer-helper.ts"),w=C("./src/utils/logger.ts");function p(v,g){for(var E=0;E<g.length;E++){var n=g[E];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(v,n.key,n)}}function s(v,g,E){return g&&p(v.prototype,g),E&&p(v,E),v}function l(v,g){var E=typeof Symbol!="undefined"&&v[Symbol.iterator]||v["@@iterator"];if(E)return(E=E.call(v)).next.bind(E);if(Array.isArray(v)||(E=a(v))||g&&v&&typeof v.length=="number"){E&&(v=E);var n=0;return function(){return n>=v.length?{done:!0}:{done:!1,value:v[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(v,g){if(!v)return;if(typeof v=="string")return d(v,g);var E=Object.prototype.toString.call(v).slice(8,-1);if(E==="Object"&&v.constructor&&(E=v.constructor.name),E==="Map"||E==="Set")return Array.from(v);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return d(v,g)}function d(v,g){(g==null||g>v.length)&&(g=v.length);for(var E=0,n=new Array(g);E<g;E++)n[E]=v[E];return n}function h(){return h=Object.assign||function(v){for(var g=1;g<arguments.length;g++){var E=arguments[g];for(var n in E)Object.prototype.hasOwnProperty.call(E,n)&&(v[n]=E[n])}return v},h.apply(this,arguments)}var c=function(){function v(E){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(_){w.logger.warn("Could not generate manifest CMCD data.",_)}},this.applyFragmentData=function(S){try{var _=S.frag,i=n.hls.levels[_.level],P=n.getObjectType(_),O={d:_.duration*1e3,ot:P};(P===u.CMCDObjectType.VIDEO||P===u.CMCDObjectType.AUDIO||P==u.CMCDObjectType.MUXED)&&(O.br=i.bitrate/1e3,O.tb=n.getTopBandwidth(P),O.bl=n.getBufferLength(P)),n.apply(S,O)}catch(x){w.logger.warn("Could not generate segment CMCD data.",x)}},this.hls=E;var o=this.config=E.config,t=o.cmcd;t!=null&&(o.pLoader=this.createPlaylistLoader(),o.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||v.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var g=v.prototype;return g.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)},g.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()},g.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},g.onMediaAttached=function(n,o){this.media=o.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},g.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},g.onBufferCreated=function(n,o){var t,S;this.audioBuffer=(t=o.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(S=o.tracks.video)===null||S===void 0?void 0:S.buffer},g.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}},g.apply=function(n,o){o===void 0&&(o={}),h(o,this.createData());var t=o.ot===u.CMCDObjectType.INIT||o.ot===u.CMCDObjectType.VIDEO||o.ot===u.CMCDObjectType.MUXED;if(this.starved&&t&&(o.bs=!0,o.su=!0,this.starved=!1),o.su==null&&(o.su=this.buffering),this.useHeaders){var S=v.toHeaders(o);if(!Object.keys(S).length)return;n.headers||(n.headers={}),h(n.headers,S)}else{var _=v.toQuery(o);if(!_)return;n.url=v.appendQueryToUri(n.url,_)}},g.getObjectType=function(n){var o=n.type;return o==="subtitle"?u.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?u.CMCDObjectType.INIT:o==="audio"?u.CMCDObjectType.AUDIO:o==="main"?this.hls.audioTracks.length?u.CMCDObjectType.VIDEO:u.CMCDObjectType.MUXED:void 0},g.getTopBandwidth=function(n){for(var o=0,t=n===u.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,S=l(t),_;!(_=S()).done;){var i=_.value;i.bitrate>o&&(o=i.bitrate)}return o>0?o:NaN},g.getBufferLength=function(n){var o=this.hls.media,t=n===u.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!o)return NaN;var S=m.BufferHelper.bufferInfo(t,o.currentTime,this.config.maxBufferHole);return S.len*1e3},g.createPlaylistLoader=function(){var n=this.config.pLoader,o=this.applyPlaylistData,t=n||this.config.loader;return function(){function S(i){this.loader=void 0,this.loader=new t(i)}var _=S.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(P,O,x){o(P),this.loader.load(P,O,x)},s(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},g.createFragmentLoader=function(){var n=this.config.fLoader,o=this.applyFragmentData,t=n||this.config.loader;return function(){function S(i){this.loader=void 0,this.loader=new t(i)}var _=S.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(P,O,x){o(P),this.loader.load(P,O,x)},s(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},v.uuid=function(){var n=URL.createObjectURL(new Blob),o=n.toString();return URL.revokeObjectURL(n),o.substr(o.lastIndexOf("/")+1)},v.serialize=function(n){for(var o=[],t=function(z){return!Number.isNaN(z)&&z!=null&&z!==""&&z!==!1},S=function(z){return Math.round(z)},_=function(z){return S(z/100)*100},i=function(z){return encodeURIComponent(z)},P={br:S,d:S,bl:_,dl:_,mtp:_,nor:i,rtp:_,tb:S},O=Object.keys(n||{}).sort(),x=l(O),b;!(b=x()).done;){var y=b.value,T=n[y];if(!t(T))continue;if(y==="v"&&T===1)continue;if(y=="pr"&&T===1)continue;var M=P[y];M&&(T=M(T));var k=typeof T,N=void 0;y==="ot"||y==="sf"||y==="st"?N=y+"="+T:k==="boolean"?N=y:k==="number"?N=y+"="+T:N=y+"="+JSON.stringify(T),o.push(N)}return o.join(",")},v.toHeaders=function(n){for(var o=Object.keys(n),t={},S=["Object","Request","Session","Status"],_=[{},{},{},{}],i={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=o;P<O.length;P++){var x=O[P],b=i[x]!=null?i[x]:1;_[b][x]=n[x]}for(var y=0;y<_.length;y++){var T=v.serialize(_[y]);T&&(t["CMCD-"+S[y]]=T)}return t},v.toQuery=function(n){return"CMCD="+encodeURIComponent(v.serialize(n))},v.appendQueryToUri=function(n,o){if(!o)return n;var t=n.includes("?")?"&":"?";return""+n+t+o},v}()},"./src/controller/eme-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/events.ts"),u=C("./src/errors.ts"),m=C("./src/utils/logger.ts"),w=C("./src/utils/mediakeys-helper.ts");function p(c,v){for(var g=0;g<v.length;g++){var E=v[g];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(c,E.key,E)}}function s(c,v,g){return v&&p(c.prototype,v),g&&p(c,g),c}var l=3,a=function(v,g,E){var n={audioCapabilities:[],videoCapabilities:[]};return v.forEach(function(o){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+o+'"',robustness:E.audioRobustness||""})}),g.forEach(function(o){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+o+'"',robustness:E.videoRobustness||""})}),[n]},d=function(v,g,E,n){switch(v){case w.KeySystems.WIDEVINE:return a(g,E,n);default:throw new Error("Unknown key-system: "+v)}},h=function(){function c(g){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=g,this._config=g.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 v=c.prototype;return v.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},v._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)},v._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)},v.getLicenseServerUrl=function(E){switch(E){case w.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+E+'"')},v._attemptKeySystemAccess=function(E,n,o){var t=this,S=d(E,n,o,this._drmSystemOptions);m.logger.log("Requesting encrypted media key-system access");var _=this.requestMediaKeySystemAccess(E,S);this.mediaKeysPromise=_.then(function(i){return t._onMediaKeySystemAccessObtained(E,i)}),_.catch(function(i){m.logger.error('Failed to obtain key-system "'+E+'" access:',i)})},v._onMediaKeySystemAccessObtained=function(E,n){var o=this;m.logger.log('Access for key-system "'+E+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:E};this._mediaKeysList.push(t);var S=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(_){return t.mediaKeys=_,m.logger.log('Media-keys created for key-system "'+E+'"'),o._onMediaKeysCreated(),_});return S.catch(function(_){m.logger.error("Failed to create media-keys:",_)}),S},v._onMediaKeysCreated=function(){var E=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),E._onNewMediaKeySession(n.mediaKeysSession))})},v._onNewMediaKeySession=function(E){var n=this;m.logger.log("New key-system session "+E.sessionId),E.addEventListener("message",function(o){n._onKeySessionMessage(E,o.message)},!1)},v._onKeySessionMessage=function(E,n){m.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(o){m.logger.log("Received license data (length: "+(o&&o.byteLength)+"), updating key-session"),E.update(o)})},v.onMediaEncrypted=function(E){var n=this;if(m.logger.log('Media is encrypted using "'+E.initDataType+'" init data type'),!this.mediaKeysPromise){m.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 o=function(S){if(!n._media)return;n._attemptSetMediaKeys(S),n._generateRequestWithPreferredKeySession(E.initDataType,E.initData)};this.mediaKeysPromise.then(o).catch(o)},v._attemptSetMediaKeys=function(E){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){m.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}m.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},v._generateRequestWithPreferredKeySession=function(E,n){var o=this,t=this._mediaKeysList[0];if(!t){m.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){m.logger.warn("Key-Session already initialized but requested again");return}var S=t.mediaKeysSession;if(!S){m.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){m.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}m.logger.log('Generating key-session request for "'+E+'" init data type'),t.mediaKeysSessionInitialized=!0,S.generateRequest(E,n).then(function(){m.logger.debug("Key-session generation succeeded")}).catch(function(_){m.logger.error("Error generating key-session request:",_),o.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},v._createLicenseXhr=function(E,n,o){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,E,n,o);var S=this._licenseXhrSetup;if(S)try{S.call(this.hls,t,E),S=void 0}catch(_){m.logger.error(_)}try{t.readyState||t.open("POST",E,!0),S&&S.call(this.hls,t,E)}catch(_){throw new Error("issue setting up KeySystem license XHR "+_)}return t},v._onLicenseRequestReadyStageChange=function(E,n,o,t){switch(E.readyState){case 4:if(E.status===200){this._requestLicenseFailureCount=0,m.logger.log("License request succeeded");var S=E.response,_=this._licenseResponseCallback;if(_)try{S=_.call(this.hls,E,n)}catch(P){m.logger.error(P)}t(S)}else{if(m.logger.error("License Request XHR failed ("+n+"). Status: "+E.status+" ("+E.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 i=l-this._requestLicenseFailureCount+1;m.logger.warn("Retrying license request, "+i+" attempts left"),this._requestLicense(o,t)}break}},v._generateLicenseRequestChallenge=function(E,n){switch(E.mediaKeySystemDomain){case w.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+E.mediaKeySystemDomain)},v._requestLicense=function(E,n){m.logger.log("Requesting content license for key-system");var o=this._mediaKeysList[0];if(!o){m.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(o.mediaKeySystemDomain),S=this._createLicenseXhr(t,E,n);m.logger.log("Sending license request to URL: "+t);var _=this._generateLicenseRequestChallenge(o,E);S.send(_)}catch(i){m.logger.error("Failure requesting DRM license: "+i),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},v.onMediaAttached=function(E,n){if(!this._emeEnabled)return;var o=n.media;this._media=o,o.addEventListener("encrypted",this._onMediaEncrypted)},v.onMediaDetached=function(){var E=this._media,n=this._mediaKeysList;if(!E)return;E.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(o){if(o.mediaKeysSession)return o.mediaKeysSession.close().catch(function(){})})).then(function(){return E.setMediaKeys(null)}).catch(function(){})},v.onManifestParsed=function(E,n){if(!this._emeEnabled)return;var o=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,o,t)},s(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();f.default=h},"./src/controller/fps-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/events.ts"),u=C("./src/utils/logger.ts"),m=function(){function w(s){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=s,this.registerListeners()}var p=w.prototype;return p.setStreamController=function(l){this.streamController=l},p.registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},p.unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching)},p.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},p.onMediaAttaching=function(l,a){var d=this.hls.config;if(d.capLevelOnFPSDrop){var h=a.media instanceof self.HTMLVideoElement?a.media:null;this.media=h,h&&typeof h.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),d.fpsDroppedMonitoringPeriod)}},p.checkFPS=function(l,a,d){var h=performance.now();if(a){if(this.lastTime){var c=h-this.lastTime,v=d-this.lastDroppedFrames,g=a-this.lastDecodedFrames,E=1e3*v/c,n=this.hls;if(n.trigger(D.Events.FPS_DROP,{currentDropped:v,currentDecoded:g,totalDroppedFrames:d}),E>0&&v>n.config.fpsDroppedMonitoringThreshold*g){var o=n.currentLevel;u.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+o),o>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=o)&&(o=o-1,n.trigger(D.Events.FPS_DROP_LEVEL_CAPPING,{level:o,droppedLevel:n.currentLevel}),n.autoLevelCapping=o,this.streamController.nextLevelSwitch())}}this.lastTime=h,this.lastDroppedFrames=d,this.lastDecodedFrames=a}},p.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}();f.default=m},"./src/controller/fragment-finders.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"findFragmentByPDT",function(){return m}),C.d(f,"findFragmentByPTS",function(){return w}),C.d(f,"fragmentWithinToleranceTest",function(){return p}),C.d(f,"pdtWithinToleranceTest",function(){return s}),C.d(f,"findFragWithCC",function(){return l});var D=C("./src/polyfills/number.ts"),u=C("./src/utils/binary-search.ts");function m(a,d,h){if(d===null||!Array.isArray(a)||!a.length||!Object(D.isFiniteNumber)(d))return null;var c=a[0].programDateTime;if(d<(c||0))return null;var v=a[a.length-1].endProgramDateTime;if(d>=(v||0))return null;h=h||0;for(var g=0;g<a.length;++g){var E=a[g];if(s(d,h,E))return E}return null}function w(a,d,h,c){h===void 0&&(h=0),c===void 0&&(c=0);var v=null;if(a?v=d[a.sn-d[0].sn+1]||null:h===0&&d[0].start===0&&(v=d[0]),v&&p(h,c,v)===0)return v;var g=u.default.search(d,p.bind(null,h,c));return g||v}function p(a,d,h){a===void 0&&(a=0),d===void 0&&(d=0);var c=Math.min(d,h.duration+(h.deltaPTS?h.deltaPTS:0));return h.start+h.duration-c<=a?1:h.start-c>a&&h.start?-1:0}function s(a,d,h){var c=Math.min(d,h.duration+(h.deltaPTS?h.deltaPTS:0))*1e3,v=h.endProgramDateTime||0;return v-c>a}function l(a,d){return u.default.search(a,function(h){return h.cc<d?1:h.cc>d?-1:0})}},"./src/controller/fragment-tracker.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"FragmentState",function(){return m}),C.d(f,"FragmentTracker",function(){return w});var D=C("./src/events.ts"),u=C("./src/types/loader.ts"),m;(function(l){l.NOT_LOADED="NOT_LOADED",l.BACKTRACKED="BACKTRACKED",l.APPENDING="APPENDING",l.PARTIAL="PARTIAL",l.OK="OK"})(m||(m={}));var w=function(){function l(d){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=d,this._registerListeners()}var a=l.prototype;return a._registerListeners=function(){var h=this.hls;h.on(D.Events.BUFFER_APPENDED,this.onBufferAppended,this),h.on(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),h.on(D.Events.FRAG_LOADED,this.onFragLoaded,this)},a._unregisterListeners=function(){var h=this.hls;h.off(D.Events.BUFFER_APPENDED,this.onBufferAppended,this),h.off(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),h.off(D.Events.FRAG_LOADED,this.onFragLoaded,this)},a.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},a.getAppendedFrag=function(h,c){if(c===u.PlaylistLevelType.MAIN){var v=this.activeFragment,g=this.activeParts;if(!v)return null;if(g)for(var E=g.length;E--;){var n=g[E],o=n?n.end:v.appendedPTS;if(n.start<=h&&o!==void 0&&h<=o)return E>9&&(this.activeParts=g.slice(E-9)),n}else if(v.start<=h&&v.appendedPTS!==void 0&&h<=v.appendedPTS)return v}return this.getBufferedFrag(h,c)},a.getBufferedFrag=function(h,c){for(var v=this.fragments,g=Object.keys(v),E=g.length;E--;){var n=v[g[E]];if((n==null?void 0:n.body.type)===c&&n.buffered){var o=n.body;if(o.start<=h&&h<=o.end)return o}}return null},a.detectEvictedFragments=function(h,c,v){var g=this;Object.keys(this.fragments).forEach(function(E){var n=g.fragments[E];if(!n)return;if(!n.buffered){n.body.type===v&&g.removeFragment(n.body);return}var o=n.range[h];if(!o)return;o.time.some(function(t){var S=!g.isTimeBuffered(t.startPTS,t.endPTS,c);return S&&g.removeFragment(n.body),S})})},a.detectPartialFragments=function(h){var c=this,v=this.timeRanges,g=h.frag,E=h.part;if(!v||g.sn==="initSegment")return;var n=s(g),o=this.fragments[n];if(!o)return;Object.keys(v).forEach(function(t){var S=g.elementaryStreams[t];if(!S)return;var _=v[t],i=E!==null||S.partial===!0;o.range[t]=c.getBufferedTimes(g,E,i,_)}),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body)},a.fragBuffered=function(h){var c=s(h),v=this.fragments[c];v&&(v.backtrack=v.loaded=null,v.buffered=!0)},a.getBufferedTimes=function(h,c,v,g){for(var E={time:[],partial:v},n=c?c.start:h.start,o=c?c.end:h.end,t=h.minEndPTS||o,S=h.maxStartPTS||n,_=0;_<g.length;_++){var i=g.start(_)-this.bufferPadding,P=g.end(_)+this.bufferPadding;if(S>=i&&t<=P){E.time.push({startPTS:Math.max(n,g.start(_)),endPTS:Math.min(o,g.end(_))});break}else if(n<P&&o>i)E.partial=!0,E.time.push({startPTS:Math.max(n,g.start(_)),endPTS:Math.min(o,g.end(_))});else if(o<=i)break}return E},a.getPartialFragment=function(h){var c=null,v,g,E,n=0,o=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(S){var _=t[S];if(!_)return;p(_)&&(g=_.body.start-o,E=_.body.end+o,h>=g&&h<=E&&(v=Math.min(h-g,E-h),n<=v&&(c=_.body,n=v)))}),c},a.getState=function(h){var c=s(h),v=this.fragments[c];return v?v.buffered?p(v)?m.PARTIAL:m.OK:v.backtrack?m.BACKTRACKED:m.APPENDING:m.NOT_LOADED},a.backtrack=function(h,c){var v=s(h),g=this.fragments[v];if(!g||g.backtrack)return null;var E=g.backtrack=c||g.loaded;return g.loaded=null,E},a.getBacktrackData=function(h){var c=s(h),v=this.fragments[c];if(v){var g,E=v.backtrack;if(E!=null&&(g=E.payload)!==null&&g!==void 0&&g.byteLength)return E;this.removeFragment(h)}return null},a.isTimeBuffered=function(h,c,v){for(var g,E,n=0;n<v.length;n++){if(g=v.start(n)-this.bufferPadding,E=v.end(n)+this.bufferPadding,h>=g&&c<=E)return!0;if(c<=g)return!1}return!1},a.onFragLoaded=function(h,c){var v=c.frag,g=c.part;if(v.sn==="initSegment"||v.bitrateTest||g)return;var E=s(v);this.fragments[E]={body:v,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},a.onBufferAppended=function(h,c){var v=this,g=c.frag,E=c.part,n=c.timeRanges;if(g.type===u.PlaylistLevelType.MAIN)if(this.activeFragment=g,E){var o=this.activeParts;o||(this.activeParts=o=[]),o.push(E)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(t){var S=n[t];if(v.detectEvictedFragments(t,S),!E)for(var _=0;_<S.length;_++)g.appendedPTS=Math.max(S.end(_),g.appendedPTS||0)})},a.onFragBuffered=function(h,c){this.detectPartialFragments(c)},a.hasFragment=function(h){var c=s(h);return!!this.fragments[c]},a.removeFragmentsInRange=function(h,c,v){var g=this;Object.keys(this.fragments).forEach(function(E){var n=g.fragments[E];if(!n)return;if(n.buffered){var o=n.body;o.type===v&&o.start<c&&o.end>h&&g.removeFragment(o)}})},a.removeFragment=function(h){var c=s(h);h.stats.loaded=0,h.clearElementaryStreamInfo(),delete this.fragments[c]},a.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},l}();function p(l){var a,d;return l.buffered&&(((a=l.range.video)===null||a===void 0?void 0:a.partial)||((d=l.range.audio)===null||d===void 0?void 0:d.partial))}function s(l){return l.type+"_"+l.level+"_"+l.urlId+"_"+l.sn}},"./src/controller/gap-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"STALL_MINIMUM_DURATION_MS",function(){return p}),C.d(f,"MAX_START_GAP_JUMP",function(){return s}),C.d(f,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return l}),C.d(f,"SKIP_BUFFER_RANGE_START",function(){return a}),C.d(f,"default",function(){return d});var D=C("./src/utils/buffer-helper.ts"),u=C("./src/errors.ts"),m=C("./src/events.ts"),w=C("./src/utils/logger.ts"),p=250,s=2,l=.1,a=.05,d=function(){function h(v,g,E,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=v,this.media=g,this.fragmentTracker=E,this.hls=n}var c=h.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(g){var E=this.config,n=this.media,o=this.stalled,t=n.currentTime,S=n.seeking,_=this.seeking&&!S,i=!this.seeking&&S;if(this.seeking=S,t!==g){if(this.moved=!0,o!==null){if(this.stallReported){var P=self.performance.now()-o;w.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(P)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((i||_)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!D.BufferHelper.getBuffered(n).length)return;var O=D.BufferHelper.bufferInfo(n,t,0),x=O.len>0,b=O.nextStart||0;if(!x&&!b)return;if(S){var y=O.len>s,T=!b||b-t>s&&!this.fragmentTracker.getPartialFragment(t);if(y||T)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var M,k=Math.max(b,O.start||0)-t,N=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,K=N==null||((M=N.details)===null||M===void 0)?void 0:M.live,z=K?N.details.targetduration*2:s;if(k>0&&k<=z){this._trySkipBufferHole(null);return}}var B=self.performance.now();if(o===null){this.stalled=B;return}var H=B-o;!S&&H>=p&&this._reportStall(O.len);var U=D.BufferHelper.bufferInfo(n,t,E.maxBufferHole);this._tryFixBufferStall(U,H)},c._tryFixBufferStall=function(g,E){var n=this.config,o=this.fragmentTracker,t=this.media,S=t.currentTime,_=o.getPartialFragment(S);if(_){var i=this._trySkipBufferHole(_);if(i)return}g.len>n.maxBufferHole&&E>n.highBufferWatchdogPeriod*1e3&&(w.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(g){var E=this.hls,n=this.media,o=this.stallReported;o||(this.stallReported=!0,w.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+g+")"),E.trigger(m.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:g}))},c._trySkipBufferHole=function(g){for(var E=this.config,n=this.hls,o=this.media,t=o.currentTime,S=0,_=D.BufferHelper.getBuffered(o),i=0;i<_.length;i++){var P=_.start(i);if(t+E.maxBufferHole>=S&&t<P){var O=Math.max(P+a,o.currentTime+l);return w.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+O),this.moved=!0,this.stalled=null,o.currentTime=O,g&&n.trigger(m.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:g}),O}S=_.end(i)}return 0},c._tryNudgeBuffer=function(){var g=this.config,E=this.hls,n=this.media,o=n.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<g.nudgeMaxRetry){var S=o+t*g.nudgeOffset;w.logger.warn("Nudging 'currentTime' from "+o+" to "+S),n.currentTime=S,E.trigger(m.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 @"+o+" after "+g.nudgeMaxRetry+" nudges"),E.trigger(m.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},h}()},"./src/controller/id3-track-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/events.ts"),u=C("./src/utils/texttrack-utils.ts"),m=C("./src/demux/id3.ts"),w=.25,p=function(){function s(a){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=a,this._registerListeners()}var l=s.prototype;return l.destroy=function(){this._unregisterListeners()},l._registerListeners=function(){var d=this.hls;d.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.on(D.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),d.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},l._unregisterListeners=function(){var d=this.hls;d.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off(D.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),d.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},l.onMediaAttached=function(d,h){this.media=h.media},l.onMediaDetaching=function(){if(!this.id3Track)return;Object(u.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},l.getID3Track=function(d){if(!this.media)return;for(var h=0;h<d.length;h++){var c=d[h];if(c.kind==="metadata"&&c.label==="id3")return Object(u.sendAddTrackEvent)(c,this.media),c}return this.media.addTextTrack("metadata","id3")},l.onFragParsingMetadata=function(d,h){if(!this.media)return;var c=h.frag,v=h.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var g=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,E=0;E<v.length;E++){var n=m.getID3Frames(v[E].data);if(n){var o=v[E].pts,t=E<v.length-1?v[E+1].pts:c.end,S=t-o;S<=0&&(t=o+w);for(var _=0;_<n.length;_++){var i=n[_];if(!m.isTimeStampFrame(i)){var P=new g(o,t,"");P.value=i,this.id3Track.addCue(P)}}}}},l.onBufferFlushing=function(d,h){var c=h.startOffset,v=h.endOffset,g=h.type;if(!g||g==="audio"){var E=this.id3Track;E&&Object(u.removeCuesInRange)(E,c,v)}},s}();f.default=p},"./src/controller/latency-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return s});var D=C("./src/errors.ts"),u=C("./src/events.ts"),m=C("./src/utils/logger.ts");function w(l,a){for(var d=0;d<a.length;d++){var h=a[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(l,h.key,h)}}function p(l,a,d){return a&&w(l.prototype,a),d&&w(l,d),l}var s=function(){function l(d){var h=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 h.timeupdate()},this.hls=d,this.config=d.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(h,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(h,c){var v=c.details;this.levelDetails=v,v.advanced&&this.timeupdate(),!v.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},a.onError=function(h,c){if(c.details!==D.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,m.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},a.timeupdate=function(){var h=this.media,c=this.levelDetails;if(!h||!c)return;this.currentTime=h.currentTime;var v=this.computeLatency();if(v===null)return;this._latency=v;var g=this.config,E=g.lowLatencyMode,n=g.maxLiveSyncPlaybackRate;if(!E||n===1)return;var o=this.targetLatency;if(o===null)return;var t=v-o,S=Math.min(this.maxLatency,o+c.targetduration),_=t<S;if(c.live&&_&&t>.05&&this.forwardBufferLength>1){var i=Math.min(2,Math.max(1,n)),P=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;h.playbackRate=Math.min(i,Math.max(1,P))}else h.playbackRate!==1&&h.playbackRate!==0&&(h.playbackRate=1)},a.estimateLiveEdge=function(){var h=this.levelDetails;return h===null?null:h.edge+h.age},a.computeLatency=function(){var h=this.estimateLiveEdge();return h===null?null:h-this.currentTime},p(l,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var h=this.config,c=this.levelDetails;return h.liveMaxLatencyDuration!==void 0?h.liveMaxLatencyDuration:c?h.liveMaxLatencyDurationCount*c.targetduration:0}},{key:"targetLatency",get:function(){var h=this.levelDetails;if(h===null)return null;var c=h.holdBack,v=h.partHoldBack,g=h.targetduration,E=this.config,n=E.liveSyncDuration,o=E.liveSyncDurationCount,t=E.lowLatencyMode,S=this.hls.userConfig,_=t&&v||c;(S.liveSyncDuration||S.liveSyncDurationCount||_===0)&&(_=n!==void 0?n:o*g);var i=g,P=1;return _+Math.min(this.stallCount*P,i)}},{key:"liveSyncPosition",get:function(){var h=this.estimateLiveEdge(),c=this.targetLatency,v=this.levelDetails;if(h===null||c===null||v===null)return null;var g=v.edge,E=h-c-this.edgeStalled,n=g-v.totalduration,o=g-(this.config.lowLatencyMode&&v.partTarget||v.targetduration);return Math.min(Math.max(n,E),o)}},{key:"drift",get:function(){var h=this.levelDetails;return h===null?1:h.drift}},{key:"edgeStalled",get:function(){var h=this.levelDetails;if(h===null)return 0;var c=(this.config.lowLatencyMode&&h.partTarget||h.targetduration)*3;return Math.max(h.age-c,0)}},{key:"forwardBufferLength",get:function(){var h=this.media,c=this.levelDetails;if(!h||!c)return 0;var v=h.buffered.length;return v?h.buffered.end(v-1):c.edge-this.currentTime}}]),l}()},"./src/controller/level-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return E});var D=C("./src/types/level.ts"),u=C("./src/events.ts"),m=C("./src/errors.ts"),w=C("./src/utils/codecs.ts"),p=C("./src/controller/level-helper.ts"),s=C("./src/controller/base-playlist-controller.ts"),l=C("./src/types/loader.ts");function a(){return a=Object.assign||function(n){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var S in t)Object.prototype.hasOwnProperty.call(t,S)&&(n[S]=t[S])}return n},a.apply(this,arguments)}function d(n,o){for(var t=0;t<o.length;t++){var S=o[t];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(n,S.key,S)}}function h(n,o,t){return o&&d(n.prototype,o),t&&d(n,t),n}function c(n,o){n.prototype=Object.create(o.prototype),n.prototype.constructor=n,v(n,o)}function v(n,o){return v=Object.setPrototypeOf||function(S,_){return S.__proto__=_,S},v(n,o)}var g=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),E=function(n){c(o,n);function o(S){var _;return _=n.call(this,S,"[level-controller]")||this,_._levels=[],_._firstLevel=-1,_._startLevel=void 0,_.currentLevelIndex=-1,_.manualLevelIndex=-1,_.onParsedComplete=void 0,_._registerListeners(),_}var t=o.prototype;return t._registerListeners=function(){var _=this.hls;_.on(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.on(u.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.on(u.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.on(u.Events.FRAG_LOADED,this.onFragLoaded,this),_.on(u.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var _=this.hls;_.off(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.off(u.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.off(u.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.off(u.Events.FRAG_LOADED,this.onFragLoaded,this),_.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 _=this._levels;_.forEach(function(i){i.loadError=0}),n.prototype.startLoad.call(this)},t.onManifestLoaded=function(_,i){var P=[],O=[],x=[],b,y={},T,M=!1,k=!1,N=!1;if(i.levels.forEach(function(H){var U=H.attrs;M=M||!!(H.width&&H.height),k=k||!!H.videoCodec,N=N||!!H.audioCodec,g&&H.audioCodec&&H.audioCodec.indexOf("mp4a.40.34")!==-1&&(H.audioCodec=void 0);var W=H.bitrate+"-"+H.attrs.RESOLUTION+"-"+H.attrs.CODECS;T=y[W],T?T.url.push(H.url):(T=new D.Level(H),y[W]=T,P.push(T)),U&&(U.AUDIO&&Object(p.addGroupId)(T,"audio",U.AUDIO),U.SUBTITLES&&Object(p.addGroupId)(T,"text",U.SUBTITLES))}),(M||k)&&N&&(P=P.filter(function(H){var U=H.videoCodec,W=H.width,G=H.height;return!!U||!!(W&&G)})),P=P.filter(function(H){var U=H.audioCodec,W=H.videoCodec;return(!U||Object(w.isCodecSupportedInMp4)(U,"audio"))&&(!W||Object(w.isCodecSupportedInMp4)(W,"video"))}),i.audioTracks&&(O=i.audioTracks.filter(function(H){return!H.audioCodec||Object(w.isCodecSupportedInMp4)(H.audioCodec,"audio")}),Object(p.assignTrackIdsByGroup)(O)),i.subtitles&&(x=i.subtitles,Object(p.assignTrackIdsByGroup)(x)),P.length>0){b=P[0].bitrate,P.sort(function(H,U){return H.bitrate-U.bitrate}),this._levels=P;for(var K=0;K<P.length;K++)if(P[K].bitrate===b){this._firstLevel=K,this.log("manifest loaded, "+P.length+" level(s) found, first bitrate: "+b);break}var z=N&&!k,B={levels:P,audioTracks:O,subtitleTracks:x,firstLevel:this._firstLevel,stats:i.stats,audio:N,video:k,altAudio:!z&&O.some(function(H){return!!H.url})};this.hls.trigger(u.Events.MANIFEST_PARSED,B),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(u.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:i.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(_,i){if(n.prototype.onError.call(this,_,i),i.fatal)return;var P=i.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 x=!1,b=!0,y;switch(i.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:if(i.frag){var T=this._levels[i.frag.level];T?(T.fragmentError++,T.fragmentError>this.hls.config.fragLoadingMaxRetry&&(y=i.frag.level)):y=i.frag.level}break;case m.ErrorDetails.LEVEL_LOAD_ERROR:case m.ErrorDetails.LEVEL_LOAD_TIMEOUT:P&&(P.deliveryDirectives&&(b=!1),y=P.level),x=!0;break;case m.ErrorDetails.REMUX_ALLOC_ERROR:y=i.level,x=!0;break}y!==void 0&&this.recoverLevel(i,y,x,b)},t.recoverLevel=function(_,i,P,O){var x=_.details,b=this._levels[i];if(b.loadError++,P){var y=this.retryLoadingOrFail(_);if(y)_.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var T=b.url.length;if(T>1&&b.loadError<T)_.levelRetry=!0,this.redundantFailover(i);else if(this.manualLevelIndex===-1){var M=i===0?this._levels.length-1:i-1;this.currentLevelIndex!==M&&this._levels[M].loadError===0&&(this.warn(x+": switch to "+M),_.levelRetry=!0,this.hls.nextAutoLevel=M)}}},t.redundantFailover=function(_){var i=this._levels[_],P=i.url.length;if(P>1){var O=(i.urlId+1)%P;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(x){x.urlId=O}),this.level=_}},t.onFragLoaded=function(_,i){var P=i.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(_,i){var P,O=i.level,x=i.details,b=this._levels[O];if(!b){var y;this.warn("Invalid level index "+O),(y=i.deliveryDirectives)!==null&&y!==void 0&&y.skip&&(x.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(b.fragmentError===0&&(b.loadError=0,this.retryCount=0),this.playlistLoaded(O,i,b.details)):(P=i.deliveryDirectives)!==null&&P!==void 0&&P.skip&&(x.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(_,i){var P=this.hls.levels[this.currentLevelIndex];if(!P)return;if(P.audioGroupIds){for(var O=-1,x=this.hls.audioTracks[i.id].groupId,b=0;b<P.audioGroupIds.length;b++)if(P.audioGroupIds[b]===x){O=b;break}O!==P.urlId&&(P.urlId=O,this.startLoad())}},t.loadPlaylist=function(_){var i=this.currentLevelIndex,P=this._levels[i];if(this.canLoad&&P&&P.url.length>0){var O=P.urlId,x=P.url[O];if(_)try{x=_.addDirectives(x)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("Attempt loading level index "+i+(_?" at sn "+_.msn+" part "+_.part:"")+" with URL-id "+O+" "+x),this.clearTimer(),this.hls.trigger(u.Events.LEVEL_LOADING,{url:x,level:i,id:O,deliveryDirectives:_||null})}},t.removeLevel=function(_,i){var P=function(b,y){return y!==i},O=this._levels.filter(function(x,b){return b!==_?!0:x.url.length>1&&i!==void 0?(x.url=x.url.filter(P),x.audioGroupIds&&(x.audioGroupIds=x.audioGroupIds.filter(P)),x.textGroupIds&&(x.textGroupIds=x.textGroupIds.filter(P)),x.urlId=0,!0):!1}).map(function(x,b){var y=x.details;return y!=null&&y.fragments&&y.fragments.forEach(function(T){T.level=b}),x});this._levels=O,this.hls.trigger(u.Events.LEVELS_UPDATED,{levels:O})},h(o,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(_){var i,P=this._levels;if(P.length===0)return;if(this.currentLevelIndex===_&&(i=P[_])!==null&&i!==void 0&&i.details)return;if(_<0||_>=P.length){var O=_<0;if(this.hls.trigger(u.Events.ERROR,{type:m.ErrorTypes.OTHER_ERROR,details:m.ErrorDetails.LEVEL_SWITCH_ERROR,level:_,fatal:O,reason:"invalid level idx"}),O)return;_=Math.min(_,P.length-1)}this.clearTimer();var x=this.currentLevelIndex,b=P[x],y=P[_];this.log("switching to level "+_+" from "+x),this.currentLevelIndex=_;var T=a({},y,{level:_,maxBitrate:y.maxBitrate,uri:y.uri,urlId:y.urlId});delete T._urlId,this.hls.trigger(u.Events.LEVEL_SWITCHING,T);var M=y.details;if(!M||M.live){var k=this.switchParams(y.uri,b==null?void 0:b.details);this.loadPlaylist(k)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(_){this.manualLevelIndex=_,this._startLevel===void 0&&(this._startLevel=_),_!==-1&&(this.level=_)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(_){this._firstLevel=_}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var _=this.hls.config.startLevel;return _!==void 0?_:this._firstLevel}else return this._startLevel},set:function(_){this._startLevel=_}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(_){this.level=_,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=_)}}]),o}(s.default)},"./src/controller/level-helper.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"addGroupId",function(){return m}),C.d(f,"assignTrackIdsByGroup",function(){return w}),C.d(f,"updatePTS",function(){return p}),C.d(f,"updateFragPTSDTS",function(){return l}),C.d(f,"mergeDetails",function(){return a}),C.d(f,"mapPartIntersection",function(){return d}),C.d(f,"mapFragmentIntersection",function(){return h}),C.d(f,"adjustSliding",function(){return c}),C.d(f,"addSliding",function(){return v}),C.d(f,"computeReloadInterval",function(){return g}),C.d(f,"getFragmentWithSN",function(){return E}),C.d(f,"getPartWith",function(){return n});var D=C("./src/polyfills/number.ts"),u=C("./src/utils/logger.ts");function m(o,t,S){switch(t){case"audio":o.audioGroupIds||(o.audioGroupIds=[]),o.audioGroupIds.push(S);break;case"text":o.textGroupIds||(o.textGroupIds=[]),o.textGroupIds.push(S);break}}function w(o){var t={};o.forEach(function(S){var _=S.groupId||"";S.id=t[_]=t[_]||0,t[_]++})}function p(o,t,S){var _=o[t],i=o[S];s(_,i)}function s(o,t){var S=t.startPTS;if(Object(D.isFiniteNumber)(S)){var _=0,i;t.sn>o.sn?(_=S-o.start,i=o):(_=o.start-S,i=t),i.duration!==_&&(i.duration=_)}else if(t.sn>o.sn){var P=o.cc===t.cc;P&&o.minEndPTS?t.start=o.start+(o.minEndPTS-o.start):t.start=o.start+o.duration}else t.start=Math.max(o.start-t.duration,0)}function l(o,t,S,_,i,P){var O=_-S;O<=0&&(u.logger.warn("Fragment should have a positive duration",t),_=S+t.duration,P=i+t.duration);var x=S,b=_,y=t.startPTS,T=t.endPTS;if(Object(D.isFiniteNumber)(y)){var M=Math.abs(y-S);Object(D.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(M,t.deltaPTS):t.deltaPTS=M,x=Math.max(S,y),S=Math.min(S,y),i=Math.min(i,t.startDTS),b=Math.min(_,T),_=Math.max(_,T),P=Math.max(P,t.endDTS)}t.duration=_-S;var k=S-t.start;t.appendedPTS=_,t.start=t.startPTS=S,t.maxStartPTS=x,t.startDTS=i,t.endPTS=_,t.minEndPTS=b,t.endDTS=P;var N=t.sn;if(!o||N<o.startSN||N>o.endSN)return 0;var K,z=N-o.startSN,B=o.fragments;for(B[z]=t,K=z;K>0;K--)s(B[K],B[K-1]);for(K=z;K<B.length-1;K++)s(B[K],B[K+1]);return o.fragmentHint&&s(B[B.length-1],o.fragmentHint),o.PTSKnown=o.alignedSliding=!0,k}function a(o,t){for(var S=null,_=o.fragments,i=_.length-1;i>=0;i--){var P=_[i].initSegment;if(P){S=P;break}}o.fragmentHint&&delete o.fragmentHint.endPTS;var O=0,x;if(h(o,t,function(K,z){K.relurl&&(O=K.cc-z.cc),Object(D.isFiniteNumber)(K.startPTS)&&Object(D.isFiniteNumber)(K.endPTS)&&(z.start=z.startPTS=K.startPTS,z.startDTS=K.startDTS,z.appendedPTS=K.appendedPTS,z.maxStartPTS=K.maxStartPTS,z.endPTS=K.endPTS,z.endDTS=K.endDTS,z.minEndPTS=K.minEndPTS,z.duration=K.endPTS-K.startPTS,z.duration&&(x=z),t.PTSKnown=t.alignedSliding=!0),z.elementaryStreams=K.elementaryStreams,z.loader=K.loader,z.stats=K.stats,z.urlId=K.urlId,K.initSegment&&(z.initSegment=K.initSegment,S=K.initSegment)}),S){var b=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;b.forEach(function(K){var z;(!K.initSegment||K.initSegment.relurl===((z=S)===null||z===void 0?void 0:z.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 y=t.skippedSegments;y--;)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),d(o.partList,t.partList,function(K,z){z.elementaryStreams=K.elementaryStreams,z.stats=K.stats}),x?l(t,x,x.startPTS,x.endPTS,x.startDTS,x.endDTS):c(o,t),T.length&&(t.totalduration=t.edge-T[0].start),t.driftStartTime=o.driftStartTime,t.driftStart=o.driftStart;var k=t.advancedDateTime;if(t.advanced&&k){var N=t.edge;t.driftStart||(t.driftStartTime=k,t.driftStart=N),t.driftEndTime=k,t.driftEnd=N}else t.driftEndTime=o.driftEndTime,t.driftEnd=o.driftEnd,t.advancedDateTime=o.advancedDateTime}function d(o,t,S){if(o&&t)for(var _=0,i=0,P=o.length;i<=P;i++){var O=o[i],x=t[i+_];O&&x&&O.index===x.index&&O.fragment.sn===x.fragment.sn?S(O,x):_--}}function h(o,t,S){for(var _=t.skippedSegments,i=Math.max(o.startSN,t.startSN)-t.startSN,P=(o.fragmentHint?1:0)+(_?t.endSN:Math.min(o.endSN,t.endSN))-t.startSN,O=t.startSN-o.startSN,x=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,b=o.fragmentHint?o.fragments.concat(o.fragmentHint):o.fragments,y=i;y<=P;y++){var T=b[O+y],M=x[y];_&&!M&&y<_&&(M=t.fragments[y]=T),T&&M&&S(T,M)}}function c(o,t){var S=t.startSN+t.skippedSegments-o.startSN,_=o.fragments;if(S<0||S>=_.length)return;v(t,_[S].start)}function v(o,t){if(t){for(var S=o.fragments,_=o.skippedSegments;_<S.length;_++)S[_].start+=t;o.fragmentHint&&(o.fragmentHint.start+=t)}}function g(o,t){var S=1e3*o.levelTargetDuration,_=S/2,i=o.age,P=i>0&&i<S*3,O=t.loading.end-t.loading.start,x,b=o.availabilityDelay;if(o.updated===!1)if(P){var y=333*o.misses;x=Math.max(Math.min(_,O*2),y),o.availabilityDelay=(o.availabilityDelay||0)+x}else x=_;else P?(b=Math.min(b||S/2,i),o.availabilityDelay=b,x=b+S-i):x=S-O;return Math.round(x)}function E(o,t,S){if(!o||!o.details)return null;var _=o.details,i=_.fragments[t-_.startSN];return i||(i=_.fragmentHint,i&&i.sn===t?i:t<_.startSN&&S&&S.sn===t?S:null)}function n(o,t,S){if(!o||!o.details)return null;var _=o.details.partList;if(_)for(var i=_.length;i--;){var P=_[i];if(P.index===S&&P.fragment.sn===t)return P}return null}},"./src/controller/stream-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return _});var D=C("./src/polyfills/number.ts"),u=C("./src/controller/base-stream-controller.ts"),m=C("./src/is-supported.ts"),w=C("./src/events.ts"),p=C("./src/utils/buffer-helper.ts"),s=C("./src/controller/fragment-tracker.ts"),l=C("./src/types/loader.ts"),a=C("./src/loader/fragment.ts"),d=C("./src/demux/transmuxer-interface.ts"),h=C("./src/types/transmuxer.ts"),c=C("./src/controller/gap-controller.ts"),v=C("./src/errors.ts"),g=C("./src/utils/logger.ts");function E(i,P){for(var O=0;O<P.length;O++){var x=P[O];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(i,x.key,x)}}function n(i,P,O){return P&&E(i.prototype,P),O&&E(i,O),i}function o(i,P){i.prototype=Object.create(P.prototype),i.prototype.constructor=i,t(i,P)}function t(i,P){return t=Object.setPrototypeOf||function(x,b){return x.__proto__=b,x},t(i,P)}var S=100,_=function(i){o(P,i);function P(x,b){var y;return y=i.call(this,x,b,"[stream-controller]")||this,y.audioCodecSwap=!1,y.gapController=null,y.level=-1,y._forceStartLoad=!1,y.altAudio=!1,y.audioOnly=!1,y.fragPlaying=null,y.onvplaying=null,y.onvseeked=null,y.fragLastKbps=0,y.stalled=!1,y.couldBacktrack=!1,y.audioCodecSwitch=!1,y.videoBuffer=null,y._registerListeners(),y}var O=P.prototype;return O._registerListeners=function(){var b=this.hls;b.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.on(w.Events.LEVEL_LOADING,this.onLevelLoading,this),b.on(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),b.on(w.Events.ERROR,this.onError,this),b.on(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.on(w.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.on(w.Events.BUFFER_CREATED,this.onBufferCreated,this),b.on(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.on(w.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),b.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var b=this.hls;b.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.off(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),b.off(w.Events.ERROR,this.onError,this),b.off(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.off(w.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.off(w.Events.BUFFER_CREATED,this.onBufferCreated,this),b.off(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.off(w.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),b.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},O.startLoad=function(b){if(this.levels){var y=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}y>0&&b===-1&&(this.log("Override startPosition with lastCurrentTime @"+y.toFixed(3)),b=y),this.state=u.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=b,this.tick()}else this._forceStartLoad=!0,this.state=u.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,i.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case u.State.IDLE:this.doTickIdle();break;case u.State.WAITING_LEVEL:{var b,y=this.levels,T=this.level,M=y==null||((b=y[T])===null||b===void 0)?void 0:b.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 k,N=self.performance.now(),K=this.retryDate;(!K||N>=K||(k=this.media)!==null&&k!==void 0&&k.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=u.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){i.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var b,y,T=this.hls,M=this.levelLastLoaded,k=this.levels,N=this.media,K=T.config,z=T.nextLoadLevel;if(M===null||!N&&(this.startFragRequested||!K.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!k||!k[z])return;var B=k[z];this.level=T.nextLoadLevel=z;var H=B.details;if(!H||this.state===u.State.WAITING_LEVEL||H.live&&this.levelLastLoaded!==z){this.state=u.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:N,l.PlaylistLevelType.MAIN);if(U===null)return;var W=U.len,G=this.getMaxBufferLength(B.maxBitrate);if(W>=G)return;if(this._streamEnded(U,H)){var ee={};this.altAudio&&(ee.type="video"),this.hls.trigger(w.Events.BUFFER_EOS,ee),this.state=u.State.ENDED;return}var ie=U.end,ce=this.getNextFragment(ie,H);if(this.couldBacktrack&&!this.fragPrevious&&ce&&ce.sn!=="initSegment"){var _e=ce.sn-H.startSN;_e>1&&(ce=H.fragments[_e-1],this.fragmentTracker.removeFragment(ce))}if(ce&&this.fragmentTracker.getState(ce)===s.FragmentState.OK&&this.nextLoadPosition>ie){var Ce=this.audioOnly&&!this.altAudio?a.ElementaryStreamTypes.AUDIO:a.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(N,Ce,l.PlaylistLevelType.MAIN),ce=this.getNextFragment(this.nextLoadPosition,H)}if(!ce)return;ce.initSegment&&!ce.initSegment.data&&!this.bitrateTest&&(ce=ce.initSegment),((b=ce.decryptdata)===null||b===void 0?void 0:b.keyFormat)==="identity"&&!((y=ce.decryptdata)!==null&&y!==void 0&&y.key)?this.loadKey(ce,H):this.loadFragment(ce,H,ie)},O.loadFragment=function(b,y,T){var M,k=this.fragmentTracker.getState(b);if(this.fragCurrent=b,k===s.FragmentState.BACKTRACKED){var N=this.fragmentTracker.getBacktrackData(b);if(N){this._handleFragmentLoadProgress(N),this._handleFragmentLoadComplete(N);return}else k=s.FragmentState.NOT_LOADED}k===s.FragmentState.NOT_LOADED||k===s.FragmentState.PARTIAL?b.sn==="initSegment"?this._loadInitSegment(b):this.bitrateTest?(b.bitrateTest=!0,this.log("Fragment "+b.sn+" of level "+b.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(b)):(this.startFragRequested=!0,i.prototype.loadFragment.call(this,b,y,T)):k===s.FragmentState.APPENDING?this.reduceMaxBufferLength(b.duration)&&this.fragmentTracker.removeFragment(b):((M=this.media)===null||M===void 0?void 0:M.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(b){var y=this.fragmentTracker.getAppendedFrag(b,l.PlaylistLevelType.MAIN);return y&&"fragment"in y?y.fragment:y},O.getBufferedFrag=function(b){return this.fragmentTracker.getBufferedFrag(b,l.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(b){return b?this.getBufferedFrag(b.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var b=this.levels,y=this.media;if(y!=null&&y.readyState){var T,M=this.getAppendedFrag(y.currentTime);if(M&&M.start>1&&this.flushMainBuffer(0,M.start-1),!y.paused&&b){var k=this.hls.nextLoadLevel,N=b[k],K=this.fragLastKbps;K&&this.fragCurrent?T=this.fragCurrent.duration*N.maxBitrate/(1e3*K)+1:T=0}else T=0;var z=this.getBufferedFrag(y.currentTime+T);if(z){var B=this.followingBufferedFrag(z);if(B){this.abortCurrentFrag();var H=B.maxStartPTS?B.maxStartPTS:B.start,U=B.duration,W=Math.max(z.end,H+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(W,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var b=this.fragCurrent;this.fragCurrent=null,b!=null&&b.loader&&b.loader.abort(),this.state===u.State.KEY_LOADING&&(this.state=u.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(b,y){i.prototype.flushMainBuffer.call(this,b,y,this.altAudio?"video":null)},O.onMediaAttached=function(b,y){i.prototype.onMediaAttached.call(this,b,y);var T=y.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 b=this.media;b&&(b.removeEventListener("playing",this.onvplaying),b.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),i.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var b=this.media,y=b?b.currentTime:null;Object(D.isFiniteNumber)(y)&&this.log("Media seeked to "+y.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(b,y){var T=!1,M=!1,k;y.levels.forEach(function(N){k=N.audioCodec,k&&(k.indexOf("mp4a.40.2")!==-1&&(T=!0),k.indexOf("mp4a.40.5")!==-1&&(M=!0))}),this.audioCodecSwitch=T&&M&&!Object(m.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=y.levels,this.startFragRequested=!1},O.onLevelLoading=function(b,y){var T=this.levels;if(!T||this.state!==u.State.IDLE)return;var M=T[y.level];(!M.details||M.details.live&&this.levelLastLoaded!==y.level||this.waitForCdnTuneIn(M.details))&&(this.state=u.State.WAITING_LEVEL)},O.onLevelLoaded=function(b,y){var T,M=this.levels,k=y.level,N=y.details,K=N.totalduration;if(!M){this.warn("Levels were reset while loading level "+k);return}this.log("Level "+k+" loaded ["+N.startSN+","+N.endSN+"], cc ["+N.startCC+", "+N.endCC+"] duration:"+K);var z=this.fragCurrent;z&&(this.state===u.State.FRAG_LOADING||this.state===u.State.FRAG_LOADING_WAITING_RETRY)&&(z.level!==y.level&&z.loader&&(this.state=u.State.IDLE,z.loader.abort()));var B=M[k],H=0;if(N.live||(T=B.details)!==null&&T!==void 0&&T.live){if(N.fragments[0]||(N.deltaUpdateFailed=!0),N.deltaUpdateFailed)return;H=this.alignPlaylists(N,B.details)}if(B.details=N,this.levelLastLoaded=k,this.hls.trigger(w.Events.LEVEL_UPDATED,{details:N,level:k}),this.state===u.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(N))return;this.state=u.State.IDLE}this.startFragRequested?N.live&&this.synchronizeToLiveEdge(N):this.setStartPosition(N,H),this.tick()},O._handleFragmentLoadProgress=function(b){var y,T=b.frag,M=b.part,k=b.payload,N=this.levels;if(!N){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=N[T.level],z=K.details;if(!z){this.warn("Dropping fragment "+T.sn+" of level "+T.level+" after level details were reset");return}var B=K.videoCodec,H=z.PTSKnown||!z.live,U=(y=T.initSegment)===null||y===void 0?void 0:y.data,W=this._getAudioCodec(K),G=this.transmuxer=this.transmuxer||new d.default(this.hls,l.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ee=M?M.index:-1,ie=ee!==-1,ce=new h.ChunkMetadata(T.level,T.sn,T.stats.chunkCount,k.byteLength,ee,ie),_e=this.initPTS[T.cc];G.push(k,U,W,B,T,M,z.totalduration,H,ce,_e)},O.onAudioTrackSwitching=function(b,y){var T=this.altAudio,M=!!y.url,k=y.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 N=this.fragCurrent;N!=null&&N.loader&&(this.log("Switching to main audio track, cancel main fragment load"),N.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:k})}},O.onAudioTrackSwitched=function(b,y){var T=y.id,M=!!this.hls.audioTracks[T].url;if(M){var k=this.videoBuffer;k&&this.mediaBuffer!==k&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=k)}this.altAudio=M,this.tick()},O.onBufferCreated=function(b,y){var T=y.tracks,M,k,N=!1;for(var K in T){var z=T[K];if(z.id==="main"){if(k=K,M=z,K==="video"){var B=T[K];B&&(this.videoBuffer=B.buffer)}}else N=!0}N&&M?(this.log("Alternate track found, use "+k+".buffered to schedule main fragment loading"),this.mediaBuffer=M.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(b,y){var T=y.frag,M=y.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 k=M?M.stats:T.stats;this.fragLastKbps=Math.round(8*k.total/(k.buffering.end-k.loading.first)),T.sn!=="initSegment"&&(this.fragPrevious=T),this.fragBufferedComplete(T,M)},O.onError=function(b,y){switch(y.details){case v.ErrorDetails.FRAG_LOAD_ERROR:case v.ErrorDetails.FRAG_LOAD_TIMEOUT:case v.ErrorDetails.KEY_LOAD_ERROR:case v.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(l.PlaylistLevelType.MAIN,y);break;case v.ErrorDetails.LEVEL_LOAD_ERROR:case v.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==u.State.ERROR&&(y.fatal?(this.warn(""+y.details),this.state=u.State.ERROR):!y.levelRetry&&this.state===u.State.WAITING_LEVEL&&(this.state=u.State.IDLE));break;case v.ErrorDetails.BUFFER_FULL_ERROR:if(y.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 b=this.media,y=this.gapController;if(!b||!y||!b.readyState)return;var T=p.BufferHelper.getBuffered(b);!this.loadedmetadata&&T.length?(this.loadedmetadata=!0,this.seekToStartPos()):y.poll(this.lastCurrentTime),this.lastCurrentTime=b.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=u.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(b,y){var T=y.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(b,y){this.levels=y.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var b=this.media,y=b.currentTime,T=this.startPosition;if(T>=0&&y<T){if(b.seeking){g.logger.log("could not seek to "+T+", already seeking at "+y);return}var M=p.BufferHelper.getBuffered(b),k=M.length?M.start(0):0,N=k-T;N>0&&(N<this.config.maxBufferHole||N<this.config.maxFragLookUpTolerance)&&(g.logger.log("adjusting start position by "+N+" to match buffer start"),T+=N,this.startPosition=T),this.log("seek to target start position "+T+" from current time "+y),b.currentTime=T}},O._getAudioCodec=function(b){var y=this.config.defaultAudioCodec||b.audioCodec;return this.audioCodecSwap&&y&&(this.log("Swapping audio codec"),y.indexOf("mp4a.40.5")!==-1?y="mp4a.40.2":y="mp4a.40.5"),y},O._loadBitrateTestFrag=function(b){var y=this;this._doFragLoad(b).then(function(T){var M=y.hls;if(!T||M.nextLoadLevel||y.fragContextChanged(b))return;y.fragLoadError=0,y.state=u.State.IDLE,y.startFragRequested=!1,y.bitrateTest=!1;var k=b.stats;k.parsing.start=k.parsing.end=k.buffering.start=k.buffering.end=self.performance.now(),M.trigger(w.Events.FRAG_LOADED,T)})},O._handleTransmuxComplete=function(b){var y,T="main",M=this.hls,k=b.remuxResult,N=b.chunkMeta,K=this.getCurrentContext(N);if(!K){this.warn("The loading context changed while buffering fragment "+N.sn+" of level "+N.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(N.level);return}var z=K.frag,B=K.part,H=K.level,U=k.video,W=k.text,G=k.id3,ee=k.initSegment,ie=this.altAudio?void 0:k.audio;if(this.fragContextChanged(z))return;if(this.state=u.State.PARSING,ee){ee.tracks&&(this._bufferInitSegment(H,ee.tracks,z,N),M.trigger(w.Events.FRAG_PARSING_INIT_SEGMENT,{frag:z,id:T,tracks:ee.tracks}));var ce=ee.initPTS,_e=ee.timescale;Object(D.isFiniteNumber)(ce)&&(this.initPTS[z.cc]=ce,M.trigger(w.Events.INIT_PTS_FOUND,{frag:z,id:T,initPTS:ce,timescale:_e}))}if(U&&k.independent!==!1){if(H.details){var Ce=U.startPTS,le=U.endPTS,ye=U.startDTS,fe=U.endDTS;if(B)B.elementaryStreams[U.type]={startPTS:Ce,endPTS:le,startDTS:ye,endDTS:fe};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var ne=this.getLoadPosition()+this.config.maxBufferHole;if(ne<Ce){this.backtrack(z);return}z.setElementaryStreamInfo(U.type,z.start,le,z.start,fe,!0)}z.setElementaryStreamInfo(U.type,Ce,le,ye,fe),this.bufferFragmentData(U,z,B,N)}}else if(k.independent===!1){this.backtrack(z);return}if(ie){var ae=ie.startPTS,q=ie.endPTS,se=ie.startDTS,Q=ie.endDTS;B&&(B.elementaryStreams[a.ElementaryStreamTypes.AUDIO]={startPTS:ae,endPTS:q,startDTS:se,endDTS:Q}),z.setElementaryStreamInfo(a.ElementaryStreamTypes.AUDIO,ae,q,se,Q),this.bufferFragmentData(ie,z,B,N)}if(G!=null&&(y=G.samples)!==null&&y!==void 0&&y.length){var Z={frag:z,id:T,samples:G.samples};M.trigger(w.Events.FRAG_PARSING_METADATA,Z)}if(W){var be={frag:z,id:T,samples:W.samples};M.trigger(w.Events.FRAG_PARSING_USERDATA,be)}},O._bufferInitSegment=function(b,y,T,M){var k=this;if(this.state!==u.State.PARSING)return;this.audioOnly=!!y.audio&&!y.video,this.altAudio&&!this.audioOnly&&delete y.audio;var N=y.audio,K=y.video,z=y.audiovideo;if(N){var B=b.audioCodec,H=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(B&&(B.indexOf("mp4a.40.5")!==-1?B="mp4a.40.2":B="mp4a.40.5"),N.metadata.channelCount!==1&&H.indexOf("firefox")===-1&&(B="mp4a.40.5")),H.indexOf("android")!==-1&&N.container!=="audio/mpeg"&&(B="mp4a.40.2",this.log("Android: force audio codec to "+B)),b.audioCodec&&b.audioCodec!==B&&this.log('Swapping manifest audio codec "'+b.audioCodec+'" for "'+B+'"'),N.levelCodec=B,N.id="main",this.log("Init audio buffer, container:"+N.container+", codecs[selected/level/parsed]=["+(B||"")+"/"+(b.audioCodec||"")+"/"+N.codec+"]")}K&&(K.levelCodec=b.videoCodec,K.id="main",this.log("Init video buffer, container:"+K.container+", codecs[level/parsed]=["+(b.videoCodec||"")+"/"+K.codec+"]")),z&&this.log("Init audiovideo buffer, container:"+z.container+", codecs[level/parsed]=["+(b.attrs.CODECS||"")+"/"+z.codec+"]"),this.hls.trigger(w.Events.BUFFER_CODECS,y),Object.keys(y).forEach(function(U){var W=y[U],G=W.initSegment;G!=null&&G.byteLength&&k.hls.trigger(w.Events.BUFFER_APPENDING,{type:U,data:G,frag:T,part:null,chunkMeta:M,parent:T.type})}),this.tick()},O.backtrack=function(b){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(b);var y=this.fragmentTracker.backtrack(b);this.fragPrevious=null,this.nextLoadPosition=b.start,y?this.resetFragmentLoading(b):this.state=u.State.BACKTRACKING},O.checkFragmentChanged=function(){var b=this.media,y=null;if(b&&b.readyState>1&&b.seeking===!1){var T=b.currentTime;if(p.BufferHelper.isBuffered(b,T)?y=this.getAppendedFrag(T):p.BufferHelper.isBuffered(b,T+.1)&&(y=this.getAppendedFrag(T+.1)),y){var M=this.fragPlaying,k=y.level;(!M||y.sn!==M.sn||M.level!==k||y.urlId!==M.urlId)&&(this.hls.trigger(w.Events.FRAG_CHANGED,{frag:y}),(!M||M.level!==k)&&this.hls.trigger(w.Events.LEVEL_SWITCHED,{level:k}),this.fragPlaying=y)}}},n(P,[{key:"nextLevel",get:function(){var b=this.nextBufferedFrag;return b?b.level:-1}},{key:"currentLevel",get:function(){var b=this.media;if(b){var y=this.getAppendedFrag(b.currentTime);if(y)return y.level}return-1}},{key:"nextBufferedFrag",get:function(){var b=this.media;if(b){var y=this.getAppendedFrag(b.currentTime);return this.followingBufferedFrag(y)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),P}(u.default)},"./src/controller/subtitle-stream-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"SubtitleStreamController",function(){return o});var D=C("./src/events.ts"),u=C("./src/utils/logger.ts"),m=C("./src/utils/buffer-helper.ts"),w=C("./src/controller/fragment-finders.ts"),p=C("./src/utils/discontinuities.ts"),s=C("./src/controller/level-helper.ts"),l=C("./src/controller/fragment-tracker.ts"),a=C("./src/controller/base-stream-controller.ts"),d=C("./src/types/loader.ts"),h=C("./src/types/level.ts");function c(t,S){for(var _=0;_<S.length;_++){var i=S[_];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function v(t,S,_){return S&&c(t.prototype,S),_&&c(t,_),t}function g(t,S){t.prototype=Object.create(S.prototype),t.prototype.constructor=t,E(t,S)}function E(t,S){return E=Object.setPrototypeOf||function(i,P){return i.__proto__=P,i},E(t,S)}var n=500,o=function(t){g(S,t);function S(i,P){var O;return O=t.call(this,i,P,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var _=S.prototype;return _.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},_._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)},_._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)},_.startLoad=function(){this.stopLoad(),this.state=a.State.IDLE,this.setInterval(n),this.tick()},_.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},_.onLevelLoaded=function(P,O){this.mainDetails=O.details},_.onSubtitleFragProcessed=function(P,O){var x=O.frag,b=O.success;if(this.fragPrevious=x,this.state=a.State.IDLE,!b)return;var y=this.tracksBuffered[this.currentTrackId];if(!y)return;for(var T,M=x.start,k=0;k<y.length;k++)if(M>=y[k].start&&M<=y[k].end){T=y[k];break}var N=x.start+x.duration;T?T.end=N:(T={start:M,end:N},y.push(T)),this.fragmentTracker.fragBuffered(x)},_.onBufferFlushing=function(P,O){var x=O.startOffset,b=O.endOffset;if(x===0&&b!==Number.POSITIVE_INFINITY){var y=this.currentTrackId,T=this.levels;if(!T.length||!T[y]||!T[y].details)return;var M=T[y].details,k=M.targetduration,N=b-k;if(N<=0)return;O.endOffsetSubtitles=Math.max(0,N),this.tracksBuffered.forEach(function(K){for(var z=0;z<K.length;){if(K[z].end<=N){K.shift();continue}else if(K[z].start<N)K[z].start=N;else break;z++}}),this.fragmentTracker.removeFragmentsInRange(x,N,d.PlaylistLevelType.SUBTITLE)}},_.onError=function(P,O){var x,b=O.frag;if(!b||b.type!==d.PlaylistLevelType.SUBTITLE)return;(x=this.fragCurrent)!==null&&x!==void 0&&x.loader&&this.fragCurrent.loader.abort(),this.state=a.State.IDLE},_.onSubtitleTracksUpdated=function(P,O){var x=this,b=O.subtitleTracks;this.tracksBuffered=[],this.levels=b.map(function(y){return new h.Level(y)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(y){x.tracksBuffered[y.id]=[]}),this.mediaBuffer=null},_.onSubtitleTrackSwitch=function(P,O){if(this.currentTrackId=O.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var x=this.levels[this.currentTrackId];x!=null&&x.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,x&&this.setInterval(n)},_.onSubtitleTrackLoaded=function(P,O){var x,b=O.details,y=O.id,T=this.currentTrackId,M=this.levels;if(!M.length)return;var k=M[T];if(y>=M.length||y!==T||!k)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,b.live||(x=k.details)!==null&&x!==void 0&&x.live){var N=this.mainDetails;if(b.deltaUpdateFailed||!N)return;var K=N.fragments[0];if(!k.details)b.hasProgramDateTime&&N.hasProgramDateTime?Object(p.alignMediaPlaylistByPDT)(b,N):K&&Object(s.addSliding)(b,K.start);else{var z=this.alignPlaylists(b,k.details);z===0&&K&&Object(s.addSliding)(b,K.start)}}if(k.details=b,this.levelLastLoaded=y,this.tick(),b.live&&!this.fragCurrent&&this.media&&this.state===a.State.IDLE){var B=Object(w.findFragmentByPTS)(null,b.fragments,this.media.currentTime,0);B||(this.warn("Subtitle playlist not aligned with playback"),k.details=void 0)}},_._handleFragmentLoadComplete=function(P){var O=P.frag,x=P.payload,b=O.decryptdata,y=this.hls;if(this.fragContextChanged(O))return;if(x&&x.byteLength>0&&b&&b.key&&b.iv&&b.method==="AES-128"){var T=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(x),b.key.buffer,b.iv.buffer).then(function(M){var k=performance.now();y.trigger(D.Events.FRAG_DECRYPTED,{frag:O,payload:M,stats:{tstart:T,tdecrypt:k}})})}},_.doTick=function(){if(!this.media){this.state=a.State.IDLE;return}if(this.state===a.State.IDLE){var P,O=this.currentTrackId,x=this.levels;if(!x.length||!x[O]||!x[O].details)return;var b=x[O].details,y=b.targetduration,T=this.config,M=this.media,k=m.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,M.currentTime-y,T.maxBufferHole),N=k.end,K=k.len,z=this.getMaxBufferLength()+y;if(K>z)return;console.assert(b,"Subtitle track details are defined on idle subtitle stream controller tick");var B=b.fragments,H=B.length,U=b.edge,W,G=this.fragPrevious;if(N<U){var ee=T.maxFragLookUpTolerance;G&&b.hasProgramDateTime&&(W=Object(w.findFragmentByPDT)(B,G.endProgramDateTime,ee)),W||(W=Object(w.findFragmentByPTS)(G,B,N,ee),!W&&G&&G.start<B[0].start&&(W=B[0]))}else W=B[H-1];(P=W)!==null&&P!==void 0&&P.encrypted?(u.logger.log("Loading key for "+W.sn),this.state=a.State.KEY_LOADING,this.hls.trigger(D.Events.KEY_LOADING,{frag:W})):W&&this.fragmentTracker.getState(W)===l.FragmentState.NOT_LOADED&&this.loadFragment(W,b,N)}},_.loadFragment=function(P,O,x){this.fragCurrent=P,t.prototype.loadFragment.call(this,P,O,x)},v(S,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),S}(a.default)},"./src/controller/subtitle-track-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/events.ts"),u=C("./src/utils/texttrack-utils.ts"),m=C("./src/controller/base-playlist-controller.ts"),w=C("./src/types/loader.ts");function p(c,v){for(var g=0;g<v.length;g++){var E=v[g];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(c,E.key,E)}}function s(c,v,g){return v&&p(c.prototype,v),g&&p(c,g),c}function l(c,v){c.prototype=Object.create(v.prototype),c.prototype.constructor=c,a(c,v)}function a(c,v){return a=Object.setPrototypeOf||function(E,n){return E.__proto__=n,E},a(c,v)}var d=function(c){l(v,c);function v(E){var n;return n=c.call(this,E,"[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 g=v.prototype;return g.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,c.prototype.destroy.call(this)},g.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)},g.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)},g.onMediaAttached=function(n,o){if(this.media=o.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)},g.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},g.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=h(this.media.textTracks);n.forEach(function(o){Object(u.clearCurrentCues)(o)}),this.subtitleTrack=-1,this.media=null},g.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},g.onManifestParsed=function(n,o){this.tracks=o.subtitleTracks},g.onSubtitleTrackLoaded=function(n,o){var t=o.id,S=o.details,_=this.trackId,i=this.tracksInGroup[_];if(!i){this.warn("Invalid subtitle track id "+t);return}var P=i.details;i.details=o.details,this.log("subtitle track "+t+" loaded ["+S.startSN+"-"+S.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,o,P))},g.onLevelLoading=function(n,o){this.switchLevel(o.level)},g.onLevelSwitching=function(n,o){this.switchLevel(o.level)},g.switchLevel=function(n){var o=this.hls.levels[n];if(!(o!=null&&o.textGroupIds))return;var t=o.textGroupIds[o.urlId];if(this.groupId!==t){var S=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,_=this.tracks.filter(function(O){return!t||O.groupId===t});this.tracksInGroup=_;var i=this.findTrackId(S==null?void 0:S.name)||this.findTrackId();this.groupId=t;var P={subtitleTracks:_};this.log("Updating subtitle tracks, "+_.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(D.Events.SUBTITLE_TRACKS_UPDATED,P),i!==-1&&this.setSubtitleTrack(i,S)}},g.findTrackId=function(n){for(var o=this.tracksInGroup,t=0;t<o.length;t++){var S=o[t];if((!this.selectDefaultTrack||S.default)&&(!n||n===S.name))return S.id}return-1},g.onError=function(n,o){if(c.prototype.onError.call(this,n,o),o.fatal||!o.context)return;o.context.type===w.PlaylistContextType.SUBTITLE_TRACK&&o.context.id===this.trackId&&o.context.groupId===this.groupId&&this.retryLoadingOrFail(o)},g.loadPlaylist=function(n){var o=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(o)){var t=o.id,S=o.groupId,_=o.url;if(n)try{_=n.addDirectives(_)}catch(i){this.warn("Could not construct new URL with HLS Delivery Directives: "+i)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(D.Events.SUBTITLE_TRACK_LOADING,{url:_,id:t,groupId:S,deliveryDirectives:n||null})}},g.toggleTrackModes=function(n){var o=this,t=this.media,S=this.subtitleDisplay,_=this.trackId;if(!t)return;var i=h(t.textTracks),P=i.filter(function(b){return b.groupId===o.groupId});if(n===-1)[].slice.call(i).forEach(function(b){b.mode="disabled"});else{var O=P[_];O&&(O.mode="disabled")}var x=P[n];x&&(x.mode=S?"showing":"hidden")},g.setSubtitleTrack=function(n,o){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 _=S[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,_){var i=_.id,P=_.groupId,O=P===void 0?"":P,x=_.name,b=_.type,y=_.url;this.hls.trigger(D.Events.SUBTITLE_TRACK_SWITCH,{id:i,groupId:O,name:x,type:b,url:y});var T=this.switchParams(_.url,o==null?void 0:o.details);this.loadPlaylist(T)}else this.hls.trigger(D.Events.SUBTITLE_TRACK_SWITCH,{id:n})},g.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,o=h(this.media.textTracks),t=0;t<o.length;t++)if(o[t].mode==="hidden")n=t;else if(o[t].mode==="showing"){n=t;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},s(v,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var o=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,o)}}]),v}(m.default);function h(c){for(var v=[],g=0;g<c.length;g++){var E=c[g];E.kind==="subtitles"&&E.label&&v.push(c[g])}return v}f.default=d},"./src/controller/timeline-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"TimelineController",function(){return h});var D=C("./src/polyfills/number.ts"),u=C("./src/events.ts"),m=C("./src/utils/cea-608-parser.ts"),w=C("./src/utils/output-filter.ts"),p=C("./src/utils/webvtt-parser.ts"),s=C("./src/utils/texttrack-utils.ts"),l=C("./src/utils/imsc1-ttml-parser.ts"),a=C("./src/types/loader.ts"),d=C("./src/utils/logger.ts"),h=function(){function E(o){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=g(),this.captionsProperties=void 0,this.hls=o,this.config=o.config,this.Cues=o.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"),_=new w.default(this,"textTrack3"),i=new w.default(this,"textTrack4");this.cea608Parser1=new m.default(1,t,S),this.cea608Parser2=new m.default(3,_,i)}o.on(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.on(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),o.on(u.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),o.on(u.Events.FRAG_LOADING,this.onFragLoading,this),o.on(u.Events.FRAG_LOADED,this.onFragLoaded,this),o.on(u.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),o.on(u.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),o.on(u.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.on(u.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),o.on(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=E.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,_,i,P){for(var O=!1,x=P.length;x--;){var b=P[x],y=v(b[0],b[1],S,_);if(y>=0&&(b[0]=Math.min(b[0],S),b[1]=Math.max(b[1],_),O=!0,y/(_-S)>.5))return}if(O||P.push([S,_]),this.config.renderTextTracksNatively){var T=this.captionsTracks[t];this.Cues.newCue(T,S,_,i)}else{var M=this.Cues.newCue(null,S,_,i);this.hls.trigger(u.Events.CUES_PARSED,{type:"captions",cues:M,track:t})}},n.onInitPtsFound=function(t,S){var _=this,i=S.frag,P=S.id,O=S.initPTS,x=S.timescale,b=this.unparsedVttFrags;P==="main"&&(this.initPTS[i.cc]=O,this.timescale[i.cc]=x),b.length&&(this.unparsedVttFrags=[],b.forEach(function(y){_.onFragLoaded(u.Events.FRAG_LOADED,y)}))},n.getExistingTrack=function(t){var S=this.media;if(S)for(var _=0;_<S.textTracks.length;_++){var i=S.textTracks[_];if(i[t])return i}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,_=this.captionsTracks,i=this.media,P=S[t],O=P.label,x=P.languageCode,b=this.getExistingTrack(t);if(b)_[t]=b,Object(s.clearCurrentCues)(_[t]),Object(s.sendAddTrackEvent)(_[t],i);else{var y=this.createTextTrack("captions",O,x);y&&(y[t]=!0,_[t]=y)}},n.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var S=this.captionsProperties[t];if(!S)return;var _=S.label,i={_id:t,label:_,kind:"captions",default:S.media?!!S.media.default:!1,closedCaptions:S.media};this.nonNativeCaptionsTracks[t]=i,this.hls.trigger(u.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})},n.createTextTrack=function(t,S,_){var i=this.media;return i?i.addTextTrack(t,S,_):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(s.clearCurrentCues)(t[S]),delete t[S]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=g(),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 _=0;_<S.length;_++)Object(s.clearCurrentCues)(S[_])},n.onSubtitleTracksUpdated=function(t,S){var _=this;this.textTracks=[];var i=S.subtitleTracks||[],P=i.some(function(y){return y.textCodec===l.IMSC1_CODEC});if(this.config.enableWebVTT||P&&this.config.enableIMSC1){var O=this.tracks&&i&&this.tracks.length===i.length;if(this.tracks=i||[],this.config.renderTextTracksNatively){var x=this.media?this.media.textTracks:[];this.tracks.forEach(function(y,T){var M;if(T<x.length){for(var k=null,N=0;N<x.length;N++)if(c(x[N],y)){k=x[N];break}k&&(M=k)}M?Object(s.clearCurrentCues)(M):(M=_.createTextTrack("subtitles",y.name,y.lang),M&&(M.mode="disabled")),M&&(M.groupId=y.groupId,_.textTracks.push(M))})}else if(!O&&this.tracks&&this.tracks.length){var b=this.tracks.map(function(y){return{label:y.name,kind:y.type.toLowerCase(),default:y.default,subtitleTrack:y}});this.hls.trigger(u.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:b})}}},n.onManifestLoaded=function(t,S){var _=this;this.config.enableCEA708Captions&&S.captions&&S.captions.forEach(function(i){var P=/(?:CC|SERVICE)([1-4])/.exec(i.instreamId);if(!P)return;var O="textTrack"+P[1],x=_.captionsProperties[O];if(!x)return;x.label=i.name,i.lang&&(x.languageCode=i.lang),x.media=i})},n.onFragLoading=function(t,S){var _=this.cea608Parser1,i=this.cea608Parser2,P=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(_&&i))return;if(S.frag.type===a.PlaylistLevelType.MAIN){var x,b,y=S.frag.sn,T=(x=S==null||((b=S.part)===null||b===void 0)?void 0:b.index)!=null?x:-1;y===P+1||y===P&&T===O+1||(_.reset(),i.reset()),this.lastSn=y,this.lastPartIndex=T}},n.onFragLoaded=function(t,S){var _=S.frag,i=S.payload,P=this.initPTS,O=this.unparsedVttFrags;if(_.type===a.PlaylistLevelType.SUBTITLE)if(i.byteLength){if(!Object(D.isFiniteNumber)(P[_.cc])){O.push(S),P.length&&this.hls.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:_,error:new Error("Missing initial subtitle PTS")});return}var x=_.decryptdata;if(x==null||x.key==null||x.method!=="AES-128"){var b=this.tracks[_.level],y=this.vttCCs;y[_.cc]||(y[_.cc]={start:_.start,prevCC:this.prevCC,new:!0},this.prevCC=_.cc),b&&b.textCodec===l.IMSC1_CODEC?this._parseIMSC1(_,i):this._parseVTTs(_,i,y)}}else this.hls.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:_,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(t,S){var _=this,i=this.hls;Object(l.parseIMSC1)(S,this.initPTS[t.cc],this.timescale[t.cc],function(P){_._appendCues(P,t.level),i.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(P){d.logger.log("Failed to parse IMSC1: "+P),i.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:P})})},n._parseVTTs=function(t,S,_){var i=this,P=this.hls;Object(p.parseWebVTT)(S,this.initPTS[t.cc],this.timescale[t.cc],_,t.cc,t.start,function(O){i._appendCues(O,t.level),P.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(O){i._fallbackToIMSC1(t,S),d.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 _=this,i=this.tracks[t.level];i.textCodec||Object(l.parseIMSC1)(S,this.initPTS[t.cc],this.timescale[t.cc],function(){i.textCodec=l.IMSC1_CODEC,_._parseIMSC1(t,S)},function(){i.textCodec="wvtt"})},n._appendCues=function(t,S){var _=this.hls;if(this.config.renderTextTracksNatively){var i=this.textTracks[S];if(i.mode==="disabled")return;t.forEach(function(x){return Object(s.addCueToTrack)(i,x)})}else{var P=this.tracks[S],O=P.default?"default":"subtitles"+S;_.trigger(u.Events.CUES_PARSED,{type:"subtitles",cues:t,track:O})}},n.onFragDecrypted=function(t,S){var _=S.frag;if(_.type===a.PlaylistLevelType.SUBTITLE){if(!Object(D.isFiniteNumber)(this.initPTS[_.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 _=this.cea608Parser1,i=this.cea608Parser2;if(!this.enabled||!(_&&i))return;for(var P=0;P<S.samples.length;P++){var O=S.samples[P].bytes;if(O){var x=this.extractCea608Data(O);_.addData(S.samples[P].pts,x[0]),i.addData(S.samples[P].pts,x[1])}}},n.onBufferFlushing=function(t,S){var _=S.startOffset,i=S.endOffset,P=S.endOffsetSubtitles,O=S.type,x=this.media;if(!x||x.currentTime<i)return;if(!O||O==="video"){var b=this.captionsTracks;Object.keys(b).forEach(function(T){return Object(s.removeCuesInRange)(b[T],_,i)})}if(this.config.renderTextTracksNatively&&(_===0&&P!==void 0)){var y=this.textTracks;Object.keys(y).forEach(function(T){return Object(s.removeCuesInRange)(y[T],_,P)})}},n.extractCea608Data=function(t){for(var S=t[0]&31,_=2,i=[[],[]],P=0;P<S;P++){var O=t[_++],x=127&t[_++],b=127&t[_++],y=(4&O)!==0,T=3&O;if(x===0&&b===0)continue;y&&((T===0||T===1)&&(i[T].push(x),i[T].push(b)))}return i},E}();function c(E,n){return E&&E.label===n.name&&!(E.textTrack1||E.textTrack2)}function v(E,n,o,t){return Math.min(n,t)-Math.max(E,o)}function g(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return D});var D=function(){function u(w,p){this.subtle=void 0,this.aesIV=void 0,this.subtle=w,this.aesIV=p}var m=u.prototype;return m.decrypt=function(p,s){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},s,p)},u}()},"./src/crypt/aes-decryptor.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"removePadding",function(){return u}),C.d(f,"default",function(){return m});var D=C("./src/utils/typed-array.ts");function u(w){var p=w.byteLength,s=p&&new DataView(w.buffer).getUint8(p-1);return s?Object(D.sliceUint8)(w,0,p-s):w}var m=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 p=w.prototype;return p.uint8ArrayToUint32Array_=function(l){for(var a=new DataView(l),d=new Uint32Array(4),h=0;h<4;h++)d[h]=a.getUint32(h*4);return d},p.initTable=function(){var l=this.sBox,a=this.invSBox,d=this.subMix,h=d[0],c=d[1],v=d[2],g=d[3],E=this.invSubMix,n=E[0],o=E[1],t=E[2],S=E[3],_=new Uint32Array(256),i=0,P=0,O=0;for(O=0;O<256;O++)O<128?_[O]=O<<1:_[O]=O<<1^283;for(O=0;O<256;O++){var x=P^P<<1^P<<2^P<<3^P<<4;x=x>>>8^x&255^99,l[i]=x,a[x]=i;var b=_[i],y=_[b],T=_[y],M=_[x]*257^x*16843008;h[i]=M<<24|M>>>8,c[i]=M<<16|M>>>16,v[i]=M<<8|M>>>24,g[i]=M,M=T*16843009^y*65537^b*257^i*16843008,n[x]=M<<24|M>>>8,o[x]=M<<16|M>>>16,t[x]=M<<8|M>>>24,S[x]=M,i?(i=b^_[_[_[T^b]]],P^=_[_[P]]):i=P=1}},p.expandKey=function(l){for(var a=this.uint8ArrayToUint32Array_(l),d=!0,h=0;h<a.length&&d;)d=a[h]===this.key[h],h++;if(d)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 v=this.ksRows=(c+6+1)*4,g,E,n=this.keySchedule=new Uint32Array(v),o=this.invKeySchedule=new Uint32Array(v),t=this.sBox,S=this.rcon,_=this.invSubMix,i=_[0],P=_[1],O=_[2],x=_[3],b,y;for(g=0;g<v;g++){if(g<c){b=n[g]=a[g];continue}y=b,g%c===0?(y=y<<8|y>>>24,y=t[y>>>24]<<24|t[y>>>16&255]<<16|t[y>>>8&255]<<8|t[y&255],y^=S[g/c|0]<<24):c>6&&g%c===4&&(y=t[y>>>24]<<24|t[y>>>16&255]<<16|t[y>>>8&255]<<8|t[y&255]),n[g]=b=(n[g-c]^y)>>>0}for(E=0;E<v;E++)g=v-E,E&3?y=n[g]:y=n[g-4],E<4||g<=4?o[E]=y:o[E]=i[t[y>>>24]]^P[t[y>>>16&255]]^O[t[y>>>8&255]]^x[t[y&255]],o[E]=o[E]>>>0},p.networkToHostOrderSwap=function(l){return l<<24|(l&65280)<<8|(l&16711680)>>8|l>>>24},p.decrypt=function(l,a,d){for(var h=this.keySize+6,c=this.invKeySchedule,v=this.invSBox,g=this.invSubMix,E=g[0],n=g[1],o=g[2],t=g[3],S=this.uint8ArrayToUint32Array_(d),_=S[0],i=S[1],P=S[2],O=S[3],x=new Int32Array(l),b=new Int32Array(x.length),y,T,M,k,N,K,z,B,H,U,W,G,ee,ie,ce=this.networkToHostOrderSwap;a<x.length;){for(H=ce(x[a]),U=ce(x[a+1]),W=ce(x[a+2]),G=ce(x[a+3]),N=H^c[0],K=G^c[1],z=W^c[2],B=U^c[3],ee=4,ie=1;ie<h;ie++)y=E[N>>>24]^n[K>>16&255]^o[z>>8&255]^t[B&255]^c[ee],T=E[K>>>24]^n[z>>16&255]^o[B>>8&255]^t[N&255]^c[ee+1],M=E[z>>>24]^n[B>>16&255]^o[N>>8&255]^t[K&255]^c[ee+2],k=E[B>>>24]^n[N>>16&255]^o[K>>8&255]^t[z&255]^c[ee+3],N=y,K=T,z=M,B=k,ee=ee+4;y=v[N>>>24]<<24^v[K>>16&255]<<16^v[z>>8&255]<<8^v[B&255]^c[ee],T=v[K>>>24]<<24^v[z>>16&255]<<16^v[B>>8&255]<<8^v[N&255]^c[ee+1],M=v[z>>>24]<<24^v[B>>16&255]<<16^v[N>>8&255]<<8^v[K&255]^c[ee+2],k=v[B>>>24]<<24^v[N>>16&255]<<16^v[K>>8&255]<<8^v[z&255]^c[ee+3],b[a]=ce(y^_),b[a+1]=ce(k^i),b[a+2]=ce(M^P),b[a+3]=ce(T^O),_=H,i=U,P=W,O=G,a=a+4}return b.buffer},w}()},"./src/crypt/decrypter.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return a});var D=C("./src/crypt/aes-crypto.ts"),u=C("./src/crypt/fast-aes-key.ts"),m=C("./src/crypt/aes-decryptor.ts"),w=C("./src/utils/logger.ts"),p=C("./src/utils/mp4-tools.ts"),s=C("./src/utils/typed-array.ts"),l=16,a=function(){function d(c,v,g){var E=g===void 0?{}:g,n=E.removePKCS7Padding,o=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=v,this.removePKCS7Padding=o,o)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(S){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var h=d.prototype;return h.destroy=function(){this.observer=null},h.isSync=function(){return this.config.enableSoftwareAES},h.flush=function(){var v=this.currentResult;if(!v){this.reset();return}var g=new Uint8Array(v);return this.reset(),this.removePKCS7Padding?Object(m.removePadding)(g):g},h.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},h.decrypt=function(v,g,E,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(v),g,E);var o=this.flush();o&&n(o.buffer)}else this.webCryptoDecrypt(new Uint8Array(v),g,E).then(n)},h.softwareDecrypt=function(v,g,E){var n=this.currentIV,o=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(v=Object(p.appendUint8Array)(t,v),this.remainderData=null);var S=this.getValidChunk(v);if(!S.length)return null;n&&(E=n);var _=this.softwareDecrypter;_||(_=this.softwareDecrypter=new m.default),_.expandKey(g);var i=o;return this.currentResult=_.decrypt(S.buffer,0,E),this.currentIV=Object(s.sliceUint8)(S,-16).buffer,i||null},h.webCryptoDecrypt=function(v,g,E){var n=this,o=this.subtle;return(this.key!==g||!this.fastAesKey)&&(this.key=g,this.fastAesKey=new u.default(o,g)),this.fastAesKey.expandKey().then(function(t){if(!o)return Promise.reject(new Error("web crypto not initialized"));var S=new D.default(o,E);return S.decrypt(v.buffer,t)}).catch(function(t){return n.onWebCryptoError(t,v,g,E)})},h.onWebCryptoError=function(v,g,E,n){return w.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",v),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(g,E,n)},h.getValidChunk=function(v){var g=v,E=v.length-v.length%l;return E!==v.length&&(g=Object(s.sliceUint8)(v,0,E),this.remainderData=Object(s.sliceUint8)(v,E)),g},h.logOnce=function(v){if(!this.logEnabled)return;w.logger.log("[decrypter.ts]: "+v),this.logEnabled=!1},d}()},"./src/crypt/fast-aes-key.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return D});var D=function(){function u(w,p){this.subtle=void 0,this.key=void 0,this.subtle=w,this.key=p}var m=u.prototype;return m.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},u}()},"./src/demux/aacdemuxer.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/demux/base-audio-demuxer.ts"),u=C("./src/demux/adts.ts"),m=C("./src/utils/logger.ts"),w=C("./src/demux/id3.ts");function p(a,d){a.prototype=Object.create(d.prototype),a.prototype.constructor=a,s(a,d)}function s(a,d){return s=Object.setPrototypeOf||function(c,v){return c.__proto__=v,c},s(a,d)}var l=function(a){p(d,a);function d(c,v){var g;return g=a.call(this)||this,g.observer=void 0,g.config=void 0,g.observer=c,g.config=v,g}var h=d.prototype;return h.resetInitSegment=function(v,g,E){a.prototype.resetInitSegment.call(this,v,g,E),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:v,duration:E,inputTimeScale:9e4,dropped:0}},d.probe=function(v){if(!v)return!1;for(var g=w.getID3Data(v,0)||[],E=g.length,n=v.length;E<n;E++)if(u.probe(v,E))return m.logger.log("ADTS sync word found !"),!0;return!1},h.canParse=function(v,g){return u.canParse(v,g)},h.appendFrame=function(v,g,E){u.initTrackConfig(v,this.observer,g,E,v.manifestCodec);var n=u.appendFrame(v,g,E,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},d}(D.default);l.minProbeByteLength=9,f.default=l},"./src/demux/adts.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"getAudioConfig",function(){return w}),C.d(f,"isHeaderPattern",function(){return p}),C.d(f,"getHeaderLength",function(){return s}),C.d(f,"getFullFrameLength",function(){return l}),C.d(f,"canGetFrameLength",function(){return a}),C.d(f,"isHeader",function(){return d}),C.d(f,"canParse",function(){return h}),C.d(f,"probe",function(){return c}),C.d(f,"initTrackConfig",function(){return v}),C.d(f,"getFrameDuration",function(){return g}),C.d(f,"parseFrameHeader",function(){return E}),C.d(f,"appendFrame",function(){return n});var D=C("./src/utils/logger.ts"),u=C("./src/errors.ts"),m=C("./src/events.ts");function w(o,t,S,_){var i,P,O,x,b=navigator.userAgent.toLowerCase(),y=_,T=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];i=((t[S+2]&192)>>>6)+1;var M=(t[S+2]&60)>>>2;if(M>T.length-1){o.trigger(m.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:"+_+", ADTS type:"+i+", samplingIndex:"+M),/firefox/i.test(b)?M>=6?(i=5,x=new Array(4),P=M-3):(i=2,x=new Array(2),P=M):b.indexOf("android")!==-1?(i=2,x=new Array(2),P=M):(i=5,x=new Array(4),_&&(_.indexOf("mp4a.40.29")!==-1||_.indexOf("mp4a.40.5")!==-1)||!_&&M>=6?P=M-3:((_&&_.indexOf("mp4a.40.2")!==-1&&(M>=6&&O===1||/vivaldi/i.test(b))||!_&&O===1)&&(i=2,x=new Array(2)),P=M)),x[0]=i<<3,x[0]|=(M&14)>>1,x[1]|=(M&1)<<7,x[1]|=O<<3,i===5&&(x[1]|=(P&14)>>1,x[2]=(P&1)<<7,x[2]|=2<<2,x[3]=0),{config:x,samplerate:T[M],channelCount:O,codec:"mp4a.40."+i,manifestCodec:y}}function p(o,t){return o[t]===255&&(o[t+1]&246)===240}function s(o,t){return o[t+1]&1?7:9}function l(o,t){return(o[t+3]&3)<<11|o[t+4]<<3|(o[t+5]&224)>>>5}function a(o,t){return t+5<o.length}function d(o,t){return t+1<o.length&&p(o,t)}function h(o,t){return a(o,t)&&p(o,t)&&l(o,t)<=o.length-t}function c(o,t){if(d(o,t)){var S=s(o,t);if(t+S>=o.length)return!1;var _=l(o,t);if(_<=S)return!1;var i=t+_;return i===o.length||d(o,i)}return!1}function v(o,t,S,_,i){if(!o.samplerate){var P=w(t,S,_,i);if(!P)return;o.config=P.config,o.samplerate=P.samplerate,o.channelCount=P.channelCount,o.codec=P.codec,o.manifestCodec=P.manifestCodec,D.logger.log("parsed codec:"+o.codec+", rate:"+P.samplerate+", channels:"+P.channelCount)}}function g(o){return 1024*9e4/o}function E(o,t,S,_,i){var P=s(o,t),O=l(o,t);if(O-=P,O>0){var x=S+_*i;return{headerLength:P,frameLength:O,stamp:x}}}function n(o,t,S,_,i){var P=g(o.samplerate),O=E(t,S,_,i,P);if(O){var x=O.frameLength,b=O.headerLength,y=O.stamp,T=b+x,M=Math.max(0,S+T-t.length),k;M?(k=new Uint8Array(T-b),k.set(t.subarray(S+b,t.length),0)):k=t.subarray(S+b,S+T);var N={unit:k,pts:y};return M||o.samples.push(N),{sample:N,length:T,missing:M}}}},"./src/demux/base-audio-demuxer.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"initPTSFn",function(){return l});var D=C("./src/polyfills/number.ts"),u=C("./src/demux/id3.ts"),m=C("./src/demux/dummy-demuxed-track.ts"),w=C("./src/utils/mp4-tools.ts"),p=C("./src/utils/typed-array.ts"),s=function(){function a(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var d=a.prototype;return d.resetInitSegment=function(c,v,g){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},d.resetTimeStamp=function(){},d.resetContiguity=function(){},d.canParse=function(c,v){return!1},d.appendFrame=function(c,v,g){},d.demux=function(c,v){this.cachedData&&(c=Object(w.appendUint8Array)(this.cachedData,c),this.cachedData=null);var g=u.getID3Data(c,0),E=g?g.length:0,n,o,t=this._audioTrack,S=this._id3Track,_=g?u.getTimeStamp(g):void 0,i=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=l(_,v)),g&&g.length>0&&S.samples.push({pts:this.initPTS,dts:this.initPTS,data:g}),o=this.initPTS;E<i;){if(this.canParse(c,E)){var P=this.appendFrame(t,c,E);P?(this.frameIndex++,o=P.sample.pts,E+=P.length,n=E):E=i}else u.canParse(c,E)?(g=u.getID3Data(c,E),S.samples.push({pts:o,dts:o,data:g}),E+=g.length,n=E):E++;if(E===i&&n!==i){var O=Object(p.sliceUint8)(c,n);this.cachedData?this.cachedData=Object(w.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:t,avcTrack:Object(m.dummyTrack)(),id3Track:S,textTrack:Object(m.dummyTrack)()}},d.demuxSampleAes=function(c,v,g){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},d.flush=function(c){var v=this.cachedData;return v&&(this.cachedData=null,this.demux(v,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(m.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(m.dummyTrack)()}},d.destroy=function(){},a}(),l=function(d,h){return Object(D.isFiniteNumber)(d)?d*90:h*9e4};f.default=s},"./src/demux/chunk-cache.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return D});var D=function(){function m(){this.chunks=[],this.dataLength=0}var w=m.prototype;return w.push=function(s){this.chunks.push(s),this.dataLength+=s.length},w.flush=function(){var s=this.chunks,l=this.dataLength,a;if(s.length)s.length===1?a=s[0]:a=u(s,l);else return new Uint8Array(0);return this.reset(),a},w.reset=function(){this.chunks.length=0,this.dataLength=0},m}();function u(m,w){for(var p=new Uint8Array(w),s=0,l=0;l<m.length;l++){var a=m[l];p.set(a,s),s+=a.length}return p}},"./src/demux/dummy-demuxed-track.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"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,f,C){"use strict";C.r(f);var D=C("./src/utils/logger.ts"),u=function(){function m(p){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=p,this.bytesAvailable=p.byteLength,this.word=0,this.bitsAvailable=0}var w=m.prototype;return w.loadWord=function(){var s=this.data,l=this.bytesAvailable,a=s.byteLength-l,d=new Uint8Array(4),h=Math.min(4,l);if(h===0)throw new Error("no bytes available");d.set(s.subarray(a,a+h)),this.word=new DataView(d.buffer).getUint32(0),this.bitsAvailable=h*8,this.bytesAvailable-=h},w.skipBits=function(s){var l;this.bitsAvailable>s?(this.word<<=s,this.bitsAvailable-=s):(s-=this.bitsAvailable,l=s>>3,s-=l>>3,this.bytesAvailable-=l,this.loadWord(),this.word<<=s,this.bitsAvailable-=s)},w.readBits=function(s){var l=Math.min(this.bitsAvailable,s),a=this.word>>>32-l;return s>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=s-l,l>0&&this.bitsAvailable?a<<l|this.readBits(l):a},w.skipLZ=function(){var s;for(s=0;s<this.bitsAvailable;++s)if((this.word&2147483648>>>s)!==0)return this.word<<=s,this.bitsAvailable-=s,s;return this.loadWord(),s+this.skipLZ()},w.skipUEG=function(){this.skipBits(1+this.skipLZ())},w.skipEG=function(){this.skipBits(1+this.skipLZ())},w.readUEG=function(){var s=this.skipLZ();return this.readBits(s+1)-1},w.readEG=function(){var s=this.readUEG();return 1&s?1+s>>>1:-1*(s>>>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(s){for(var l=8,a=8,d,h=0;h<s;h++)a!==0&&(d=this.readEG(),a=(l+d+256)%256),l=a===0?l:a},w.readSPS=function(){var s=0,l=0,a=0,d=0,h,c,v,g=this.readUByte.bind(this),E=this.readBits.bind(this),n=this.readUEG.bind(this),o=this.readBoolean.bind(this),t=this.skipBits.bind(this),S=this.skipEG.bind(this),_=this.skipUEG.bind(this),i=this.skipScalingList.bind(this);g();var P=g();if(E(5),t(3),g(),_(),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),_(),_(),t(1),o())for(c=O!==3?8:12,v=0;v<c;v++)o()&&(v<6?i(16):i(64))}_();var x=n();if(x===0)n();else if(x===1)for(t(1),S(),S(),h=n(),v=0;v<h;v++)S();_(),t(1);var b=n(),y=n(),T=E(1);T===0&&t(1),t(1),o()&&(s=n(),l=n(),a=n(),d=n());var M=[1,1];if(o()&&o()){var k=g();switch(k){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=[g()<<8|g(),g()<<8|g()];break}}}return{width:Math.ceil((b+1)*16-s*2-l*2),height:(2-T)*(y+1)*16-(T?2:4)*(a+d),pixelRatio:M}},w.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},m}();f.default=u},"./src/demux/id3.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"isHeader",function(){return D}),C.d(f,"isFooter",function(){return u}),C.d(f,"getID3Data",function(){return m}),C.d(f,"canParse",function(){return p}),C.d(f,"getTimeStamp",function(){return s}),C.d(f,"isTimeStampFrame",function(){return l}),C.d(f,"getID3Frames",function(){return d}),C.d(f,"decodeFrame",function(){return h}),C.d(f,"utf8ArrayToStr",function(){return n}),C.d(f,"testables",function(){return o});var D=function(i,P){return P+10<=i.length&&(i[P]===73&&i[P+1]===68&&i[P+2]===51&&(i[P+3]<255&&i[P+4]<255&&(i[P+6]<128&&i[P+7]<128&&i[P+8]<128&&i[P+9]<128)))},u=function(i,P){return P+10<=i.length&&(i[P]===51&&i[P+1]===68&&i[P+2]===73&&(i[P+3]<255&&i[P+4]<255&&(i[P+6]<128&&i[P+7]<128&&i[P+8]<128&&i[P+9]<128)))},m=function(i,P){for(var O=P,x=0;D(i,P);){x+=10;var b=w(i,P+6);x+=b,u(i,P+10)&&(x+=10),P+=x}return x>0?i.subarray(O,O+x):void 0},w=function(i,P){var O=0;return O=(i[P]&127)<<21,O|=(i[P+1]&127)<<14,O|=(i[P+2]&127)<<7,O|=i[P+3]&127,O},p=function(i,P){return D(i,P)&&w(i,P+6)+10<=i.length-P},s=function(i){for(var P=d(i),O=0;O<P.length;O++){var x=P[O];if(l(x))return E(x)}return},l=function(i){return i&&i.key==="PRIV"&&i.info==="com.apple.streaming.transportStreamTimestamp"},a=function(i){var P=String.fromCharCode(i[0],i[1],i[2],i[3]),O=w(i,4),x=10;return{type:P,size:O,data:i.subarray(x,x+O)}},d=function(i){for(var P=0,O=[];D(i,P);){var x=w(i,P+6);P+=10;for(var b=P+x;P+8<b;){var y=a(i.subarray(P)),T=h(y);T&&O.push(T),P+=y.size+10}u(i,P)&&(P+=10)}return O},h=function(i){return i.type==="PRIV"?c(i):i.type[0]==="W"?g(i):v(i)},c=function(i){if(i.size<2)return;var P=n(i.data,!0),O=new Uint8Array(i.data.subarray(P.length+1));return{key:i.type,info:P,data:O.buffer}},v=function(i){if(i.size<2)return;if(i.type==="TXXX"){var P=1,O=n(i.data.subarray(P),!0);P+=O.length+1;var x=n(i.data.subarray(P));return{key:i.type,info:O,data:x}}var b=n(i.data.subarray(1));return{key:i.type,data:b}},g=function(i){if(i.type==="WXXX"){if(i.size<2)return;var P=1,O=n(i.data.subarray(P),!0);P+=O.length+1;var x=n(i.data.subarray(P));return{key:i.type,info:O,data:x}}var b=n(i.data);return{key:i.type,data:b}},E=function(i){if(i.data.byteLength===8){var P=new Uint8Array(i.data),O=P[3]&1,x=(P[4]<<23)+(P[5]<<15)+(P[6]<<7)+P[7];return x/=45,O&&(x+=4772185884e-2),Math.round(x)}return},n=function(i,P){P===void 0&&(P=!1);var O=S();if(O){var x=O.decode(i);if(P){var b=x.indexOf("\0");return b!==-1?x.substring(0,b):x}return x.replace(/\0/g,"")}for(var y=i.length,T,M,k,N="",K=0;K<y;){if(T=i[K++],T===0&&P)return N;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:N+=String.fromCharCode(T);break;case 12:case 13:M=i[K++],N+=String.fromCharCode((T&31)<<6|M&63);break;case 14:M=i[K++],k=i[K++],N+=String.fromCharCode((T&15)<<12|(M&63)<<6|(k&63)<<0);break;default:}}return N},o={decodeTextFrame:v},t;function S(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/demux/base-audio-demuxer.ts"),u=C("./src/demux/id3.ts"),m=C("./src/utils/logger.ts"),w=C("./src/demux/mpegaudio.ts");function p(a,d){a.prototype=Object.create(d.prototype),a.prototype.constructor=a,s(a,d)}function s(a,d){return s=Object.setPrototypeOf||function(c,v){return c.__proto__=v,c},s(a,d)}var l=function(a){p(d,a);function d(){return a.apply(this,arguments)||this}var h=d.prototype;return h.resetInitSegment=function(v,g,E){a.prototype.resetInitSegment.call(this,v,g,E),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:v,duration:E,inputTimeScale:9e4,dropped:0}},d.probe=function(v){if(!v)return!1;for(var g=u.getID3Data(v,0)||[],E=g.length,n=v.length;E<n;E++)if(w.probe(v,E))return m.logger.log("MPEG Audio sync word found !"),!0;return!1},h.canParse=function(v,g){return w.canParse(v,g)},h.appendFrame=function(v,g,E){return this.initPTS===null?void 0:w.appendFrame(v,g,E,this.initPTS,this.frameIndex)},d}(D.default);l.minProbeByteLength=4,f.default=l},"./src/demux/mp4demuxer.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/utils/mp4-tools.ts"),u=C("./src/demux/dummy-demuxed-track.ts"),m=function(){function w(s,l){this.remainderData=null,this.config=void 0,this.config=l}var p=w.prototype;return p.resetTimeStamp=function(){},p.resetInitSegment=function(){},p.resetContiguity=function(){},w.probe=function(l){return Object(D.findBox)({data:l,start:0,end:Math.min(l.length,16384)},["moof"]).length>0},p.demux=function(l){var a=l,d=Object(u.dummyTrack)();if(this.config.progressive){this.remainderData&&(a=Object(D.appendUint8Array)(this.remainderData,l));var h=Object(D.segmentValidRange)(a);this.remainderData=h.remainder,d.samples=h.valid||new Uint8Array}else d.samples=a;return{audioTrack:Object(u.dummyTrack)(),avcTrack:d,id3Track:Object(u.dummyTrack)(),textTrack:Object(u.dummyTrack)()}},p.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)()}},p.demuxSampleAes=function(l,a,d){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},p.destroy=function(){},w}();m.minProbeByteLength=1024,f.default=m},"./src/demux/mpegaudio.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"appendFrame",function(){return s}),C.d(f,"parseHeader",function(){return l}),C.d(f,"isHeaderPattern",function(){return a}),C.d(f,"isHeader",function(){return d}),C.d(f,"canParse",function(){return h}),C.d(f,"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],m=[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]],p=[0,1,1,4];function s(v,g,E,n,o){if(E+24>g.length)return;var t=l(g,E);if(t&&E+t.frameLength<=g.length){var S=t.samplesPerFrame*9e4/t.sampleRate,_=n+o*S,i={unit:g.subarray(E,E+t.frameLength),pts:_,dts:_};return v.config=[],v.channelCount=t.channelCount,v.samplerate=t.sampleRate,v.samples.push(i),{sample:i,length:t.frameLength,missing:0}}}function l(v,g){var E=v[g+1]>>3&3,n=v[g+1]>>1&3,o=v[g+2]>>4&15,t=v[g+2]>>2&3;if(E!==1&&o!==0&&o!==15&&t!==3){var S=v[g+2]>>1&1,_=v[g+3]>>6,i=E===3?3-n:n===3?3:4,P=u[i*14+o-1]*1e3,O=E===3?0:E===2?1:2,x=m[O*3+t],b=_===3?1:2,y=w[E][n],T=p[n],M=y*8*T,k=Math.floor(y*P/x+S)*T;if(D===null){var N=navigator.userAgent||"",K=N.match(/Chrome\/(\d+)/i);D=K?parseInt(K[1]):0}var z=!!D&&D<=87;return z&&n===2&&P>=224e3&&_===0&&(v[g+3]=v[g+3]|128),{sampleRate:x,channelCount:b,frameLength:k,samplesPerFrame:M}}}function a(v,g){return v[g]===255&&(v[g+1]&224)===224&&(v[g+1]&6)!==0}function d(v,g){return g+1<v.length&&a(v,g)}function h(v,g){var E=4;return a(v,g)&&E<=v.length-g}function c(v,g){if(g+1<v.length&&a(v,g)){var E=4,n=l(v,g),o=E;n!=null&&n.frameLength&&(o=n.frameLength);var t=g+o;return t===v.length||d(v,t)}return!1}},"./src/demux/sample-aes.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/crypt/decrypter.ts"),u=C("./src/demux/tsdemuxer.ts"),m=function(){function w(s,l,a){this.keyData=void 0,this.decrypter=void 0,this.keyData=a,this.decrypter=new D.default(s,l,{removePKCS7Padding:!1})}var p=w.prototype;return p.decryptBuffer=function(l,a){this.decrypter.decrypt(l,this.keyData.key.buffer,this.keyData.iv.buffer,a)},p.decryptAacSample=function(l,a,d,h){var c=l[a].unit,v=c.subarray(16,c.length-c.length%16),g=v.buffer.slice(v.byteOffset,v.byteOffset+v.length),E=this;this.decryptBuffer(g,function(n){var o=new Uint8Array(n);c.set(o,16),h||E.decryptAacSamples(l,a+1,d)})},p.decryptAacSamples=function(l,a,d){for(;;a++){if(a>=l.length){d();return}if(l[a].unit.length<32)continue;var h=this.decrypter.isSync();if(this.decryptAacSample(l,a,d,h),!h)return}},p.getAvcEncryptedData=function(l){for(var a=Math.floor((l.length-48)/160)*16+16,d=new Int8Array(a),h=0,c=32;c<=l.length-16;c+=160,h+=16)d.set(l.subarray(c,c+16),h);return d},p.getAvcDecryptedUnit=function(l,a){for(var d=new Uint8Array(a),h=0,c=32;c<=l.length-16;c+=160,h+=16)l.set(d.subarray(h,h+16),c);return l},p.decryptAvcSample=function(l,a,d,h,c,v){var g=Object(u.discardEPB)(c.data),E=this.getAvcEncryptedData(g),n=this;this.decryptBuffer(E.buffer,function(o){c.data=n.getAvcDecryptedUnit(g,o),v||n.decryptAvcSamples(l,a,d+1,h)})},p.decryptAvcSamples=function(l,a,d,h){if(l instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;a++,d=0){if(a>=l.length){h();return}for(var c=l[a].units;!(d>=c.length);d++){var v=c[d];if(v.data.length<=48||v.type!==1&&v.type!==5)continue;var g=this.decrypter.isSync();if(this.decryptAvcSample(l,a,d,h,v,g),!g)return}}},w}();f.default=m},"./src/demux/transmuxer-interface.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return c});var D=C("./node_modules/webworkify-webpack/index.js"),u=C.n(D),m=C("./src/events.ts"),w=C("./src/demux/transmuxer.ts"),p=C("./src/utils/logger.ts"),s=C("./src/errors.ts"),l=C("./src/utils/mediasource-helper.ts"),a=C("./node_modules/eventemitter3/index.js"),d=C.n(a),h=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function v(E,n,o,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=E,this.id=n,this.onTransmuxComplete=o,this.onFlush=t;var _=E.config,i=function(y,T){T=T||{},T.frag=S.frag,T.id=S.id,E.trigger(y,T)};this.observer=new a.EventEmitter,this.observer.on(m.Events.FRAG_DECRYPTED,i),this.observer.on(m.Events.ERROR,i);var P={mp4:h.isTypeSupported("video/mp4"),mpeg:h.isTypeSupported("audio/mpeg"),mp3:h.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(_.enableWorker&&typeof Worker!="undefined"){p.logger.log("demuxing in webworker");var x;try{x=this.worker=D("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),x.addEventListener("message",this.onwmsg),x.onerror=function(b){E.trigger(m.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(b.message+" ("+b.filename+":"+b.lineno+")")})},x.postMessage({cmd:"init",typeSupported:P,vendor:O,id:n,config:JSON.stringify(_)})}catch(b){p.logger.warn("Error in worker:",b),p.logger.error("Error while initializing DemuxerWorker, fallback to inline"),x&&self.URL.revokeObjectURL(x.objectURL),this.transmuxer=new w.default(this.observer,P,_,O,n),this.worker=null}}else this.transmuxer=new w.default(this.observer,P,_,O,n)}var g=v.prototype;return g.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var o=this.transmuxer;o&&(o.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},g.push=function(n,o,t,S,_,i,P,O,x,b){var y=this;x.transmuxing.start=self.performance.now();var T=this.transmuxer,M=this.worker,k=i?i.start:_.start,N=_.decryptdata,K=this.frag,z=!(K&&_.cc===K.cc),B=!(K&&x.level===K.level),H=K?x.sn-K.sn:-1,U=this.part?x.part-this.part.index:1,W=!B&&(H===1||H===0&&U===1),G=self.performance.now();(B||H||_.stats.parsing.start===0)&&(_.stats.parsing.start=G),i&&(U||!W)&&(i.stats.parsing.start=G);var ee=new w.TransmuxState(z,W,O,B,k);if(!W||z){p.logger.log("[transmuxer-interface, "+_.type+"]: Starting new transmux session for sn: "+x.sn+" p: "+x.part+" level: "+x.level+" id: "+x.id+`
|
|
|
discontinuity: `+z+`
|
|
|
trackSwitch: `+B+`
|
|
|
contiguous: `+W+`
|
|
|
accurateTimeOffset: `+O+`
|
|
|
timeOffset: `+k);var ie=new w.TransmuxConfig(t,S,o,P,b);this.configureTransmuxer(ie)}if(this.frag=_,this.part=i,M)M.postMessage({cmd:"demux",data:n,decryptdata:N,chunkMeta:x,state:ee},n instanceof ArrayBuffer?[n]:[]);else if(T){var ce=T.push(n,N,x,ee);Object(w.isPromise)(ce)?ce.then(function(_e){y.handleTransmuxComplete(_e)}):this.handleTransmuxComplete(ce)}},g.flush=function(n){var o=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 _=t.flush(n);Object(w.isPromise)(_)?_.then(function(i){o.handleFlushResult(i,n)}):this.handleFlushResult(_,n)}},g.handleFlushResult=function(n,o){var t=this;n.forEach(function(S){t.handleTransmuxComplete(S)}),this.onFlush(o)},g.onWorkerMessage=function(n){var o=n.data,t=this.hls;switch(o.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(o.data);break}case"flush":{this.onFlush(o.data);break}default:{o.data=o.data||{},o.data.frag=this.frag,o.data.id=this.id,t.trigger(o.event,o.data);break}}},g.configureTransmuxer=function(n){var o=this.worker,t=this.transmuxer;o?o.postMessage({cmd:"configure",config:n}):t&&t.configure(n)},g.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},v}()},"./src/demux/transmuxer-worker.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return s});var D=C("./src/demux/transmuxer.ts"),u=C("./src/events.ts"),m=C("./src/utils/logger.ts"),w=C("./node_modules/eventemitter3/index.js"),p=C.n(w);function s(c){var v=new w.EventEmitter,g=function(n,o){c.postMessage({event:n,data:o})};v.on(u.Events.FRAG_DECRYPTED,g),v.on(u.Events.ERROR,g),c.addEventListener("message",function(E){var n=E.data;switch(n.cmd){case"init":{var o=JSON.parse(n.config);c.transmuxer=new D.default(v,n.typeSupported,o,n.vendor,n.id),Object(m.enableLogs)(o.debug),g("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(i){l(c,i)}):l(c,t);break}case"flush":{var S=n.chunkMeta,_=c.transmuxer.flush(S);Object(D.isPromise)(_)?_.then(function(i){d(c,i,S)}):d(c,_,S);break}default:break}})}function l(c,v){if(h(v.remuxResult))return;var g=[],E=v.remuxResult,n=E.audio,o=E.video;n&&a(g,n),o&&a(g,o),c.postMessage({event:"transmuxComplete",data:v},g)}function a(c,v){v.data1&&c.push(v.data1.buffer),v.data2&&c.push(v.data2.buffer)}function d(c,v,g){v.forEach(function(E){l(c,E)}),c.postMessage({event:"flush",data:g})}function h(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return o}),C.d(f,"isPromise",function(){return _}),C.d(f,"TransmuxConfig",function(){return i}),C.d(f,"TransmuxState",function(){return P});var D=C("./src/events.ts"),u=C("./src/errors.ts"),m=C("./src/crypt/decrypter.ts"),w=C("./src/demux/aacdemuxer.ts"),p=C("./src/demux/mp4demuxer.ts"),s=C("./src/demux/tsdemuxer.ts"),l=C("./src/demux/mp3demuxer.ts"),a=C("./src/remux/mp4-remuxer.ts"),d=C("./src/remux/passthrough-remuxer.ts"),h=C("./src/demux/chunk-cache.ts"),c=C("./src/utils/mp4-tools.ts"),v=C("./src/utils/logger.ts"),g;try{g=self.performance.now.bind(self.performance)}catch(O){v.logger.debug("Unable to use Performance API on this environment"),g=self.Date.now}var E=[{demux:s.default,remux:a.default},{demux:p.default,remux:d.default},{demux:w.default,remux:a.default},{demux:l.default,remux:a.default}],n=1024;E.forEach(function(O){var x=O.demux;n=Math.max(n,x.minProbeByteLength)});var o=function(){function O(b,y,T,M,k){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 h.default,this.observer=b,this.typeSupported=y,this.config=T,this.vendor=M,this.id=k}var x=O.prototype;return x.configure=function(y){this.transmuxConfig=y,this.decrypter&&this.decrypter.reset()},x.push=function(y,T,M,k){var N=this,K=M.transmuxing;K.executeStart=g();var z=new Uint8Array(y),B=this.cache,H=this.config,U=this.currentTransmuxState,W=this.transmuxConfig;k&&(this.currentTransmuxState=k);var G=t(z,T);if(G&&G.method==="AES-128"){var ee=this.getDecrypter();if(H.enableSoftwareAES){var ie=ee.softwareDecrypt(z,G.key.buffer,G.iv.buffer);if(!ie)return K.executeEnd=g(),S(M);z=new Uint8Array(ie)}else return this.decryptionPromise=ee.webCryptoDecrypt(z,G.key.buffer,G.iv.buffer).then(function(Y){var X=N.push(Y,null,M);return N.decryptionPromise=null,X}),this.decryptionPromise}var ce=k||U,_e=ce.contiguous,Ce=ce.discontinuity,le=ce.trackSwitch,ye=ce.accurateTimeOffset,fe=ce.timeOffset,ne=W.audioCodec,ae=W.videoCodec,q=W.defaultInitPts,se=W.duration,Q=W.initSegmentData;if((Ce||le)&&this.resetInitSegment(Q,ne,ae,se),Ce&&this.resetInitialTimestamp(q),_e||this.resetContiguity(),this.needsProbing(z,Ce,le)){if(B.dataLength){var Z=B.flush();z=Object(c.appendUint8Array)(Z,z)}this.configureTransmuxer(z,W)}var be=this.transmux(z,G,fe,ye,M),re=this.currentTransmuxState;return re.contiguous=!0,re.discontinuity=!1,re.trackSwitch=!1,K.executeEnd=g(),be},x.flush=function(y){var T=this,M=y.transmuxing;M.executeStart=g();var k=this.decrypter,N=this.cache,K=this.currentTransmuxState,z=this.decryptionPromise;if(z)return z.then(function(){return T.flush(y)});var B=[],H=K.timeOffset;if(k){var U=k.flush();U&&B.push(this.push(U,null,y))}var W=N.dataLength;N.reset();var G=this.demuxer,ee=this.remuxer;if(!G||!ee)return W>=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=g(),[S(y)];var ie=G.flush(H);return _(ie)?ie.then(function(ce){return T.flushRemux(B,ce,y),B}):(this.flushRemux(B,ie,y),B)},x.flushRemux=function(y,T,M){var k=T.audioTrack,N=T.avcTrack,K=T.id3Track,z=T.textTrack,B=this.currentTransmuxState,H=B.accurateTimeOffset,U=B.timeOffset;v.logger.log("[transmuxer.ts]: Flushed fragment "+M.sn+(M.part>-1?" p: "+M.part:"")+" of level "+M.level);var W=this.remuxer.remux(k,N,K,z,U,H,!0,this.id);y.push({remuxResult:W,chunkMeta:M}),M.transmuxing.executeEnd=g()},x.resetInitialTimestamp=function(y){var T=this.demuxer,M=this.remuxer;if(!T||!M)return;T.resetTimeStamp(y),M.resetTimeStamp(y)},x.resetContiguity=function(){var y=this.demuxer,T=this.remuxer;if(!y||!T)return;y.resetContiguity(),T.resetNextTimestamp()},x.resetInitSegment=function(y,T,M,k){var N=this.demuxer,K=this.remuxer;if(!N||!K)return;N.resetInitSegment(T,M,k),K.resetInitSegment(y,T,M)},x.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},x.transmux=function(y,T,M,k,N){var K;return T&&T.method==="SAMPLE-AES"?K=this.transmuxSampleAes(y,T,M,k,N):K=this.transmuxUnencrypted(y,M,k,N),K},x.transmuxUnencrypted=function(y,T,M,k){var N=this.demuxer.demux(y,T,!1,!this.config.progressive),K=N.audioTrack,z=N.avcTrack,B=N.id3Track,H=N.textTrack,U=this.remuxer.remux(K,z,B,H,T,M,!1,this.id);return{remuxResult:U,chunkMeta:k}},x.transmuxSampleAes=function(y,T,M,k,N){var K=this;return this.demuxer.demuxSampleAes(y,T,M).then(function(z){var B=K.remuxer.remux(z.audioTrack,z.avcTrack,z.id3Track,z.textTrack,M,k,!1,K.id);return{remuxResult:B,chunkMeta:N}})},x.configureTransmuxer=function(y,T){for(var M=this.config,k=this.observer,N=this.typeSupported,K=this.vendor,z=T.audioCodec,B=T.defaultInitPts,H=T.duration,U=T.initSegmentData,W=T.videoCodec,G,ee=0,ie=E.length;ee<ie;ee++)if(E[ee].demux.probe(y)){G=E[ee];break}G||(v.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),G={demux:p.default,remux:d.default});var ce=this.demuxer,_e=this.remuxer,Ce=G.remux,le=G.demux;(!_e||!(_e instanceof Ce))&&(this.remuxer=new Ce(k,M,N,K)),(!ce||!(ce instanceof le))&&(this.demuxer=new le(k,M,N),this.probe=le.probe),this.resetInitSegment(U,z,W,H),this.resetInitialTimestamp(B)},x.needsProbing=function(y,T,M){return!this.demuxer||!this.remuxer||T||M},x.getDecrypter=function(){var y=this.decrypter;return y||(y=this.decrypter=new m.default(this.observer,this.config)),y},O}();function t(O,x){var b=null;return O.byteLength>0&&x!=null&&x.key!=null&&x.iv!==null&&x.method!=null&&(b=x),b}var S=function(x){return{remuxResult:{},chunkMeta:x}};function _(O){return"then"in O&&O.then instanceof Function}var i=function(x,b,y,T,M){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=x,this.videoCodec=b,this.initSegmentData=y,this.duration=T,this.defaultInitPts=M},P=function(x,b,y,T,M){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=x,this.contiguous=b,this.accurateTimeOffset=y,this.trackSwitch=T,this.timeOffset=M}},"./src/demux/tsdemuxer.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"discardEPB",function(){return S});var D=C("./src/demux/adts.ts"),u=C("./src/demux/mpegaudio.ts"),m=C("./src/demux/exp-golomb.ts"),w=C("./src/demux/id3.ts"),p=C("./src/demux/sample-aes.ts"),s=C("./src/events.ts"),l=C("./src/utils/mp4-tools.ts"),a=C("./src/utils/logger.ts"),d=C("./src/errors.ts"),h={video:1,audio:2,id3:3,text:4},c=function(){function _(P,O,x){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=x}_.probe=function(O){var x=_.syncOffset(O);return x<0?!1:(x&&a.logger.warn("MPEG2-TS detected but first sync word found @ offset "+x+", junk ahead ?"),!0)},_.syncOffset=function(O){for(var x=Math.min(1e3,O.length-3*188),b=0;b<x;){if(O[b]===71&&O[b+188]===71&&O[b+2*188]===71)return b;b++}return-1},_.createTrack=function(O,x){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:h[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?x:void 0}};var i=_.prototype;return i.resetInitSegment=function(O,x,b){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=_.createTrack("video",b),this._audioTrack=_.createTrack("audio",b),this._id3Track=_.createTrack("id3",b),this._txtTrack=_.createTrack("text",b),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=x,this._duration=b},i.resetTimeStamp=function(){},i.resetContiguity=function(){var O=this._audioTrack,x=this._avcTrack,b=this._id3Track;O&&(O.pesData=null),x&&(x.pesData=null),b&&(b.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},i.demux=function(O,x,b,y){b===void 0&&(b=!1),y===void 0&&(y=!1),b||(this.sampleAes=null);var T,M=this._avcTrack,k=this._audioTrack,N=this._id3Track,K=M.pid,z=M.pesData,B=k.pid,H=N.pid,U=k.pesData,W=N.pesData,G=!1,ee=this.pmtParsed,ie=this._pmtId,ce=O.length;if(this.remainderData&&(O=Object(l.appendUint8Array)(this.remainderData,O),ce=O.length,this.remainderData=null),ce<188&&!y)return this.remainderData=O,{audioTrack:k,avcTrack:M,id3Track:N,textTrack:this._txtTrack};var _e=Math.max(0,_.syncOffset(O));ce-=(ce+_e)%188,ce<O.byteLength&&!y&&(this.remainderData=new Uint8Array(O.buffer,ce,O.buffer.byteLength-ce));for(var Ce=_e;Ce<ce;Ce+=188)if(O[Ce]===71){var le=!!(O[Ce+1]&64),ye=((O[Ce+1]&31)<<8)+O[Ce+2],fe=(O[Ce+3]&48)>>4,ne=void 0;if(fe>1){if(ne=Ce+5+O[Ce+4],ne===Ce+188)continue}else ne=Ce+4;switch(ye){case K:le&&(z&&(T=n(z))&&this.parseAVCPES(T,!1),z={data:[],size:0}),z&&(z.data.push(O.subarray(ne,Ce+188)),z.size+=Ce+188-ne);break;case B:le&&(U&&(T=n(U))&&(k.isAAC?this.parseAACPES(T):this.parseMPEGPES(T)),U={data:[],size:0}),U&&(U.data.push(O.subarray(ne,Ce+188)),U.size+=Ce+188-ne);break;case H:le&&(W&&(T=n(W))&&this.parseID3PES(T),W={data:[],size:0}),W&&(W.data.push(O.subarray(ne,Ce+188)),W.size+=Ce+188-ne);break;case 0:le&&(ne+=O[ne]+1),ie=this._pmtId=g(O,ne);break;case ie:{le&&(ne+=O[ne]+1);var ae=E(O,ne,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,b);K=ae.avc,K>0&&(M.pid=K),B=ae.audio,B>0&&(k.pid=B,k.isAAC=ae.isAAC),H=ae.id3,H>0&&(N.pid=H),G&&!ee&&(a.logger.log("reparse from beginning"),G=!1,Ce=_e-188),ee=this.pmtParsed=!0;break}case 17:case 8191:break;default:G=!0;break}}else this.observer.emit(s.Events.ERROR,s.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});M.pesData=z,k.pesData=U,N.pesData=W;var q={audioTrack:k,avcTrack:M,id3Track:N,textTrack:this._txtTrack};return y&&this.extractRemainingSamples(q),q},i.flush=function(){var O=this.remainderData;this.remainderData=null;var x;return O?x=this.demux(O,-1,!1,!0):x={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(x),this.sampleAes?this.decrypt(x,this.sampleAes):x},i.extractRemainingSamples=function(O){var x=O.audioTrack,b=O.avcTrack,y=O.id3Track,T=b.pesData,M=x.pesData,k=y.pesData,N;T&&(N=n(T))?(this.parseAVCPES(N,!0),b.pesData=null):b.pesData=T,M&&(N=n(M))?(x.isAAC?this.parseAACPES(N):this.parseMPEGPES(N),x.pesData=null):(M!=null&&M.size&&a.logger.log("last AAC PES packet truncated,might overlap between fragments"),x.pesData=M),k&&(N=n(k))?(this.parseID3PES(N),y.pesData=null):y.pesData=k},i.demuxSampleAes=function(O,x,b){var y=this.demux(O,b,!0,!this.config.progressive),T=this.sampleAes=new p.default(this.observer,this.config,x);return this.decrypt(y,T)},i.decrypt=function(O,x){return new Promise(function(b){var y=O.audioTrack,T=O.avcTrack;y.samples&&y.isAAC?x.decryptAacSamples(y.samples,0,function(){T.samples?x.decryptAvcSamples(T.samples,0,0,function(){b(O)}):b(O)}):T.samples&&x.decryptAvcSamples(T.samples,0,0,function(){b(O)})})},i.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},i.parseAVCPES=function(O,x){var b=this,y=this._avcTrack,T=this.parseAVCNALu(O.data),M=!1,k=this.avcSample,N,K=!1;O.data=null,k&&T.length&&!y.audFound&&(o(k,y),k=this.avcSample=v(!1,O.pts,O.dts,"")),T.forEach(function(z){switch(z.type){case 1:{N=!0,k||(k=b.avcSample=v(!0,O.pts,O.dts,"")),M&&(k.debug+="NDR "),k.frame=!0;var B=z.data;if(K&&B.length>4){var H=new m.default(B).readSliceType();(H===2||H===4||H===7||H===9)&&(k.key=!0)}break}case 5:N=!0,k||(k=b.avcSample=v(!0,O.pts,O.dts,"")),M&&(k.debug+="IDR "),k.key=!0,k.frame=!0;break;case 6:{N=!0,M&&k&&(k.debug+="SEI ");var U=new m.default(S(z.data));U.readUByte();for(var W=0,G=0,ee=!1,ie=0;!ee&&U.bytesAvailable>1;){W=0;do ie=U.readUByte(),W+=ie;while(ie===255);G=0;do ie=U.readUByte(),G+=ie;while(ie===255);if(W===4&&U.bytesAvailable!==0){ee=!0;var ce=U.readUByte();if(ce===181){var _e=U.readUShort();if(_e===49){var Ce=U.readUInt();if(Ce===1195456820){var le=U.readUByte();if(le===3){for(var ye=U.readUByte(),fe=U.readUByte(),ne=31&ye,ae=[ye,fe],q=0;q<ne;q++)ae.push(U.readUByte()),ae.push(U.readUByte()),ae.push(U.readUByte());t(b._txtTrack.samples,{type:3,pts:O.pts,bytes:ae})}}}}}else if(W===5&&U.bytesAvailable!==0){if(ee=!0,G>16){for(var se=[],Q=0;Q<16;Q++)se.push(U.readUByte().toString(16)),(Q===3||Q===5||Q===7||Q===9)&&se.push("-");for(var Z=G-16,be=new Uint8Array(Z),re=0;re<Z;re++)be[re]=U.readUByte();t(b._txtTrack.samples,{pts:O.pts,payloadType:W,uuid:se.join(""),userData:Object(w.utf8ArrayToStr)(be),userDataBytes:be})}}else if(G<U.bytesAvailable)for(var Y=0;Y<G;Y++)U.readUByte()}break}case 7:if(N=!0,K=!0,M&&k&&(k.debug+="SPS "),!y.sps){var X=new m.default(z.data),$=X.readSPS();y.width=$.width,y.height=$.height,y.pixelRatio=$.pixelRatio,y.sps=[z.data],y.duration=b._duration;for(var ve=z.data.subarray(1,4),de="avc1.",xe=0;xe<3;xe++){var Ke=ve[xe].toString(16);Ke.length<2&&(Ke="0"+Ke),de+=Ke}y.codec=de}break;case 8:N=!0,M&&k&&(k.debug+="PPS "),y.pps||(y.pps=[z.data]);break;case 9:N=!1,y.audFound=!0,k&&o(k,y),k=b.avcSample=v(!1,O.pts,O.dts,M?"AUD ":"");break;case 12:N=!1;break;default:N=!1,k&&(k.debug+="unknown NAL "+z.type+" ");break}if(k&&N){var Ve=k.units;Ve.push(z)}}),x&&k&&(o(k,y),this.avcSample=null)},i.getLastNalUnit=function(){var O,x=this.avcSample,b;if(!x||x.units.length===0){var y=this._avcTrack.samples;x=y[y.length-1]}if((O=x)!==null&&O!==void 0&&O.units){var T=x.units;b=T[T.length-1]}return b},i.parseAVCNALu=function(O){var x=O.byteLength,b=this._avcTrack,y=b.naluState||0,T=y,M=[],k=0,N,K,z,B=-1,H=0;for(y===-1&&(B=0,H=O[0]&31,y=0,k=1);k<x;){if(N=O[k++],!y){y=N?0:1;continue}if(y===1){y=N?0:2;continue}if(!N)y=3;else if(N===1){if(B>=0){var U={data:O.subarray(B,k-y-1),type:H};M.push(U)}else{var W=this.getLastNalUnit();if(W&&(T&&k<=4-T&&(W.state&&(W.data=W.data.subarray(0,W.data.byteLength-T))),K=k-y-1,K>0)){var G=new Uint8Array(W.data.byteLength+K);G.set(W.data,0),G.set(O.subarray(0,K),W.data.byteLength),W.data=G,W.state=0}}k<x?(z=O[k]&31,B=k,H=z,y=0):y=-1}else y=0}if(B>=0&&y>=0){var ee={data:O.subarray(B,x),type:H,state:y};M.push(ee)}if(M.length===0){var ie=this.getLastNalUnit();if(ie){var ce=new Uint8Array(ie.data.byteLength+O.byteLength);ce.set(ie.data,0),ce.set(O,ie.data.byteLength),ie.data=ce}}return b.naluState=y,M},i.parseAACPES=function(O){var x=0,b=this._audioTrack,y=this.aacOverFlow,T=O.data;if(y){this.aacOverFlow=null;var M=y.sample.unit.byteLength,k=Math.min(y.missing,M),N=M-k;y.sample.unit.set(T.subarray(0,k),N),b.samples.push(y.sample),x=y.missing}var K,z;for(K=x,z=T.length;K<z-1&&!D.isHeader(T,K);K++);if(K!==x){var B,H;if(K<z-1?(B="AAC PES did not start with ADTS header,offset:"+K,H=!1):(B="no ADTS header found in AAC PES",H=!0),a.logger.warn("parsing error:"+B),this.observer.emit(s.Events.ERROR,s.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:H,reason:B}),H)return}D.initTrackConfig(b,this.observer,T,K,this.audioCodec);var U;if(O.pts!==void 0)U=O.pts;else if(y){var W=D.getFrameDuration(b.samplerate);U=y.sample.pts+W}else{a.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var G=0;K<z;)if(D.isHeader(T,K)){if(K+5<z){var ee=D.appendFrame(b,T,K,U,G);if(ee)if(ee.missing)this.aacOverFlow=ee;else{K+=ee.length,G++;continue}}break}else K++},i.parseMPEGPES=function(O){var x=O.data,b=x.length,y=0,T=0,M=O.pts;if(M===void 0){a.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;T<b;)if(u.isHeader(x,T)){var k=u.appendFrame(this._audioTrack,x,T,M,y);if(k)T+=k.length,y++;else break}else T++},i.parseID3PES=function(O){if(O.pts===void 0){a.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},_}();c.minProbeByteLength=188;function v(_,i,P,O){return{key:_,frame:!1,pts:i,dts:P,units:[],debug:O,length:0}}function g(_,i){return(_[i+10]&31)<<8|_[i+11]}function E(_,i,P,O){var x={audio:-1,avc:-1,id3:-1,isAAC:!0},b=(_[i+1]&15)<<8|_[i+2],y=i+3+b-4,T=(_[i+10]&15)<<8|_[i+11];for(i+=12+T;i<y;){var M=(_[i+1]&31)<<8|_[i+2];switch(_[i]){case 207:if(!O){a.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:x.audio===-1&&(x.audio=M);break;case 21:x.id3===-1&&(x.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:x.avc===-1&&(x.avc=M);break;case 3:case 4:P?x.audio===-1&&(x.audio=M,x.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}i+=((_[i+3]&15)<<8|_[i+4])+5}return x}function n(_){var i=0,P,O,x,b,y,T=_.data;if(!_||_.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 k=(P[0]<<16)+(P[1]<<8)+P[2];if(k===1){if(O=(P[4]<<8)+P[5],O&&O>_.size-6)return null;var N=P[7];N&192&&(b=(P[9]&14)*536870912+(P[10]&255)*4194304+(P[11]&254)*16384+(P[12]&255)*128+(P[13]&254)/2,N&64?(y=(P[14]&14)*536870912+(P[15]&255)*4194304+(P[16]&254)*16384+(P[17]&255)*128+(P[18]&254)/2,b-y>60*9e4&&(a.logger.warn(Math.round((b-y)/9e4)+"s delta between PTS and DTS, align them"),b=y)):y=b),x=P[8];var K=x+9;if(_.size<=K)return null;_.size-=K;for(var z=new Uint8Array(_.size),B=0,H=T.length;B<H;B++){P=T[B];var U=P.byteLength;if(K)if(K>U){K-=U;continue}else P=P.subarray(K),U-=K,K=0;z.set(P,i),i+=U}return O&&(O-=x+3),{data:z,pts:b,dts:y,len:O}}return null}function o(_,i){if(_.units.length&&_.frame){if(_.pts===void 0){var P=i.samples,O=P.length;if(O){var x=P[O-1];_.pts=x.pts,_.dts=x.dts}else{i.dropped++;return}}i.samples.push(_)}_.debug.length&&a.logger.log(_.pts+"/"+_.dts+":"+_.debug)}function t(_,i){var P=_.length;if(P>0){if(i.pts>=_[P-1].pts)_.push(i);else for(var O=P-1;O>=0;O--)if(i.pts<_[O].pts){_.splice(O,0,i);break}}else _.push(i)}function S(_){for(var i=_.byteLength,P=[],O=1;O<i-2;)_[O]===0&&_[O+1]===0&&_[O+2]===3?(P.push(O+2),O+=2):O++;if(P.length===0)return _;var x=i-P.length,b=new Uint8Array(x),y=0;for(O=0;O<x;y++,O++)y===P[0]&&(y++,P.shift()),b[O]=_[y];return b}f.default=c},"./src/errors.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"ErrorTypes",function(){return D}),C.d(f,"ErrorDetails",function(){return u});var D;(function(m){m.NETWORK_ERROR="networkError",m.MEDIA_ERROR="mediaError",m.KEY_SYSTEM_ERROR="keySystemError",m.MUX_ERROR="muxError",m.OTHER_ERROR="otherError"})(D||(D={}));var u;(function(m){m.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",m.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",m.KEY_SYSTEM_NO_SESSION="keySystemNoSession",m.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",m.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",m.MANIFEST_LOAD_ERROR="manifestLoadError",m.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",m.MANIFEST_PARSING_ERROR="manifestParsingError",m.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",m.LEVEL_EMPTY_ERROR="levelEmptyError",m.LEVEL_LOAD_ERROR="levelLoadError",m.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",m.LEVEL_SWITCH_ERROR="levelSwitchError",m.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",m.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",m.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",m.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",m.FRAG_LOAD_ERROR="fragLoadError",m.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",m.FRAG_DECRYPT_ERROR="fragDecryptError",m.FRAG_PARSING_ERROR="fragParsingError",m.REMUX_ALLOC_ERROR="remuxAllocError",m.KEY_LOAD_ERROR="keyLoadError",m.KEY_LOAD_TIMEOUT="keyLoadTimeOut",m.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",m.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",m.BUFFER_APPEND_ERROR="bufferAppendError",m.BUFFER_APPENDING_ERROR="bufferAppendingError",m.BUFFER_STALLED_ERROR="bufferStalledError",m.BUFFER_FULL_ERROR="bufferFullError",m.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",m.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",m.INTERNAL_EXCEPTION="internalException",m.INTERNAL_ABORTED="aborted",m.UNKNOWN="unknown"})(u||(u={}))},"./src/events.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"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,f,C){"use strict";C.r(f),C.d(f,"default",function(){return _});var D=C("./node_modules/url-toolkit/src/url-toolkit.js"),u=C.n(D),m=C("./src/loader/playlist-loader.ts"),w=C("./src/loader/key-loader.ts"),p=C("./src/controller/id3-track-controller.ts"),s=C("./src/controller/latency-controller.ts"),l=C("./src/controller/level-controller.ts"),a=C("./src/controller/fragment-tracker.ts"),d=C("./src/controller/stream-controller.ts"),h=C("./src/is-supported.ts"),c=C("./src/utils/logger.ts"),v=C("./src/config.ts"),g=C("./node_modules/eventemitter3/index.js"),E=C.n(g),n=C("./src/events.ts"),o=C("./src/errors.ts");function t(i,P){for(var O=0;O<P.length;O++){var x=P[O];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(i,x.key,x)}}function S(i,P,O){return P&&t(i.prototype,P),O&&t(i,O),i}var _=function(){i.isSupported=function(){return Object(h.isSupported)()};function i(O){O===void 0&&(O={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new g.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 x=this.config=Object(v.mergeConfig)(i.DefaultConfig,O);this.userConfig=O,Object(c.enableLogs)(x.debug),this._autoLevelCapping=-1,x.progressive&&Object(v.enableStreamingMode)(x);var b=x.abrController,y=x.bufferController,T=x.capLevelController,M=x.fpsController,k=this.abrController=new b(this),N=this.bufferController=new y(this),K=this.capLevelController=new T(this),z=new M(this),B=new m.default(this),H=new w.default(this),U=new p.default(this),W=this.levelController=new l.default(this),G=new a.FragmentTracker(this),ee=this.streamController=new d.default(this,G);K.setStreamController(ee),z.setStreamController(ee);var ie=[W,ee];this.networkControllers=ie;var ce=[B,H,k,N,K,z,U,G];this.audioTrackController=this.createController(x.audioTrackController,null,ie),this.createController(x.audioStreamController,G,ie),this.subtitleTrackController=this.createController(x.subtitleTrackController,null,ie),this.createController(x.subtitleStreamController,G,ie),this.createController(x.timelineController,null,ce),this.emeController=this.createController(x.emeController,null,ce),this.cmcdController=this.createController(x.cmcdController,null,ce),this.latencyController=this.createController(s.default,null,ce),this.coreComponents=ce}var P=i.prototype;return P.createController=function(x,b,y){if(x){var T=b?new x(this,b):new x(this);return y&&y.push(T),T}return null},P.on=function(x,b,y){y===void 0&&(y=this),this._emitter.on(x,b,y)},P.once=function(x,b,y){y===void 0&&(y=this),this._emitter.once(x,b,y)},P.removeAllListeners=function(x){this._emitter.removeAllListeners(x)},P.off=function(x,b,y,T){y===void 0&&(y=this),this._emitter.off(x,b,y,T)},P.listeners=function(x){return this._emitter.listeners(x)},P.emit=function(x,b,y){return this._emitter.emit(x,b,y)},P.trigger=function(x,b){if(this.config.debug)return this.emit(x,x,b);try{return this.emit(x,x,b)}catch(y){c.logger.error("An internal error happened while handling event "+x+'. Error message: "'+y.message+'". Here is a stacktrace:',y),this.trigger(n.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:x,error:y})}return!1},P.listenerCount=function(x){return this._emitter.listenerCount(x)},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(x){return x.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(x){return x.destroy()}),this.coreComponents.length=0},P.attachMedia=function(x){c.logger.log("attachMedia"),this._media=x,this.trigger(n.Events.MEDIA_ATTACHING,{media:x})},P.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},P.loadSource=function(x){this.stopLoad();var b=this.media,y=this.url,T=this.url=D.buildAbsoluteURL(self.location.href,x,{alwaysNormalize:!0});c.logger.log("loadSource:"+T),b&&y&&y!==T&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(b)),this.trigger(n.Events.MANIFEST_LOADING,{url:x})},P.startLoad=function(x){x===void 0&&(x=-1),c.logger.log("startLoad("+x+")"),this.networkControllers.forEach(function(b){b.startLoad(x)})},P.stopLoad=function(){c.logger.log("stopLoad"),this.networkControllers.forEach(function(x){x.stopLoad()})},P.swapAudioCodec=function(){c.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},P.recoverMediaError=function(){c.logger.log("recoverMediaError");var x=this._media;this.detachMedia(),x&&this.attachMedia(x)},P.removeLevel=function(x,b){b===void 0&&(b=0),this.levelController.removeLevel(x,b)},S(i,[{key:"levels",get:function(){var x=this.levelController.levels;return x||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(x){c.logger.log("set currentLevel:"+x),this.loadLevel=x,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(x){c.logger.log("set nextLevel:"+x),this.levelController.manualLevel=x,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(x){c.logger.log("set loadLevel:"+x),this.levelController.manualLevel=x}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(x){this.levelController.nextLoadLevel=x}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(x){c.logger.log("set firstLevel:"+x),this.levelController.firstLevel=x}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(x){c.logger.log("set startLevel:"+x),x!==-1&&(x=Math.max(x,this.minAutoLevel)),this.levelController.startLevel=x}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(x){var b=!!x;b!==this.config.capLevelToPlayerSize&&(b?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=b)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(x){this._autoLevelCapping!==x&&(c.logger.log("set autoLevelCapping:"+x),this._autoLevelCapping=x)}},{key:"bandwidthEstimate",get:function(){var x=this.abrController.bwEstimator;return x?x.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var x=this.levels,b=this.config.minAutoBitrate;if(!x)return 0;for(var y=x.length,T=0;T<y;T++)if(x[T].maxBitrate>b)return T;return 0}},{key:"maxAutoLevel",get:function(){var x=this.levels,b=this.autoLevelCapping,y;return b===-1&&x&&x.length?y=x.length-1:y=b,y}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(x){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,x)}},{key:"audioTracks",get:function(){var x=this.audioTrackController;return x?x.audioTracks:[]}},{key:"audioTrack",get:function(){var x=this.audioTrackController;return x?x.audioTrack:-1},set:function(x){var b=this.audioTrackController;b&&(b.audioTrack=x)}},{key:"subtitleTracks",get:function(){var x=this.subtitleTrackController;return x?x.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var x=this.subtitleTrackController;return x?x.subtitleTrack:-1},set:function(x){var b=this.subtitleTrackController;b&&(b.subtitleTrack=x)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var x=this.subtitleTrackController;return x?x.subtitleDisplay:!1},set:function(x){var b=this.subtitleTrackController;b&&(b.subtitleDisplay=x)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(x){this.config.lowLatencyMode=x}},{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 o.ErrorTypes}},{key:"ErrorDetails",get:function(){return o.ErrorDetails}},{key:"DefaultConfig",get:function(){return i.defaultConfig?i.defaultConfig:v.hlsDefaultConfig},set:function(x){i.defaultConfig=x}}]),i}();_.defaultConfig=void 0},"./src/is-supported.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"isSupported",function(){return m}),C.d(f,"changeTypeSupported",function(){return w});var D=C("./src/utils/mediasource-helper.ts");function u(){return self.SourceBuffer||self.WebKitSourceBuffer}function m(){var p=Object(D.getMediaSource)();if(!p)return!1;var s=u(),l=p&&typeof p.isTypeSupported=="function"&&p.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),a=!s||s.prototype&&typeof s.prototype.appendBuffer=="function"&&typeof s.prototype.remove=="function";return!!l&&!!a}function w(){var p,s=u();return typeof(s==null||((p=s.prototype)===null||p===void 0)?void 0:p.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return c}),C.d(f,"LoadError",function(){return g});var D=C("./src/polyfills/number.ts"),u=C("./src/errors.ts");function m(E,n){E.prototype=Object.create(n.prototype),E.prototype.constructor=E,a(E,n)}function w(E){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 p(t,arguments,d(this).constructor)}return S.prototype=Object.create(t.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),a(S,t)},w(E)}function p(E,n,o){return s()?p=Reflect.construct:p=function(S,_,i){var P=[null];P.push.apply(P,_);var O=Function.bind.apply(S,P),x=new O;return i&&a(x,i.prototype),x},p.apply(null,arguments)}function s(){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(E){return!1}}function l(E){return Function.toString.call(E).indexOf("[native code]")!==-1}function a(E,n){return a=Object.setPrototypeOf||function(t,S){return t.__proto__=S,t},a(E,n)}function d(E){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},d(E)}var h=Math.pow(2,17),c=function(){function E(o){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=o}var n=E.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 _=this,i=t.url;if(!i)return Promise.reject(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(i?"part list":"url")));this.abort();var P=this.config,O=P.fLoader,x=P.loader;return new Promise(function(b,y){_.loader&&_.loader.destroy();var T=_.loader=t.loader=O?new O(P):new x(P),M=v(t),k={timeout:P.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:P.fragLoadingMaxRetryTimeout,highWaterMark:h};t.stats=T.stats,T.load(M,k,{onSuccess:function(K,z,B,H){_.resetLoader(t,T),b({frag:t,part:null,payload:K.data,networkDetails:H})},onError:function(K,z,B){_.resetLoader(t,T),y(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:K,networkDetails:B}))},onAbort:function(K,z,B){_.resetLoader(t,T),y(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:B}))},onTimeout:function(K,z,B){_.resetLoader(t,T),y(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:B}))},onProgress:function(K,z,B,H){S&&S({frag:t,part:null,payload:B,networkDetails:H})}})})},n.loadPart=function(t,S,_){var i=this;this.abort();var P=this.config,O=P.fLoader,x=P.loader;return new Promise(function(b,y){i.loader&&i.loader.destroy();var T=i.loader=t.loader=O?new O(P):new x(P),M=v(t,S),k={timeout:P.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:P.fragLoadingMaxRetryTimeout,highWaterMark:h};S.stats=T.stats,T.load(M,k,{onSuccess:function(K,z,B,H){i.resetLoader(t,T),i.updateStatsFromPart(t,S);var U={frag:t,part:S,payload:K.data,networkDetails:H};_(U),b(U)},onError:function(K,z,B){i.resetLoader(t,T),y(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:S,response:K,networkDetails:B}))},onAbort:function(K,z,B){t.stats.aborted=S.stats.aborted,i.resetLoader(t,T),y(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:S,networkDetails:B}))},onTimeout:function(K,z,B){i.resetLoader(t,T),y(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:S,networkDetails:B}))}})})},n.updateStatsFromPart=function(t,S){var _=t.stats,i=S.stats,P=i.total;if(_.loaded+=i.loaded,P){var O=Math.round(t.duration/S.duration),x=Math.min(Math.round(_.loaded/P),O),b=O-x,y=b*Math.round(_.loaded/x);_.total=_.loaded+y}else _.total=Math.max(_.loaded,_.total);var T=_.loading,M=i.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()},E}();function v(E,n){n===void 0&&(n=null);var o=n||E,t={frag:E,part:n,responseType:"arraybuffer",url:o.url,headers:{},rangeStart:0,rangeEnd:0},S=o.byteRangeStartOffset,_=o.byteRangeEndOffset;return Object(D.isFiniteNumber)(S)&&Object(D.isFiniteNumber)(_)&&(t.rangeStart=S,t.rangeEnd=_),t}var g=function(E){m(n,E);function n(o){for(var t,S=arguments.length,_=new Array(S>1?S-1:0),i=1;i<S;i++)_[i-1]=arguments[i];return t=E.call.apply(E,[this].concat(_))||this,t.data=void 0,t.data=o,t}return n}(w(Error))},"./src/loader/fragment.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"ElementaryStreamTypes",function(){return c}),C.d(f,"BaseSegment",function(){return v}),C.d(f,"Fragment",function(){return g}),C.d(f,"Part",function(){return E});var D=C("./src/polyfills/number.ts"),u=C("./node_modules/url-toolkit/src/url-toolkit.js"),m=C.n(u),w=C("./src/utils/logger.ts"),p=C("./src/loader/level-key.ts"),s=C("./src/loader/load-stats.ts");function l(n,o){n.prototype=Object.create(o.prototype),n.prototype.constructor=n,a(n,o)}function a(n,o){return a=Object.setPrototypeOf||function(S,_){return S.__proto__=_,S},a(n,o)}function d(n,o){for(var t=0;t<o.length;t++){var S=o[t];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(n,S.key,S)}}function h(n,o,t){return o&&d(n.prototype,o),t&&d(n,t),n}var c;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(c||(c={}));var v=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 o=n.prototype;return o.setByteRange=function(S,_){var i=S.split("@",2),P=[];i.length===1?P[0]=_?_.byteRangeEndOffset:0:P[0]=parseInt(i[1]),P[1]=parseInt(i[0])+P[0],this._byteRange=P},h(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}(),g=function(n){l(o,n);function o(S,_){var i;return i=n.call(this,_)||this,i._decryptdata=null,i.rawProgramDateTime=null,i.programDateTime=null,i.tagList=[],i.duration=0,i.sn=0,i.levelkey=void 0,i.type=void 0,i.loader=null,i.level=-1,i.cc=0,i.startPTS=void 0,i.endPTS=void 0,i.appendedPTS=void 0,i.startDTS=void 0,i.endDTS=void 0,i.start=0,i.deltaPTS=void 0,i.maxStartPTS=void 0,i.minEndPTS=void 0,i.stats=new s.LoadStats,i.urlId=0,i.data=void 0,i.bitrateTest=!1,i.title=null,i.initSegment=null,i.type=S,i}var t=o.prototype;return t.createInitializationVector=function(_){for(var i=new Uint8Array(16),P=12;P<16;P++)i[P]=_>>8*(15-P)&255;return i},t.setDecryptDataFromLevelKey=function(_,i){var P=_;return(_==null?void 0:_.method)==="AES-128"&&_.uri&&!_.iv&&(P=p.LevelKey.fromURI(_.uri),P.method=_.method,P.iv=this.createInitializationVector(i),P.keyFormat="identity"),P},t.setElementaryStreamInfo=function(_,i,P,O,x,b){b===void 0&&(b=!1);var y=this.elementaryStreams,T=y[_];if(!T){y[_]={startPTS:i,endPTS:P,startDTS:O,endDTS:x,partial:b};return}T.startPTS=Math.min(T.startPTS,i),T.endPTS=Math.max(T.endPTS,P),T.startDTS=Math.min(T.startDTS,O),T.endDTS=Math.max(T.endDTS,x)},t.clearElementaryStreamInfo=function(){var _=this.elementaryStreams;_[c.AUDIO]=null,_[c.VIDEO]=null,_[c.AUDIOVIDEO]=null},h(o,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var _=this.sn;typeof _!="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'),_=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,_)}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 _=Object(D.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+_*1e3}},{key:"encrypted",get:function(){var _;return!!((_=this.decryptdata)!==null&&_!==void 0&&_.keyFormat&&this.decryptdata.uri)}}]),o}(v),E=function(n){l(o,n);function o(t,S,_,i,P){var O;O=n.call(this,_)||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 s.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=i;var x=t.enumeratedString("BYTERANGE");return x&&O.setByteRange(x,P),P&&(O.fragOffset=P.fragOffset+P.duration),O}return h(o,[{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)}}]),o}(v)},"./src/loader/key-loader.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return w});var D=C("./src/events.ts"),u=C("./src/errors.ts"),m=C("./src/utils/logger.ts"),w=function(){function p(l){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=l,this._registerListeners()}var s=p.prototype;return s._registerListeners=function(){this.hls.on(D.Events.KEY_LOADING,this.onKeyLoading,this)},s._unregisterListeners=function(){this.hls.off(D.Events.KEY_LOADING,this.onKeyLoading)},s.destroy=function(){this._unregisterListeners();for(var a in this.loaders){var d=this.loaders[a];d&&d.destroy()}this.loaders={}},s.onKeyLoading=function(a,d){var h=d.frag,c=h.type,v=this.loaders[c];if(!h.decryptdata){m.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var g=h.decryptdata.uri;if(g!==this.decrypturl||this.decryptkey===null){var E=this.hls.config;if(v&&(m.logger.warn("abort previous key loader for type:"+c),v.abort()),!g){m.logger.warn("key uri is falsy");return}var n=E.loader,o=h.loader=this.loaders[c]=new n(E);this.decrypturl=g,this.decryptkey=null;var t={url:g,frag:h,responseType:"arraybuffer"},S={timeout:E.fragLoadingTimeOut,maxRetry:0,retryDelay:E.fragLoadingRetryDelay,maxRetryDelay:E.fragLoadingMaxRetryTimeout,highWaterMark:0},_={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};o.load(t,S,_)}else this.decryptkey&&(h.decryptdata.key=this.decryptkey,this.hls.trigger(D.Events.KEY_LOADED,{frag:h}))},s.loadsuccess=function(a,d,h){var c=h.frag;if(!c.decryptdata){m.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})},s.loaderror=function(a,d){var h=d.frag,c=h.loader;c&&c.abort(),delete this.loaders[h.type],this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:h,response:a})},s.loadtimeout=function(a,d){var h=d.frag,c=h.loader;c&&c.abort(),delete this.loaders[h.type],this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:h})},p}()},"./src/loader/level-details.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"LevelDetails",function(){return p});var D=C("./src/polyfills/number.ts");function u(s,l){for(var a=0;a<l.length;a++){var d=l[a];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(s,d.key,d)}}function m(s,l,a){return l&&u(s.prototype,l),a&&u(s,a),s}var w=10,p=function(){function s(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=s.prototype;return l.reloaded=function(d){if(!d){this.advanced=!0,this.updated=!0;return}var h=this.lastPartSn-d.lastPartSn,c=this.lastPartIndex-d.lastPartIndex;this.updated=this.endSN!==d.endSN||!!c||!!h,this.advanced=this.endSN>d.endSN||h>0||h===0&&c>0,this.updated||this.advanced?this.misses=Math.floor(d.misses*.6):this.misses=d.misses+1,this.availabilityDelay=d.availabilityDelay},m(s,[{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 d=this.driftEndTime-this.driftStartTime;if(d>0){var h=this.driftEnd-this.driftStart;return h*1e3/d}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var d;return(d=this.fragments)!==null&&d!==void 0&&d.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),s}()},"./src/loader/level-key.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"LevelKey",function(){return p});var D=C("./node_modules/url-toolkit/src/url-toolkit.js"),u=C.n(D);function m(s,l){for(var a=0;a<l.length;a++){var d=l[a];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(s,d.key,d)}}function w(s,l,a){return l&&m(s.prototype,l),a&&m(s,a),s}var p=function(){s.fromURL=function(a,d){return new s(a,d)},s.fromURI=function(a){return new s(a)};function s(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(s,[{key:"uri",get:function(){return this._uri}}]),s}()},"./src/loader/load-stats.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"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,f,C){"use strict";C.r(f),C.d(f,"default",function(){return o});var D=C("./src/polyfills/number.ts"),u=C("./node_modules/url-toolkit/src/url-toolkit.js"),m=C.n(u),w=C("./src/loader/fragment.ts"),p=C("./src/loader/level-details.ts"),s=C("./src/loader/level-key.ts"),l=C("./src/utils/attr-list.ts"),a=C("./src/utils/logger.ts"),d=C("./src/utils/codecs.ts"),h=/#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,v=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),g=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("|")),E=/\.(mp4|m4s|m4v|m4a)$/i;function n(P){var O,x;return E.test((O=(x=u.parseURL(P))===null||x===void 0?void 0:x.path)!=null?O:"")}var o=function(){function P(){}return P.findGroup=function(x,b){for(var y=0;y<x.length;y++){var T=x[y];if(T.id===b)return T}},P.convertAVC1ToAVCOTI=function(x){var b=x.split(".");if(b.length>2){var y=b.shift()+".";return y+=parseInt(b.shift()).toString(16),y+=("000"+parseInt(b.shift()).toString(16)).substr(-4),y}return x},P.resolve=function(x,b){return u.buildAbsoluteURL(b,x,{alwaysNormalize:!0})},P.parseMasterPlaylist=function(x,b){var y=[],T={},M=!1;h.lastIndex=0;for(var k;(k=h.exec(x))!=null;)if(k[1]){var N=new l.AttrList(k[1]),K={attrs:N,bitrate:N.decimalInteger("AVERAGE-BANDWIDTH")||N.decimalInteger("BANDWIDTH"),name:N.NAME,url:P.resolve(k[2],b)},z=N.decimalResolution("RESOLUTION");z&&(K.width=z.width,K.height=z.height),t((N.CODECS||"").split(/[ ,]+/).filter(function(H){return H}),K),K.videoCodec&&K.videoCodec.indexOf("avc1")!==-1&&(K.videoCodec=P.convertAVC1ToAVCOTI(K.videoCodec)),y.push(K)}else if(k[3]){var B=new l.AttrList(k[3]);B["DATA-ID"]&&(M=!0,T[B["DATA-ID"]]=B)}return{levels:y,sessionData:M?T:null}},P.parseMasterPlaylistMedia=function(x,b,y,T){T===void 0&&(T=[]);var M,k=[],N=0;for(c.lastIndex=0;(M=c.exec(x))!==null;){var K=new l.AttrList(M[1]);if(K.TYPE===y){var z={attrs:K,bitrate:0,id:N++,groupId:K["GROUP-ID"],instreamId:K["INSTREAM-ID"],name:K.NAME||K.LANGUAGE||"",type:y,default:K.bool("DEFAULT"),autoselect:K.bool("AUTOSELECT"),forced:K.bool("FORCED"),lang:K.LANGUAGE,url:K.URI?P.resolve(K.URI,b):""};if(T.length){var B=P.findGroup(T,z.groupId)||T[0];S(z,B,"audioCodec"),S(z,B,"textCodec")}k.push(z)}}return k},P.parseLevelPlaylist=function(x,b,y,T,M){var k=new p.LevelDetails(b),N=k.fragments,K=null,z=0,B=0,H=0,U=0,W=null,G=new w.Fragment(T,b),ee,ie,ce,_e=-1,Ce=!1;for(v.lastIndex=0,k.m3u8=x;(ee=v.exec(x))!==null;){Ce&&(Ce=!1,G=new w.Fragment(T,b),G.start=H,G.sn=z,G.cc=U,G.level=y,K&&(G.initSegment=K,G.rawProgramDateTime=K.rawProgramDateTime));var le=ee[1];if(le){G.duration=parseFloat(le);var ye=(" "+ee[2]).slice(1);G.title=ye||null,G.tagList.push(ye?["INF",le,ye]:["INF",le])}else if(ee[3])Object(D.isFiniteNumber)(G.duration)&&(G.start=H,ce&&(G.levelkey=ce),G.sn=z,G.level=y,G.cc=U,G.urlId=M,N.push(G),G.relurl=(" "+ee[3]).slice(1),i(G,W),W=G,H+=G.duration,z++,B=0,Ce=!0);else if(ee[4]){var fe=(" "+ee[4]).slice(1);W?G.setByteRange(fe,W):G.setByteRange(fe)}else if(ee[5])G.rawProgramDateTime=(" "+ee[5]).slice(1),G.tagList.push(["PROGRAM-DATE-TIME",G.rawProgramDateTime]),_e===-1&&(_e=N.length);else{if(ee=ee[0].match(g),!ee){a.logger.warn("No matches on slow regex match for level playlist!");continue}for(ie=1;ie<ee.length&&!(typeof ee[ie]!="undefined");ie++);var ne=(" "+ee[ie]).slice(1),ae=(" "+ee[ie+1]).slice(1),q=ee[ie+2]?(" "+ee[ie+2]).slice(1):"";switch(ne){case"PLAYLIST-TYPE":k.type=ae.toUpperCase();break;case"MEDIA-SEQUENCE":z=k.startSN=parseInt(ae);break;case"SKIP":{var se=new l.AttrList(ae),Q=se.decimalInteger("SKIPPED-SEGMENTS");if(Object(D.isFiniteNumber)(Q)){k.skippedSegments=Q;for(var Z=Q;Z--;)N.unshift(null);z+=Q}var be=se.enumeratedString("RECENTLY-REMOVED-DATERANGES");be&&(k.recentlyRemovedDateranges=be.split(" "));break}case"TARGETDURATION":k.targetduration=parseFloat(ae);break;case"VERSION":k.version=parseInt(ae);break;case"EXTM3U":break;case"ENDLIST":k.live=!1;break;case"#":(ae||q)&&G.tagList.push(q?[ae,q]:[ae]);break;case"DIS":U++;case"GAP":G.tagList.push([ne]);break;case"BITRATE":G.tagList.push([ne,ae]);break;case"DISCONTINUITY-SEQ":U=parseInt(ae);break;case"KEY":{var re,Y=new l.AttrList(ae),X=Y.enumeratedString("METHOD"),$=Y.URI,ve=Y.hexadecimalInteger("IV"),de=Y.enumeratedString("KEYFORMATVERSIONS"),xe=Y.enumeratedString("KEYID"),Ke=(re=Y.enumeratedString("KEYFORMAT"))!=null?re:"identity",Ve=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Ve.indexOf(Ke)>-1){a.logger.warn("Keyformat "+Ke+" is not supported from the manifest");continue}else if(Ke!=="identity")continue;X&&(ce=s.LevelKey.fromURL(b,$),$&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(ce.method=X,ce.keyFormat=Ke,xe&&(ce.keyID=xe),de&&(ce.keyFormatVersions=de),ce.iv=ve));break}case"START":{var Xe=new l.AttrList(ae),at=Xe.decimalFloatingPoint("TIME-OFFSET");Object(D.isFiniteNumber)(at)&&(k.startTimeOffset=at);break}case"MAP":{var it=new l.AttrList(ae);G.relurl=it.URI,it.BYTERANGE&&G.setByteRange(it.BYTERANGE),G.level=y,G.sn="initSegment",ce&&(G.levelkey=ce),G.initSegment=null,K=G,Ce=!0;break}case"SERVER-CONTROL":{var lt=new l.AttrList(ae);k.canBlockReload=lt.bool("CAN-BLOCK-RELOAD"),k.canSkipUntil=lt.optionalFloat("CAN-SKIP-UNTIL",0),k.canSkipDateRanges=k.canSkipUntil>0&<.bool("CAN-SKIP-DATERANGES"),k.partHoldBack=lt.optionalFloat("PART-HOLD-BACK",0),k.holdBack=lt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Me=new l.AttrList(ae);k.partTarget=Me.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Te=k.partList;Te||(Te=k.partList=[]);var Ye=B>0?Te[Te.length-1]:void 0,ot=B++,ze=new w.Part(new l.AttrList(ae),G,b,ot,Ye);Te.push(ze),G.duration+=ze.duration;break}case"PRELOAD-HINT":{var rt=new l.AttrList(ae);k.preloadHint=rt;break}case"RENDITION-REPORT":{var ke=new l.AttrList(ae);k.renditionReports=k.renditionReports||[],k.renditionReports.push(ke);break}default:a.logger.warn("line parsed but not handled: "+ee);break}}}W&&!W.relurl?(N.pop(),H-=W.duration,k.partList&&(k.fragmentHint=W)):k.partList&&(i(G,W),G.cc=U,k.fragmentHint=G);var Oe=N.length,Re=N[0],pe=N[Oe-1];if(H+=k.skippedSegments*k.targetduration,H>0&&Oe&&pe){k.averagetargetduration=H/Oe;var Ee=pe.sn;k.endSN=Ee!=="initSegment"?Ee:0,Re&&(k.startCC=Re.cc,Re.initSegment||k.fragments.every(function(we){return we.relurl&&n(we.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,b),G.relurl=pe.relurl,G.level=y,G.sn="initSegment",Re.initSegment=G,k.needSidxRanges=!0))}else k.endSN=0,k.startCC=0;return k.fragmentHint&&(H+=k.fragmentHint.duration),k.totalduration=H,k.endCC=U,_e>0&&_(N,_e),k},P}();function t(P,O){["video","audio","text"].forEach(function(x){var b=P.filter(function(T){return Object(d.isCodecType)(T,x)});if(b.length){var y=b.filter(function(T){return T.lastIndexOf("avc1",0)===0||T.lastIndexOf("mp4a",0)===0});O[x+"Codec"]=y.length>0?y[0]:b[0],P=P.filter(function(T){return b.indexOf(T)===-1})}}),O.unknownCodecs=P}function S(P,O,x){var b=O[x];b&&(P[x]=b)}function _(P,O){for(var x=P[O],b=O;b--;){var y=P[b];if(!y)return;y.programDateTime=x.programDateTime-y.duration*1e3,x=y}}function i(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,f,C){"use strict";C.r(f);var D=C("./src/polyfills/number.ts"),u=C("./src/events.ts"),m=C("./src/errors.ts"),w=C("./src/utils/logger.ts"),p=C("./src/utils/mp4-tools.ts"),s=C("./src/loader/m3u8-parser.ts"),l=C("./src/types/loader.ts"),a=C("./src/utils/attr-list.ts");function d(v){var g=v.type;switch(g){case l.PlaylistContextType.AUDIO_TRACK:return l.PlaylistLevelType.AUDIO;case l.PlaylistContextType.SUBTITLE_TRACK:return l.PlaylistLevelType.SUBTITLE;default:return l.PlaylistLevelType.MAIN}}function h(v,g){var E=v.url;return(E===void 0||E.indexOf("data:")===0)&&(E=g.url),E}var c=function(){function v(E){this.hls=void 0,this.loaders=Object.create(null),this.hls=E,this.registerListeners()}var g=v.prototype;return g.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)},g.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)},g.createInternalLoader=function(n){var o=this.hls.config,t=o.pLoader,S=o.loader,_=t||S,i=new _(o);return n.loader=i,this.loaders[n.type]=i,i},g.getInternalLoader=function(n){return this.loaders[n.type]},g.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},g.destroyInternalLoaders=function(){for(var n in this.loaders){var o=this.loaders[n];o&&o.destroy(),this.resetInternalLoader(n)}},g.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},g.onManifestLoading=function(n,o){var t=o.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:l.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},g.onLevelLoading=function(n,o){var t=o.id,S=o.level,_=o.url,i=o.deliveryDirectives;this.load({id:t,groupId:null,level:S,responseType:"text",type:l.PlaylistContextType.LEVEL,url:_,deliveryDirectives:i})},g.onAudioTrackLoading=function(n,o){var t=o.id,S=o.groupId,_=o.url,i=o.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:l.PlaylistContextType.AUDIO_TRACK,url:_,deliveryDirectives:i})},g.onSubtitleTrackLoading=function(n,o){var t=o.id,S=o.groupId,_=o.url,i=o.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:l.PlaylistContextType.SUBTITLE_TRACK,url:_,deliveryDirectives:i})},g.load=function(n){var o,t=this.hls.config,S=this.getInternalLoader(n);if(S){var _=S.context;if(_&&_.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 i,P,O,x;switch(n.type){case l.PlaylistContextType.MANIFEST:i=t.manifestLoadingMaxRetry,P=t.manifestLoadingTimeOut,O=t.manifestLoadingRetryDelay,x=t.manifestLoadingMaxRetryTimeout;break;case l.PlaylistContextType.LEVEL:case l.PlaylistContextType.AUDIO_TRACK:case l.PlaylistContextType.SUBTITLE_TRACK:i=0,P=t.levelLoadingTimeOut;break;default:i=t.levelLoadingMaxRetry,P=t.levelLoadingTimeOut,O=t.levelLoadingRetryDelay,x=t.levelLoadingMaxRetryTimeout;break}if(S=this.createInternalLoader(n),(o=n.deliveryDirectives)!==null&&o!==void 0&&o.part){var b;if(n.type===l.PlaylistContextType.LEVEL&&n.level!==null?b=this.hls.levels[n.level].details:n.type===l.PlaylistContextType.AUDIO_TRACK&&n.id!==null?b=this.hls.audioTracks[n.id].details:n.type===l.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(b=this.hls.subtitleTracks[n.id].details),b){var y=b.partTarget,T=b.targetduration;y&&T&&(P=Math.min(Math.max(y*3,T*.8)*1e3,P))}}var M={timeout:P,maxRetry:i,retryDelay:O,maxRetryDelay:x,highWaterMark:0},k={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};S.load(n,M,k)},g.loadsuccess=function(n,o,t,S){if(S===void 0&&(S=null),t.isSidxRequest){this.handleSidxRequest(n,t),this.handlePlaylistLoaded(n,o,t,S);return}this.resetInternalLoader(t.type);var _=n.data;if(_.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,t,"no EXTM3U delimiter",S);return}o.parsing.start=performance.now(),_.indexOf("#EXTINF:")>0||_.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,o,t,S):this.handleMasterPlaylist(n,o,t,S)},g.loaderror=function(n,o,t){t===void 0&&(t=null),this.handleNetworkError(o,t,!1,n)},g.loadtimeout=function(n,o,t){t===void 0&&(t=null),this.handleNetworkError(o,t,!0)},g.handleMasterPlaylist=function(n,o,t,S){var _=this.hls,i=n.data,P=h(n,t),O=s.default.parseMasterPlaylist(i,P),x=O.levels,b=O.sessionData;if(!x.length){this.handleManifestParsingError(n,t,"no level found in manifest",S);return}var y=x.map(function(z){return{id:z.attrs.AUDIO,audioCodec:z.audioCodec}}),T=x.map(function(z){return{id:z.attrs.SUBTITLES,textCodec:z.textCodec}}),M=s.default.parseMasterPlaylistMedia(i,P,"AUDIO",y),k=s.default.parseMasterPlaylistMedia(i,P,"SUBTITLES",T),N=s.default.parseMasterPlaylistMedia(i,P,"CLOSED-CAPTIONS");if(M.length){var K=M.some(function(z){return!z.url});!K&&x[0].audioCodec&&!x[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:""}))}_.trigger(u.Events.MANIFEST_LOADED,{levels:x,audioTracks:M,subtitles:k,captions:N,url:P,stats:o,networkDetails:S,sessionData:b})},g.handleTrackOrLevelPlaylist=function(n,o,t,S){var _=this.hls,i=t.id,P=t.level,O=t.type,x=h(n,t),b=Object(D.isFiniteNumber)(i)?i:0,y=Object(D.isFiniteNumber)(P)?P:b,T=d(t),M=s.default.parseLevelPlaylist(n.data,x,y,T,b);if(!M.fragments.length){_.trigger(u.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:x,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(O===l.PlaylistContextType.MANIFEST){var k={attrs:new a.AttrList({}),bitrate:0,details:M,name:"",url:x};_.trigger(u.Events.MANIFEST_LOADED,{levels:[k],audioTracks:[],url:x,stats:o,networkDetails:S,sessionData:null})}if(o.parsing.end=performance.now(),M.needSidxRanges){var N,K=(N=M.fragments[0].initSegment)===null||N===void 0?void 0:N.url;this.load({url:K,isSidxRequest:!0,type:O,level:P,levelDetails:M,id:i,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=M,this.handlePlaylistLoaded(n,o,t,S)},g.handleSidxRequest=function(n,o){var t=Object(p.parseSegmentIndex)(new Uint8Array(n.data));if(!t)return;var S=t.references,_=o.levelDetails;S.forEach(function(i,P){var O=i.info,x=_.fragments[P];x.byteRange.length===0&&x.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),x.initSegment&&x.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},g.handleManifestParsingError=function(n,o,t,S){this.hls.trigger(u.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:o.type===l.PlaylistContextType.MANIFEST,url:n.url,reason:t,response:n,context:o,networkDetails:S})},g.handleNetworkError=function(n,o,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 _=m.ErrorDetails.UNKNOWN,i=!1,P=this.getInternalLoader(n);switch(n.type){case l.PlaylistContextType.MANIFEST:_=t?m.ErrorDetails.MANIFEST_LOAD_TIMEOUT:m.ErrorDetails.MANIFEST_LOAD_ERROR,i=!0;break;case l.PlaylistContextType.LEVEL:_=t?m.ErrorDetails.LEVEL_LOAD_TIMEOUT:m.ErrorDetails.LEVEL_LOAD_ERROR,i=!1;break;case l.PlaylistContextType.AUDIO_TRACK:_=t?m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,i=!1;break;case l.PlaylistContextType.SUBTITLE_TRACK:_=t?m.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:m.ErrorDetails.SUBTITLE_LOAD_ERROR,i=!1;break}P&&this.resetInternalLoader(n.type);var O={type:m.ErrorTypes.NETWORK_ERROR,details:_,fatal:i,url:n.url,loader:P,context:n,networkDetails:o};S&&(O.response=S),this.hls.trigger(u.Events.ERROR,O)},g.handlePlaylistLoaded=function(n,o,t,S){var _=t.type,i=t.level,P=t.id,O=t.groupId,x=t.loader,b=t.levelDetails,y=t.deliveryDirectives;if(!(b!=null&&b.targetduration)){this.handleManifestParsingError(n,t,"invalid target duration",S);return}if(!x)return;b.live&&(x.getCacheAge&&(b.ageHeader=x.getCacheAge()||0),(!x.getCacheAge||isNaN(b.ageHeader))&&(b.ageHeader=0));switch(_){case l.PlaylistContextType.MANIFEST:case l.PlaylistContextType.LEVEL:this.hls.trigger(u.Events.LEVEL_LOADED,{details:b,level:i||0,id:P||0,stats:o,networkDetails:S,deliveryDirectives:y});break;case l.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(u.Events.AUDIO_TRACK_LOADED,{details:b,id:P||0,groupId:O||"",stats:o,networkDetails:S,deliveryDirectives:y});break;case l.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(u.Events.SUBTITLE_TRACK_LOADED,{details:b,id:P||0,groupId:O||"",stats:o,networkDetails:S,deliveryDirectives:y});break}},v}();f.default=c},"./src/polyfills/number.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"isFiniteNumber",function(){return D}),C.d(f,"MAX_SAFE_INTEGER",function(){return u});var D=Number.isFinite||function(m){return typeof m=="number"&&isFinite(m)},u=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(L,f,C){"use strict";C.r(f);var D=function(){function u(){}return u.getSilentFrame=function(w,p){switch(w){case"mp4a.40.2":if(p===1)return new Uint8Array([0,200,0,128,35,128]);if(p===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(p===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(p===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(p===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(p===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(p===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(p===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(p===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}();f.default=D},"./src/remux/mp4-generator.ts":function(L,f,C){"use strict";C.r(f);var D=Math.pow(2,32)-1,u=function(){function m(){}return m.init=function(){m.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 p;for(p in m.types)m.types.hasOwnProperty(p)&&(m.types[p]=[p.charCodeAt(0),p.charCodeAt(1),p.charCodeAt(2),p.charCodeAt(3)]);var s=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]);m.HDLR_TYPES={video:s,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]),d=new Uint8Array([0,0,0,0,0,0,0,0]);m.STTS=m.STSC=m.STCO=d,m.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),m.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),m.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),m.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var h=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),v=new Uint8Array([0,0,0,1]);m.FTYP=m.box(m.types.ftyp,h,v,h,c),m.DINF=m.box(m.types.dinf,m.box(m.types.dref,a))},m.box=function(p){for(var s=8,l=arguments.length,a=new Array(l>1?l-1:0),d=1;d<l;d++)a[d-1]=arguments[d];for(var h=a.length,c=h;h--;)s+=a[h].byteLength;var v=new Uint8Array(s);for(v[0]=s>>24&255,v[1]=s>>16&255,v[2]=s>>8&255,v[3]=s&255,v.set(p,4),h=0,s=8;h<c;h++)v.set(a[h],s),s+=a[h].byteLength;return v},m.hdlr=function(p){return m.box(m.types.hdlr,m.HDLR_TYPES[p])},m.mdat=function(p){return m.box(m.types.mdat,p)},m.mdhd=function(p,s){s*=p;var l=Math.floor(s/(D+1)),a=Math.floor(s%(D+1));return m.box(m.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,p>>24&255,p>>16&255,p>>8&255,p&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]))},m.mdia=function(p){return m.box(m.types.mdia,m.mdhd(p.timescale,p.duration),m.hdlr(p.type),m.minf(p))},m.mfhd=function(p){return m.box(m.types.mfhd,new Uint8Array([0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255]))},m.minf=function(p){return p.type==="audio"?m.box(m.types.minf,m.box(m.types.smhd,m.SMHD),m.DINF,m.stbl(p)):m.box(m.types.minf,m.box(m.types.vmhd,m.VMHD),m.DINF,m.stbl(p))},m.moof=function(p,s,l){return m.box(m.types.moof,m.mfhd(p),m.traf(l,s))},m.moov=function(p){for(var s=p.length,l=[];s--;)l[s]=m.trak(p[s]);return m.box.apply(null,[m.types.moov,m.mvhd(p[0].timescale,p[0].duration)].concat(l).concat(m.mvex(p)))},m.mvex=function(p){for(var s=p.length,l=[];s--;)l[s]=m.trex(p[s]);return m.box.apply(null,[m.types.mvex].concat(l))},m.mvhd=function(p,s){s*=p;var l=Math.floor(s/(D+1)),a=Math.floor(s%(D+1)),d=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,p>>24&255,p>>16&255,p>>8&255,p&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 m.box(m.types.mvhd,d)},m.sdtp=function(p){var s=p.samples||[],l=new Uint8Array(4+s.length),a,d;for(a=0;a<s.length;a++)d=s[a].flags,l[a+4]=d.dependsOn<<4|d.isDependedOn<<2|d.hasRedundancy;return m.box(m.types.sdtp,l)},m.stbl=function(p){return m.box(m.types.stbl,m.stsd(p),m.box(m.types.stts,m.STTS),m.box(m.types.stsc,m.STSC),m.box(m.types.stsz,m.STSZ),m.box(m.types.stco,m.STCO))},m.avc1=function(p){var s=[],l=[],a,d,h;for(a=0;a<p.sps.length;a++)d=p.sps[a],h=d.byteLength,s.push(h>>>8&255),s.push(h&255),s=s.concat(Array.prototype.slice.call(d));for(a=0;a<p.pps.length;a++)d=p.pps[a],h=d.byteLength,l.push(h>>>8&255),l.push(h&255),l=l.concat(Array.prototype.slice.call(d));var c=m.box(m.types.avcC,new Uint8Array([1,s[3],s[4],s[5],252|3,224|p.sps.length].concat(s).concat([p.pps.length]).concat(l))),v=p.width,g=p.height,E=p.pixelRatio[0],n=p.pixelRatio[1];return m.box(m.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,v>>8&255,v&255,g>>8&255,g&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,m.box(m.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),m.box(m.types.pasp,new Uint8Array([E>>24,E>>16&255,E>>8&255,E&255,n>>24,n>>16&255,n>>8&255,n&255])))},m.esds=function(p){var s=p.config.length;return new Uint8Array([0,0,0,0,3,23+s,0,1,0,4,15+s,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([s]).concat(p.config).concat([6,1,2]))},m.mp4a=function(p){var s=p.samplerate;return m.box(m.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,p.channelCount,0,16,0,0,0,0,s>>8&255,s&255,0,0]),m.box(m.types.esds,m.esds(p)))},m.mp3=function(p){var s=p.samplerate;return m.box(m.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,p.channelCount,0,16,0,0,0,0,s>>8&255,s&255,0,0]))},m.stsd=function(p){return p.type==="audio"?!p.isAAC&&p.codec==="mp3"?m.box(m.types.stsd,m.STSD,m.mp3(p)):m.box(m.types.stsd,m.STSD,m.mp4a(p)):m.box(m.types.stsd,m.STSD,m.avc1(p))},m.tkhd=function(p){var s=p.id,l=p.duration*p.timescale,a=p.width,d=p.height,h=Math.floor(l/(D+1)),c=Math.floor(l%(D+1));return m.box(m.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,s>>24&255,s>>16&255,s>>8&255,s&255,0,0,0,0,h>>24,h>>16&255,h>>8&255,h&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,d>>8&255,d&255,0,0]))},m.traf=function(p,s){var l=m.sdtp(p),a=p.id,d=Math.floor(s/(D+1)),h=Math.floor(s%(D+1));return m.box(m.types.traf,m.box(m.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255])),m.box(m.types.tfdt,new Uint8Array([1,0,0,0,d>>24,d>>16&255,d>>8&255,d&255,h>>24,h>>16&255,h>>8&255,h&255])),m.trun(p,l.length+16+20+8+16+8+8),l)},m.trak=function(p){return p.duration=p.duration||4294967295,m.box(m.types.trak,m.tkhd(p),m.mdia(p))},m.trex=function(p){var s=p.id;return m.box(m.types.trex,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},m.trun=function(p,s){var l=p.samples||[],a=l.length,d=12+16*a,h=new Uint8Array(d),c,v,g,E,n,o;for(s+=8+d,h.set([0,0,15,1,a>>>24&255,a>>>16&255,a>>>8&255,a&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255],0),c=0;c<a;c++)v=l[c],g=v.duration,E=v.size,n=v.flags,o=v.cts,h.set([g>>>24&255,g>>>16&255,g>>>8&255,g&255,E>>>24&255,E>>>16&255,E>>>8&255,E&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,o>>>24&255,o>>>16&255,o>>>8&255,o&255],12+16*c);return m.box(m.types.trun,h)},m.initSegment=function(p){m.types||m.init();var s=m.moov(p),l=new Uint8Array(m.FTYP.byteLength+s.byteLength);return l.set(m.FTYP),l.set(s,m.FTYP.byteLength),l},m}();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,f.default=u},"./src/remux/mp4-remuxer.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return o}),C.d(f,"normalizePts",function(){return t});var D=C("./src/polyfills/number.ts"),u=C("./src/remux/aac-helper.ts"),m=C("./src/remux/mp4-generator.ts"),w=C("./src/events.ts"),p=C("./src/errors.ts"),s=C("./src/utils/logger.ts"),l=C("./src/types/loader.ts"),a=C("./src/utils/timescale-conversion.ts");function d(){return d=Object.assign||function(P){for(var O=1;O<arguments.length;O++){var x=arguments[O];for(var b in x)Object.prototype.hasOwnProperty.call(x,b)&&(P[b]=x[b])}return P},d.apply(this,arguments)}var h=10*1e3,c=1024,v=1152,g=null,E=null,n=!1,o=function(){function P(x,b,y,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=x,this.config=b,this.typeSupported=y,this.ISGenerated=!1,g===null){var M=navigator.userAgent||"",k=M.match(/Chrome\/(\d+)/i);g=k?parseInt(k[1]):0}if(E===null){var N=navigator.userAgent.match(/Safari\/(\d+)/i);E=N?parseInt(N[1]):0}n=!!g&&g<75||!!E&&E<600}var O=P.prototype;return O.destroy=function(){},O.resetTimeStamp=function(b){s.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=b},O.resetNextTimestamp=function(){s.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){s.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(b){var y=!1,T=b.reduce(function(M,k){var N=k.pts-M;return N<-4294967296?(y=!0,t(M,k.pts)):N>0?M:k.pts},b[0].pts);return y&&s.logger.debug("PTS rollover detected"),T},O.remux=function(b,y,T,M,k,N,K,z){var B,H,U,W,G,ee,ie=k,ce=k,_e=b.pid>-1,Ce=y.pid>-1,le=y.samples.length,ye=b.samples.length>0,fe=le>1,ne=(!_e||ye)&&(!Ce||fe)||this.ISGenerated||K;if(ne){this.ISGenerated||(U=this.generateIS(b,y,k));var ae=this.isVideoContiguous,q=-1;if(fe&&(q=S(y.samples),!ae&&this.config.forceKeyFrameOnDiscontinuity))if(ee=!0,q>0){s.logger.warn("[mp4-remuxer]: Dropped "+q+" out of "+le+" video samples due to a missing keyframe");var se=this.getVideoStartPts(y.samples);y.samples=y.samples.slice(q),y.dropped+=q,ce+=(y.samples[0].pts-se)/(y.timescale||9e4)}else q===-1&&(s.logger.warn("[mp4-remuxer]: No keyframe found out of "+le+" video samples"),ee=!1);if(this.ISGenerated){if(ye&&fe){var Q=this.getVideoStartPts(y.samples),Z=t(b.samples[0].pts,Q)-Q,be=Z/y.inputTimeScale;ie+=Math.max(0,be),ce+=Math.max(0,-be)}if(ye){if(b.samplerate||(s.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(b,y,k)),H=this.remuxAudio(b,ie,this.isAudioContiguous,N,Ce||fe||z===l.PlaylistLevelType.AUDIO?ce:void 0),fe){var re=H?H.endPTS-H.startPTS:0;y.inputTimeScale||(s.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(b,y,k)),B=this.remuxVideo(y,ce,ae,re)}}else fe&&(B=this.remuxVideo(y,ce,ae,0));B&&(B.firstKeyFrame=q,B.independent=q!==-1)}}return this.ISGenerated&&(T.samples.length&&(G=this.remuxID3(T,k)),M.samples.length&&(W=this.remuxText(M,k))),{audio:H,video:B,initSegment:U,independent:ee,text:W,id3:G}},O.generateIS=function(b,y,T){var M=b.samples,k=y.samples,N=this.typeSupported,K={},z=!Object(D.isFiniteNumber)(this._initPTS),B="audio/mp4",H,U,W;if(z&&(H=U=Infinity),b.config&&M.length&&(b.timescale=b.samplerate,b.isAAC||(N.mpeg?(B="audio/mpeg",b.codec=""):N.mp3&&(b.codec="mp3")),K.audio={id:"audio",container:B,codec:b.codec,initSegment:!b.isAAC&&N.mpeg?new Uint8Array(0):m.default.initSegment([b]),metadata:{channelCount:b.channelCount}},z&&(W=b.inputTimeScale,H=U=M[0].pts-Math.round(W*T))),y.sps&&y.pps&&k.length&&(y.timescale=y.inputTimeScale,K.video={id:"main",container:"video/mp4",codec:y.codec,initSegment:m.default.initSegment([y]),metadata:{width:y.width,height:y.height}},z)){W=y.inputTimeScale;var G=this.getVideoStartPts(k),ee=Math.round(W*T);U=Math.min(U,t(k[0].dts,G)-ee),H=Math.min(H,G-ee)}if(Object.keys(K).length)return this.ISGenerated=!0,z&&(this._initPTS=H,this._initDTS=U),{tracks:K,initPTS:H,timescale:W}},O.remuxVideo=function(b,y,T,M){var k=b.inputTimeScale,N=b.samples,K=[],z=N.length,B=this._initPTS,H=this.nextAvcDts,U=8,W,G,ee,ie=Number.POSITIVE_INFINITY,ce=Number.NEGATIVE_INFINITY,_e=0,Ce=!1;if(!T||H===null){var le=y*k,ye=N[0].pts-t(N[0].dts,N[0].pts);H=le-ye}for(var fe=0;fe<z;fe++){var ne=N[fe];if(ne.pts=t(ne.pts-B,H),ne.dts=t(ne.dts-B,H),ne.dts>ne.pts){var ae=9e4*.2;_e=Math.max(Math.min(_e,ne.pts-ne.dts),-1*ae)}ne.dts<N[fe>0?fe-1:fe].dts&&(Ce=!0)}Ce&&N.sort(function(sr,tr){var St=sr.dts-tr.dts,Nr=sr.pts-tr.pts;return St||Nr}),G=N[0].dts,ee=N[N.length-1].dts;var q=Math.round((ee-G)/(z-1));if(_e<0){if(_e<q*-2){s.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(a.toMsFromMpegTsClock)(-q,!0)+" ms");for(var se=_e,Q=0;Q<z;Q++)N[Q].dts=se=Math.max(se,N[Q].pts-q),N[Q].pts=Math.max(se,N[Q].pts)}else{s.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(a.toMsFromMpegTsClock)(_e,!0)+" ms to overcome this issue");for(var Z=0;Z<z;Z++)N[Z].dts=N[Z].dts+_e}G=N[0].dts}if(T){var be=G-H,re=be>q,Y=be<-1;if(re||Y){re?s.logger.warn("AVC: "+Object(a.toMsFromMpegTsClock)(be,!0)+" ms ("+be+"dts) hole between fragments detected, filling it"):s.logger.warn("AVC: "+Object(a.toMsFromMpegTsClock)(-be,!0)+" ms ("+be+"dts) overlapping between fragments detected"),G=H;var X=N[0].pts-be;N[0].dts=G,N[0].pts=X,s.logger.log("Video: First PTS/DTS adjusted: "+Object(a.toMsFromMpegTsClock)(X,!0)+"/"+Object(a.toMsFromMpegTsClock)(G,!0)+", delta: "+Object(a.toMsFromMpegTsClock)(be,!0)+" ms")}}n&&(G=Math.max(0,G));for(var $=0,ve=0,de=0;de<z;de++){for(var xe=N[de],Ke=xe.units,Ve=Ke.length,Xe=0,at=0;at<Ve;at++)Xe+=Ke[at].data.length;ve+=Xe,$+=Ve,xe.length=Xe,xe.dts=Math.max(xe.dts,G),xe.pts=Math.max(xe.pts,xe.dts,0),ie=Math.min(xe.pts,ie),ce=Math.max(xe.pts,ce)}ee=N[z-1].dts;var it=ve+4*$+8,lt;try{lt=new Uint8Array(it)}catch(sr){this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:p.ErrorTypes.MUX_ERROR,details:p.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:it,reason:"fail allocating video mdat "+it});return}var Me=new DataView(lt.buffer);Me.setUint32(0,it),lt.set(m.default.types.mdat,4);for(var Te=0;Te<z;Te++){for(var Ye=N[Te],ot=Ye.units,ze=0,rt=0,ke=ot.length;rt<ke;rt++){var Oe=ot[rt],Re=Oe.data,pe=Oe.data.byteLength;Me.setUint32(U,pe),U+=4,lt.set(Re,U),U+=pe,ze+=4+pe}if(Te<z-1)W=N[Te+1].dts-Ye.dts;else{var Ee=this.config,we=Ye.dts-N[Te>0?Te-1:Te].dts;if(Ee.stretchShortVideoTrack&&this.nextAudioPts!==null){var De=Math.floor(Ee.maxBufferHole*k),Ie=(M?ie+M*k:this.nextAudioPts)-Ye.pts;Ie>De?(W=Ie-we,W<0&&(W=we),s.logger.log("[mp4-remuxer]: It is approximately "+Ie/90+" ms to the next segment; using duration "+W/90+" ms for the last video frame.")):W=we}else W=we}var $e=Math.round(Ye.pts-Ye.dts);K.push(new _(Ye.key,W,ze,$e))}if(K.length&&g&&g<70){var qe=K[0].flags;qe.dependsOn=2,qe.isNonSync=0}console.assert(W!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=H=ee+W,this.isVideoContiguous=!0;var tt=m.default.moof(b.sequenceNumber++,G,d({},b,{samples:K})),xt="video",gt={data1:tt,data2:lt,startPTS:ie/k,endPTS:(ce+W)/k,startDTS:G/k,endDTS:H/k,type:xt,hasAudio:!1,hasVideo:!0,nb:K.length,dropped:b.dropped};return b.samples=[],b.dropped=0,console.assert(lt.length,"MDAT length must not be zero"),gt},O.remuxAudio=function(b,y,T,M,k){var N=b.inputTimeScale,K=b.samplerate?b.samplerate:N,z=N/K,B=b.isAAC?c:v,H=B*z,U=this._initPTS,W=!b.isAAC&&this.typeSupported.mpeg,G=[],ee=b.samples,ie=W?0:8,ce=this.nextAudioPts||-1,_e=y*N;if(this.isAudioContiguous=T=T||ee.length&&ce>0&&(M&&Math.abs(_e-ce)<9e3||Math.abs(t(ee[0].pts-U,_e)-ce)<20*H),ee.forEach(function(Re){Re.pts=t(Re.pts-U,_e)}),!T||ce<0){if(ee=ee.filter(function(Re){return Re.pts>=0}),!ee.length)return;k===0?ce=0:M?ce=Math.max(0,_e):ce=ee[0].pts}if(b.isAAC)for(var Ce=k!==void 0,le=this.config.maxAudioFramesDrift,ye=0,fe=ce;ye<ee.length;ye++){var ne=ee[ye],ae=ne.pts,q=ae-fe,se=Math.abs(1e3*q/N);if(q<=-le*H&&Ce)ye===0&&(s.logger.warn("Audio frame @ "+(ae/N).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*q/N)+" ms."),this.nextAudioPts=ce=fe=ae);else if(q>=le*H&&se<h&&Ce){var Q=Math.round(q/H);fe=ae-Q*H,fe<0&&(Q--,fe+=H),ye===0&&(this.nextAudioPts=ce=fe),s.logger.warn("[mp4-remuxer]: Injecting "+Q+" audio frame @ "+(fe/N).toFixed(3)+"s due to "+Math.round(1e3*q/N)+" ms gap.");for(var Z=0;Z<Q;Z++){var be=Math.max(fe,0),re=u.default.getSilentFrame(b.manifestCodec||b.codec,b.channelCount);re||(s.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),re=ne.unit.subarray()),ee.splice(ye,0,{unit:re,pts:be}),fe+=H,ye++}}ne.pts=fe,fe+=H}for(var Y=null,X=null,$,ve=0,de=ee.length;de--;)ve+=ee[de].unit.byteLength;for(var xe=0,Ke=ee.length;xe<Ke;xe++){var Ve=ee[xe],Xe=Ve.unit,at=Ve.pts;if(X!==null){var it=G[xe-1];it.duration=Math.round((at-X)/z)}else if(T&&b.isAAC&&(at=ce),Y=at,ve>0){ve+=ie;try{$=new Uint8Array(ve)}catch(Re){this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:p.ErrorTypes.MUX_ERROR,details:p.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ve,reason:"fail allocating audio mdat "+ve});return}if(!W){var lt=new DataView($.buffer);lt.setUint32(0,ve),$.set(m.default.types.mdat,4)}}else return;$.set(Xe,ie);var Me=Xe.byteLength;ie+=Me,G.push(new _(!0,B,Me,0)),X=at}var Te=G.length;if(!Te)return;var Ye=G[G.length-1];this.nextAudioPts=ce=X+z*Ye.duration;var ot=W?new Uint8Array(0):m.default.moof(b.sequenceNumber++,Y/z,d({},b,{samples:G}));b.samples=[];var ze=Y/N,rt=ce/N,ke="audio",Oe={data1:ot,data2:$,startPTS:ze,endPTS:rt,startDTS:ze,endDTS:rt,type:ke,hasAudio:!0,hasVideo:!1,nb:Te};return this.isAudioContiguous=!0,console.assert($.length,"MDAT length must not be zero"),Oe},O.remuxEmptyAudio=function(b,y,T,M){var k=b.inputTimeScale,N=b.samplerate?b.samplerate:k,K=k/N,z=this.nextAudioPts,B=(z!==null?z:M.startDTS*k)+this._initDTS,H=M.endDTS*k+this._initDTS,U=K*c,W=Math.ceil((H-B)/U),G=u.default.getSilentFrame(b.manifestCodec||b.codec,b.channelCount);if(s.logger.warn("[mp4-remuxer]: remux empty Audio"),!G){s.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ee=[],ie=0;ie<W;ie++){var ce=B+ie*U;ee.push({unit:G,pts:ce,dts:ce})}return b.samples=ee,this.remuxAudio(b,y,T,!1)},O.remuxID3=function(b,y){var T=b.samples.length;if(!T)return;for(var M=b.inputTimeScale,k=this._initPTS,N=this._initDTS,K=0;K<T;K++){var z=b.samples[K];z.pts=t(z.pts-k,y*M)/M,z.dts=t(z.dts-N,y*M)/M}var B=b.samples;return b.samples=[],{samples:B}},O.remuxText=function(b,y){var T=b.samples.length;if(!T)return;for(var M=b.inputTimeScale,k=this._initPTS,N=0;N<T;N++){var K=b.samples[N];K.pts=t(K.pts-k,y*M)/M}b.samples.sort(function(B,H){return B.pts-H.pts});var z=b.samples;return b.samples=[],{samples:z}},P}();function t(P,O){var x;if(O===null)return P;for(O<P?x=-8589934592:x=8589934592;Math.abs(P-O)>4294967296;)P+=x;return P}function S(P){for(var O=0;O<P.length;O++)if(P[O].key)return O;return-1}var _=function(O,x,b,y){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=x,this.size=b,this.cts=y,this.flags=new i(O)},i=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,f,C){"use strict";C.r(f);var D=C("./src/polyfills/number.ts"),u=C("./src/utils/mp4-tools.ts"),m=C("./src/loader/fragment.ts"),w=C("./src/utils/logger.ts"),p=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 d=a.prototype;return d.destroy=function(){},d.resetTimeStamp=function(c){this.initPTS=c,this.lastEndDTS=null},d.resetNextTimestamp=function(){this.lastEndDTS=null},d.resetInitSegment=function(c,v,g){this.audioCodec=v,this.videoCodec=g,this.generateInitSegment(c),this.emitInitSegment=!0},d.generateInitSegment=function(c){var v=this.audioCodec,g=this.videoCodec;if(!c||!c.byteLength){this.initTracks=void 0,this.initData=void 0;return}var E=this.initData=Object(u.parseInitSegment)(c);v||(v=l(E.audio,m.ElementaryStreamTypes.AUDIO)),g||(g=l(E.video,m.ElementaryStreamTypes.VIDEO));var n={};E.audio&&E.video?n.audiovideo={container:"video/mp4",codec:v+","+g,initSegment:c,id:"main"}:E.audio?n.audio={container:"audio/mp4",codec:v,initSegment:c,id:"audio"}:E.video?n.video={container:"video/mp4",codec:g,initSegment:c,id:"main"}:w.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},d.remux=function(c,v,g,E,n){var o=this.initPTS,t=this.lastEndDTS,S={audio:void 0,video:void 0,text:E,id3:g,initSegment:void 0};Object(D.isFiniteNumber)(t)||(t=this.lastEndDTS=n||0);var _=v.samples;if(!_||!_.length)return S;var i={initPTS:void 0,timescale:1},P=this.initData;if((!P||!P.length)&&(this.generateInitSegment(_),P=this.initData),!P||!P.length)return w.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),S;this.emitInitSegment&&(i.tracks=this.initTracks,this.emitInitSegment=!1),Object(D.isFiniteNumber)(o)||(this.initPTS=i.initPTS=o=s(P,_,t));var O=Object(u.getDuration)(_,P),x=t,b=O+x;Object(u.offsetStartDTS)(P,_,o),O>0?this.lastEndDTS=b:(w.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!P.audio,T=!!P.video,M="";y&&(M+="audio"),T&&(M+="video");var k={data1:_,startPTS:x,startDTS:x,endPTS:b,endDTS:b,type:M,hasAudio:y,hasVideo:T,nb:1,dropped:0};return S.audio=k.type==="audio"?k:void 0,S.video=k.type!=="audio"?k:void 0,S.text=E,S.id3=g,S.initSegment=i,S},a}(),s=function(d,h,c){return Object(u.getStartDTS)(d,h)-c};function l(a,d){var h=a==null?void 0:a.codec;return h&&h.length>4?h:h==="hvc1"?"hvc1.1.c.L120.90":h==="av01"?"av01.0.04M.08":h==="avc1"||d===m.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}f.default=p},"./src/task-loop.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"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 m=u.prototype;return m.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},m.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},m.onHandlerDestroyed=function(){},m.hasInterval=function(){return!!this._tickInterval},m.hasNextTick=function(){return!!this._tickTimer},m.setInterval=function(p){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,p),!0)},m.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},m.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},m.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},m.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},m.doTick=function(){},u}()},"./src/types/cmcd.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"CMCDVersion",function(){return D}),C.d(f,"CMCDObjectType",function(){return u}),C.d(f,"CMCDStreamingFormat",function(){return m}),C.d(f,"CMCDStreamType",function(){return w});var D=1,u;(function(p){p.MANIFEST="m",p.AUDIO="a",p.VIDEO="v",p.MUXED="av",p.INIT="i",p.CAPTION="c",p.TIMED_TEXT="tt",p.KEY="k",p.OTHER="o"})(u||(u={}));var m;(function(p){p.DASH="d",p.HLS="h",p.SMOOTH="s",p.OTHER="o"})(m||(m={}));var w;(function(p){p.VOD="v",p.LIVE="l"})(w||(w={}))},"./src/types/level.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"HlsSkip",function(){return m}),C.d(f,"getSkipValue",function(){return w}),C.d(f,"HlsUrlParameters",function(){return p}),C.d(f,"Level",function(){return s});function D(l,a){for(var d=0;d<a.length;d++){var h=a[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(l,h.key,h)}}function u(l,a,d){return a&&D(l.prototype,a),d&&D(l,d),l}var m;(function(l){l.No="",l.Yes="YES",l.v2="v2"})(m||(m={}));function w(l,a){var d=l.canSkipUntil,h=l.canSkipDateRanges,c=l.endSN,v=a!==void 0?a-c:0;return d&&v<d?h?m.v2:m.Yes:m.No}var p=function(){function l(d,h,c){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=d,this.part=h,this.skip=c}var a=l.prototype;return a.addDirectives=function(h){var c=new self.URL(h);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}(),s=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(d){return d}).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(d){var h=d%this.url.length;this._urlId!==h&&(this.details=void 0,this._urlId=h)}}]),l}()},"./src/types/loader.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"PlaylistContextType",function(){return D}),C.d(f,"PlaylistLevelType",function(){return u});var D;(function(m){m.MANIFEST="manifest",m.LEVEL="level",m.AUDIO_TRACK="audioTrack",m.SUBTITLE_TRACK="subtitleTrack"})(D||(D={}));var u;(function(m){m.MAIN="main",m.AUDIO="audio",m.SUBTITLE="subtitle"})(u||(u={}))},"./src/types/transmuxer.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"ChunkMetadata",function(){return D});var D=function(w,p,s,l,a,d){l===void 0&&(l=0),a===void 0&&(a=-1),d===void 0&&(d=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=u(),this.buffering={audio:u(),video:u(),audiovideo:u()},this.level=w,this.sn=p,this.id=s,this.size=l,this.part=a,this.partial=d};function u(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"AttrList",function(){return m});var D=/^(\d+)x(\d+)$/,u=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,m=function(){function w(s){typeof s=="string"&&(s=w.parseAttrList(s));for(var l in s)s.hasOwnProperty(l)&&(this[l]=s[l])}var p=w.prototype;return p.decimalInteger=function(l){var a=parseInt(this[l],10);return a>Number.MAX_SAFE_INTEGER?Infinity:a},p.hexadecimalInteger=function(l){if(this[l]){var a=(this[l]||"0x").slice(2);a=(a.length&1?"0":"")+a;for(var d=new Uint8Array(a.length/2),h=0;h<a.length/2;h++)d[h]=parseInt(a.slice(h*2,h*2+2),16);return d}else return null},p.hexadecimalIntegerAsNumber=function(l){var a=parseInt(this[l],16);return a>Number.MAX_SAFE_INTEGER?Infinity:a},p.decimalFloatingPoint=function(l){return parseFloat(this[l])},p.optionalFloat=function(l,a){var d=this[l];return d?parseFloat(d):a},p.enumeratedString=function(l){return this[l]},p.bool=function(l){return this[l]==="YES"},p.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,d={},h='"';for(u.lastIndex=0;(a=u.exec(l))!==null;){var c=a[2];c.indexOf(h)===0&&c.lastIndexOf(h)===c.length-1&&(c=c.slice(1,-1)),d[a[1]]=c}return d},w}()},"./src/utils/binary-search.ts":function(L,f,C){"use strict";C.r(f);var D={search:function(m,w){for(var p=0,s=m.length-1,l=null,a=null;p<=s;){l=(p+s)/2|0,a=m[l];var d=w(a);if(d>0)p=l+1;else if(d<0)s=l-1;else return a}return null}};f.default=D},"./src/utils/buffer-helper.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"BufferHelper",function(){return m});var D=C("./src/utils/logger.ts"),u={length:0,start:function(){return 0},end:function(){return 0}},m=function(){function w(){}return w.isBuffered=function(s,l){try{if(s){for(var a=w.getBuffered(s),d=0;d<a.length;d++)if(l>=a.start(d)&&l<=a.end(d))return!0}}catch(h){}return!1},w.bufferInfo=function(s,l,a){try{if(s){var d=w.getBuffered(s),h=[],c;for(c=0;c<d.length;c++)h.push({start:d.start(c),end:d.end(c)});return this.bufferedInfo(h,l,a)}}catch(v){}return{len:0,start:l,end:l,nextStart:void 0}},w.bufferedInfo=function(s,l,a){l=Math.max(0,l),s.sort(function(i,P){var O=i.start-P.start;return O||P.end-i.end});var d=[];if(a)for(var h=0;h<s.length;h++){var c=d.length;if(c){var v=d[c-1].end;s[h].start-v<a?s[h].end>v&&(d[c-1].end=s[h].end):d.push(s[h])}else d.push(s[h])}else d=s;for(var g=0,E,n=l,o=l,t=0;t<d.length;t++){var S=d[t].start,_=d[t].end;if(l+a>=S&&l<_)n=S,o=_,g=o-l;else if(l+a<S){E=S;break}}return{len:g,start:n||0,end:o||0,nextStart:E}},w.getBuffered=function(s){try{return s.buffered}catch(l){return D.logger.log("failed to get media.buffered",l),u}},w}()},"./src/utils/cea-608-parser.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"Row",function(){return o}),C.d(f,"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},m=function(b){var y=b;return u.hasOwnProperty(b)&&(y=u[b]),String.fromCharCode(y)},w=15,p=100,s={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},d={25:2,26:4,29:6,30:8,31:10,27:13,28:15},h=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c;(function(x){x[x.ERROR=0]="ERROR",x[x.TEXT=1]="TEXT",x[x.WARNING=2]="WARNING",x[x.INFO=2]="INFO",x[x.DEBUG=3]="DEBUG",x[x.DATA=3]="DATA"})(c||(c={}));var v=function(){function x(){this.time=null,this.verboseLevel=c.ERROR}var b=x.prototype;return b.log=function(T,M){this.verboseLevel>=T&&D.logger.log(this.time+" ["+T+"] "+M)},x}(),g=function(b){for(var y=[],T=0;T<b.length;T++)y.push(b[T].toString(16));return y},E=function(){function x(y,T,M,k,N){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=y||"white",this.underline=T||!1,this.italics=M||!1,this.background=k||"black",this.flash=N||!1}var b=x.prototype;return b.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},b.setStyles=function(T){for(var M=["foreground","underline","italics","background","flash"],k=0;k<M.length;k++){var N=M[k];T.hasOwnProperty(N)&&(this[N]=T[N])}},b.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},b.equals=function(T){return this.foreground===T.foreground&&this.underline===T.underline&&this.italics===T.italics&&this.background===T.background&&this.flash===T.flash},b.copy=function(T){this.foreground=T.foreground,this.underline=T.underline,this.italics=T.italics,this.background=T.background,this.flash=T.flash},b.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},x}(),n=function(){function x(y,T,M,k,N,K){this.uchar=void 0,this.penState=void 0,this.uchar=y||" ",this.penState=new E(T,M,k,N,K)}var b=x.prototype;return b.reset=function(){this.uchar=" ",this.penState.reset()},b.setChar=function(T,M){this.uchar=T,this.penState.copy(M)},b.setPenState=function(T){this.penState.copy(T)},b.equals=function(T){return this.uchar===T.uchar&&this.penState.equals(T.penState)},b.copy=function(T){this.uchar=T.uchar,this.penState.copy(T.penState)},b.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},x}(),o=function(){function x(y){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<p;T++)this.chars.push(new n);this.logger=y,this.pos=0,this.currPenState=new E}var b=x.prototype;return b.equals=function(T){for(var M=!0,k=0;k<p;k++)if(!this.chars[k].equals(T.chars[k])){M=!1;break}return M},b.copy=function(T){for(var M=0;M<p;M++)this.chars[M].copy(T.chars[M])},b.isEmpty=function(){for(var T=!0,M=0;M<p;M++)if(!this.chars[M].isEmpty()){T=!1;break}return T},b.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>p&&(this.logger.log(c.DEBUG,"Too large cursor position "+this.pos),this.pos=p)},b.moveCursor=function(T){var M=this.pos+T;if(T>1)for(var k=this.pos+1;k<M+1;k++)this.chars[k].setPenState(this.currPenState);this.setCursor(M)},b.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},b.insertChar=function(T){T>=144&&this.backSpace();var M=m(T);if(this.pos>=p){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)},b.clearFromPos=function(T){var M;for(M=T;M<p;M++)this.chars[M].reset()},b.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},b.clearToEndOfRow=function(){this.clearFromPos(this.pos)},b.getTextString=function(){for(var T=[],M=!0,k=0;k<p;k++){var N=this.chars[k].uchar;N!==" "&&(M=!1),T.push(N)}return M?"":T.join("")},b.setPenStyles=function(T){this.currPenState.setStyles(T);var M=this.chars[this.pos];M.setPenState(this.currPenState)},x}(),t=function(){function x(y){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 o(y));this.logger=y,this.currRow=w-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var b=x.prototype;return b.reset=function(){for(var T=0;T<w;T++)this.rows[T].clear();this.currRow=w-1},b.equals=function(T){for(var M=!0,k=0;k<w;k++)if(!this.rows[k].equals(T.rows[k])){M=!1;break}return M},b.copy=function(T){for(var M=0;M<w;M++)this.rows[M].copy(T.rows[M])},b.isEmpty=function(){for(var T=!0,M=0;M<w;M++)if(!this.rows[M].isEmpty()){T=!1;break}return T},b.backSpace=function(){var T=this.rows[this.currRow];T.backSpace()},b.clearToEndOfRow=function(){var T=this.rows[this.currRow];T.clearToEndOfRow()},b.insertChar=function(T){var M=this.rows[this.currRow];M.insertChar(T)},b.setPen=function(T){var M=this.rows[this.currRow];M.setPenStyles(T)},b.moveCursor=function(T){var M=this.rows[this.currRow];M.moveCursor(T)},b.setCursor=function(T){this.logger.log(c.INFO,"setCursor: "+T);var M=this.rows[this.currRow];M.setCursor(T)},b.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 k=0;k<w;k++)this.rows[k].clear();var N=this.currRow+1-this.nrRollUpRows,K=this.lastOutputScreen;if(K){var z=K.rows[N].cueStartTime,B=this.logger.time;if(z&&B!==null&&z<B)for(var H=0;H<this.nrRollUpRows;H++)this.rows[M-this.nrRollUpRows+H+1].copy(K.rows[N+H])}}this.currRow=M;var U=this.rows[this.currRow];if(T.indent!==null){var W=T.indent,G=Math.max(W-1,0);U.setCursor(T.indent),T.color=U.chars[G].penState.foreground}var ee={foreground:T.color,underline:T.underline,italics:T.italics,background:"black",flash:!1};this.setPen(ee)},b.setBkgData=function(T){this.logger.log(c.INFO,"bkgData = "+JSON.stringify(T)),this.backSpace(),this.setPen(T),this.insertChar(32)},b.setRollUpRows=function(T){this.nrRollUpRows=T},b.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")},b.getDisplayText=function(T){T=T||!1;for(var M=[],k="",N=-1,K=0;K<w;K++){var z=this.rows[K].getTextString();z&&(N=K+1,T?M.push("Row "+N+": '"+z+"'"):M.push(z.trim()))}return M.length>0&&(T?k="["+M.join(" | ")+"]":k=M.join(`
|
|
|
`)),k},b.getTextAndFormat=function(){return this.rows},x}(),S=function(){function x(y,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=y,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 b=x.prototype;return b.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},b.getHandler=function(){return this.outputFilter},b.setHandler=function(T){this.outputFilter=T},b.setPAC=function(T){this.writeScreen.setPAC(T)},b.setBkgData=function(T){this.writeScreen.setBkgData(T)},b.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},b.insertChars=function(T){for(var M=0;M<T.length;M++)this.writeScreen.insertChar(T[M]);var k=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(c.INFO,k+": "+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())},b.ccRCL=function(){this.logger.log(c.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},b.ccBS=function(){if(this.logger.log(c.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},b.ccAOF=function(){},b.ccAON=function(){},b.ccDER=function(){this.logger.log(c.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},b.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)},b.ccFON=function(){this.logger.log(c.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},b.ccRDC=function(){this.logger.log(c.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},b.ccTR=function(){this.logger.log(c.INFO,"TR"),this.setMode("MODE_TEXT")},b.ccRTD=function(){this.logger.log(c.INFO,"RTD"),this.setMode("MODE_TEXT")},b.ccEDM=function(){this.logger.log(c.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},b.ccCR=function(){this.logger.log(c.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},b.ccENM=function(){this.logger.log(c.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},b.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)},b.ccTO=function(T){this.logger.log(c.INFO,"TO("+T+") - Tab Offset"),this.writeScreen.moveCursor(T)},b.ccMIDROW=function(T){var M={flash:!1};if(M.underline=T%2===1,M.italics=T>=46,M.italics)M.foreground="white";else{var k=Math.floor(T/2)-16,N=["white","green","blue","cyan","red","yellow","magenta"];M.foreground=N[k]}this.logger.log(c.INFO,"MIDROW: "+JSON.stringify(M)),this.writeScreen.setPen(M)},b.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))},b.cueSplitAtTime=function(T){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,T,this.displayedMemory),this.cueStartTime=T))},x}(),_=function(){function x(y,T,M){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var k=new v;this.channels=[null,new S(y,T,k),new S(y+1,M,k)],this.cmdHistory=O(),this.logger=k}var b=x.prototype;return b.getHandler=function(T){return this.channels[T].getHandler()},b.setHandler=function(T,M){this.channels[T].setHandler(M)},b.addData=function(T,M){var k,N,K,z=!1;this.logger.time=T;for(var B=0;B<M.length;B+=2){if(N=M[B]&127,K=M[B+1]&127,N===0&&K===0)continue;if(this.logger.log(c.DATA,"["+g([M[B],M[B+1]])+"] -> ("+g([N,K])+")"),k=this.parseCmd(N,K),k||(k=this.parseMidrow(N,K)),k||(k=this.parsePAC(N,K)),k||(k=this.parseBackgroundAttributes(N,K)),!k&&(z=this.parseChars(N,K),z)){var H=this.currentChannel;if(H&&H>0){var U=this.channels[H];U.insertChars(z)}else this.logger.log(c.WARNING,"No channel found yet. TEXT-MODE?")}!k&&!z&&this.logger.log(c.WARNING,"Couldn't parse cleaned data "+g([N,K])+" orig: "+g([M[B],M[B+1]]))}},b.parseCmd=function(T,M){var k=this.cmdHistory,N=(T===20||T===28||T===21||T===29)&&M>=32&&M<=47,K=(T===23||T===31)&&M>=33&&M<=35;if(!(N||K))return!1;if(P(T,M,k))return i(null,null,k),this.logger.log(c.DEBUG,"Repeated command ("+g([T,M])+") is dropped"),!0;var z=T===20||T===21||T===23?1:2,B=this.channels[z];return T===20||T===21||T===28||T===29?M===32?B.ccRCL():M===33?B.ccBS():M===34?B.ccAOF():M===35?B.ccAON():M===36?B.ccDER():M===37?B.ccRU(2):M===38?B.ccRU(3):M===39?B.ccRU(4):M===40?B.ccFON():M===41?B.ccRDC():M===42?B.ccTR():M===43?B.ccRTD():M===44?B.ccEDM():M===45?B.ccCR():M===46?B.ccENM():M===47&&B.ccEOC():B.ccTO(M-32),i(T,M,k),this.currentChannel=z,!0},b.parseMidrow=function(T,M){var k=0;if((T===17||T===25)&&M>=32&&M<=47){if(T===17?k=1:k=2,k!==this.currentChannel)return this.logger.log(c.ERROR,"Mismatch channel in midrow parsing"),!1;var N=this.channels[k];return N?(N.ccMIDROW(M),this.logger.log(c.DEBUG,"MIDROW ("+g([T,M])+")"),!0):!1}return!1},b.parsePAC=function(T,M){var k,N=this.cmdHistory,K=(T>=17&&T<=23||T>=25&&T<=31)&&M>=64&&M<=127,z=(T===16||T===24)&&M>=64&&M<=95;if(!(K||z))return!1;if(P(T,M,N))return i(null,null,N),!0;var B=T<=23?1:2;M>=64&&M<=95?k=B===1?s[T]:a[T]:k=B===1?l[T]:d[T];var H=this.channels[B];return H?(H.setPAC(this.interpretPAC(k,M)),i(T,M,N),this.currentChannel=B,!0):!1},b.interpretPAC=function(T,M){var k,N={color:null,italics:!1,indent:null,underline:!1,row:T};return M>95?k=M-96:k=M-64,N.underline=(k&1)===1,k<=13?N.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(k/2)]:k<=15?(N.italics=!0,N.color="white"):N.indent=Math.floor((k-16)/2)*4,N},b.parseChars=function(T,M){var k,N=null,K=null;if(T>=25?(k=2,K=T-8):(k=1,K=T),K>=17&&K<=19){var z;K===17?z=M+80:K===18?z=M+112:z=M+144,this.logger.log(c.INFO,"Special char '"+m(z)+"' in channel "+k),N=[z]}else T>=32&&T<=127&&(N=M===0?[T]:[T,M]);if(N){var B=g(N);this.logger.log(c.DEBUG,"Char codes = "+B.join(",")),i(T,M,this.cmdHistory)}return N},b.parseBackgroundAttributes=function(T,M){var k=(T===16||T===24)&&M>=32&&M<=47,N=(T===23||T===31)&&M>=45&&M<=47;if(!(k||N))return!1;var K,z={};T===16||T===24?(K=Math.floor((M-32)/2),z.background=h[K],M%2===1&&(z.background=z.background+"_semi")):M===45?z.background="transparent":(z.foreground="black",M===47&&(z.underline=!0));var B=T<=23?1:2,H=this.channels[B];return H.setBkgData(z),i(T,M,this.cmdHistory),!0},b.reset=function(){for(var T=0;T<Object.keys(this.channels).length;T++){var M=this.channels[T];M&&M.reset()}this.cmdHistory=O()},b.cueSplitAtTime=function(T){for(var M=0;M<this.channels.length;M++){var k=this.channels[M];k&&k.cueSplitAtTime(T)}},x}();function i(x,b,y){y.a=x,y.b=b}function P(x,b,y){return y.a===x&&y.b===b}function O(){return{a:null,b:null}}f.default=_},"./src/utils/codecs.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"isCodecType",function(){return u}),C.d(f,"isCodecSupportedInMp4",function(){return m});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,p){var s=D[p];return!!s&&s[w.slice(0,4)]===!0}function m(w,p){return MediaSource.isTypeSupported((p||"video")+'/mp4;codecs="'+w+'"')}},"./src/utils/cues.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/utils/vttparser.ts"),u=C("./src/utils/webvtt-parser.ts"),m=C("./src/utils/texttrack-utils.ts"),w=/\s/,p={newCue:function(l,a,d,h){for(var c=[],v,g,E,n,o,t=self.VTTCue||self.TextTrackCue,S=0;S<h.rows.length;S++)if(v=h.rows[S],E=!0,n=0,o="",!v.isEmpty()){for(var _=0;_<v.chars.length;_++)w.test(v.chars[_].uchar)&&E?n++:(o+=v.chars[_].uchar,E=!1);v.cueStartTime=a,a===d&&(d+=1e-4),n>=16?n--:n++;var i=Object(D.fixLineBreaks)(o.trim()),P=Object(u.generateCueId)(a,d,i);(!l||!l.cues||!l.cues.getCueById(P))&&(g=new t(a,d,i),g.id=P,g.line=S+1,g.align="left",g.position=10+Math.min(80,Math.floor(n*8/32)*10),c.push(g))}return l&&c.length&&(c.sort(function(O,x){return O.line==="auto"||x.line==="auto"?0:O.line>8&&x.line>8?x.line-O.line:O.line-x.line}),c.forEach(function(O){return Object(m.addCueToTrack)(l,O)})),c}};f.default=p},"./src/utils/discontinuities.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"findFirstFragWithCC",function(){return w}),C.d(f,"shouldAlignOnDiscontinuities",function(){return p}),C.d(f,"findDiscontinuousReferenceFrag",function(){return s}),C.d(f,"adjustSlidingStart",function(){return a}),C.d(f,"alignStream",function(){return d}),C.d(f,"alignPDT",function(){return c}),C.d(f,"alignFragmentByPDTDelta",function(){return v}),C.d(f,"alignMediaPlaylistByPDT",function(){return g});var D=C("./src/polyfills/number.ts"),u=C("./src/utils/logger.ts"),m=C("./src/controller/level-helper.ts");function w(E,n){for(var o=null,t=0,S=E.length;t<S;t++){var _=E[t];if(_&&_.cc===n){o=_;break}}return o}function p(E,n,o){return!!(n.details&&(o.endCC>o.startCC||E&&E.cc<o.startCC))}function s(E,n){var o=E.fragments,t=n.fragments;if(!t.length||!o.length){u.logger.log("No fragments to align");return}var S=w(o,t[0].cc);if(!S||S&&!S.startPTS){u.logger.log("No frag in previous level to align on");return}return S}function l(E,n){if(E){var o=E.start+n;E.start=E.startPTS=o,E.endPTS=o+E.duration}}function a(E,n){for(var o=n.fragments,t=0,S=o.length;t<S;t++)l(o[t],E);n.fragmentHint&&l(n.fragmentHint,E),n.alignedSliding=!0}function d(E,n,o){if(!n)return;h(E,o,n),!o.alignedSliding&&n.details&&c(o,n.details),!o.alignedSliding&&n.details&&!o.skippedSegments&&Object(m.adjustSliding)(n.details,o)}function h(E,n,o){if(p(E,o,n)){var t=s(o.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(E,n){if(!n.fragments.length||!E.hasProgramDateTime||!n.hasProgramDateTime)return;var o=n.fragments[0].programDateTime,t=E.fragments[0].programDateTime,S=(t-o)/1e3+n.fragments[0].start;S&&Object(D.isFiniteNumber)(S)&&(u.logger.log("Adjusting PTS using programDateTime delta "+(t-o)+"ms, sliding:"+S.toFixed(3)+" "+E.url+" "),a(S,E))}function v(E,n){var o=E.programDateTime;if(!o)return;var t=(o-n)/1e3;E.start=E.startPTS=t,E.endPTS=t+E.duration}function g(E,n){if(!n.fragments.length||!E.hasProgramDateTime||!n.hasProgramDateTime)return;var o=n.fragments[0].programDateTime,t=n.fragments[0].start,S=o-t*1e3;E.fragments.forEach(function(_){v(_,S)}),E.fragmentHint&&v(E.fragmentHint,S),E.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/utils/ewma.ts"),u=function(){function m(p,s,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(p),this.fast_=new D.default(s)}var w=m.prototype;return w.update=function(s,l){var a=this.slow_,d=this.fast_;this.slow_.halfLife!==s&&(this.slow_=new D.default(s,a.getEstimate(),a.getTotalWeight())),this.fast_.halfLife!==l&&(this.fast_=new D.default(l,d.getEstimate(),d.getTotalWeight()))},w.sample=function(s,l){s=Math.max(s,this.minDelayMs_);var a=8*l,d=s/1e3,h=a/d;this.fast_.sample(d,h),this.slow_.sample(d,h)},w.canEstimate=function(){var s=this.fast_;return s&&s.getTotalWeight()>=this.minWeight_},w.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},w.destroy=function(){},m}();f.default=u},"./src/utils/ewma.ts":function(L,f,C){"use strict";C.r(f);var D=function(){function u(w,p,s){p===void 0&&(p=0),s===void 0&&(s=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_=p,this.totalWeight_=s}var m=u.prototype;return m.sample=function(p,s){var l=Math.pow(this.alpha_,p);this.estimate_=s*(1-l)+l*this.estimate_,this.totalWeight_+=p},m.getTotalWeight=function(){return this.totalWeight_},m.getEstimate=function(){if(this.alpha_){var p=1-Math.pow(this.alpha_,this.totalWeight_);if(p)return this.estimate_/p}return this.estimate_},u}();f.default=D},"./src/utils/fetch-loader.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"fetchSupported",function(){return v});var D=C("./src/polyfills/number.ts"),u=C("./src/loader/load-stats.ts"),m=C("./src/demux/chunk-cache.ts");function w(t,S){t.prototype=Object.create(S.prototype),t.prototype.constructor=t,d(t,S)}function p(t){var S=typeof Map=="function"?new Map:void 0;return p=function(i){if(i===null||!a(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof S!="undefined"){if(S.has(i))return S.get(i);S.set(i,P)}function P(){return s(i,arguments,h(this).constructor)}return P.prototype=Object.create(i.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),d(P,i)},p(t)}function s(t,S,_){return l()?s=Reflect.construct:s=function(P,O,x){var b=[null];b.push.apply(b,O);var y=Function.bind.apply(P,b),T=new y;return x&&d(T,x.prototype),T},s.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 d(t,S){return d=Object.setPrototypeOf||function(i,P){return i.__proto__=P,i},d(t,S)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},h(t)}function c(){return c=Object.assign||function(t){for(var S=1;S<arguments.length;S++){var _=arguments[S];for(var i in _)Object.prototype.hasOwnProperty.call(_,i)&&(t[i]=_[i])}return t},c.apply(this,arguments)}function v(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var g=function(){function t(_){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=_.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 i=this.response;(!i||!i.ok)&&(this.stats.aborted=!0,this.controller.abort())},S.abort=function(){var i;this.abortInternal(),(i=this.callbacks)!==null&&i!==void 0&&i.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},S.load=function(i,P,O){var x=this,b=this.stats;if(b.loading.start)throw new Error("Loader can only be used once.");b.loading.start=self.performance.now();var y=E(i,this.controller.signal),T=O.onProgress,M=i.responseType==="arraybuffer",k=M?"byteLength":"length";this.context=i,this.config=P,this.callbacks=O,this.request=this.fetchSetup(i,y),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){x.abortInternal(),O.onTimeout(b,i,x.response)},P.timeout),self.fetch(this.request).then(function(N){if(x.response=x.loader=N,!N.ok){var K=N.status,z=N.statusText;throw new o(z||"fetch, bad network response",K,N)}return b.loading.first=Math.max(self.performance.now(),b.loading.start),b.total=parseInt(N.headers.get("Content-Length")||"0"),T&&Object(D.isFiniteNumber)(P.highWaterMark)?x.loadProgressively(N,b,i,P.highWaterMark,T):M?N.arrayBuffer():N.text()}).then(function(N){var K=x.response;self.clearTimeout(x.requestTimeout),b.loading.end=Math.max(self.performance.now(),b.loading.first),b.loaded=b.total=N[k];var z={url:K.url,data:N};T&&!Object(D.isFiniteNumber)(P.highWaterMark)&&T(b,i,N,K),O.onSuccess(z,b,i,K)}).catch(function(N){if(self.clearTimeout(x.requestTimeout),b.aborted)return;var K=N.code||0;O.onError({code:K,text:N.message},i,N.details)})},S.getCacheAge=function(){var i=null;if(this.response){var P=this.response.headers.get("age");i=P?parseFloat(P):null}return i},S.loadProgressively=function(i,P,O,x,b){x===void 0&&(x=0);var y=new m.default,T=i.body.getReader(),M=function k(){return T.read().then(function(N){if(N.done)return y.dataLength&&b(P,O,y.flush(),i),Promise.resolve(new ArrayBuffer(0));var K=N.value,z=K.length;return P.loaded+=z,z<x||y.dataLength?(y.push(K),y.dataLength>=x&&b(P,O,y.flush(),i)):b(P,O,K,i),k()}).catch(function(){return Promise.reject()})};return M()},t}();function E(t,S){var _={method:"GET",mode:"cors",credentials:"same-origin",signal:S,headers:new self.Headers(c({},t.headers))};return t.rangeEnd&&_.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),_}function n(t,S){return new self.Request(t.url,S)}var o=function(t){w(S,t);function S(_,i,P){var O;return O=t.call(this,_)||this,O.code=void 0,O.details=void 0,O.code=i,O.details=P,O}return S}(p(Error));f.default=g},"./src/utils/imsc1-ttml-parser.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"IMSC1_CODEC",function(){return a}),C.d(f,"parseIMSC1",function(){return v});var D=C("./src/utils/mp4-tools.ts"),u=C("./src/utils/vttparser.ts"),m=C("./src/utils/vttcue.ts"),w=C("./src/demux/id3.ts"),p=C("./src/utils/timescale-conversion.ts"),s=C("./src/utils/webvtt-parser.ts");function l(){return l=Object.assign||function(x){for(var b=1;b<arguments.length;b++){var y=arguments[b];for(var T in y)Object.prototype.hasOwnProperty.call(y,T)&&(x[T]=y[T])}return x},l.apply(this,arguments)}var a="stpp.ttml.im1t",d=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,h=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,c={left:"start",center:"center",right:"end",start:"start",end:"end"};function v(x,b,y,T,M){var k=Object(D.findBox)(new Uint8Array(x),["mdat"]);if(k.length===0){M(new Error("Could not parse IMSC1 mdat"));return}var N=k[0],K=Object(w.utf8ArrayToStr)(new Uint8Array(x,N.start,N.end-N.start)),z=Object(p.toTimescaleFromScale)(b,1,y);try{T(g(K,z))}catch(B){M(B)}}function g(x,b){var y=new DOMParser,T=y.parseFromString(x,"text/xml"),M=T.getElementsByTagName("tt")[0];if(!M)throw new Error("Invalid ttml");var k={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},N=Object.keys(k).reduce(function(U,W){return U[W]=M.getAttribute("ttp:"+W)||k[W],U},{}),K=M.getAttribute("xml:space")!=="preserve",z=n(E(M,"styling","style")),B=n(E(M,"layout","region")),H=E(M,"body","[begin]");return[].map.call(H,function(U){var W=o(U,K);if(!W||!U.hasAttribute("begin"))return null;var G=i(U.getAttribute("begin"),N),ee=i(U.getAttribute("dur"),N),ie=i(U.getAttribute("end"),N);if(G===null)throw _(U);if(ie===null){if(ee===null)throw _(U);ie=G+ee}var ce=new m.default(G-b,ie-b,W);ce.id=Object(s.generateCueId)(ce.startTime,ce.endTime,ce.text);var _e=B[U.getAttribute("region")],Ce=z[U.getAttribute("style")];ce.position=10,ce.size=80;var le=t(_e,Ce),ye=le.textAlign;if(ye){var fe=c[ye];fe&&(ce.lineAlign=fe),ce.align=ye}return l(ce,le),ce}).filter(function(U){return U!==null})}function E(x,b,y){var T=x.getElementsByTagName(b)[0];return T?[].slice.call(T.querySelectorAll(y)):[]}function n(x){return x.reduce(function(b,y){var T=y.getAttribute("xml:id");return T&&(b[T]=y),b},{})}function o(x,b){return[].slice.call(x.childNodes).reduce(function(y,T,M){var k;return T.nodeName==="br"&&M?y+`
|
|
|
`:(k=T.childNodes)!==null&&k!==void 0&&k.length?o(T,b):b?y+T.textContent.trim().replace(/\s+/g," "):y+T.textContent},"")}function t(x,b){var y="http://www.w3.org/ns/ttml#styling",T=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return T.reduce(function(M,k){var N=S(b,y,k)||S(x,y,k);return N&&(M[k]=N),M},{})}function S(x,b,y){return x.hasAttributeNS(b,y)?x.getAttributeNS(b,y):null}function _(x){return new Error("Could not parse ttml timestamp "+x)}function i(x,b){if(!x)return null;var y=Object(u.parseTimeStamp)(x);return y===null&&(d.test(x)?y=P(x,b):h.test(x)&&(y=O(x,b))),y}function P(x,b){var y=d.exec(x),T=(y[4]|0)+(y[5]|0)/b.subFrameRate;return(y[1]|0)*3600+(y[2]|0)*60+(y[3]|0)+T/b.frameRate}function O(x,b){var y=h.exec(x),T=Number(y[1]),M=y[2];switch(M){case"h":return T*3600;case"m":return T*60;case"ms":return T*1e3;case"f":return T/b.frameRate;case"t":return T/b.tickRate}return T}},"./src/utils/logger.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"enableLogs",function(){return s}),C.d(f,"logger",function(){return l});var D=function(){},u={trace:D,debug:D,log:D,warn:D,info:D,error:D},m=u;function w(a){var d=self.console[a];return d?d.bind(self.console,"["+a+"] >"):D}function p(a){for(var d=arguments.length,h=new Array(d>1?d-1:0),c=1;c<d;c++)h[c-1]=arguments[c];h.forEach(function(v){m[v]=a[v]?a[v].bind(a):w(v)})}function s(a){if(self.console&&a===!0||typeof a=="object"){p(a,"debug","log","info","warn","error");try{m.log()}catch(d){m=u}}else m=u}var l=m},"./src/utils/mediakeys-helper.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"KeySystems",function(){return D}),C.d(f,"requestMediaKeySystemAccess",function(){return u});var D;(function(m){m.WIDEVINE="com.widevine.alpha",m.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,f,C){"use strict";C.r(f),C.d(f,"getMediaSource",function(){return D});function D(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"bin2str",function(){return p}),C.d(f,"readUint16",function(){return s}),C.d(f,"readUint32",function(){return l}),C.d(f,"writeUint32",function(){return a}),C.d(f,"findBox",function(){return d}),C.d(f,"parseSegmentIndex",function(){return h}),C.d(f,"parseInitSegment",function(){return c}),C.d(f,"getStartDTS",function(){return v}),C.d(f,"getDuration",function(){return g}),C.d(f,"computeRawDurationFromSamples",function(){return E}),C.d(f,"offsetStartDTS",function(){return n}),C.d(f,"segmentValidRange",function(){return o}),C.d(f,"appendUint8Array",function(){return t});var D=C("./src/utils/typed-array.ts"),u=C("./src/loader/fragment.ts"),m=Math.pow(2,32)-1,w=[].push;function p(S){return String.fromCharCode.apply(null,S)}function s(S,_){"data"in S&&(_+=S.start,S=S.data);var i=S[_]<<8|S[_+1];return i<0?65536+i:i}function l(S,_){"data"in S&&(_+=S.start,S=S.data);var i=S[_]<<24|S[_+1]<<16|S[_+2]<<8|S[_+3];return i<0?4294967296+i:i}function a(S,_,i){"data"in S&&(_+=S.start,S=S.data),S[_]=i>>24,S[_+1]=i>>16&255,S[_+2]=i>>8&255,S[_+3]=i&255}function d(S,_){var i=[];if(!_.length)return i;var P,O,x;"data"in S?(P=S.data,O=S.start,x=S.end):(P=S,O=0,x=P.byteLength);for(var b=O;b<x;){var y=l(P,b),T=p(P.subarray(b+4,b+8)),M=y>1?b+y:x;if(T===_[0])if(_.length===1)i.push({data:P,start:b+8,end:M});else{var k=d({data:P,start:b+8,end:M},_.slice(1));k.length&&w.apply(i,k)}b=M}return i}function h(S){var _=d(S,["moov"]),i=_[0],P=i?i.end:null,O=d(S,["sidx"]);if(!O||!O[0])return null;var x=[],b=O[0],y=b.data[0],T=y===0?8:16,M=l(b,T);T+=4;var k=0,N=0;y===0?T+=8:T+=16,T+=2;var K=b.end+N,z=s(b,T);T+=2;for(var B=0;B<z;B++){var H=T,U=l(b,H);H+=4;var W=U&2147483647,G=(U&2147483648)>>>31;if(G===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ee=l(b,H);H+=4,x.push({referenceSize:W,subsegmentDuration:ee,info:{duration:ee/M,start:K,end:K+W-1}}),K+=W,H+=4,T=H}return{earliestPresentationTime:k,timescale:M,version:y,referencesCount:z,references:x,moovEndOffset:P}}function c(S){for(var _=[],i=d(S,["moov","trak"]),P=0;P<i.length;P++){var O=i[P],x=d(O,["tkhd"])[0];if(x){var b=x.data[x.start],y=b===0?12:20,T=l(x,y),M=d(O,["mdia","mdhd"])[0];if(M){b=M.data[M.start],y=b===0?12:20;var k=l(M,y),N=d(O,["mdia","hdlr"])[0];if(N){var K=p(N.data.subarray(N.start+8,N.start+12)),z={soun:u.ElementaryStreamTypes.AUDIO,vide:u.ElementaryStreamTypes.VIDEO}[K];if(z){var B=d(O,["mdia","minf","stbl","stsd"])[0],H=void 0;B&&(H=p(B.data.subarray(B.start+12,B.start+16))),_[T]={timescale:k,type:z},_[z]={timescale:k,id:T,codec:H}}}}}}var U=d(S,["moov","mvex","trex"]);return U.forEach(function(W){var G=l(W,4),ee=_[G];ee&&(ee.default={duration:l(W,12),flags:l(W,20)})}),_}function v(S,_){return d(_,["moof","traf"]).reduce(function(i,P){var O=d(P,["tfdt"])[0],x=O.data[O.start],b=d(P,["tfhd"]).reduce(function(y,T){var M=l(T,4),k=S[M];if(k){var N=l(O,4);x===1&&(N*=Math.pow(2,32),N+=l(O,8));var K=k.timescale||9e4,z=N/K;if(isFinite(z)&&(y===null||z<y))return z}return y},null);return b!==null&&isFinite(b)&&(i===null||b<i)?b:i},null)||0}function g(S,_){for(var i=0,P=0,O=0,x=d(S,["moof","traf"]),b=0;b<x.length;b++){var y=x[b],T=d(y,["tfhd"])[0],M=l(T,4),k=_[M];if(!k)continue;var N=k.default,K=l(T,0)|(N==null?void 0:N.flags),z=N==null?void 0:N.duration;K&8&&(K&2?z=l(T,12):z=l(T,8));for(var B=k.timescale||9e4,H=d(y,["trun"]),U=0;U<H.length;U++){if(z){var W=l(H[U],4);i=z*W}else i=E(H[U]);k.type===u.ElementaryStreamTypes.VIDEO?P+=i/B:k.type===u.ElementaryStreamTypes.AUDIO&&(O+=i/B)}}if(P===0&&O===0){var G=h(S);if(G!=null&&G.references)return G.references.reduce(function(ee,ie){return ee+ie.info.duration||0},0)}return P||O}function E(S){var _=l(S,0),i=8;_&1&&(i+=4),_&4&&(i+=4);for(var P=0,O=l(S,4),x=0;x<O;x++){if(_&256){var b=l(S,i);P+=b,i+=4}_&512&&(i+=4),_&1024&&(i+=4),_&2048&&(i+=4)}return P}function n(S,_,i){d(_,["moof","traf"]).forEach(function(P){d(P,["tfhd"]).forEach(function(O){var x=l(O,4),b=S[x];if(!b)return;var y=b.timescale||9e4;d(P,["tfdt"]).forEach(function(T){var M=T.data[T.start],k=l(T,4);if(M===0)a(T,4,k-i*y);else{k*=Math.pow(2,32),k+=l(T,8),k-=i*y,k=Math.max(k,0);var N=Math.floor(k/(m+1)),K=Math.floor(k%(m+1));a(T,4,N),a(T,8,K)}})})})}function o(S){var _={valid:null,remainder:null},i=d(S,["moof"]);if(i){if(i.length<2)return _.remainder=S,_}else return _;var P=i[i.length-1];return _.valid=Object(D.sliceUint8)(S,0,P.start-8),_.remainder=Object(D.sliceUint8)(S,P.start-8),_}function t(S,_){var i=new Uint8Array(S.length+_.length);return i.set(S),i.set(_,S.length),i}},"./src/utils/output-filter.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return D});var D=function(){function u(w,p){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=w,this.trackName=p}var m=u.prototype;return m.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},m.newCue=function(p,s,l){(this.startTime===null||this.startTime>p)&&(this.startTime=p),this.endTime=s,this.screen=l,this.timelineController.createCaptionsTrack(this.trackName)},m.reset=function(){this.cueRanges=[]},u}()},"./src/utils/texttrack-utils.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"sendAddTrackEvent",function(){return u}),C.d(f,"addCueToTrack",function(){return m}),C.d(f,"clearCurrentCues",function(){return w}),C.d(f,"removeCuesInRange",function(){return p}),C.d(f,"getCuesInRange",function(){return l});var D=C("./src/utils/logger.ts");function u(a,d){var h;try{h=new Event("addtrack")}catch(c){h=document.createEvent("Event"),h.initEvent("addtrack",!1,!1)}h.track=a,d.dispatchEvent(h)}function m(a,d){var h=a.mode;if(h==="disabled"&&(a.mode="hidden"),a.cues&&!a.cues.getCueById(d.id))try{if(a.addCue(d),!a.cues.getCueById(d.id))throw new Error("addCue is failed for: "+d)}catch(v){D.logger.debug("[texttrack-utils]: "+v);var c=new self.TextTrackCue(d.startTime,d.endTime,d.text);c.id=d.id,a.addCue(c)}h==="disabled"&&(a.mode=h)}function w(a){var d=a.mode;if(d==="disabled"&&(a.mode="hidden"),a.cues)for(var h=a.cues.length;h--;)a.removeCue(a.cues[h]);d==="disabled"&&(a.mode=d)}function p(a,d,h){var c=a.mode;if(c==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0)for(var v=l(a.cues,d,h),g=0;g<v.length;g++)a.removeCue(v[g]);c==="disabled"&&(a.mode=c)}function s(a,d){if(d<a[0].startTime)return 0;var h=a.length-1;if(d>a[h].endTime)return-1;for(var c=0,v=h;c<=v;){var g=Math.floor((v+c)/2);if(d<a[g].startTime)v=g-1;else if(d>a[g].startTime&&c<h)c=g+1;else return g}return a[c].startTime-d<d-a[v].startTime?c:v}function l(a,d,h){var c=[],v=s(a,d);if(v>-1)for(var g=v,E=a.length;g<E;g++){var n=a[g];if(n.startTime>=d&&n.endTime<=h)c.push(n);else if(n.startTime>h)return c}return c}},"./src/utils/time-ranges.ts":function(L,f,C){"use strict";C.r(f);var D={toString:function(m){for(var w="",p=m.length,s=0;s<p;s++)w+="["+m.start(s).toFixed(3)+","+m.end(s).toFixed(3)+"]";return w}};f.default=D},"./src/utils/timescale-conversion.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"toTimescaleFromBase",function(){return u}),C.d(f,"toTimescaleFromScale",function(){return m}),C.d(f,"toMsFromMpegTsClock",function(){return w}),C.d(f,"toMpegTsClockFromTimescale",function(){return p});var D=9e4;function u(s,l,a,d){a===void 0&&(a=1),d===void 0&&(d=!1);var h=s*l*a;return d?Math.round(h):h}function m(s,l,a,d){return a===void 0&&(a=1),d===void 0&&(d=!1),u(s,l,1/a,d)}function w(s,l){return l===void 0&&(l=!1),u(s,1e3,1/D,l)}function p(s,l){return l===void 0&&(l=1),u(s,D,1/l)}},"./src/utils/typed-array.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"sliceUint8",function(){return D});function D(u,m,w){return Uint8Array.prototype.slice?u.slice(m,w):new Uint8Array(Array.prototype.slice.call(u,m,w))}},"./src/utils/vttcue.ts":function(L,f,C){"use strict";C.r(f),f.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var D=["","lr","rl"],u=["start","middle","end","left","right"];function m(a,d){if(typeof d!="string")return!1;if(!Array.isArray(a))return!1;var h=d.toLowerCase();return~a.indexOf(h)?h:!1}function w(a){return m(D,a)}function p(a){return m(u,a)}function s(a){for(var d=arguments.length,h=new Array(d>1?d-1:0),c=1;c<d;c++)h[c-1]=arguments[c];for(var v=1;v<arguments.length;v++){var g=arguments[v];for(var E in g)a[E]=g[E]}return a}function l(a,d,h){var c=this,v={enumerable:!0};c.hasBeenReset=!1;var g="",E=!1,n=a,o=d,t=h,S=null,_="",i=!0,P="auto",O="start",x=50,b="middle",y=50,T="middle";Object.defineProperty(c,"id",s({},v,{get:function(){return g},set:function(k){g=""+k}})),Object.defineProperty(c,"pauseOnExit",s({},v,{get:function(){return E},set:function(k){E=!!k}})),Object.defineProperty(c,"startTime",s({},v,{get:function(){return n},set:function(k){if(typeof k!="number")throw new TypeError("Start time must be set to a number.");n=k,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",s({},v,{get:function(){return o},set:function(k){if(typeof k!="number")throw new TypeError("End time must be set to a number.");o=k,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",s({},v,{get:function(){return t},set:function(k){t=""+k,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",s({},v,{get:function(){return S},set:function(k){S=k,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",s({},v,{get:function(){return _},set:function(k){var N=w(k);if(N===!1)throw new SyntaxError("An invalid or illegal string was specified.");_=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",s({},v,{get:function(){return i},set:function(k){i=!!k,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",s({},v,{get:function(){return P},set:function(k){if(typeof k!="number"&&k!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");P=k,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",s({},v,{get:function(){return O},set:function(k){var N=p(k);if(!N)throw new SyntaxError("An invalid or illegal string was specified.");O=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",s({},v,{get:function(){return x},set:function(k){if(k<0||k>100)throw new Error("Position must be between 0 and 100.");x=k,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",s({},v,{get:function(){return b},set:function(k){var N=p(k);if(!N)throw new SyntaxError("An invalid or illegal string was specified.");b=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",s({},v,{get:function(){return y},set:function(k){if(k<0||k>100)throw new Error("Size must be between 0 and 100.");y=k,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",s({},v,{get:function(){return T},set:function(k){var N=p(k);if(!N)throw new SyntaxError("An invalid or illegal string was specified.");T=N,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,f,C){"use strict";C.r(f),C.d(f,"parseTimeStamp",function(){return m}),C.d(f,"fixLineBreaks",function(){return d}),C.d(f,"VTTParser",function(){return h});var D=C("./src/utils/vttcue.ts"),u=function(){function c(){}var v=c.prototype;return v.decode=function(E,n){if(!E)return"";if(typeof E!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(E))},c}();function m(c){function v(E,n,o,t){return(E|0)*3600+(n|0)*60+(o|0)+parseFloat(t||0)}var g=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return g?parseFloat(g[2])>59?v(g[2],g[3],0,g[4]):v(g[1],g[2],g[3],g[4]):null}var w=function(){function c(){this.values=Object.create(null)}var v=c.prototype;return v.set=function(E,n){!this.get(E)&&n!==""&&(this.values[E]=n)},v.get=function(E,n,o){return o?this.has(E)?this.values[E]:n[o]:this.has(E)?this.values[E]:n},v.has=function(E){return E in this.values},v.alt=function(E,n,o){for(var t=0;t<o.length;++t)if(n===o[t]){this.set(E,n);break}},v.integer=function(E,n){/^-?\d+$/.test(n)&&this.set(E,parseInt(n,10))},v.percent=function(E,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var o=parseFloat(n);if(o>=0&&o<=100)return this.set(E,o),!0}return!1},c}();function p(c,v,g,E){var n=E?c.split(E):[c];for(var o in n){if(typeof n[o]!="string")continue;var t=n[o].split(g);if(t.length!==2)continue;var S=t[0],_=t[1];v(S,_)}}var s=new D.default(0,0,""),l=s.align==="middle"?"middle":"center";function a(c,v,g){var E=c;function n(){var S=m(c);if(S===null)throw new Error("Malformed timestamp: "+E);return c=c.replace(/^[^\sa-zA-Z-]+/,""),S}function o(S,_){var i=new w;p(S,function(x,b){var y;switch(x){case"region":for(var T=g.length-1;T>=0;T--)if(g[T].id===b){i.set(x,g[T].region);break}break;case"vertical":i.alt(x,b,["rl","lr"]);break;case"line":y=b.split(","),i.integer(x,y[0]),i.percent(x,y[0])&&i.set("snapToLines",!1),i.alt(x,y[0],["auto"]),y.length===2&&i.alt("lineAlign",y[1],["start",l,"end"]);break;case"position":y=b.split(","),i.percent(x,y[0]),y.length===2&&i.alt("positionAlign",y[1],["start",l,"end","line-left","line-right","auto"]);break;case"size":i.percent(x,b);break;case"align":i.alt(x,b,["start",l,"end","left","right"]);break}},/:/,/\s/),_.region=i.get("region",null),_.vertical=i.get("vertical","");var P=i.get("line","auto");P==="auto"&&s.line===-1&&(P=-1),_.line=P,_.lineAlign=i.get("lineAlign","start"),_.snapToLines=i.get("snapToLines",!0),_.size=i.get("size",100),_.align=i.get("align",l);var O=i.get("position","auto");O==="auto"&&s.position===50&&(O=_.align==="start"||_.align==="left"?0:_.align==="end"||_.align==="right"?100:50),_.position=O}function t(){c=c.replace(/^\s+/,"")}if(t(),v.startTime=n(),t(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+E);c=c.substr(3),t(),v.endTime=n(),t(),o(c,v)}function d(c){return c.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}var h=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 v=c.prototype;return v.parse=function(E){var n=this;E&&(n.buffer+=n.decoder.decode(E,{stream:!0}));function o(){var O=n.buffer,x=0;for(O=d(O);x<O.length&&O[x]!=="\r"&&O[x]!==`
|
|
|
`;)++x;var b=O.substr(0,x);return O[x]==="\r"&&++x,O[x]===`
|
|
|
`&&++x,n.buffer=O.substr(x),b}function t(O){p(O,function(x,b){},/:/)}try{var S="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;S=o();var _=S.match(/^()?WEBVTT([ \t].*)?$/);if(!_||!_[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var i=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;i?i=!1:S=o();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&&(i=!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},v.flush=function(){var E=this;try{if((E.cue||E.state==="HEADER")&&(E.buffer+=`
|
|
|
|
|
|
`,E.parse()),E.state==="INITIAL"||E.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){E.onparsingerror&&E.onparsingerror(n)}return E.onflush&&E.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"generateCueId",function(){return h}),C.d(f,"parseWebVTT",function(){return v});var D=C("./src/polyfills/number.ts"),u=C("./src/utils/vttparser.ts"),m=C("./src/demux/id3.ts"),w=C("./src/utils/timescale-conversion.ts"),p=C("./src/remux/mp4-remuxer.ts"),s=/\r\n|\n\r|\n|\r/g,l=function(E,n,o){return o===void 0&&(o=0),E.substr(o,n.length)===n},a=function(E){var n=parseInt(E.substr(-3)),o=parseInt(E.substr(-6,2)),t=parseInt(E.substr(-9,2)),S=E.length>9?parseInt(E.substr(0,E.indexOf(":"))):0;if(!Object(D.isFiniteNumber)(n)||!Object(D.isFiniteNumber)(o)||!Object(D.isFiniteNumber)(t)||!Object(D.isFiniteNumber)(S))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+E);return n+=1e3*o,n+=60*1e3*t,n+=60*60*1e3*S,n},d=function(E){for(var n=5381,o=E.length;o;)n=n*33^E.charCodeAt(--o);return(n>>>0).toString()};function h(g,E,n){return d(g.toString())+d(E.toString())+d(n)}var c=function(E,n,o){var t=E[n],S=E[t.prevCC];if(!S||!S.new&&t.new){E.ccOffset=E.presentationOffset=t.start,t.new=!1;return}for(;(_=S)!==null&&_!==void 0&&_.new;){var _;E.ccOffset+=t.start-S.start,t.new=!1,t=S,S=E[t.prevCC]}E.presentationOffset=o};function v(g,E,n,o,t,S,_,i){var P=new u.VTTParser,O=Object(m.utf8ArrayToStr)(new Uint8Array(g)).trim().replace(s,`
|
|
|
`).split(`
|
|
|
`),x=[],b=Object(w.toMpegTsClockFromTimescale)(E,n),y="00:00.000",T=0,M=0,k,N=!0,K=!1;P.oncue=function(z){var B=o[t],H=o.ccOffset,U=(T-b)/9e4;if(B!=null&&B.new&&(M!==void 0?H=o.ccOffset=B.start:c(o,t,U)),U&&(H=U-o.presentationOffset),K){var W=z.endTime-z.startTime,G=Object(p.normalizePts)((z.startTime+H-M)*9e4,S*9e4)/9e4;z.startTime=G,z.endTime=G+W}var ee=z.text.trim();z.text=decodeURIComponent(encodeURIComponent(ee)),z.id||(z.id=h(z.startTime,z.endTime,ee)),z.endTime>0&&x.push(z)},P.onparsingerror=function(z){k=z},P.onflush=function(){if(k){i(k);return}_(x)},O.forEach(function(z){if(N)if(l(z,"X-TIMESTAMP-MAP=")){N=!1,K=!0,z.substr(16).split(",").forEach(function(B){l(B,"LOCAL:")?y=B.substr(6):l(B,"MPEGTS:")&&(T=parseInt(B.substr(7)))});try{M=a(y)/1e3}catch(B){K=!1,k=B}return}else z===""&&(N=!1);P.parse(z+`
|
|
|
`)}),P.flush()}},"./src/utils/xhr-loader.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/utils/logger.ts"),u=C("./src/loader/load-stats.ts"),m=/^age:\s*[\d.]+\s*$/m,w=function(){function p(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 s=p.prototype;return s.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},s.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()))},s.abort=function(){var a;this.abortInternal(),(a=this.callbacks)!==null&&a!==void 0&&a.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},s.load=function(a,d,h){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=d,this.callbacks=h,this.retryDelay=d.retryDelay,this.loadInternal()},s.loadInternal=function(){var a=this.config,d=this.context;if(!a)return;var h=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var v=this.xhrSetup;try{if(v)try{v(h,d.url)}catch(n){h.open("GET",d.url,!0),v(h,d.url)}h.readyState||h.open("GET",d.url,!0);var g=this.context.headers;if(g)for(var E in g)h.setRequestHeader(E,g[E])}catch(n){this.callbacks.onError({code:h.status,text:n.message},d,h);return}d.rangeEnd&&h.setRequestHeader("Range","bytes="+d.rangeStart+"-"+(d.rangeEnd-1)),h.onreadystatechange=this.readystatechange.bind(this),h.onprogress=this.loadprogress.bind(this),h.responseType=d.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout),h.send()},s.readystatechange=function(){var a=this.context,d=this.loader,h=this.stats;if(!a||!d)return;var c=d.readyState,v=this.config;if(h.aborted)return;if(c>=2)if(self.clearTimeout(this.requestTimeout),h.loading.first===0&&(h.loading.first=Math.max(self.performance.now(),h.loading.start)),c===4){d.onreadystatechange=null,d.onprogress=null;var g=d.status;if(g>=200&&g<300){h.loading.end=Math.max(self.performance.now(),h.loading.first);var E,n;if(a.responseType==="arraybuffer"?(E=d.response,n=E.byteLength):(E=d.responseText,n=E.length),h.loaded=h.total=n,!this.callbacks)return;var o=this.callbacks.onProgress;if(o&&o(h,a,E,d),!this.callbacks)return;var t={url:d.responseURL,data:E};this.callbacks.onSuccess(t,h,a,d)}else h.retry>=v.maxRetry||g>=400&&g<499?(D.logger.error(g+" while loading "+a.url),this.callbacks.onError({code:g,text:d.statusText},a,d)):(D.logger.warn(g+" 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,v.maxRetryDelay),h.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),v.timeout)},s.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))},s.loadprogress=function(a){var d=this.stats;d.loaded=a.loaded,a.lengthComputable&&(d.total=a.total)},s.getCacheAge=function(){var a=null;if(this.loader&&m.test(this.loader.getAllResponseHeaders())){var d=this.loader.getResponseHeader("age");a=d?parseFloat(d):null}return a},p}();f.default=w}}).default})},vHTk:function(j,J,I){j.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.StreamCipher,u=f.algo,m=u.RC4=D.extend({_doReset:function(){for(var s=this._key,l=s.words,a=s.sigBytes,d=this._S=[],h=0;h<256;h++)d[h]=h;for(var h=0,c=0;h<256;h++){var v=h%a,g=l[v>>>2]>>>24-v%4*8&255;c=(c+d[h]+g)%256;var E=d[h];d[h]=d[c],d[c]=E}this._i=this._j=0},_doProcessBlock:function(s,l){s[l]^=w.call(this)},keySize:256/32,ivSize:0});function w(){for(var s=this._S,l=this._i,a=this._j,d=0,h=0;h<4;h++){l=(l+1)%256,a=(a+s[l])%256;var c=s[l];s[l]=s[a],s[a]=c,d|=s[(s[l]+s[a])%256]<<24-h*8}return this._i=l,this._j=a,d}f.RC4=D._createHelper(m);var p=u.RC4Drop=m.extend({cfg:m.cfg.extend({drop:192}),_doReset:function(){m._doReset.call(this);for(var s=this.cfg.drop;s>0;s--)w.call(this)}});f.RC4Drop=D._createHelper(p)}(),L.RC4})},wCXF:function(j,J,I){"use strict";I.d(J,"a",function(){return Xe});var L=I("rePB"),f=I("VTBJ"),C=I("KQm4"),D=I("U8pU"),u=I("ODXe"),m=I("cDcd"),w=I("TSYQ"),p=I.n(w),s=I("Gytx"),l=I.n(s),a=I("Kwbf"),d=I("t23M"),h=I("qx4F"),c=I("6eGT"),v=I("IBYe"),g=I("Ff2n"),E=I("c+Xe"),n=I("fyJ8"),o=I("biw7");function t(Me,Te,Ye,ot,ze){var rt=Ye[Me]||{},ke=Ye[Te]||{},Oe,Re;rt.fixed==="left"?Oe=ot.left[Me]:ke.fixed==="right"&&(Re=ot.right[Te]);var pe=!1,Ee=!1,we=!1,De=!1,Ie=Ye[Te+1],$e=Ye[Me-1];if(ze==="rtl"){if(Oe!==void 0){var qe=$e&&$e.fixed==="left";De=!qe}else if(Re!==void 0){var tt=Ie&&Ie.fixed==="right";we=!tt}}else if(Oe!==void 0){var xt=Ie&&Ie.fixed==="left";pe=!xt}else if(Re!==void 0){var gt=$e&&$e.fixed==="right";Ee=!gt}return{fixLeft:Oe,fixRight:Re,lastFixLeft:pe,firstFixRight:Ee,lastFixRight:we,firstFixLeft:De,isSticky:ot.isSticky}}var S=I("sR1s");function _(Me){var Te=Me.cells,Ye=Me.stickyOffsets,ot=Me.flattenColumns,ze=Me.rowComponent,rt=Me.cellComponent,ke=Me.onHeaderRow,Oe=Me.index,Re=m.useContext(o.a),pe=Re.prefixCls,Ee=Re.direction,we;ke&&(we=ke(Te.map(function(Ie){return Ie.column}),Oe));var De=Object(S.a)(Te.map(function(Ie){return Ie.column}));return m.createElement(ze,Object.assign({},we),Te.map(function(Ie,$e){var qe=Ie.column,tt=t(Ie.colStart,Ie.colEnd,ot,Ye,Ee),xt;return qe&&qe.onHeaderCell&&(xt=Ie.column.onHeaderCell(qe)),m.createElement(n.a,Object.assign({},Ie,{ellipsis:qe.ellipsis,align:qe.align,component:rt,prefixCls:pe,key:De[$e]},tt,{additionalProps:xt,rowType:"header"}))}))}_.displayName="HeaderRow";var i=_;function P(Me){var Te=[];function Ye(ke,Oe){var Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Te[Re]=Te[Re]||[];var pe=Oe,Ee=ke.filter(Boolean).map(function(we){var De={key:we.key,className:we.className||"",children:we.title,column:we,colStart:pe},Ie=1,$e=we.children;return $e&&$e.length>0&&(Ie=Ye($e,pe,Re+1).reduce(function(qe,tt){return qe+tt},0),De.hasSubColumns=!0),"colSpan"in we&&(Ie=we.colSpan),"rowSpan"in we&&(De.rowSpan=we.rowSpan),De.colSpan=Ie,De.colEnd=De.colStart+Ie-1,Te[Re].push(De),pe+=Ie,Ie});return Ee}Ye(Me,0);for(var ot=Te.length,ze=function(Oe){Te[Oe].forEach(function(Re){!("rowSpan"in Re)&&!Re.hasSubColumns&&(Re.rowSpan=ot-Oe)})},rt=0;rt<ot;rt+=1)ze(rt);return Te}function O(Me){var Te=Me.stickyOffsets,Ye=Me.columns,ot=Me.flattenColumns,ze=Me.onHeaderRow,rt=m.useContext(o.a),ke=rt.prefixCls,Oe=rt.getComponent,Re=m.useMemo(function(){return P(Ye)},[Ye]),pe=Oe(["header","wrapper"],"thead"),Ee=Oe(["header","row"],"tr"),we=Oe(["header","cell"],"th");return m.createElement(pe,{className:"".concat(ke,"-thead")},Re.map(function(De,Ie){var $e=m.createElement(i,{key:Ie,flattenColumns:ot,cells:De,stickyOffsets:Te,rowComponent:Ee,cellComponent:we,onHeaderRow:ze,index:Ie});return $e}))}var x=O,b=I("hW8S");function y(Me){for(var Te=Me.colWidths,Ye=Me.columns,ot=Me.columCount,ze=[],rt=ot||Ye.length,ke=!1,Oe=rt-1;Oe>=0;Oe-=1){var Re=Te[Oe],pe=Ye&&Ye[Oe],Ee=pe&&pe[b.a];(Re||Ee||ke)&&(ze.unshift(m.createElement("col",Object.assign({key:Oe,style:{width:Re,minWidth:Re}},Ee))),ke=!0)}return m.createElement("colgroup",null,ze)}var T=y;function M(Me,Te){return Object(m.useMemo)(function(){for(var Ye=[],ot=0;ot<Te;ot+=1){var ze=Me[ot];if(ze!==void 0)Ye[ot]=ze;else return null}return Ye},[Me.join("_"),Te])}var k=m.forwardRef(function(Me,Te){var Ye=Me.noData,ot=Me.columns,ze=Me.flattenColumns,rt=Me.colWidths,ke=Me.columCount,Oe=Me.stickyOffsets,Re=Me.direction,pe=Me.fixHeader,Ee=Me.offsetHeader,we=Me.stickyClassName,De=Me.onScroll,Ie=Object(g.a)(Me,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),$e=m.useContext(o.a),qe=$e.prefixCls,tt=$e.scrollbarSize,xt=$e.isSticky,gt=xt&&!pe?0:tt,sr=m.useRef(null),tr=m.useCallback(function(rn){Object(E.b)(Te,rn),Object(E.b)(sr,rn)},[]);m.useEffect(function(){var rn;function en(Lr){var un=Lr.currentTarget,yn=Lr.deltaX;yn&&(De({currentTarget:un,scrollLeft:un.scrollLeft+yn}),Lr.preventDefault())}return(rn=sr.current)===null||rn===void 0||rn.addEventListener("wheel",en),function(){var Lr;(Lr=sr.current)===null||Lr===void 0||Lr.removeEventListener("wheel",en)}},[]);var St=ze[ze.length-1],Nr={fixed:St?St.fixed:null,onHeaderCell:function(){return{className:"".concat(qe,"-cell-scrollbar")}}},Ir=Object(m.useMemo)(function(){return gt?[].concat(Object(C.a)(ot),[Nr]):ot},[gt,ot]),Fr=Object(m.useMemo)(function(){return gt?[].concat(Object(C.a)(ze),[Nr]):ze},[gt,ze]),ln=Object(m.useMemo)(function(){var rn=Oe.right,en=Oe.left;return Object(f.a)(Object(f.a)({},Oe),{},{left:Re==="rtl"?[].concat(Object(C.a)(en.map(function(Lr){return Lr+gt})),[0]):en,right:Re==="rtl"?rn:[].concat(Object(C.a)(rn.map(function(Lr){return Lr+gt})),[0]),isSticky:xt})},[gt,Oe,xt]),Cr=M(rt,ke);return m.createElement("div",{style:Object(f.a)({overflow:"hidden"},xt?{top:Ee}:{}),ref:tr,className:p()("".concat(qe,"-header"),Object(L.a)({},we,!!we))},m.createElement("table",{style:{tableLayout:"fixed",visibility:Ye||Cr?null:"hidden"}},m.createElement(T,{colWidths:Cr?[].concat(Object(C.a)(Cr),[gt]):[],columCount:ke+1,columns:Fr}),m.createElement(x,Object.assign({},Ie,{stickyOffsets:ln,columns:Ir,flattenColumns:Fr}))))});k.displayName="FixedHeader";var N=k,K=m.createContext(null),z=K;function B(Me){var Te=Me.prefixCls,Ye=Me.children,ot=Me.component,ze=Me.cellComponent,rt=Me.fixHeader,ke=Me.fixColumn,Oe=Me.horizonScroll,Re=Me.className,pe=Me.expanded,Ee=Me.componentWidth,we=Me.colSpan,De=m.useContext(o.a),Ie=De.scrollbarSize;return m.useMemo(function(){var $e=Ye;return ke&&($e=m.createElement("div",{style:{width:Ee-(rt?Ie:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Te,"-expanded-row-fixed")},$e)),m.createElement(ot,{className:Re,style:{display:pe?null:"none"}},m.createElement(n.a,{component:ze,prefixCls:Te,colSpan:we},$e))},[Ye,ot,rt,Oe,Re,pe,Ee,we,Ie])}var H=B;function U(Me){var Te=Me.className,Ye=Me.style,ot=Me.record,ze=Me.index,rt=Me.rowKey,ke=Me.getRowKey,Oe=Me.rowExpandable,Re=Me.expandedKeys,pe=Me.onRow,Ee=Me.indent,we=Ee===void 0?0:Ee,De=Me.rowComponent,Ie=Me.cellComponent,$e=Me.childrenColumnName,qe=m.useContext(o.a),tt=qe.prefixCls,xt=qe.fixedInfoList,gt=m.useContext(z),sr=gt.fixHeader,tr=gt.fixColumn,St=gt.horizonScroll,Nr=gt.componentWidth,Ir=gt.flattenColumns,Fr=gt.expandableType,ln=gt.expandRowByClick,Cr=gt.onTriggerExpand,rn=gt.rowClassName,en=gt.expandedRowClassName,Lr=gt.indentSize,un=gt.expandIcon,yn=gt.expandedRowRender,Gn=gt.expandIconColumnIndex,cn=m.useState(!1),La=Object(u.a)(cn,2),Ha=La[0],bn=La[1],qt=Re&&Re.has(Me.recordKey);m.useEffect(function(){qt&&bn(!0)},[qt]);var Xn=Fr==="row"&&(!Oe||Oe(ot)),Ea=Fr==="nest",Ln=$e&&ot&&ot[$e],$r=Xn||Ea,Pn;pe&&(Pn=pe(ot,ze));var la=function(Er){if(ln&&$r&&Cr(ot,Er),Pn&&Pn.onClick){for(var ta,Rt=arguments.length,Vn=new Array(Rt>1?Rt-1:0),In=1;In<Rt;In++)Vn[In-1]=arguments[In];(ta=Pn).onClick.apply(ta,[Er].concat(Vn))}},fa;typeof rn=="string"?fa=rn:typeof rn=="function"&&(fa=rn(ot,ze,we));var Lt=Object(S.a)(Ir),cr=m.createElement(De,Object.assign({},Pn,{"data-row-key":rt,className:p()(Te,"".concat(tt,"-row"),"".concat(tt,"-row-level-").concat(we),fa,Pn&&Pn.className),style:Object(f.a)(Object(f.a)({},Ye),Pn?Pn.style:null),onClick:la}),Ir.map(function(Mn,Er){var ta=Mn.render,Rt=Mn.dataIndex,Vn=Mn.className,In=Lt[Er],Ka=xt[Er],_a;Er===(Gn||0)&&Ea&&(_a=m.createElement(m.Fragment,null,m.createElement("span",{style:{paddingLeft:"".concat(Lr*we,"px")},className:"".concat(tt,"-row-indent indent-level-").concat(we)}),un({prefixCls:tt,expanded:qt,expandable:Ln,record:ot,onExpand:Cr})));var Qn;return Mn.onCell&&(Qn=Mn.onCell(ot,ze)),m.createElement(n.a,Object.assign({className:Vn,ellipsis:Mn.ellipsis,align:Mn.align,component:Ie,prefixCls:tt,key:In,record:ot,index:ze,dataIndex:Rt,render:ta,shouldCellUpdate:Mn.shouldCellUpdate},Ka,{appendNode:_a,additionalProps:Qn}))})),ha;if(Xn&&(Ha||qt)){var xa=yn(ot,ze,we+1,qt),Ma=en&&en(ot,ze,we);ha=m.createElement(H,{expanded:qt,className:p()("".concat(tt,"-expanded-row"),"".concat(tt,"-expanded-row-level-").concat(we+1),Ma),prefixCls:tt,fixHeader:sr,fixColumn:tr,horizonScroll:St,component:De,componentWidth:Nr,cellComponent:Ie,colSpan:Ir.length},xa)}var pa;return Ln&&qt&&(pa=(ot[$e]||[]).map(function(Mn,Er){var ta=ke(Mn,Er);return m.createElement(U,Object.assign({},Me,{key:ta,rowKey:ta,record:Mn,recordKey:ta,index:Er,indent:we+1}))})),m.createElement(m.Fragment,null,cr,ha,pa)}U.displayName="BodyRow";var W=U,G=m.createContext(null),ee=G;function ie(Me){var Te=Me.columnKey,Ye=Me.onColumnResize,ot=m.useRef();return m.useEffect(function(){ot.current&&Ye(Te,ot.current.offsetWidth)},[]),m.createElement(d.a,{onResize:function(rt){var ke=rt.offsetWidth;Ye(Te,ke)}},m.createElement("td",{ref:ot,style:{padding:0,border:0,height:0}},m.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ce(Me){var Te=Me.data,Ye=Me.getRowKey,ot=Me.measureColumnWidth,ze=Me.expandedKeys,rt=Me.onRow,ke=Me.rowExpandable,Oe=Me.emptyNode,Re=Me.childrenColumnName,pe=m.useContext(ee),Ee=pe.onColumnResize,we=m.useContext(o.a),De=we.prefixCls,Ie=we.getComponent,$e=m.useContext(z),qe=$e.fixHeader,tt=$e.horizonScroll,xt=$e.flattenColumns,gt=$e.componentWidth;return m.useMemo(function(){var sr=Ie(["body","wrapper"],"tbody"),tr=Ie(["body","row"],"tr"),St=Ie(["body","cell"],"td"),Nr;Te.length?Nr=Te.map(function(Fr,ln){var Cr=Ye(Fr,ln);return m.createElement(W,{key:Cr,rowKey:Cr,record:Fr,recordKey:Cr,index:ln,rowComponent:tr,cellComponent:St,expandedKeys:ze,onRow:rt,getRowKey:Ye,rowExpandable:ke,childrenColumnName:Re})}):Nr=m.createElement(H,{expanded:!0,className:"".concat(De,"-placeholder"),prefixCls:De,fixHeader:qe,fixColumn:tt,horizonScroll:tt,component:tr,componentWidth:gt,cellComponent:St,colSpan:xt.length},Oe);var Ir=Object(S.a)(xt);return m.createElement(sr,{className:"".concat(De,"-tbody")},ot&&m.createElement("tr",{"aria-hidden":"true",className:"".concat(De,"-measure-row"),style:{height:0}},Ir.map(function(Fr){return m.createElement(ie,{key:Fr,columnKey:Fr,onColumnResize:Ee})})),Nr)},[Te,De,rt,ot,ze,Ye,Ie,gt,Oe,xt])}var _e=m.memo(ce);_e.displayName="Body";var Ce=_e,le=I("wRmb"),ye=I("xEkU"),fe=I.n(ye);function ne(Me){var Te=Object(m.useRef)(Me),Ye=Object(m.useState)({}),ot=Object(u.a)(Ye,2),ze=ot[1],rt=Object(m.useRef)(null),ke=Object(m.useRef)([]);function Oe(Re){rt.current===null&&(ke.current=[],rt.current=fe()(function(){ke.current.forEach(function(pe){Te.current=pe(Te.current)}),rt.current=null,ze({})})),ke.current.push(Re)}return Object(m.useEffect)(function(){return function(){fe.a.cancel(rt.current)}},[]),[Te.current,Oe]}function ae(Me){var Te=Object(m.useRef)(Me),Ye=Object(m.useRef)(null);function ot(){window.clearTimeout(Ye.current)}function ze(ke){Te.current=ke,ot(),Ye.current=window.setTimeout(function(){Te.current=null,Ye.current=null},100)}function rt(){return Te.current}return Object(m.useEffect)(function(){return ot},[]),[ze,rt]}function q(Me,Te,Ye){var ot=Object(m.useMemo)(function(){for(var ze=[],rt=[],ke=0,Oe=0,Re=0;Re<Te;Re+=1)if(Ye==="rtl"){rt[Re]=Oe,Oe+=Me[Re]||0;var pe=Te-Re-1;ze[pe]=ke,ke+=Me[pe]||0}else{ze[Re]=ke,ke+=Me[Re]||0;var Ee=Te-Re-1;rt[Ee]=Oe,Oe+=Me[Ee]||0}return{left:ze,right:rt}},[Me,Te,Ye]);return ot}var se=q;function Q(Me){var Te=Me.className,Ye=Me.children;return m.createElement("div",{className:Te},Ye)}var Z=Q,be=I("n6Qo");function re(Me){var Te,Ye=Me.prefixCls,ot=Me.record,ze=Me.onExpand,rt=Me.expanded,ke=Me.expandable,Oe="".concat(Ye,"-row-expand-icon");if(!ke)return m.createElement("span",{className:p()(Oe,"".concat(Ye,"-row-spaced"))});var Re=function(Ee){ze(ot,Ee),Ee.stopPropagation()};return m.createElement("span",{className:p()(Oe,(Te={},Object(L.a)(Te,"".concat(Ye,"-row-expanded"),rt),Object(L.a)(Te,"".concat(Ye,"-row-collapsed"),!rt),Te)),onClick:Re})}function Y(Me,Te,Ye){var ot=[];function ze(rt){(rt||[]).forEach(function(ke,Oe){ot.push(Te(ke,Oe)),ze(ke[Ye])})}return ze(Me),ot}var X=I("zT1h"),$=I("y0+3"),ve=function(Te,Ye){var ot,ze,rt=Te.scrollBodyRef,ke=Te.onScroll,Oe=Te.offsetScroll,Re=m.useContext(o.a),pe=Re.prefixCls,Ee=((ot=rt.current)===null||ot===void 0?void 0:ot.scrollWidth)||0,we=((ze=rt.current)===null||ze===void 0?void 0:ze.clientWidth)||0,De=Ee&&we*(we/Ee),Ie=m.useRef(),$e=ne({scrollLeft:0,isHiddenScrollBar:!1}),qe=Object(u.a)($e,2),tt=qe[0],xt=qe[1],gt=m.useRef({delta:0,x:0}),sr=m.useState(!1),tr=Object(u.a)(sr,2),St=tr[0],Nr=tr[1],Ir=function(){Nr(!1)},Fr=function(Lr){Lr.persist(),gt.current.delta=Lr.pageX-tt.scrollLeft,gt.current.x=0,Nr(!0),Lr.preventDefault()},ln=function(Lr){var un,yn=Lr||((un=window)===null||un===void 0?void 0:un.event),Gn=yn.buttons;if(!St||Gn===0){St&&Nr(!1);return}var cn=gt.current.x+Lr.pageX-gt.current.x-gt.current.delta;cn<=0&&(cn=0),cn+De>=we&&(cn=we-De),ke({scrollLeft:cn/we*(Ee+2)}),gt.current.x=Lr.pageX},Cr=function(){var Lr=Object($.b)(rt.current).top,un=Lr+rt.current.offsetHeight,yn=document.documentElement.scrollTop+window.innerHeight;un-Object(h.a)()<=yn||Lr>=yn-Oe?xt(function(Gn){return Object(f.a)(Object(f.a)({},Gn),{},{isHiddenScrollBar:!0})}):xt(function(Gn){return Object(f.a)(Object(f.a)({},Gn),{},{isHiddenScrollBar:!1})})},rn=function(Lr){xt(function(un){return Object(f.a)(Object(f.a)({},un),{},{scrollLeft:Lr/Ee*we||0})})};return m.useImperativeHandle(Ye,function(){return{setScrollLeft:rn}}),m.useEffect(function(){var en=Object(X.a)(document.body,"mouseup",Ir,!1),Lr=Object(X.a)(document.body,"mousemove",ln,!1);return Cr(),function(){en.remove(),Lr.remove()}},[De,St]),m.useEffect(function(){var en=Object(X.a)(window,"scroll",Cr,!1),Lr=Object(X.a)(window,"resize",Cr,!1);return function(){en.remove(),Lr.remove()}},[]),m.useEffect(function(){tt.isHiddenScrollBar||xt(function(en){var Lr,un;return Object(f.a)(Object(f.a)({},en),{},{scrollLeft:rt.current.scrollLeft/((Lr=rt.current)===null||Lr===void 0?void 0:Lr.scrollWidth)*((un=rt.current)===null||un===void 0?void 0:un.clientWidth)})})},[tt.isHiddenScrollBar]),Ee<=we||!De||tt.isHiddenScrollBar?null:m.createElement("div",{style:{height:Object(h.a)(),width:we,bottom:Oe},className:"".concat(pe,"-sticky-scroll")},m.createElement("div",{onMouseDown:Fr,ref:Ie,className:p()("".concat(pe,"-sticky-scroll-bar"),Object(L.a)({},"".concat(pe,"-sticky-scroll-bar-active"),St)),style:{width:"".concat(De,"px"),transform:"translate3d(".concat(tt.scrollLeft,"px, 0, 0)")}}))},de=m.forwardRef(ve);function xe(Me,Te){return m.useMemo(function(){var Ye=!!Me;return{isSticky:Ye,stickyClassName:Ye?"".concat(Te,"-sticky-header"):"",offsetHeader:Object(D.a)(Me)==="object"&&Me.offsetHeader||0,offsetScroll:Object(D.a)(Me)==="object"&&Me.offsetScroll||0}},[Me,Te])}var Ke=[],Ve={},Xe="rc-table-internal-hook",at=m.memo(function(Me){var Te=Me.children;return Te},function(Me,Te){return l()(Me.props,Te.props)?Me.pingLeft!==Te.pingLeft||Me.pingRight!==Te.pingRight:!1});function it(Me){var Te,Ye=Me.prefixCls,ot=Me.className,ze=Me.rowClassName,rt=Me.style,ke=Me.data,Oe=Me.rowKey,Re=Me.scroll,pe=Me.tableLayout,Ee=Me.direction,we=Me.title,De=Me.footer,Ie=Me.summary,$e=Me.id,qe=Me.showHeader,tt=Me.components,xt=Me.emptyText,gt=Me.onRow,sr=Me.onHeaderRow,tr=Me.internalHooks,St=Me.transformColumns,Nr=Me.internalRefs,Ir=Me.sticky,Fr=ke||Ke,ln=!!Fr.length,Cr=m.useState(0),rn=Object(u.a)(Cr,2),en=rn[0],Lr=rn[1];m.useEffect(function(){Lr(Object(h.a)())});var un=m.useMemo(function(){return Object(S.c)(tt,{})},[tt]),yn=m.useCallback(function(xr,At){return Object(S.b)(un,xr)||At},[un]),Gn=m.useMemo(function(){return typeof Oe=="function"?Oe:function(xr){var At=xr&&xr[Oe];return At}},[Oe]),cn=Object(b.c)(Me),La=cn.expandIcon,Ha=cn.expandedRowKeys,bn=cn.defaultExpandedRowKeys,qt=cn.defaultExpandAllRows,Xn=cn.expandedRowRender,Ea=cn.onExpand,Ln=cn.onExpandedRowsChange,$r=cn.expandRowByClick,Pn=cn.rowExpandable,la=cn.expandIconColumnIndex,fa=cn.expandedRowClassName,Lt=cn.childrenColumnName,cr=cn.indentSize,ha=La||re,xa=Lt||"children",Ma=m.useMemo(function(){return Xn?"row":Me.expandable&&tr===Xe&&Me.expandable.__PARENT_RENDER_ICON__||Fr.some(function(xr){return xr&&Object(D.a)(xr)==="object"&&xr[xa]})?"nest":!1},[!!Xn,Fr]),pa=m.useState(function(){return bn||(qt?Y(Fr,Gn,xa):[])}),Mn=Object(u.a)(pa,2),Er=Mn[0],ta=Mn[1],Rt=m.useMemo(function(){return new Set(Ha||Er||[])},[Ha,Er]),Vn=m.useCallback(function(xr){var At=Gn(xr,Fr.indexOf(xr)),Bt,ir=Rt.has(At);ir?(Rt.delete(At),Bt=Object(C.a)(Rt)):Bt=[].concat(Object(C.a)(Rt),[At]),ta(Bt),Ea&&Ea(!ir,xr),Ln&&Ln(Bt)},[Gn,Rt,Fr,Ea,Ln]),In=m.useState(0),Ka=Object(u.a)(In,2),_a=Ka[0],Qn=Ka[1],Qa=Object(le.b)(Object(f.a)(Object(f.a)(Object(f.a)({},Me),cn),{},{expandable:!!Xn,expandedKeys:Rt,getRowKey:Gn,onTriggerExpand:Vn,expandIcon:ha,expandIconColumnIndex:la,direction:Ee}),tr===Xe?St:null),Za=Object(u.a)(Qa,2),ra=Za[0],wn=Za[1],na=m.useMemo(function(){return{columns:ra,flattenColumns:wn}},[ra,wn]),Ia=m.useRef(),ma=m.useRef(),va=m.useRef(),Pi=m.useState(!1),Xa=Object(u.a)(Pi,2),Nn=Xa[0],za=Xa[1],Ei=m.useState(!1),ka=Object(u.a)(Ei,2),aa=ka[0],oi=ka[1],pi=ne(new Map),si=Object(u.a)(pi,2),mi=si[0],qa=si[1],wa=Object(S.a)(wn),ei=wa.map(function(xr){return mi.get(xr)}),xi=m.useMemo(function(){return ei},[ei.join("_")]),mt=se(xi,wn.length,Ee),et=Re&&Object(S.d)(Re.y),pt=Re&&Object(S.d)(Re.x),_t=pt&&wn.some(function(xr){var At=xr.fixed;return At}),Ut=m.useRef(),Dt=xe(Ir,Ye),Gt=Dt.isSticky,It=Dt.offsetHeader,ut=Dt.offsetScroll,yt=Dt.stickyClassName,bt,er,Yt;et&&(er={overflowY:"scroll",maxHeight:Re.y}),pt&&(bt={overflowX:"auto"},et||(er={overflowY:"hidden"}),Yt={width:Re.x===!0?"auto":Re.x,minWidth:"100%"});var Wt=m.useCallback(function(xr,At){qa(function(Bt){var ir=new Map(Bt);return ir.set(xr,At),ir})},[]),jt=ae(null),Xt=Object(u.a)(jt,2),Qt=Xt[0],Ze=Xt[1];function mr(xr,At){if(!At)return;typeof At=="function"?At(xr):At.scrollLeft!==xr&&(At.scrollLeft=xr)}var wr=function(At){var Bt=At.currentTarget,ir=At.scrollLeft,zt=typeof ir=="number"?ir:Bt.scrollLeft,ct=Bt||Ve;if(!Ze()||Ze()===ct){var dt;Qt(ct),mr(zt,ma.current),mr(zt,va.current),mr(zt,(dt=Ut.current)===null||dt===void 0?void 0:dt.setScrollLeft)}if(Bt){var kt=Bt.scrollWidth,Tt=Bt.clientWidth;za(zt>0),oi(zt<kt-Tt)}},rr=function(){va.current&&wr({currentTarget:va.current})},ft=function(At){var Bt=At.width;rr(),Qn(Ia.current?Ia.current.offsetWidth:Bt)};m.useEffect(function(){return rr},[]),m.useEffect(function(){pt&&rr()},[pt]),m.useEffect(function(){tr===Xe&&Nr&&(Nr.body.current=va.current)});var Et=yn(["table"],"table"),ht=m.useMemo(function(){return pe||(_t?Re.x==="max-content"?"auto":"fixed":et||wn.some(function(xr){var At=xr.ellipsis;return At})?"fixed":"auto")},[et,_t,wn,pe]),Ct,Ht={colWidths:xi,columCount:wn.length,stickyOffsets:mt,onHeaderRow:sr,fixHeader:et},nr=m.useMemo(function(){return ln?null:typeof xt=="function"?xt():xt},[ln,xt]),Kt=m.createElement(Ce,{data:Fr,measureColumnWidth:et||pt||Gt,expandedKeys:Rt,rowExpandable:Pn,getRowKey:Gn,onRow:gt,emptyNode:nr,childrenColumnName:xa}),vr=m.createElement(T,{colWidths:wn.map(function(xr){var At=xr.width;return At}),columns:wn}),Or=Ie&&m.createElement(be.b,null,Ie(Fr)),lr=yn(["body"]);if(et||Gt){var Qe;typeof lr=="function"?(Qe=lr(Fr,{scrollbarSize:en,ref:va,onScroll:wr}),Ht.colWidths=wn.map(function(xr,At){var Bt=xr.width,ir=At===ra.length-1?Bt-en:Bt;return typeof ir=="number"&&!Number.isNaN(ir)?ir:(Object(a.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Qe=m.createElement("div",{style:Object(f.a)(Object(f.a)({},bt),er),onScroll:wr,ref:va,className:p()("".concat(Ye,"-body"))},m.createElement(Et,{style:Object(f.a)(Object(f.a)({},Yt),{},{tableLayout:ht})},vr,Kt,Or),Gt&&m.createElement(de,{ref:Ut,offsetScroll:ut,scrollBodyRef:va,onScroll:wr})),Ct=m.createElement(m.Fragment,null,qe!==!1&&m.createElement(N,Object.assign({noData:!Fr.length},Ht,na,{direction:Ee,offsetHeader:It,stickyClassName:yt,ref:ma,onScroll:wr})),Qe)}else Ct=m.createElement("div",{style:Object(f.a)(Object(f.a)({},bt),er),className:p()("".concat(Ye,"-content")),onScroll:wr,ref:va},m.createElement(Et,{style:Object(f.a)(Object(f.a)({},Yt),{},{tableLayout:ht})},vr,qe!==!1&&m.createElement(x,Object.assign({},Ht,na)),Kt,Or));var Mt=Object(b.b)(Me),Gr=m.createElement("div",Object.assign({className:p()(Ye,ot,(Te={},Object(L.a)(Te,"".concat(Ye,"-rtl"),Ee==="rtl"),Object(L.a)(Te,"".concat(Ye,"-ping-left"),Nn),Object(L.a)(Te,"".concat(Ye,"-ping-right"),aa),Object(L.a)(Te,"".concat(Ye,"-layout-fixed"),pe==="fixed"),Object(L.a)(Te,"".concat(Ye,"-fixed-header"),et),Object(L.a)(Te,"".concat(Ye,"-fixed-column"),_t),Object(L.a)(Te,"".concat(Ye,"-scroll-horizontal"),pt),Object(L.a)(Te,"".concat(Ye,"-has-fix-left"),wn[0]&&wn[0].fixed),Object(L.a)(Te,"".concat(Ye,"-has-fix-right"),wn[wn.length-1]&&wn[wn.length-1].fixed==="right"),Te)),style:rt,id:$e,ref:Ia},Mt),m.createElement(at,{pingLeft:Nn,pingRight:aa,props:Object(f.a)(Object(f.a)({},Me),{},{stickyOffsets:mt,mergedExpandedKeys:Rt})},we&&m.createElement(Z,{className:"".concat(Ye,"-title")},we(Fr)),m.createElement("div",{className:"".concat(Ye,"-container")},Ct),De&&m.createElement(Z,{className:"".concat(Ye,"-footer")},De(Fr))));pt&&(Gr=m.createElement(d.a,{onResize:ft},Gr));var Ur=m.useMemo(function(){return{prefixCls:Ye,getComponent:yn,scrollbarSize:en,direction:Ee,fixedInfoList:wn.map(function(xr,At){return t(At,At,wn,mt,Ee)}),isSticky:Gt}},[Ye,yn,en,Ee,wn,mt,Ee,Gt]),ar=m.useMemo(function(){return Object(f.a)(Object(f.a)({},na),{},{tableLayout:ht,rowClassName:ze,expandedRowClassName:fa,componentWidth:_a,fixHeader:et,fixColumn:_t,horizonScroll:pt,expandIcon:ha,expandableType:Ma,expandRowByClick:$r,expandedRowRender:Xn,onTriggerExpand:Vn,expandIconColumnIndex:la,indentSize:cr})},[na,ht,ze,fa,_a,et,_t,pt,ha,Ma,$r,Xn,Vn,la,cr]),gr=m.useMemo(function(){return{onColumnResize:Wt}},[Wt]);return m.createElement(o.a.Provider,{value:Ur},m.createElement(z.Provider,{value:ar},m.createElement(ee.Provider,{value:gr},Gr)))}it.Column=v.a,it.ColumnGroup=c.a,it.Summary=be.a,it.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var lt=J.b=it},wRmb:function(j,J,I){"use strict";I.d(J,"a",function(){return l});var L=I("rePB"),f=I("KQm4"),C=I("VTBJ"),D=I("Ff2n"),u=I("cDcd"),m=I.n(u),w=I("Kwbf"),p=I("Zm9Q"),s=I("hW8S");function l(v){return Object(p.a)(v).filter(function(g){return u.isValidElement(g)}).map(function(g){var E=g.key,n=g.props,o=n.children,t=Object(D.a)(n,["children"]),S=Object(C.a)({key:E},t);return o&&(S.children=l(o)),S})}function a(v){return v.reduce(function(g,E){var n=E.fixed,o=n===!0?"left":n,t=E.children;return t&&t.length>0?[].concat(Object(f.a)(g),Object(f.a)(a(t).map(function(S){return Object(C.a)({fixed:o},S)}))):[].concat(Object(f.a)(g),[Object(C.a)(Object(C.a)({},E),{},{fixed:o})])},[])}function d(v){for(var g=!0,E=0;E<v.length;E+=1){var n=v[E];if(g&&n.fixed!=="left")g=!1;else if(!g&&n.fixed==="left"){Object(w.a)(!1,"Index ".concat(E-1," of `columns` missing `fixed='left'` prop."));break}}for(var o=!0,t=v.length-1;t>=0;t-=1){var S=v[t];if(o&&S.fixed!=="right")o=!1;else if(!o&&S.fixed==="right"){Object(w.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function h(v){return v.map(function(g){var E=g.fixed,n=Object(D.a)(g,["fixed"]),o=E;return E==="left"?o="right":E==="right"&&(o="left"),Object(C.a)({fixed:o},n)})}function c(v,g){var E=v.prefixCls,n=v.columns,o=v.children,t=v.expandable,S=v.expandedKeys,_=v.getRowKey,i=v.onTriggerExpand,P=v.expandIcon,O=v.rowExpandable,x=v.expandIconColumnIndex,b=v.direction,y=v.expandRowByClick,T=u.useMemo(function(){return n||l(o)},[n,o]),M=u.useMemo(function(){if(t){var K,z=x||0,B=T[z],H=(K={},Object(L.a)(K,s.a,{className:"".concat(E,"-expand-icon-col")}),Object(L.a)(K,"title",""),Object(L.a)(K,"fixed",B?B.fixed:null),Object(L.a)(K,"className","".concat(E,"-row-expand-icon-cell")),Object(L.a)(K,"render",function(G,ee,ie){var ce=_(ee,ie),_e=S.has(ce),Ce=O?O(ee):!0,le=P({prefixCls:E,expanded:_e,expandable:Ce,record:ee,onExpand:i});return y?u.createElement("span",{onClick:function(fe){return fe.stopPropagation()}},le):le}),K),U=T.slice();return z>=0&&U.splice(z,0,H),U}return T},[t,T,_,S,P,b]),k=u.useMemo(function(){var K=M;return g&&(K=g(K)),K.length||(K=[{render:function(){return null}}]),K},[g,M,b]),N=u.useMemo(function(){return b==="rtl"?h(a(k)):a(k)},[k,b]);return[k,N]}J.b=c},wZgz:function(j,J,I){(function(L,f,C){j.exports=J=f(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.BlockCipher,u=f.algo,m=[],w=[],p=[],s=[],l=[],a=[],d=[],h=[],c=[],v=[];(function(){for(var n=[],o=0;o<256;o++)o<128?n[o]=o<<1:n[o]=o<<1^283;for(var t=0,S=0,o=0;o<256;o++){var _=S^S<<1^S<<2^S<<3^S<<4;_=_>>>8^_&255^99,m[t]=_,w[_]=t;var i=n[t],P=n[i],O=n[P],x=n[_]*257^_*16843008;p[t]=x<<24|x>>>8,s[t]=x<<16|x>>>16,l[t]=x<<8|x>>>24,a[t]=x;var x=O*16843009^P*65537^i*257^t*16843008;d[_]=x<<24|x>>>8,h[_]=x<<16|x>>>16,c[_]=x<<8|x>>>24,v[_]=x,t?(t=i^n[n[n[O^i]]],S^=n[n[S]]):t=S=1}})();var g=[0,1,2,4,8,16,32,64,128,27,54],E=u.AES=D.extend({_doReset:function(){var n;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var o=this._keyPriorReset=this._key,t=o.words,S=o.sigBytes/4,_=this._nRounds=S+6,i=(_+1)*4,P=this._keySchedule=[],O=0;O<i;O++)O<S?P[O]=t[O]:(n=P[O-1],O%S?S>6&&O%S==4&&(n=m[n>>>24]<<24|m[n>>>16&255]<<16|m[n>>>8&255]<<8|m[n&255]):(n=n<<8|n>>>24,n=m[n>>>24]<<24|m[n>>>16&255]<<16|m[n>>>8&255]<<8|m[n&255],n^=g[O/S|0]<<24),P[O]=P[O-S]^n);for(var x=this._invKeySchedule=[],b=0;b<i;b++){var O=i-b;if(b%4)var n=P[O];else var n=P[O-4];b<4||O<=4?x[b]=n:x[b]=d[m[n>>>24]]^h[m[n>>>16&255]]^c[m[n>>>8&255]]^v[m[n&255]]}},encryptBlock:function(n,o){this._doCryptBlock(n,o,this._keySchedule,p,s,l,a,m)},decryptBlock:function(n,o){var t=n[o+1];n[o+1]=n[o+3],n[o+3]=t,this._doCryptBlock(n,o,this._invKeySchedule,d,h,c,v,w);var t=n[o+1];n[o+1]=n[o+3],n[o+3]=t},_doCryptBlock:function(n,o,t,S,_,i,P,O){for(var x=this._nRounds,b=n[o]^t[0],y=n[o+1]^t[1],T=n[o+2]^t[2],M=n[o+3]^t[3],k=4,N=1;N<x;N++){var K=S[b>>>24]^_[y>>>16&255]^i[T>>>8&255]^P[M&255]^t[k++],z=S[y>>>24]^_[T>>>16&255]^i[M>>>8&255]^P[b&255]^t[k++],B=S[T>>>24]^_[M>>>16&255]^i[b>>>8&255]^P[y&255]^t[k++],H=S[M>>>24]^_[b>>>16&255]^i[y>>>8&255]^P[T&255]^t[k++];b=K,y=z,T=B,M=H}var K=(O[b>>>24]<<24|O[y>>>16&255]<<16|O[T>>>8&255]<<8|O[M&255])^t[k++],z=(O[y>>>24]<<24|O[T>>>16&255]<<16|O[M>>>8&255]<<8|O[b&255])^t[k++],B=(O[T>>>24]<<24|O[M>>>16&255]<<16|O[b>>>8&255]<<8|O[y&255])^t[k++],H=(O[M>>>24]<<24|O[b>>>16&255]<<16|O[y>>>8&255]<<8|O[T&255])^t[k++];n[o]=K,n[o+1]=z,n[o+2]=B,n[o+3]=H},keySize:256/32});f.AES=D._createHelper(E)}(),L.AES})},wbyO:function(j,J,I){(function(L,f){j.exports=J=f(I("Ib8C"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.WordArray,u=f.enc,m=u.Base64url={stringify:function(p,s=!0){var l=p.words,a=p.sigBytes,d=s?this._safe_map:this._map;p.clamp();for(var h=[],c=0;c<a;c+=3)for(var v=l[c>>>2]>>>24-c%4*8&255,g=l[c+1>>>2]>>>24-(c+1)%4*8&255,E=l[c+2>>>2]>>>24-(c+2)%4*8&255,n=v<<16|g<<8|E,o=0;o<4&&c+o*.75<a;o++)h.push(d.charAt(n>>>6*(3-o)&63));var t=d.charAt(64);if(t)for(;h.length%4;)h.push(t);return h.join("")},parse:function(p,s=!0){var l=p.length,a=s?this._safe_map:this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var h=0;h<a.length;h++)d[a.charCodeAt(h)]=h}var c=a.charAt(64);if(c){var v=p.indexOf(c);v!==-1&&(l=v)}return w(p,l,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function w(p,s,l){for(var a=[],d=0,h=0;h<s;h++)if(h%4){var c=l[p.charCodeAt(h-1)]<<h%4*2,v=l[p.charCodeAt(h)]>>>6-h%4*2,g=c|v;a[d>>>2]|=g<<24-d%4*8,d++}return D.create(a,d)}}(),L.enc.Base64url})},"y0+3":function(j,J,I){"use strict";I.d(J,"a",function(){return a}),I.d(J,"b",function(){return h});var L=/margin|padding|width|height|max|min|offset/,f={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,v,g){if(v=v.toLowerCase(),g==="auto"){if(v==="height")return c.offsetHeight;if(v==="width")return c.offsetWidth}return v in f||(f[v]=L.test(v)),f[v]?parseFloat(g)||0:g}function m(c,v){var g=arguments.length,E=D(c);return v=C[v]?"cssFloat"in c.style?"cssFloat":"styleFloat":v,g===1?E:u(c,v,E[v]||c.style[v])}function w(c,v,g){var E=arguments.length;if(v=C[v]?"cssFloat"in c.style?"cssFloat":"styleFloat":v,E===3)return typeof g=="number"&&L.test(v)&&(g="".concat(g,"px")),c.style[v]=g,g;for(var n in v)v.hasOwnProperty(n)&&w(c,n,v[n]);return D(c)}function p(c){return c===document.body?document.documentElement.clientWidth:c.offsetWidth}function s(c){return c===document.body?window.innerHeight||document.documentElement.clientHeight:c.offsetHeight}function l(){var c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),v=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:c,height:v}}function a(){var c=document.documentElement.clientWidth,v=window.innerHeight||document.documentElement.clientHeight;return{width:c,height:v}}function d(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function h(c){var v=c.getBoundingClientRect(),g=document.documentElement;return{left:v.left+(window.pageXOffset||g.scrollLeft)-(g.clientLeft||document.body.clientLeft||0),top:v.top+(window.pageYOffset||g.scrollTop)-(g.clientTop||document.body.clientTop||0)}}},zrhs:function(j,J,I){"use strict";var L=I("2qtc"),f=I("kLXV"),C=I("PpiC"),D=I("cDcd"),u=I.n(D),m=I("9kvl"),w=function(s){var l=s.shixunsDetail,a=s.globalSetting,d=s.loading,h=s.dispatch,c=Object(C.a)(s,["shixunsDetail","globalSetting","loading","dispatch"]);return u.a.createElement(f.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(){h({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){h({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"))};J.a=Object(m.a)(function(p){var s=p.shixunsDetail,l=p.loading,a=p.globalSetting;return{shixunsDetail:s,globalSetting:a,loading:l.models.index}})(w)}}]);
|